/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _arrayLikeToArray)\n/* harmony export */ });\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n    arr2[i] = arr[i];\n  }\n\n  return arr2;\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _arrayWithHoles)\n/* harmony export */ });\nfunction _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _arrayWithoutHoles)\n/* harmony export */ });\n/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr);\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _assertThisInitialized)\n/* harmony export */ });\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _asyncToGenerator)\n/* harmony export */ });\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n  try {\n    var info = gen[key](arg);\n    var value = info.value;\n  } catch (error) {\n    reject(error);\n    return;\n  }\n\n  if (info.done) {\n    resolve(value);\n  } else {\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\n\nfunction _asyncToGenerator(fn) {\n  return function () {\n    var self = this,\n        args = arguments;\n    return new Promise(function (resolve, reject) {\n      var gen = fn.apply(self, args);\n\n      function _next(value) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n      }\n\n      function _throw(err) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n      }\n\n      _next(undefined);\n    });\n  };\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _classCallCheck)\n/* harmony export */ });\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/construct.js":
/*!**************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/construct.js ***!
  \**************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _construct)\n/* harmony export */ });\n/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\");\n/* harmony import */ var _isNativeReflectConstruct_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isNativeReflectConstruct.js */ \"./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js\");\n\n\nfunction _construct(Parent, args, Class) {\n  if ((0,_isNativeReflectConstruct_js__WEBPACK_IMPORTED_MODULE_1__.default)()) {\n    _construct = Reflect.construct;\n  } else {\n    _construct = function _construct(Parent, args, Class) {\n      var a = [null];\n      a.push.apply(a, args);\n      var Constructor = Function.bind.apply(Parent, a);\n      var instance = new Constructor();\n      if (Class) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(instance, Class.prototype);\n      return instance;\n    };\n  }\n\n  return _construct.apply(null, arguments);\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/construct.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js":
/*!****************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***!
  \****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _createClass)\n/* harmony export */ });\nfunction _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/createClass.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _defineProperty)\n/* harmony export */ });\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/defineProperty.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/get.js":
/*!********************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/get.js ***!
  \********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _get)\n/* harmony export */ });\n/* harmony import */ var _superPropBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superPropBase.js */ \"./node_modules/@babel/runtime/helpers/esm/superPropBase.js\");\n\nfunction _get(target, property, receiver) {\n  if (typeof Reflect !== \"undefined\" && Reflect.get) {\n    _get = Reflect.get;\n  } else {\n    _get = function _get(target, property, receiver) {\n      var base = (0,_superPropBase_js__WEBPACK_IMPORTED_MODULE_0__.default)(target, property);\n      if (!base) return;\n      var desc = Object.getOwnPropertyDescriptor(base, property);\n\n      if (desc.get) {\n        return desc.get.call(receiver);\n      }\n\n      return desc.value;\n    };\n  }\n\n  return _get(target, property, receiver || target);\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/get.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _getPrototypeOf)\n/* harmony export */ });\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js":
/*!*************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***!
  \*************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _inherits)\n/* harmony export */ });\n/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(subClass, superClass);\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/inherits.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _isNativeFunction)\n/* harmony export */ });\nfunction _isNativeFunction(fn) {\n  return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _isNativeReflectConstruct)\n/* harmony export */ });\nfunction _isNativeReflectConstruct() {\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n  if (Reflect.construct.sham) return false;\n  if (typeof Proxy === \"function\") return true;\n\n  try {\n    Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js":
/*!********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
  \********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _iterableToArray)\n/* harmony export */ });\nfunction _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _iterableToArrayLimit)\n/* harmony export */ });\nfunction _iterableToArrayLimit(arr, i) {\n  if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n  var _e = undefined;\n\n  try {\n    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n\n  return _arr;\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
/*!********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
  \********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _nonIterableRest)\n/* harmony export */ });\nfunction _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _nonIterableSpread)\n/* harmony export */ });\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _possibleConstructorReturn)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ \"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__.default)(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  }\n\n  return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__.default)(self);\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _setPrototypeOf)\n/* harmony export */ });\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":
/*!******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***!
  \******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _slicedToArray)\n/* harmony export */ });\n/* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ \"./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js\");\n/* harmony import */ var _iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit.js */ \"./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js\");\n/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js\");\n/* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ \"./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js\");\n\n\n\n\nfunction _slicedToArray(arr, i) {\n  return (0,_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr) || (0,_iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__.default)(arr, i) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__.default)(arr, i) || (0,_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__.default)();\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/superPropBase.js":
/*!******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/superPropBase.js ***!
  \******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _superPropBase)\n/* harmony export */ });\n/* harmony import */ var _getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js\");\n\nfunction _superPropBase(object, property) {\n  while (!Object.prototype.hasOwnProperty.call(object, property)) {\n    object = (0,_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(object);\n    if (object === null) break;\n  }\n\n  return object;\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/superPropBase.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _toConsumableArray)\n/* harmony export */ });\n/* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles.js */ \"./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js\");\n/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ \"./node_modules/@babel/runtime/helpers/esm/iterableToArray.js\");\n/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js\");\n/* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableSpread.js */ \"./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js\");\n\n\n\n\nfunction _toConsumableArray(arr) {\n  return (0,_arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr) || (0,_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__.default)(arr) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__.default)(arr) || (0,_nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__.default)();\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js":
/*!***********************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
  \***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _typeof)\n/* harmony export */ });\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function _typeof(obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function _typeof(obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/typeof.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _unsupportedIterableToArray)\n/* harmony export */ });\n/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js":
/*!********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js ***!
  \********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ _wrapNativeSuper)\n/* harmony export */ });\n/* harmony import */ var _getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js\");\n/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\");\n/* harmony import */ var _isNativeFunction_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isNativeFunction.js */ \"./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js\");\n/* harmony import */ var _construct_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./construct.js */ \"./node_modules/@babel/runtime/helpers/esm/construct.js\");\n\n\n\n\nfunction _wrapNativeSuper(Class) {\n  var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n  _wrapNativeSuper = function _wrapNativeSuper(Class) {\n    if (Class === null || !(0,_isNativeFunction_js__WEBPACK_IMPORTED_MODULE_2__.default)(Class)) return Class;\n\n    if (typeof Class !== \"function\") {\n      throw new TypeError(\"Super expression must either be null or a function\");\n    }\n\n    if (typeof _cache !== \"undefined\") {\n      if (_cache.has(Class)) return _cache.get(Class);\n\n      _cache.set(Class, Wrapper);\n    }\n\n    function Wrapper() {\n      return (0,_construct_js__WEBPACK_IMPORTED_MODULE_3__.default)(Class, arguments, (0,_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(this).constructor);\n    }\n\n    Wrapper.prototype = Object.create(Class.prototype, {\n      constructor: {\n        value: Wrapper,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n    return (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_1__.default)(Wrapper, Class);\n  };\n\n  return _wrapNativeSuper(Class);\n}\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/regenerator/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  \**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

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

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/Core/Base64.js":
/*!************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/Core/Base64.js ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* eslint-disable no-bitwise */\n// ----------------------------------------------------------------------------\n// Decoding infrastructure\n// ----------------------------------------------------------------------------\nvar REVERSE_LOOKUP = [];\nREVERSE_LOOKUP['-'.charCodeAt(0)] = 62;\nREVERSE_LOOKUP['_'.charCodeAt(0)] = 63;\nvar BASE64_CODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nfor (var i = 0; i < BASE64_CODE.length; i++) {\n  REVERSE_LOOKUP[BASE64_CODE.charCodeAt(i)] = i;\n} // ----------------------------------------------------------------------------\n// Base64 analysis\n// ----------------------------------------------------------------------------\n\n\nfunction isValidChar(c) {\n  return REVERSE_LOOKUP[c.charCodeAt(0)] !== undefined;\n}\n\nfunction extractChunks(b64Str) {\n  var strSize = b64Str.length;\n  var chunks = [];\n  var currentChunk = null;\n\n  for (var _i = 0; _i < strSize; _i++) {\n    if (isValidChar(b64Str[_i])) {\n      if (!currentChunk) {\n        currentChunk = {\n          start: _i,\n          count: 0\n        };\n      }\n\n      currentChunk.count++;\n      currentChunk.end = _i;\n    } else if (b64Str[_i] === '=' && currentChunk) {\n      // End of chunk (found padding char)\n      chunks.push(currentChunk);\n      currentChunk = null;\n    }\n  }\n\n  if (currentChunk) {\n    chunks.push(currentChunk);\n  }\n\n  return chunks;\n}\n\nfunction writeChunk(b64Str, chunk, dstOffset, uint8) {\n  var start = chunk.start,\n      count = chunk.count;\n  var remain = count % 4;\n  var fourCharProcessCount = Math.floor(count / 4);\n  var charIdx = start;\n  var tmp = null;\n  var offset = dstOffset; // Handle 4=>3\n\n  for (var _i2 = 0; _i2 < fourCharProcessCount; _i2++) {\n    while (!isValidChar(b64Str[charIdx])) {\n      charIdx++;\n    }\n\n    tmp = REVERSE_LOOKUP[b64Str.charCodeAt(charIdx++)] << 18;\n\n    while (!isValidChar(b64Str[charIdx])) {\n      charIdx++;\n    }\n\n    tmp |= REVERSE_LOOKUP[b64Str.charCodeAt(charIdx++)] << 12;\n\n    while (!isValidChar(b64Str[charIdx])) {\n      charIdx++;\n    }\n\n    tmp |= REVERSE_LOOKUP[b64Str.charCodeAt(charIdx++)] << 6;\n\n    while (!isValidChar(b64Str[charIdx])) {\n      charIdx++;\n    }\n\n    tmp |= REVERSE_LOOKUP[b64Str.charCodeAt(charIdx++)];\n    uint8[offset++] = tmp >> 16 & 0xff;\n    uint8[offset++] = tmp >> 8 & 0xff;\n    uint8[offset++] = tmp & 0xff;\n  } // Handle remain\n\n\n  switch (remain) {\n    case 3:\n      while (!isValidChar(b64Str[charIdx])) {\n        charIdx++;\n      }\n\n      tmp = REVERSE_LOOKUP[b64Str.charCodeAt(charIdx++)] << 10;\n\n      while (!isValidChar(b64Str[charIdx])) {\n        charIdx++;\n      }\n\n      tmp |= REVERSE_LOOKUP[b64Str.charCodeAt(charIdx++)] << 4;\n\n      while (!isValidChar(b64Str[charIdx])) {\n        charIdx++;\n      }\n\n      tmp |= REVERSE_LOOKUP[b64Str.charCodeAt(charIdx++)] >> 2;\n      uint8[offset++] = tmp >> 8 & 0xff;\n      uint8[offset++] = tmp & 0xff;\n      break;\n\n    case 2:\n      while (!isValidChar(b64Str[charIdx])) {\n        charIdx++;\n      }\n\n      tmp = REVERSE_LOOKUP[b64Str.charCodeAt(charIdx++)] << 2;\n\n      while (!isValidChar(b64Str[charIdx])) {\n        charIdx++;\n      }\n\n      tmp |= REVERSE_LOOKUP[b64Str.charCodeAt(charIdx++)] >> 4;\n      uint8[offset++] = tmp & 0xff;\n      break;\n\n    case 1:\n      throw new Error('BASE64: remain 1 should not happen');\n  }\n\n  return offset;\n}\n\nfunction toArrayBuffer(b64Str) {\n  var chunks = extractChunks(b64Str);\n  var totalEncodedLength = chunks[chunks.length - 1].end + 1;\n  var padding = (4 - totalEncodedLength % 4) % 4; // -length mod 4\n  // Any padding chars in the middle of b64Str is to be interpreted as \\x00,\n  // whereas the terminating padding chars are to be interpreted as literal padding.\n\n  var totalSize = (totalEncodedLength + padding) * 3 / 4 - padding;\n  var arrayBuffer = new ArrayBuffer(totalSize);\n  var view = new Uint8Array(arrayBuffer);\n  var dstOffset = 0;\n\n  for (var _i3 = 0; _i3 < chunks.length; _i3++) {\n    dstOffset += writeChunk(b64Str, chunks[_i3], dstOffset, view);\n    dstOffset += (4 - chunks[_i3].count % 4) % 4;\n  }\n\n  return arrayBuffer;\n}\n\nvar Base64 = {\n  toArrayBuffer: toArrayBuffer\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Base64);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/Core/Base64.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/Core/CellArray.js":
/*!***************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/Core/CellArray.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"STATIC\": () => (/* binding */ STATIC),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _DataArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DataArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n/* harmony import */ var _DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DataArray/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray/Constants.js\");\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\n// Global methods\n// ----------------------------------------------------------------------------\n\nfunction extractCellSizes(cellArray) {\n  var currentIdx = 0;\n  return cellArray.filter(function (value, index) {\n    if (index === currentIdx) {\n      currentIdx += value + 1;\n      return true;\n    }\n\n    return false;\n  });\n}\n\nfunction getNumberOfCells(cellArray) {\n  return extractCellSizes(cellArray).length;\n} // ----------------------------------------------------------------------------\n// Static API\n// ----------------------------------------------------------------------------\n\n\nvar STATIC = {\n  extractCellSizes: extractCellSizes,\n  getNumberOfCells: getNumberOfCells\n}; // ----------------------------------------------------------------------------\n// vtkCellArray methods\n// ----------------------------------------------------------------------------\n\nfunction vtkCellArray(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkCellArray');\n\n  publicAPI.getNumberOfCells = function (recompute) {\n    if (model.numberOfCells !== undefined && !recompute) {\n      return model.numberOfCells;\n    }\n\n    model.cellSizes = extractCellSizes(model.values);\n    model.numberOfCells = model.cellSizes.length;\n    return model.numberOfCells;\n  };\n\n  publicAPI.getCellSizes = function (recompute) {\n    if (model.cellSizes !== undefined && !recompute) {\n      return model.cellSizes;\n    }\n\n    model.cellSizes = extractCellSizes(model.values);\n    return model.cellSizes;\n  };\n\n  var superSetData = publicAPI.setData;\n\n  publicAPI.setData = function (typedArray) {\n    superSetData(typedArray, 1);\n    model.numberOfCells = undefined;\n    model.cellSizes = undefined;\n  };\n  /**\n   * Returns the point indexes at the given location as a subarray.\n   */\n\n\n  publicAPI.getCell = function (loc) {\n    var cellLoc = loc;\n    var numberOfPoints = model.values[cellLoc++];\n    return model.values.subarray(cellLoc, cellLoc + numberOfPoints);\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nfunction defaultValues(initialValues) {\n  return _objectSpread({\n    empty: true,\n    numberOfComponents: 1,\n    dataType: _DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_3__.VtkDataTypes.UNSIGNED_INT\n  }, initialValues);\n} // ----------------------------------------------------------------------------\n\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  _DataArray_js__WEBPACK_IMPORTED_MODULE_2__.default.extend(publicAPI, model, defaultValues(initialValues));\n  vtkCellArray(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkCellArray'); // ----------------------------------------------------------------------------\n\nvar vtkCellArray$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, STATIC);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkCellArray$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/Core/CellArray.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/Core/ClassHierarchy.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/Core/ClassHierarchy.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/get */ \"./node_modules/@babel/runtime/helpers/esm/get.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/esm/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ \"./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js\");\n\n\n\n\n\n\n\n\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__.default)(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nvar ClassHierarchy = /*#__PURE__*/function (_Array) {\n  (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__.default)(ClassHierarchy, _Array);\n\n  var _super = _createSuper(ClassHierarchy);\n\n  function ClassHierarchy() {\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__.default)(this, ClassHierarchy);\n\n    return _super.apply(this, arguments);\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__.default)(ClassHierarchy, [{\n    key: \"push\",\n    value: function push() {\n      var _this = this,\n          _get2;\n\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      // no perf issue since args.length should be small\n      var newArgs = args.filter(function (arg) {\n        return !_this.includes(arg);\n      });\n      return (_get2 = (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_3__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__.default)(ClassHierarchy.prototype), \"push\", this)).call.apply(_get2, [this].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(newArgs)));\n    }\n  }]);\n\n  return ClassHierarchy;\n}( /*#__PURE__*/(0,_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_7__.default)(Array));\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ClassHierarchy);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/Core/ClassHierarchy.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/Core/DataArray.js":
/*!***************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/Core/DataArray.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"STATIC\": () => (/* binding */ STATIC),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DataArray/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray/Constants.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Math_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar DefaultDataType = _DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_1__.default.DefaultDataType;\nvar TUPLE_HOLDER = []; // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n\nfunction createRangeHelper() {\n  var min = Number.MAX_VALUE;\n  var max = -Number.MAX_VALUE;\n  var count = 0;\n  var sum = 0;\n  return {\n    add: function add(value) {\n      if (min > value) {\n        min = value;\n      }\n\n      if (max < value) {\n        max = value;\n      }\n\n      count++;\n      sum += value;\n    },\n    get: function get() {\n      return {\n        min: min,\n        max: max,\n        count: count,\n        sum: sum,\n        mean: sum / count\n      };\n    },\n    getRange: function getRange() {\n      return {\n        min: min,\n        max: max\n      };\n    }\n  };\n}\n\nfunction computeRange(values) {\n  var component = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  var numberOfComponents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  var helper = createRangeHelper();\n  var size = values.length;\n  var value = 0;\n\n  if (component < 0 && numberOfComponents > 1) {\n    // Compute magnitude\n    for (var i = 0; i < size; i += numberOfComponents) {\n      value = 0;\n\n      for (var j = 0; j < numberOfComponents; j++) {\n        value += values[i + j] * values[i + j];\n      }\n\n      value = Math.pow(value, 0.5);\n      helper.add(value);\n    }\n\n    return helper.getRange();\n  }\n\n  var offset = component < 0 ? 0 : component;\n\n  for (var _i = offset; _i < size; _i += numberOfComponents) {\n    helper.add(values[_i]);\n  }\n\n  return helper.getRange();\n}\n\nfunction ensureRangeSize(rangeArray) {\n  var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  var ranges = rangeArray || []; // Pad ranges with null value to get the\n\n  while (ranges.length <= size) {\n    ranges.push(null);\n  }\n\n  return ranges;\n}\n\nfunction getDataType(typedArray) {\n  // Expects toString() to return \"[object ...Array]\"\n  return Object.prototype.toString.call(typedArray).slice(8, -1);\n}\n\nfunction getMaxNorm(normArray) {\n  var numComps = normArray.getNumberOfComponents();\n  var maxNorm = 0.0;\n\n  for (var i = 0; i < normArray.getNumberOfTuples(); ++i) {\n    var norm$1 = (0,_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.n)(normArray.getTuple(i), numComps);\n\n    if (norm$1 > maxNorm) {\n      maxNorm = norm$1;\n    }\n  }\n\n  return maxNorm;\n} // ----------------------------------------------------------------------------\n// Static API\n// ----------------------------------------------------------------------------\n\n\nvar STATIC = {\n  computeRange: computeRange,\n  createRangeHelper: createRangeHelper,\n  getDataType: getDataType,\n  getMaxNorm: getMaxNorm\n}; // ----------------------------------------------------------------------------\n// vtkDataArray methods\n// ----------------------------------------------------------------------------\n\nfunction vtkDataArray(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkDataArray');\n\n  function dataChange() {\n    model.ranges = null;\n    publicAPI.modified();\n  }\n\n  publicAPI.getElementComponentSize = function () {\n    return model.values.BYTES_PER_ELEMENT;\n  }; // Description:\n  // Return the data component at the location specified by tupleIdx and\n  // compIdx.\n\n\n  publicAPI.getComponent = function (tupleIdx) {\n    var compIdx = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n    return model.values[tupleIdx * model.numberOfComponents + compIdx];\n  }; // Description:\n  // Set the data component at the location specified by tupleIdx and compIdx\n  // to value.\n  // Note that i is less than NumberOfTuples and j is less than\n  //  NumberOfComponents. Make sure enough memory has been allocated\n  // (use SetNumberOfTuples() and SetNumberOfComponents()).\n\n\n  publicAPI.setComponent = function (tupleIdx, compIdx, value) {\n    if (value !== model.values[tupleIdx * model.numberOfComponents + compIdx]) {\n      model.values[tupleIdx * model.numberOfComponents + compIdx] = value;\n      dataChange();\n    }\n  };\n\n  publicAPI.getData = function () {\n    return model.values;\n  };\n\n  publicAPI.getRange = function () {\n    var componentIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;\n    var rangeIdx = componentIndex < 0 ? model.numberOfComponents : componentIndex;\n    var range = null;\n\n    if (!model.ranges) {\n      model.ranges = ensureRangeSize(model.ranges, model.numberOfComponents);\n    }\n\n    range = model.ranges[rangeIdx];\n\n    if (range) {\n      model.rangeTuple[0] = range.min;\n      model.rangeTuple[1] = range.max;\n      return model.rangeTuple;\n    } // Need to compute ranges...\n\n\n    range = computeRange(model.values, componentIndex, model.numberOfComponents);\n    model.ranges[rangeIdx] = range;\n    model.rangeTuple[0] = range.min;\n    model.rangeTuple[1] = range.max;\n    return model.rangeTuple;\n  };\n\n  publicAPI.setRange = function (rangeValue, componentIndex) {\n    if (!model.ranges) {\n      model.ranges = ensureRangeSize(model.ranges, model.numberOfComponents);\n    }\n\n    var range = {\n      min: rangeValue.min,\n      max: rangeValue.max\n    };\n    model.ranges[componentIndex] = range;\n    model.rangeTuple[0] = range.min;\n    model.rangeTuple[1] = range.max;\n    return model.rangeTuple;\n  };\n\n  publicAPI.setTuple = function (idx, tuple) {\n    var offset = idx * model.numberOfComponents;\n\n    for (var i = 0; i < model.numberOfComponents; i++) {\n      model.values[offset + i] = tuple[i];\n    }\n  };\n\n  publicAPI.getTuple = function (idx) {\n    var tupleToFill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TUPLE_HOLDER;\n    var numberOfComponents = model.numberOfComponents || 1;\n\n    if (tupleToFill.length !== numberOfComponents) {\n      tupleToFill.length = numberOfComponents;\n    }\n\n    var offset = idx * numberOfComponents; // Check most common component sizes first\n    // to avoid doing a for loop if possible\n\n    if (numberOfComponents === 1) {\n      tupleToFill[0] = model.values[offset];\n    } else if (numberOfComponents === 2) {\n      tupleToFill[0] = model.values[offset];\n      tupleToFill[1] = model.values[offset + 1];\n    } else if (numberOfComponents === 3) {\n      tupleToFill[0] = model.values[offset];\n      tupleToFill[1] = model.values[offset + 1];\n      tupleToFill[2] = model.values[offset + 2];\n    } else if (numberOfComponents === 4) {\n      tupleToFill[0] = model.values[offset];\n      tupleToFill[1] = model.values[offset + 1];\n      tupleToFill[2] = model.values[offset + 2];\n      tupleToFill[3] = model.values[offset + 3];\n    } else {\n      for (var i = 0; i < numberOfComponents; i++) {\n        tupleToFill[i] = model.values[offset + i];\n      }\n    }\n\n    return tupleToFill;\n  };\n\n  publicAPI.getTupleLocation = function () {\n    var idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n    return idx * model.numberOfComponents;\n  };\n\n  publicAPI.getNumberOfComponents = function () {\n    return model.numberOfComponents;\n  };\n\n  publicAPI.getNumberOfValues = function () {\n    return model.values.length;\n  };\n\n  publicAPI.getNumberOfTuples = function () {\n    return model.values.length / model.numberOfComponents;\n  };\n\n  publicAPI.getDataType = function () {\n    return model.dataType;\n  };\n  /* eslint-disable no-use-before-define */\n\n\n  publicAPI.newClone = function () {\n    return newInstance({\n      empty: true,\n      name: model.name,\n      dataType: model.dataType,\n      numberOfComponents: model.numberOfComponents\n    });\n  };\n  /* eslint-enable no-use-before-define */\n\n\n  publicAPI.getName = function () {\n    if (!model.name) {\n      publicAPI.modified();\n      model.name = \"vtkDataArray\".concat(publicAPI.getMTime());\n    }\n\n    return model.name;\n  };\n\n  publicAPI.setData = function (typedArray, numberOfComponents) {\n    model.values = typedArray;\n    model.size = typedArray.length;\n    model.dataType = getDataType(typedArray);\n\n    if (numberOfComponents) {\n      model.numberOfComponents = numberOfComponents;\n    }\n\n    if (model.size % model.numberOfComponents !== 0) {\n      model.numberOfComponents = 1;\n    }\n\n    dataChange();\n  }; // Override serialization support\n\n\n  publicAPI.getState = function () {\n    var jsonArchive = _objectSpread(_objectSpread({}, model), {}, {\n      vtkClass: publicAPI.getClassName()\n    }); // Convert typed array to regular array\n\n\n    jsonArchive.values = Array.from(jsonArchive.values);\n    delete jsonArchive.buffer; // Clean any empty data\n\n    Object.keys(jsonArchive).forEach(function (keyName) {\n      if (!jsonArchive[keyName]) {\n        delete jsonArchive[keyName];\n      }\n    }); // Sort resulting object by key name\n\n    var sortedObj = {};\n    Object.keys(jsonArchive).sort().forEach(function (name) {\n      sortedObj[name] = jsonArchive[name];\n    }); // Remove mtime\n\n    if (sortedObj.mtime) {\n      delete sortedObj.mtime;\n    }\n\n    return sortedObj;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  name: '',\n  numberOfComponents: 1,\n  size: 0,\n  dataType: DefaultDataType,\n  rangeTuple: [0, 0] // values: null,\n  // ranges: null,\n\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues);\n\n  if (!model.empty && !model.values && !model.size) {\n    throw new TypeError('Cannot create vtkDataArray object without: size > 0, values');\n  }\n\n  if (!model.values) {\n    model.values = (0,_macro_js__WEBPACK_IMPORTED_MODULE_2__.newTypedArray)(model.dataType, model.size);\n  } else if (Array.isArray(model.values)) {\n    model.values = (0,_macro_js__WEBPACK_IMPORTED_MODULE_2__.newTypedArrayFrom)(model.dataType, model.values);\n  }\n\n  if (model.values) {\n    model.size = model.values.length;\n    model.dataType = getDataType(model.values);\n  } // Object methods\n\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_2__.obj)(publicAPI, model);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_2__.set)(publicAPI, model, ['name', 'numberOfComponents']); // Object specific methods\n\n  vtkDataArray(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_2__.newInstance)(extend, 'vtkDataArray'); // ----------------------------------------------------------------------------\n\nvar vtkDataArray$1 = _objectSpread(_objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, STATIC), _DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_1__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkDataArray$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/Core/DataArray.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/Core/DataArray/Constants.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/Core/DataArray/Constants.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"DataTypeByteSize\": () => (/* binding */ DataTypeByteSize),\n/* harmony export */   \"DefaultDataType\": () => (/* binding */ DefaultDataType),\n/* harmony export */   \"VtkDataTypes\": () => (/* binding */ VtkDataTypes)\n/* harmony export */ });\nvar DataTypeByteSize = {\n  Int8Array: 1,\n  Uint8Array: 1,\n  Uint8ClampedArray: 1,\n  Int16Array: 2,\n  Uint16Array: 2,\n  Int32Array: 4,\n  Uint32Array: 4,\n  Float32Array: 4,\n  Float64Array: 8\n};\nvar VtkDataTypes = {\n  VOID: '',\n  // not sure to know what that should be\n  CHAR: 'Int8Array',\n  SIGNED_CHAR: 'Int8Array',\n  UNSIGNED_CHAR: 'Uint8Array',\n  SHORT: 'Int16Array',\n  UNSIGNED_SHORT: 'Uint16Array',\n  INT: 'Int32Array',\n  UNSIGNED_INT: 'Uint32Array',\n  FLOAT: 'Float32Array',\n  DOUBLE: 'Float64Array'\n};\nvar DefaultDataType = VtkDataTypes.FLOAT;\nvar Constants = {\n  DefaultDataType: DefaultDataType,\n  DataTypeByteSize: DataTypeByteSize,\n  VtkDataTypes: VtkDataTypes\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/Core/DataArray/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/Core/Endian.js":
/*!************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/Core/Endian.js ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"ENDIANNESS\": () => (/* binding */ ENDIANNESS),\n/* harmony export */   \"getEndianness\": () => (/* binding */ getEndianness),\n/* harmony export */   \"swapBytes\": () => (/* binding */ swapBytes)\n/* harmony export */ });\nfunction getEndianness() {\n  var a = new ArrayBuffer(4);\n  var b = new Uint8Array(a);\n  var c = new Uint32Array(a);\n  b[0] = 0xa1;\n  b[1] = 0xb2;\n  b[2] = 0xc3;\n  b[3] = 0xd4;\n  if (c[0] === 0xd4c3b2a1) return 'LittleEndian';\n  if (c[0] === 0xa1b2c3d4) return 'BigEndian';\n  return null;\n}\nvar ENDIANNESS = getEndianness();\nfunction swapBytes(buffer, wordSize) {\n  if (wordSize < 2) {\n    return;\n  }\n\n  var bytes = new Int8Array(buffer);\n  var size = bytes.length;\n  var tempBuffer = [];\n\n  for (var i = 0; i < size; i += wordSize) {\n    for (var j = 0; j < wordSize; j++) {\n      tempBuffer.push(bytes[i + j]);\n    }\n\n    for (var _j = 0; _j < wordSize; _j++) {\n      bytes[i + _j] = tempBuffer.pop();\n    }\n  }\n}\nvar Endian = {\n  ENDIANNESS: ENDIANNESS,\n  getEndianness: getEndianness,\n  swapBytes: swapBytes\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Endian);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/Core/Endian.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/Core/LookupTable.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/Core/LookupTable.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Math_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _ScalarsToColors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ScalarsToColors.js */ \"./node_modules/@kitware/vtk.js/Common/Core/ScalarsToColors.js\");\n/* harmony import */ var _ScalarsToColors_Constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ScalarsToColors/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/Core/ScalarsToColors/Constants.js\");\n/* harmony import */ var _DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DataArray/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray/Constants.js\");\n\n\n\n\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.vtkErrorMacro; // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n// Add module-level functions or api that you want to expose statically via\n// the next section...\n// ----------------------------------------------------------------------------\n// Static API\n// ----------------------------------------------------------------------------\n\nvar BELOW_RANGE_COLOR_INDEX = 0;\nvar ABOVE_RANGE_COLOR_INDEX = 1;\nvar NAN_COLOR_INDEX = 2; // ----------------------------------------------------------------------------\n// vtkMyClass methods\n// ----------------------------------------------------------------------------\n\nfunction vtkLookupTable(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkLookupTable'); //----------------------------------------------------------------------------\n  // Description:\n  // Return true if all of the values defining the mapping have an opacity\n  // equal to 1. Default implementation return true.\n\n  publicAPI.isOpaque = function () {\n    if (model.opaqueFlagBuildTime.getMTime() < publicAPI.getMTime()) {\n      var opaque = true;\n\n      if (model.nanColor[3] < 1.0) {\n        opaque = 0;\n      }\n\n      if (model.useBelowRangeColor && model.belowRangeColor[3] < 1.0) {\n        opaque = 0;\n      }\n\n      if (model.useAboveRangeColor && model.aboveRangeColor[3] < 1.0) {\n        opaque = 0;\n      }\n\n      for (var i = 3; i < model.table.length && opaque; i += 4) {\n        if (model.table[i] < 255) {\n          opaque = false;\n        }\n      }\n\n      model.opaqueFlag = opaque;\n      model.opaqueFlagBuildTime.modified();\n    }\n\n    return model.opaqueFlag;\n  };\n\n  publicAPI.usingLogScale = function () {\n    return false;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getNumberOfAvailableColors = function () {\n    return model.table.length;\n  }; //----------------------------------------------------------------------------\n  // Apply shift/scale to the scalar value v and return the index.\n\n\n  publicAPI.linearIndexLookup = function (v, p) {\n    var dIndex = 0;\n\n    if (v < p.range[0]) {\n      dIndex = p.maxIndex + BELOW_RANGE_COLOR_INDEX + 1.5;\n    } else if (v > p.range[1]) {\n      dIndex = p.maxIndex + ABOVE_RANGE_COLOR_INDEX + 1.5;\n    } else {\n      dIndex = (v + p.shift) * p.scale; // This conditional is needed because when v is very close to\n      // p.Range[1], it may map above p.MaxIndex in the linear mapping\n      // above.\n\n      dIndex = dIndex < p.maxIndex ? dIndex : p.maxIndex;\n    }\n\n    return Math.floor(dIndex);\n  };\n\n  publicAPI.linearLookup = function (v, table, p) {\n    var index = 0;\n\n    if ((0,_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.i)(v)) {\n      index = Math.floor(p.maxIndex + 1.5 + NAN_COLOR_INDEX);\n    } else {\n      index = publicAPI.linearIndexLookup(v, p);\n    }\n\n    var offset = 4 * index;\n    return [table[offset], table[offset + 1], table[offset + 2], table[offset + 3]];\n  };\n\n  publicAPI.indexedLookupFunction = function (v, table, p) {\n    var index = publicAPI.getAnnotatedValueIndexInternal(v);\n\n    if (index === -1) {\n      index = model.numberOfColors + NAN_COLOR_INDEX;\n    }\n\n    var offset = 4 * index;\n    return [table[offset], table[offset + 1], table[offset + 2], table[offset + 3]];\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.lookupShiftAndScale = function (range, p) {\n    p.shift = -range[0];\n    p.scale = Number.MAX_VALUE;\n\n    if (range[1] > range[0]) {\n      p.scale = (p.maxIndex + 1) / (range[1] - range[0]);\n    }\n  }; // Public API methods\n\n\n  publicAPI.mapScalarsThroughTable = function (input, output, outFormat, inputOffset) {\n    var lookupFunc = publicAPI.linearLookup;\n\n    if (model.indexedLookup) {\n      lookupFunc = publicAPI.indexedLookupFunction;\n    }\n\n    var trange = publicAPI.getMappingRange();\n    var p = {\n      maxIndex: publicAPI.getNumberOfColors() - 1,\n      range: trange,\n      shift: 0.0,\n      scale: 0.0\n    };\n    publicAPI.lookupShiftAndScale(trange, p);\n    var alpha = publicAPI.getAlpha();\n    var length = input.getNumberOfTuples();\n    var inIncr = input.getNumberOfComponents();\n    var outputV = output.getData();\n    var inputV = input.getData();\n\n    if (alpha >= 1.0) {\n      if (outFormat === _ScalarsToColors_Constants_js__WEBPACK_IMPORTED_MODULE_3__.ScalarMappingTarget.RGBA) {\n        for (var i = 0; i < length; i++) {\n          var cptr = lookupFunc(inputV[i * inIncr + inputOffset], model.table, p);\n          outputV[i * 4] = cptr[0];\n          outputV[i * 4 + 1] = cptr[1];\n          outputV[i * 4 + 2] = cptr[2];\n          outputV[i * 4 + 3] = cptr[3];\n        }\n      }\n    } else {\n      /* eslint-disable no-lonely-if */\n      if (outFormat === _ScalarsToColors_Constants_js__WEBPACK_IMPORTED_MODULE_3__.ScalarMappingTarget.RGBA) {\n        for (var _i = 0; _i < length; _i++) {\n          var _cptr = lookupFunc(inputV[_i * inIncr + inputOffset], model.table, p);\n\n          outputV[_i * 4] = _cptr[0];\n          outputV[_i * 4 + 1] = _cptr[1];\n          outputV[_i * 4 + 2] = _cptr[2];\n          outputV[_i * 4 + 3] = Math.floor(_cptr[3] * alpha + 0.5);\n        }\n      }\n    } // alpha blending\n\n  };\n\n  publicAPI.forceBuild = function () {\n    var hinc = 0.0;\n    var sinc = 0.0;\n    var vinc = 0.0;\n    var ainc = 0.0;\n    var maxIndex = model.numberOfColors - 1;\n\n    if (maxIndex) {\n      hinc = (model.hueRange[1] - model.hueRange[0]) / maxIndex;\n      sinc = (model.saturationRange[1] - model.saturationRange[0]) / maxIndex;\n      vinc = (model.valueRange[1] - model.valueRange[0]) / maxIndex;\n      ainc = (model.alphaRange[1] - model.alphaRange[0]) / maxIndex;\n    }\n\n    var hsv = [];\n    var rgba = [];\n\n    for (var i = 0; i <= maxIndex; i++) {\n      hsv[0] = model.hueRange[0] + i * hinc;\n      hsv[1] = model.saturationRange[0] + i * sinc;\n      hsv[2] = model.valueRange[0] + i * vinc;\n      (0,_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.h)(hsv, rgba);\n      rgba[3] = model.alphaRange[0] + i * ainc; //  case VTK_RAMP_LINEAR:\n\n      model.table[i * 4] = rgba[0] * 255.0 + 0.5;\n      model.table[i * 4 + 1] = rgba[1] * 255.0 + 0.5;\n      model.table[i * 4 + 2] = rgba[2] * 255.0 + 0.5;\n      model.table[i * 4 + 3] = rgba[3] * 255.0 + 0.5;\n    }\n\n    publicAPI.buildSpecialColors();\n    model.buildTime.modified();\n  };\n\n  publicAPI.setTable = function (table) {\n    if (table.getNumberOfComponents() !== 4) {\n      vtkErrorMacro('Expected 4 components for RGBA colors');\n      return;\n    }\n\n    if (table.getDataType() !== _DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_4__.VtkDataTypes.UNSIGNED_CHAR) {\n      vtkErrorMacro('Expected unsigned char values for RGBA colors');\n      return;\n    }\n\n    model.numberOfColors = table.getNumberOfTuples();\n    var data = table.getData();\n\n    for (var i = 0; i < data.length; i++) {\n      model.table[i] = data[i];\n    }\n\n    publicAPI.buildSpecialColors();\n    model.insertTime.modified();\n    publicAPI.modified();\n  };\n\n  publicAPI.buildSpecialColors = function () {\n    // Add \"special\" colors (NaN, below range, above range) to table here.\n    var numberOfColors = model.numberOfColors;\n    var tptr = model.table;\n    var base = (numberOfColors + BELOW_RANGE_COLOR_INDEX) * 4; // Below range color\n\n    if (model.useBelowRangeColor || numberOfColors === 0) {\n      tptr[base] = model.belowRangeColor[0] * 255.0 + 0.5;\n      tptr[base + 1] = model.belowRangeColor[1] * 255.0 + 0.5;\n      tptr[base + 2] = model.belowRangeColor[2] * 255.0 + 0.5;\n      tptr[base + 3] = model.belowRangeColor[3] * 255.0 + 0.5;\n    } else {\n      // Duplicate the first color in the table.\n      tptr[base] = tptr[0];\n      tptr[base + 1] = tptr[1];\n      tptr[base + 2] = tptr[2];\n      tptr[base + 3] = tptr[3];\n    } // Above range color\n\n\n    base = (numberOfColors + ABOVE_RANGE_COLOR_INDEX) * 4;\n\n    if (model.useAboveRangeColor || numberOfColors === 0) {\n      tptr[base] = model.aboveRangeColor[0] * 255.0 + 0.5;\n      tptr[base + 1] = model.aboveRangeColor[1] * 255.0 + 0.5;\n      tptr[base + 2] = model.aboveRangeColor[2] * 255.0 + 0.5;\n      tptr[base + 3] = model.aboveRangeColor[3] * 255.0 + 0.5;\n    } else {\n      // Duplicate the last color in the table.\n      tptr[base] = tptr[4 * (numberOfColors - 1) + 0];\n      tptr[base + 1] = tptr[4 * (numberOfColors - 1) + 1];\n      tptr[base + 2] = tptr[4 * (numberOfColors - 1) + 2];\n      tptr[base + 3] = tptr[4 * (numberOfColors - 1) + 3];\n    } // Always use NanColor\n\n\n    base = (numberOfColors + NAN_COLOR_INDEX) * 4;\n    tptr[base] = model.nanColor[0] * 255.0 + 0.5;\n    tptr[base + 1] = model.nanColor[1] * 255.0 + 0.5;\n    tptr[base + 2] = model.nanColor[2] * 255.0 + 0.5;\n    tptr[base + 3] = model.nanColor[3] * 255.0 + 0.5;\n  };\n\n  publicAPI.build = function () {\n    if (model.table.length < 1 || publicAPI.getMTime() > model.buildTime.getMTime() && model.insertTime.getMTime() <= model.buildTime.getMTime()) {\n      publicAPI.forceBuild();\n    }\n  };\n\n  if (model.table.length > 0) {\n    // ensure insertTime is more recently modified than buildTime if\n    // a table is provided via the constructor\n    model.insertTime.modified();\n  }\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  numberOfColors: 256,\n  // table: null,\n  hueRange: [0.0, 0.66667],\n  saturationRange: [1.0, 1.0],\n  valueRange: [1.0, 1.0],\n  alphaRange: [1.0, 1.0],\n  nanColor: [0.5, 0.0, 0.0, 1.0],\n  belowRangeColor: [0.0, 0.0, 0.0, 1.0],\n  aboveRangeColor: [1.0, 1.0, 1.0, 1.0],\n  useAboveRangeColor: false,\n  useBelowRangeColor: false,\n  alpha: 1.0 // buildTime: null,\n  // opaqueFlagBuildTime: null,\n  // insertTime: null,\n\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _ScalarsToColors_js__WEBPACK_IMPORTED_MODULE_2__.default.extend(publicAPI, model, initialValues); // Internal objects initialization\n\n  if (!model.table) {\n    model.table = [];\n  }\n\n  model.buildTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model.buildTime);\n  model.opaqueFlagBuildTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model.opaqueFlagBuildTime, {\n    mtime: 0\n  });\n  model.insertTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model.insertTime, {\n    mtime: 0\n  }); // Create get-only macros\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['buildTime']); // Create get-set macros\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['numberOfColors', 'useAboveRangeColor', 'useBelowRangeColor']); // Create set macros for array (needs to know size)\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setArray(publicAPI, model, ['alphaRange', 'hueRange', 'saturationRange', 'valueRange'], 2);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setArray(publicAPI, model, ['nanColor', 'belowRangeColor', 'aboveRangeColor'], 4); // Create get macros for array\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.getArray(publicAPI, model, ['hueRange', 'saturationRange', 'valueRange', 'alphaRange', 'nanColor', 'belowRangeColor', 'aboveRangeColor']); // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkLookupTable(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkLookupTable'); // ----------------------------------------------------------------------------\n\nvar vtkLookupTable$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkLookupTable$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/Core/LookupTable.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/Core/Math/index.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/Core/Math/index.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"$\": () => (/* binding */ binomial),\n/* harmony export */   \"A\": () => (/* binding */ projectVector),\n/* harmony export */   \"B\": () => (/* binding */ arrayRange),\n/* harmony export */   \"C\": () => (/* binding */ getMajorAxisIndex),\n/* harmony export */   \"D\": () => (/* binding */ areMatricesEqual),\n/* harmony export */   \"E\": () => (/* binding */ isInf),\n/* harmony export */   \"F\": () => (/* binding */ rgb2hsv),\n/* harmony export */   \"G\": () => (/* binding */ rgb2lab),\n/* harmony export */   \"H\": () => (/* binding */ lab2rgb),\n/* harmony export */   \"I\": () => (/* binding */ floor),\n/* harmony export */   \"J\": () => (/* binding */ round),\n/* harmony export */   \"K\": () => (/* binding */ nearestPowerOfTwo),\n/* harmony export */   \"L\": () => (/* binding */ normalize2D),\n/* harmony export */   \"M\": () => (/* binding */ createUninitializedBounds),\n/* harmony export */   \"N\": () => (/* binding */ multiply3x3_vect3),\n/* harmony export */   \"O\": () => (/* binding */ areBoundsInitialized),\n/* harmony export */   \"P\": () => (/* binding */ isPowerOfTwo),\n/* harmony export */   \"Q\": () => (/* binding */ multiplyAccumulate),\n/* harmony export */   \"R\": () => (/* binding */ angleBetweenVectors),\n/* harmony export */   \"S\": () => (/* binding */ signedAngleBetweenVectors),\n/* harmony export */   \"T\": () => (/* binding */ Pi),\n/* harmony export */   \"U\": () => (/* binding */ ceil),\n/* harmony export */   \"V\": () => (/* binding */ min),\n/* harmony export */   \"W\": () => (/* binding */ max),\n/* harmony export */   \"X\": () => (/* binding */ arrayMin),\n/* harmony export */   \"Y\": () => (/* binding */ arrayMax),\n/* harmony export */   \"Z\": () => (/* binding */ ceilLog2),\n/* harmony export */   \"_\": () => (/* binding */ factorial),\n/* harmony export */   \"a\": () => (/* binding */ roundVector),\n/* harmony export */   \"a0\": () => (/* binding */ beginCombination),\n/* harmony export */   \"a1\": () => (/* binding */ nextCombination),\n/* harmony export */   \"a2\": () => (/* binding */ randomSeed),\n/* harmony export */   \"a3\": () => (/* binding */ getSeed),\n/* harmony export */   \"a4\": () => (/* binding */ gaussian),\n/* harmony export */   \"a5\": () => (/* binding */ multiplyScalar2D),\n/* harmony export */   \"a6\": () => (/* binding */ multiplyAccumulate2D),\n/* harmony export */   \"a7\": () => (/* binding */ outer),\n/* harmony export */   \"a8\": () => (/* binding */ dot2D),\n/* harmony export */   \"a9\": () => (/* binding */ projectVector2D),\n/* harmony export */   \"aA\": () => (/* binding */ hex2float),\n/* harmony export */   \"aB\": () => (/* binding */ lab2xyz),\n/* harmony export */   \"aC\": () => (/* binding */ xyz2lab),\n/* harmony export */   \"aD\": () => (/* binding */ xyz2rgb),\n/* harmony export */   \"aE\": () => (/* binding */ rgb2xyz),\n/* harmony export */   \"aF\": () => (/* binding */ clampAndNormalizeValue),\n/* harmony export */   \"aG\": () => (/* binding */ getScalarTypeFittingRange),\n/* harmony export */   \"aH\": () => (/* binding */ getAdjustedScalarRange),\n/* harmony export */   \"aI\": () => (/* binding */ extentIsWithinOtherExtent),\n/* harmony export */   \"aJ\": () => (/* binding */ boundsIsWithinOtherBounds),\n/* harmony export */   \"aK\": () => (/* binding */ pointIsWithinBounds),\n/* harmony export */   \"aL\": () => (/* binding */ solve3PointCircle),\n/* harmony export */   \"aM\": () => (/* binding */ inf),\n/* harmony export */   \"aN\": () => (/* binding */ negInf),\n/* harmony export */   \"aO\": () => (/* binding */ isFinite),\n/* harmony export */   \"aP\": () => (/* binding */ isNaN),\n/* harmony export */   \"aQ\": () => (/* binding */ floatToHex2),\n/* harmony export */   \"aR\": () => (/* binding */ floatRGB2HexCode),\n/* harmony export */   \"aS\": () => (/* binding */ float2CssRGBA),\n/* harmony export */   \"aa\": () => (/* binding */ gaussianAmplitude),\n/* harmony export */   \"ab\": () => (/* binding */ gaussianWeight),\n/* harmony export */   \"ac\": () => (/* binding */ outer2D),\n/* harmony export */   \"ad\": () => (/* binding */ norm2D),\n/* harmony export */   \"ae\": () => (/* binding */ LUFactor3x3),\n/* harmony export */   \"af\": () => (/* binding */ LUSolve3x3),\n/* harmony export */   \"ag\": () => (/* binding */ linearSolve3x3),\n/* harmony export */   \"ah\": () => (/* binding */ multiply3x3_mat3),\n/* harmony export */   \"ai\": () => (/* binding */ multiplyMatrix),\n/* harmony export */   \"aj\": () => (/* binding */ transpose3x3),\n/* harmony export */   \"ak\": () => (/* binding */ invert3x3),\n/* harmony export */   \"al\": () => (/* binding */ identity3x3),\n/* harmony export */   \"am\": () => (/* binding */ quaternionToMatrix3x3),\n/* harmony export */   \"an\": () => (/* binding */ roundNumber),\n/* harmony export */   \"ao\": () => (/* binding */ matrix3x3ToQuaternion),\n/* harmony export */   \"ap\": () => (/* binding */ multiplyQuaternion),\n/* harmony export */   \"aq\": () => (/* binding */ orthogonalize3x3),\n/* harmony export */   \"ar\": () => (/* binding */ diagonalize3x3),\n/* harmony export */   \"as\": () => (/* binding */ singularValueDecomposition3x3),\n/* harmony export */   \"at\": () => (/* binding */ luFactorLinearSystem),\n/* harmony export */   \"au\": () => (/* binding */ luSolveLinearSystem),\n/* harmony export */   \"av\": () => (/* binding */ invertMatrix),\n/* harmony export */   \"aw\": () => (/* binding */ estimateMatrixCondition),\n/* harmony export */   \"ax\": () => (/* binding */ jacobi),\n/* harmony export */   \"ay\": () => (/* binding */ solveHomogeneousLeastSquares),\n/* harmony export */   \"az\": () => (/* binding */ solveLeastSquares),\n/* harmony export */   \"b\": () => (/* binding */ clampVector),\n/* harmony export */   \"c\": () => (/* binding */ computeBoundsFromPoints),\n/* harmony export */   \"d\": () => (/* binding */ dot),\n/* harmony export */   \"e\": () => (/* binding */ distance2BetweenPoints),\n/* harmony export */   \"f\": () => (/* binding */ subtract),\n/* harmony export */   \"g\": () => (/* binding */ cross),\n/* harmony export */   \"h\": () => (/* binding */ hsv2rgb),\n/* harmony export */   \"i\": () => (/* binding */ isNan),\n/* harmony export */   \"j\": () => (/* binding */ add),\n/* harmony export */   \"k\": () => (/* binding */ normalize),\n/* harmony export */   \"l\": () => (/* binding */ determinant2x2),\n/* harmony export */   \"m\": () => (/* binding */ jacobiN),\n/* harmony export */   \"n\": () => (/* binding */ norm),\n/* harmony export */   \"o\": () => (/* binding */ vtkMath),\n/* harmony export */   \"p\": () => (/* binding */ perpendiculars),\n/* harmony export */   \"q\": () => (/* binding */ multiplyScalar),\n/* harmony export */   \"r\": () => (/* binding */ radiansFromDegrees),\n/* harmony export */   \"s\": () => (/* binding */ solveLinearSystem),\n/* harmony export */   \"t\": () => (/* binding */ random),\n/* harmony export */   \"u\": () => (/* binding */ uninitializeBounds),\n/* harmony export */   \"v\": () => (/* binding */ vtkMath$1),\n/* harmony export */   \"w\": () => (/* binding */ determinant3x3),\n/* harmony export */   \"x\": () => (/* binding */ degreesFromRadians),\n/* harmony export */   \"y\": () => (/* binding */ areEquals),\n/* harmony export */   \"z\": () => (/* binding */ clampValue)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _vendor_seedrandom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../vendor/seedrandom/index.js */ \"./node_modules/@kitware/vtk.js/vendor/seedrandom/index.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.vtkErrorMacro,\n    vtkWarningMacro = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.vtkWarningMacro; // ----------------------------------------------------------------------------\n\n/* eslint-disable camelcase                                                  */\n\n/* eslint-disable no-cond-assign                                             */\n\n/* eslint-disable no-bitwise                                                 */\n\n/* eslint-disable no-multi-assign                                            */\n// ----------------------------------------------------------------------------\n\nvar randomSeedValue = 0;\nvar VTK_MAX_ROTATIONS = 20;\nvar VTK_SMALL_NUMBER = 1.0e-12;\n\nfunction notImplemented(method) {\n  return function () {\n    return vtkErrorMacro(\"vtkMath::\".concat(method, \" - NOT IMPLEMENTED\"));\n  };\n}\n\nfunction vtkSwapVectors3(v1, v2) {\n  for (var i = 0; i < 3; i++) {\n    var tmp = v1[i];\n    v1[i] = v2[i];\n    v2[i] = tmp;\n  }\n}\n\nfunction createArray() {\n  var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3;\n  var array = [];\n\n  while (array.length < size) {\n    array.push(0);\n  }\n\n  return array;\n} // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n\n\nvar Pi = function Pi() {\n  return Math.PI;\n};\nfunction radiansFromDegrees(deg) {\n  return deg / 180 * Math.PI;\n}\nfunction degreesFromRadians(rad) {\n  return rad * 180 / Math.PI;\n}\nvar round = Math.round,\n    floor = Math.floor,\n    ceil = Math.ceil,\n    min = Math.min,\n    max = Math.max;\nfunction arrayMin(arr) {\n  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  var stride = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  var minValue = Infinity;\n\n  for (var i = offset, len = arr.length; i < len; i += stride) {\n    if (arr[i] < minValue) {\n      minValue = arr[i];\n    }\n  }\n\n  return minValue;\n}\nfunction arrayMax(arr) {\n  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  var stride = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  var maxValue = -Infinity;\n\n  for (var i = offset, len = arr.length; i < len; i += stride) {\n    if (maxValue < arr[i]) {\n      maxValue = arr[i];\n    }\n  }\n\n  return maxValue;\n}\nfunction arrayRange(arr) {\n  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  var stride = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  var minValue = Infinity;\n  var maxValue = -Infinity;\n\n  for (var i = offset, len = arr.length; i < len; i += stride) {\n    if (arr[i] < minValue) {\n      minValue = arr[i];\n    }\n\n    if (maxValue < arr[i]) {\n      maxValue = arr[i];\n    }\n  }\n\n  return [minValue, maxValue];\n}\nvar ceilLog2 = notImplemented('ceilLog2');\nvar factorial = notImplemented('factorial');\nfunction nearestPowerOfTwo(xi) {\n  var v = 1;\n\n  while (v < xi) {\n    v *= 2;\n  }\n\n  return v;\n}\nfunction isPowerOfTwo(x) {\n  return x === nearestPowerOfTwo(x);\n}\nfunction binomial(m, n) {\n  var r = 1;\n\n  for (var i = 1; i <= n; ++i) {\n    r *= (m - i + 1) / i;\n  }\n\n  return Math.floor(r);\n}\nfunction beginCombination(m, n) {\n  if (m < n) {\n    return 0;\n  }\n\n  var r = createArray(n);\n\n  for (var i = 0; i < n; ++i) {\n    r[i] = i;\n  }\n\n  return r;\n}\nfunction nextCombination(m, n, r) {\n  var status = 0;\n\n  for (var i = n - 1; i >= 0; --i) {\n    if (r[i] < m - n + i) {\n      var j = r[i] + 1;\n\n      while (i < n) {\n        r[i++] = j++;\n      }\n\n      status = 1;\n      break;\n    }\n  }\n\n  return status;\n}\nfunction randomSeed(seed) {\n  (0,_vendor_seedrandom_index_js__WEBPACK_IMPORTED_MODULE_1__.s)(\"\".concat(seed), {\n    global: true\n  });\n  randomSeedValue = seed;\n}\nfunction getSeed() {\n  return randomSeedValue;\n}\nfunction random() {\n  var minValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n  var maxValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n  var delta = maxValue - minValue;\n  return minValue + delta * Math.random();\n}\nvar gaussian = notImplemented('gaussian'); // Vect3 operations\n\nfunction add(a, b, out) {\n  out[0] = a[0] + b[0];\n  out[1] = a[1] + b[1];\n  out[2] = a[2] + b[2];\n  return out;\n}\nfunction subtract(a, b, out) {\n  out[0] = a[0] - b[0];\n  out[1] = a[1] - b[1];\n  out[2] = a[2] - b[2];\n  return out;\n}\nfunction multiplyScalar(vec, scalar) {\n  vec[0] *= scalar;\n  vec[1] *= scalar;\n  vec[2] *= scalar;\n  return vec;\n}\nfunction multiplyScalar2D(vec, scalar) {\n  vec[0] *= scalar;\n  vec[1] *= scalar;\n  return vec;\n}\nfunction multiplyAccumulate(a, b, scalar, out) {\n  out[0] = a[0] + b[0] * scalar;\n  out[1] = a[1] + b[1] * scalar;\n  out[2] = a[2] + b[2] * scalar;\n  return out;\n}\nfunction multiplyAccumulate2D(a, b, scalar, out) {\n  out[0] = a[0] + b[0] * scalar;\n  out[1] = a[1] + b[1] * scalar;\n  return out;\n}\nfunction dot(x, y) {\n  return x[0] * y[0] + x[1] * y[1] + x[2] * y[2];\n}\nfunction outer(x, y, out_3x3) {\n  for (var i = 0; i < 3; i++) {\n    for (var j = 0; j < 3; j++) {\n      out_3x3[i][j] = x[i] * y[j];\n    }\n  }\n}\nfunction cross(x, y, out) {\n  var Zx = x[1] * y[2] - x[2] * y[1];\n  var Zy = x[2] * y[0] - x[0] * y[2];\n  var Zz = x[0] * y[1] - x[1] * y[0];\n  out[0] = Zx;\n  out[1] = Zy;\n  out[2] = Zz;\n  return out;\n}\nfunction norm(x) {\n  var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n\n  switch (n) {\n    case 1:\n      return Math.abs(x);\n\n    case 2:\n      return Math.sqrt(x[0] * x[0] + x[1] * x[1]);\n\n    case 3:\n      return Math.sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]);\n\n    default:\n      {\n        var sum = 0;\n\n        for (var i = 0; i < n; i++) {\n          sum += x[i] * x[i];\n        }\n\n        return Math.sqrt(sum);\n      }\n  }\n}\nfunction normalize(x) {\n  var den = norm(x);\n\n  if (den !== 0.0) {\n    x[0] /= den;\n    x[1] /= den;\n    x[2] /= den;\n  }\n\n  return den;\n}\nfunction perpendiculars(x, y, z, theta) {\n  var x2 = x[0] * x[0];\n  var y2 = x[1] * x[1];\n  var z2 = x[2] * x[2];\n  var r = Math.sqrt(x2 + y2 + z2);\n  var dx;\n  var dy;\n  var dz; // transpose the vector to avoid divide-by-zero error\n\n  if (x2 > y2 && x2 > z2) {\n    dx = 0;\n    dy = 1;\n    dz = 2;\n  } else if (y2 > z2) {\n    dx = 1;\n    dy = 2;\n    dz = 0;\n  } else {\n    dx = 2;\n    dy = 0;\n    dz = 1;\n  }\n\n  var a = x[dx] / r;\n  var b = x[dy] / r;\n  var c = x[dz] / r;\n  var tmp = Math.sqrt(a * a + c * c);\n\n  if (theta !== 0) {\n    var sintheta = Math.sin(theta);\n    var costheta = Math.cos(theta);\n\n    if (y) {\n      y[dx] = (c * costheta - a * b * sintheta) / tmp;\n      y[dy] = sintheta * tmp;\n      y[dz] = (-(a * costheta) - b * c * sintheta) / tmp;\n    }\n\n    if (z) {\n      z[dx] = (-(c * sintheta) - a * b * costheta) / tmp;\n      z[dy] = costheta * tmp;\n      z[dz] = (a * sintheta - b * c * costheta) / tmp;\n    }\n  } else {\n    if (y) {\n      y[dx] = c / tmp;\n      y[dy] = 0;\n      y[dz] = -a / tmp;\n    }\n\n    if (z) {\n      z[dx] = -a * b / tmp;\n      z[dy] = tmp;\n      z[dz] = -b * c / tmp;\n    }\n  }\n}\nfunction projectVector(a, b, projection) {\n  var bSquared = dot(b, b);\n\n  if (bSquared === 0) {\n    projection[0] = 0;\n    projection[1] = 0;\n    projection[2] = 0;\n    return false;\n  }\n\n  var scale = dot(a, b) / bSquared;\n\n  for (var i = 0; i < 3; i++) {\n    projection[i] = b[i];\n  }\n\n  multiplyScalar(projection, scale);\n  return true;\n}\nfunction dot2D(x, y) {\n  return x[0] * y[0] + x[1] * y[1];\n}\nfunction projectVector2D(a, b, projection) {\n  var bSquared = dot2D(b, b);\n\n  if (bSquared === 0) {\n    projection[0] = 0;\n    projection[1] = 0;\n    return false;\n  }\n\n  var scale = dot2D(a, b) / bSquared;\n\n  for (var i = 0; i < 2; i++) {\n    projection[i] = b[i];\n  }\n\n  multiplyScalar2D(projection, scale);\n  return true;\n}\nfunction distance2BetweenPoints(x, y) {\n  return (x[0] - y[0]) * (x[0] - y[0]) + (x[1] - y[1]) * (x[1] - y[1]) + (x[2] - y[2]) * (x[2] - y[2]);\n}\nfunction angleBetweenVectors(v1, v2) {\n  var crossVect = [0, 0, 0];\n  cross(v1, v2, crossVect);\n  return Math.atan2(norm(crossVect), dot(v1, v2));\n}\nfunction signedAngleBetweenVectors(v1, v2, vN) {\n  var crossVect = [0, 0, 0];\n  cross(v1, v2, crossVect);\n  var angle = Math.atan2(norm(crossVect), dot(v1, v2));\n  return dot(crossVect, vN) >= 0 ? angle : -angle;\n}\nfunction gaussianAmplitude(mean, variance, position) {\n  var distanceFromMean = Math.abs(mean - position);\n  return 1 / Math.sqrt(2 * Math.PI * variance) * Math.exp(-Math.pow(distanceFromMean, 2) / (2 * variance));\n}\nfunction gaussianWeight(mean, variance, position) {\n  var distanceFromMean = Math.abs(mean - position);\n  return Math.exp(-Math.pow(distanceFromMean, 2) / (2 * variance));\n}\nfunction outer2D(x, y, out_2x2) {\n  for (var i = 0; i < 2; i++) {\n    for (var j = 0; j < 2; j++) {\n      out_2x2[i][j] = x[i] * y[j];\n    }\n  }\n}\nfunction norm2D(x2D) {\n  return Math.sqrt(x2D[0] * x2D[0] + x2D[1] * x2D[1]);\n}\nfunction normalize2D(x) {\n  var den = norm2D(x);\n\n  if (den !== 0.0) {\n    x[0] /= den;\n    x[1] /= den;\n  }\n\n  return den;\n}\nfunction determinant2x2() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  if (args.length === 2) {\n    return args[0][0] * args[1][1] - args[1][0] * args[0][1];\n  }\n\n  if (args.length === 4) {\n    return args[0] * args[3] - args[1] * args[2];\n  }\n\n  return Number.NaN;\n}\nfunction LUFactor3x3(mat_3x3, index_3) {\n  var maxI;\n  var tmp;\n  var largest;\n  var scale = [0, 0, 0]; // Loop over rows to get implicit scaling information\n\n  for (var i = 0; i < 3; i++) {\n    largest = Math.abs(mat_3x3[i][0]);\n\n    if ((tmp = Math.abs(mat_3x3[i][1])) > largest) {\n      largest = tmp;\n    }\n\n    if ((tmp = Math.abs(mat_3x3[i][2])) > largest) {\n      largest = tmp;\n    }\n\n    scale[i] = 1 / largest;\n  } // Loop over all columns using Crout's method\n  // first column\n\n\n  largest = scale[0] * Math.abs(mat_3x3[0][0]);\n  maxI = 0;\n\n  if ((tmp = scale[1] * Math.abs(mat_3x3[1][0])) >= largest) {\n    largest = tmp;\n    maxI = 1;\n  }\n\n  if ((tmp = scale[2] * Math.abs(mat_3x3[2][0])) >= largest) {\n    maxI = 2;\n  }\n\n  if (maxI !== 0) {\n    vtkSwapVectors3(mat_3x3[maxI], mat_3x3[0]);\n    scale[maxI] = scale[0];\n  }\n\n  index_3[0] = maxI;\n  mat_3x3[1][0] /= mat_3x3[0][0];\n  mat_3x3[2][0] /= mat_3x3[0][0]; // second column\n\n  mat_3x3[1][1] -= mat_3x3[1][0] * mat_3x3[0][1];\n  mat_3x3[2][1] -= mat_3x3[2][0] * mat_3x3[0][1];\n  largest = scale[1] * Math.abs(mat_3x3[1][1]);\n  maxI = 1;\n\n  if ((tmp = scale[2] * Math.abs(mat_3x3[2][1])) >= largest) {\n    maxI = 2;\n    vtkSwapVectors3(mat_3x3[2], mat_3x3[1]);\n    scale[2] = scale[1];\n  }\n\n  index_3[1] = maxI;\n  mat_3x3[2][1] /= mat_3x3[1][1]; // third column\n\n  mat_3x3[1][2] -= mat_3x3[1][0] * mat_3x3[0][2];\n  mat_3x3[2][2] -= mat_3x3[2][0] * mat_3x3[0][2] + mat_3x3[2][1] * mat_3x3[1][2];\n  index_3[2] = 2;\n}\nfunction LUSolve3x3(mat_3x3, index_3, x_3) {\n  // forward substitution\n  var sum = x_3[index_3[0]];\n  x_3[index_3[0]] = x_3[0];\n  x_3[0] = sum;\n  sum = x_3[index_3[1]];\n  x_3[index_3[1]] = x_3[1];\n  x_3[1] = sum - mat_3x3[1][0] * x_3[0];\n  sum = x_3[index_3[2]];\n  x_3[index_3[2]] = x_3[2];\n  x_3[2] = sum - mat_3x3[2][0] * x_3[0] - mat_3x3[2][1] * x_3[1]; // back substitution\n\n  x_3[2] /= mat_3x3[2][2];\n  x_3[1] = (x_3[1] - mat_3x3[1][2] * x_3[2]) / mat_3x3[1][1];\n  x_3[0] = (x_3[0] - mat_3x3[0][1] * x_3[1] - mat_3x3[0][2] * x_3[2]) / mat_3x3[0][0];\n}\nfunction linearSolve3x3(mat_3x3, x_3, y_3) {\n  var a1 = mat_3x3[0][0];\n  var b1 = mat_3x3[0][1];\n  var c1 = mat_3x3[0][2];\n  var a2 = mat_3x3[1][0];\n  var b2 = mat_3x3[1][1];\n  var c2 = mat_3x3[1][2];\n  var a3 = mat_3x3[2][0];\n  var b3 = mat_3x3[2][1];\n  var c3 = mat_3x3[2][2]; // Compute the adjoint\n\n  var d1 = +determinant2x2(b2, b3, c2, c3);\n  var d2 = -determinant2x2(a2, a3, c2, c3);\n  var d3 = +determinant2x2(a2, a3, b2, b3);\n  var e1 = -determinant2x2(b1, b3, c1, c3);\n  var e2 = +determinant2x2(a1, a3, c1, c3);\n  var e3 = -determinant2x2(a1, a3, b1, b3);\n  var f1 = +determinant2x2(b1, b2, c1, c2);\n  var f2 = -determinant2x2(a1, a2, c1, c2);\n  var f3 = +determinant2x2(a1, a2, b1, b2); // Compute the determinant\n\n  var det = a1 * d1 + b1 * d2 + c1 * d3; // Multiply by the adjoint\n\n  var v1 = d1 * x_3[0] + e1 * x_3[1] + f1 * x_3[2];\n  var v2 = d2 * x_3[0] + e2 * x_3[1] + f2 * x_3[2];\n  var v3 = d3 * x_3[0] + e3 * x_3[1] + f3 * x_3[2]; // Divide by the determinant\n\n  y_3[0] = v1 / det;\n  y_3[1] = v2 / det;\n  y_3[2] = v3 / det;\n}\nfunction multiply3x3_vect3(mat_3x3, in_3, out_3) {\n  var x = mat_3x3[0][0] * in_3[0] + mat_3x3[0][1] * in_3[1] + mat_3x3[0][2] * in_3[2];\n  var y = mat_3x3[1][0] * in_3[0] + mat_3x3[1][1] * in_3[1] + mat_3x3[1][2] * in_3[2];\n  var z = mat_3x3[2][0] * in_3[0] + mat_3x3[2][1] * in_3[1] + mat_3x3[2][2] * in_3[2];\n  out_3[0] = x;\n  out_3[1] = y;\n  out_3[2] = z;\n}\nfunction multiply3x3_mat3(a_3x3, b_3x3, out_3x3) {\n  var tmp = [[0, 0, 0], [0, 0, 0], [0, 0, 0]];\n\n  for (var i = 0; i < 3; i++) {\n    tmp[0][i] = a_3x3[0][0] * b_3x3[0][i] + a_3x3[0][1] * b_3x3[1][i] + a_3x3[0][2] * b_3x3[2][i];\n    tmp[1][i] = a_3x3[1][0] * b_3x3[0][i] + a_3x3[1][1] * b_3x3[1][i] + a_3x3[1][2] * b_3x3[2][i];\n    tmp[2][i] = a_3x3[2][0] * b_3x3[0][i] + a_3x3[2][1] * b_3x3[1][i] + a_3x3[2][2] * b_3x3[2][i];\n  }\n\n  for (var j = 0; j < 3; j++) {\n    out_3x3[j][0] = tmp[j][0];\n    out_3x3[j][1] = tmp[j][1];\n    out_3x3[j][2] = tmp[j][2];\n  }\n}\nfunction multiplyMatrix(a, b, rowA, colA, rowB, colB, out_rowXcol) {\n  // we need colA == rowB\n  if (colA !== rowB) {\n    vtkErrorMacro('Number of columns of A must match number of rows of B.');\n  } // output matrix is rowA*colB\n  // output row\n\n\n  for (var i = 0; i < rowA; i++) {\n    // output col\n    for (var j = 0; j < colB; j++) {\n      out_rowXcol[i][j] = 0; // sum for this point\n\n      for (var k = 0; k < colA; k++) {\n        out_rowXcol[i][j] += a[i][k] * b[k][j];\n      }\n    }\n  }\n}\nfunction transpose3x3(in_3x3, outT_3x3) {\n  var tmp;\n  tmp = in_3x3[1][0];\n  outT_3x3[1][0] = in_3x3[0][1];\n  outT_3x3[0][1] = tmp;\n  tmp = in_3x3[2][0];\n  outT_3x3[2][0] = in_3x3[0][2];\n  outT_3x3[0][2] = tmp;\n  tmp = in_3x3[2][1];\n  outT_3x3[2][1] = in_3x3[1][2];\n  outT_3x3[1][2] = tmp;\n  outT_3x3[0][0] = in_3x3[0][0];\n  outT_3x3[1][1] = in_3x3[1][1];\n  outT_3x3[2][2] = in_3x3[2][2];\n}\nfunction invert3x3(in_3x3, outI_3x3) {\n  var a1 = in_3x3[0][0];\n  var b1 = in_3x3[0][1];\n  var c1 = in_3x3[0][2];\n  var a2 = in_3x3[1][0];\n  var b2 = in_3x3[1][1];\n  var c2 = in_3x3[1][2];\n  var a3 = in_3x3[2][0];\n  var b3 = in_3x3[2][1];\n  var c3 = in_3x3[2][2]; // Compute the adjoint\n\n  var d1 = +determinant2x2(b2, b3, c2, c3);\n  var d2 = -determinant2x2(a2, a3, c2, c3);\n  var d3 = +determinant2x2(a2, a3, b2, b3);\n  var e1 = -determinant2x2(b1, b3, c1, c3);\n  var e2 = +determinant2x2(a1, a3, c1, c3);\n  var e3 = -determinant2x2(a1, a3, b1, b3);\n  var f1 = +determinant2x2(b1, b2, c1, c2);\n  var f2 = -determinant2x2(a1, a2, c1, c2);\n  var f3 = +determinant2x2(a1, a2, b1, b2); // Divide by the determinant\n\n  var det = a1 * d1 + b1 * d2 + c1 * d3;\n  outI_3x3[0][0] = d1 / det;\n  outI_3x3[1][0] = d2 / det;\n  outI_3x3[2][0] = d3 / det;\n  outI_3x3[0][1] = e1 / det;\n  outI_3x3[1][1] = e2 / det;\n  outI_3x3[2][1] = e3 / det;\n  outI_3x3[0][2] = f1 / det;\n  outI_3x3[1][2] = f2 / det;\n  outI_3x3[2][2] = f3 / det;\n}\nfunction identity3x3(mat_3x3) {\n  for (var i = 0; i < 3; i++) {\n    mat_3x3[i][0] = mat_3x3[i][1] = mat_3x3[i][2] = 0;\n    mat_3x3[i][i] = 1;\n  }\n}\nfunction determinant3x3(mat_3x3) {\n  return mat_3x3[0][0] * mat_3x3[1][1] * mat_3x3[2][2] + mat_3x3[1][0] * mat_3x3[2][1] * mat_3x3[0][2] + mat_3x3[2][0] * mat_3x3[0][1] * mat_3x3[1][2] - mat_3x3[0][0] * mat_3x3[2][1] * mat_3x3[1][2] - mat_3x3[1][0] * mat_3x3[0][1] * mat_3x3[2][2] - mat_3x3[2][0] * mat_3x3[1][1] * mat_3x3[0][2];\n}\nfunction quaternionToMatrix3x3(quat_4, mat_3x3) {\n  var ww = quat_4[0] * quat_4[0];\n  var wx = quat_4[0] * quat_4[1];\n  var wy = quat_4[0] * quat_4[2];\n  var wz = quat_4[0] * quat_4[3];\n  var xx = quat_4[1] * quat_4[1];\n  var yy = quat_4[2] * quat_4[2];\n  var zz = quat_4[3] * quat_4[3];\n  var xy = quat_4[1] * quat_4[2];\n  var xz = quat_4[1] * quat_4[3];\n  var yz = quat_4[2] * quat_4[3];\n  var rr = xx + yy + zz; // normalization factor, just in case quaternion was not normalized\n\n  var f = 1 / (ww + rr);\n  var s = (ww - rr) * f;\n  f *= 2;\n  mat_3x3[0][0] = xx * f + s;\n  mat_3x3[1][0] = (xy + wz) * f;\n  mat_3x3[2][0] = (xz - wy) * f;\n  mat_3x3[0][1] = (xy - wz) * f;\n  mat_3x3[1][1] = yy * f + s;\n  mat_3x3[2][1] = (yz + wx) * f;\n  mat_3x3[0][2] = (xz + wy) * f;\n  mat_3x3[1][2] = (yz - wx) * f;\n  mat_3x3[2][2] = zz * f + s;\n}\n/**\n * Returns true if elements of both arrays are equals.\n * @param {Array} a an array of numbers (vector, point, matrix...)\n * @param {Array} b an array of numbers (vector, point, matrix...)\n * @param {Number} eps tolerance\n */\n\nfunction areEquals(a, b) {\n  var eps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1e-6;\n\n  if (a.length !== b.length) {\n    return false;\n  }\n\n  function isEqual(element, index) {\n    return Math.abs(element - b[index]) <= eps;\n  }\n\n  return a.every(isEqual);\n}\nvar areMatricesEqual = areEquals;\nfunction roundNumber(num) {\n  var digits = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n  if (!\"\".concat(num).includes('e')) {\n    return +\"\".concat(Math.round(\"\".concat(num, \"e+\").concat(digits)), \"e-\").concat(digits);\n  }\n\n  var arr = \"\".concat(num).split('e');\n  var sig = '';\n\n  if (+arr[1] + digits > 0) {\n    sig = '+';\n  }\n\n  return +\"\".concat(Math.round(\"\".concat(+arr[0], \"e\").concat(sig).concat(+arr[1] + digits)), \"e-\").concat(digits);\n}\nfunction roundVector(vector) {\n  var out = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  var digits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n  out[0] = roundNumber(vector[0], digits);\n  out[1] = roundNumber(vector[1], digits);\n  out[2] = roundNumber(vector[2], digits);\n  return out;\n}\nfunction jacobiN(a, n, w, v) {\n  var i;\n  var j;\n  var k;\n  var iq;\n  var ip;\n  var numPos;\n  var tresh;\n  var theta;\n  var t;\n  var tau;\n  var sm;\n  var s;\n  var h;\n  var g;\n  var c;\n  var tmp;\n  var b = createArray(n);\n  var z = createArray(n);\n\n  var vtkROTATE = function vtkROTATE(aa, ii, jj, kk, ll) {\n    g = aa[ii][jj];\n    h = aa[kk][ll];\n    aa[ii][jj] = g - s * (h + g * tau);\n    aa[kk][ll] = h + s * (g - h * tau);\n  }; // initialize\n\n\n  for (ip = 0; ip < n; ip++) {\n    for (iq = 0; iq < n; iq++) {\n      v[ip][iq] = 0.0;\n    }\n\n    v[ip][ip] = 1.0;\n  }\n\n  for (ip = 0; ip < n; ip++) {\n    b[ip] = w[ip] = a[ip][ip];\n    z[ip] = 0.0;\n  } // begin rotation sequence\n\n\n  for (i = 0; i < VTK_MAX_ROTATIONS; i++) {\n    sm = 0.0;\n\n    for (ip = 0; ip < n - 1; ip++) {\n      for (iq = ip + 1; iq < n; iq++) {\n        sm += Math.abs(a[ip][iq]);\n      }\n    }\n\n    if (sm === 0.0) {\n      break;\n    } // first 3 sweeps\n\n\n    if (i < 3) {\n      tresh = 0.2 * sm / (n * n);\n    } else {\n      tresh = 0.0;\n    }\n\n    for (ip = 0; ip < n - 1; ip++) {\n      for (iq = ip + 1; iq < n; iq++) {\n        g = 100.0 * Math.abs(a[ip][iq]); // after 4 sweeps\n\n        if (i > 3 && Math.abs(w[ip]) + g === Math.abs(w[ip]) && Math.abs(w[iq]) + g === Math.abs(w[iq])) {\n          a[ip][iq] = 0.0;\n        } else if (Math.abs(a[ip][iq]) > tresh) {\n          h = w[iq] - w[ip];\n\n          if (Math.abs(h) + g === Math.abs(h)) {\n            t = a[ip][iq] / h;\n          } else {\n            theta = 0.5 * h / a[ip][iq];\n            t = 1.0 / (Math.abs(theta) + Math.sqrt(1.0 + theta * theta));\n\n            if (theta < 0.0) {\n              t = -t;\n            }\n          }\n\n          c = 1.0 / Math.sqrt(1 + t * t);\n          s = t * c;\n          tau = s / (1.0 + c);\n          h = t * a[ip][iq];\n          z[ip] -= h;\n          z[iq] += h;\n          w[ip] -= h;\n          w[iq] += h;\n          a[ip][iq] = 0.0; // ip already shifted left by 1 unit\n\n          for (j = 0; j <= ip - 1; j++) {\n            vtkROTATE(a, j, ip, j, iq);\n          } // ip and iq already shifted left by 1 unit\n\n\n          for (j = ip + 1; j <= iq - 1; j++) {\n            vtkROTATE(a, ip, j, j, iq);\n          } // iq already shifted left by 1 unit\n\n\n          for (j = iq + 1; j < n; j++) {\n            vtkROTATE(a, ip, j, iq, j);\n          }\n\n          for (j = 0; j < n; j++) {\n            vtkROTATE(v, j, ip, j, iq);\n          }\n        }\n      }\n    }\n\n    for (ip = 0; ip < n; ip++) {\n      b[ip] += z[ip];\n      w[ip] = b[ip];\n      z[ip] = 0.0;\n    }\n  } // this is NEVER called\n\n\n  if (i >= VTK_MAX_ROTATIONS) {\n    vtkWarningMacro('vtkMath::Jacobi: Error extracting eigenfunctions');\n    return 0;\n  } // sort eigenfunctions: these changes do not affect accuracy\n\n\n  for (j = 0; j < n - 1; j++) {\n    // boundary incorrect\n    k = j;\n    tmp = w[k];\n\n    for (i = j + 1; i < n; i++) {\n      // boundary incorrect, shifted already\n      if (w[i] >= tmp) {\n        // why exchange if same?\n        k = i;\n        tmp = w[k];\n      }\n    }\n\n    if (k !== j) {\n      w[k] = w[j];\n      w[j] = tmp;\n\n      for (i = 0; i < n; i++) {\n        tmp = v[i][j];\n        v[i][j] = v[i][k];\n        v[i][k] = tmp;\n      }\n    }\n  } // ensure eigenvector consistency (i.e., Jacobi can compute vectors that\n  // are negative of one another (.707,.707,0) and (-.707,-.707,0). This can\n  // reek havoc in hyperstreamline/other stuff. We will select the most\n  // positive eigenvector.\n\n\n  var ceil_half_n = (n >> 1) + (n & 1);\n\n  for (j = 0; j < n; j++) {\n    for (numPos = 0, i = 0; i < n; i++) {\n      if (v[i][j] >= 0.0) {\n        numPos++;\n      }\n    } //    if ( numPos < ceil(double(n)/double(2.0)) )\n\n\n    if (numPos < ceil_half_n) {\n      for (i = 0; i < n; i++) {\n        v[i][j] *= -1.0;\n      }\n    }\n  }\n\n  return 1;\n}\nfunction matrix3x3ToQuaternion(mat_3x3, quat_4) {\n  var tmp = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]; // on-diagonal elements\n\n  tmp[0][0] = mat_3x3[0][0] + mat_3x3[1][1] + mat_3x3[2][2];\n  tmp[1][1] = mat_3x3[0][0] - mat_3x3[1][1] - mat_3x3[2][2];\n  tmp[2][2] = -mat_3x3[0][0] + mat_3x3[1][1] - mat_3x3[2][2];\n  tmp[3][3] = -mat_3x3[0][0] - mat_3x3[1][1] + mat_3x3[2][2]; // off-diagonal elements\n\n  tmp[0][1] = tmp[1][0] = mat_3x3[2][1] - mat_3x3[1][2];\n  tmp[0][2] = tmp[2][0] = mat_3x3[0][2] - mat_3x3[2][0];\n  tmp[0][3] = tmp[3][0] = mat_3x3[1][0] - mat_3x3[0][1];\n  tmp[1][2] = tmp[2][1] = mat_3x3[1][0] + mat_3x3[0][1];\n  tmp[1][3] = tmp[3][1] = mat_3x3[0][2] + mat_3x3[2][0];\n  tmp[2][3] = tmp[3][2] = mat_3x3[2][1] + mat_3x3[1][2];\n  var eigenvectors = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]];\n  var eigenvalues = [0, 0, 0, 0]; // convert into format that JacobiN can use,\n  // then use Jacobi to find eigenvalues and eigenvectors\n\n  var NTemp = [0, 0, 0, 0];\n  var eigenvectorsTemp = [0, 0, 0, 0];\n\n  for (var i = 0; i < 4; i++) {\n    NTemp[i] = tmp[i];\n    eigenvectorsTemp[i] = eigenvectors[i];\n  }\n\n  jacobiN(NTemp, 4, eigenvalues, eigenvectorsTemp); // the first eigenvector is the one we want\n\n  quat_4[0] = eigenvectors[0][0];\n  quat_4[1] = eigenvectors[1][0];\n  quat_4[2] = eigenvectors[2][0];\n  quat_4[3] = eigenvectors[3][0];\n}\nfunction multiplyQuaternion(quat_1, quat_2, quat_out) {\n  var ww = quat_1[0] * quat_2[0];\n  var wx = quat_1[0] * quat_2[1];\n  var wy = quat_1[0] * quat_2[2];\n  var wz = quat_1[0] * quat_2[3];\n  var xw = quat_1[1] * quat_2[0];\n  var xx = quat_1[1] * quat_2[1];\n  var xy = quat_1[1] * quat_2[2];\n  var xz = quat_1[1] * quat_2[3];\n  var yw = quat_1[2] * quat_2[0];\n  var yx = quat_1[2] * quat_2[1];\n  var yy = quat_1[2] * quat_2[2];\n  var yz = quat_1[2] * quat_2[3];\n  var zw = quat_1[3] * quat_2[0];\n  var zx = quat_1[3] * quat_2[1];\n  var zy = quat_1[3] * quat_2[2];\n  var zz = quat_1[3] * quat_2[3];\n  quat_out[0] = ww - xx - yy - zz;\n  quat_out[1] = wx + xw + yz - zy;\n  quat_out[2] = wy - xz + yw + zx;\n  quat_out[3] = wz + xy - yx + zw;\n}\nfunction orthogonalize3x3(a_3x3, out_3x3) {\n  // copy the matrix\n  for (var i = 0; i < 3; i++) {\n    out_3x3[0][i] = a_3x3[0][i];\n    out_3x3[1][i] = a_3x3[1][i];\n    out_3x3[2][i] = a_3x3[2][i];\n  } // Pivot the matrix to improve accuracy\n\n\n  var scale = createArray(3);\n  var index = createArray(3);\n  var largest; // Loop over rows to get implicit scaling information\n\n  for (var _i = 0; _i < 3; _i++) {\n    var _x = Math.abs(out_3x3[_i][0]);\n\n    var _x2 = Math.abs(out_3x3[_i][1]);\n\n    var _x3 = Math.abs(out_3x3[_i][2]);\n\n    largest = _x2 > _x ? _x2 : _x;\n    largest = _x3 > largest ? _x3 : largest;\n    scale[_i] = 1;\n\n    if (largest !== 0) {\n      scale[_i] /= largest;\n    }\n  } // first column\n\n\n  var x1 = Math.abs(out_3x3[0][0]) * scale[0];\n  var x2 = Math.abs(out_3x3[1][0]) * scale[1];\n  var x3 = Math.abs(out_3x3[2][0]) * scale[2];\n  index[0] = 0;\n  largest = x1;\n\n  if (x2 >= largest) {\n    largest = x2;\n    index[0] = 1;\n  }\n\n  if (x3 >= largest) {\n    index[0] = 2;\n  }\n\n  if (index[0] !== 0) {\n    vtkSwapVectors3(out_3x3[index[0]], out_3x3[0]);\n    scale[index[0]] = scale[0];\n  } // second column\n\n\n  var y2 = Math.abs(out_3x3[1][1]) * scale[1];\n  var y3 = Math.abs(out_3x3[2][1]) * scale[2];\n  index[1] = 1;\n  largest = y2;\n\n  if (y3 >= largest) {\n    index[1] = 2;\n    vtkSwapVectors3(out_3x3[2], out_3x3[1]);\n  } // third column\n\n\n  index[2] = 2; // A quaternion can only describe a pure rotation, not\n  // a rotation with a flip, therefore the flip must be\n  // removed before the matrix is converted to a quaternion.\n\n  var flip = 0;\n\n  if (determinant3x3(out_3x3) < 0) {\n    flip = 1;\n\n    for (var _i2 = 0; _i2 < 3; _i2++) {\n      out_3x3[0][_i2] = -out_3x3[0][_i2];\n      out_3x3[1][_i2] = -out_3x3[1][_i2];\n      out_3x3[2][_i2] = -out_3x3[2][_i2];\n    }\n  } // Do orthogonalization using a quaternion intermediate\n  // (this, essentially, does the orthogonalization via\n  // diagonalization of an appropriately constructed symmetric\n  // 4x4 matrix rather than by doing SVD of the 3x3 matrix)\n\n\n  var quat = createArray(4);\n  matrix3x3ToQuaternion(out_3x3, quat);\n  quaternionToMatrix3x3(quat, out_3x3); // Put the flip back into the orthogonalized matrix.\n\n  if (flip) {\n    for (var _i3 = 0; _i3 < 3; _i3++) {\n      out_3x3[0][_i3] = -out_3x3[0][_i3];\n      out_3x3[1][_i3] = -out_3x3[1][_i3];\n      out_3x3[2][_i3] = -out_3x3[2][_i3];\n    }\n  } // Undo the pivoting\n\n\n  if (index[1] !== 1) {\n    vtkSwapVectors3(out_3x3[index[1]], out_3x3[1]);\n  }\n\n  if (index[0] !== 0) {\n    vtkSwapVectors3(out_3x3[index[0]], out_3x3[0]);\n  }\n}\nfunction diagonalize3x3(a_3x3, w_3, v_3x3) {\n  var i;\n  var j;\n  var k;\n  var maxI;\n  var tmp;\n  var maxVal; // do the matrix[3][3] to **matrix conversion for Jacobi\n\n  var C = [createArray(3), createArray(3), createArray(3)];\n  var ATemp = createArray(3);\n  var VTemp = createArray(3);\n\n  for (i = 0; i < 3; i++) {\n    C[i][0] = a_3x3[i][0];\n    C[i][1] = a_3x3[i][1];\n    C[i][2] = a_3x3[i][2];\n    ATemp[i] = C[i];\n    VTemp[i] = v_3x3[i];\n  } // diagonalize using Jacobi\n\n\n  jacobiN(ATemp, 3, w_3, VTemp); // if all the eigenvalues are the same, return identity matrix\n\n  if (w_3[0] === w_3[1] && w_3[0] === w_3[2]) {\n    identity3x3(v_3x3);\n    return;\n  } // transpose temporarily, it makes it easier to sort the eigenvectors\n\n\n  transpose3x3(v_3x3, v_3x3); // if two eigenvalues are the same, re-orthogonalize to optimally line\n  // up the eigenvectors with the x, y, and z axes\n\n  for (i = 0; i < 3; i++) {\n    // two eigenvalues are the same\n    if (w_3[(i + 1) % 3] === w_3[(i + 2) % 3]) {\n      // find maximum element of the independent eigenvector\n      maxVal = Math.abs(v_3x3[i][0]);\n      maxI = 0;\n\n      for (j = 1; j < 3; j++) {\n        if (maxVal < (tmp = Math.abs(v_3x3[i][j]))) {\n          maxVal = tmp;\n          maxI = j;\n        }\n      } // swap the eigenvector into its proper position\n\n\n      if (maxI !== i) {\n        tmp = w_3[maxI];\n        w_3[maxI] = w_3[i];\n        w_3[i] = tmp;\n        vtkSwapVectors3(v_3x3[i], v_3x3[maxI]);\n      } // maximum element of eigenvector should be positive\n\n\n      if (v_3x3[maxI][maxI] < 0) {\n        v_3x3[maxI][0] = -v_3x3[maxI][0];\n        v_3x3[maxI][1] = -v_3x3[maxI][1];\n        v_3x3[maxI][2] = -v_3x3[maxI][2];\n      } // re-orthogonalize the other two eigenvectors\n\n\n      j = (maxI + 1) % 3;\n      k = (maxI + 2) % 3;\n      v_3x3[j][0] = 0.0;\n      v_3x3[j][1] = 0.0;\n      v_3x3[j][2] = 0.0;\n      v_3x3[j][j] = 1.0;\n      cross(v_3x3[maxI], v_3x3[j], v_3x3[k]);\n      normalize(v_3x3[k]);\n      cross(v_3x3[k], v_3x3[maxI], v_3x3[j]); // transpose vectors back to columns\n\n      transpose3x3(v_3x3, v_3x3);\n      return;\n    }\n  } // the three eigenvalues are different, just sort the eigenvectors\n  // to align them with the x, y, and z axes\n  // find the vector with the largest x element, make that vector\n  // the first vector\n\n\n  maxVal = Math.abs(v_3x3[0][0]);\n  maxI = 0;\n\n  for (i = 1; i < 3; i++) {\n    if (maxVal < (tmp = Math.abs(v_3x3[i][0]))) {\n      maxVal = tmp;\n      maxI = i;\n    }\n  } // swap eigenvalue and eigenvector\n\n\n  if (maxI !== 0) {\n    tmp = w_3[maxI];\n    w_3[maxI] = w_3[0];\n    w_3[0] = tmp;\n    vtkSwapVectors3(v_3x3[maxI], v_3x3[0]);\n  } // do the same for the y element\n\n\n  if (Math.abs(v_3x3[1][1]) < Math.abs(v_3x3[2][1])) {\n    tmp = w_3[2];\n    w_3[2] = w_3[1];\n    w_3[1] = tmp;\n    vtkSwapVectors3(v_3x3[2], v_3x3[1]);\n  } // ensure that the sign of the eigenvectors is correct\n\n\n  for (i = 0; i < 2; i++) {\n    if (v_3x3[i][i] < 0) {\n      v_3x3[i][0] = -v_3x3[i][0];\n      v_3x3[i][1] = -v_3x3[i][1];\n      v_3x3[i][2] = -v_3x3[i][2];\n    }\n  } // set sign of final eigenvector to ensure that determinant is positive\n\n\n  if (determinant3x3(v_3x3) < 0) {\n    v_3x3[2][0] = -v_3x3[2][0];\n    v_3x3[2][1] = -v_3x3[2][1];\n    v_3x3[2][2] = -v_3x3[2][2];\n  } // transpose the eigenvectors back again\n\n\n  transpose3x3(v_3x3, v_3x3);\n}\nfunction singularValueDecomposition3x3(a_3x3, u_3x3, w_3, vT_3x3) {\n  var i;\n  var B = [createArray(3), createArray(3), createArray(3)]; // copy so that A can be used for U or VT without risk\n\n  for (i = 0; i < 3; i++) {\n    B[0][i] = a_3x3[0][i];\n    B[1][i] = a_3x3[1][i];\n    B[2][i] = a_3x3[2][i];\n  } // temporarily flip if determinant is negative\n\n\n  var d = determinant3x3(B);\n\n  if (d < 0) {\n    for (i = 0; i < 3; i++) {\n      B[0][i] = -B[0][i];\n      B[1][i] = -B[1][i];\n      B[2][i] = -B[2][i];\n    }\n  } // orthogonalize, diagonalize, etc.\n\n\n  orthogonalize3x3(B, u_3x3);\n  transpose3x3(B, B);\n  multiply3x3_mat3(B, u_3x3, vT_3x3);\n  diagonalize3x3(vT_3x3, w_3, vT_3x3);\n  multiply3x3_mat3(u_3x3, vT_3x3, u_3x3);\n  transpose3x3(vT_3x3, vT_3x3); // re-create the flip\n\n  if (d < 0) {\n    w_3[0] = -w_3[0];\n    w_3[1] = -w_3[1];\n    w_3[2] = -w_3[2];\n  }\n}\nfunction luFactorLinearSystem(A, index, size) {\n  var i;\n  var j;\n  var k;\n  var largest;\n  var maxI = 0;\n  var sum;\n  var temp1;\n  var temp2;\n  var scale = createArray(size); //\n  // Loop over rows to get implicit scaling information\n  //\n\n  for (i = 0; i < size; i++) {\n    for (largest = 0.0, j = 0; j < size; j++) {\n      if ((temp2 = Math.abs(A[i][j])) > largest) {\n        largest = temp2;\n      }\n    }\n\n    if (largest === 0.0) {\n      vtkWarningMacro('Unable to factor linear system');\n      return 0;\n    }\n\n    scale[i] = 1.0 / largest;\n  } //\n  // Loop over all columns using Crout's method\n  //\n\n\n  for (j = 0; j < size; j++) {\n    for (i = 0; i < j; i++) {\n      sum = A[i][j];\n\n      for (k = 0; k < i; k++) {\n        sum -= A[i][k] * A[k][j];\n      }\n\n      A[i][j] = sum;\n    } //\n    // Begin search for largest pivot element\n    //\n\n\n    for (largest = 0.0, i = j; i < size; i++) {\n      sum = A[i][j];\n\n      for (k = 0; k < j; k++) {\n        sum -= A[i][k] * A[k][j];\n      }\n\n      A[i][j] = sum;\n\n      if ((temp1 = scale[i] * Math.abs(sum)) >= largest) {\n        largest = temp1;\n        maxI = i;\n      }\n    } //\n    // Check for row interchange\n    //\n\n\n    if (j !== maxI) {\n      for (k = 0; k < size; k++) {\n        temp1 = A[maxI][k];\n        A[maxI][k] = A[j][k];\n        A[j][k] = temp1;\n      }\n\n      scale[maxI] = scale[j];\n    } //\n    // Divide by pivot element and perform elimination\n    //\n\n\n    index[j] = maxI;\n\n    if (Math.abs(A[j][j]) <= VTK_SMALL_NUMBER) {\n      vtkWarningMacro('Unable to factor linear system');\n      return 0;\n    }\n\n    if (j !== size - 1) {\n      temp1 = 1.0 / A[j][j];\n\n      for (i = j + 1; i < size; i++) {\n        A[i][j] *= temp1;\n      }\n    }\n  }\n\n  return 1;\n}\nfunction luSolveLinearSystem(A, index, x, size) {\n  var i;\n  var j;\n  var ii;\n  var idx;\n  var sum; //\n  // Proceed with forward and backsubstitution for L and U\n  // matrices.  First, forward substitution.\n  //\n\n  for (ii = -1, i = 0; i < size; i++) {\n    idx = index[i];\n    sum = x[idx];\n    x[idx] = x[i];\n\n    if (ii >= 0) {\n      for (j = ii; j <= i - 1; j++) {\n        sum -= A[i][j] * x[j];\n      }\n    } else if (sum !== 0.0) {\n      ii = i;\n    }\n\n    x[i] = sum;\n  } //\n  // Now, back substitution\n  //\n\n\n  for (i = size - 1; i >= 0; i--) {\n    sum = x[i];\n\n    for (j = i + 1; j < size; j++) {\n      sum -= A[i][j] * x[j];\n    }\n\n    x[i] = sum / A[i][i];\n  }\n}\nfunction solveLinearSystem(A, x, size) {\n  // if we solving something simple, just solve it\n  if (size === 2) {\n    var y = createArray(2);\n    var det = determinant2x2(A[0][0], A[0][1], A[1][0], A[1][1]);\n\n    if (det === 0.0) {\n      // Unable to solve linear system\n      return 0;\n    }\n\n    y[0] = (A[1][1] * x[0] - A[0][1] * x[1]) / det;\n    y[1] = (-(A[1][0] * x[0]) + A[0][0] * x[1]) / det;\n    x[0] = y[0];\n    x[1] = y[1];\n    return 1;\n  }\n\n  if (size === 1) {\n    if (A[0][0] === 0.0) {\n      // Unable to solve linear system\n      return 0;\n    }\n\n    x[0] /= A[0][0];\n    return 1;\n  } //\n  // System of equations is not trivial, use Crout's method\n  //\n  // Check on allocation of working vectors\n\n\n  var index = createArray(size); // Factor and solve matrix\n\n  if (luFactorLinearSystem(A, index, size) === 0) {\n    return 0;\n  }\n\n  luSolveLinearSystem(A, index, x, size);\n  return 1;\n}\nfunction invertMatrix(A, AI, size) {\n  var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n  var column = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n  var tmp1Size = index || createArray(size);\n  var tmp2Size = column || createArray(size); // Factor matrix; then begin solving for inverse one column at a time.\n  // Note: tmp1Size returned value is used later, tmp2Size is just working\n  // memory whose values are not used in LUSolveLinearSystem\n\n  if (luFactorLinearSystem(A, tmp1Size, size) === 0) {\n    return 0;\n  }\n\n  for (var j = 0; j < size; j++) {\n    for (var i = 0; i < size; i++) {\n      tmp2Size[i] = 0.0;\n    }\n\n    tmp2Size[j] = 1.0;\n    luSolveLinearSystem(A, tmp1Size, tmp2Size, size);\n\n    for (var _i4 = 0; _i4 < size; _i4++) {\n      AI[_i4][j] = tmp2Size[_i4];\n    }\n  }\n\n  return 1;\n}\nfunction estimateMatrixCondition(A, size) {\n  var minValue = +Number.MAX_VALUE;\n  var maxValue = -Number.MAX_VALUE; // find the maximum value\n\n  for (var i = 0; i < size; i++) {\n    for (var j = i; j < size; j++) {\n      if (Math.abs(A[i][j]) > max) {\n        maxValue = Math.abs(A[i][j]);\n      }\n    }\n  } // find the minimum diagonal value\n\n\n  for (var _i5 = 0; _i5 < size; _i5++) {\n    if (Math.abs(A[_i5][_i5]) < min) {\n      minValue = Math.abs(A[_i5][_i5]);\n    }\n  }\n\n  if (minValue === 0.0) {\n    return Number.MAX_VALUE;\n  }\n\n  return maxValue / minValue;\n}\nfunction jacobi(a_3x3, w, v) {\n  return jacobiN(a_3x3, 3, w, v);\n}\nfunction solveHomogeneousLeastSquares(numberOfSamples, xt, xOrder, mt) {\n  // check dimensional consistency\n  if (numberOfSamples < xOrder) {\n    vtkWarningMacro('Insufficient number of samples. Underdetermined.');\n    return 0;\n  }\n\n  var i;\n  var j;\n  var k; // set up intermediate variables\n  // Allocate matrix to hold X times transpose of X\n\n  var XXt = createArray(xOrder); // size x by x\n  // Allocate the array of eigenvalues and eigenvectors\n\n  var eigenvals = createArray(xOrder);\n  var eigenvecs = createArray(xOrder); // Clear the upper triangular region (and btw, allocate the eigenvecs as well)\n\n  for (i = 0; i < xOrder; i++) {\n    eigenvecs[i] = createArray(xOrder);\n    XXt[i] = createArray(xOrder);\n\n    for (j = 0; j < xOrder; j++) {\n      XXt[i][j] = 0.0;\n    }\n  } // Calculate XXt upper half only, due to symmetry\n\n\n  for (k = 0; k < numberOfSamples; k++) {\n    for (i = 0; i < xOrder; i++) {\n      for (j = i; j < xOrder; j++) {\n        XXt[i][j] += xt[k][i] * xt[k][j];\n      }\n    }\n  } // now fill in the lower half of the XXt matrix\n\n\n  for (i = 0; i < xOrder; i++) {\n    for (j = 0; j < i; j++) {\n      XXt[i][j] = XXt[j][i];\n    }\n  } // Compute the eigenvectors and eigenvalues\n\n\n  jacobiN(XXt, xOrder, eigenvals, eigenvecs); // Smallest eigenval is at the end of the list (xOrder-1), and solution is\n  // corresponding eigenvec.\n\n  for (i = 0; i < xOrder; i++) {\n    mt[i][0] = eigenvecs[i][xOrder - 1];\n  }\n\n  return 1;\n}\nfunction solveLeastSquares(numberOfSamples, xt, xOrder, yt, yOrder, mt) {\n  var checkHomogeneous = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;\n\n  // check dimensional consistency\n  if (numberOfSamples < xOrder || numberOfSamples < yOrder) {\n    vtkWarningMacro('Insufficient number of samples. Underdetermined.');\n    return 0;\n  }\n\n  var homogenFlags = createArray(yOrder);\n  var allHomogeneous = 1;\n  var hmt;\n  var homogRC = 0;\n  var i;\n  var j;\n  var k;\n  var someHomogeneous = 0; // Ok, first init some flags check and see if all the systems are homogeneous\n\n  if (checkHomogeneous) {\n    // If Y' is zero, it's a homogeneous system and can't be solved via\n    // the pseudoinverse method. Detect this case, warn the user, and\n    // invoke SolveHomogeneousLeastSquares instead. Note that it doesn't\n    // really make much sense for yOrder to be greater than one in this case,\n    // since that's just yOrder occurrences of a 0 vector on the RHS, but\n    // we allow it anyway. N\n    // Initialize homogeneous flags on a per-right-hand-side basis\n    for (j = 0; j < yOrder; j++) {\n      homogenFlags[j] = 1;\n    }\n\n    for (i = 0; i < numberOfSamples; i++) {\n      for (j = 0; j < yOrder; j++) {\n        if (Math.abs(yt[i][j]) > VTK_SMALL_NUMBER) {\n          allHomogeneous = 0;\n          homogenFlags[j] = 0;\n        }\n      }\n    } // If we've got one system, and it's homogeneous, do it and bail out quickly.\n\n\n    if (allHomogeneous && yOrder === 1) {\n      vtkWarningMacro('Detected homogeneous system (Y=0), calling SolveHomogeneousLeastSquares()');\n      return solveHomogeneousLeastSquares(numberOfSamples, xt, xOrder, mt);\n    } // Ok, we've got more than one system of equations.\n    // Figure out if we need to calculate the homogeneous equation solution for\n    // any of them.\n\n\n    if (allHomogeneous) {\n      someHomogeneous = 1;\n    } else {\n      for (j = 0; j < yOrder; j++) {\n        if (homogenFlags[j]) {\n          someHomogeneous = 1;\n        }\n      }\n    }\n  } // If necessary, solve the homogeneous problem\n\n\n  if (someHomogeneous) {\n    // hmt is the homogeneous equation version of mt, the general solution.\n    hmt = createArray(xOrder);\n\n    for (j = 0; j < xOrder; j++) {\n      // Only allocate 1 here, not yOrder, because here we're going to solve\n      // just the one homogeneous equation subset of the entire problem\n      hmt[j] = [0];\n    } // Ok, solve the homogeneous problem\n\n\n    homogRC = solveHomogeneousLeastSquares(numberOfSamples, xt, xOrder, hmt);\n  } // set up intermediate variables\n\n\n  var XXt = createArray(xOrder); // size x by x\n\n  var XXtI = createArray(xOrder); // size x by x\n\n  var XYt = createArray(xOrder); // size x by y\n\n  for (i = 0; i < xOrder; i++) {\n    XXt[i] = createArray(xOrder);\n    XXtI[i] = createArray(xOrder);\n\n    for (j = 0; j < xOrder; j++) {\n      XXt[i][j] = 0.0;\n      XXtI[i][j] = 0.0;\n    }\n\n    XYt[i] = createArray(yOrder);\n\n    for (j = 0; j < yOrder; j++) {\n      XYt[i][j] = 0.0;\n    }\n  } // first find the pseudoinverse matrix\n\n\n  for (k = 0; k < numberOfSamples; k++) {\n    for (i = 0; i < xOrder; i++) {\n      // first calculate the XXt matrix, only do the upper half (symmetrical)\n      for (j = i; j < xOrder; j++) {\n        XXt[i][j] += xt[k][i] * xt[k][j];\n      } // now calculate the XYt matrix\n\n\n      for (j = 0; j < yOrder; j++) {\n        XYt[i][j] += xt[k][i] * yt[k][j];\n      }\n    }\n  } // now fill in the lower half of the XXt matrix\n\n\n  for (i = 0; i < xOrder; i++) {\n    for (j = 0; j < i; j++) {\n      XXt[i][j] = XXt[j][i];\n    }\n  }\n\n  var successFlag = invertMatrix(XXt, XXtI, xOrder); // next get the inverse of XXt\n\n  if (successFlag) {\n    for (i = 0; i < xOrder; i++) {\n      for (j = 0; j < yOrder; j++) {\n        mt[i][j] = 0.0;\n\n        for (k = 0; k < xOrder; k++) {\n          mt[i][j] += XXtI[i][k] * XYt[k][j];\n        }\n      }\n    }\n  } // Fix up any of the solutions that correspond to the homogeneous equation\n  // problem.\n\n\n  if (someHomogeneous) {\n    for (j = 0; j < yOrder; j++) {\n      if (homogenFlags[j]) {\n        // Fix this one\n        for (i = 0; i < xOrder; i++) {\n          mt[i][j] = hmt[i][0];\n        }\n      }\n    }\n  }\n\n  if (someHomogeneous) {\n    return homogRC && successFlag;\n  }\n\n  return successFlag;\n}\nfunction hex2float(hexStr) {\n  var outFloatArray = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0.5, 1];\n\n  switch (hexStr.length) {\n    case 3:\n      // abc => #aabbcc\n      outFloatArray[0] = parseInt(hexStr[0], 16) * 17 / 255;\n      outFloatArray[1] = parseInt(hexStr[1], 16) * 17 / 255;\n      outFloatArray[2] = parseInt(hexStr[2], 16) * 17 / 255;\n      return outFloatArray;\n\n    case 4:\n      // #abc => #aabbcc\n      outFloatArray[0] = parseInt(hexStr[1], 16) * 17 / 255;\n      outFloatArray[1] = parseInt(hexStr[2], 16) * 17 / 255;\n      outFloatArray[2] = parseInt(hexStr[3], 16) * 17 / 255;\n      return outFloatArray;\n\n    case 6:\n      // ab01df => #ab01df\n      outFloatArray[0] = parseInt(hexStr.substr(0, 2), 16) / 255;\n      outFloatArray[1] = parseInt(hexStr.substr(2, 2), 16) / 255;\n      outFloatArray[2] = parseInt(hexStr.substr(4, 2), 16) / 255;\n      return outFloatArray;\n\n    case 7:\n      // #ab01df\n      outFloatArray[0] = parseInt(hexStr.substr(1, 2), 16) / 255;\n      outFloatArray[1] = parseInt(hexStr.substr(3, 2), 16) / 255;\n      outFloatArray[2] = parseInt(hexStr.substr(5, 2), 16) / 255;\n      return outFloatArray;\n\n    case 9:\n      // #ab01df00\n      outFloatArray[0] = parseInt(hexStr.substr(1, 2), 16) / 255;\n      outFloatArray[1] = parseInt(hexStr.substr(3, 2), 16) / 255;\n      outFloatArray[2] = parseInt(hexStr.substr(5, 2), 16) / 255;\n      outFloatArray[3] = parseInt(hexStr.substr(7, 2), 16) / 255;\n      return outFloatArray;\n\n    default:\n      return outFloatArray;\n  }\n}\nfunction rgb2hsv(rgb, hsv) {\n  var h;\n  var s;\n\n  var _rgb = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(rgb, 3),\n      r = _rgb[0],\n      g = _rgb[1],\n      b = _rgb[2];\n\n  var onethird = 1.0 / 3.0;\n  var onesixth = 1.0 / 6.0;\n  var twothird = 2.0 / 3.0;\n  var cmax = r;\n  var cmin = r;\n\n  if (g > cmax) {\n    cmax = g;\n  } else if (g < cmin) {\n    cmin = g;\n  }\n\n  if (b > cmax) {\n    cmax = b;\n  } else if (b < cmin) {\n    cmin = b;\n  }\n\n  var v = cmax;\n\n  if (v > 0.0) {\n    s = (cmax - cmin) / cmax;\n  } else {\n    s = 0.0;\n  }\n\n  if (s > 0) {\n    if (r === cmax) {\n      h = onesixth * (g - b) / (cmax - cmin);\n    } else if (g === cmax) {\n      h = onethird + onesixth * (b - r) / (cmax - cmin);\n    } else {\n      h = twothird + onesixth * (r - g) / (cmax - cmin);\n    }\n\n    if (h < 0.0) {\n      h += 1.0;\n    }\n  } else {\n    h = 0.0;\n  } // Set the values back to the array\n\n\n  hsv[0] = h;\n  hsv[1] = s;\n  hsv[2] = v;\n}\nfunction hsv2rgb(hsv, rgb) {\n  var _hsv = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(hsv, 3),\n      h = _hsv[0],\n      s = _hsv[1],\n      v = _hsv[2];\n\n  var onethird = 1.0 / 3.0;\n  var onesixth = 1.0 / 6.0;\n  var twothird = 2.0 / 3.0;\n  var fivesixth = 5.0 / 6.0;\n  var r;\n  var g;\n  var b; // compute RGB from HSV\n\n  if (h > onesixth && h <= onethird) {\n    // green/red\n    g = 1.0;\n    r = (onethird - h) / onesixth;\n    b = 0.0;\n  } else if (h > onethird && h <= 0.5) {\n    // green/blue\n    g = 1.0;\n    b = (h - onethird) / onesixth;\n    r = 0.0;\n  } else if (h > 0.5 && h <= twothird) {\n    // blue/green\n    b = 1.0;\n    g = (twothird - h) / onesixth;\n    r = 0.0;\n  } else if (h > twothird && h <= fivesixth) {\n    // blue/red\n    b = 1.0;\n    r = (h - twothird) / onesixth;\n    g = 0.0;\n  } else if (h > fivesixth && h <= 1.0) {\n    // red/blue\n    r = 1.0;\n    b = (1.0 - h) / onesixth;\n    g = 0.0;\n  } else {\n    // red/green\n    r = 1.0;\n    g = h / onesixth;\n    b = 0.0;\n  } // add Saturation to the equation.\n\n\n  r = s * r + (1.0 - s);\n  g = s * g + (1.0 - s);\n  b = s * b + (1.0 - s);\n  r *= v;\n  g *= v;\n  b *= v; // Assign back to the array\n\n  rgb[0] = r;\n  rgb[1] = g;\n  rgb[2] = b;\n}\nfunction lab2xyz(lab, xyz) {\n  // LAB to XYZ\n  var _lab = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(lab, 3),\n      L = _lab[0],\n      a = _lab[1],\n      b = _lab[2];\n\n  var var_Y = (L + 16) / 116;\n  var var_X = a / 500 + var_Y;\n  var var_Z = var_Y - b / 200;\n\n  if (Math.pow(var_Y, 3) > 0.008856) {\n    var_Y = Math.pow(var_Y, 3);\n  } else {\n    var_Y = (var_Y - 16.0 / 116.0) / 7.787;\n  }\n\n  if (Math.pow(var_X, 3) > 0.008856) {\n    var_X = Math.pow(var_X, 3);\n  } else {\n    var_X = (var_X - 16.0 / 116.0) / 7.787;\n  }\n\n  if (Math.pow(var_Z, 3) > 0.008856) {\n    var_Z = Math.pow(var_Z, 3);\n  } else {\n    var_Z = (var_Z - 16.0 / 116.0) / 7.787;\n  }\n\n  var ref_X = 0.9505;\n  var ref_Y = 1.0;\n  var ref_Z = 1.089;\n  xyz[0] = ref_X * var_X; // ref_X = 0.9505  Observer= 2 deg Illuminant= D65\n\n  xyz[1] = ref_Y * var_Y; // ref_Y = 1.000\n\n  xyz[2] = ref_Z * var_Z; // ref_Z = 1.089\n}\nfunction xyz2lab(xyz, lab) {\n  var _xyz = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(xyz, 3),\n      x = _xyz[0],\n      y = _xyz[1],\n      z = _xyz[2];\n\n  var ref_X = 0.9505;\n  var ref_Y = 1.0;\n  var ref_Z = 1.089;\n  var var_X = x / ref_X; // ref_X = 0.9505  Observer= 2 deg, Illuminant= D65\n\n  var var_Y = y / ref_Y; // ref_Y = 1.000\n\n  var var_Z = z / ref_Z; // ref_Z = 1.089\n\n  if (var_X > 0.008856) var_X = Math.pow(var_X, 1.0 / 3.0);else var_X = 7.787 * var_X + 16.0 / 116.0;\n  if (var_Y > 0.008856) var_Y = Math.pow(var_Y, 1.0 / 3.0);else var_Y = 7.787 * var_Y + 16.0 / 116.0;\n  if (var_Z > 0.008856) var_Z = Math.pow(var_Z, 1.0 / 3.0);else var_Z = 7.787 * var_Z + 16.0 / 116.0;\n  lab[0] = 116 * var_Y - 16;\n  lab[1] = 500 * (var_X - var_Y);\n  lab[2] = 200 * (var_Y - var_Z);\n}\nfunction xyz2rgb(xyz, rgb) {\n  var _xyz2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(xyz, 3),\n      x = _xyz2[0],\n      y = _xyz2[1],\n      z = _xyz2[2];\n\n  var r = x * 3.2406 + y * -1.5372 + z * -0.4986;\n  var g = x * -0.9689 + y * 1.8758 + z * 0.0415;\n  var b = x * 0.0557 + y * -0.204 + z * 1.057; // The following performs a \"gamma correction\" specified by the sRGB color\n  // space.  sRGB is defined by a canonical definition of a display monitor and\n  // has been standardized by the International Electrotechnical Commission (IEC\n  // 61966-2-1).  The nonlinearity of the correction is designed to make the\n  // colors more perceptually uniform.  This color space has been adopted by\n  // several applications including Adobe Photoshop and Microsoft Windows color\n  // management.  OpenGL is agnostic on its RGB color space, but it is reasonable\n  // to assume it is close to this one.\n\n  if (r > 0.0031308) r = 1.055 * Math.pow(r, 1 / 2.4) - 0.055;else r *= 12.92;\n  if (g > 0.0031308) g = 1.055 * Math.pow(g, 1 / 2.4) - 0.055;else g *= 12.92;\n  if (b > 0.0031308) b = 1.055 * Math.pow(b, 1 / 2.4) - 0.055;else b *= 12.92; // Clip colors. ideally we would do something that is perceptually closest\n  // (since we can see colors outside of the display gamut), but this seems to\n  // work well enough.\n\n  var maxVal = r;\n  if (maxVal < g) maxVal = g;\n  if (maxVal < b) maxVal = b;\n\n  if (maxVal > 1.0) {\n    r /= maxVal;\n    g /= maxVal;\n    b /= maxVal;\n  }\n\n  if (r < 0) r = 0;\n  if (g < 0) g = 0;\n  if (b < 0) b = 0; // Push values back to array\n\n  rgb[0] = r;\n  rgb[1] = g;\n  rgb[2] = b;\n}\nfunction rgb2xyz(rgb, xyz) {\n  var _rgb2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(rgb, 3),\n      r = _rgb2[0],\n      g = _rgb2[1],\n      b = _rgb2[2]; // The following performs a \"gamma correction\" specified by the sRGB color\n  // space.  sRGB is defined by a canonical definition of a display monitor and\n  // has been standardized by the International Electrotechnical Commission (IEC\n  // 61966-2-1).  The nonlinearity of the correction is designed to make the\n  // colors more perceptually uniform.  This color space has been adopted by\n  // several applications including Adobe Photoshop and Microsoft Windows color\n  // management.  OpenGL is agnostic on its RGB color space, but it is reasonable\n  // to assume it is close to this one.\n\n\n  if (r > 0.04045) r = Math.pow((r + 0.055) / 1.055, 2.4);else r /= 12.92;\n  if (g > 0.04045) g = Math.pow((g + 0.055) / 1.055, 2.4);else g /= 12.92;\n  if (b > 0.04045) b = Math.pow((b + 0.055) / 1.055, 2.4);else b /= 12.92; // Observer. = 2 deg, Illuminant = D65\n\n  xyz[0] = r * 0.4124 + g * 0.3576 + b * 0.1805;\n  xyz[1] = r * 0.2126 + g * 0.7152 + b * 0.0722;\n  xyz[2] = r * 0.0193 + g * 0.1192 + b * 0.9505;\n}\nfunction rgb2lab(rgb, lab) {\n  var xyz = [0, 0, 0];\n  rgb2xyz(rgb, xyz);\n  xyz2lab(xyz, lab);\n}\nfunction lab2rgb(lab, rgb) {\n  var xyz = [0, 0, 0];\n  lab2xyz(lab, xyz);\n  xyz2rgb(xyz, rgb);\n}\nfunction uninitializeBounds(bounds) {\n  bounds[0] = 1.0;\n  bounds[1] = -1.0;\n  bounds[2] = 1.0;\n  bounds[3] = -1.0;\n  bounds[4] = 1.0;\n  bounds[5] = -1.0;\n}\nfunction areBoundsInitialized(bounds) {\n  return !(bounds[1] - bounds[0] < 0.0);\n}\nfunction computeBoundsFromPoints(point1, point2, bounds) {\n  bounds[0] = Math.min(point1[0], point2[0]);\n  bounds[1] = Math.max(point1[0], point2[0]);\n  bounds[2] = Math.min(point1[1], point2[1]);\n  bounds[3] = Math.max(point1[1], point2[1]);\n  bounds[4] = Math.min(point1[2], point2[2]);\n  bounds[5] = Math.max(point1[2], point2[2]);\n}\nfunction clampValue(value, minValue, maxValue) {\n  if (value < minValue) {\n    return minValue;\n  }\n\n  if (value > maxValue) {\n    return maxValue;\n  }\n\n  return value;\n}\nfunction clampVector(vector, minVector, maxVector) {\n  var out = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n  out[0] = clampValue(vector[0], minVector[0], maxVector[0]);\n  out[1] = clampValue(vector[1], minVector[1], maxVector[1]);\n  out[2] = clampValue(vector[2], minVector[2], maxVector[2]);\n  return out;\n}\nfunction clampAndNormalizeValue(value, range) {\n  var result = 0;\n\n  if (range[0] !== range[1]) {\n    // clamp\n    if (value < range[0]) {\n      result = range[0];\n    } else if (value > range[1]) {\n      result = range[1];\n    } else {\n      result = value;\n    } // normalize\n\n\n    result = (result - range[0]) / (range[1] - range[0]);\n  }\n\n  return result;\n}\nvar getScalarTypeFittingRange = notImplemented('GetScalarTypeFittingRange');\nvar getAdjustedScalarRange = notImplemented('GetAdjustedScalarRange');\nfunction extentIsWithinOtherExtent(extent1, extent2) {\n  if (!extent1 || !extent2) {\n    return 0;\n  }\n\n  for (var i = 0; i < 6; i += 2) {\n    if (extent1[i] < extent2[i] || extent1[i] > extent2[i + 1] || extent1[i + 1] < extent2[i] || extent1[i + 1] > extent2[i + 1]) {\n      return 0;\n    }\n  }\n\n  return 1;\n}\nfunction boundsIsWithinOtherBounds(bounds1_6, bounds2_6, delta_3) {\n  if (!bounds1_6 || !bounds2_6) {\n    return 0;\n  }\n\n  for (var i = 0; i < 6; i += 2) {\n    if (bounds1_6[i] + delta_3[i / 2] < bounds2_6[i] || bounds1_6[i] - delta_3[i / 2] > bounds2_6[i + 1] || bounds1_6[i + 1] + delta_3[i / 2] < bounds2_6[i] || bounds1_6[i + 1] - delta_3[i / 2] > bounds2_6[i + 1]) {\n      return 0;\n    }\n  }\n\n  return 1;\n}\nfunction pointIsWithinBounds(point_3, bounds_6, delta_3) {\n  if (!point_3 || !bounds_6 || !delta_3) {\n    return 0;\n  }\n\n  for (var i = 0; i < 3; i++) {\n    if (point_3[i] + delta_3[i] < bounds_6[2 * i] || point_3[i] - delta_3[i] > bounds_6[2 * i + 1]) {\n      return 0;\n    }\n  }\n\n  return 1;\n}\nfunction solve3PointCircle(p1, p2, p3, center) {\n  var v21 = createArray(3);\n  var v32 = createArray(3);\n  var v13 = createArray(3);\n  var v12 = createArray(3);\n  var v23 = createArray(3);\n  var v31 = createArray(3);\n\n  for (var i = 0; i < 3; ++i) {\n    v21[i] = p1[i] - p2[i];\n    v32[i] = p2[i] - p3[i];\n    v13[i] = p3[i] - p1[i];\n    v12[i] = -v21[i];\n    v23[i] = -v32[i];\n    v31[i] = -v13[i];\n  }\n\n  var norm12 = norm(v12);\n  var norm23 = norm(v23);\n  var norm13 = norm(v13);\n  var crossv21v32 = createArray(3);\n  cross(v21, v32, crossv21v32);\n  var normCross = norm(crossv21v32);\n  var radius = norm12 * norm23 * norm13 / (2 * normCross);\n  var normCross22 = 2 * normCross * normCross;\n  var alpha = norm23 * norm23 * dot(v21, v31) / normCross22;\n  var beta = norm13 * norm13 * dot(v12, v32) / normCross22;\n  var gamma = norm12 * norm12 * dot(v13, v23) / normCross22;\n\n  for (var _i6 = 0; _i6 < 3; ++_i6) {\n    center[_i6] = alpha * p1[_i6] + beta * p2[_i6] + gamma * p3[_i6];\n  }\n\n  return radius;\n}\nvar inf = Infinity;\nvar negInf = -Infinity;\nvar isInf = function isInf(value) {\n  return !Number.isFinite(value);\n};\nvar isFinite = Number.isFinite,\n    isNaN = Number.isNaN;\nvar isNan = isNaN; // JavaScript - add-on ----------------------\n\nfunction createUninitializedBounds() {\n  return [].concat([Number.MAX_VALUE, -Number.MAX_VALUE, // X\n  Number.MAX_VALUE, -Number.MAX_VALUE, // Y\n  Number.MAX_VALUE, -Number.MAX_VALUE // Z\n  ]);\n}\nfunction getMajorAxisIndex(vector) {\n  var maxValue = -1;\n  var axisIndex = -1;\n\n  for (var i = 0; i < vector.length; i++) {\n    var value = Math.abs(vector[i]);\n\n    if (value > maxValue) {\n      axisIndex = i;\n      maxValue = value;\n    }\n  }\n\n  return axisIndex;\n}\nfunction floatToHex2(value) {\n  var integer = Math.floor(value * 255);\n\n  if (integer > 15) {\n    return integer.toString(16);\n  }\n\n  return \"0\".concat(integer.toString(16));\n}\nfunction floatRGB2HexCode(rgbArray) {\n  var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#';\n  return \"\".concat(prefix).concat(rgbArray.map(floatToHex2).join(''));\n}\n\nfunction floatToChar(f) {\n  return Math.round(f * 255);\n}\n\nfunction float2CssRGBA(rgbArray) {\n  if (rgbArray.length === 3) {\n    return \"rgb(\".concat(rgbArray.map(floatToChar).join(', '), \")\");\n  }\n\n  return \"rgba(\".concat(floatToChar(rgbArray[0] || 0), \", \").concat(floatToChar(rgbArray[1] || 0), \", \").concat(floatToChar(rgbArray[2] || 0), \", \").concat(rgbArray[3] || 0, \")\");\n} // ----------------------------------------------------------------------------\n// Only Static API\n// ----------------------------------------------------------------------------\n\nvar vtkMath = {\n  Pi: Pi,\n  radiansFromDegrees: radiansFromDegrees,\n  degreesFromRadians: degreesFromRadians,\n  round: round,\n  floor: floor,\n  ceil: ceil,\n  ceilLog2: ceilLog2,\n  min: min,\n  max: max,\n  arrayMin: arrayMin,\n  arrayMax: arrayMax,\n  arrayRange: arrayRange,\n  isPowerOfTwo: isPowerOfTwo,\n  nearestPowerOfTwo: nearestPowerOfTwo,\n  factorial: factorial,\n  binomial: binomial,\n  beginCombination: beginCombination,\n  nextCombination: nextCombination,\n  randomSeed: randomSeed,\n  getSeed: getSeed,\n  random: random,\n  gaussian: gaussian,\n  add: add,\n  subtract: subtract,\n  multiplyScalar: multiplyScalar,\n  multiplyScalar2D: multiplyScalar2D,\n  multiplyAccumulate: multiplyAccumulate,\n  multiplyAccumulate2D: multiplyAccumulate2D,\n  dot: dot,\n  outer: outer,\n  cross: cross,\n  norm: norm,\n  normalize: normalize,\n  perpendiculars: perpendiculars,\n  projectVector: projectVector,\n  projectVector2D: projectVector2D,\n  distance2BetweenPoints: distance2BetweenPoints,\n  angleBetweenVectors: angleBetweenVectors,\n  gaussianAmplitude: gaussianAmplitude,\n  gaussianWeight: gaussianWeight,\n  dot2D: dot2D,\n  outer2D: outer2D,\n  norm2D: norm2D,\n  normalize2D: normalize2D,\n  determinant2x2: determinant2x2,\n  LUFactor3x3: LUFactor3x3,\n  LUSolve3x3: LUSolve3x3,\n  linearSolve3x3: linearSolve3x3,\n  multiply3x3_vect3: multiply3x3_vect3,\n  multiply3x3_mat3: multiply3x3_mat3,\n  multiplyMatrix: multiplyMatrix,\n  transpose3x3: transpose3x3,\n  invert3x3: invert3x3,\n  identity3x3: identity3x3,\n  determinant3x3: determinant3x3,\n  quaternionToMatrix3x3: quaternionToMatrix3x3,\n  areEquals: areEquals,\n  areMatricesEqual: areMatricesEqual,\n  roundNumber: roundNumber,\n  roundVector: roundVector,\n  matrix3x3ToQuaternion: matrix3x3ToQuaternion,\n  multiplyQuaternion: multiplyQuaternion,\n  orthogonalize3x3: orthogonalize3x3,\n  diagonalize3x3: diagonalize3x3,\n  singularValueDecomposition3x3: singularValueDecomposition3x3,\n  solveLinearSystem: solveLinearSystem,\n  invertMatrix: invertMatrix,\n  luFactorLinearSystem: luFactorLinearSystem,\n  luSolveLinearSystem: luSolveLinearSystem,\n  estimateMatrixCondition: estimateMatrixCondition,\n  jacobi: jacobi,\n  jacobiN: jacobiN,\n  solveHomogeneousLeastSquares: solveHomogeneousLeastSquares,\n  solveLeastSquares: solveLeastSquares,\n  hex2float: hex2float,\n  rgb2hsv: rgb2hsv,\n  hsv2rgb: hsv2rgb,\n  lab2xyz: lab2xyz,\n  xyz2lab: xyz2lab,\n  xyz2rgb: xyz2rgb,\n  rgb2xyz: rgb2xyz,\n  rgb2lab: rgb2lab,\n  lab2rgb: lab2rgb,\n  uninitializeBounds: uninitializeBounds,\n  areBoundsInitialized: areBoundsInitialized,\n  computeBoundsFromPoints: computeBoundsFromPoints,\n  clampValue: clampValue,\n  clampVector: clampVector,\n  clampAndNormalizeValue: clampAndNormalizeValue,\n  getScalarTypeFittingRange: getScalarTypeFittingRange,\n  getAdjustedScalarRange: getAdjustedScalarRange,\n  extentIsWithinOtherExtent: extentIsWithinOtherExtent,\n  boundsIsWithinOtherBounds: boundsIsWithinOtherBounds,\n  pointIsWithinBounds: pointIsWithinBounds,\n  solve3PointCircle: solve3PointCircle,\n  inf: inf,\n  negInf: negInf,\n  isInf: isInf,\n  isNan: isNaN,\n  isNaN: isNaN,\n  isFinite: isFinite,\n  // JS add-on\n  createUninitializedBounds: createUninitializedBounds,\n  getMajorAxisIndex: getMajorAxisIndex,\n  floatToHex2: floatToHex2,\n  floatRGB2HexCode: floatRGB2HexCode,\n  float2CssRGBA: float2CssRGBA\n};\n\nvar vtkMath$1 = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  Pi: Pi,\n  radiansFromDegrees: radiansFromDegrees,\n  degreesFromRadians: degreesFromRadians,\n  round: round,\n  floor: floor,\n  ceil: ceil,\n  min: min,\n  max: max,\n  arrayMin: arrayMin,\n  arrayMax: arrayMax,\n  arrayRange: arrayRange,\n  ceilLog2: ceilLog2,\n  factorial: factorial,\n  nearestPowerOfTwo: nearestPowerOfTwo,\n  isPowerOfTwo: isPowerOfTwo,\n  binomial: binomial,\n  beginCombination: beginCombination,\n  nextCombination: nextCombination,\n  randomSeed: randomSeed,\n  getSeed: getSeed,\n  random: random,\n  gaussian: gaussian,\n  add: add,\n  subtract: subtract,\n  multiplyScalar: multiplyScalar,\n  multiplyScalar2D: multiplyScalar2D,\n  multiplyAccumulate: multiplyAccumulate,\n  multiplyAccumulate2D: multiplyAccumulate2D,\n  dot: dot,\n  outer: outer,\n  cross: cross,\n  norm: norm,\n  normalize: normalize,\n  perpendiculars: perpendiculars,\n  projectVector: projectVector,\n  dot2D: dot2D,\n  projectVector2D: projectVector2D,\n  distance2BetweenPoints: distance2BetweenPoints,\n  angleBetweenVectors: angleBetweenVectors,\n  signedAngleBetweenVectors: signedAngleBetweenVectors,\n  gaussianAmplitude: gaussianAmplitude,\n  gaussianWeight: gaussianWeight,\n  outer2D: outer2D,\n  norm2D: norm2D,\n  normalize2D: normalize2D,\n  determinant2x2: determinant2x2,\n  LUFactor3x3: LUFactor3x3,\n  LUSolve3x3: LUSolve3x3,\n  linearSolve3x3: linearSolve3x3,\n  multiply3x3_vect3: multiply3x3_vect3,\n  multiply3x3_mat3: multiply3x3_mat3,\n  multiplyMatrix: multiplyMatrix,\n  transpose3x3: transpose3x3,\n  invert3x3: invert3x3,\n  identity3x3: identity3x3,\n  determinant3x3: determinant3x3,\n  quaternionToMatrix3x3: quaternionToMatrix3x3,\n  areEquals: areEquals,\n  areMatricesEqual: areMatricesEqual,\n  roundNumber: roundNumber,\n  roundVector: roundVector,\n  jacobiN: jacobiN,\n  matrix3x3ToQuaternion: matrix3x3ToQuaternion,\n  multiplyQuaternion: multiplyQuaternion,\n  orthogonalize3x3: orthogonalize3x3,\n  diagonalize3x3: diagonalize3x3,\n  singularValueDecomposition3x3: singularValueDecomposition3x3,\n  luFactorLinearSystem: luFactorLinearSystem,\n  luSolveLinearSystem: luSolveLinearSystem,\n  solveLinearSystem: solveLinearSystem,\n  invertMatrix: invertMatrix,\n  estimateMatrixCondition: estimateMatrixCondition,\n  jacobi: jacobi,\n  solveHomogeneousLeastSquares: solveHomogeneousLeastSquares,\n  solveLeastSquares: solveLeastSquares,\n  hex2float: hex2float,\n  rgb2hsv: rgb2hsv,\n  hsv2rgb: hsv2rgb,\n  lab2xyz: lab2xyz,\n  xyz2lab: xyz2lab,\n  xyz2rgb: xyz2rgb,\n  rgb2xyz: rgb2xyz,\n  rgb2lab: rgb2lab,\n  lab2rgb: lab2rgb,\n  uninitializeBounds: uninitializeBounds,\n  areBoundsInitialized: areBoundsInitialized,\n  computeBoundsFromPoints: computeBoundsFromPoints,\n  clampValue: clampValue,\n  clampVector: clampVector,\n  clampAndNormalizeValue: clampAndNormalizeValue,\n  getScalarTypeFittingRange: getScalarTypeFittingRange,\n  getAdjustedScalarRange: getAdjustedScalarRange,\n  extentIsWithinOtherExtent: extentIsWithinOtherExtent,\n  boundsIsWithinOtherBounds: boundsIsWithinOtherBounds,\n  pointIsWithinBounds: pointIsWithinBounds,\n  solve3PointCircle: solve3PointCircle,\n  inf: inf,\n  negInf: negInf,\n  isInf: isInf,\n  isFinite: isFinite,\n  isNaN: isNaN,\n  isNan: isNan,\n  createUninitializedBounds: createUninitializedBounds,\n  getMajorAxisIndex: getMajorAxisIndex,\n  floatToHex2: floatToHex2,\n  floatRGB2HexCode: floatRGB2HexCode,\n  float2CssRGBA: float2CssRGBA,\n  'default': vtkMath\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/Core/Math/index.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/Core/Points.js":
/*!************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/Core/Points.js ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _DataArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DataArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n/* harmony import */ var _DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DataArray/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray/Constants.js\");\n\n\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.vtkErrorMacro;\nvar INVALID_BOUNDS = [1, -1, 1, -1, 1, -1]; // ----------------------------------------------------------------------------\n// vtkPoints methods\n// ----------------------------------------------------------------------------\n\nfunction vtkPoints(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkPoints'); // Forwarding methods\n\n  publicAPI.getNumberOfPoints = publicAPI.getNumberOfTuples;\n\n  publicAPI.setNumberOfPoints = function (nbPoints) {\n    var dimension = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n\n    if (publicAPI.getNumberOfPoints() !== nbPoints) {\n      model.size = nbPoints * dimension;\n      model.values = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newTypedArray(model.dataType, model.size);\n      publicAPI.setNumberOfComponents(dimension);\n      publicAPI.modified();\n    }\n  };\n\n  publicAPI.setPoint = function (idx) {\n    var offset = idx * model.numberOfComponents;\n\n    for (var i = 0; i < model.numberOfComponents; i++) {\n      model.values[offset + i] = i + 1 < 1 || arguments.length <= i + 1 ? undefined : arguments[i + 1];\n    }\n  };\n\n  publicAPI.getPoint = publicAPI.getTuple;\n\n  publicAPI.getBounds = function () {\n    if (publicAPI.getNumberOfComponents() === 3) {\n      var _xRange = publicAPI.getRange(0);\n\n      model.bounds[0] = _xRange[0];\n      model.bounds[1] = _xRange[1];\n\n      var _yRange = publicAPI.getRange(1);\n\n      model.bounds[2] = _yRange[0];\n      model.bounds[3] = _yRange[1];\n      var zRange = publicAPI.getRange(2);\n      model.bounds[4] = zRange[0];\n      model.bounds[5] = zRange[1];\n      return model.bounds;\n    }\n\n    if (publicAPI.getNumberOfComponents() !== 2) {\n      vtkErrorMacro(\"getBounds called on an array with components of\\n        \".concat(publicAPI.getNumberOfComponents()));\n      return INVALID_BOUNDS;\n    }\n\n    var xRange = publicAPI.getRange(0);\n    model.bounds[0] = xRange[0];\n    model.bounds[1] = xRange[1];\n    var yRange = publicAPI.getRange(1);\n    model.bounds[2] = yRange[0];\n    model.bounds[3] = yRange[1];\n    model.bounds[4] = 0;\n    model.bounds[5] = 0;\n    return model.bounds;\n  }; // Trigger the computation of bounds\n\n\n  publicAPI.computeBounds = publicAPI.getBounds; // Initialize\n\n  publicAPI.setNumberOfComponents(model.numberOfComponents < 2 ? 3 : model.numberOfComponents);\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  empty: true,\n  numberOfComponents: 3,\n  dataType: _DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_2__.VtkDataTypes.FLOAT,\n  bounds: [1, -1, 1, -1, 1, -1]\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues);\n  _DataArray_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues);\n  vtkPoints(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkPoints'); // ----------------------------------------------------------------------------\n\nvar vtkPoints$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkPoints$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/Core/Points.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/Core/ScalarsToColors.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/Core/ScalarsToColors.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _DataArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DataArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n/* harmony import */ var _ScalarsToColors_Constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ScalarsToColors/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/Core/ScalarsToColors/Constants.js\");\n/* harmony import */ var _Rendering_Core_Mapper_Constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Rendering/Core/Mapper/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/Constants.js\");\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\n\nvar ScalarMappingTarget = _ScalarsToColors_Constants_js__WEBPACK_IMPORTED_MODULE_3__.default.ScalarMappingTarget,\n    VectorMode = _ScalarsToColors_Constants_js__WEBPACK_IMPORTED_MODULE_3__.default.VectorMode;\nvar VtkDataTypes = _DataArray_js__WEBPACK_IMPORTED_MODULE_2__.default.VtkDataTypes;\nvar ColorMode = _Rendering_Core_Mapper_Constants_js__WEBPACK_IMPORTED_MODULE_4__.default.ColorMode;\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkErrorMacro; // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n// Add module-level functions or api that you want to expose statically via\n// the next section...\n// ----------------------------------------------------------------------------\n// Static API\n// ----------------------------------------------------------------------------\n\nfunction intColorToUChar(c) {\n  return c;\n}\n\nfunction floatColorToUChar(c) {\n  return Math.floor(c * 255.0 + 0.5);\n} // ----------------------------------------------------------------------------\n// vtkScalarsToColors methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkScalarsToColors(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkScalarsToColors');\n\n  publicAPI.setVectorModeToMagnitude = function () {\n    return publicAPI.setVectorMode(VectorMode.MAGNITUDE);\n  };\n\n  publicAPI.setVectorModeToComponent = function () {\n    return publicAPI.setVectorMode(VectorMode.COMPONENT);\n  };\n\n  publicAPI.setVectorModeToRGBColors = function () {\n    return publicAPI.setVectorMode(VectorMode.RGBCOLORS);\n  };\n\n  publicAPI.build = function () {};\n\n  publicAPI.isOpaque = function () {\n    return true;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.setAnnotations = function (values, annotations) {\n    if (values && !annotations || !values && annotations) {\n      return;\n    }\n\n    if (values && annotations && values.length !== annotations.length) {\n      vtkErrorMacro('Values and annotations do not have the same number of tuples so ignoring');\n      return;\n    }\n\n    model.annotationArray = [];\n\n    if (annotations && values) {\n      var num = annotations.length;\n\n      for (var i = 0; i < num; i++) {\n        model.annotationArray.push({\n          value: values[i],\n          annotation: String(annotations[i])\n        });\n      }\n    }\n\n    publicAPI.updateAnnotatedValueMap();\n    publicAPI.modified();\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.setAnnotation = function (value, annotation) {\n    var i = publicAPI.checkForAnnotatedValue(value);\n    var modified = false;\n\n    if (i >= 0) {\n      if (model.annotationArray[i].annotation !== annotation) {\n        model.annotationArray[i].annotation = annotation;\n        modified = true;\n      }\n    } else {\n      model.annotationArray.push({\n        value: value,\n        annotation: annotation\n      });\n      i = model.annotationArray.length - 1;\n      modified = true;\n    }\n\n    if (modified) {\n      publicAPI.updateAnnotatedValueMap();\n      publicAPI.modified();\n    }\n\n    return i;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getNumberOfAnnotatedValues = function () {\n    return model.annotationArray.length;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getAnnotatedValue = function (idx) {\n    if (idx < 0 || idx >= model.annotationArray.length) {\n      return null;\n    }\n\n    return model.annotationArray[idx].value;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getAnnotation = function (idx) {\n    if (model.annotationArray[idx] === undefined) {\n      return null;\n    }\n\n    return model.annotationArray[idx].annotation;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getAnnotatedValueIndex = function (val) {\n    return model.annotationArray.length ? publicAPI.checkForAnnotatedValue(val) : -1;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.removeAnnotation = function (value) {\n    var i = publicAPI.checkForAnnotatedValue(value);\n    var needToRemove = i >= 0;\n\n    if (needToRemove) {\n      model.annotationArray.splice(i, 1);\n      publicAPI.updateAnnotatedValueMap();\n      publicAPI.modified();\n    }\n\n    return needToRemove;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.resetAnnotations = function () {\n    model.annotationArray = [];\n    model.annotatedValueMap = [];\n    publicAPI.modified();\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getAnnotationColor = function (val, rgba) {\n    if (model.indexedLookup) {\n      var i = publicAPI.getAnnotatedValueIndex(val);\n      publicAPI.getIndexedColor(i, rgba);\n    } else {\n      publicAPI.getColor(parseFloat(val), rgba);\n      rgba[3] = 1.0;\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.checkForAnnotatedValue = function (value) {\n    return publicAPI.getAnnotatedValueIndexInternal(value);\n  }; //----------------------------------------------------------------------------\n  // An unsafe version of vtkScalarsToColors::CheckForAnnotatedValue for\n  // internal use (no pointer checks performed)\n\n\n  publicAPI.getAnnotatedValueIndexInternal = function (value) {\n    if (model.annotatedValueMap[value] !== undefined) {\n      var na = model.annotationArray.length;\n      return model.annotatedValueMap[value] % na;\n    } // Treat as a NaN\n\n\n    return -1;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getIndexedColor = function (val, rgba) {\n    rgba[0] = 0.0;\n    rgba[1] = 0.0;\n    rgba[2] = 0.0;\n    rgba[3] = 0.0;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.updateAnnotatedValueMap = function () {\n    model.annotatedValueMap = [];\n    var na = model.annotationArray.length;\n\n    for (var i = 0; i < na; i++) {\n      model.annotatedValueMap[model.annotationArray[i].value] = i;\n    }\n  }; // Description:\n  // Internal methods that map a data array into a 4-component,\n  // unsigned char RGBA array. The color mode determines the behavior\n  // of mapping. If ColorMode.DEFAULT is set, then unsigned char\n  // data arrays are treated as colors (and converted to RGBA if\n  // necessary); If ColorMode.DIRECT_SCALARS is set, then all arrays\n  // are treated as colors (integer types are clamped in the range 0-255,\n  // floating point arrays are clamped in the range 0.0-1.0. Note 'char' does\n  // not have enough values to represent a color so mapping this type is\n  // considered an error);\n  // otherwise, the data is mapped through this instance\n  // of ScalarsToColors. The component argument is used for data\n  // arrays with more than one component; it indicates which component\n  // to use to do the blending.  When the component argument is -1,\n  // then the this object uses its own selected technique to change a\n  // vector into a scalar to map.\n\n\n  publicAPI.mapScalars = function (scalars, colorMode, componentIn) {\n    var numberOfComponents = scalars.getNumberOfComponents();\n    var newColors = null; // map scalars through lookup table only if needed\n\n    if (colorMode === ColorMode.DEFAULT && scalars.getDataType() === VtkDataTypes.UNSIGNED_CHAR || colorMode === ColorMode.DIRECT_SCALARS && scalars) {\n      newColors = publicAPI.convertToRGBA(scalars, numberOfComponents, scalars.getNumberOfTuples());\n    } else {\n      var newscalars = {\n        type: 'vtkDataArray',\n        name: 'temp',\n        numberOfComponents: 4,\n        dataType: VtkDataTypes.UNSIGNED_CHAR\n      };\n      var s = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newTypedArray(newscalars.dataType, 4 * scalars.getNumberOfTuples());\n      newscalars.values = s;\n      newscalars.size = s.length;\n      newColors = _DataArray_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance(newscalars);\n      var component = componentIn; // If mapper did not specify a component, use the VectorMode\n\n      if (component < 0 && numberOfComponents > 1) {\n        publicAPI.mapVectorsThroughTable(scalars, newColors, ScalarMappingTarget.RGBA, -1, -1);\n      } else {\n        if (component < 0) {\n          component = 0;\n        }\n\n        if (component >= numberOfComponents) {\n          component = numberOfComponents - 1;\n        } // Map the scalars to colors\n\n\n        publicAPI.mapScalarsThroughTable(scalars, newColors, ScalarMappingTarget.RGBA, component);\n      }\n    }\n\n    return newColors;\n  };\n\n  publicAPI.mapVectorsToMagnitude = function (input, output, compsToUse) {\n    var length = input.getNumberOfTuples();\n    var inIncr = input.getNumberOfComponents();\n    var outputV = output.getData();\n    var inputV = input.getData();\n\n    for (var i = 0; i < length; i++) {\n      var sum = 0.0;\n\n      for (var j = 0; j < compsToUse; j++) {\n        sum += inputV[i * inIncr + j] * inputV[i * inIncr + j];\n      }\n\n      outputV[i] = Math.sqrt(sum);\n    }\n  }; //----------------------------------------------------------------------------\n  // Map a set of vector values through the table\n\n\n  publicAPI.mapVectorsThroughTable = function (input, output, outputFormat, vectorComponentIn, vectorSizeIn) {\n    var vectorMode = publicAPI.getVectorMode();\n    var vectorSize = vectorSizeIn;\n    var vectorComponent = vectorComponentIn;\n    var inComponents = input.getNumberOfComponents();\n\n    if (vectorMode === VectorMode.COMPONENT) {\n      // make sure vectorComponent is within allowed range\n      if (vectorComponent === -1) {\n        // if set to -1, use default value provided by table\n        vectorComponent = publicAPI.getVectorComponent();\n      }\n\n      if (vectorComponent < 0) {\n        vectorComponent = 0;\n      }\n\n      if (vectorComponent >= inComponents) {\n        vectorComponent = inComponents - 1;\n      }\n    } else {\n      // make sure vectorSize is within allowed range\n      if (vectorSize === -1) {\n        // if set to -1, use default value provided by table\n        vectorSize = publicAPI.getVectorSize();\n      }\n\n      if (vectorSize <= 0) {\n        vectorComponent = 0;\n        vectorSize = inComponents;\n      } else {\n        if (vectorComponent < 0) {\n          vectorComponent = 0;\n        }\n\n        if (vectorComponent >= inComponents) {\n          vectorComponent = inComponents - 1;\n        }\n\n        if (vectorComponent + vectorSize > inComponents) {\n          vectorSize = inComponents - vectorComponent;\n        }\n      }\n\n      if (vectorMode === VectorMode.MAGNITUDE && (inComponents === 1 || vectorSize === 1)) {\n        vectorMode = VectorMode.COMPONENT;\n      }\n    } // increment input pointer to the first component to map\n\n\n    var inputOffset = 0;\n\n    if (vectorComponent > 0) {\n      inputOffset = vectorComponent;\n    } // map according to the current vector mode\n\n\n    switch (vectorMode) {\n      case VectorMode.COMPONENT:\n        {\n          publicAPI.mapScalarsThroughTable(input, output, outputFormat, inputOffset);\n          break;\n        }\n\n      default:\n      case VectorMode.MAGNITUDE:\n        {\n          var magValues = _DataArray_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance({\n            numberOfComponents: 1,\n            values: new Float32Array(input.getNumberOfTuples())\n          });\n          publicAPI.mapVectorsToMagnitude(input, magValues, vectorSize);\n          publicAPI.mapScalarsThroughTable(magValues, output, outputFormat, 0);\n          break;\n        }\n\n      case VectorMode.RGBCOLORS:\n        {\n          // publicAPI.mapColorsToColors(\n          //   input, output, inComponents, vectorSize,\n          //   outputFormat);\n          break;\n        }\n    }\n  };\n\n  publicAPI.luminanceToRGBA = function (newColors, colors, alpha, convtFun) {\n    var a = convtFun(alpha);\n    var values = colors.getData();\n    var newValues = newColors.getData();\n    var size = values.length;\n    var component = 0;\n    var tuple = 1;\n    var count = 0;\n\n    for (var i = component; i < size; i += tuple) {\n      var l = convtFun(values[i]);\n      newValues[count * 4] = l;\n      newValues[count * 4 + 1] = l;\n      newValues[count * 4 + 2] = l;\n      newValues[count * 4 + 3] = a;\n      count++;\n    }\n  };\n\n  publicAPI.luminanceAlphaToRGBA = function (newColors, colors, alpha, convtFun) {\n    var values = colors.getData();\n    var newValues = newColors.getData();\n    var size = values.length;\n    var component = 0;\n    var tuple = 2;\n    var count = 0;\n\n    for (var i = component; i < size; i += tuple) {\n      var l = convtFun(values[i]);\n      newValues[count] = l;\n      newValues[count + 1] = l;\n      newValues[count + 2] = l;\n      newValues[count + 3] = convtFun(values[i + 1]) * alpha;\n      count += 4;\n    }\n  };\n\n  publicAPI.rGBToRGBA = function (newColors, colors, alpha, convtFun) {\n    var a = floatColorToUChar(alpha);\n    var values = colors.getData();\n    var newValues = newColors.getData();\n    var size = values.length;\n    var component = 0;\n    var tuple = 3;\n    var count = 0;\n\n    for (var i = component; i < size; i += tuple) {\n      newValues[count * 4] = convtFun(values[i]);\n      newValues[count * 4 + 1] = convtFun(values[i + 1]);\n      newValues[count * 4 + 2] = convtFun(values[i + 2]);\n      newValues[count * 4 + 3] = a;\n      count++;\n    }\n  };\n\n  publicAPI.rGBAToRGBA = function (newColors, colors, alpha, convtFun) {\n    var values = colors.getData();\n    var newValues = newColors.getData();\n    var size = values.length;\n    var component = 0;\n    var tuple = 4;\n    var count = 0;\n\n    for (var i = component; i < size; i += tuple) {\n      newValues[count * 4] = convtFun(values[i]);\n      newValues[count * 4 + 1] = convtFun(values[i + 1]);\n      newValues[count * 4 + 2] = convtFun(values[i + 2]);\n      newValues[count * 4 + 3] = convtFun(values[i + 3]) * alpha;\n      count++;\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.convertToRGBA = function (colors, numComp, numTuples) {\n    var alpha = model.alpha;\n\n    if (numComp === 4 && alpha >= 1.0 && colors.getDataType() === VtkDataTypes.UNSIGNED_CHAR) {\n      return colors;\n    }\n\n    var newColors = _DataArray_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance({\n      numberOfComponents: 4,\n      empty: true,\n      size: 4 * numTuples,\n      dataType: VtkDataTypes.UNSIGNED_CHAR\n    });\n\n    if (numTuples <= 0) {\n      return newColors;\n    }\n\n    alpha = alpha > 0 ? alpha : 0;\n    alpha = alpha < 1 ? alpha : 1;\n    var convtFun = intColorToUChar;\n\n    if (colors.getDataType() === VtkDataTypes.FLOAT || colors.getDataType() === VtkDataTypes.DOUBLE) {\n      convtFun = floatColorToUChar;\n    }\n\n    switch (numComp) {\n      case 1:\n        publicAPI.luminanceToRGBA(newColors, colors, alpha, convtFun);\n        break;\n\n      case 2:\n        publicAPI.luminanceAlphaToRGBA(newColors, colors, convtFun);\n        break;\n\n      case 3:\n        publicAPI.rGBToRGBA(newColors, colors, alpha, convtFun);\n        break;\n\n      case 4:\n        publicAPI.rGBAToRGBA(newColors, colors, alpha, convtFun);\n        break;\n\n      default:\n        vtkErrorMacro('Cannot convert colors');\n        return null;\n    }\n\n    return newColors;\n  };\n\n  publicAPI.usingLogScale = function () {\n    return false;\n  };\n\n  publicAPI.getNumberOfAvailableColors = function () {\n    return 256 * 256 * 256;\n  };\n\n  publicAPI.setRange = function (min, max) {\n    return publicAPI.setMappingRange(min, max);\n  };\n\n  publicAPI.getRange = function (min, max) {\n    return publicAPI.getMappingRange();\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  alpha: 1.0,\n  vectorComponent: 0,\n  vectorSize: -1,\n  vectorMode: VectorMode.COMPONENT,\n  mappingRange: null,\n  annotationArray: null,\n  annotatedValueMap: null,\n  indexedLookup: false\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  model.mappingRange = [0, 255];\n  model.annotationArray = [];\n  model.annotatedValueMap = []; // Create get-set macros\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['vectorSize', 'vectorComponent', 'vectorMode', 'alpha', 'indexedLookup']); // Create set macros for array (needs to know size)\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setArray(publicAPI, model, ['mappingRange'], 2); // Create get macros for array\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.getArray(publicAPI, model, ['mappingRange']); // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkScalarsToColors(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkScalarsToColors'); // ----------------------------------------------------------------------------\n\nvar vtkScalarsToColors$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, _ScalarsToColors_Constants_js__WEBPACK_IMPORTED_MODULE_3__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkScalarsToColors$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/Core/ScalarsToColors.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/Core/ScalarsToColors/Constants.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/Core/ScalarsToColors/Constants.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"ScalarMappingTarget\": () => (/* binding */ ScalarMappingTarget),\n/* harmony export */   \"VectorMode\": () => (/* binding */ VectorMode)\n/* harmony export */ });\nvar VectorMode = {\n  MAGNITUDE: 0,\n  COMPONENT: 1,\n  RGBCOLORS: 2\n};\nvar ScalarMappingTarget = {\n  LUMINANCE: 1,\n  LUMINANCE_ALPHA: 2,\n  RGB: 3,\n  RGBA: 4\n};\nvar vtkScalarsToColors = {\n  VectorMode: VectorMode,\n  ScalarMappingTarget: ScalarMappingTarget\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkScalarsToColors);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/Core/ScalarsToColors/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/Core/URLExtract.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/Core/URLExtract.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n\n\nfunction identity(i) {\n  return i;\n}\n\nfunction toNativeType(str) {\n  if (str === null || str === 'null') {\n    return null;\n  }\n\n  if (str === 'true') {\n    return true;\n  }\n\n  if (str === 'false') {\n    return false;\n  }\n\n  if (str === undefined || str === 'undefined') {\n    return undefined;\n  }\n\n  if (str[0] === '[' && str[str.length - 1] === ']') {\n    return str.substring(1, str.length - 1).split(',').map(function (s) {\n      return toNativeType(s.trim());\n    });\n  }\n\n  if (str === '' || Number.isNaN(Number(str))) {\n    return str;\n  }\n\n  return Number(str);\n}\n\nfunction extractURLParameters() {\n  var castToNativeType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n  var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.search;\n  var summary = {};\n  var convert = castToNativeType ? toNativeType : identity;\n  var queryTokens = (query || '').replace(/#.*/, '') // remove hash query\n  .replace('?', '') // Remove ? from the head\n  .split('&'); // extract token pair\n\n  queryTokens.forEach(function (token) {\n    var _token$split$map = token.split('=').map(function (s) {\n      return decodeURIComponent(s);\n    }),\n        _token$split$map2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(_token$split$map, 2),\n        key = _token$split$map2[0],\n        value = _token$split$map2[1];\n\n    if (key) {\n      summary[key] = value ? convert(value) : true;\n    }\n  });\n  return summary;\n}\n\nvar vtkURLExtract = {\n  toNativeType: toNativeType,\n  extractURLParameters: extractURLParameters\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkURLExtract);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/Core/URLExtract.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/BoundingBox.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/BoundingBox.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"STATIC\": () => (/* binding */ STATIC),\n/* harmony export */   \"addBounds\": () => (/* binding */ _addBounds),\n/* harmony export */   \"addPoint\": () => (/* binding */ _addPoint),\n/* harmony export */   \"computeCornerPoints\": () => (/* binding */ _computeCornerPoints),\n/* harmony export */   \"computeLocalBounds\": () => (/* binding */ _computeLocalBounds),\n/* harmony export */   \"computeScale3\": () => (/* binding */ _computeScale),\n/* harmony export */   \"contains\": () => (/* binding */ contains),\n/* harmony export */   \"containsPoint\": () => (/* binding */ _containsPoint),\n/* harmony export */   \"cutWithPlane\": () => (/* binding */ _cutWithPlane),\n/* harmony export */   \"equals\": () => (/* binding */ _equals),\n/* harmony export */   \"getCenter\": () => (/* binding */ _getCenter),\n/* harmony export */   \"getCorners\": () => (/* binding */ _getCorners),\n/* harmony export */   \"getDiagonalLength\": () => (/* binding */ _getDiagonalLength),\n/* harmony export */   \"getLength\": () => (/* binding */ _getLength),\n/* harmony export */   \"getLengths\": () => (/* binding */ _getLengths),\n/* harmony export */   \"getMaxLength\": () => (/* binding */ _getMaxLength),\n/* harmony export */   \"getMaxPoint\": () => (/* binding */ _getMaxPoint),\n/* harmony export */   \"getMinPoint\": () => (/* binding */ _getMinPoint),\n/* harmony export */   \"getXRange\": () => (/* binding */ _getXRange),\n/* harmony export */   \"getYRange\": () => (/* binding */ _getYRange),\n/* harmony export */   \"getZRange\": () => (/* binding */ _getZRange),\n/* harmony export */   \"inflate\": () => (/* binding */ _inflate),\n/* harmony export */   \"intersect\": () => (/* binding */ _intersect),\n/* harmony export */   \"intersectBox\": () => (/* binding */ _intersectBox),\n/* harmony export */   \"intersectPlane\": () => (/* binding */ _intersectPlane),\n/* harmony export */   \"intersects\": () => (/* binding */ _intersects),\n/* harmony export */   \"isValid\": () => (/* binding */ _isValid),\n/* harmony export */   \"reset\": () => (/* binding */ _reset),\n/* harmony export */   \"scale\": () => (/* binding */ _scale),\n/* harmony export */   \"setBounds\": () => (/* binding */ _setBounds),\n/* harmony export */   \"setMaxPoint\": () => (/* binding */ _setMaxPoint),\n/* harmony export */   \"setMinPoint\": () => (/* binding */ _setMinPoint)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _Core_Math_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _Plane_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Plane.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/Plane.js\");\n\n\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar INIT_BOUNDS = [Number.MAX_VALUE, -Number.MAX_VALUE, // X\nNumber.MAX_VALUE, -Number.MAX_VALUE, // Y\nNumber.MAX_VALUE, -Number.MAX_VALUE // Z\n]; // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n\nfunction _equals(a, b) {\n  return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5];\n}\n\nfunction _isValid(bounds) {\n  return bounds[0] <= bounds[1] && bounds[2] <= bounds[3] && bounds[4] <= bounds[5];\n}\n\nfunction _setBounds(bounds, otherBounds) {\n  bounds[0] = otherBounds[0];\n  bounds[1] = otherBounds[1];\n  bounds[2] = otherBounds[2];\n  bounds[3] = otherBounds[3];\n  bounds[4] = otherBounds[4];\n  bounds[5] = otherBounds[5];\n  return bounds;\n}\n\nfunction _reset(bounds) {\n  return _setBounds(bounds, INIT_BOUNDS);\n}\n\nfunction _addPoint(bounds) {\n  var _bounds = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__.default)(bounds, 6),\n      xMin = _bounds[0],\n      xMax = _bounds[1],\n      yMin = _bounds[2],\n      yMax = _bounds[3],\n      zMin = _bounds[4],\n      zMax = _bounds[5];\n\n  bounds[0] = xMin < (arguments.length <= 1 ? undefined : arguments[1]) ? xMin : arguments.length <= 1 ? undefined : arguments[1];\n  bounds[1] = xMax > (arguments.length <= 1 ? undefined : arguments[1]) ? xMax : arguments.length <= 1 ? undefined : arguments[1];\n  bounds[2] = yMin < (arguments.length <= 2 ? undefined : arguments[2]) ? yMin : arguments.length <= 2 ? undefined : arguments[2];\n  bounds[3] = yMax > (arguments.length <= 2 ? undefined : arguments[2]) ? yMax : arguments.length <= 2 ? undefined : arguments[2];\n  bounds[4] = zMin < (arguments.length <= 3 ? undefined : arguments[3]) ? zMin : arguments.length <= 3 ? undefined : arguments[3];\n  bounds[5] = zMax > (arguments.length <= 3 ? undefined : arguments[3]) ? zMax : arguments.length <= 3 ? undefined : arguments[3];\n}\n\nfunction _addBounds(bounds, xMin, xMax, yMin, yMax, zMin, zMax) {\n  var _bounds2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__.default)(bounds, 6),\n      _xMin = _bounds2[0],\n      _xMax = _bounds2[1],\n      _yMin = _bounds2[2],\n      _yMax = _bounds2[3],\n      _zMin = _bounds2[4],\n      _zMax = _bounds2[5];\n\n  if (zMax === undefined) {\n    bounds[0] = Math.min(xMin[0], _xMin);\n    bounds[1] = Math.max(xMin[1], _xMax);\n    bounds[2] = Math.min(xMin[2], _yMin);\n    bounds[3] = Math.max(xMin[3], _yMax);\n    bounds[4] = Math.min(xMin[4], _zMin);\n    bounds[5] = Math.max(xMin[5], _zMax);\n  } else {\n    bounds[0] = Math.min(xMin, _xMin);\n    bounds[1] = Math.max(xMax, _xMax);\n    bounds[2] = Math.min(yMin, _yMin);\n    bounds[3] = Math.max(yMax, _yMax);\n    bounds[4] = Math.min(zMin, _zMin);\n    bounds[5] = Math.max(zMax, _zMax);\n  }\n}\n\nfunction _setMinPoint(bounds, x, y, z) {\n  var _bounds3 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__.default)(bounds, 6),\n      xMin = _bounds3[0],\n      xMax = _bounds3[1],\n      yMin = _bounds3[2],\n      yMax = _bounds3[3],\n      zMin = _bounds3[4],\n      zMax = _bounds3[5];\n\n  bounds[0] = x;\n  bounds[1] = x > xMax ? x : xMax;\n  bounds[2] = y;\n  bounds[3] = y > yMax ? y : yMax;\n  bounds[4] = z;\n  bounds[5] = z > zMax ? z : zMax;\n  return xMin !== x || yMin !== y || zMin !== z;\n}\n\nfunction _setMaxPoint(bounds, x, y, z) {\n  var _bounds4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__.default)(bounds, 6),\n      xMin = _bounds4[0],\n      xMax = _bounds4[1],\n      yMin = _bounds4[2],\n      yMax = _bounds4[3],\n      zMin = _bounds4[4],\n      zMax = _bounds4[5];\n\n  bounds[0] = x < xMin ? x : xMin;\n  bounds[1] = x;\n  bounds[2] = y < yMin ? y : yMin;\n  bounds[3] = y;\n  bounds[4] = z < zMin ? z : zMin;\n  bounds[5] = z;\n  return xMax !== x || yMax !== y || zMax !== z;\n}\n\nfunction _inflate(bounds, delta) {\n  bounds[0] -= delta;\n  bounds[1] += delta;\n  bounds[2] -= delta;\n  bounds[3] += delta;\n  bounds[4] -= delta;\n  bounds[5] += delta;\n}\n\nfunction _scale(bounds, sx, sy, sz) {\n  if (!_isValid(bounds)) {\n    return false;\n  }\n\n  if (sx >= 0.0) {\n    bounds[0] *= sx;\n    bounds[1] *= sx;\n  } else {\n    bounds[0] = sx * bounds[1];\n    bounds[1] = sx * bounds[0];\n  }\n\n  if (sy >= 0.0) {\n    bounds[2] *= sy;\n    bounds[3] *= sy;\n  } else {\n    bounds[2] = sy * bounds[3];\n    bounds[3] = sy * bounds[2];\n  }\n\n  if (sz >= 0.0) {\n    bounds[4] *= sz;\n    bounds[5] *= sz;\n  } else {\n    bounds[4] = sz * bounds[5];\n    bounds[5] = sz * bounds[4];\n  }\n\n  return true;\n}\n\nfunction _getCenter(bounds) {\n  return [0.5 * (bounds[0] + bounds[1]), 0.5 * (bounds[2] + bounds[3]), 0.5 * (bounds[4] + bounds[5])];\n}\n\nfunction _getLength(bounds, index) {\n  return bounds[index * 2 + 1] - bounds[index * 2];\n}\n\nfunction _getLengths(bounds) {\n  return [_getLength(bounds, 0), _getLength(bounds, 1), _getLength(bounds, 2)];\n}\n\nfunction _getXRange(bounds) {\n  return bounds.slice(0, 2);\n}\n\nfunction _getYRange(bounds) {\n  return bounds.slice(2, 4);\n}\n\nfunction _getZRange(bounds) {\n  return bounds.slice(4, 6);\n}\n\nfunction _getMaxLength(bounds) {\n  var l = _getLengths(bounds);\n\n  if (l[0] > l[1]) {\n    if (l[0] > l[2]) {\n      return l[0];\n    }\n\n    return l[2];\n  }\n\n  if (l[1] > l[2]) {\n    return l[1];\n  }\n\n  return l[2];\n}\n\nfunction _getDiagonalLength(bounds) {\n  if (_isValid(bounds)) {\n    var l = _getLengths(bounds);\n\n    return Math.sqrt(l[0] * l[0] + l[1] * l[1] + l[2] * l[2]);\n  }\n\n  return null;\n}\n\nfunction _getMinPoint(bounds) {\n  return [bounds[0], bounds[2], bounds[4]];\n}\n\nfunction _getMaxPoint(bounds) {\n  return [bounds[1], bounds[3], bounds[5]];\n}\n\nfunction oppositeSign(a, b) {\n  return a <= 0 && b >= 0 || a >= 0 && b <= 0;\n}\n\nfunction _getCorners(bounds, corners) {\n  var count = 0;\n\n  for (var ix = 0; ix < 2; ix++) {\n    for (var iy = 2; iy < 4; iy++) {\n      for (var iz = 4; iz < 6; iz++) {\n        corners[count] = [bounds[ix], bounds[iy], bounds[iz]];\n        count++;\n      }\n    }\n  }\n} // Computes the two corners with minimal and miximal coordinates\n\nfunction _computeCornerPoints(bounds, point1, point2) {\n  point1[0] = bounds[0];\n  point1[1] = bounds[2];\n  point1[2] = bounds[4];\n  point2[0] = bounds[1];\n  point2[1] = bounds[3];\n  point2[2] = bounds[5];\n}\n\nfunction _computeScale(bounds) {\n  var scale3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n  var center = _getCenter(bounds);\n\n  scale3[0] = bounds[1] - center[0];\n  scale3[1] = bounds[3] - center[1];\n  scale3[2] = bounds[5] - center[2];\n  return scale3;\n}\n\nfunction _computeLocalBounds(points, u, v, w) {\n  var bounds = [].concat(INIT_BOUNDS);\n  var pointsData = points.getData();\n\n  for (var i = 0; i < pointsData.length; i += 3) {\n    var point = [pointsData[i], pointsData[i + 1], pointsData[i + 2]];\n    var du = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_5__.d)(point, u);\n    bounds[0] = Math.min(du, bounds[0]);\n    bounds[1] = Math.max(du, bounds[1]);\n    var dv = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_5__.d)(point, v);\n    bounds[2] = Math.min(dv, bounds[2]);\n    bounds[3] = Math.max(dv, bounds[3]);\n    var dw = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_5__.d)(point, w);\n    bounds[4] = Math.min(dw, bounds[4]);\n    bounds[5] = Math.max(dw, bounds[5]);\n  }\n\n  return bounds;\n} // The method returns a non-zero value if the bounding box is hit.\n\nfunction _intersectBox(bounds, origin, dir, coord, tolerance) {\n  var inside = true;\n  var quadrant = [];\n  var whichPlane = 0;\n  var maxT = [];\n  var candidatePlane = [0.0, 0.0, 0.0];\n  var RIGHT = 0;\n  var LEFT = 1;\n  var MIDDLE = 2; // First find closest planes\n\n  for (var i = 0; i < 3; i++) {\n    if (origin[i] < bounds[2 * i]) {\n      quadrant[i] = LEFT;\n      candidatePlane[i] = bounds[2 * i];\n      inside = false;\n    } else if (origin[i] > bounds[2 * i + 1]) {\n      quadrant[i] = RIGHT;\n      candidatePlane[i] = bounds[2 * i + 1];\n      inside = false;\n    } else {\n      quadrant[i] = MIDDLE;\n    }\n  } // Check whether origin of ray is inside bbox\n\n\n  if (inside) {\n    coord[0] = origin[0];\n    coord[1] = origin[1];\n    coord[2] = origin[2];\n    tolerance[0] = 0;\n    return 1;\n  } // Calculate parametric distance to plane\n\n\n  for (var _i = 0; _i < 3; _i++) {\n    if (quadrant[_i] !== MIDDLE && dir[_i] !== 0.0) {\n      maxT[_i] = (candidatePlane[_i] - origin[_i]) / dir[_i];\n    } else {\n      maxT[_i] = -1.0;\n    }\n  } // Find the largest parametric value of intersection\n\n\n  for (var _i2 = 0; _i2 < 3; _i2++) {\n    if (maxT[whichPlane] < maxT[_i2]) {\n      whichPlane = _i2;\n    }\n  } // Check for valie intersection along line\n\n\n  if (maxT[whichPlane] > 1.0 || maxT[whichPlane] < 0.0) {\n    return 0;\n  }\n\n  tolerance[0] = maxT[whichPlane]; // Intersection point along line is okay. Check bbox.\n\n  for (var _i3 = 0; _i3 < 3; _i3++) {\n    if (whichPlane !== _i3) {\n      coord[_i3] = origin[_i3] + maxT[whichPlane] * dir[_i3];\n\n      if (coord[_i3] < bounds[2 * _i3] || coord[_i3] > bounds[2 * _i3 + 1]) {\n        return 0;\n      }\n    } else {\n      coord[_i3] = candidatePlane[_i3];\n    }\n  }\n\n  return 1;\n} // Plane intersection with box\n\nfunction _intersectPlane(bounds, origin, normal) {\n  var p = [];\n  var d = 0;\n  var sign = 1;\n  var firstOne = 1; // Evaluate the eight points. If there is a sign change, there is an intersection\n\n  for (var z = 4; z <= 5; ++z) {\n    p[2] = bounds[z];\n\n    for (var y = 2; y <= 3; ++y) {\n      p[1] = bounds[y];\n\n      for (var x = 0; x <= 1; ++x) {\n        p[0] = bounds[x];\n        d = _Plane_js__WEBPACK_IMPORTED_MODULE_6__.default.evaluate(normal, origin, p);\n\n        if (firstOne) {\n          sign = d >= 0 ? 1 : -1;\n          firstOne = 0;\n        }\n\n        if (d === 0.0 || sign > 0 && d < 0.0 || sign < 0 && d > 0.0) {\n          return 1;\n        }\n      }\n    }\n  }\n\n  return 0; // no intersection\n}\n\nfunction _intersect(bounds, bBounds) {\n  if (!(_isValid(bounds) && _isValid(bBounds))) {\n    return false;\n  }\n\n  var newBounds = [0, 0, 0, 0, 0, 0];\n  var intersection;\n\n  for (var i = 0; i < 3; i++) {\n    intersection = false;\n\n    if (bBounds[i * 2] >= bounds[i * 2] && bBounds[i * 2] <= bounds[i * 2 + 1]) {\n      intersection = true;\n      newBounds[i * 2] = bBounds[i * 2];\n    } else if (bounds[i * 2] >= bBounds[i * 2] && bounds[i * 2] <= bBounds[i * 2 + 1]) {\n      intersection = true;\n      newBounds[i * 2] = bounds[i * 2];\n    }\n\n    if (bBounds[i * 2 + 1] >= bounds[i * 2] && bBounds[i * 2 + 1] <= bounds[i * 2 + 1]) {\n      intersection = true;\n      newBounds[i * 2 + 1] = bBounds[2 * i + 1];\n    } else if (bounds[i * 2 + 1] >= bBounds[i * 2] && bounds[i * 2 + 1] <= bBounds[i * 2 + 1]) {\n      intersection = true;\n      newBounds[i * 2 + 1] = bounds[i * 2 + 1];\n    }\n\n    if (!intersection) {\n      return false;\n    }\n  } // OK they did intersect - set the box to be the result\n\n\n  bounds[0] = newBounds[0];\n  bounds[1] = newBounds[1];\n  bounds[2] = newBounds[2];\n  bounds[3] = newBounds[3];\n  bounds[4] = newBounds[4];\n  bounds[5] = newBounds[5];\n  return true;\n}\n\nfunction _intersects(bounds, bBounds) {\n  if (!(_isValid(bounds) && _isValid(bBounds))) {\n    return false;\n  }\n  /* eslint-disable no-continue */\n\n\n  for (var i = 0; i < 3; i++) {\n    if (bBounds[i * 2] >= bounds[i * 2] && bBounds[i * 2] <= bounds[i * 2 + 1]) {\n      continue;\n    } else if (bounds[i * 2] >= bBounds[i * 2] && bounds[i * 2] <= bBounds[i * 2 + 1]) {\n      continue;\n    }\n\n    if (bBounds[i * 2 + 1] >= bounds[i * 2] && bBounds[i * 2 + 1] <= bounds[i * 2 + 1]) {\n      continue;\n    } else if (bounds[i * 2 + 1] >= bBounds[i * 2] && bounds[i * 2 + 1] <= bBounds[i * 2 + 1]) {\n      continue;\n    }\n\n    return false;\n  }\n  /* eslint-enable no-continue */\n\n\n  return true;\n}\n\nfunction _containsPoint(bounds, x, y, z) {\n  if (x < bounds[0] || x > bounds[1]) {\n    return false;\n  }\n\n  if (y < bounds[2] || y > bounds[3]) {\n    return false;\n  }\n\n  if (z < bounds[4] || z > bounds[5]) {\n    return false;\n  }\n\n  return true;\n}\nfunction contains(bounds, otherBounds) {\n  // if either box is not valid or they don't intersect\n  if (!_intersects(bounds, otherBounds)) {\n    return false;\n  }\n\n  if (!_containsPoint.apply(void 0, [bounds].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__.default)(_getMinPoint(otherBounds))))) {\n    return false;\n  }\n\n  if (!_containsPoint.apply(void 0, [bounds].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__.default)(_getMaxPoint(otherBounds))))) {\n    return false;\n  }\n\n  return true;\n}\n/**\n * Returns true if plane intersects bounding box.\n * If so, the box is cut by the plane\n * @param {array} origin\n * @param {array} normal\n */\n\nfunction _cutWithPlane(bounds, origin, normal) {\n  // Index[0..2] represents the order of traversing the corners of a cube\n  // in (x,y,z), (y,x,z) and (z,x,y) ordering, respectively\n  var index = [[0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 4, 5, 2, 3, 6, 7], [0, 2, 4, 6, 1, 3, 5, 7]]; // stores the signed distance to a plane\n\n  var d = [0, 0, 0, 0, 0, 0, 0, 0];\n  var idx = 0;\n\n  for (var ix = 0; ix < 2; ix++) {\n    for (var iy = 2; iy < 4; iy++) {\n      for (var iz = 4; iz < 6; iz++) {\n        var x = [bounds[ix], bounds[iy], bounds[iz]];\n        d[idx++] = _Plane_js__WEBPACK_IMPORTED_MODULE_6__.default.evaluate(normal, origin, x);\n      }\n    }\n  }\n\n  var dir = 2;\n\n  while (dir--) {\n    // in each direction, we test if the vertices of two orthogonal faces\n    // are on either side of the plane\n    if (oppositeSign(d[index[dir][0]], d[index[dir][4]]) && oppositeSign(d[index[dir][1]], d[index[dir][5]]) && oppositeSign(d[index[dir][2]], d[index[dir][6]]) && oppositeSign(d[index[dir][3]], d[index[dir][7]])) {\n      break;\n    }\n  }\n\n  if (dir < 0) {\n    return false;\n  }\n\n  var sign = Math.sign(normal[dir]);\n  var size = Math.abs((bounds[dir * 2 + 1] - bounds[dir * 2]) * normal[dir]);\n  var t = sign > 0 ? 1 : 0;\n  /* eslint-disable no-continue */\n\n  for (var i = 0; i < 4; i++) {\n    if (size === 0) {\n      continue; // shouldn't happen\n    }\n\n    var ti = Math.abs(d[index[dir][i]]) / size;\n\n    if (sign > 0 && ti < t) {\n      t = ti;\n    }\n\n    if (sign < 0 && ti > t) {\n      t = ti;\n    }\n  }\n  /* eslint-enable no-continue */\n\n\n  var bound = (1.0 - t) * bounds[dir * 2] + t * bounds[dir * 2 + 1];\n\n  if (sign > 0) {\n    bounds[dir * 2] = bound;\n  } else {\n    bounds[dir * 2 + 1] = bound;\n  }\n\n  return true;\n} // ----------------------------------------------------------------------------\n\nvar BoundingBox = /*#__PURE__*/function () {\n  function BoundingBox(refBounds) {\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__.default)(this, BoundingBox);\n\n    this.bounds = refBounds;\n\n    if (!this.bounds) {\n      this.bounds = new Float64Array(6);\n\n      _setBounds(this.bounds, INIT_BOUNDS);\n    }\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__.default)(BoundingBox, [{\n    key: \"getBounds\",\n    value: function getBounds() {\n      return this.bounds;\n    }\n  }, {\n    key: \"equals\",\n    value: function equals(otherBounds) {\n      return _equals(this.bounds, otherBounds);\n    }\n  }, {\n    key: \"isValid\",\n    value: function isValid() {\n      return _isValid(this.bounds);\n    }\n  }, {\n    key: \"setBounds\",\n    value: function setBounds(otherBounds) {\n      return _setBounds(this.bounds, otherBounds);\n    }\n  }, {\n    key: \"reset\",\n    value: function reset() {\n      return _reset(this.bounds);\n    }\n  }, {\n    key: \"addPoint\",\n    value: function addPoint() {\n      for (var _len = arguments.length, xyz = new Array(_len), _key = 0; _key < _len; _key++) {\n        xyz[_key] = arguments[_key];\n      }\n\n      return _addPoint(this.bounds, xyz);\n    }\n  }, {\n    key: \"addBounds\",\n    value: function addBounds(xMin, xMax, yMin, yMax, zMin, zMax) {\n      return _addBounds(this.bounds, xMin, xMax, yMin, yMax, zMin, zMax);\n    }\n  }, {\n    key: \"setMinPoint\",\n    value: function setMinPoint(x, y, z) {\n      return _setMinPoint(this.bounds, x, y, z);\n    }\n  }, {\n    key: \"setMaxPoint\",\n    value: function setMaxPoint(x, y, z) {\n      return _setMaxPoint(this.bounds, x, y, z);\n    }\n  }, {\n    key: \"inflate\",\n    value: function inflate(delta) {\n      return _inflate(this.bounds, delta);\n    }\n  }, {\n    key: \"scale\",\n    value: function scale(sx, sy, sz) {\n      return _scale(this.bounds, sx, sy, sz);\n    }\n  }, {\n    key: \"getCenter\",\n    value: function getCenter() {\n      return _getCenter(this.bounds);\n    }\n  }, {\n    key: \"getLength\",\n    value: function getLength(index) {\n      return _getLength(this.bounds, index);\n    }\n  }, {\n    key: \"getLengths\",\n    value: function getLengths() {\n      return _getLengths(this.bounds);\n    }\n  }, {\n    key: \"getMaxLength\",\n    value: function getMaxLength() {\n      return _getMaxLength(this.bounds);\n    }\n  }, {\n    key: \"getDiagonalLength\",\n    value: function getDiagonalLength() {\n      return _getDiagonalLength(this.bounds);\n    }\n  }, {\n    key: \"getMinPoint\",\n    value: function getMinPoint() {\n      return _getMinPoint(this.bounds);\n    }\n  }, {\n    key: \"getMaxPoint\",\n    value: function getMaxPoint() {\n      return _getMaxPoint(this.bounds);\n    }\n  }, {\n    key: \"getXRange\",\n    value: function getXRange() {\n      return _getXRange(this.bounds);\n    }\n  }, {\n    key: \"getYRange\",\n    value: function getYRange() {\n      return _getYRange(this.bounds);\n    }\n  }, {\n    key: \"getZRange\",\n    value: function getZRange() {\n      return _getZRange(this.bounds);\n    }\n  }, {\n    key: \"getCorners\",\n    value: function getCorners(corners) {\n      return _getCorners(this.bounds, corners);\n    }\n  }, {\n    key: \"computeCornerPoints\",\n    value: function computeCornerPoints(point1, point2) {\n      return _computeCornerPoints(this.bounds, point1, point2);\n    }\n  }, {\n    key: \"computeLocalBounds\",\n    value: function computeLocalBounds(u, v, w) {\n      return _computeLocalBounds(this.bounds, u, v, w);\n    }\n  }, {\n    key: \"computeScale3\",\n    value: function computeScale3(scale3) {\n      return _computeScale(this.bounds, scale3);\n    }\n  }, {\n    key: \"cutWithPlane\",\n    value: function cutWithPlane(origin, normal) {\n      return _cutWithPlane(this.bounds, origin, normal);\n    }\n  }, {\n    key: \"intersectBox\",\n    value: function intersectBox(origin, dir, coord, tolerance) {\n      return _intersectBox(this.bounds, origin, dir, coord, tolerance);\n    }\n  }, {\n    key: \"intersectPlane\",\n    value: function intersectPlane(origin, normal) {\n      return _intersectPlane(this.bounds, origin, normal);\n    }\n  }, {\n    key: \"intersect\",\n    value: function intersect(otherBounds) {\n      return _intersect(this.bounds, otherBounds);\n    }\n  }, {\n    key: \"intersects\",\n    value: function intersects(otherBounds) {\n      return _intersects(this.bounds, otherBounds);\n    }\n  }, {\n    key: \"containsPoint\",\n    value: function containsPoint(x, y, z) {\n      return _containsPoint(this.bounds, x, y, z);\n    }\n  }, {\n    key: \"contains\",\n    value: function contains(otherBounds) {\n      return _intersects(this.bounds, otherBounds);\n    }\n  }]);\n\n  return BoundingBox;\n}();\n\nfunction newInstance(initialValues) {\n  var bounds = initialValues && initialValues.bounds;\n  return new BoundingBox(bounds);\n} // ----------------------------------------------------------------------------\n// Static API\n// ----------------------------------------------------------------------------\n\n\nvar STATIC = {\n  equals: _equals,\n  isValid: _isValid,\n  setBounds: _setBounds,\n  reset: _reset,\n  addPoint: _addPoint,\n  addBounds: _addBounds,\n  setMinPoint: _setMinPoint,\n  setMaxPoint: _setMaxPoint,\n  inflate: _inflate,\n  scale: _scale,\n  getCenter: _getCenter,\n  getLength: _getLength,\n  getLengths: _getLengths,\n  getMaxLength: _getMaxLength,\n  getDiagonalLength: _getDiagonalLength,\n  getMinPoint: _getMinPoint,\n  getMaxPoint: _getMaxPoint,\n  getXRange: _getXRange,\n  getYRange: _getYRange,\n  getZRange: _getZRange,\n  getCorners: _getCorners,\n  computeCornerPoints: _computeCornerPoints,\n  computeLocalBounds: _computeLocalBounds,\n  computeScale3: _computeScale,\n  cutWithPlane: _cutWithPlane,\n  intersectBox: _intersectBox,\n  intersectPlane: _intersectPlane,\n  intersect: _intersect,\n  intersects: _intersects,\n  containsPoint: _containsPoint,\n  contains: contains,\n  INIT_BOUNDS: INIT_BOUNDS\n};\nvar vtkBoundingBox = _objectSpread({\n  newInstance: newInstance\n}, STATIC);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkBoundingBox);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/BoundingBox.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/Cell.js":
/*!***************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/Cell.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _Core_Points_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Core/Points.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Points.js\");\n\n\n\n\n// vtkCell methods\n// ----------------------------------------------------------------------------\n\nfunction vtkCell(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkCell');\n\n  publicAPI.initialize = function (points) {\n    var pointIdsList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n    if (!pointIdsList) {\n      model.points = points;\n      model.pointsIds = new Array(points.getNumberOfPoints());\n\n      for (var i = points.getNumberOfPoints() - 1; i >= 0; --i) {\n        model.pointsIds[i] = i;\n      }\n    } else {\n      model.pointsIds = pointIdsList;\n      var triangleData = model.points.getData();\n\n      if (triangleData.length !== 3 * model.pointsIds.length) {\n        triangleData = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newTypedArray(points.getDataType(), 3 * model.pointsIds.length);\n      }\n\n      var pointsData = points.getData();\n      model.pointsIds.forEach(function (pointId, index) {\n        // const start = 3 * pointId;\n        // pointsData.set(p.subarray(start, start + 3), 3 * index);\n        var pointOffset = 3 * pointId;\n        var trianglePointOffset = 3 * index;\n        triangleData[trianglePointOffset] = pointsData[pointOffset];\n        triangleData[++trianglePointOffset] = pointsData[++pointOffset];\n        triangleData[++trianglePointOffset] = pointsData[++pointOffset];\n      });\n      model.points.setData(triangleData);\n    }\n  };\n\n  publicAPI.getBounds = function () {\n    var nbPoints = model.points.getNumberOfPoints();\n    var x = [];\n\n    if (nbPoints) {\n      model.points.getPoint(0, x);\n      model.bounds[0] = x[0];\n      model.bounds[1] = x[0];\n      model.bounds[2] = x[1];\n      model.bounds[3] = x[1];\n      model.bounds[4] = x[2];\n      model.bounds[5] = x[2];\n\n      for (var i = 1; i < nbPoints; i++) {\n        model.points.getPoint(i, x);\n        model.bounds[0] = x[0] < model.bounds[0] ? x[0] : model.bounds[0];\n        model.bounds[1] = x[0] > model.bounds[1] ? x[0] : model.bounds[1];\n        model.bounds[2] = x[1] < model.bounds[2] ? x[1] : model.bounds[2];\n        model.bounds[3] = x[1] > model.bounds[3] ? x[1] : model.bounds[3];\n        model.bounds[4] = x[2] < model.bounds[4] ? x[2] : model.bounds[4];\n        model.bounds[5] = x[2] > model.bounds[5] ? x[2] : model.bounds[5];\n      }\n    } else {\n      (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.u)(model.bounds);\n    }\n\n    return model.bounds;\n  };\n\n  publicAPI.getLength2 = function () {\n    publicAPI.getBounds();\n    var length = 0.0;\n    var diff = 0;\n\n    for (var i = 0; i < 3; i++) {\n      diff = model.bounds[2 * i + 1] - model.bounds[2 * i];\n      length += diff * diff;\n    }\n\n    return length;\n  };\n\n  publicAPI.getParametricDistance = function (pcoords) {\n    var pDist;\n    var pDistMax = 0.0;\n\n    for (var i = 0; i < 3; i++) {\n      if (pcoords[i] < 0.0) {\n        pDist = -pcoords[i];\n      } else if (pcoords[i] > 1.0) {\n        pDist = pcoords[i] - 1.0;\n      } else {\n        // inside the cell in the parametric direction\n        pDist = 0.0;\n      }\n\n      if (pDist > pDistMax) {\n        pDistMax = pDist;\n      }\n    }\n\n    return pDistMax;\n  };\n\n  publicAPI.getNumberOfPoints = function () {\n    return model.points.getNumberOfPoints();\n  };\n\n  publicAPI.deepCopy = function (cell) {\n    cell.initialize(model.points, model.pointsIds);\n  };\n\n  publicAPI.getCellDimension = function () {}; // virtual\n\n\n  publicAPI.intersectWithLine = function (p1, p2, tol, t, x, pcoords, subId) {}; // virtual\n\n\n  publicAPI.evaluatePosition = function (x, closestPoint, subId, pcoords, dist2, weights) {}; // virtual\n\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  bounds: [-1, -1, -1, -1, -1, -1],\n  pointsIds: []\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n\n  if (!model.points) {\n    model.points = _Core_Points_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n  }\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['points', 'pointsIds']);\n  vtkCell(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkCell'); // ----------------------------------------------------------------------------\n\nvar vtkCell$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkCell$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/Cell.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/CellLinks.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/CellLinks.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"InitLink\": () => (/* binding */ InitLink),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Cell_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Cell.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/Cell.js\");\n\n\n\n\n// Global methods\n// ----------------------------------------------------------------------------\n\nvar InitLink = {\n  ncells: 0,\n  cells: null\n};\n\nfunction resize(model, sz) {\n  var newSize = sz;\n\n  if (sz >= model.array.length) {\n    newSize += model.array.length;\n  }\n\n  while (newSize > model.array.length) {\n    model.array.push({\n      ncells: 0,\n      cells: null\n    });\n  }\n\n  model.array.length = newSize;\n} // ----------------------------------------------------------------------------\n// vtkCellLinks methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkCellLinks(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkCellLinks');\n  /**\n   * Build the link list array. All subclasses of vtkAbstractCellLinks\n   * must support this method.\n   */\n\n  publicAPI.buildLinks = function (data) {\n    var numPts = data.getPoints().getNumberOfPoints();\n    var numCells = data.getNumberOfCells(); // fill out lists with number of references to cells\n\n    var linkLoc = new Uint32Array(numPts); // Use fast path if polydata\n\n    if (data.isA('vtkPolyData')) {\n      // traverse data to determine number of uses of each point\n      for (var cellId = 0; cellId < numCells; ++cellId) {\n        var _data$getCellPoints = data.getCellPoints(cellId),\n            cellPointIds = _data$getCellPoints.cellPointIds;\n\n        cellPointIds.forEach(function (cellPointId) {\n          publicAPI.incrementLinkCount(cellPointId);\n        });\n      } // now allocate storage for the links\n\n\n      publicAPI.allocateLinks(numPts);\n      model.maxId = numPts - 1;\n\n      var _loop = function _loop(_cellId) {\n        var _data$getCellPoints2 = data.getCellPoints(_cellId),\n            cellPointIds = _data$getCellPoints2.cellPointIds;\n\n        cellPointIds.forEach(function (cellPointId) {\n          publicAPI.insertCellReference(cellPointId, linkLoc[cellPointId]++, _cellId);\n        });\n      };\n\n      for (var _cellId = 0; _cellId < numCells; ++_cellId) {\n        _loop(_cellId);\n      }\n    } // any other type of dataset\n    else {\n        // traverse data to determine number of uses of each point\n        for (var _cellId2 = 0; _cellId2 < numCells; _cellId2++) {\n          // TODO: Currently not supported: const cell = data.getCell(cellId);\n          var cell = _Cell_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n          cell.getPointsIds().forEach(function (cellPointId) {\n            publicAPI.incrementLinkCount(cellPointId);\n          });\n        } // now allocate storage for the links\n\n\n        publicAPI.allocateLinks(numPts);\n        model.maxId = numPts - 1;\n\n        var _loop2 = function _loop2(_cellId3) {\n          // TODO: Currently not supported: const cell = data.getCell(cellId);\n          var cell = _Cell_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n          cell.getPointsIds().forEach(function (cellPointId) {\n            publicAPI.insertCellReference(cellPointId, linkLoc[cellPointId]++, _cellId3);\n          });\n        };\n\n        for (var _cellId3 = 0; _cellId3 < numCells; ++_cellId3) {\n          _loop2(_cellId3);\n        }\n      } // end else\n\n  };\n  /**\n   * Build the link list array with a provided connectivity array.\n   */\n  // publicAPI.buildLinks = (data, connectivity) => {};\n\n  /**\n   * Allocate the specified number of links (i.e., number of points) that\n   * will be built.\n   */\n\n\n  publicAPI.allocate = function (numLinks) {\n    var ext = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n    model.array = Array(numLinks).fill().map(function () {\n      return {\n        ncells: 0,\n        cells: null\n      };\n    });\n    model.extend = ext;\n    model.maxId = -1;\n  };\n\n  publicAPI.initialize = function () {\n    model.array = null;\n  };\n  /**\n   * Get a link structure given a point id.\n   */\n\n\n  publicAPI.getLink = function (ptId) {\n    return model.array[ptId];\n  };\n  /**\n   * Get the number of cells using the point specified by ptId.\n   */\n\n\n  publicAPI.getNcells = function (ptId) {\n    return model.array[ptId].ncells;\n  };\n  /**\n   * Return a list of cell ids using the point.\n   */\n\n\n  publicAPI.getCells = function (ptId) {\n    return model.array[ptId].cells;\n  };\n  /**\n   * Insert a new point into the cell-links data structure. The size parameter\n   * is the initial size of the list.\n   */\n\n\n  publicAPI.insertNextPoint = function (numLinks) {\n    model.array.push({\n      ncells: numLinks,\n      cells: Array(numLinks)\n    });\n    ++model.maxId;\n  };\n  /**\n   * Insert a cell id into the list of cells (at the end) using the cell id\n   * provided. (Make sure to extend the link list (if necessary) using the\n   * method resizeCellList().)\n   */\n\n\n  publicAPI.insertNextCellReference = function (ptId, cellId) {\n    model.array[ptId].cells[model.array[ptId].ncells++] = cellId;\n  };\n  /**\n   * Delete point (and storage) by destroying links to using cells.\n   */\n\n\n  publicAPI.deletePoint = function (ptId) {\n    model.array[ptId].ncells = 0;\n    model.array[ptId].cells = null;\n  };\n  /**\n   * Delete the reference to the cell (cellId) from the point (ptId). This\n   * removes the reference to the cellId from the cell list, but does not\n   * resize the list (recover memory with resizeCellList(), if necessary).\n   */\n\n\n  publicAPI.removeCellReference = function (cellId, ptId) {\n    model.array[ptId].cells = model.array[ptId].cells.filter(function (cell) {\n      return cell !== cellId;\n    });\n    model.array[ptId].ncells = model.array[ptId].cells.length;\n  };\n  /**\n   * Add the reference to the cell (cellId) from the point (ptId). This\n   * adds a reference to the cellId from the cell list, but does not resize\n   * the list (extend memory with resizeCellList(), if necessary).\n   */\n\n\n  publicAPI.addCellReference = function (cellId, ptId) {\n    model.array[ptId].cells[model.array[ptId].ncells++] = cellId;\n  };\n  /**\n   * Change the length of a point's link list (i.e., list of cells using a\n   * point) by the size specified.\n   */\n\n\n  publicAPI.resizeCellList = function (ptId, size) {\n    model.array[ptId].cells.length = size;\n  };\n  /**\n   * Reclaim any unused memory.\n   */\n\n\n  publicAPI.squeeze = function () {\n    resize(model, model.maxId + 1);\n  };\n  /**\n   * Reset to a state of no entries without freeing the memory.\n   */\n\n\n  publicAPI.reset = function () {\n    model.maxId = -1;\n  };\n  /**\n   * Standard DeepCopy method.  Since this object contains no reference\n   * to other objects, there is no ShallowCopy.\n   */\n\n\n  publicAPI.deepCopy = function (src) {\n    model.array = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(src.array);\n    model.extend = src.extend;\n    model.maxId = src.maxId;\n  };\n  /**\n   * Increment the count of the number of cells using the point.\n   */\n\n\n  publicAPI.incrementLinkCount = function (ptId) {\n    ++model.array[ptId].ncells;\n  };\n\n  publicAPI.allocateLinks = function (n) {\n    for (var i = 0; i < n; ++i) {\n      model.array[i].cells = new Array(model.array[i].ncells);\n    }\n  };\n  /**\n   * Insert a cell id into the list of cells using the point.\n   */\n\n\n  publicAPI.insertCellReference = function (ptId, pos, cellId) {\n    model.array[ptId].cells[pos] = cellId;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  array: null,\n  // pointer to data\n  maxId: 0,\n  // maximum index inserted thus far\n  extend: 0 // grow array by this point\n\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  vtkCellLinks(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkCellLinks'); // ----------------------------------------------------------------------------\n\nvar vtkCellLinks$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkCellLinks$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/CellLinks.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/CellTypes.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/CellTypes.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"STATIC\": () => (/* binding */ STATIC),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CellTypes/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/CellTypes/Constants.js\");\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\n// Global methods\n// ----------------------------------------------------------------------------\n\n/**\n * Given an int (as defined in vtkCellType.h) identifier for a class\n * return it's classname.\n */\n\nfunction getClassNameFromTypeId(typeId) {\n  return typeId < _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_2__.CellTypesStrings.length ? _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_2__.CellTypesStrings[typeId] : 'UnknownClass';\n}\n/**\n * Given a data object classname, return it's int identified (as\n * defined in vtkCellType.h)\n */\n\n\nfunction getTypeIdFromClassName(cellTypeString) {\n  return _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_2__.CellTypesStrings.findIndex(cellTypeString);\n}\n/**\n * This convenience method is a fast check to determine if a cell type\n * represents a linear or nonlinear cell.  This is generally much more\n * efficient than getting the appropriate vtkCell and checking its IsLinear\n * method.\n */\n\n\nfunction isLinear(type) {\n  return type < _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_2__.CellType.VTK_QUADRATIC_EDGE || type === _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_2__.CellType.VTK_CONVEX_POINT_SET || type === _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_2__.CellType.VTK_POLYHEDRON;\n} // ----------------------------------------------------------------------------\n// Static API\n// ----------------------------------------------------------------------------\n\n\nvar STATIC = {\n  getClassNameFromTypeId: getClassNameFromTypeId,\n  getTypeIdFromClassName: getTypeIdFromClassName,\n  isLinear: isLinear\n}; // ----------------------------------------------------------------------------\n// vtkCellTypes methods\n// ----------------------------------------------------------------------------\n\nfunction vtkCellTypes(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkCellTypes');\n  /**\n   * Allocate memory for this array. Delete old storage only if necessary.\n   */\n\n  publicAPI.allocate = function () {\n    var sz = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 512;\n    var ext = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n    model.size = sz > 0 ? sz : 1;\n    model.extend = ext > 0 ? ext : 1;\n    model.maxId = -1;\n    model.typeArray = new Uint8Array(sz);\n    model.locationArray = new Uint32Array(sz);\n  };\n  /**\n   * Add a cell at specified id.\n   */\n\n\n  publicAPI.insertCell = function (cellId, type, loc) {\n    model.typeArray[cellId] = type;\n    model.locationArray[cellId] = loc;\n\n    if (cellId > model.maxId) {\n      model.maxId = cellId;\n    }\n  };\n  /**\n   * Add a cell to the object in the next available slot.\n   */\n\n\n  publicAPI.insertNextCell = function (type, loc) {\n    publicAPI.insertCell(++model.maxId, type, loc);\n    return model.maxId;\n  };\n  /**\n   * Specify a group of cell types. This version is provided to maintain\n   * backwards compatibility and does a copy of the cellLocations\n   */\n\n\n  publicAPI.setCellTypes = function (ncells, cellTypes, cellLocations) {\n    model.size = ncells;\n    model.typeArray = cellTypes;\n    model.locationArray = cellLocations;\n    model.maxId = ncells - 1;\n  };\n  /**\n   * Return the location of the cell in the associated vtkCellArray.\n   */\n\n\n  publicAPI.getCellLocation = function (cellId) {\n    return model.locationArray[cellId];\n  };\n  /**\n   * Delete cell by setting to nullptr cell type.\n   */\n\n\n  publicAPI.deleteCell = function (cellId) {\n    model.typeArray[cellId] = _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_2__.CellType.VTK_EMPTY_CELL;\n  };\n  /**\n   * Return the number of types in the list.\n   */\n\n\n  publicAPI.getNumberOfTypes = function () {\n    return model.maxId + 1;\n  };\n  /**\n   * Return true if type specified is contained in list; false otherwise.\n   */\n\n\n  publicAPI.isType = function (type) {\n    var numTypes = publicAPI.getNumberOfTypes();\n\n    for (var i = 0; i < numTypes; ++i) {\n      if (type === publicAPI.getCellType(i)) {\n        return true;\n      }\n    }\n\n    return false;\n  };\n  /**\n   * Add the type specified to the end of the list. Range checking is performed.\n   */\n\n\n  publicAPI.insertNextType = function (type) {\n    return publicAPI.insertNextCell(type, -1);\n  };\n  /**\n   * Return the type of cell.\n   */\n\n\n  publicAPI.getCellType = function (cellId) {\n    return model.typeArray[cellId];\n  };\n  /**\n   * Reclaim any extra memory.\n   */\n  // TODO: publicAPI.squeeze = () =>  {};\n\n  /**\n   * Initialize object without releasing memory.\n   */\n\n\n  publicAPI.reset = function () {\n    model.maxId = -1;\n  };\n  /**\n   * Standard DeepCopy method.  Since this object contains no reference\n   * to other objects, there is no ShallowCopy.\n   */\n\n\n  publicAPI.deepCopy = function (src) {\n    publicAPI.allocate(src.getSize(), src.getExtend());\n    model.typeArray.set(src.getTypeArray());\n    model.locationArray.set(src.getLocationArray());\n    model.maxId = src.getMaxId();\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  // typeArray: null, // pointer to types array\n  // locationArray: null;   // pointer to array of offsets\n  size: 0,\n  // allocated size of data\n  maxId: -1,\n  // maximum index inserted thus far\n  extend: 1000 // grow array by this point\n\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['size', 'maxId', 'extend']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.getArray(publicAPI, model, ['typeArray', 'locationArray']);\n  vtkCellTypes(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkCellTypes'); // ----------------------------------------------------------------------------\n\nvar vtkCellTypes$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, STATIC);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkCellTypes$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/CellTypes.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/CellTypes/Constants.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/CellTypes/Constants.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"CellType\": () => (/* binding */ CellType),\n/* harmony export */   \"CellTypesStrings\": () => (/* binding */ CellTypesStrings)\n/* harmony export */ });\nvar CellType = {\n  // Linear cells\n  VTK_EMPTY_CELL: 0,\n  VTK_VERTEX: 1,\n  VTK_POLY_VERTEX: 2,\n  VTK_LINE: 3,\n  VTK_POLY_LINE: 4,\n  VTK_TRIANGLE: 5,\n  VTK_TRIANGLE_STRIP: 6,\n  VTK_POLYGON: 7,\n  VTK_PIXEL: 8,\n  VTK_QUAD: 9,\n  VTK_TETRA: 10,\n  VTK_VOXEL: 11,\n  VTK_HEXAHEDRON: 12,\n  VTK_WEDGE: 13,\n  VTK_PYRAMID: 14,\n  VTK_PENTAGONAL_PRISM: 15,\n  VTK_HEXAGONAL_PRISM: 16,\n  // Quadratic, isoparametric cells\n  VTK_QUADRATIC_EDGE: 21,\n  VTK_QUADRATIC_TRIANGLE: 22,\n  VTK_QUADRATIC_QUAD: 23,\n  VTK_QUADRATIC_POLYGON: 36,\n  VTK_QUADRATIC_TETRA: 24,\n  VTK_QUADRATIC_HEXAHEDRON: 25,\n  VTK_QUADRATIC_WEDGE: 26,\n  VTK_QUADRATIC_PYRAMID: 27,\n  VTK_BIQUADRATIC_QUAD: 28,\n  VTK_TRIQUADRATIC_HEXAHEDRON: 29,\n  VTK_QUADRATIC_LINEAR_QUAD: 30,\n  VTK_QUADRATIC_LINEAR_WEDGE: 31,\n  VTK_BIQUADRATIC_QUADRATIC_WEDGE: 32,\n  VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON: 33,\n  VTK_BIQUADRATIC_TRIANGLE: 34,\n  // Cubic, isoparametric cell\n  VTK_CUBIC_LINE: 35,\n  // Special class of cells formed by convex group of points\n  VTK_CONVEX_POINT_SET: 41,\n  // Polyhedron cell (consisting of polygonal faces)\n  VTK_POLYHEDRON: 42,\n  // Higher order cells in parametric form\n  VTK_PARAMETRIC_CURVE: 51,\n  VTK_PARAMETRIC_SURFACE: 52,\n  VTK_PARAMETRIC_TRI_SURFACE: 53,\n  VTK_PARAMETRIC_QUAD_SURFACE: 54,\n  VTK_PARAMETRIC_TETRA_REGION: 55,\n  VTK_PARAMETRIC_HEX_REGION: 56,\n  // Higher order cells\n  VTK_HIGHER_ORDER_EDGE: 60,\n  VTK_HIGHER_ORDER_TRIANGLE: 61,\n  VTK_HIGHER_ORDER_QUAD: 62,\n  VTK_HIGHER_ORDER_POLYGON: 63,\n  VTK_HIGHER_ORDER_TETRAHEDRON: 64,\n  VTK_HIGHER_ORDER_WEDGE: 65,\n  VTK_HIGHER_ORDER_PYRAMID: 66,\n  VTK_HIGHER_ORDER_HEXAHEDRON: 67,\n  // Arbitrary order Lagrange elements (formulated separated from generic higher order cells)\n  VTK_LAGRANGE_CURVE: 68,\n  VTK_LAGRANGE_TRIANGLE: 69,\n  VTK_LAGRANGE_QUADRILATERAL: 70,\n  VTK_LAGRANGE_TETRAHEDRON: 71,\n  VTK_LAGRANGE_HEXAHEDRON: 72,\n  VTK_LAGRANGE_WEDGE: 73,\n  VTK_LAGRANGE_PYRAMID: 74,\n  VTK_NUMBER_OF_CELL_TYPES: 75\n}; // This list should contain the cell class names in\n// the same order as in CellType.\n\nvar CellTypesStrings = ['vtkEmptyCell', 'vtkVertex', 'vtkPolyVertex', 'vtkLine', 'vtkPolyLine', 'vtkTriangle', 'vtkTriangleStrip', 'vtkPolygon', 'vtkPixel', 'vtkQuad', 'vtkTetra', 'vtkVoxel', 'vtkHexahedron', 'vtkWedge', 'vtkPyramid', 'vtkPentagonalPrism', 'vtkHexagonalPrism', 'UnknownClass', 'UnknownClass', 'UnknownClass', 'UnknownClass', 'vtkQuadraticEdge', 'vtkQuadraticTriangle', 'vtkQuadraticQuad', 'vtkQuadraticTetra', 'vtkQuadraticHexahedron', 'vtkQuadraticWedge', 'vtkQuadraticPyramid', 'vtkBiQuadraticQuad', 'vtkTriQuadraticHexahedron', 'vtkQuadraticLinearQuad', 'vtkQuadraticLinearWedge', 'vtkBiQuadraticQuadraticWedge', 'vtkBiQuadraticQuadraticHexahedron', 'vtkBiQuadraticTriangle', 'vtkCubicLine', 'vtkQuadraticPolygon', 'UnknownClass', 'UnknownClass', 'UnknownClass', 'UnknownClass', 'vtkConvexPointSet', 'UnknownClass', 'UnknownClass', 'UnknownClass', 'UnknownClass', 'UnknownClass', 'UnknownClass', 'UnknownClass', 'UnknownClass', 'UnknownClass', 'vtkParametricCurve', 'vtkParametricSurface', 'vtkParametricTriSurface', 'vtkParametricQuadSurface', 'vtkParametricTetraRegion', 'vtkParametricHexRegion', 'UnknownClass', 'UnknownClass', 'UnknownClass', 'vtkHigherOrderEdge', 'vtkHigherOrderTriangle', 'vtkHigherOrderQuad', 'vtkHigherOrderPolygon', 'vtkHigherOrderTetrahedron', 'vtkHigherOrderWedge', 'vtkHigherOrderPyramid', 'vtkHigherOrderHexahedron'];\nvar Constants = {\n  CellType: CellType,\n  CellTypesStrings: CellTypesStrings\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/CellTypes/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/DataSet.js":
/*!******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/DataSet.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _vtk_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../vtk.js */ \"./node_modules/@kitware/vtk.js/vtk.js\");\n/* harmony import */ var _DataSetAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DataSetAttributes.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/DataSetAttributes.js\");\n/* harmony import */ var _DataSet_Constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DataSet/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/DataSet/Constants.js\");\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\n// import * as vtkMath from '../../Core/Math';\n//\n// function getBounds(dataset) {\n//   if (dataset.bounds) {\n//     return dataset.bounds;\n//   }\n//   if (dataset.type && dataset[dataset.type]) {\n//     const ds = dataset[dataset.type];\n//     if (ds.bounds) {\n//       return ds.bounds;\n//     }\n//     if (ds.Points && ds.Points.bounds) {\n//       return ds.Points.bounds;\n//     }\n//     if (ds.Points && ds.Points.values) {\n//       const array = ds.Points.values;\n//       const bbox = [...vtkBoundingBox.INIT_BOUNDS];\n//       const size = array.length;\n//       const delta = ds.Points.numberOfComponents ? ds.Points.numberOfComponents : 3;\n//       for (let idx = 0; idx < size; idx += delta) {\n//         vtkBoundingBox.addPoint(bbox, array[idx * delta], array[(idx * delta) + 1], array[(idx * delta) + 2]);\n//       }\n//       ds.Points.bounds = bbox;\n//       return ds.Points.bounds;\n//     }\n//   }\n//   return vtkMath.createUninitializedBounds();\n// }\n// ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n\nvar DATASET_FIELDS = ['pointData', 'cellData', 'fieldData']; // ----------------------------------------------------------------------------\n// vtkDataSet methods\n// ----------------------------------------------------------------------------\n\nfunction vtkDataSet(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkDataSet'); // Add dataset attributes\n\n  DATASET_FIELDS.forEach(function (fieldName) {\n    if (!model[fieldName]) {\n      model[fieldName] = _DataSetAttributes_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n    } else {\n      model[fieldName] = (0,_vtk_js__WEBPACK_IMPORTED_MODULE_2__.default)(model[fieldName]);\n    }\n  });\n  var superShallowCopy = publicAPI.shallowCopy;\n\n  publicAPI.shallowCopy = function (other) {\n    var debug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    superShallowCopy(other, debug);\n    DATASET_FIELDS.forEach(function (fieldName) {\n      model[fieldName] = _DataSetAttributes_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n      model[fieldName].shallowCopy(other.getReferenceByName(fieldName));\n    });\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {// pointData: null,\n  // cellData: null,\n  // fieldData: null,\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, DATASET_FIELDS); // Object specific methods\n\n  vtkDataSet(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkDataSet'); // ----------------------------------------------------------------------------\n\nvar vtkDataSet$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, _DataSet_Constants_js__WEBPACK_IMPORTED_MODULE_4__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkDataSet$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/DataSet.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/DataSet/Constants.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/DataSet/Constants.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"FieldAssociations\": () => (/* binding */ FieldAssociations),\n/* harmony export */   \"FieldDataTypes\": () => (/* binding */ FieldDataTypes)\n/* harmony export */ });\n// Specify how data arrays can be used by data objects\nvar FieldDataTypes = {\n  UNIFORM: 0,\n  // data that does not vary over points/cells/etc.\n  DATA_OBJECT_FIELD: 0,\n  // to match VTK\n  COORDINATE: 1,\n  // data that specifies the location of each point\n  POINT_DATA: 1,\n  // to match VTK\n  POINT: 2,\n  // data defined at each point, but that does not specify the point location\n  POINT_FIELD_DATA: 2,\n  // to match VTK\n  CELL: 3,\n  // data defined at each cell, but that does not specify the cell\n  CELL_FIELD_DATA: 3,\n  // to match VTK\n  VERTEX: 4,\n  // data defined at each graph vertex, but that does not specify the graph vertex\n  VERTEX_FIELD_DATA: 4,\n  // to match VTK\n  EDGE: 5,\n  // data defined at each graph edge, but that does not specify the graph edge\n  EDGE_FIELD_DATA: 5,\n  // to match VTK\n  ROW: 6,\n  // data specifying a table row\n  ROW_DATA: 6 // to match VTK\n\n};\nvar FieldAssociations = {\n  FIELD_ASSOCIATION_POINTS: 0,\n  FIELD_ASSOCIATION_CELLS: 1,\n  FIELD_ASSOCIATION_NONE: 2,\n  FIELD_ASSOCIATION_POINTS_THEN_CELLS: 3,\n  FIELD_ASSOCIATION_VERTICES: 4,\n  FIELD_ASSOCIATION_EDGES: 5,\n  FIELD_ASSOCIATION_ROWS: 6,\n  NUMBER_OF_ASSOCIATIONS: 7\n};\nvar Constants = {\n  FieldDataTypes: FieldDataTypes,\n  FieldAssociations: FieldAssociations\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/DataSet/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/DataSetAttributes.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/DataSetAttributes.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _DataSetAttributes_FieldData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DataSetAttributes/FieldData.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/DataSetAttributes/FieldData.js\");\n/* harmony import */ var _DataSetAttributes_Constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DataSetAttributes/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/DataSetAttributes/Constants.js\");\n/* harmony import */ var _Core_DataArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Core/DataArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar AttributeTypes = _DataSetAttributes_Constants_js__WEBPACK_IMPORTED_MODULE_3__.default.AttributeTypes,\n    AttributeCopyOperations = _DataSetAttributes_Constants_js__WEBPACK_IMPORTED_MODULE_3__.default.AttributeCopyOperations;\nvar vtkWarningMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkWarningMacro; // ----------------------------------------------------------------------------\n// vtkDataSetAttributes methods\n// ----------------------------------------------------------------------------\n\nfunction vtkDataSetAttributes(publicAPI, model) {\n  var attrTypes = ['Scalars', 'Vectors', 'Normals', 'TCoords', 'Tensors', 'GlobalIds', 'PedigreeIds'];\n\n  function cleanAttributeType(attType) {\n    // Given an integer or string, convert the result to one of the\n    // strings in the \"attrTypes\" array above or null (if\n    // no match is found)\n    var cleanAttType = attrTypes.find(function (ee) {\n      return AttributeTypes[ee.toUpperCase()] === attType || typeof attType !== 'number' && ee.toLowerCase() === attType.toLowerCase();\n    });\n\n    if (typeof cleanAttType === 'undefined') {\n      cleanAttType = null;\n    }\n\n    return cleanAttType;\n  } // Set our className\n\n\n  model.classHierarchy.push('vtkDataSetAttributes');\n\n  publicAPI.checkNumberOfComponents = function (x) {\n    return true;\n  }; // TODO\n\n\n  publicAPI.setAttribute = function (arr, uncleanAttType) {\n    var attType = cleanAttributeType(uncleanAttType);\n\n    if (arr && attType.toUpperCase() === 'PEDIGREEIDS' && !arr.isA('vtkDataArray')) {\n      vtkWarningMacro(\"Cannot set attribute \".concat(attType, \". The attribute must be a vtkDataArray.\"));\n      return -1;\n    }\n\n    if (arr && !publicAPI.checkNumberOfComponents(arr, attType)) {\n      vtkWarningMacro(\"Cannot set attribute \".concat(attType, \". Incorrect number of components.\"));\n      return -1;\n    }\n\n    var currentAttribute = model[\"active\".concat(attType)];\n\n    if (currentAttribute >= 0 && currentAttribute < model.arrays.length) {\n      if (model.arrays[currentAttribute] === arr) {\n        return currentAttribute;\n      }\n\n      publicAPI.removeArrayByIndex(currentAttribute);\n    }\n\n    if (arr) {\n      currentAttribute = publicAPI.addArray(arr);\n      model[\"active\".concat(attType)] = currentAttribute;\n    } else {\n      model[\"active\".concat(attType)] = -1;\n    }\n\n    publicAPI.modified();\n    return model[\"active\".concat(attType)];\n  };\n\n  publicAPI.setActiveAttributeByName = function (arrayName, attType) {\n    return publicAPI.setActiveAttributeByIndex(publicAPI.getArrayWithIndex(arrayName).index, attType);\n  };\n\n  publicAPI.setActiveAttributeByIndex = function (arrayIdx, uncleanAttType) {\n    var attType = cleanAttributeType(uncleanAttType);\n\n    if (arrayIdx >= 0 && arrayIdx < model.arrays.length) {\n      if (attType.toUpperCase() !== 'PEDIGREEIDS') {\n        var arr = publicAPI.getArrayByIndex(arrayIdx);\n\n        if (!arr.isA('vtkDataArray')) {\n          vtkWarningMacro(\"Cannot set attribute \".concat(attType, \". Only vtkDataArray subclasses can be set as active attributes.\"));\n          return -1;\n        }\n\n        if (!publicAPI.checkNumberOfComponents(arr, attType)) {\n          vtkWarningMacro(\"Cannot set attribute \".concat(attType, \". Incorrect number of components.\"));\n          return -1;\n        }\n      }\n\n      model[\"active\".concat(attType)] = arrayIdx;\n      publicAPI.modified();\n      return arrayIdx;\n    }\n\n    if (arrayIdx === -1) {\n      model[\"active\".concat(attType)] = arrayIdx;\n      publicAPI.modified();\n    }\n\n    return -1;\n  };\n\n  publicAPI.getActiveAttribute = function (attType) {\n    // Given an integer enum value or a string (with random capitalization),\n    // find the matching string in attrTypes.\n    var cleanAttType = cleanAttributeType(attType);\n    return publicAPI[\"get\".concat(cleanAttType)]();\n  }; // Override to allow proper handling of active attributes\n\n\n  publicAPI.removeAllArrays = function () {\n    model.arrays = [];\n    attrTypes.forEach(function (attType) {\n      model[\"active\".concat(attType)] = -1;\n    });\n  }; // Override to allow proper handling of active attributes\n\n\n  publicAPI.removeArray = function (arrayName) {\n    model.arrays = model.arrays.filter(function (entry, idx) {\n      if (arrayName === entry.data.getName()) {\n        // Found the array to remove, but is it an active attribute?\n        attrTypes.forEach(function (attType) {\n          if (idx === model[\"active\".concat(attType)]) {\n            model[\"active\".concat(attType)] = -1;\n          }\n        });\n        return false;\n      }\n\n      return true;\n    });\n  }; // Override to allow proper handling of active attributes\n\n\n  publicAPI.removeArrayByIndex = function (arrayIdx) {\n    model.arrays = model.arrays.filter(function (entry, idx) {\n      return idx !== arrayIdx;\n    });\n    attrTypes.forEach(function (attType) {\n      if (arrayIdx === model[\"active\".concat(attType)]) {\n        model[\"active\".concat(attType)] = -1;\n      }\n    });\n  };\n\n  attrTypes.forEach(function (value) {\n    var activeVal = \"active\".concat(value);\n\n    publicAPI[\"get\".concat(value)] = function () {\n      return publicAPI.getArrayByIndex(model[activeVal]);\n    };\n\n    publicAPI[\"set\".concat(value)] = function (da) {\n      return publicAPI.setAttribute(da, value);\n    };\n\n    publicAPI[\"setActive\".concat(value)] = function (arrayName) {\n      return publicAPI.setActiveAttributeByIndex(publicAPI.getArrayWithIndex(arrayName).index, value);\n    };\n\n    publicAPI[\"copy\".concat(value, \"Off\")] = function () {\n      var attType = value.toUpperCase();\n      model.copyAttributeFlags[AttributeCopyOperations.PASSDATA][AttributeTypes[attType]] = false;\n    };\n  });\n\n  publicAPI.initializeAttributeCopyFlags = function () {\n    // Default to copying all attributes in every circumstance:\n    model.copyAttributeFlags = [];\n    Object.keys(AttributeCopyOperations).filter(function (op) {\n      return op !== 'ALLCOPY';\n    }).forEach(function (attCopyOp) {\n      model.copyAttributeFlags[AttributeCopyOperations[attCopyOp]] = Object.keys(AttributeTypes).filter(function (ty) {\n        return ty !== 'NUM_ATTRIBUTES';\n      }).reduce(function (a, b) {\n        a[AttributeTypes[b]] = true;\n        return a;\n      }, []);\n    }); // Override some operations where we don't want to copy:\n\n    model.copyAttributeFlags[AttributeCopyOperations.COPYTUPLE][AttributeTypes.GLOBALIDS] = false;\n    model.copyAttributeFlags[AttributeCopyOperations.INTERPOLATE][AttributeTypes.GLOBALIDS] = false;\n    model.copyAttributeFlags[AttributeCopyOperations.COPYTUPLE][AttributeTypes.PEDIGREEIDS] = false;\n  };\n\n  publicAPI.initialize = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.chain(publicAPI.initialize, publicAPI.initializeAttributeCopyFlags); // Process dataArrays if any\n\n  if (model.dataArrays && Object.keys(model.dataArrays).length) {\n    Object.keys(model.dataArrays).forEach(function (name) {\n      if (!model.dataArrays[name].ref && model.dataArrays[name].type === 'vtkDataArray') {\n        publicAPI.addArray(_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance(model.dataArrays[name]));\n      }\n    });\n  }\n\n  var superShallowCopy = publicAPI.shallowCopy;\n\n  publicAPI.shallowCopy = function (other, debug) {\n    superShallowCopy(other, debug);\n    model.arrays = other.getArrays().map(function (arr) {\n      var arrNew = arr.newClone();\n      arrNew.shallowCopy(arr, debug);\n      return {\n        data: arrNew\n      };\n    });\n  };\n\n  publicAPI.initializeAttributeCopyFlags();\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  activeScalars: -1,\n  activeVectors: -1,\n  activeTensors: -1,\n  activeNormals: -1,\n  activeTCoords: -1,\n  activeGlobalIds: -1,\n  activePedigreeIds: -1\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _DataSetAttributes_FieldData_js__WEBPACK_IMPORTED_MODULE_2__.default.extend(publicAPI, model, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['activeScalars', 'activeNormals', 'activeTCoords', 'activeVectors', 'activeTensors', 'activeGlobalIds', 'activePedigreeIds']);\n\n  if (!model.arrays) {\n    model.arrays = {};\n  } // Object specific methods\n\n\n  vtkDataSetAttributes(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkDataSetAttributes'); // ----------------------------------------------------------------------------\n\nvar vtkDataSetAttributes$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, _DataSetAttributes_Constants_js__WEBPACK_IMPORTED_MODULE_3__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkDataSetAttributes$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/DataSetAttributes.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/DataSetAttributes/Constants.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/DataSetAttributes/Constants.js ***!
  \**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"AttributeCopyOperations\": () => (/* binding */ AttributeCopyOperations),\n/* harmony export */   \"AttributeLimitTypes\": () => (/* binding */ AttributeLimitTypes),\n/* harmony export */   \"AttributeTypes\": () => (/* binding */ AttributeTypes),\n/* harmony export */   \"CellGhostTypes\": () => (/* binding */ CellGhostTypes),\n/* harmony export */   \"DesiredOutputPrecision\": () => (/* binding */ DesiredOutputPrecision),\n/* harmony export */   \"PointGhostTypes\": () => (/* binding */ PointGhostTypes),\n/* harmony export */   \"ghostArrayName\": () => (/* binding */ ghostArrayName)\n/* harmony export */ });\nvar AttributeTypes = {\n  SCALARS: 0,\n  VECTORS: 1,\n  NORMALS: 2,\n  TCOORDS: 3,\n  TENSORS: 4,\n  GLOBALIDS: 5,\n  PEDIGREEIDS: 6,\n  EDGEFLAG: 7,\n  NUM_ATTRIBUTES: 8\n};\nvar AttributeLimitTypes = {\n  MAX: 0,\n  EXACT: 1,\n  NOLIMIT: 2\n};\nvar CellGhostTypes = {\n  DUPLICATECELL: 1,\n  // the cell is present on multiple processors\n  HIGHCONNECTIVITYCELL: 2,\n  // the cell has more neighbors than in a regular mesh\n  LOWCONNECTIVITYCELL: 4,\n  // the cell has less neighbors than in a regular mesh\n  REFINEDCELL: 8,\n  // other cells are present that refines it.\n  EXTERIORCELL: 16,\n  // the cell is on the exterior of the data set\n  HIDDENCELL: 32 // the cell is needed to maintain connectivity, but the data values should be ignored.\n\n};\nvar PointGhostTypes = {\n  DUPLICATEPOINT: 1,\n  // the cell is present on multiple processors\n  HIDDENPOINT: 2 // the point is needed to maintain connectivity, but the data values should be ignored.\n\n};\nvar AttributeCopyOperations = {\n  COPYTUPLE: 0,\n  INTERPOLATE: 1,\n  PASSDATA: 2,\n  ALLCOPY: 3 // all of the above\n\n};\nvar ghostArrayName = 'vtkGhostType';\nvar DesiredOutputPrecision = {\n  DEFAULT: 0,\n  // use the point type that does not truncate any data\n  SINGLE: 1,\n  // use Float32Array\n  DOUBLE: 2 // use Float64Array\n\n};\nvar Constants = {\n  AttributeCopyOperations: AttributeCopyOperations,\n  AttributeLimitTypes: AttributeLimitTypes,\n  AttributeTypes: AttributeTypes,\n  CellGhostTypes: CellGhostTypes,\n  DesiredOutputPrecision: DesiredOutputPrecision,\n  PointGhostTypes: PointGhostTypes,\n  ghostArrayName: ghostArrayName\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/DataSetAttributes/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/DataSetAttributes/FieldData.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/DataSetAttributes/FieldData.js ***!
  \**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _vtk_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../vtk.js */ \"./node_modules/@kitware/vtk.js/vtk.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Core_DataArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Core/DataArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n\n\n\n\n// vtkFieldData methods\n// ----------------------------------------------------------------------------\n\nfunction vtkFieldData(publicAPI, model) {\n  model.classHierarchy.push('vtkFieldData');\n  var superGetState = publicAPI.getState; // Decode serialized data if any\n\n  if (model.arrays) {\n    model.arrays = model.arrays.map(function (item) {\n      return {\n        data: (0,_vtk_js__WEBPACK_IMPORTED_MODULE_0__.default)(item.data)\n      };\n    });\n  }\n\n  publicAPI.initialize = function () {\n    publicAPI.initializeFields();\n    publicAPI.copyAllOn();\n    publicAPI.clearFieldFlags();\n  };\n\n  publicAPI.initializeFields = function () {\n    model.arrays = [];\n    model.copyFieldFlags = {};\n    publicAPI.modified();\n  };\n\n  publicAPI.copyStructure = function (other) {\n    publicAPI.initializeFields();\n    model.copyFieldFlags = other.getCopyFieldFlags().map(function (x) {\n      return x;\n    }); // Deep-copy\n\n    model.arrays = other.arrays().map(function (x) {\n      return {\n        array: x\n      };\n    }); // Deep-copy\n    // TODO: Copy array information objects (once we support information objects)\n  };\n\n  publicAPI.getNumberOfArrays = function () {\n    return model.arrays.length;\n  };\n\n  publicAPI.getNumberOfActiveArrays = function () {\n    return model.arrays.length;\n  };\n\n  publicAPI.addArray = function (arr) {\n    model.arrays = [].concat(model.arrays, {\n      data: arr\n    });\n    return model.arrays.length - 1;\n  };\n\n  publicAPI.removeAllArrays = function () {\n    model.arrays = [];\n  };\n\n  publicAPI.removeArray = function (arrayName) {\n    model.arrays = model.arrays.filter(function (entry) {\n      return arrayName !== entry.data.getName();\n    });\n  };\n\n  publicAPI.removeArrayByIndex = function (arrayIdx) {\n    model.arrays = model.arrays.filter(function (entry, idx) {\n      return idx !== arrayIdx;\n    });\n  };\n\n  publicAPI.getArrays = function () {\n    return model.arrays.map(function (entry) {\n      return entry.data;\n    });\n  };\n\n  publicAPI.getArray = function (arraySpec) {\n    return typeof arraySpec === 'number' ? publicAPI.getArrayByIndex(arraySpec) : publicAPI.getArrayByName(arraySpec);\n  };\n\n  publicAPI.getArrayByName = function (arrayName) {\n    return model.arrays.reduce(function (a, b, i) {\n      return b.data.getName() === arrayName ? b.data : a;\n    }, null);\n  };\n\n  publicAPI.getArrayWithIndex = function (arrayName) {\n    return model.arrays.reduce(function (a, b, i) {\n      return b.data && b.data.getName() === arrayName ? {\n        array: b.data,\n        index: i\n      } : a;\n    }, {\n      array: null,\n      index: -1\n    });\n  };\n\n  publicAPI.getArrayByIndex = function (idx) {\n    return idx >= 0 && idx < model.arrays.length ? model.arrays[idx].data : null;\n  };\n\n  publicAPI.hasArray = function (arrayName) {\n    return publicAPI.getArrayWithIndex(arrayName).index >= 0;\n  };\n\n  publicAPI.getArrayName = function (idx) {\n    var arr = model.arrays[idx];\n    return arr ? arr.data.getName() : '';\n  };\n\n  publicAPI.getCopyFieldFlags = function () {\n    return model.copyFieldFlags;\n  };\n\n  publicAPI.getFlag = function (arrayName) {\n    return model.copyFieldFlags[arrayName];\n  };\n\n  publicAPI.passData = function (other) {\n    var fromId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;\n    var toId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;\n    other.getArrays().forEach(function (arr) {\n      var copyFlag = publicAPI.getFlag(arr.getName());\n\n      if (copyFlag !== false && !(model.doCopyAllOff && copyFlag !== true) && arr) {\n        var destArr = publicAPI.getArrayByName(arr.getName());\n\n        if (!destArr) {\n          if (fromId < 0 || fromId > arr.getNumberOfTuples()) {\n            publicAPI.addArray(arr);\n          } else {\n            var ncomps = arr.getNumberOfComponents();\n            var newSize = arr.getNumberOfValues();\n            var tId = toId > -1 ? toId : fromId;\n\n            if (newSize < tId * ncomps) {\n              newSize = (tId + 1) * ncomps;\n            }\n\n            destArr = _Core_DataArray_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance({\n              name: arr.getName(),\n              dataType: arr.getDataType(),\n              numberOfComponents: arr.getNumberOfComponents(),\n              size: newSize\n            });\n            destArr.setTuple(tId, arr.getTuple(fromId));\n            publicAPI.addArray(destArr);\n          }\n        } else if (arr.getNumberOfComponents() === destArr.getNumberOfComponents()) {\n          if (fromId > -1 && fromId < arr.getNumberOfTuples()) {\n            var _tId = toId > -1 ? toId : fromId;\n\n            destArr.setTuple(_tId, arr.getTuple(fromId));\n          } else {\n            // if fromId and not provided, just copy all (or as much possible)\n            // of arr to destArr.\n            for (var i = 0; i < arr.getNumberOfTuples(); ++i) {\n              destArr.setTuple(i, arr.getTuple(i));\n            }\n          }\n        }\n      }\n    });\n  };\n\n  publicAPI.copyFieldOn = function (arrayName) {\n    model.copyFieldFlags[arrayName] = true;\n  };\n\n  publicAPI.copyFieldOff = function (arrayName) {\n    model.copyFieldFlags[arrayName] = false;\n  };\n\n  publicAPI.copyAllOn = function () {\n    if (!model.doCopyAllOn || model.doCopyAllOff) {\n      model.doCopyAllOn = true;\n      model.doCopyAllOff = false;\n      publicAPI.modified();\n    }\n  };\n\n  publicAPI.copyAllOff = function () {\n    if (model.doCopyAllOn || !model.doCopyAllOff) {\n      model.doCopyAllOn = false;\n      model.doCopyAllOff = true;\n      publicAPI.modified();\n    }\n  };\n\n  publicAPI.clearFieldFlags = function () {\n    model.copyFieldFlags = {};\n  };\n\n  publicAPI.deepCopy = function (other) {\n    model.arrays = other.getArrays().map(function (arr) {\n      var arrNew = arr.newClone();\n      arrNew.deepCopy(arr);\n      return {\n        data: arrNew\n      };\n    });\n  };\n\n  publicAPI.copyFlags = function (other) {\n    return other.getCopyFieldFlags().map(function (x) {\n      return x;\n    });\n  }; // TODO: publicAPI.squeeze = () => model.arrays.forEach(entry => entry.data.squeeze());\n\n\n  publicAPI.reset = function () {\n    return model.arrays.forEach(function (entry) {\n      return entry.data.reset();\n    });\n  }; // TODO: getActualMemorySize\n\n\n  publicAPI.getMTime = function () {\n    return model.arrays.reduce(function (a, b) {\n      return b.data.getMTime() > a ? b.data.getMTime() : a;\n    }, model.mtime);\n  }; // TODO: publicAPI.getField = (ids, other) => { copy ids from other into this model's arrays }\n  // TODO: publicAPI.getArrayContainingComponent = (component) => ...\n\n\n  publicAPI.getNumberOfComponents = function () {\n    return model.arrays.reduce(function (a, b) {\n      return a + b.data.getNumberOfComponents();\n    }, 0);\n  };\n\n  publicAPI.getNumberOfTuples = function () {\n    return model.arrays.length > 0 ? model.arrays[0].getNumberOfTuples() : 0;\n  };\n\n  publicAPI.getState = function () {\n    var result = superGetState();\n    result.arrays = model.arrays.map(function (item) {\n      return {\n        data: item.data.getState()\n      };\n    });\n    return result;\n  };\n}\n\nvar DEFAULT_VALUES = {\n  arrays: [],\n  copyFieldFlags: [],\n  // fields not to copy\n  doCopyAllOn: true,\n  doCopyAllOff: false\n};\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  vtkFieldData(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkFieldData'); // ----------------------------------------------------------------------------\n\nvar vtkFieldData$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkFieldData$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/DataSetAttributes/FieldData.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/ImageData.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/ImageData.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _BoundingBox_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BoundingBox.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/BoundingBox.js\");\n/* harmony import */ var _DataSet_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DataSet.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/DataSet.js\");\n/* harmony import */ var _StructuredData_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./StructuredData.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/StructuredData.js\");\n/* harmony import */ var _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./StructuredData/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/StructuredData/Constants.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat3.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/vec3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n\n\n\n\n\n\n\n\n\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkErrorMacro; // ----------------------------------------------------------------------------\n// vtkImageData methods\n// ----------------------------------------------------------------------------\n\nfunction vtkImageData(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkImageData');\n\n  publicAPI.setExtent = function () {\n    if (model.deleted) {\n      vtkErrorMacro('instance deleted - cannot call any method');\n      return false;\n    }\n\n    for (var _len = arguments.length, inExtent = new Array(_len), _key = 0; _key < _len; _key++) {\n      inExtent[_key] = arguments[_key];\n    }\n\n    var extentArray = inExtent.length === 1 ? inExtent[0] : inExtent;\n\n    if (extentArray.length !== 6) {\n      return false;\n    }\n\n    var changeDetected = false;\n    model.extent.forEach(function (item, index) {\n      if (item !== extentArray[index]) {\n        if (changeDetected) {\n          return;\n        }\n\n        changeDetected = true;\n      }\n    });\n\n    if (changeDetected) {\n      model.extent = extentArray.slice();\n      model.dataDescription = _StructuredData_js__WEBPACK_IMPORTED_MODULE_5__.default.getDataDescriptionFromExtent(model.extent);\n      publicAPI.modified();\n    }\n\n    return changeDetected;\n  };\n\n  publicAPI.setDimensions = function () {\n    var i;\n    var j;\n    var k;\n\n    if (model.deleted) {\n      vtkErrorMacro('instance deleted - cannot call any method');\n      return;\n    }\n\n    if (arguments.length === 1) {\n      var array = arguments.length <= 0 ? undefined : arguments[0];\n      i = array[0];\n      j = array[1];\n      k = array[2];\n    } else if (arguments.length === 3) {\n      i = arguments.length <= 0 ? undefined : arguments[0];\n      j = arguments.length <= 1 ? undefined : arguments[1];\n      k = arguments.length <= 2 ? undefined : arguments[2];\n    } else {\n      vtkErrorMacro('Bad dimension specification');\n      return;\n    }\n\n    publicAPI.setExtent(0, i - 1, 0, j - 1, 0, k - 1);\n  };\n\n  publicAPI.getDimensions = function () {\n    return [model.extent[1] - model.extent[0] + 1, model.extent[3] - model.extent[2] + 1, model.extent[5] - model.extent[4] + 1];\n  };\n\n  publicAPI.getNumberOfCells = function () {\n    var dims = publicAPI.getDimensions();\n    var nCells = 1;\n\n    for (var i = 0; i < 3; i++) {\n      if (dims[i] === 0) {\n        return 0;\n      }\n\n      if (dims[i] > 1) {\n        nCells *= dims[i] - 1;\n      }\n    }\n\n    return nCells;\n  };\n\n  publicAPI.getNumberOfPoints = function () {\n    var dims = publicAPI.getDimensions();\n    return dims[0] * dims[1] * dims[2];\n  };\n\n  publicAPI.getPoint = function (index) {\n    var dims = publicAPI.getDimensions();\n\n    if (dims[0] === 0 || dims[1] === 0 || dims[2] === 0) {\n      vtkErrorMacro('Requesting a point from an empty image.');\n      return null;\n    }\n\n    var ijk = new Float64Array(3);\n\n    switch (model.dataDescription) {\n      case _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_6__.StructuredType.EMPTY:\n        return null;\n\n      case _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_6__.StructuredType.SINGLE_POINT:\n        break;\n\n      case _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_6__.StructuredType.X_LINE:\n        ijk[0] = index;\n        break;\n\n      case _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_6__.StructuredType.Y_LINE:\n        ijk[1] = index;\n        break;\n\n      case _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_6__.StructuredType.Z_LINE:\n        ijk[2] = index;\n        break;\n\n      case _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_6__.StructuredType.XY_PLANE:\n        ijk[0] = index % dims[0];\n        ijk[1] = index / dims[0];\n        break;\n\n      case _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_6__.StructuredType.YZ_PLANE:\n        ijk[1] = index % dims[1];\n        ijk[2] = index / dims[1];\n        break;\n\n      case _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_6__.StructuredType.XZ_PLANE:\n        ijk[0] = index % dims[0];\n        ijk[2] = index / dims[0];\n        break;\n\n      case _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_6__.StructuredType.XYZ_GRID:\n        ijk[0] = index % dims[0];\n        ijk[1] = index / dims[0] % dims[1];\n        ijk[2] = index / (dims[0] * dims[1]);\n        break;\n\n      default:\n        vtkErrorMacro('Invalid dataDescription');\n        break;\n    }\n\n    var coords = [0, 0, 0];\n    publicAPI.indexToWorld(ijk, coords);\n    return coords;\n  }; // vtkCell *GetCell(vtkIdType cellId) VTK_OVERRIDE;\n  // void GetCell(vtkIdType cellId, vtkGenericCell *cell) VTK_OVERRIDE;\n  // void GetCellBounds(vtkIdType cellId, double bounds[6]) VTK_OVERRIDE;\n  // virtual vtkIdType FindPoint(double x, double y, double z)\n  // {\n  //   return this->vtkDataSet::FindPoint(x, y, z);\n  // }\n  // vtkIdType FindPoint(double x[3]) VTK_OVERRIDE;\n  // vtkIdType FindCell(\n  //   double x[3], vtkCell *cell, vtkIdType cellId, double tol2,\n  //   int& subId, double pcoords[3], double *weights) VTK_OVERRIDE;\n  // vtkIdType FindCell(\n  //   double x[3], vtkCell *cell, vtkGenericCell *gencell,\n  //   vtkIdType cellId, double tol2, int& subId,\n  //   double pcoords[3], double *weights) VTK_OVERRIDE;\n  // vtkCell *FindAndGetCell(double x[3], vtkCell *cell, vtkIdType cellId,\n  //                                 double tol2, int& subId, double pcoords[3],\n  //                                 double *weights) VTK_OVERRIDE;\n  // int GetCellType(vtkIdType cellId) VTK_OVERRIDE;\n  // void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) VTK_OVERRIDE\n  //   {vtkStructuredData::GetCellPoints(cellId,ptIds,this->DataDescription,\n  //                                     this->GetDimensions());}\n  // void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) VTK_OVERRIDE\n  //   {vtkStructuredData::GetPointCells(ptId,cellIds,this->GetDimensions());}\n  // void ComputeBounds() VTK_OVERRIDE;\n  // int GetMaxCellSize() VTK_OVERRIDE {return 8;}; //voxel is the largest\n\n\n  publicAPI.getBounds = function () {\n    return publicAPI.extentToBounds(model.extent);\n  };\n\n  publicAPI.extentToBounds = function (ex) {\n    // prettier-ignore\n    var corners = [ex[0], ex[2], ex[4], ex[1], ex[2], ex[4], ex[0], ex[3], ex[4], ex[1], ex[3], ex[4], ex[0], ex[2], ex[5], ex[1], ex[2], ex[5], ex[0], ex[3], ex[5], ex[1], ex[3], ex[5]];\n    var idx = new Float64Array([corners[0], corners[1], corners[2]]);\n    var vout = new Float64Array(3);\n    publicAPI.indexToWorld(idx, vout);\n    var bounds = [vout[0], vout[0], vout[1], vout[1], vout[2], vout[2]];\n\n    for (var i = 3; i < 24; i += 3) {\n      (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_8__.s)(idx, corners[i], corners[i + 1], corners[i + 2]);\n      publicAPI.indexToWorld(idx, vout);\n\n      if (vout[0] < bounds[0]) {\n        bounds[0] = vout[0];\n      }\n\n      if (vout[1] < bounds[2]) {\n        bounds[2] = vout[1];\n      }\n\n      if (vout[2] < bounds[4]) {\n        bounds[4] = vout[2];\n      }\n\n      if (vout[0] > bounds[1]) {\n        bounds[1] = vout[0];\n      }\n\n      if (vout[1] > bounds[3]) {\n        bounds[3] = vout[1];\n      }\n\n      if (vout[2] > bounds[5]) {\n        bounds[5] = vout[2];\n      }\n    }\n\n    return bounds;\n  }; // Internal, shouldn't need to call this manually.\n\n\n  publicAPI.computeTransforms = function () {\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_9__.f)(model.indexToWorld, model.origin);\n    model.indexToWorld[0] = model.direction[0];\n    model.indexToWorld[1] = model.direction[1];\n    model.indexToWorld[2] = model.direction[2];\n    model.indexToWorld[4] = model.direction[3];\n    model.indexToWorld[5] = model.direction[4];\n    model.indexToWorld[6] = model.direction[5];\n    model.indexToWorld[8] = model.direction[6];\n    model.indexToWorld[9] = model.direction[7];\n    model.indexToWorld[10] = model.direction[8];\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_9__.s)(model.indexToWorld, model.indexToWorld, model.spacing);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_9__.i)(model.worldToIndex, model.indexToWorld);\n  }; //\n  // The direction matrix is a 3x3 basis for the I, J, K axes\n  // of the image. The rows of the matrix correspond to the\n  // axes directions in world coordinates. Direction must\n  // form an orthonormal basis, results are undefined if\n  // it is not.\n  //\n\n\n  publicAPI.setDirection = function () {\n    if (model.deleted) {\n      vtkErrorMacro('instance deleted - cannot call any method');\n      return false;\n    }\n\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    var array = args; // allow an array passed as a single arg.\n\n    if (array.length === 1 && (Array.isArray(array[0]) || array[0].constructor === Float32Array || array[0].constructor === Float64Array)) {\n      array = array[0];\n    }\n\n    if (array.length !== 9) {\n      throw new RangeError('Invalid number of values for array setter');\n    }\n\n    var changeDetected = false;\n    model.direction.forEach(function (item, index) {\n      if (item !== array[index]) {\n        if (changeDetected) {\n          return;\n        }\n\n        changeDetected = true;\n      }\n    });\n\n    if (changeDetected) {\n      for (var i = 0; i < 9; ++i) {\n        model.direction[i] = array[i];\n      }\n\n      publicAPI.modified();\n    }\n\n    return true;\n  };\n\n  publicAPI.indexToWorld = function (ain) {\n    var aout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_8__.t)(aout, ain, model.indexToWorld);\n    return aout;\n  };\n\n  publicAPI.indexToWorldVec3 = publicAPI.indexToWorld;\n\n  publicAPI.worldToIndex = function (ain) {\n    var aout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_8__.t)(aout, ain, model.worldToIndex);\n    return aout;\n  };\n\n  publicAPI.worldToIndexVec3 = publicAPI.worldToIndex;\n\n  publicAPI.indexToWorldBounds = function (bin) {\n    var bout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n    var in1 = [0, 0, 0];\n    var in2 = [0, 0, 0];\n    _BoundingBox_js__WEBPACK_IMPORTED_MODULE_3__.default.computeCornerPoints(bin, in1, in2);\n    var out1 = [0, 0, 0];\n    var out2 = [0, 0, 0];\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_8__.t)(out1, in1, model.indexToWorld);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_8__.t)(out2, in2, model.indexToWorld);\n    (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.c)(out1, out2, bout);\n    return bout;\n  };\n\n  publicAPI.worldToIndexBounds = function (bin) {\n    var bout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n    var in1 = [0, 0, 0];\n    var in2 = [0, 0, 0];\n    _BoundingBox_js__WEBPACK_IMPORTED_MODULE_3__.default.computeCornerPoints(bin, in1, in2);\n    var out1 = [0, 0, 0];\n    var out2 = [0, 0, 0];\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_8__.t)(out1, in1, model.worldToIndex);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_8__.t)(out2, in2, model.worldToIndex);\n    (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.c)(out1, out2, bout);\n    return bout;\n  }; // Make sure the transform is correct\n\n\n  publicAPI.onModified(publicAPI.computeTransforms);\n  publicAPI.computeTransforms();\n\n  publicAPI.getCenter = function () {\n    var bounds = publicAPI.getBounds();\n    var center = [];\n\n    for (var i = 0; i < 3; i++) {\n      center[i] = (bounds[2 * i + 1] + bounds[2 * i]) / 2;\n    }\n\n    return center;\n  };\n\n  publicAPI.computeHistogram = function (worldBounds) {\n    var voxelFunc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n    var bounds = [0, 0, 0, 0, 0, 0];\n    publicAPI.worldToIndexBounds(worldBounds, bounds);\n    var point1 = [0, 0, 0];\n    var point2 = [0, 0, 0];\n    _BoundingBox_js__WEBPACK_IMPORTED_MODULE_3__.default.computeCornerPoints(bounds, point1, point2);\n    (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.a)(point1, point1);\n    (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.a)(point2, point2);\n    var dimensions = publicAPI.getDimensions();\n    (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.b)(point1, [0, 0, 0], [dimensions[0] - 1, dimensions[1] - 1, dimensions[2] - 1], point1);\n    (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.b)(point2, [0, 0, 0], [dimensions[0] - 1, dimensions[1] - 1, dimensions[2] - 1], point2);\n    var yStride = dimensions[0];\n    var zStride = dimensions[0] * dimensions[1];\n    var pixels = publicAPI.getPointData().getScalars().getData();\n    var maximum = -Infinity;\n    var minimum = Infinity;\n    var sumOfSquares = 0;\n    var isum = 0;\n    var inum = 0;\n\n    for (var z = point1[2]; z <= point2[2]; z++) {\n      for (var y = point1[1]; y <= point2[1]; y++) {\n        var index = point1[0] + y * yStride + z * zStride;\n\n        for (var x = point1[0]; x <= point2[0]; x++) {\n          if (!voxelFunc || voxelFunc([x, y, z], bounds)) {\n            var pixel = pixels[index];\n            if (pixel > maximum) maximum = pixel;\n            if (pixel < minimum) minimum = pixel;\n            sumOfSquares += pixel * pixel;\n            isum += pixel;\n            inum += 1;\n          }\n\n          ++index;\n        }\n      }\n    }\n\n    var average = inum > 0 ? isum / inum : 0;\n    var variance = sumOfSquares - average * average;\n    var sigma = Math.sqrt(variance);\n    return {\n      minimum: minimum,\n      maximum: maximum,\n      average: average,\n      variance: variance,\n      sigma: sigma\n    };\n  }; // TODO: use the unimplemented `vtkDataSetAttributes` for scalar length, that is currently also a TODO (GetNumberOfComponents).\n  // Scalar data could be tuples for color information?\n\n\n  publicAPI.computeIncrements = function (extent) {\n    var numberOfComponents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n    var increments = [];\n    var incr = numberOfComponents; // Calculate array increment offsets\n    // similar to c++ vtkImageData::ComputeIncrements\n\n    for (var idx = 0; idx < 3; ++idx) {\n      increments[idx] = incr;\n      incr *= extent[idx * 2 + 1] - extent[idx * 2] + 1;\n    }\n\n    return increments;\n  };\n  /**\n   * @param {Number[]} index the localized `[i,j,k]` pixel array position. Float values will be rounded.\n   * @return {Number} the corresponding flattened index in the scalar array\n   */\n\n\n  publicAPI.computeOffsetIndex = function (_ref) {\n    var _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(_ref, 3),\n        i = _ref2[0],\n        j = _ref2[1],\n        k = _ref2[2];\n\n    var extent = publicAPI.getExtent();\n    var numberOfComponents = publicAPI.getPointData().getScalars().getNumberOfComponents();\n    var increments = publicAPI.computeIncrements(extent, numberOfComponents); // Use the array increments to find the pixel index\n    // similar to c++ vtkImageData::GetArrayPointer\n    // Math.floor to catch \"practically 0\" e^-15 scenarios.\n\n    return Math.floor((Math.round(i) - extent[0]) * increments[0] + (Math.round(j) - extent[2]) * increments[1] + (Math.round(k) - extent[4]) * increments[2]);\n  };\n  /**\n   * @param {Number[]} xyz the [x,y,z] Array in world coordinates\n   * @return {Number|NaN} the corresponding pixel's index in the scalar array\n   */\n\n\n  publicAPI.getOffsetIndexFromWorld = function (xyz) {\n    var extent = publicAPI.getExtent();\n    var index = publicAPI.worldToIndex(xyz); // Confirm indexed i,j,k coords are within the bounds of the volume\n\n    for (var idx = 0; idx < 3; ++idx) {\n      if (index[idx] < extent[idx * 2] || index[idx] > extent[idx * 2 + 1]) {\n        vtkErrorMacro(\"GetScalarPointer: Pixel \".concat(index, \" is not in memory. Current extent = \").concat(extent));\n        return NaN;\n      }\n    } // Assumed the index here is within 0 <-> scalarData.length, but doesn't hurt to check upstream\n\n\n    return publicAPI.computeOffsetIndex(index);\n  };\n  /**\n   * @param {Number[]} xyz the [x,y,z] Array in world coordinates\n   * @param {Number?} comp the scalar component index for multi-component scalars\n   * @return {Number|NaN} the corresponding pixel's scalar value\n   */\n\n\n  publicAPI.getScalarValueFromWorld = function (xyz) {\n    var comp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n    var numberOfComponents = publicAPI.getPointData().getScalars().getNumberOfComponents();\n\n    if (comp < 0 || comp >= numberOfComponents) {\n      vtkErrorMacro(\"GetScalarPointer: Scalar Component \".concat(comp, \" is not within bounds. Current Scalar numberOfComponents: \").concat(numberOfComponents));\n      return NaN;\n    }\n\n    var offsetIndex = publicAPI.getOffsetIndexFromWorld(xyz);\n\n    if (Number.isNaN(offsetIndex)) {\n      // VTK Error Macro will have been tripped already, no need to do it again,\n      return offsetIndex;\n    }\n\n    return publicAPI.getPointData().getScalars().getComponent(offsetIndex, comp);\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  direction: null,\n  // a mat3\n  indexToWorld: null,\n  // a mat4\n  worldToIndex: null,\n  // a mat4\n  spacing: [1.0, 1.0, 1.0],\n  origin: [0.0, 0.0, 0.0],\n  extent: [0, -1, 0, -1, 0, -1],\n  dataDescription: _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_6__.StructuredType.EMPTY\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _DataSet_js__WEBPACK_IMPORTED_MODULE_4__.default.extend(publicAPI, model, initialValues);\n\n  if (!model.direction) {\n    model.direction = (0,_vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_7__.i)(new Float64Array(9));\n  } else if (Array.isArray(model.direction)) {\n    model.direction = new Float64Array(model.direction.slice(0, 9));\n  }\n\n  model.indexToWorld = new Float64Array(16);\n  model.worldToIndex = new Float64Array(16); // Set/Get methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['direction', 'indexToWorld', 'worldToIndex']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGetArray(publicAPI, model, ['origin', 'spacing'], 3);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.getArray(publicAPI, model, ['extent'], 6); // Object specific methods\n\n  vtkImageData(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkImageData'); // ----------------------------------------------------------------------------\n\nvar vtkImageData$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkImageData$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/ImageData.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/Line.js":
/*!***************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/Line.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"STATIC\": () => (/* binding */ STATIC),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Line_Constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Line/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/Line/Constants.js\");\n/* harmony import */ var _Cell_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Cell.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/Cell.js\");\n/* harmony import */ var _Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar IntersectionState = _Line_Constants_js__WEBPACK_IMPORTED_MODULE_2__.default.IntersectionState; // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n\nfunction distanceToLine(x, p1, p2) {\n  var closestPoint = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n  var outObj = {\n    t: Number.MIN_VALUE,\n    distance: 0\n  };\n  var p21 = [];\n  var closest; // Determine appropriate vector\n\n  p21[0] = p2[0] - p1[0];\n  p21[1] = p2[1] - p1[1];\n  p21[2] = p2[2] - p1[2]; // Get parametric location\n\n  var num = p21[0] * (x[0] - p1[0]) + p21[1] * (x[1] - p1[1]) + p21[2] * (x[2] - p1[2]);\n  var denom = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.d)(p21, p21); // trying to avoid an expensive fabs\n\n  var tolerance = 1e-5 * num;\n\n  if (denom !== 0.0) {\n    outObj.t = num / denom;\n  }\n\n  if (tolerance < 0.0) {\n    tolerance = -tolerance;\n  }\n\n  if (-tolerance < denom && denom < tolerance) {\n    closest = p1;\n  } else if (denom <= 0.0 || outObj.t < 0.0) {\n    // If parametric coordinate is within 0<=p<=1, then the point is closest to\n    // the line.  Otherwise, it's closest to a point at the end of the line.\n    closest = p1;\n  } else if (outObj.t > 1.0) {\n    closest = p2;\n  } else {\n    closest = p21;\n    p21[0] = p1[0] + outObj.t * p21[0];\n    p21[1] = p1[1] + outObj.t * p21[1];\n    p21[2] = p1[2] + outObj.t * p21[2];\n  }\n\n  if (closestPoint) {\n    closestPoint[0] = closest[0];\n    closestPoint[1] = closest[1];\n    closestPoint[2] = closest[2];\n  }\n\n  outObj.distance = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.e)(closest, x);\n  return outObj;\n}\n\nfunction intersection(a1, a2, b1, b2, u, v) {\n  var a21 = [];\n  var b21 = [];\n  var b1a1 = [];\n  u[0] = 0.0;\n  v[0] = 0.0; // Determine line vectors.\n\n  a21[0] = a2[0] - a1[0];\n  a21[1] = a2[1] - a1[1];\n  a21[2] = a2[2] - a1[2];\n  b21[0] = b2[0] - b1[0];\n  b21[1] = b2[1] - b1[1];\n  b21[2] = b2[2] - b1[2];\n  b1a1[0] = b1[0] - a1[0];\n  b1a1[1] = b1[1] - a1[1];\n  b1a1[2] = b1[2] - a1[2]; // Compute the system (least squares) matrix.\n\n  var A = [];\n  A[0] = [(0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.d)(a21, a21), -(0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.d)(a21, b21)];\n  A[1] = [A[0][1], (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.d)(b21, b21)]; // Compute the least squares system constant term.\n\n  var c = [];\n  c[0] = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.d)(a21, b1a1);\n  c[1] = -(0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.d)(b21, b1a1); // Solve the system of equations\n\n  if ((0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.s)(A, c, 2) === 0) {\n    // The lines are colinear. Therefore, one of the four endpoints is the\n    // point of closest approach\n    var minDist = Number.MAX_VALUE;\n    var p = [a1, a2, b1, b2];\n    var l1 = [b1, b1, a1, a1];\n    var l2 = [b2, b2, a2, a2];\n    var uv1 = [v[0], v[0], u[0], u[0]];\n    var uv2 = [u[0], u[0], v[0], v[0]];\n    var obj;\n\n    for (var i = 0; i < 4; i++) {\n      obj = distanceToLine(p[i], l1[i], l2[i]);\n\n      if (obj.distance < minDist) {\n        minDist = obj.distance;\n        uv1[i] = obj.t;\n        uv2[i] = i % 2;\n      }\n    }\n\n    return IntersectionState.ON_LINE;\n  }\n\n  u[0] = c[0];\n  v[0] = c[1]; // Check parametric coordinates for intersection.\n\n  if (u[0] >= 0.0 && u[0] <= 1.0 && v[0] >= 0.0 && v[0] <= 1.0) {\n    return IntersectionState.YES_INTERSECTION;\n  }\n\n  return IntersectionState.NO_INTERSECTION;\n} // ----------------------------------------------------------------------------\n// Static API\n// ----------------------------------------------------------------------------\n\n\nvar STATIC = {\n  distanceToLine: distanceToLine,\n  intersection: intersection\n}; // ----------------------------------------------------------------------------\n// vtkLine methods\n// ----------------------------------------------------------------------------\n\nfunction vtkLine(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkLine');\n\n  function isBetweenPoints(t) {\n    return t >= 0.0 && t <= 1.0;\n  }\n\n  publicAPI.getCellDimension = function () {\n    return 1;\n  };\n\n  publicAPI.intersectWithLine = function (p1, p2, tol, x, pcoords) {\n    var outObj = {\n      intersect: 0,\n      t: Number.MAX_VALUE,\n      subId: 0,\n      betweenPoints: null\n    };\n    pcoords[1] = 0.0;\n    pcoords[2] = 0.0;\n    var projXYZ = [];\n    var a1 = [];\n    var a2 = [];\n    model.points.getPoint(0, a1);\n    model.points.getPoint(1, a2);\n    var u = [];\n    var v = [];\n    var intersect = intersection(p1, p2, a1, a2, u, v);\n    outObj.t = u[0];\n    outObj.betweenPoints = isBetweenPoints(outObj.t);\n    pcoords[0] = v[0];\n\n    if (intersect === IntersectionState.YES_INTERSECTION) {\n      // make sure we are within tolerance\n      for (var i = 0; i < 3; i++) {\n        x[i] = a1[i] + pcoords[0] * (a2[i] - a1[i]);\n        projXYZ[i] = p1[i] + outObj.t * (p2[i] - p1[i]);\n      }\n\n      if ((0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.e)(x, projXYZ) <= tol * tol) {\n        outObj.intersect = 1;\n        return outObj;\n      }\n    } else {\n      var outDistance; // check to see if it lies within tolerance\n      // one of the parametric coords must be outside 0-1\n\n      if (outObj.t < 0.0) {\n        outDistance = distanceToLine(p1, a1, a2, x);\n\n        if (outDistance.distance <= tol * tol) {\n          outObj.t = 0.0;\n          outObj.intersect = 1;\n          outObj.betweenPoints = true; // Intersection is near p1\n\n          return outObj;\n        }\n\n        return outObj;\n      }\n\n      if (outObj.t > 1.0) {\n        outDistance = distanceToLine(p2, a1, a2, x);\n\n        if (outDistance.distance <= tol * tol) {\n          outObj.t = 1.0;\n          outObj.intersect = 1;\n          outObj.betweenPoints = true; // Intersection is near p2\n\n          return outObj;\n        }\n\n        return outObj;\n      }\n\n      if (pcoords[0] < 0.0) {\n        pcoords[0] = 0.0;\n        outDistance = distanceToLine(a1, p1, p2, x);\n        outObj.t = outDistance.t;\n\n        if (outDistance.distance <= tol * tol) {\n          outObj.intersect = 1;\n          return outObj;\n        }\n\n        return outObj;\n      }\n\n      if (pcoords[0] > 1.0) {\n        pcoords[0] = 1.0;\n        outDistance = distanceToLine(a2, p1, p2, x);\n        outObj.t = outDistance.t;\n\n        if (outDistance.distance <= tol * tol) {\n          outObj.intersect = 1;\n          return outObj;\n        }\n\n        return outObj;\n      }\n    }\n\n    return outObj;\n  };\n\n  publicAPI.evaluatePosition = function (x, closestPoint, subId, pcoords, dist2, weights) {}; // virtual\n\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues);\n  _Cell_js__WEBPACK_IMPORTED_MODULE_3__.default.extend(publicAPI, model, initialValues);\n  vtkLine(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkLine'); // ----------------------------------------------------------------------------\n\nvar vtkLine$1 = _objectSpread(_objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, STATIC), _Line_Constants_js__WEBPACK_IMPORTED_MODULE_2__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkLine$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/Line.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/Line/Constants.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/Line/Constants.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"IntersectionState\": () => (/* binding */ IntersectionState)\n/* harmony export */ });\nvar IntersectionState = {\n  NO_INTERSECTION: 0,\n  YES_INTERSECTION: 1,\n  ON_LINE: 2\n};\nvar Constants = {\n  IntersectionState: IntersectionState\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/Line/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/Plane.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/Plane.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"STATIC\": () => (/* binding */ STATIC),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance),\n/* harmony export */   \"vtkPlane\": () => (/* binding */ vtkPlane)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar PLANE_TOLERANCE = 1.0e-6;\nvar COINCIDE = 'coincide';\nvar DISJOINT = 'disjoint'; // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n\nfunction evaluate(normal, origin, x) {\n  return normal[0] * (x[0] - origin[0]) + normal[1] * (x[1] - origin[1]) + normal[2] * (x[2] - origin[2]);\n}\n\nfunction distanceToPlane(x, origin, normal) {\n  var distance = normal[0] * (x[0] - origin[0]) + normal[1] * (x[1] - origin[1]) + normal[2] * (x[2] - origin[2]);\n  return Math.abs(distance);\n}\n\nfunction projectPoint(x, origin, normal, xproj) {\n  var xo = [];\n  (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.f)(x, origin, xo);\n  var t = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.d)(normal, xo);\n  xproj[0] = x[0] - t * normal[0];\n  xproj[1] = x[1] - t * normal[1];\n  xproj[2] = x[2] - t * normal[2];\n}\n\nfunction projectVector(v, normal, vproj) {\n  var t = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.d)(v, normal);\n  var n2 = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.d)(normal, normal);\n\n  if (n2 === 0) {\n    n2 = 1.0;\n  }\n\n  vproj[0] = v[0] - t * normal[0] / n2;\n  vproj[1] = v[1] - t * normal[1] / n2;\n  vproj[2] = v[2] - t * normal[2] / n2;\n  return vproj;\n}\n\nfunction generalizedProjectPoint(x, origin, normal, xproj) {\n  var xo = [];\n  (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.f)(x, origin, xo);\n  var t = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.d)(normal, xo);\n  var n2 = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.d)(normal, normal);\n\n  if (n2 !== 0) {\n    xproj[0] = x[0] - t * normal[0] / n2;\n    xproj[1] = x[1] - t * normal[1] / n2;\n    xproj[2] = x[2] - t * normal[2] / n2;\n  } else {\n    xproj[0] = x[0];\n    xproj[1] = x[1];\n    xproj[2] = x[2];\n  }\n}\n\nfunction intersectWithLine(p1, p2, origin, normal) {\n  var outObj = {\n    intersection: false,\n    betweenPoints: false,\n    t: Number.MAX_VALUE,\n    x: []\n  };\n  var p21 = [];\n  var p1Origin = []; // Compute line vector\n\n  (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.f)(p2, p1, p21);\n  (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.f)(origin, p1, p1Origin); // Compute denominator.  If ~0, line and plane are parallel.\n  // const num = vtkMath.dot(normal, origin) - vtkMath.dot(normal, p1);\n\n  var num = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.d)(normal, p1Origin);\n  var den = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.d)(normal, p21); // If denominator with respect to numerator is \"zero\", then the line and\n  // plane are considered parallel.\n\n  var fabsden;\n  var fabstolerance; // Trying to avoid an expensive call to fabs()\n\n  if (den < 0.0) {\n    fabsden = -den;\n  } else {\n    fabsden = den;\n  }\n\n  if (num < 0.0) {\n    fabstolerance = -num * PLANE_TOLERANCE;\n  } else {\n    fabstolerance = num * PLANE_TOLERANCE;\n  }\n\n  if (fabsden <= fabstolerance) {\n    return outObj;\n  } // Where on the line between p1 and p2 is the intersection\n  // If between 0 and 1, it is between the two points. If < 0 it's before p1, if > 1 it's after p2\n\n\n  outObj.t = num / den;\n  outObj.x[0] = p1[0] + outObj.t * p21[0];\n  outObj.x[1] = p1[1] + outObj.t * p21[1];\n  outObj.x[2] = p1[2] + outObj.t * p21[2];\n  outObj.intersection = true;\n  outObj.betweenPoints = outObj.t >= 0.0 && outObj.t <= 1.0;\n  return outObj;\n}\n\nfunction intersectWithPlane(plane1Origin, plane1Normal, plane2Origin, plane2Normal) {\n  var outObj = {\n    intersection: false,\n    l0: [],\n    l1: [],\n    error: null\n  };\n  var cross$1 = [];\n  (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.g)(plane1Normal, plane2Normal, cross$1);\n  var absCross = cross$1.map(function (n) {\n    return Math.abs(n);\n  }); // test if the two planes are parallel\n\n  if (absCross[0] + absCross[1] + absCross[2] < PLANE_TOLERANCE) {\n    // test if disjoint or coincide\n    var v = [];\n    (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.f)(plane1Origin, plane2Origin, v);\n\n    if ((0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.d)(plane1Normal, v) === 0) {\n      outObj.error = COINCIDE;\n    } else {\n      outObj.error = DISJOINT;\n    }\n\n    return outObj;\n  } // Plane1 and Plane2 intersect in a line\n  // first determine max abs coordinate of the cross product\n\n\n  var maxc;\n\n  if (absCross[0] > absCross[1] && absCross[0] > absCross[2]) {\n    maxc = 'x';\n  } else if (absCross[1] > absCross[2]) {\n    maxc = 'y';\n  } else {\n    maxc = 'z';\n  } // To get a point on the intersect line, zero the max coord, and solve for the other two\n\n\n  var iP = []; // intersectionPoint\n  // the constants in the 2 plane equations\n\n  var d1 = -(0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.d)(plane1Normal, plane1Origin);\n  var d2 = -(0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.d)(plane2Normal, plane2Origin); // eslint-disable-next-line default-case\n\n  switch (maxc) {\n    case 'x':\n      // intersect with x=0\n      iP[0] = 0;\n      iP[1] = (d2 * plane1Normal[2] - d1 * plane2Normal[2]) / cross$1[0];\n      iP[2] = (d1 * plane2Normal[1] - d2 * plane1Normal[1]) / cross$1[0];\n      break;\n\n    case 'y':\n      // intersect with y=0\n      iP[0] = (d1 * plane2Normal[2] - d2 * plane1Normal[2]) / cross$1[1];\n      iP[1] = 0;\n      iP[2] = (d2 * plane1Normal[0] - d1 * plane2Normal[0]) / cross$1[1];\n      break;\n\n    case 'z':\n      // intersect with z=0\n      iP[0] = (d2 * plane1Normal[1] - d1 * plane2Normal[1]) / cross$1[2];\n      iP[1] = (d1 * plane2Normal[0] - d2 * plane1Normal[0]) / cross$1[2];\n      iP[2] = 0;\n      break;\n  }\n\n  outObj.l0 = iP;\n  (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.j)(iP, cross$1, outObj.l1);\n  outObj.intersection = true;\n  return outObj;\n} // ----------------------------------------------------------------------------\n// Static API\n// ----------------------------------------------------------------------------\n\n\nvar STATIC = {\n  evaluate: evaluate,\n  distanceToPlane: distanceToPlane,\n  projectPoint: projectPoint,\n  projectVector: projectVector,\n  generalizedProjectPoint: generalizedProjectPoint,\n  intersectWithLine: intersectWithLine,\n  intersectWithPlane: intersectWithPlane,\n  DISJOINT: DISJOINT,\n  COINCIDE: COINCIDE\n}; // ----------------------------------------------------------------------------\n// vtkPlane methods\n// ----------------------------------------------------------------------------\n\nfunction vtkPlane(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkPlane');\n\n  publicAPI.distanceToPlane = function (x) {\n    return distanceToPlane(x, model.origin, model.normal);\n  };\n\n  publicAPI.projectPoint = function (x, xproj) {\n    projectPoint(x, model.origin, model.normal, xproj);\n  };\n\n  publicAPI.projectVector = function (v, vproj) {\n    return projectVector(v, model.normal, vproj);\n  };\n\n  publicAPI.push = function (distance) {\n    if (distance === 0.0) {\n      return;\n    }\n\n    for (var i = 0; i < 3; i++) {\n      model.origin[i] += distance * model.normal[i];\n    }\n  };\n\n  publicAPI.generalizedProjectPoint = function (x, xproj) {\n    generalizedProjectPoint(x, model.origin, model.normal, xproj);\n  };\n\n  publicAPI.evaluateFunction = function (x, y, z) {\n    if (!Array.isArray(x)) {\n      return model.normal[0] * (x - model.origin[0]) + model.normal[1] * (y - model.origin[1]) + model.normal[2] * (z - model.origin[2]);\n    }\n\n    return model.normal[0] * (x[0] - model.origin[0]) + model.normal[1] * (x[1] - model.origin[1]) + model.normal[2] * (x[2] - model.origin[2]);\n  };\n\n  publicAPI.evaluateGradient = function (xyz) {\n    var retVal = [model.normal[0], model.normal[1], model.normal[2]];\n    return retVal;\n  };\n\n  publicAPI.intersectWithLine = function (p1, p2) {\n    return intersectWithLine(p1, p2, model.origin, model.normal);\n  };\n\n  publicAPI.intersectWithPlane = function (planeOrigin, planeNormal) {\n    return intersectWithPlane(planeOrigin, planeNormal, model.origin, model.normal);\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\nvar DEFAULT_VALUES = {\n  normal: [0.0, 0.0, 1.0],\n  origin: [0.0, 0.0, 0.0]\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.setGetArray(publicAPI, model, ['normal', 'origin'], 3);\n  vtkPlane(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance(extend, 'vtkPlane'); // ----------------------------------------------------------------------------\n\nvar vtkPlane$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, STATIC);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkPlane$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/Plane.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/PointSet.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/PointSet.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _vtk_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../vtk.js */ \"./node_modules/@kitware/vtk.js/vtk.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _DataSet_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DataSet.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/DataSet.js\");\n/* harmony import */ var _Core_Points_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Core/Points.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Points.js\");\n\n\n\n\n\n// Global methods\n// ----------------------------------------------------------------------------\n// ----------------------------------------------------------------------------\n// vtkPointSet methods\n// ----------------------------------------------------------------------------\n\nfunction vtkPointSet(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkPointSet'); // Create empty points\n\n  if (!model.points) {\n    model.points = _Core_Points_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n  } else {\n    model.points = (0,_vtk_js__WEBPACK_IMPORTED_MODULE_0__.default)(model.points);\n  }\n\n  publicAPI.getNumberOfPoints = function () {\n    return model.points.getNumberOfPoints();\n  };\n\n  publicAPI.getBounds = function () {\n    return model.points.getBounds();\n  };\n\n  publicAPI.computeBounds = function () {\n    publicAPI.getBounds();\n  };\n\n  var superShallowCopy = publicAPI.shallowCopy;\n\n  publicAPI.shallowCopy = function (other) {\n    var debug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    superShallowCopy(other, debug);\n    model.points = _Core_Points_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n    model.points.shallowCopy(other.getPoints());\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {// points: null,\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _DataSet_js__WEBPACK_IMPORTED_MODULE_2__.default.extend(publicAPI, model, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['points']); // Object specific methods\n\n  vtkPointSet(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkPointSet'); // ----------------------------------------------------------------------------\n\nvar vtkPointSet$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkPointSet$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/PointSet.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/PolyData.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/PolyData.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"CELL_FACTORY\": () => (/* binding */ CELL_FACTORY),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _vtk_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../vtk.js */ \"./node_modules/@kitware/vtk.js/vtk.js\");\n/* harmony import */ var _Core_CellArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Core/CellArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/CellArray.js\");\n/* harmony import */ var _CellLinks_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CellLinks.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/CellLinks.js\");\n/* harmony import */ var _CellTypes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CellTypes.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/CellTypes.js\");\n/* harmony import */ var _Line_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Line.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/Line.js\");\n/* harmony import */ var _PointSet_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PointSet.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/PointSet.js\");\n/* harmony import */ var _Triangle_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Triangle.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/Triangle.js\");\n/* harmony import */ var _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CellTypes/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/CellTypes/Constants.js\");\n/* harmony import */ var _PolyData_Constants_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./PolyData/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/PolyData/Constants.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nvar _CELL_FACTORY;\nvar vtkWarningMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkWarningMacro;\nvar CELL_FACTORY = (_CELL_FACTORY = {}, (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__.default)(_CELL_FACTORY, _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_LINE, _Line_js__WEBPACK_IMPORTED_MODULE_6__.default), (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__.default)(_CELL_FACTORY, _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_POLY_LINE, _Line_js__WEBPACK_IMPORTED_MODULE_6__.default), (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__.default)(_CELL_FACTORY, _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_TRIANGLE, _Triangle_js__WEBPACK_IMPORTED_MODULE_8__.default), _CELL_FACTORY); // ----------------------------------------------------------------------------\n// vtkPolyData methods\n// ----------------------------------------------------------------------------\n\nfunction vtkPolyData(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkPolyData');\n\n  function camelize(str) {\n    return str.replace(/(?:^\\w|[A-Z]|\\b\\w)/g, function (letter) {\n      return letter.toUpperCase();\n    }).replace(/\\s+/g, '');\n  } // build empty cell arrays and set methods\n\n\n  _PolyData_Constants_js__WEBPACK_IMPORTED_MODULE_10__.POLYDATA_FIELDS.forEach(function (type) {\n    publicAPI[\"getNumberOf\".concat(camelize(type))] = function () {\n      return model[type].getNumberOfCells();\n    };\n\n    if (!model[type]) {\n      model[type] = _Core_CellArray_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n    } else {\n      model[type] = (0,_vtk_js__WEBPACK_IMPORTED_MODULE_2__.default)(model[type]);\n    }\n  });\n\n  publicAPI.getNumberOfCells = function () {\n    return _PolyData_Constants_js__WEBPACK_IMPORTED_MODULE_10__.POLYDATA_FIELDS.reduce(function (num, cellType) {\n      return num + model[cellType].getNumberOfCells();\n    }, 0);\n  };\n\n  var superShallowCopy = publicAPI.shallowCopy;\n\n  publicAPI.shallowCopy = function (other) {\n    var debug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    superShallowCopy(other, debug);\n    _PolyData_Constants_js__WEBPACK_IMPORTED_MODULE_10__.POLYDATA_FIELDS.forEach(function (type) {\n      model[type] = _Core_CellArray_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n      model[type].shallowCopy(other.getReferenceByName(type));\n    });\n  };\n\n  publicAPI.buildCells = function () {\n    // here are the number of cells we have\n    var nVerts = publicAPI.getNumberOfVerts();\n    var nLines = publicAPI.getNumberOfLines();\n    var nPolys = publicAPI.getNumberOfPolys();\n    var nStrips = publicAPI.getNumberOfStrips(); // pre-allocate the space we need\n\n    var nCells = nVerts + nLines + nPolys + nStrips;\n    var types = new Uint8Array(nCells);\n    var pTypes = types;\n    var locs = new Uint32Array(nCells);\n    var pLocs = locs; // record locations and type of each cell.\n    // verts\n\n    if (nVerts) {\n      var nextCellPts = 0;\n      model.verts.getCellSizes().forEach(function (numCellPts, index) {\n        pLocs[index] = nextCellPts;\n        pTypes[index] = numCellPts > 1 ? _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_POLY_VERTEX : _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_VERTEX;\n        nextCellPts += numCellPts + 1;\n      });\n      pLocs = pLocs.subarray(nVerts);\n      pTypes = pTypes.subarray(nVerts);\n    } // lines\n\n\n    if (nLines) {\n      var _nextCellPts = 0;\n      model.lines.getCellSizes().forEach(function (numCellPts, index) {\n        pLocs[index] = _nextCellPts;\n        pTypes[index] = numCellPts > 2 ? _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_POLY_LINE : _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_LINE;\n\n        if (numCellPts === 1) {\n          vtkWarningMacro('Building VTK_LINE ', index, ' with only one point, but VTK_LINE needs at least two points. Check the input.');\n        }\n\n        _nextCellPts += numCellPts + 1;\n      });\n      pLocs = pLocs.subarray(nLines);\n      pTypes = pTypes.subarray(nLines);\n    } // polys\n\n\n    if (nPolys) {\n      var _nextCellPts2 = 0;\n      model.polys.getCellSizes().forEach(function (numCellPts, index) {\n        pLocs[index] = _nextCellPts2;\n\n        switch (numCellPts) {\n          case 3:\n            pTypes[index] = _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_TRIANGLE;\n            break;\n\n          case 4:\n            pTypes[index] = _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_QUAD;\n            break;\n\n          default:\n            pTypes[index] = _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_POLYGON;\n            break;\n        }\n\n        if (numCellPts < 3) {\n          vtkWarningMacro('Building VTK_TRIANGLE ', index, ' with less than three points, but VTK_TRIANGLE needs at least three points. Check the input.');\n        }\n\n        _nextCellPts2 += numCellPts + 1;\n      });\n      pLocs += pLocs.subarray(nPolys);\n      pTypes += pTypes.subarray(nPolys);\n    } // strips\n\n\n    if (nStrips) {\n      var _nextCellPts3 = 0;\n      pTypes.fill(_CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_TRIANGLE_STRIP, 0, nStrips);\n      model.strips.getCellSizes().forEach(function (numCellPts, index) {\n        pLocs[index] = _nextCellPts3;\n        _nextCellPts3 += numCellPts + 1;\n      });\n    } // set up the cell types data structure\n\n\n    model.cells = _CellTypes_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance();\n    model.cells.setCellTypes(nCells, types, locs);\n  };\n  /**\n   * Create upward links from points to cells that use each point. Enables\n   * topologically complex queries.\n   */\n\n\n  publicAPI.buildLinks = function () {\n    var initialSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n    if (model.cells === undefined) {\n      publicAPI.buildCells();\n    }\n\n    model.links = _CellLinks_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n\n    if (initialSize > 0) {\n      model.links.allocate(initialSize);\n    } else {\n      model.links.allocate(publicAPI.getPoints().getNumberOfPoints());\n    }\n\n    model.links.buildLinks(publicAPI);\n  }; // Returns an object made of the cellType and a subarray `cellPointIds` of\n  // the cell points.\n\n\n  publicAPI.getCellPoints = function (cellId) {\n    var cellType = model.cells.getCellType(cellId);\n    var cells = null;\n\n    switch (cellType) {\n      case _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_VERTEX:\n      case _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_POLY_VERTEX:\n        cells = model.verts;\n        break;\n\n      case _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_LINE:\n      case _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_POLY_LINE:\n        cells = model.lines;\n        break;\n\n      case _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_TRIANGLE:\n      case _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_QUAD:\n      case _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_POLYGON:\n        cells = model.polys;\n        break;\n\n      case _CellTypes_Constants_js__WEBPACK_IMPORTED_MODULE_9__.CellType.VTK_TRIANGLE_STRIP:\n        cells = model.strips;\n        break;\n\n      default:\n        cells = null;\n        return {\n          type: 0,\n          cellPointIds: null\n        };\n    }\n\n    var loc = model.cells.getCellLocation(cellId);\n    var cellPointIds = cells.getCell(loc);\n    return {\n      cellType: cellType,\n      cellPointIds: cellPointIds\n    };\n  };\n\n  publicAPI.getPointCells = function (ptId) {\n    return model.links.getCells(ptId);\n  };\n\n  publicAPI.getCellEdgeNeighbors = function (cellId, point1, point2) {\n    var link1 = model.links.getLink(point1);\n    var link2 = model.links.getLink(point2);\n    return link1.cells.filter(function (cell) {\n      return cell !== cellId && link2.cells.indexOf(cell) !== -1;\n    });\n  };\n  /**\n   * If you know the type of cell, you may provide it to improve performances.\n   */\n\n\n  publicAPI.getCell = function (cellId) {\n    var cellHint = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n    var cellInfo = publicAPI.getCellPoints(cellId);\n    var cell = cellHint || CELL_FACTORY[cellInfo.cellType].newInstance();\n    cell.initialize(publicAPI.getPoints(), cellInfo.cellPointIds);\n    return cell;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {// verts: null,\n  // lines: null,\n  // polys: null,\n  // strips: null,\n  // cells: null,\n  // links: null,\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _PointSet_js__WEBPACK_IMPORTED_MODULE_7__.default.extend(publicAPI, model, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['cells', 'links']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['verts', 'lines', 'polys', 'strips']); // Object specific methods\n\n  vtkPolyData(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkPolyData'); // ----------------------------------------------------------------------------\n\nvar vtkPolyData$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkPolyData$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/PolyData.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/PolyData/Constants.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/PolyData/Constants.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"POLYDATA_FIELDS\": () => (/* binding */ POLYDATA_FIELDS)\n/* harmony export */ });\nvar POLYDATA_FIELDS = ['verts', 'lines', 'polys', 'strips'];\nvar Constants = {\n  POLYDATA_FIELDS: POLYDATA_FIELDS\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/PolyData/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/SelectionNode.js":
/*!************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/SelectionNode.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _SelectionNode_Constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SelectionNode/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/SelectionNode/Constants.js\");\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\n// vtkSelectionNode methods\n// ----------------------------------------------------------------------------\n\nfunction vtkSelectionNode(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkSelectionNode');\n\n  publicAPI.getBounds = function () {\n    return model.points.getBounds();\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  contentType: -1,\n  fieldType: -1,\n  properties: null,\n  selectionList: []\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  model.properties = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['contentType', 'fieldType', 'properties', 'selectionList']); // Object specific methods\n\n  vtkSelectionNode(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkSelectionNode'); // ----------------------------------------------------------------------------\n\nvar vtkSelectionNode$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, _SelectionNode_Constants_js__WEBPACK_IMPORTED_MODULE_2__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkSelectionNode$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/SelectionNode.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/SelectionNode/Constants.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/SelectionNode/Constants.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"SelectionContent\": () => (/* binding */ SelectionContent),\n/* harmony export */   \"SelectionField\": () => (/* binding */ SelectionField)\n/* harmony export */ });\n/**\n * The (primary) property that describes the content of a selection\n * node's data. Other auxiliary description properties follow.\n * GLOBALIDS means that the selection list contains values from the\n * vtkDataSetAttribute array of the same name.\n * PEDIGREEIDS means that the selection list contains values from the\n * vtkDataSetAttribute array of the same name.\n * VALUES means the the selection list contains values from an\n * arbitrary attribute array (ignores any globalids attribute)\n * INDICES means that the selection list contains indexes into the\n * cell or point arrays.\n * FRUSTUM means the set of points and cells inside a frustum\n * LOCATIONS means the set of points and cells near a set of positions\n * THRESHOLDS means the points and cells with values within a set of ranges\n * getContentType() returns -1 if the content type is not set.\n */\n// Specify how data arrays can be used by data objects\nvar SelectionContent = {\n  GLOBALIDS: 0,\n  PEDIGREEIDS: 1,\n  VALUES: 2,\n  INDICES: 3,\n  FRUSTUM: 4,\n  LOCATIONS: 5,\n  THRESHOLDS: 6,\n  BLOCKS: 7,\n  QUERY: 8\n};\nvar SelectionField = {\n  CELL: 0,\n  POINT: 1,\n  FIELD: 2,\n  VERTEX: 3,\n  EDGE: 4,\n  ROW: 5\n};\nvar Constants = {\n  SelectionContent: SelectionContent,\n  SelectionField: SelectionField\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/SelectionNode/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/StructuredData.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/StructuredData.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"getDataDescriptionFromExtent\": () => (/* binding */ getDataDescriptionFromExtent)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StructuredData/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/StructuredData/Constants.js\");\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar StructuredType = _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_1__.default.StructuredType;\nfunction getDataDescriptionFromExtent(inExt) {\n  var dataDim = 0;\n\n  for (var i = 0; i < 3; ++i) {\n    if (inExt[i * 2] < inExt[i * 2 + 1]) {\n      dataDim++;\n    }\n  }\n\n  if (inExt[0] > inExt[1] || inExt[2] > inExt[3] || inExt[4] > inExt[5]) {\n    return StructuredType.EMPTY;\n  }\n\n  if (dataDim === 3) {\n    return StructuredType.XYZ_GRID;\n  }\n\n  if (dataDim === 2) {\n    if (inExt[0] === inExt[1]) {\n      return StructuredType.YZ_PLANE;\n    }\n\n    if (inExt[2] === inExt[3]) {\n      return StructuredType.XZ_PLANE;\n    }\n\n    return StructuredType.XY_PLANE;\n  }\n\n  if (dataDim === 1) {\n    if (inExt[0] < inExt[1]) {\n      return StructuredType.X_LINE;\n    }\n\n    if (inExt[2] < inExt[3]) {\n      return StructuredType.Y_LINE;\n    }\n\n    return StructuredType.Z_LINE;\n  }\n\n  return StructuredType.SINGLE_POINT;\n}\nvar vtkStructuredData = _objectSpread({\n  getDataDescriptionFromExtent: getDataDescriptionFromExtent\n}, _StructuredData_Constants_js__WEBPACK_IMPORTED_MODULE_1__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkStructuredData);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/StructuredData.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/StructuredData/Constants.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/StructuredData/Constants.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"StructuredType\": () => (/* binding */ StructuredType)\n/* harmony export */ });\nvar StructuredType = {\n  UNCHANGED: 0,\n  SINGLE_POINT: 1,\n  X_LINE: 2,\n  Y_LINE: 3,\n  Z_LINE: 4,\n  XY_PLANE: 5,\n  YZ_PLANE: 6,\n  XZ_PLANE: 7,\n  XYZ_GRID: 8,\n  EMPTY: 9\n};\nvar Constants = {\n  StructuredType: StructuredType\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/StructuredData/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Common/DataModel/Triangle.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Common/DataModel/Triangle.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"STATIC\": () => (/* binding */ STATIC),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Cell_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Cell.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/Cell.js\");\n/* harmony import */ var _Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _Line_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Line.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/Line.js\");\n/* harmony import */ var _Plane_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Plane.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/Plane.js\");\n\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\n// Global methods\n// ----------------------------------------------------------------------------\n\nfunction computeNormalDirection(v1, v2, v3, n) {\n  // order is important!!! maintain consistency with triangle vertex order\n  var ax = v3[0] - v2[0];\n  var ay = v3[1] - v2[1];\n  var az = v3[2] - v2[2];\n  var bx = v1[0] - v2[0];\n  var by = v1[1] - v2[1];\n  var bz = v1[2] - v2[2];\n  n[0] = ay * bz - az * by;\n  n[1] = az * bx - ax * bz;\n  n[2] = ax * by - ay * bx;\n}\n\nfunction computeNormal(v1, v2, v3, n) {\n  computeNormalDirection(v1, v2, v3, n);\n  var length = Math.sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);\n\n  if (length !== 0.0) {\n    n[0] /= length;\n    n[1] /= length;\n    n[2] /= length;\n  }\n} // ----------------------------------------------------------------------------\n// Static API\n// ----------------------------------------------------------------------------\n\n\nvar STATIC = {\n  computeNormalDirection: computeNormalDirection,\n  computeNormal: computeNormal\n}; // ----------------------------------------------------------------------------\n// vtkTriangle methods\n// ----------------------------------------------------------------------------\n\nfunction vtkTriangle(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkTriangle');\n\n  publicAPI.getCellDimension = function () {\n    return 2;\n  };\n\n  publicAPI.intersectWithLine = function (p1, p2, tol, x, pcoords) {\n    var outObj = {\n      subId: 0,\n      t: Number.MAX_VALUE,\n      intersect: 0,\n      betweenPoints: false\n    };\n    pcoords[2] = 0.0;\n    var closestPoint = [];\n    var tol2 = tol * tol; // Get normal for triangle\n\n    var pt1 = [];\n    var pt2 = [];\n    var pt3 = [];\n    model.points.getPoint(0, pt1);\n    model.points.getPoint(1, pt2);\n    model.points.getPoint(2, pt3);\n    var n = [];\n    var weights = [];\n    computeNormal(pt1, pt2, pt3, n);\n\n    if (n[0] !== 0 || n[1] !== 0 || n[2] !== 0) {\n      // Intersect plane of triangle with line\n      var plane = _Plane_js__WEBPACK_IMPORTED_MODULE_5__.default.intersectWithLine(p1, p2, pt1, n);\n      outObj.betweenPoints = plane.betweenPoints;\n      outObj.t = plane.t;\n      x[0] = plane.x[0];\n      x[1] = plane.x[1];\n      x[2] = plane.x[2];\n\n      if (!plane.intersection) {\n        pcoords[0] = 0.0;\n        pcoords[1] = 0.0;\n        outObj.intersect = 0;\n        return outObj;\n      } // Evaluate position\n\n\n      var inside = publicAPI.evaluatePosition(x, closestPoint, pcoords, weights);\n\n      if (inside.evaluation >= 0) {\n        if (inside.dist2 <= tol2) {\n          outObj.intersect = 1;\n          return outObj;\n        }\n\n        outObj.intersect = inside.evaluation;\n        return outObj;\n      }\n    } // Normals are null, so the triangle is degenerated and\n    // we still need to check intersection between line and\n    // the longest edge.\n\n\n    var dist2Pt1Pt2 = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.e)(pt1, pt2);\n    var dist2Pt2Pt3 = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.e)(pt2, pt3);\n    var dist2Pt3Pt1 = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.e)(pt3, pt1);\n\n    if (!model.line) {\n      model.line = _Line_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n    }\n\n    if (dist2Pt1Pt2 > dist2Pt2Pt3 && dist2Pt1Pt2 > dist2Pt3Pt1) {\n      model.line.getPoints().setPoint(0, pt1);\n      model.line.getPoints().setPoint(1, pt2);\n    } else if (dist2Pt2Pt3 > dist2Pt3Pt1 && dist2Pt2Pt3 > dist2Pt1Pt2) {\n      model.line.getPoints().setPoint(0, pt2);\n      model.line.getPoints().setPoint(1, pt3);\n    } else {\n      model.line.getPoints().setPoint(0, pt3);\n      model.line.getPoints().setPoint(1, pt1);\n    }\n\n    var intersectLine = model.line.intersectWithLine(p1, p2, tol, x, pcoords);\n    outObj.betweenPoints = intersectLine.betweenPoints;\n    outObj.t = intersectLine.t;\n\n    if (intersectLine.intersect) {\n      var pt3Pt1 = [];\n      var pt3Pt2 = [];\n      var pt3X = []; // Compute r and s manually, using dot and norm.\n\n      for (var i = 0; i < 3; i++) {\n        pt3Pt1[i] = pt1[i] - pt3[i];\n        pt3Pt2[i] = pt2[i] - pt3[i];\n        pt3X[i] = x[i] - pt3[i];\n      }\n\n      pcoords[0] = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.d)(pt3X, pt3Pt1) / dist2Pt3Pt1;\n      pcoords[1] = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.d)(pt3X, pt3Pt2) / dist2Pt2Pt3;\n      outObj.intersect = 1;\n      return outObj;\n    }\n\n    pcoords[0] = 0.0;\n    pcoords[1] = 0.0;\n    outObj.intersect = 0;\n    return outObj;\n  };\n\n  publicAPI.evaluatePosition = function (x, closestPoint, pcoords, weights) {\n    // will return obj\n    var outObj = {\n      subId: 0,\n      dist2: 0,\n      evaluation: -1\n    };\n    var i;\n    var j;\n    var pt1 = [];\n    var pt2 = [];\n    var pt3 = [];\n    var n = [];\n    var fabsn;\n    var rhs = [];\n    var c1 = [];\n    var c2 = [];\n    var det = 0;\n    var idx = 0;\n    var indices = [];\n    var dist2Point;\n    var dist2Line1;\n    var dist2Line2;\n    var closest = [];\n    var closestPoint1 = [];\n    var closestPoint2 = [];\n    var cp = [];\n    outObj.subId = 0;\n    pcoords[2] = 0.0; // Get normal for triangle, only the normal direction is needed, i.e. the\n    // normal need not be normalized (unit length)\n    //\n\n    model.points.getPoint(1, pt1);\n    model.points.getPoint(2, pt2);\n    model.points.getPoint(0, pt3);\n    computeNormalDirection(pt1, pt2, pt3, n); // Project point to plane\n\n    _Plane_js__WEBPACK_IMPORTED_MODULE_5__.default.generalizedProjectPoint(x, pt1, n, cp); // Construct matrices.  Since we have over determined system, need to find\n    // which 2 out of 3 equations to use to develop equations. (Any 2 should\n    // work since we've projected point to plane.)\n\n    var maxComponent = 0.0;\n\n    for (i = 0; i < 3; i++) {\n      // trying to avoid an expensive call to fabs()\n      if (n[i] < 0) {\n        fabsn = -n[i];\n      } else {\n        fabsn = n[i];\n      }\n\n      if (fabsn > maxComponent) {\n        maxComponent = fabsn;\n        idx = i;\n      }\n    }\n\n    for (j = 0, i = 0; i < 3; i++) {\n      if (i !== idx) {\n        indices[j++] = i;\n      }\n    }\n\n    for (i = 0; i < 2; i++) {\n      rhs[i] = cp[indices[i]] - pt3[indices[i]];\n      c1[i] = pt1[indices[i]] - pt3[indices[i]];\n      c2[i] = pt2[indices[i]] - pt3[indices[i]];\n    }\n\n    det = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.l)(c1, c2);\n\n    if (det === 0.0) {\n      pcoords[0] = 0.0;\n      pcoords[1] = 0.0;\n      outObj.evaluation = -1;\n      return outObj;\n    }\n\n    pcoords[0] = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.l)(rhs, c2) / det;\n    pcoords[1] = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.l)(c1, rhs) / det; // Okay, now find closest point to element\n\n    weights[0] = 1 - (pcoords[0] + pcoords[1]);\n    weights[1] = pcoords[0];\n    weights[2] = pcoords[1];\n\n    if (weights[0] >= 0.0 && weights[0] <= 1.0 && weights[1] >= 0.0 && weights[1] <= 1.0 && weights[2] >= 0.0 && weights[2] <= 1.0) {\n      // projection distance\n      if (closestPoint) {\n        outObj.dist2 = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.e)(cp, x);\n        closestPoint[0] = cp[0];\n        closestPoint[1] = cp[1];\n        closestPoint[2] = cp[2];\n      }\n\n      outObj.evaluation = 1;\n    } else {\n      var t;\n\n      if (closestPoint) {\n        if (weights[1] < 0.0 && weights[2] < 0.0) {\n          dist2Point = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.e)(x, pt3);\n          dist2Line1 = _Line_js__WEBPACK_IMPORTED_MODULE_4__.default.distanceToLine(x, pt1, pt3, t, closestPoint1);\n          dist2Line2 = _Line_js__WEBPACK_IMPORTED_MODULE_4__.default.distanceToLine(x, pt3, pt2, t, closestPoint2);\n\n          if (dist2Point < dist2Line1) {\n            outObj.dist2 = dist2Point;\n            closest = pt3;\n          } else {\n            outObj.dist2 = dist2Line1;\n            closest = closestPoint1;\n          }\n\n          if (dist2Line2 < outObj.dist2) {\n            outObj.dist2 = dist2Line2;\n            closest = closestPoint2;\n          }\n\n          for (i = 0; i < 3; i++) {\n            closestPoint[i] = closest[i];\n          }\n        } else if (weights[2] < 0.0 && weights[0] < 0.0) {\n          dist2Point = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.e)(x, pt1);\n          dist2Line1 = _Line_js__WEBPACK_IMPORTED_MODULE_4__.default.distanceToLine(x, pt1, pt3, t, closestPoint1);\n          dist2Line2 = _Line_js__WEBPACK_IMPORTED_MODULE_4__.default.distanceToLine(x, pt1, pt2, t, closestPoint2);\n\n          if (dist2Point < dist2Line1) {\n            outObj.dist2 = dist2Point;\n            closest = pt1;\n          } else {\n            outObj.dist2 = dist2Line1;\n            closest = closestPoint1;\n          }\n\n          if (dist2Line2 < outObj.dist2) {\n            outObj.dist2 = dist2Line2;\n            closest = closestPoint2;\n          }\n\n          for (i = 0; i < 3; i++) {\n            closestPoint[i] = closest[i];\n          }\n        } else if (weights[1] < 0.0 && weights[0] < 0.0) {\n          dist2Point = (0,_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.e)(x, pt2);\n          dist2Line1 = _Line_js__WEBPACK_IMPORTED_MODULE_4__.default.distanceToLine(x, pt2, pt3, t, closestPoint1);\n          dist2Line2 = _Line_js__WEBPACK_IMPORTED_MODULE_4__.default.distanceToLine(x, pt1, pt2, t, closestPoint2);\n\n          if (dist2Point < dist2Line1) {\n            outObj.dist2 = dist2Point;\n            closest = pt2;\n          } else {\n            outObj.dist2 = dist2Line1;\n            closest = closestPoint1;\n          }\n\n          if (dist2Line2 < outObj.dist2) {\n            outObj.dist2 = dist2Line2;\n            closest = closestPoint2;\n          }\n\n          for (i = 0; i < 3; i++) {\n            closestPoint[i] = closest[i];\n          }\n        } else if (weights[0] < 0.0) {\n          var lineDistance = _Line_js__WEBPACK_IMPORTED_MODULE_4__.default.distanceToLine(x, pt1, pt2, closestPoint);\n          outObj.dist2 = lineDistance.distance;\n        } else if (weights[1] < 0.0) {\n          var _lineDistance = _Line_js__WEBPACK_IMPORTED_MODULE_4__.default.distanceToLine(x, pt2, pt3, closestPoint);\n\n          outObj.dist2 = _lineDistance.distance;\n        } else if (weights[2] < 0.0) {\n          var _lineDistance2 = _Line_js__WEBPACK_IMPORTED_MODULE_4__.default.distanceToLine(x, pt1, pt3, closestPoint);\n\n          outObj.dist2 = _lineDistance2.distance;\n        }\n      }\n\n      outObj.evaluation = 0;\n    }\n\n    return outObj;\n  };\n\n  publicAPI.evaluateLocation = function (pcoords, x, weights) {\n    var p0 = [];\n    var p1 = [];\n    var p2 = [];\n    model.points.getPoint(0, p0);\n    model.points.getPoint(1, p1);\n    model.points.getPoint(2, p2);\n    var u3 = 1.0 - pcoords[0] - pcoords[1];\n\n    for (var i = 0; i < 3; i++) {\n      x[i] = p0[i] * u3 + p1[i] * pcoords[0] + p2[i] * pcoords[1];\n    }\n\n    weights[0] = u3;\n    weights[1] = pcoords[0];\n    weights[2] = pcoords[1];\n  };\n\n  publicAPI.getParametricDistance = function (pcoords) {\n    var pDist;\n    var pDistMax = 0.0;\n    var pc = [];\n    pc[0] = pcoords[0];\n    pc[1] = pcoords[1];\n    pc[2] = 1.0 - pcoords[0] - pcoords[1];\n\n    for (var i = 0; i < 3; i++) {\n      if (pc[i] < 0.0) {\n        pDist = -pc[i];\n      } else if (pc[i] > 1.0) {\n        pDist = pc[i] - 1.0;\n      } else {\n        // inside the cell in the parametric direction\n        pDist = 0.0;\n      }\n\n      if (pDist > pDistMax) {\n        pDistMax = pDist;\n      }\n    }\n\n    return pDistMax;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues);\n  _Cell_js__WEBPACK_IMPORTED_MODULE_2__.default.extend(publicAPI, model, initialValues);\n  vtkTriangle(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkTriangle'); // ----------------------------------------------------------------------------\n\nvar vtkTriangle$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, STATIC);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkTriangle$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Common/DataModel/Triangle.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/IO/Core/BinaryHelper.js":
/*!**************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/IO/Core/BinaryHelper.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * Converts a binary buffer in an ArrayBuffer to a string.\n *\n * Note this does not take encoding into consideration, so don't\n * expect proper Unicode or any other encoding.\n */\nfunction arrayBufferToString(arrayBuffer) {\n  if ('TextDecoder' in window) {\n    var decoder = new TextDecoder('latin1');\n    return decoder.decode(arrayBuffer);\n  } // fallback on platforms w/o TextDecoder\n\n\n  var byteArray = new Uint8Array(arrayBuffer);\n  var strArr = [];\n\n  for (var i = 0; i < byteArray.length; ++i) {\n    strArr[i] = String.fromCharCode(byteArray[i]);\n  }\n\n  return strArr.join('');\n}\n/**\n * Extracts binary data out of a file ArrayBuffer given a prefix/suffix.\n */\n\n\nfunction extractBinary(arrayBuffer, prefixRegex) {\n  var suffixRegex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n  var str = arrayBufferToString(arrayBuffer);\n  var prefixMatch = prefixRegex.exec(str);\n\n  if (!prefixMatch) {\n    return {\n      text: str\n    };\n  }\n\n  var dataStartIndex = prefixMatch.index + prefixMatch[0].length;\n  var strFirstHalf = str.substring(0, dataStartIndex);\n  var retVal = null;\n  var suffixMatch = suffixRegex ? suffixRegex.exec(str) : null;\n\n  if (suffixMatch) {\n    var strSecondHalf = str.substr(suffixMatch.index);\n    retVal = {\n      text: strFirstHalf + strSecondHalf,\n      binaryBuffer: arrayBuffer.slice(dataStartIndex, suffixMatch.index)\n    };\n  } else {\n    // no suffix, so just take all the data starting from dataStartIndex\n    retVal = {\n      text: strFirstHalf,\n      binaryBuffer: arrayBuffer.slice(dataStartIndex)\n    };\n  }\n\n  return retVal;\n}\n\nvar BinaryHelper = {\n  arrayBufferToString: arrayBufferToString,\n  extractBinary: extractBinary\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BinaryHelper);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/IO/Core/BinaryHelper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper.js":
/*!******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"get\": () => (/* binding */ get),\n/* harmony export */   \"has\": () => (/* binding */ has),\n/* harmony export */   \"registerType\": () => (/* binding */ registerType)\n/* harmony export */ });\nvar TYPE_MAPPING = {};\nfunction has(type) {\n  return !!TYPE_MAPPING[type];\n}\nfunction get() {\n  var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'http';\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return TYPE_MAPPING[type](options);\n}\nfunction registerType(type, fn) {\n  TYPE_MAPPING[type] = fn;\n}\nvar DataAccessHelper = {\n  get: get,\n  has: has,\n  registerType: registerType\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DataAccessHelper);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../vendor/pako/dist/pako.esm.mjs */ \"./node_modules/@kitware/vtk.js/vendor/pako/dist/pako.esm.mjs\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_Core_Base64_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Common/Core/Base64.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Base64.js\");\n/* harmony import */ var _Common_Core_Endian_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Common/Core/Endian.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Endian.js\");\n/* harmony import */ var _Common_Core_DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Common/Core/DataArray/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray/Constants.js\");\n/* harmony import */ var _DataAccessHelper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../DataAccessHelper.js */ \"./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper.js\");\n\n\n\n\n\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkErrorMacro,\n    vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkDebugMacro;\nvar requestCount = 0;\n\nfunction getContent(url) {\n  var el = document.querySelector(\".webResource[data-url=\\\"\".concat(url, \"\\\"]\"));\n  return el ? el.innerHTML : null;\n}\n\nfunction getElement(url) {\n  return document.querySelector(\".webResource[data-url=\\\"\".concat(url, \"\\\"]\"));\n}\n\nfunction removeLeadingSlash(str) {\n  return str[0] === '/' ? str.substr(1) : str;\n}\n\nfunction fetchText() {\n  var url = arguments.length > 1 ? arguments[1] : undefined;\n  return new Promise(function (resolve, reject) {\n    var txt = getContent(url);\n\n    if (txt === null) {\n      reject(new Error(\"No such text \".concat(url)));\n    } else {\n      resolve(txt);\n    }\n  });\n}\n\nfunction fetchJSON() {\n  var url = arguments.length > 1 ? arguments[1] : undefined;\n  return new Promise(function (resolve, reject) {\n    var txt = getContent(removeLeadingSlash(url));\n\n    if (txt === null) {\n      reject(new Error(\"No such JSON \".concat(url)));\n    } else {\n      resolve(JSON.parse(txt));\n    }\n  });\n}\n\nfunction fetchArray() {\n  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var baseURL = arguments.length > 1 ? arguments[1] : undefined;\n  var array = arguments.length > 2 ? arguments[2] : undefined;\n  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  return new Promise(function (resolve, reject) {\n    var url = removeLeadingSlash([baseURL, array.ref.basepath, options.compression ? \"\".concat(array.ref.id, \".gz\") : array.ref.id].join('/'));\n    var txt = getContent(url);\n\n    if (txt === null) {\n      reject(new Error(\"No such array \".concat(url)));\n    } else {\n      if (array.dataType === 'string') {\n        var bText = atob(txt);\n\n        if (options.compression) {\n          bText = _vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.p.inflate(bText, {\n            to: 'string'\n          });\n        }\n\n        array.values = JSON.parse(bText);\n      } else {\n        var uint8array = new Uint8Array(_Common_Core_Base64_js__WEBPACK_IMPORTED_MODULE_2__.default.toArrayBuffer(txt));\n        array.buffer = new ArrayBuffer(uint8array.length); // copy uint8array to buffer\n\n        var view = new Uint8Array(array.buffer);\n        view.set(uint8array);\n\n        if (options.compression) {\n          if (array.dataType === 'string' || array.dataType === 'JSON') {\n            array.buffer = _vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.p.inflate(new Uint8Array(array.buffer), {\n              to: 'string'\n            });\n          } else {\n            array.buffer = _vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.p.inflate(new Uint8Array(array.buffer)).buffer;\n          }\n        }\n\n        if (array.ref.encode === 'JSON') {\n          array.values = JSON.parse(array.buffer);\n        } else {\n          if (_Common_Core_Endian_js__WEBPACK_IMPORTED_MODULE_3__.default.ENDIANNESS !== array.ref.encode && _Common_Core_Endian_js__WEBPACK_IMPORTED_MODULE_3__.default.ENDIANNESS) {\n            // Need to swap bytes\n            vtkDebugMacro(\"Swap bytes of \".concat(array.name));\n            _Common_Core_Endian_js__WEBPACK_IMPORTED_MODULE_3__.default.swapBytes(array.buffer, _Common_Core_DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_4__.DataTypeByteSize[array.dataType]);\n          }\n\n          array.values = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newTypedArray(array.dataType, array.buffer);\n        }\n\n        if (array.values.length !== array.size) {\n          vtkErrorMacro(\"Error in FetchArray: \".concat(array.name, \" does not have the proper array size. Got \").concat(array.values.length, \", instead of \").concat(array.size));\n        }\n      } // Done with the ref and work\n\n\n      delete array.ref;\n\n      if (--requestCount === 0 && instance.invokeBusy) {\n        instance.invokeBusy(false);\n      }\n\n      if (instance.modified) {\n        instance.modified();\n      }\n\n      resolve(array);\n    }\n  });\n} // ----------------------------------------------------------------------------\n\n\nfunction fetchImage() {\n  var url = arguments.length > 1 ? arguments[1] : undefined;\n  return new Promise(function (resolve, reject) {\n    var img = getElement(url);\n\n    if (img) {\n      resolve(img);\n    } else {\n      reject(new Error(\"No such image \".concat(url)));\n    }\n  });\n} // ----------------------------------------------------------------------------\n\n\nvar HtmlDataAccessHelper = {\n  fetchJSON: fetchJSON,\n  fetchText: fetchText,\n  fetchArray: fetchArray,\n  fetchImage: fetchImage\n};\n(0,_DataAccessHelper_js__WEBPACK_IMPORTED_MODULE_5__.registerType)('html', function (options) {\n  return HtmlDataAccessHelper;\n}); // Export fetch methods\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HtmlDataAccessHelper);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _vendor_jszip_lib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../vendor/jszip/lib/index.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/index.js\");\n/* harmony import */ var _vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../vendor/pako/dist/pako.esm.mjs */ \"./node_modules/@kitware/vtk.js/vendor/pako/dist/pako.esm.mjs\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_Core_Endian_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Common/Core/Endian.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Endian.js\");\n/* harmony import */ var _Common_Core_DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Common/Core/DataArray/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray/Constants.js\");\n/* harmony import */ var _DataAccessHelper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../DataAccessHelper.js */ \"./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper.js\");\n\n\n\n\n\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.vtkErrorMacro,\n    vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.vtkDebugMacro;\n\nfunction toMimeType(url) {\n  var ext = url.split('.').pop().toLowerCase();\n\n  if (ext === 'jpg') {\n    return 'jpeg';\n  }\n\n  return ext;\n}\n\nfunction handleUint8Array(array, compression, done) {\n  return function (uint8array) {\n    array.buffer = new ArrayBuffer(uint8array.length); // copy uint8array to buffer\n\n    var view = new Uint8Array(array.buffer);\n    view.set(uint8array);\n\n    if (compression) {\n      if (array.dataType === 'string' || array.dataType === 'JSON') {\n        array.buffer = _vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_1__.p.inflate(new Uint8Array(array.buffer), {\n          to: 'string'\n        });\n      } else {\n        array.buffer = _vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_1__.p.inflate(new Uint8Array(array.buffer)).buffer;\n      }\n    }\n\n    if (array.ref.encode === 'JSON') {\n      array.values = JSON.parse(array.buffer);\n    } else {\n      if (_Common_Core_Endian_js__WEBPACK_IMPORTED_MODULE_3__.default.ENDIANNESS !== array.ref.encode && _Common_Core_Endian_js__WEBPACK_IMPORTED_MODULE_3__.default.ENDIANNESS) {\n        // Need to swap bytes\n        vtkDebugMacro(\"Swap bytes of \".concat(array.name));\n        _Common_Core_Endian_js__WEBPACK_IMPORTED_MODULE_3__.default.swapBytes(array.buffer, _Common_Core_DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_4__.DataTypeByteSize[array.dataType]);\n      }\n\n      array.values = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.newTypedArray(array.dataType, array.buffer);\n    }\n\n    if (array.values.length !== array.size) {\n      vtkErrorMacro(\"Error in FetchArray: \".concat(array.name, \" does not have the proper array size. Got \").concat(array.values.length, \", instead of \").concat(array.size));\n    }\n\n    done();\n  };\n}\n\nfunction handleString(array, compression, done) {\n  return function (string) {\n    if (compression) {\n      array.values = JSON.parse(_vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_1__.p.inflate(string, {\n        to: 'string'\n      }));\n    } else {\n      array.values = JSON.parse(string);\n    }\n\n    done();\n  };\n}\n\nvar handlers = {\n  uint8array: handleUint8Array,\n  string: handleString\n};\n\nfunction removeLeadingSlash(str) {\n  return str[0] === '/' ? str.substr(1) : str;\n}\n\nfunction normalizePath(str) {\n  return new URL(str, 'http://any').pathname;\n}\n\nfunction cleanUpPath(str) {\n  return removeLeadingSlash(normalizePath(str));\n}\n\nfunction create(createOptions) {\n  var ready = false;\n  var requestCount = 0;\n  var zip = new _vendor_jszip_lib_index_js__WEBPACK_IMPORTED_MODULE_0__.l();\n  var zipRoot = zip;\n  zip.loadAsync(createOptions.zipContent).then(function () {\n    ready = true; // Find root index.json\n\n    var metaFiles = [];\n    zip.forEach(function (relativePath, zipEntry) {\n      if (relativePath.indexOf('index.json') !== -1) {\n        metaFiles.push(relativePath);\n      }\n    });\n    metaFiles.sort(function (a, b) {\n      return a.length - b.length;\n    });\n    var fullRootPath = metaFiles[0].split('/');\n\n    while (fullRootPath.length > 1) {\n      var dirName = fullRootPath.shift();\n      zipRoot = zipRoot.folder(dirName);\n    }\n\n    if (createOptions.callback) {\n      createOptions.callback(zip);\n    }\n  });\n  return {\n    fetchArray: function fetchArray() {\n      var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      var baseURL = arguments.length > 1 ? arguments[1] : undefined;\n      var array = arguments.length > 2 ? arguments[2] : undefined;\n      var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n      return new Promise(function (resolve, reject) {\n        if (!ready) {\n          vtkErrorMacro('ERROR!!! zip not ready...');\n        }\n\n        var url = cleanUpPath([baseURL, array.ref.basepath, options.compression ? \"\".concat(array.ref.id, \".gz\") : array.ref.id].join('/'));\n\n        if (++requestCount === 1 && instance.invokeBusy) {\n          instance.invokeBusy(true);\n        }\n\n        function doneCleanUp() {\n          // Done with the ref and work\n          delete array.ref;\n\n          if (--requestCount === 0 && instance.invokeBusy) {\n            instance.invokeBusy(false);\n          }\n\n          if (instance.modified) {\n            instance.modified();\n          }\n\n          resolve(array);\n        }\n\n        var asyncType = array.dataType === 'string' && !options.compression ? 'string' : 'uint8array';\n        var asyncCallback = handlers[asyncType](array, options.compression, doneCleanUp);\n        zipRoot.file(url).async(asyncType).then(asyncCallback);\n      });\n    },\n    fetchJSON: function fetchJSON() {\n      var url = arguments.length > 1 ? arguments[1] : undefined;\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      var path = cleanUpPath(url);\n\n      if (!ready) {\n        vtkErrorMacro('ERROR!!! zip not ready...');\n      }\n\n      if (options.compression) {\n        if (options.compression === 'gz') {\n          return zipRoot.file(path).async('uint8array').then(function (uint8array) {\n            var str = _vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_1__.p.inflate(uint8array, {\n              to: 'string'\n            });\n            return Promise.resolve(JSON.parse(str));\n          });\n        }\n\n        return Promise.reject(new Error('Invalid compression'));\n      }\n\n      return zipRoot.file(path).async('string').then(function (str) {\n        return Promise.resolve(JSON.parse(str));\n      });\n    },\n    fetchText: function fetchText() {\n      var url = arguments.length > 1 ? arguments[1] : undefined;\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      var path = cleanUpPath(url);\n\n      if (!ready) {\n        vtkErrorMacro('ERROR!!! zip not ready...');\n      }\n\n      if (options.compression) {\n        if (options.compression === 'gz') {\n          return zipRoot.file(path).async('uint8array').then(function (uint8array) {\n            var str = _vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_1__.p.inflate(uint8array, {\n              to: 'string'\n            });\n            return Promise.resolve(str);\n          });\n        }\n\n        return Promise.reject(new Error('Invalid compression'));\n      }\n\n      return zipRoot.file(path).async('string').then(function (str) {\n        return Promise.resolve(str);\n      });\n    },\n    fetchImage: function fetchImage() {\n      var url = arguments.length > 1 ? arguments[1] : undefined;\n      var path = cleanUpPath(url);\n\n      if (!ready) {\n        vtkErrorMacro('ERROR!!! zip not ready...');\n      }\n\n      return new Promise(function (resolve, reject) {\n        var img = new Image();\n\n        img.onload = function () {\n          return resolve(img);\n        };\n\n        img.onerror = reject;\n        zipRoot.file(path).async('base64').then(function (str) {\n          img.src = \"data:image/\".concat(toMimeType(path), \";base64,\").concat(str);\n        });\n      });\n    },\n    fetchBinary: function fetchBinary() {\n      var url = arguments.length > 1 ? arguments[1] : undefined;\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      var path = cleanUpPath(url);\n\n      if (!ready) {\n        vtkErrorMacro('ERROR!!! zip not ready...');\n      }\n\n      if (options.compression) {\n        if (options.compression === 'gz') {\n          return zipRoot.file(path).then(function (data) {\n            var array = _vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_1__.p.inflate(data).buffer;\n            return Promise.resolve(array);\n          });\n        }\n\n        return Promise.reject(new Error('Invalid compression'));\n      }\n\n      return zipRoot.file(path).async('arraybuffer').then(function (data) {\n        return Promise.resolve(data);\n      });\n    }\n  };\n}\n\nvar JSZipDataAccessHelper = {\n  create: create\n};\n(0,_DataAccessHelper_js__WEBPACK_IMPORTED_MODULE_5__.registerType)('zip', function (options) {\n  return JSZipDataAccessHelper.create(options);\n});\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSZipDataAccessHelper);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_Core_Endian_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Common/Core/Endian.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Endian.js\");\n/* harmony import */ var _Common_Core_DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Common/Core/DataArray/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray/Constants.js\");\n/* harmony import */ var _DataAccessHelper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DataAccessHelper.js */ \"./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper.js\");\n\n\n\n\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkErrorMacro,\n    vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkDebugMacro;\n\nvar REJECT_COMPRESSION = function REJECT_COMPRESSION() {\n  vtkErrorMacro('LiteHttpDataAccessHelper does not support compression. Need to register HttpDataAccessHelper instead.');\n  return Promise.reject(new Error('LiteHttpDataAccessHelper does not support compression. Need to register HttpDataAccessHelper instead.'));\n};\n/* eslint-disable prefer-promise-reject-errors */\n\n\nvar requestCount = 0;\n\nfunction openAsyncXHR(method, url) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var xhr = new XMLHttpRequest();\n  xhr.open(method, url, true);\n\n  if (options.headers) {\n    Object.entries(options.headers).forEach(function (_ref) {\n      var _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(_ref, 2),\n          key = _ref2[0],\n          value = _ref2[1];\n\n      return xhr.setRequestHeader(key, value);\n    });\n  }\n\n  if (options.progressCallback) {\n    xhr.addEventListener('progress', options.progressCallback);\n  }\n\n  return xhr;\n}\n\nfunction fetchBinary(url) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return new Promise(function (resolve, reject) {\n    var xhr = openAsyncXHR('GET', url, options);\n\n    xhr.onreadystatechange = function (e) {\n      if (xhr.readyState === 4) {\n        if (xhr.status === 200 || xhr.status === 0) {\n          resolve(xhr.response);\n        } else {\n          reject({\n            xhr: xhr,\n            e: e\n          });\n        }\n      }\n    }; // Make request\n\n\n    xhr.responseType = 'arraybuffer';\n    xhr.send();\n  });\n}\n\nfunction fetchArray() {\n  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var baseURL = arguments.length > 1 ? arguments[1] : undefined;\n  var array = arguments.length > 2 ? arguments[2] : undefined;\n  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n  if (options && options.compression) {\n    return REJECT_COMPRESSION();\n  }\n\n  if (array.ref && !array.ref.pending) {\n    return new Promise(function (resolve, reject) {\n      var url = [baseURL, array.ref.basepath, array.ref.id].join('/');\n      var xhr = openAsyncXHR('GET', url, options);\n\n      xhr.onreadystatechange = function (e) {\n        if (xhr.readyState === 1) {\n          array.ref.pending = true;\n\n          if (++requestCount === 1 && instance.invokeBusy) {\n            instance.invokeBusy(true);\n          }\n        }\n\n        if (xhr.readyState === 4) {\n          array.ref.pending = false;\n\n          if (xhr.status === 200 || xhr.status === 0) {\n            array.buffer = xhr.response;\n\n            if (array.ref.encode === 'JSON') {\n              array.values = JSON.parse(array.buffer);\n            } else {\n              if (_Common_Core_Endian_js__WEBPACK_IMPORTED_MODULE_2__.default.ENDIANNESS !== array.ref.encode && _Common_Core_Endian_js__WEBPACK_IMPORTED_MODULE_2__.default.ENDIANNESS) {\n                // Need to swap bytes\n                vtkDebugMacro(\"Swap bytes of \".concat(array.name));\n                _Common_Core_Endian_js__WEBPACK_IMPORTED_MODULE_2__.default.swapBytes(array.buffer, _Common_Core_DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_3__.DataTypeByteSize[array.dataType]);\n              }\n\n              array.values = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newTypedArray(array.dataType, array.buffer);\n            }\n\n            if (array.values.length !== array.size) {\n              vtkErrorMacro(\"Error in FetchArray: \".concat(array.name, \", does not have the proper array size. Got \").concat(array.values.length, \", instead of \").concat(array.size));\n            } // Done with the ref and work\n\n\n            delete array.ref;\n\n            if (--requestCount === 0 && instance.invokeBusy) {\n              instance.invokeBusy(false);\n            }\n\n            if (instance.modified) {\n              instance.modified();\n            }\n\n            resolve(array);\n          } else {\n            reject({\n              xhr: xhr,\n              e: e\n            });\n          }\n        }\n      }; // Make request\n\n\n      xhr.responseType = array.dataType !== 'string' ? 'arraybuffer' : 'text';\n      xhr.send();\n    });\n  }\n\n  return Promise.resolve(array);\n} // ----------------------------------------------------------------------------\n\n\nfunction fetchJSON() {\n  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var url = arguments.length > 1 ? arguments[1] : undefined;\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n  if (options && options.compression) {\n    return REJECT_COMPRESSION();\n  }\n\n  return new Promise(function (resolve, reject) {\n    var xhr = openAsyncXHR('GET', url, options);\n\n    xhr.onreadystatechange = function (e) {\n      if (xhr.readyState === 1) {\n        if (++requestCount === 1 && instance.invokeBusy) {\n          instance.invokeBusy(true);\n        }\n      }\n\n      if (xhr.readyState === 4) {\n        if (--requestCount === 0 && instance.invokeBusy) {\n          instance.invokeBusy(false);\n        }\n\n        if (xhr.status === 200 || xhr.status === 0) {\n          resolve(JSON.parse(xhr.responseText));\n        } else {\n          reject({\n            xhr: xhr,\n            e: e\n          });\n        }\n      }\n    }; // Make request\n\n\n    xhr.responseType = 'text';\n    xhr.send();\n  });\n} // ----------------------------------------------------------------------------\n\n\nfunction fetchText() {\n  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var url = arguments.length > 1 ? arguments[1] : undefined;\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n  if (options && options.compression) {\n    return REJECT_COMPRESSION();\n  }\n\n  return new Promise(function (resolve, reject) {\n    var xhr = openAsyncXHR('GET', url, options);\n\n    xhr.onreadystatechange = function (e) {\n      if (xhr.readyState === 1) {\n        if (++requestCount === 1 && instance.invokeBusy) {\n          instance.invokeBusy(true);\n        }\n      }\n\n      if (xhr.readyState === 4) {\n        if (--requestCount === 0 && instance.invokeBusy) {\n          instance.invokeBusy(false);\n        }\n\n        if (xhr.status === 200 || xhr.status === 0) {\n          resolve(xhr.responseText);\n        } else {\n          reject({\n            xhr: xhr,\n            e: e\n          });\n        }\n      }\n    }; // Make request\n\n\n    xhr.responseType = 'text';\n    xhr.send();\n  });\n} // ----------------------------------------------------------------------------\n\n\nfunction fetchImage() {\n  var url = arguments.length > 1 ? arguments[1] : undefined;\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  return new Promise(function (resolve, reject) {\n    var img = new Image();\n\n    if (options.crossOrigin) {\n      img.crossOrigin = options.crossOrigin;\n    }\n\n    img.onload = function () {\n      return resolve(img);\n    };\n\n    img.onerror = reject;\n    img.src = url;\n  });\n}\n/* eslint-enable prefer-promise-reject-errors */\n// ----------------------------------------------------------------------------\n\n\nvar LiteHttpDataAccessHelper = {\n  fetchArray: fetchArray,\n  fetchJSON: fetchJSON,\n  fetchText: fetchText,\n  fetchBinary: fetchBinary,\n  // Only for HTTP\n  fetchImage: fetchImage\n}; // The lite version should never override a full feature one...\n\nif (!(0,_DataAccessHelper_js__WEBPACK_IMPORTED_MODULE_4__.has)('http')) {\n  (0,_DataAccessHelper_js__WEBPACK_IMPORTED_MODULE_4__.registerType)('http', function (options) {\n    return LiteHttpDataAccessHelper;\n  });\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LiteHttpDataAccessHelper);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/IO/XML/XMLPolyDataReader.js":
/*!******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/IO/XML/XMLPolyDataReader.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Core/DataArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n/* harmony import */ var _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/DataModel/PolyData.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/PolyData.js\");\n/* harmony import */ var _XMLReader_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./XMLReader.js */ \"./node_modules/@kitware/vtk.js/IO/XML/XMLReader.js\");\n\n\n\n\n\n\n// Global method\n// ----------------------------------------------------------------------------\n\nfunction handleArray(polydata, cellType, piece, compressor, byteOrder, headerType, binaryBuffer) {\n  var size = Number(piece.getAttribute(\"NumberOf\".concat(cellType)));\n\n  if (size > 0) {\n    var dataArrayElem = piece.getElementsByTagName(cellType)[0].getElementsByTagName('DataArray')[0];\n\n    var _vtkXMLReader$process = _XMLReader_js__WEBPACK_IMPORTED_MODULE_4__.default.processDataArray(size, dataArrayElem, compressor, byteOrder, headerType, binaryBuffer),\n        values = _vtkXMLReader$process.values,\n        numberOfComponents = _vtkXMLReader$process.numberOfComponents;\n\n    polydata[\"get\".concat(cellType)]().setData(values, numberOfComponents);\n  }\n\n  return size;\n} // ----------------------------------------------------------------------------\n\n\nfunction handleCells(polydata, cellType, piece, compressor, byteOrder, headerType, binaryBuffer) {\n  var size = Number(piece.getAttribute(\"NumberOf\".concat(cellType)));\n\n  if (size > 0) {\n    var values = _XMLReader_js__WEBPACK_IMPORTED_MODULE_4__.default.processCells(size, piece.getElementsByTagName(cellType)[0], compressor, byteOrder, headerType, binaryBuffer);\n    polydata[\"get\".concat(cellType)]().setData(values);\n  }\n\n  return size;\n} // ----------------------------------------------------------------------------\n\n\nfunction handleFieldDataArray(dataArrayElem, compressor, byteOrder, headerType, binaryBuffer) {\n  var size = Number(dataArrayElem.getAttribute('NumberOfTuples'));\n  return _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance(_XMLReader_js__WEBPACK_IMPORTED_MODULE_4__.default.processDataArray(size, dataArrayElem, compressor, byteOrder, headerType, binaryBuffer));\n} // ----------------------------------------------------------------------------\n// vtkXMLPolyDataReader methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkXMLPolyDataReader(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkXMLPolyDataReader');\n\n  publicAPI.parseXML = function (rootElem, type, compressor, byteOrder, headerType) {\n    var datasetElem = rootElem.getElementsByTagName(model.dataType)[0];\n    var fieldDataElem = datasetElem.getElementsByTagName('FieldData')[0];\n    var pieces = datasetElem.getElementsByTagName('Piece');\n    var nbPieces = pieces.length; // field data\n\n    var fieldDataArrays = [];\n\n    if (fieldDataElem) {\n      fieldDataArrays = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(fieldDataElem.getElementsByTagName('DataArray')).map(function (daElem) {\n        return handleFieldDataArray(daElem, compressor, byteOrder, headerType, model.binaryBuffer);\n      });\n    }\n\n    var _loop = function _loop(outputIndex) {\n      // Create dataset\n      var polydata = _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n      var piece = pieces[outputIndex]; // Points\n\n      var nbPoints = handleArray(polydata, 'Points', piece, compressor, byteOrder, headerType, model.binaryBuffer); // Cells\n\n      var nbCells = 0;\n      ['Verts', 'Lines', 'Strips', 'Polys'].forEach(function (cellType) {\n        nbCells += handleCells(polydata, cellType, piece, compressor, byteOrder, headerType, model.binaryBuffer);\n      }); // Fill data\n\n      _XMLReader_js__WEBPACK_IMPORTED_MODULE_4__.default.processFieldData(nbPoints, piece.getElementsByTagName('PointData')[0], polydata.getPointData(), compressor, byteOrder, headerType, model.binaryBuffer);\n      _XMLReader_js__WEBPACK_IMPORTED_MODULE_4__.default.processFieldData(nbCells, piece.getElementsByTagName('CellData')[0], polydata.getCellData(), compressor, byteOrder, headerType, model.binaryBuffer);\n      var fieldData = polydata.getFieldData();\n\n      for (var i = 0; i < fieldDataArrays.length; i++) {\n        fieldData.addArray(fieldDataArrays[i]);\n      } // Add new output\n\n\n      model.output[outputIndex] = polydata;\n    };\n\n    for (var outputIndex = 0; outputIndex < nbPieces; outputIndex++) {\n      _loop(outputIndex);\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  dataType: 'PolyData'\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues);\n  _XMLReader_js__WEBPACK_IMPORTED_MODULE_4__.default.extend(publicAPI, model, initialValues);\n  vtkXMLPolyDataReader(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkXMLPolyDataReader'); // ----------------------------------------------------------------------------\n\nvar vtkXMLPolyDataReader$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkXMLPolyDataReader$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/IO/XML/XMLPolyDataReader.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/IO/XML/XMLReader.js":
/*!**********************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/IO/XML/XMLReader.js ***!
  \**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend)\n/* harmony export */ });\n/* harmony import */ var _vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../vendor/pako/dist/pako.esm.mjs */ \"./node_modules/@kitware/vtk.js/vendor/pako/dist/pako.esm.mjs\");\n/* harmony import */ var _Core_DataAccessHelper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Core/DataAccessHelper.js */ \"./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper.js\");\n/* harmony import */ var _Common_Core_Base64_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Core/Base64.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Base64.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Common/Core/DataArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n/* harmony import */ var _Core_BinaryHelper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Core/BinaryHelper.js */ \"./node_modules/@kitware/vtk.js/IO/Core/BinaryHelper.js\");\n/* harmony import */ var _Core_DataAccessHelper_LiteHttpDataAccessHelper_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Core/DataAccessHelper/LiteHttpDataAccessHelper.js */ \"./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js\");\n\n\n\n\n\n\n\n\n// import 'vtk.js/Sources/IO/Core/DataAccessHelper/HttpDataAccessHelper'; // HTTP + zip\n// import 'vtk.js/Sources/IO/Core/DataAccessHelper/HtmlDataAccessHelper'; // html + base64 + zip\n// import 'vtk.js/Sources/IO/Core/DataAccessHelper/JSZipDataAccessHelper'; // zip\n// ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n\nfunction stringToXML(xmlStr) {\n  if (window.ActiveXObject) {\n    var oXML = new window.ActiveXObject('Microsoft.XMLDOM');\n    oXML.loadXML(xmlStr);\n    return oXML;\n  }\n\n  return new DOMParser().parseFromString(xmlStr, 'application/xml');\n}\n\nfunction extractAppendedData(buffer) {\n  // search for appended data tag\n  var prefixRegex = /^\\s*<AppendedData\\s+encoding=\"raw\">\\s*_/m;\n  var suffixRegex = /\\n\\s*<\\/AppendedData>/m;\n  return _Core_BinaryHelper_js__WEBPACK_IMPORTED_MODULE_5__.default.extractBinary(buffer, prefixRegex, suffixRegex);\n} // ----------------------------------------------------------------------------\n\n\nvar TYPED_ARRAY = {\n  Int8: Int8Array,\n  UInt8: Uint8Array,\n  Int16: Int16Array,\n  UInt16: Uint16Array,\n  Int32: Int32Array,\n  UInt32: Uint32Array,\n  Int64: Int32Array,\n  // Not supported with JavaScript will cause error in binary\n  UInt64: Uint32Array,\n  // Not supported with JavaScript will cause error in binary\n  Float32: Float32Array,\n  Float64: Float64Array\n}; // ----------------------------------------------------------------------------\n\nvar TYPED_ARRAY_BYTES = {\n  Int8: 1,\n  UInt8: 1,\n  Int16: 2,\n  UInt16: 2,\n  Int32: 4,\n  UInt32: 4,\n  Int64: 8,\n  // Not supported with JavaScript will cause error in binary\n  UInt64: 8,\n  // Not supported with JavaScript will cause error in binary\n  Float32: 4,\n  Float64: 8\n}; // ----------------------------------------------------------------------------\n\nfunction integer64to32(array) {\n  var maxIdx = array.length - 1; // Skip last\n\n  return array.filter(function (v, i) {\n    return i < maxIdx && i % 2 === 0;\n  });\n} // ----------------------------------------------------------------------------\n\n\nfunction readerHeader(uint8, headerType) {\n  // We do not handle endianness or if more than 32 bits are needed to encode the data\n  if (headerType === 'UInt64') {\n    var _offset = 8;\n\n    var _uint = new Uint32Array(uint8.buffer, 0, 6);\n\n    var _nbBlocks = _uint[0];\n    var _s = _uint[2];\n    var _s2 = _uint[4];\n    var _resultArray = [_offset, _nbBlocks, _s, _s2];\n    _uint = new Uint32Array(uint8.buffer, 3 * 8, _nbBlocks * 2);\n\n    for (var i = 0; i < _nbBlocks; i++) {\n      _resultArray.push(_uint[i * 2]);\n    }\n\n    return _resultArray;\n  } // UInt32\n\n\n  var uint32 = new Uint32Array(uint8.buffer, 0, 3);\n  var offset = 4;\n  var nbBlocks = uint32[0];\n  var s1 = uint32[1];\n  var s2 = uint32[2];\n  var resultArray = [offset, nbBlocks, s1, s2];\n  uint32 = new Uint32Array(uint8.buffer, 3 * 4, nbBlocks);\n\n  for (var _i = 0; _i < nbBlocks; _i++) {\n    resultArray.push(uint32[_i]);\n  }\n\n  return resultArray;\n} // ----------------------------------------------------------------------------\n\n\nfunction uncompressBlock(compressedUint8, output) {\n  var uncompressedBlock = _vendor_pako_dist_pako_esm_mjs__WEBPACK_IMPORTED_MODULE_0__.p.inflate(compressedUint8);\n  output.uint8.set(uncompressedBlock, output.offset);\n  output.offset += uncompressedBlock.length;\n} // ----------------------------------------------------------------------------\n\n\nfunction processDataArray(size, dataArrayElem, compressor, byteOrder, headerType, binaryBuffer) {\n  var dataType = dataArrayElem.getAttribute('type');\n  var name = dataArrayElem.getAttribute('Name');\n  var format = dataArrayElem.getAttribute('format'); // binary, ascii, appended\n\n  var numberOfComponents = Number(dataArrayElem.getAttribute('NumberOfComponents') || '1');\n  var values = null;\n\n  if (format === 'ascii') {\n    values = new TYPED_ARRAY[dataType](size * numberOfComponents);\n    var offset = 0;\n    dataArrayElem.firstChild.nodeValue.split(/[\\\\t \\\\n]+/).forEach(function (token) {\n      if (token.trim().length) {\n        values[offset++] = Number(token);\n      }\n    });\n  } else if (format === 'binary') {\n    var uint8 = new Uint8Array(_Common_Core_Base64_js__WEBPACK_IMPORTED_MODULE_2__.default.toArrayBuffer(dataArrayElem.firstChild.nodeValue.trim()));\n\n    if (compressor === 'vtkZLibDataCompressor') {\n      var buffer = new ArrayBuffer(TYPED_ARRAY_BYTES[dataType] * size * numberOfComponents);\n      values = new TYPED_ARRAY[dataType](buffer);\n      var output = {\n        offset: 0,\n        uint8: new Uint8Array(buffer)\n      }; // ----------------------------------------------------------------------\n      // Layout of the data\n      // header[N, s1, s1, blockSize1, ..., blockSizeN], [padding???], block[compressedData], ..., block[compressedData]\n      // [header] N, s1 and s2 are uint 32 or 64 (defined by header_type=\"UInt64\" attribute on the root node)\n      // [header] s1: uncompress size of each block except the last one\n      // [header] s2: uncompress size of the last blocks\n      // [header] blockSize: size of the block in compressed space that represent to bloc to inflate in zlib. (This also give the offset to the next block)\n      // ----------------------------------------------------------------------\n      // Header reading\n\n      var header = readerHeader(uint8, headerType);\n      var nbBlocks = header[1];\n\n      var _offset2 = uint8.length - (header.reduce(function (a, b) {\n        return a + b;\n      }, 0) - (header[0] + header[1] + header[2] + header[3]));\n\n      for (var i = 0; i < nbBlocks; i++) {\n        var blockSize = header[4 + i];\n        var compressedBlock = new Uint8Array(uint8.buffer, _offset2, blockSize);\n        uncompressBlock(compressedBlock, output);\n        _offset2 += blockSize;\n      } // Handle (u)int64 hoping for no overflow...\n\n\n      if (dataType.indexOf('Int64') !== -1) {\n        values = integer64to32(values);\n      }\n    } else {\n      values = new TYPED_ARRAY[dataType](uint8.buffer, TYPED_ARRAY_BYTES[headerType]); // Skip the count\n      // Handle (u)int64 hoping no overflow...\n\n      if (dataType.indexOf('Int64') !== -1) {\n        values = integer64to32(values);\n      }\n    }\n  } else if (format === 'appended') {\n    var _offset3 = Number(dataArrayElem.getAttribute('offset')); // read header\n    // NOTE: this will incorrectly read the size if headerType is (U)Int64 and\n    // the value requires (U)Int64.\n\n\n    var _header;\n\n    if (_offset3 % TYPED_ARRAY_BYTES[headerType] === 0) {\n      _header = new TYPED_ARRAY[headerType](binaryBuffer, _offset3, 1);\n    } else {\n      _header = new TYPED_ARRAY[headerType](binaryBuffer.slice(_offset3, _offset3 + TYPED_ARRAY_BYTES[headerType]));\n    }\n\n    var arraySize = _header[0] / TYPED_ARRAY_BYTES[dataType]; // if we are dealing with Uint64, we need to get double the values since\n    // TYPED_ARRAY[Uint64] is Uint32.\n\n    if (dataType.indexOf('Int64') !== -1) {\n      arraySize *= 2;\n    }\n\n    _offset3 += TYPED_ARRAY_BYTES[headerType]; // read values\n    // if offset is aligned to dataType, use view. Otherwise, slice due to misalignment.\n\n    if (_offset3 % TYPED_ARRAY_BYTES[dataType] === 0) {\n      values = new TYPED_ARRAY[dataType](binaryBuffer, _offset3, arraySize);\n    } else {\n      values = new TYPED_ARRAY[dataType](binaryBuffer.slice(_offset3, _offset3 + _header[0]));\n    } // remove higher order 32 bits assuming they're not used.\n\n\n    if (dataType.indexOf('Int64') !== -1) {\n      values = integer64to32(values);\n    }\n  } else {\n    console.error('Format not supported', format);\n  }\n\n  return {\n    name: name,\n    values: values,\n    numberOfComponents: numberOfComponents\n  };\n} // ----------------------------------------------------------------------------\n\n\nfunction processCells(size, containerElem, compressor, byteOrder, headerType, binaryBuffer) {\n  var arrayElems = {};\n  var dataArrayElems = containerElem.getElementsByTagName('DataArray');\n\n  for (var elIdx = 0; elIdx < dataArrayElems.length; elIdx++) {\n    var el = dataArrayElems[elIdx];\n    arrayElems[el.getAttribute('Name')] = el;\n  }\n\n  var offsets = processDataArray(size, arrayElems.offsets, compressor, byteOrder, headerType, binaryBuffer).values;\n  var connectivitySize = offsets[offsets.length - 1];\n  var connectivity = processDataArray(connectivitySize, arrayElems.connectivity, compressor, byteOrder, headerType, binaryBuffer).values;\n  var values = new Uint32Array(size + connectivitySize);\n  var writeOffset = 0;\n  var previousOffset = 0;\n  offsets.forEach(function (v) {\n    var cellSize = v - previousOffset;\n    values[writeOffset++] = cellSize;\n\n    for (var i = 0; i < cellSize; i++) {\n      values[writeOffset++] = connectivity[previousOffset + i];\n    } // save previous offset\n\n\n    previousOffset = v;\n  });\n  return values;\n} // ----------------------------------------------------------------------------\n\n\nfunction processFieldData(size, fieldElem, fieldContainer, compressor, byteOrder, headerType, binaryBuffer) {\n  if (fieldElem) {\n    var attributes = ['Scalars', 'Vectors', 'Normals', 'Tensors', 'TCoords'];\n    var nameBinding = {};\n    attributes.forEach(function (attrName) {\n      var arrayName = fieldElem.getAttribute(attrName);\n\n      if (arrayName) {\n        nameBinding[arrayName] = fieldContainer[\"set\".concat(attrName)];\n      }\n    });\n    var dataArrayElems = fieldElem.getElementsByTagName('DataArray');\n    var nbArrays = dataArrayElems.length;\n\n    for (var idx = 0; idx < nbArrays; idx++) {\n      var array = dataArrayElems[idx];\n      var dataArray = _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance(processDataArray(size, array, compressor, byteOrder, headerType, binaryBuffer));\n      var name = dataArray.getName();\n      (nameBinding[name] || fieldContainer.addArray)(dataArray);\n    }\n  }\n} // ----------------------------------------------------------------------------\n// vtkXMLReader methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkXMLReader(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkXMLReader'); // Create default dataAccessHelper if not available\n\n  if (!model.dataAccessHelper) {\n    model.dataAccessHelper = _Core_DataAccessHelper_js__WEBPACK_IMPORTED_MODULE_1__.default.get('http');\n  } // Internal method to fetch Array\n\n\n  function fetchData(url) {\n    var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    return model.dataAccessHelper.fetchBinary(url, option);\n  } // Set DataSet url\n\n\n  publicAPI.setUrl = function (url) {\n    var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    model.url = url; // Remove the file in the URL\n\n    var path = url.split('/');\n    path.pop();\n    model.baseURL = path.join('/'); // Fetch metadata\n\n    return publicAPI.loadData(option);\n  }; // Fetch the actual data arrays\n\n\n  publicAPI.loadData = function () {\n    var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    return fetchData(model.url, option).then(publicAPI.parseAsArrayBuffer);\n  };\n\n  publicAPI.parseAsArrayBuffer = function (arrayBuffer) {\n    if (!arrayBuffer) {\n      return false;\n    }\n\n    if (arrayBuffer !== model.rawDataBuffer) {\n      publicAPI.modified();\n    } else {\n      return true;\n    }\n\n    var _extractAppendedData = extractAppendedData(arrayBuffer),\n        content = _extractAppendedData.text,\n        binaryBuffer = _extractAppendedData.binaryBuffer;\n\n    model.rawDataBuffer = arrayBuffer;\n    model.binaryBuffer = binaryBuffer; // Parse data here...\n\n    var doc = stringToXML(content);\n    var rootElem = doc.firstChild;\n    var type = rootElem.getAttribute('type');\n    var compressor = rootElem.getAttribute('compressor');\n    var byteOrder = rootElem.getAttribute('byte_order'); // default to UInt32. I think version 0.1 vtp/vti files default to UInt32.\n\n    var headerType = rootElem.getAttribute('header_type') || 'UInt32';\n\n    if (compressor && compressor !== 'vtkZLibDataCompressor') {\n      console.error('Invalid compressor', compressor);\n      return false;\n    }\n\n    if (byteOrder && byteOrder !== 'LittleEndian') {\n      console.error('Only LittleEndian encoding is supported');\n      return false;\n    }\n\n    if (type !== model.dataType) {\n      console.error('Invalid data type', type, 'expecting', model.dataType);\n      return false;\n    } // appended format\n\n\n    if (rootElem.querySelector('AppendedData')) {\n      var appendedDataElem = rootElem.querySelector('AppendedData');\n      var encoding = appendedDataElem.getAttribute('encoding');\n      var arrayElems = rootElem.querySelectorAll('DataArray');\n      var appendedBuffer = model.binaryBuffer;\n\n      if (encoding === 'base64') {\n        // substr(1) is to remove the '_' prefix\n        appendedBuffer = appendedDataElem.textContent.trim().substr(1);\n      } // get data array chunks\n\n\n      var dataArrays = [];\n\n      for (var i = 0; i < arrayElems.length; ++i) {\n        var offset = Number(arrayElems[i].getAttribute('offset'));\n        var nextOffset = 0;\n\n        if (i === arrayElems.length - 1) {\n          nextOffset = appendedBuffer.length || appendedBuffer.byteLength;\n        } else {\n          nextOffset = Number(arrayElems[i + 1].getAttribute('offset'));\n        }\n\n        if (encoding === 'base64') {\n          dataArrays.push(new Uint8Array(_Common_Core_Base64_js__WEBPACK_IMPORTED_MODULE_2__.default.toArrayBuffer(appendedBuffer.substring(offset, nextOffset))));\n        } else {\n          // encoding === 'raw'\n          // Need to slice the ArrayBuffer so readerHeader() works properly\n          dataArrays.push(new Uint8Array(appendedBuffer.slice(offset, nextOffset)));\n        }\n      }\n\n      if (compressor === 'vtkZLibDataCompressor') {\n        for (var arrayidx = 0; arrayidx < dataArrays.length; ++arrayidx) {\n          var dataArray = dataArrays[arrayidx]; // Header reading\n          // Refer to processDataArray() above for info on header fields\n\n          var header = readerHeader(dataArray, headerType);\n          var nbBlocks = header[1];\n          var compressedOffset = dataArray.length - (header.reduce(function (a, b) {\n            return a + b;\n          }, 0) - (header[0] + header[1] + header[2] + header[3]));\n          var _buffer = null;\n\n          if (nbBlocks > 0) {\n            // If the last block's size is labeled as 0, that means the last block\n            // really has size header[2].\n            if (header[3] === 0) {\n              _buffer = new ArrayBuffer(header[2] * nbBlocks);\n            } else {\n              _buffer = new ArrayBuffer(header[2] * (nbBlocks - 1) + header[3]);\n            }\n          } else {\n            // if there is no blocks, then default to a zero array of size 0.\n            _buffer = new ArrayBuffer(0);\n          } // uncompressed buffer\n\n\n          var uncompressed = new Uint8Array(_buffer);\n          var output = {\n            offset: 0,\n            uint8: uncompressed\n          };\n\n          for (var _i2 = 0; _i2 < nbBlocks; _i2++) {\n            var blockSize = header[4 + _i2];\n            var compressedBlock = new Uint8Array(dataArray.buffer, compressedOffset, blockSize);\n            uncompressBlock(compressedBlock, output);\n            compressedOffset += blockSize;\n          }\n\n          var data = new Uint8Array(uncompressed.length + TYPED_ARRAY_BYTES[headerType]); // set length header\n          // TODO this does not work for lengths that are greater than the max Uint32 value.\n\n          new TYPED_ARRAY[headerType](data.buffer, 0, 1)[0] = uncompressed.length;\n          data.set(uncompressed, TYPED_ARRAY_BYTES[headerType]);\n          dataArrays[arrayidx] = data;\n        }\n      }\n\n      var bufferLength = dataArrays.reduce(function (acc, arr) {\n        return acc + arr.length;\n      }, 0);\n      var buffer = new ArrayBuffer(bufferLength);\n      var view = new Uint8Array(buffer);\n\n      for (var _i3 = 0, _offset4 = 0; _i3 < dataArrays.length; ++_i3) {\n        // set correct offsets\n        arrayElems[_i3].setAttribute('offset', _offset4); // set final buffer data\n\n\n        view.set(dataArrays[_i3], _offset4);\n        _offset4 += dataArrays[_i3].length;\n      }\n\n      model.binaryBuffer = buffer;\n\n      if (!model.binaryBuffer) {\n        console.error('Processing appended data format: requires binaryBuffer to parse');\n        return false;\n      }\n    }\n\n    publicAPI.parseXML(rootElem, type, compressor, byteOrder, headerType);\n    return true;\n  };\n\n  publicAPI.requestData = function (inData, outData) {\n    publicAPI.parseAsArrayBuffer(model.rawDataBuffer);\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {// baseURL: null,\n  // dataAccessHelper: null,\n  // url: null,\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_3__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_3__.default.get(publicAPI, model, ['url', 'baseURL']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_3__.default.setGet(publicAPI, model, ['dataAccessHelper']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_3__.default.algo(publicAPI, model, 0, 1); // vtkXMLReader methods\n\n  vtkXMLReader(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar vtkXMLReader$1 = {\n  extend: extend,\n  processDataArray: processDataArray,\n  processFieldData: processFieldData,\n  processCells: processCells\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkXMLReader$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/IO/XML/XMLReader.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Interaction/Style/InteractorStyleTrackballCamera.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Interaction/Style/InteractorStyleTrackballCamera.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Rendering_Core_InteractorStyle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Rendering/Core/InteractorStyle.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/InteractorStyle.js\");\n/* harmony import */ var _Rendering_Core_InteractorStyle_Constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Rendering/Core/InteractorStyle/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/InteractorStyle/Constants.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _Rendering_Core_RenderWindowInteractor_Constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Rendering/Core/RenderWindowInteractor/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindowInteractor/Constants.js\");\n\n\n\n\n\n\nvar States = _Rendering_Core_InteractorStyle_Constants_js__WEBPACK_IMPORTED_MODULE_2__.default.States;\n/* eslint-disable no-lonely-if */\n// ----------------------------------------------------------------------------\n// vtkInteractorStyleTrackballCamera methods\n// ----------------------------------------------------------------------------\n\nfunction vtkInteractorStyleTrackballCamera(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkInteractorStyleTrackballCamera'); // Public API methods\n\n  publicAPI.handleMouseMove = function (callData) {\n    var pos = callData.position;\n    var renderer = callData.pokedRenderer;\n\n    switch (model.state) {\n      case States.IS_ROTATE:\n        publicAPI.handleMouseRotate(renderer, pos);\n        publicAPI.invokeInteractionEvent({\n          type: 'InteractionEvent'\n        });\n        break;\n\n      case States.IS_PAN:\n        publicAPI.handleMousePan(renderer, pos);\n        publicAPI.invokeInteractionEvent({\n          type: 'InteractionEvent'\n        });\n        break;\n\n      case States.IS_DOLLY:\n        publicAPI.handleMouseDolly(renderer, pos);\n        publicAPI.invokeInteractionEvent({\n          type: 'InteractionEvent'\n        });\n        break;\n\n      case States.IS_SPIN:\n        publicAPI.handleMouseSpin(renderer, pos);\n        publicAPI.invokeInteractionEvent({\n          type: 'InteractionEvent'\n        });\n        break;\n    }\n\n    model.previousPosition = pos;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.handleButton3D = function (ed) {\n    if (ed && ed.pressed && ed.device === _Rendering_Core_RenderWindowInteractor_Constants_js__WEBPACK_IMPORTED_MODULE_4__.Device.RightController && ed.input === _Rendering_Core_RenderWindowInteractor_Constants_js__WEBPACK_IMPORTED_MODULE_4__.Input.TrackPad) {\n      publicAPI.startCameraPose();\n      return;\n    }\n\n    if (ed && !ed.pressed && ed.device === _Rendering_Core_RenderWindowInteractor_Constants_js__WEBPACK_IMPORTED_MODULE_4__.Device.RightController && ed.input === _Rendering_Core_RenderWindowInteractor_Constants_js__WEBPACK_IMPORTED_MODULE_4__.Input.TrackPad && model.state === States.IS_CAMERA_POSE) {\n      publicAPI.endCameraPose(); // return;\n    }\n  };\n\n  publicAPI.handleMove3D = function (ed) {\n    switch (model.state) {\n      case States.IS_CAMERA_POSE:\n        publicAPI.updateCameraPose(ed);\n        break;\n    }\n  };\n\n  publicAPI.updateCameraPose = function (ed) {\n    // move the world in the direction of the\n    // controller\n    var camera = ed.pokedRenderer.getActiveCamera();\n    var oldTrans = camera.getPhysicalTranslation(); // look at the y axis to determine how fast / what direction to move\n\n    var speed = ed.gamepad.axes[1]; // 0.05 meters / frame movement\n\n    var pscale = speed * 0.05 / camera.getPhysicalScale(); // convert orientation to world coordinate direction\n\n    var dir = camera.physicalOrientationToWorldDirection(ed.orientation);\n    camera.setPhysicalTranslation(oldTrans[0] + dir[0] * pscale, oldTrans[1] + dir[1] * pscale, oldTrans[2] + dir[2] * pscale);\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.handleLeftButtonPress = function (callData) {\n    var pos = callData.position;\n    model.previousPosition = pos;\n\n    if (callData.shiftKey) {\n      if (callData.controlKey || callData.altKey) {\n        publicAPI.startDolly();\n      } else {\n        publicAPI.startPan();\n      }\n    } else {\n      if (callData.controlKey || callData.altKey) {\n        publicAPI.startSpin();\n      } else {\n        publicAPI.startRotate();\n      }\n    }\n  }; //--------------------------------------------------------------------------\n\n\n  publicAPI.handleLeftButtonRelease = function () {\n    switch (model.state) {\n      case States.IS_DOLLY:\n        publicAPI.endDolly();\n        break;\n\n      case States.IS_PAN:\n        publicAPI.endPan();\n        break;\n\n      case States.IS_SPIN:\n        publicAPI.endSpin();\n        break;\n\n      case States.IS_ROTATE:\n        publicAPI.endRotate();\n        break;\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.handleStartMouseWheel = function (callData) {\n    publicAPI.startDolly();\n    publicAPI.handleMouseWheel(callData);\n  }; //--------------------------------------------------------------------------\n\n\n  publicAPI.handleEndMouseWheel = function () {\n    publicAPI.endDolly();\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.handleStartPinch = function (callData) {\n    model.previousScale = callData.scale;\n    publicAPI.startDolly();\n  }; //--------------------------------------------------------------------------\n\n\n  publicAPI.handleEndPinch = function () {\n    publicAPI.endDolly();\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.handleStartRotate = function (callData) {\n    model.previousRotation = callData.rotation;\n    publicAPI.startRotate();\n  }; //--------------------------------------------------------------------------\n\n\n  publicAPI.handleEndRotate = function () {\n    publicAPI.endRotate();\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.handleStartPan = function (callData) {\n    model.previousTranslation = callData.translation;\n    publicAPI.startPan();\n  }; //--------------------------------------------------------------------------\n\n\n  publicAPI.handleEndPan = function () {\n    publicAPI.endPan();\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.handlePinch = function (callData) {\n    publicAPI.dollyByFactor(callData.pokedRenderer, callData.scale / model.previousScale);\n    model.previousScale = callData.scale;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.handlePan = function (callData) {\n    var camera = callData.pokedRenderer.getActiveCamera(); // Calculate the focal depth since we'll be using it a lot\n\n    var viewFocus = camera.getFocalPoint();\n    viewFocus = publicAPI.computeWorldToDisplay(callData.pokedRenderer, viewFocus[0], viewFocus[1], viewFocus[2]);\n    var focalDepth = viewFocus[2];\n    var trans = callData.translation;\n    var lastTrans = model.previousTranslation;\n    var newPickPoint = publicAPI.computeDisplayToWorld(callData.pokedRenderer, viewFocus[0] + trans[0] - lastTrans[0], viewFocus[1] + trans[1] - lastTrans[1], focalDepth); // Has to recalc old mouse point since the viewport has moved,\n    // so can't move it outside the loop\n\n    var oldPickPoint = publicAPI.computeDisplayToWorld(callData.pokedRenderer, viewFocus[0], viewFocus[1], focalDepth); // Camera motion is reversed\n\n    var motionVector = [];\n    motionVector[0] = oldPickPoint[0] - newPickPoint[0];\n    motionVector[1] = oldPickPoint[1] - newPickPoint[1];\n    motionVector[2] = oldPickPoint[2] - newPickPoint[2];\n    viewFocus = camera.getFocalPoint();\n    var viewPoint = camera.getPosition();\n    camera.setFocalPoint(motionVector[0] + viewFocus[0], motionVector[1] + viewFocus[1], motionVector[2] + viewFocus[2]);\n    camera.setPosition(motionVector[0] + viewPoint[0], motionVector[1] + viewPoint[1], motionVector[2] + viewPoint[2]);\n\n    if (model.interactor.getLightFollowCamera()) {\n      callData.pokedRenderer.updateLightsGeometryToFollowCamera();\n    }\n\n    camera.orthogonalizeViewUp();\n    model.previousTranslation = callData.translation;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.handleRotate = function (callData) {\n    var camera = callData.pokedRenderer.getActiveCamera();\n    camera.roll(callData.rotation - model.previousRotation);\n    camera.orthogonalizeViewUp();\n    model.previousRotation = callData.rotation;\n  }; //--------------------------------------------------------------------------\n\n\n  publicAPI.handleMouseRotate = function (renderer, position) {\n    var rwi = model.interactor;\n    var dx = position.x - model.previousPosition.x;\n    var dy = position.y - model.previousPosition.y;\n    var size = rwi.getView().getViewportSize(renderer);\n    var deltaElevation = -0.1;\n    var deltaAzimuth = -0.1;\n\n    if (size[0] && size[1]) {\n      deltaElevation = -20.0 / size[1];\n      deltaAzimuth = -20.0 / size[0];\n    }\n\n    var rxf = dx * deltaAzimuth * model.motionFactor;\n    var ryf = dy * deltaElevation * model.motionFactor;\n    var camera = renderer.getActiveCamera();\n\n    if (!Number.isNaN(rxf) && !Number.isNaN(ryf)) {\n      camera.azimuth(rxf);\n      camera.elevation(ryf);\n      camera.orthogonalizeViewUp();\n    }\n\n    if (model.autoAdjustCameraClippingRange) {\n      renderer.resetCameraClippingRange();\n    }\n\n    if (rwi.getLightFollowCamera()) {\n      renderer.updateLightsGeometryToFollowCamera();\n    }\n  }; //--------------------------------------------------------------------------\n\n\n  publicAPI.handleMouseSpin = function (renderer, position) {\n    var rwi = model.interactor;\n    var camera = renderer.getActiveCamera();\n    var center = rwi.getView().getViewportCenter(renderer);\n    var oldAngle = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.x)(Math.atan2(model.previousPosition.y - center[1], model.previousPosition.x - center[0]));\n    var newAngle = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.x)(Math.atan2(position.y - center[1], position.x - center[0])) - oldAngle;\n\n    if (!Number.isNaN(newAngle)) {\n      camera.roll(newAngle);\n      camera.orthogonalizeViewUp();\n    }\n  }; //--------------------------------------------------------------------------\n\n\n  publicAPI.handleMousePan = function (renderer, position) {\n    var camera = renderer.getActiveCamera(); // Calculate the focal depth since we'll be using it a lot\n\n    var viewFocus = camera.getFocalPoint();\n    viewFocus = publicAPI.computeWorldToDisplay(renderer, viewFocus[0], viewFocus[1], viewFocus[2]);\n    var focalDepth = viewFocus[2];\n    var newPickPoint = publicAPI.computeDisplayToWorld(renderer, position.x, position.y, focalDepth); // Has to recalc old mouse point since the viewport has moved,\n    // so can't move it outside the loop\n\n    var oldPickPoint = publicAPI.computeDisplayToWorld(renderer, model.previousPosition.x, model.previousPosition.y, focalDepth); // Camera motion is reversed\n\n    var motionVector = [];\n    motionVector[0] = oldPickPoint[0] - newPickPoint[0];\n    motionVector[1] = oldPickPoint[1] - newPickPoint[1];\n    motionVector[2] = oldPickPoint[2] - newPickPoint[2];\n    viewFocus = camera.getFocalPoint();\n    var viewPoint = camera.getPosition();\n    camera.setFocalPoint(motionVector[0] + viewFocus[0], motionVector[1] + viewFocus[1], motionVector[2] + viewFocus[2]);\n    camera.setPosition(motionVector[0] + viewPoint[0], motionVector[1] + viewPoint[1], motionVector[2] + viewPoint[2]);\n\n    if (model.interactor.getLightFollowCamera()) {\n      renderer.updateLightsGeometryToFollowCamera();\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.handleMouseDolly = function (renderer, position) {\n    var dy = position.y - model.previousPosition.y;\n    var rwi = model.interactor;\n    var center = rwi.getView().getViewportCenter(renderer);\n    var dyf = model.motionFactor * dy / center[1];\n    publicAPI.dollyByFactor(renderer, Math.pow(1.1, dyf));\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.handleMouseWheel = function (callData) {\n    var dyf = 1 - callData.spinY / 10; // divide by 10 to lower the zoom factor\n\n    publicAPI.dollyByFactor(callData.pokedRenderer, dyf);\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.dollyByFactor = function (renderer, factor) {\n    if (Number.isNaN(factor)) {\n      return;\n    }\n\n    var camera = renderer.getActiveCamera();\n\n    if (camera.getParallelProjection()) {\n      camera.setParallelScale(camera.getParallelScale() / factor);\n    } else {\n      camera.dolly(factor);\n\n      if (model.autoAdjustCameraClippingRange) {\n        renderer.resetCameraClippingRange();\n      }\n    }\n\n    if (model.interactor.getLightFollowCamera()) {\n      renderer.updateLightsGeometryToFollowCamera();\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  motionFactor: 10.0\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _Rendering_Core_InteractorStyle_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues); // Create get-set macros\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['motionFactor']); // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkInteractorStyleTrackballCamera(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkInteractorStyleTrackballCamera'); // ----------------------------------------------------------------------------\n\nvar vtkInteractorStyleTrackballCamera$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkInteractorStyleTrackballCamera$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Interaction/Style/InteractorStyleTrackballCamera.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Interaction/UI/FPSMonitor.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Interaction/UI/FPSMonitor.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _FPSMonitor_FPSMonitor_module_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FPSMonitor/FPSMonitor.module.css.js */ \"./node_modules/@kitware/vtk.js/Interaction/UI/FPSMonitor/FPSMonitor.module.css.js\");\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar noOp = Function.prototype;\n\nfunction formatNumbers(n) {\n  var sections = [];\n  var size = n;\n\n  while (size > 1000) {\n    sections.push(\"000\".concat(size % 1000).slice(-3));\n    size = Math.floor(size / 1000);\n  }\n\n  if (size > 0) {\n    sections.push(size);\n  }\n\n  sections.reverse();\n  return sections.join(\"'\");\n} // ----------------------------------------------------------------------------\n// vtkFPSMonitor methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkFPSMonitor(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkFPSMonitor');\n  model.fpsMonitorContainer = document.createElement('div');\n  model.fpsMonitorContainer.setAttribute('class', model.orientationClass);\n  model.fpsMonitorContainer.innerHTML = \"\\n    <div class=\\\"\".concat(_FPSMonitor_FPSMonitor_module_css_js__WEBPACK_IMPORTED_MODULE_2__.s.leftPane, \"\\\">\\n      <div class=\\\"js-title \").concat(_FPSMonitor_FPSMonitor_module_css_js__WEBPACK_IMPORTED_MODULE_2__.s.title, \"\\\">Mean N/A - Current N/A</div>\\n      <canvas class=\\\"js-graph \").concat(_FPSMonitor_FPSMonitor_module_css_js__WEBPACK_IMPORTED_MODULE_2__.s.graph, \"\\\"></canvas>\\n    </div>\\n    <div class=\\\"js-info \").concat(_FPSMonitor_FPSMonitor_module_css_js__WEBPACK_IMPORTED_MODULE_2__.s.rightPane, \"\\\">\\n    </div>\"); // Extract various containers\n\n  model.canvas = model.fpsMonitorContainer.querySelector('.js-graph');\n  model.title = model.fpsMonitorContainer.querySelector('.js-title');\n  model.info = model.fpsMonitorContainer.querySelector('.js-info'); // --------------------------------------------------------------------------\n  // Private methods\n  // --------------------------------------------------------------------------\n\n  function renderTitle() {\n    model.title.style.display = model.titleVisibility ? 'block' : 'none';\n\n    if (!model.titleVisibility) {\n      return;\n    }\n\n    var nextFPS = model.buffer[model.buffer.length - 1];\n    var newTxt = \"Mean: \".concat(Math.round(model.fpsSum / model.buffer.length), \" - Current: \").concat(Math.round(nextFPS));\n\n    if (newTxt !== model.lastText) {\n      model.lastText = newTxt;\n      model.title.innerHTML = newTxt;\n    }\n  }\n\n  function renderInfo() {\n    model.info.style.display = model.infoVisibility ? 'grid' : 'none';\n\n    if (!model.infoVisibility) {\n      return;\n    }\n\n    var infoItems = [];\n\n    if (model.renderWindow) {\n      var realView = model.renderWindow.getViews()[0];\n\n      if (realView && realView.getSize) {\n        infoItems.push(\"<label class=\\\"\".concat(_FPSMonitor_FPSMonitor_module_css_js__WEBPACK_IMPORTED_MODULE_2__.s.label, \"\\\">Resolution</label><span class=\\\"\").concat(_FPSMonitor_FPSMonitor_module_css_js__WEBPACK_IMPORTED_MODULE_2__.s.value, \"\\\">\").concat(realView.getSize().join('x'), \"</span>\"));\n      }\n\n      var stats = _objectSpread(_objectSpread({}, model.renderWindow.getStatistics()), model.addOnStats);\n\n      var keys = Object.keys(stats);\n      keys.sort();\n\n      for (var i = 0; i < keys.length; i++) {\n        if (keys[i] === 'str') {\n          continue; // eslint-disable-line\n        }\n\n        if (stats[keys[i]]) {\n          infoItems.push(\"<label class=\\\"\".concat(_FPSMonitor_FPSMonitor_module_css_js__WEBPACK_IMPORTED_MODULE_2__.s.label, \"\\\">\").concat(keys[i], \"</label><span class=\\\"\").concat(_FPSMonitor_FPSMonitor_module_css_js__WEBPACK_IMPORTED_MODULE_2__.s.value, \"\\\">\").concat(formatNumbers(stats[keys[i]]), \"</span>\"));\n        }\n      }\n    }\n\n    model.info.innerHTML = infoItems.join('');\n  }\n\n  function renderCanvas() {\n    model.canvas.style.display = model.canvasVisibility ? 'block' : 'none';\n\n    if (!model.canvasVisibility) {\n      return;\n    } // Although this is called frequently, setting an attribute to the same value is a no-op\n\n\n    model.canvas.setAttribute('width', model.bufferSize);\n    model.canvas.setAttribute('height', model.graphHeight);\n    var ctx = model.canvas.getContext('2d');\n    var _model$canvas = model.canvas,\n        width = _model$canvas.width,\n        height = _model$canvas.height;\n    ctx.clearRect(0, 0, width, height); // Current fps\n\n    ctx.strokeStyle = 'green';\n    ctx.beginPath();\n    ctx.moveTo(0, height - model.buffer[0]);\n\n    for (var i = 1; i < model.buffer.length; i++) {\n      ctx.lineTo(i, height - model.buffer[i]);\n    }\n\n    ctx.stroke(); // 60 fps ref\n\n    ctx.strokeStyle = 'black';\n    ctx.beginPath();\n    ctx.moveTo(0, height - 60);\n    ctx.lineTo(width, height - 60);\n    ctx.stroke();\n  }\n\n  function frameChanged() {\n    if (!model.interactor) {\n      return;\n    }\n\n    var nextFPS = 1 / model.interactor.getLastFrameTime();\n    model.buffer.push(nextFPS);\n    model.fpsSum += nextFPS;\n\n    while (model.buffer.length > model.bufferSize) {\n      model.fpsSum -= model.buffer.shift();\n    }\n\n    renderTitle();\n    renderCanvas();\n  } // --------------------------------------------------------------------------\n  // Public methods\n  // --------------------------------------------------------------------------\n\n\n  publicAPI.update = function () {\n    publicAPI.render();\n  }; // --------------------------------------------------------------------------\n\n\n  publicAPI.setRenderWindow = function (rw) {\n    while (model.subscriptions.length) {\n      model.subscriptions.pop().unsubscribe();\n    }\n\n    model.renderWindow = rw;\n    model.interactor = rw ? rw.getInteractor() : null;\n\n    if (model.interactor) {\n      model.subscriptions.push(model.interactor.onAnimation(frameChanged));\n    }\n  }; // --------------------------------------------------------------------------\n\n\n  publicAPI.setContainer = function (el) {\n    if (model.container && model.container !== el) {\n      model.container.removeChild(model.fpsMonitorContainer);\n    }\n\n    if (model.container !== el) {\n      model.container = el;\n\n      if (model.container) {\n        model.container.appendChild(model.fpsMonitorContainer);\n        publicAPI.resize();\n      }\n\n      publicAPI.modified();\n    }\n  }; // --------------------------------------------------------------------------\n\n\n  publicAPI.render = function () {\n    renderTitle();\n    renderInfo();\n    renderCanvas();\n  }; // --------------------------------------------------------------------------\n\n\n  publicAPI.resize = noOp; // --------------------------------------------------------------------------\n\n  publicAPI.setOrientationToHorizontal = function () {\n    model.fpsMonitorContainer.classList.remove(model.orientationClass);\n    model.orientationClass = _FPSMonitor_FPSMonitor_module_css_js__WEBPACK_IMPORTED_MODULE_2__.s.horizontalContainer;\n    model.fpsMonitorContainer.classList.add(model.orientationClass);\n  }; // --------------------------------------------------------------------------\n\n\n  publicAPI.setOrientationToVertical = function () {\n    model.fpsMonitorContainer.classList.remove(model.orientationClass);\n    model.orientationClass = _FPSMonitor_FPSMonitor_module_css_js__WEBPACK_IMPORTED_MODULE_2__.s.verticalContainer;\n    model.fpsMonitorContainer.classList.add(model.orientationClass);\n  }; // --------------------------------------------------------------------------\n\n\n  publicAPI.setOrientation = function () {\n    var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'horizontal';\n\n    if (mode === 'horizontal') {\n      publicAPI.setOrientationToHorizontal();\n    } else {\n      publicAPI.setOrientationToVertical();\n    }\n  }; // --------------------------------------------------------------------------\n\n\n  publicAPI.setAddOnStats = function (addOn) {\n    if (!model.addOnStats) {\n      model.addOnStats = {};\n    }\n\n    Object.assign(model.addOnStats, addOn);\n    renderInfo();\n  }; // --------------------------------------------------------------------------\n\n\n  publicAPI.setMonitorVisibility = function () {\n    var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n    var graph = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n    var info = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n    publicAPI.setCanvasVisibility(graph);\n    publicAPI.setInfoVisibility(info);\n    publicAPI.setTitleVisibility(title);\n  }; // --------------------------------------------------------------------------\n\n\n  var superDelete = publicAPI.delete;\n\n  publicAPI.delete = function () {\n    publicAPI.setRenderWindow(null);\n    publicAPI.setContainer(null);\n    superDelete();\n  }; // --------------------------------------------------------------------------\n\n\n  model.subscriptions.push(publicAPI.onModified(publicAPI.update));\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  bufferSize: 200,\n  graphHeight: 120,\n  buffer: [60],\n  subscriptions: [],\n  fpsSum: 0,\n  orientationClass: _FPSMonitor_FPSMonitor_module_css_js__WEBPACK_IMPORTED_MODULE_2__.s.horizontalContainer,\n  canvasVisibility: true,\n  titleVisibility: true,\n  infoVisibility: true\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['fpsMonitorContainer', 'renderWindow', 'addOnStats']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['bufferSize', 'canvasVisibility', 'infoVisibility', 'titleVisibility']); // Object specific methods\n\n  vtkFPSMonitor(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkFPSMonitor'); // ----------------------------------------------------------------------------\n\nvar vtkFPSMonitor$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkFPSMonitor$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Interaction/UI/FPSMonitor.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Interaction/UI/FPSMonitor/FPSMonitor.module.css.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Interaction/UI/FPSMonitor/FPSMonitor.module.css.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"s\": () => (/* binding */ style)\n/* harmony export */ });\n/* harmony import */ var _vendor_style_inject_dist_style_inject_es_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../vendor/style-inject/dist/style-inject.es.js */ \"./node_modules/@kitware/vtk.js/vendor/style-inject/dist/style-inject.es.js\");\n\n\nvar css_248z = \".FPSMonitor-module_verticalContainer__1oES5 {\\n  display: flex;\\n  flex-direction: column;\\n  justify-content: flex-start;\\n  align-items: stretch;\\n}\\n\\n.FPSMonitor-module_horizontalContainer__3dO_q {\\n  display: flex;\\n  flex-direction: row;\\n  justify-content: flex-start;\\n}\\n\\n.FPSMonitor-module_leftPane__3PHsp {\\n  flex: none;\\n  display: flex;\\n  flex-direction: column;\\n  justify-content: flex-start;\\n  align-items: stretch;\\n}\\n\\n.FPSMonitor-module_rightPane__30Een {\\n  flex: 1;\\n  display: grid;\\n  grid-template-columns: auto auto;\\n  grid-auto-rows: 1.5em;\\n  grid-column-gap: 5px;\\n  grid-row-gap: 2px;\\n  padding: 10px;\\n}\\n\\n.FPSMonitor-module_title__3a5vQ {\\n  flex: 1;\\n  font-weight: bold;\\n  padding: 5px 10px 0 10px;\\n}\\n\\n.FPSMonitor-module_graph__lvtIQ {\\n  flex: none;\\n  border: solid 1px black;\\n  margin: 10px ;\\n  border-radius: 2px;\\n  overflow: hidden;\\n}\\n\\n.FPSMonitor-module_label__3saqc {\\n  font-weight: bold;\\n  text-transform: capitalize;\\n  text-align: right;\\n  align-self: center;\\n}\\n\\n.FPSMonitor-module_value__2WrfF {\\n  font-style: italic;\\n  text-align: center;\\n  align-self: center;\\n}\\n\";\nvar style = {\"verticalContainer\":\"FPSMonitor-module_verticalContainer__1oES5\",\"horizontalContainer\":\"FPSMonitor-module_horizontalContainer__3dO_q\",\"leftPane\":\"FPSMonitor-module_leftPane__3PHsp\",\"rightPane\":\"FPSMonitor-module_rightPane__30Een\",\"title\":\"FPSMonitor-module_title__3a5vQ\",\"graph\":\"FPSMonitor-module_graph__lvtIQ\",\"label\":\"FPSMonitor-module_label__3saqc\",\"value\":\"FPSMonitor-module_value__2WrfF\"};\n(0,_vendor_style_inject_dist_style_inject_es_js__WEBPACK_IMPORTED_MODULE_0__.s)(css_248z);\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Interaction/UI/FPSMonitor/FPSMonitor.module.css.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/AbstractMapper.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/AbstractMapper.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\n// vtkAbstractMapper methods\n// ----------------------------------------------------------------------------\n\nfunction vtkAbstractMapper(publicAPI, model) {\n  publicAPI.update = function () {\n    publicAPI.getInputData();\n  };\n\n  publicAPI.addClippingPlane = function (plane) {\n    if (plane.getClassName() !== 'vtkPlane') {\n      return;\n    }\n\n    model.clippingPlanes.push(plane);\n  };\n\n  publicAPI.getNumberOfClippingPlanes = function () {\n    return model.clippingPlanes.length;\n  };\n\n  publicAPI.removeAllClippingPlanes = function () {\n    model.clippingPlanes.length = 0;\n  };\n\n  publicAPI.removeClippingPlane = function (i) {\n    if (i < 0 || i >= 6) {\n      return;\n    }\n\n    model.clippingPlanes.splice(i, 1);\n  };\n\n  publicAPI.getClippingPlanes = function () {\n    return model.clippingPlanes;\n  };\n\n  publicAPI.setClippingPlanes = function (planes) {\n    if (!planes) {\n      return;\n    }\n\n    if (!Array.isArray(planes)) {\n      publicAPI.addClippingPlane(planes);\n    } else {\n      var nbPlanes = planes.length;\n\n      for (var i = 0; i < nbPlanes && i < 6; i++) {\n        publicAPI.addClippingPlane(planes[i]);\n      }\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  clippingPlanes: []\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.algo(publicAPI, model, 1, 0);\n\n  if (!model.clippingPlanes) {\n    model.clippingPlanes = [];\n  }\n\n  vtkAbstractMapper(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar vtkAbstractMapper$1 = {\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkAbstractMapper$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/AbstractMapper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/AbstractMapper3D.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/AbstractMapper3D.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _AbstractMapper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AbstractMapper.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/AbstractMapper.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n\n\n\n\n// vtkAbstractMapper methods\n// ----------------------------------------------------------------------------\n\nfunction vtkAbstractMapper3D(publicAPI, model) {\n  publicAPI.getBounds = function () {\n    return 0;\n  };\n\n  publicAPI.getBounds = function (bounds) {\n    publicAPI.getBounds();\n\n    for (var i = 0; i < 6; i++) {\n      bounds[i] = model.bounds[i];\n    }\n  };\n\n  publicAPI.getCenter = function () {\n    publicAPI.getBounds();\n\n    for (var i = 0; i < 3; i++) {\n      model.center[i] = (model.bounds[2 * i + 1] + model.bounds[2 * i]) / 2.0;\n    }\n\n    return model.center.slice();\n  };\n\n  publicAPI.getLength = function () {\n    var diff = 0.0;\n    var l = 0.0;\n    publicAPI.getBounds();\n\n    for (var i = 0; i < 3; i++) {\n      diff = model.bounds[2 * i + 1] - model.bounds[2 * i];\n      l += diff * diff;\n    }\n\n    return Math.sqrt(l);\n  };\n\n  publicAPI.getClippingPlaneInDataCoords = function (propMatrix, i, hnormal) {\n    var clipPlanes = model.clippingPlanes;\n    var mat = propMatrix;\n\n    if (clipPlanes) {\n      var n = clipPlanes.length;\n\n      if (i >= 0 && i < n) {\n        // Get the plane\n        var plane = clipPlanes[i];\n        var normal = plane.getNormal();\n        var origin = plane.getOrigin(); // Compute the plane equation\n\n        var v1 = normal[0];\n        var v2 = normal[1];\n        var v3 = normal[2];\n        var v4 = -(v1 * origin[0] + v2 * origin[1] + v3 * origin[2]); // Transform normal from world to data coords\n\n        hnormal[0] = v1 * mat[0] + v2 * mat[4] + v3 * mat[8] + v4 * mat[12];\n        hnormal[1] = v1 * mat[1] + v2 * mat[5] + v3 * mat[9] + v4 * mat[13];\n        hnormal[2] = v1 * mat[2] + v2 * mat[6] + v3 * mat[10] + v4 * mat[14];\n        hnormal[3] = v1 * mat[3] + v2 * mat[7] + v3 * mat[11] + v4 * mat[15];\n        return;\n      }\n    }\n\n    _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.vtkErrorMacro(\"Clipping plane index \".concat(i, \" is out of range.\"));\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  bounds: [1, -1, 1, -1, 1, -1],\n  center: [0, 0, 0]\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _AbstractMapper_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues);\n\n  if (!model.bounds) {\n    (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.u)(model.bounds);\n  }\n\n  if (!model.center) {\n    model.center = [0.0, 0.0, 0.0];\n  }\n\n  vtkAbstractMapper3D(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar vtkAbstractMapper3D$1 = {\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkAbstractMapper3D$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/AbstractMapper3D.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Actor.js":
/*!**************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Actor.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/DataModel/BoundingBox.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/BoundingBox.js\");\n/* harmony import */ var _Prop3D_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Prop3D.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Prop3D.js\");\n/* harmony import */ var _Property_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Property.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Property.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/vec3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js\");\n\n\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkDebugMacro; // ----------------------------------------------------------------------------\n// vtkActor methods\n// ----------------------------------------------------------------------------\n\nfunction vtkActor(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkActor'); // Capture 'parentClass' api for internal use\n\n  var superClass = _objectSpread({}, publicAPI);\n\n  publicAPI.getActors = function () {\n    return publicAPI;\n  };\n\n  publicAPI.getIsOpaque = function () {\n    if (model.forceOpaque) {\n      return true;\n    }\n\n    if (model.forceTranslucent) {\n      return false;\n    } // make sure we have a property\n\n\n    if (!model.property) {\n      // force creation of a property\n      publicAPI.getProperty();\n    }\n\n    var isOpaque = model.property.getOpacity() >= 1.0; // are we using an opaque texture, if any?\n\n    isOpaque = isOpaque && (!model.texture || !model.texture.isTranslucent()); // are we using an opaque scalar array, if any?\n\n    isOpaque = isOpaque && (!model.mapper || model.mapper.getIsOpaque());\n    return isOpaque;\n  };\n\n  publicAPI.hasTranslucentPolygonalGeometry = function () {\n    if (model.mapper === null) {\n      return false;\n    } // make sure we have a property\n\n\n    if (model.property === null) {\n      // force creation of a property\n      publicAPI.setProperty(publicAPI.makeProperty());\n    } // is this actor opaque ?\n\n\n    return !publicAPI.getIsOpaque();\n  };\n\n  publicAPI.makeProperty = _Property_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance;\n\n  publicAPI.getProperty = function () {\n    if (model.property === null) {\n      model.property = publicAPI.makeProperty();\n    }\n\n    return model.property;\n  };\n\n  publicAPI.getBounds = function () {\n    if (model.mapper === null) {\n      return model.bounds;\n    } // Check for the special case when the mapper's bounds are unknown\n\n\n    var bds = model.mapper.getBounds();\n\n    if (!bds || bds.length !== 6) {\n      return bds;\n    } // Check for the special case when the actor is empty.\n\n\n    if (bds[0] > bds[1]) {\n      model.mapperBounds = bds.concat(); // copy the mapper's bounds\n\n      model.bounds = [1, -1, 1, -1, 1, -1];\n      model.boundsMTime.modified();\n      return bds;\n    } // Check if we have cached values for these bounds - we cache the\n    // values returned by model.mapper.getBounds() and we store the time\n    // of caching. If the values returned this time are different, or\n    // the modified time of this class is newer than the cached time,\n    // then we need to rebuild.\n\n\n    if (!model.mapperBounds || bds[0] !== model.mapperBounds[0] || bds[1] !== model.mapperBounds[1] || bds[2] !== model.mapperBounds[2] || bds[3] !== model.mapperBounds[3] || bds[4] !== model.mapperBounds[4] || bds[5] !== model.mapperBounds[5] || publicAPI.getMTime() > model.boundsMTime.getMTime()) {\n      vtkDebugMacro('Recomputing bounds...');\n      model.mapperBounds = bds.concat(); // copy the mapper's bounds\n\n      var bbox = [];\n      _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_2__.default.getCorners(bds, bbox);\n      publicAPI.computeMatrix();\n      var tmp4 = new Float64Array(16);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_5__.j)(tmp4, model.matrix);\n      bbox.forEach(function (pt) {\n        return (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_6__.t)(pt, pt, tmp4);\n      });\n      /* eslint-disable no-multi-assign */\n\n      model.bounds[0] = model.bounds[2] = model.bounds[4] = Number.MAX_VALUE;\n      model.bounds[1] = model.bounds[3] = model.bounds[5] = -Number.MAX_VALUE;\n      /* eslint-enable no-multi-assign */\n\n      model.bounds = model.bounds.map(function (d, i) {\n        return i % 2 === 0 ? bbox.reduce(function (a, b) {\n          return a > b[i / 2] ? b[i / 2] : a;\n        }, d) : bbox.reduce(function (a, b) {\n          return a < b[(i - 1) / 2] ? b[(i - 1) / 2] : a;\n        }, d);\n      });\n      model.boundsMTime.modified();\n    }\n\n    return model.bounds;\n  };\n\n  publicAPI.getMTime = function () {\n    var mt = superClass.getMTime();\n\n    if (model.property !== null) {\n      var time = model.property.getMTime();\n      mt = time > mt ? time : mt;\n    }\n\n    if (model.backfaceProperty !== null) {\n      var _time = model.backfaceProperty.getMTime();\n\n      mt = _time > mt ? _time : mt;\n    }\n\n    return mt;\n  };\n\n  publicAPI.getRedrawMTime = function () {\n    var mt = model.mtime;\n\n    if (model.mapper !== null) {\n      var time = model.mapper.getMTime();\n      mt = time > mt ? time : mt;\n\n      if (model.mapper.getInput() !== null) {\n        // FIXME !!! getInputAlgorithm / getInput\n        model.mapper.getInputAlgorithm().update();\n        time = model.mapper.getInput().getMTime();\n        mt = time > mt ? time : mt;\n      }\n    }\n\n    return mt;\n  };\n\n  publicAPI.getSupportsSelection = function () {\n    return model.mapper ? model.mapper.getSupportsSelection() : false;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  mapper: null,\n  property: null,\n  backfaceProperty: null,\n  forceOpaque: false,\n  forceTranslucent: false,\n  bounds: [1, -1, 1, -1, 1, -1]\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _Prop3D_js__WEBPACK_IMPORTED_MODULE_3__.default.extend(publicAPI, model, initialValues); // vtkTimeStamp\n\n  model.boundsMTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(model.boundsMTime); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.set(publicAPI, model, ['property']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['backfaceProperty', 'forceOpaque', 'forceTranslucent', 'mapper']); // Object methods\n\n  vtkActor(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkActor'); // ----------------------------------------------------------------------------\n\nvar vtkActor$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkActor$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Actor.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Camera.js":
/*!***************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Camera.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"DEFAULT_VALUES\": () => (/* binding */ DEFAULT_VALUES),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_vec4_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/vec4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec4.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/vec3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/quat.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/quat.js\");\n\n\n\n\n\n\n\n\nvar vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkDebugMacro;\n/* eslint-disable new-cap */\n\n/*\n * Convenience function to access elements of a gl-matrix.  If it turns\n * out I have rows and columns swapped everywhere, then I'll just change\n * the order of 'row' and 'col' parameters in this function\n */\n// function getMatrixElement(matrix, row, col) {\n//   const idx = (row * 4) + col;\n//   return matrix[idx];\n// }\n// ----------------------------------------------------------------------------\n// vtkCamera methods\n// ----------------------------------------------------------------------------\n\nfunction vtkCamera(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkCamera'); // Set up private variables and methods\n\n  var origin = new Float64Array(3);\n  var dopbasis = new Float64Array([0.0, 0.0, -1.0]);\n  var upbasis = new Float64Array([0.0, 1.0, 0.0]);\n  var tmpMatrix = (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(new Float64Array(16));\n  var tmpvec1 = new Float64Array(3);\n  var tmpvec2 = new Float64Array(3);\n  var tmpvec3 = new Float64Array(3);\n  var rotateMatrix = (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(new Float64Array(16));\n  var trans = (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(new Float64Array(16));\n  var newPosition = new Float64Array(3);\n  var newFocalPoint = new Float64Array(3); // Internal Functions that don't need to be public\n\n  function computeViewPlaneNormal() {\n    // VPN is -DOP\n    model.viewPlaneNormal[0] = -model.directionOfProjection[0];\n    model.viewPlaneNormal[1] = -model.directionOfProjection[1];\n    model.viewPlaneNormal[2] = -model.directionOfProjection[2];\n  }\n\n  publicAPI.orthogonalizeViewUp = function () {\n    var vt = publicAPI.getViewMatrix();\n    model.viewUp[0] = vt[4];\n    model.viewUp[1] = vt[5];\n    model.viewUp[2] = vt[6];\n    publicAPI.modified();\n  };\n\n  publicAPI.setPosition = function (x, y, z) {\n    if (x === model.position[0] && y === model.position[1] && z === model.position[2]) {\n      return;\n    }\n\n    model.position[0] = x;\n    model.position[1] = y;\n    model.position[2] = z; // recompute the focal distance\n\n    publicAPI.computeDistance();\n    publicAPI.modified();\n  };\n\n  publicAPI.setFocalPoint = function (x, y, z) {\n    if (x === model.focalPoint[0] && y === model.focalPoint[1] && z === model.focalPoint[2]) {\n      return;\n    }\n\n    model.focalPoint[0] = x;\n    model.focalPoint[1] = y;\n    model.focalPoint[2] = z; // recompute the focal distance\n\n    publicAPI.computeDistance();\n    publicAPI.modified();\n  };\n\n  publicAPI.setDistance = function (d) {\n    if (model.distance === d) {\n      return;\n    }\n\n    model.distance = d;\n\n    if (model.distance < 1e-20) {\n      model.distance = 1e-20;\n      vtkDebugMacro('Distance is set to minimum.');\n    } // we want to keep the camera pointing in the same direction\n\n\n    var vec = model.directionOfProjection; // recalculate FocalPoint\n\n    model.focalPoint[0] = model.position[0] + vec[0] * model.distance;\n    model.focalPoint[1] = model.position[1] + vec[1] * model.distance;\n    model.focalPoint[2] = model.position[2] + vec[2] * model.distance;\n    publicAPI.modified();\n  }; //----------------------------------------------------------------------------\n  // This method must be called when the focal point or camera position changes\n\n\n  publicAPI.computeDistance = function () {\n    var dx = model.focalPoint[0] - model.position[0];\n    var dy = model.focalPoint[1] - model.position[1];\n    var dz = model.focalPoint[2] - model.position[2];\n    model.distance = Math.sqrt(dx * dx + dy * dy + dz * dz);\n\n    if (model.distance < 1e-20) {\n      model.distance = 1e-20;\n      vtkDebugMacro('Distance is set to minimum.');\n      var vec = model.directionOfProjection; // recalculate FocalPoint\n\n      model.focalPoint[0] = model.position[0] + vec[0] * model.distance;\n      model.focalPoint[1] = model.position[1] + vec[1] * model.distance;\n      model.focalPoint[2] = model.position[2] + vec[2] * model.distance;\n    }\n\n    model.directionOfProjection[0] = dx / model.distance;\n    model.directionOfProjection[1] = dy / model.distance;\n    model.directionOfProjection[2] = dz / model.distance;\n    computeViewPlaneNormal();\n  }; //----------------------------------------------------------------------------\n  // Move the position of the camera along the view plane normal. Moving\n  // towards the focal point (e.g., > 1) is a dolly-in, moving away\n  // from the focal point (e.g., < 1) is a dolly-out.\n\n\n  publicAPI.dolly = function (amount) {\n    if (amount <= 0.0) {\n      return;\n    } // dolly moves the camera towards the focus\n\n\n    var d = model.distance / amount;\n    publicAPI.setPosition(model.focalPoint[0] - d * model.directionOfProjection[0], model.focalPoint[1] - d * model.directionOfProjection[1], model.focalPoint[2] - d * model.directionOfProjection[2]);\n  };\n\n  publicAPI.roll = function (angle) {\n    var eye = model.position;\n    var at = model.focalPoint;\n    var up = model.viewUp;\n    var viewUpVec4 = new Float64Array([up[0], up[1], up[2], 0.0]);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(rotateMatrix);\n    var viewDir = new Float64Array([at[0] - eye[0], at[1] - eye[1], at[2] - eye[2]]);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.r)(rotateMatrix, rotateMatrix, (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(angle), viewDir);\n    (0,_vendor_gl_matrix_esm_vec4_js__WEBPACK_IMPORTED_MODULE_4__.t)(viewUpVec4, viewUpVec4, rotateMatrix);\n    model.viewUp[0] = viewUpVec4[0];\n    model.viewUp[1] = viewUpVec4[1];\n    model.viewUp[2] = viewUpVec4[2];\n    publicAPI.modified();\n  };\n\n  publicAPI.azimuth = function (angle) {\n    var fp = model.focalPoint;\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(trans); // translate the focal point to the origin,\n    // rotate about view up,\n    // translate back again\n\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.t)(trans, trans, fp);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.r)(trans, trans, (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(angle), model.viewUp);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.t)(trans, trans, [-fp[0], -fp[1], -fp[2]]); // apply the transform to the position\n\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.t)(newPosition, model.position, trans);\n    publicAPI.setPosition(newPosition[0], newPosition[1], newPosition[2]);\n  };\n\n  publicAPI.yaw = function (angle) {\n    var position = model.position;\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(trans); // translate the camera to the origin,\n    // rotate about axis,\n    // translate back again\n\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.t)(trans, trans, position);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.r)(trans, trans, (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(angle), model.viewUp);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.t)(trans, trans, [-position[0], -position[1], -position[2]]); // apply the transform to the position\n\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.t)(newFocalPoint, model.focalPoint, trans);\n    publicAPI.setFocalPoint(newFocalPoint[0], newFocalPoint[1], newFocalPoint[2]);\n  };\n\n  publicAPI.elevation = function (angle) {\n    var fp = model.focalPoint; // get the eye / camera position from the viewMatrix\n\n    var vt = publicAPI.getViewMatrix();\n    var axis = [-vt[0], -vt[1], -vt[2]];\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(trans); // translate the focal point to the origin,\n    // rotate about view up,\n    // translate back again\n\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.t)(trans, trans, fp);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.r)(trans, trans, (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(angle), axis);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.t)(trans, trans, [-fp[0], -fp[1], -fp[2]]); // apply the transform to the position\n\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.t)(newPosition, model.position, trans);\n    publicAPI.setPosition(newPosition[0], newPosition[1], newPosition[2]);\n  };\n\n  publicAPI.pitch = function (angle) {\n    var position = model.position;\n    var vt = publicAPI.getViewMatrix();\n    var axis = [vt[0], vt[1], vt[2]];\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(trans); // translate the camera to the origin,\n    // rotate about axis,\n    // translate back again\n\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.t)(trans, trans, position);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.r)(trans, trans, (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(angle), axis);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.t)(trans, trans, [-position[0], -position[1], -position[2]]); // apply the transform to the focal point\n\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.t)(newFocalPoint, model.focalPoint, trans);\n    publicAPI.setFocalPoint.apply(publicAPI, (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(newFocalPoint));\n  };\n\n  publicAPI.zoom = function (factor) {\n    if (factor <= 0) {\n      return;\n    }\n\n    if (model.parallelProjection) {\n      model.parallelScale /= factor;\n    } else {\n      model.viewAngle /= factor;\n    }\n\n    publicAPI.modified();\n  };\n\n  publicAPI.translate = function (x, y, z) {\n    var offset = [x, y, z];\n    (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.j)(model.position, offset, model.position);\n    (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.j)(model.focalPoint, offset, model.focalPoint);\n    publicAPI.computeDistance();\n    publicAPI.modified();\n  };\n\n  publicAPI.applyTransform = function (transformMat4$1) {\n    var vuOld = [].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(model.viewUp), [1.0]);\n    var posNew = [];\n    var fpNew = [];\n    var vuNew = [];\n    vuOld[0] += model.position[0];\n    vuOld[1] += model.position[1];\n    vuOld[2] += model.position[2];\n    (0,_vendor_gl_matrix_esm_vec4_js__WEBPACK_IMPORTED_MODULE_4__.t)(posNew, [].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(model.position), [1.0]), transformMat4$1);\n    (0,_vendor_gl_matrix_esm_vec4_js__WEBPACK_IMPORTED_MODULE_4__.t)(fpNew, [].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(model.focalPoint), [1.0]), transformMat4$1);\n    (0,_vendor_gl_matrix_esm_vec4_js__WEBPACK_IMPORTED_MODULE_4__.t)(vuNew, vuOld, transformMat4$1);\n    vuNew[0] -= posNew[0];\n    vuNew[1] -= posNew[1];\n    vuNew[2] -= posNew[2];\n    publicAPI.setPosition.apply(publicAPI, (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(posNew.slice(0, 3)));\n    publicAPI.setFocalPoint.apply(publicAPI, (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(fpNew.slice(0, 3)));\n    publicAPI.setViewUp.apply(publicAPI, (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(vuNew.slice(0, 3)));\n  };\n\n  publicAPI.getThickness = function () {\n    return model.clippingRange[1] - model.clippingRange[0];\n  };\n\n  publicAPI.setThickness = function (thickness) {\n    var t = thickness;\n\n    if (t < 1e-20) {\n      t = 1e-20;\n      vtkDebugMacro('Thickness is set to minimum.');\n    }\n\n    publicAPI.setClippingRange(model.clippingRange[0], model.clippingRange[0] + t);\n  };\n\n  publicAPI.setThicknessFromFocalPoint = function (thickness) {\n    var t = thickness;\n\n    if (t < 1e-20) {\n      t = 1e-20;\n      vtkDebugMacro('Thickness is set to minimum.');\n    }\n\n    publicAPI.setClippingRange(model.distance - t / 2, model.distance + t / 2);\n  }; // Unimplemented functions\n\n\n  publicAPI.setRoll = function (angle) {}; // dependency on GetOrientation() and a model.ViewTransform object, see https://github.com/Kitware/VTK/blob/master/Common/Transforms/vtkTransform.cxx and https://vtk.org/doc/nightly/html/classvtkTransform.html\n\n\n  publicAPI.getRoll = function () {};\n\n  publicAPI.setObliqueAngles = function (alpha, beta) {};\n\n  publicAPI.getOrientation = function () {};\n\n  publicAPI.getOrientationWXYZ = function () {};\n\n  publicAPI.getFrustumPlanes = function (aspect) {// Return array of 24 params (4 params for each of 6 plane equations)\n  };\n\n  publicAPI.getCameraLightTransformMatrix = function () {};\n\n  publicAPI.deepCopy = function (sourceCamera) {};\n\n  publicAPI.physicalOrientationToWorldDirection = function (ori) {\n    // push the x axis through the orientation quat\n    var oriq = (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_6__.f)(ori[0], ori[1], ori[2], ori[3]);\n    var coriq = (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_6__.c)();\n    var qdir = (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_6__.f)(0.0, 0.0, 1.0, 0.0);\n    (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_6__.a)(coriq, oriq); // rotate the z axis by the quat\n\n    (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_6__.m)(qdir, oriq, qdir);\n    (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_6__.m)(qdir, qdir, coriq); // return the z axis in world coords\n\n    return [qdir[0], qdir[1], qdir[2]];\n  };\n\n  publicAPI.getPhysicalToWorldMatrix = function (result) {\n    publicAPI.getWorldToPhysicalMatrix(result);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.i)(result, result);\n  };\n\n  publicAPI.getWorldToPhysicalMatrix = function (result) {\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(result); // now the physical to vtk world rotation tform\n\n    var physVRight = [3];\n    (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.g)(model.physicalViewNorth, model.physicalViewUp, physVRight);\n    result[0] = physVRight[0];\n    result[1] = physVRight[1];\n    result[2] = physVRight[2];\n    result[4] = model.physicalViewUp[0];\n    result[5] = model.physicalViewUp[1];\n    result[6] = model.physicalViewUp[2];\n    result[8] = -model.physicalViewNorth[0];\n    result[9] = -model.physicalViewNorth[1];\n    result[10] = -model.physicalViewNorth[2];\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.j)(result, result);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.s)(tmpvec1, 1 / model.physicalScale, 1 / model.physicalScale, 1 / model.physicalScale);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.s)(result, result, tmpvec1);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.t)(result, result, model.physicalTranslation);\n  };\n\n  publicAPI.computeViewParametersFromViewMatrix = function (vmat) {\n    // invert to get view to world\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.i)(tmpMatrix, vmat); // note with glmatrix operations happen in\n    // the reverse order\n    // mat.scale\n    // mat.translate\n    // will result in the translation then the scale\n    // mat.mult(a,b)\n    // results in perform the B transformation then A\n    // then extract the params position, orientation\n    // push 0,0,0 through to get a translation\n\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.t)(tmpvec1, origin, tmpMatrix);\n    publicAPI.computeDistance();\n    var oldDist = model.distance;\n    publicAPI.setPosition(tmpvec1[0], tmpvec1[1], tmpvec1[2]); // push basis vectors to get orientation\n\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.t)(tmpvec2, dopbasis, tmpMatrix);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.a)(tmpvec2, tmpvec2, tmpvec1);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.d)(tmpvec2, tmpvec2);\n    publicAPI.setDirectionOfProjection(tmpvec2[0], tmpvec2[1], tmpvec2[2]);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.t)(tmpvec3, upbasis, tmpMatrix);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.a)(tmpvec3, tmpvec3, tmpvec1);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.d)(tmpvec3, tmpvec3);\n    publicAPI.setViewUp(tmpvec3[0], tmpvec3[1], tmpvec3[2]);\n    publicAPI.setDistance(oldDist);\n  }; // the provided matrix should include\n  // translation and orientation only\n  // mat is physical to view\n\n\n  publicAPI.computeViewParametersFromPhysicalMatrix = function (mat) {\n    // get the WorldToPhysicalMatrix\n    publicAPI.getWorldToPhysicalMatrix(tmpMatrix); // first convert the physical -> view matrix to be\n    // world -> view\n\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.m)(tmpMatrix, mat, tmpMatrix);\n    publicAPI.computeViewParametersFromViewMatrix(tmpMatrix);\n  };\n\n  publicAPI.setViewMatrix = function (mat) {\n    model.viewMatrix = mat;\n\n    if (model.viewMatrix) {\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.c)(tmpMatrix, model.viewMatrix);\n      publicAPI.computeViewParametersFromViewMatrix(tmpMatrix);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.j)(model.viewMatrix, model.viewMatrix);\n    }\n  };\n\n  publicAPI.getViewMatrix = function () {\n    if (model.viewMatrix) {\n      return model.viewMatrix;\n    }\n\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.l)(tmpMatrix, model.position, // eye\n    model.focalPoint, // at\n    model.viewUp // up\n    );\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.j)(tmpMatrix, tmpMatrix);\n    var result = new Float64Array(16);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.c)(result, tmpMatrix);\n    return result;\n  };\n\n  publicAPI.setProjectionMatrix = function (mat) {\n    model.projectionMatrix = mat;\n  };\n\n  publicAPI.getProjectionMatrix = function (aspect, nearz, farz) {\n    var result = new Float64Array(16);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(result);\n\n    if (model.projectionMatrix) {\n      var scale$1 = 1 / model.physicalScale;\n      (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.s)(tmpvec1, scale$1, scale$1, scale$1);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.c)(result, model.projectionMatrix);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.s)(result, result, tmpvec1);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.j)(result, result);\n      return result;\n    }\n\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(tmpMatrix); // FIXME: Not sure what to do about adjust z buffer here\n    // adjust Z-buffer range\n    // this->ProjectionTransform->AdjustZBuffer( -1, +1, nearz, farz );\n\n    var cWidth = model.clippingRange[1] - model.clippingRange[0];\n    var cRange = [model.clippingRange[0] + (nearz + 1) * cWidth / 2.0, model.clippingRange[0] + (farz + 1) * cWidth / 2.0];\n\n    if (model.parallelProjection) {\n      // set up a rectangular parallelipiped\n      var width = model.parallelScale * aspect;\n      var height = model.parallelScale;\n      var xmin = (model.windowCenter[0] - 1.0) * width;\n      var xmax = (model.windowCenter[0] + 1.0) * width;\n      var ymin = (model.windowCenter[1] - 1.0) * height;\n      var ymax = (model.windowCenter[1] + 1.0) * height;\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.o)(tmpMatrix, xmin, xmax, ymin, ymax, cRange[0], cRange[1]);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.j)(tmpMatrix, tmpMatrix);\n    } else if (model.useOffAxisProjection) {\n      throw new Error('Off-Axis projection is not supported at this time');\n    } else {\n      var tmp = Math.tan((0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(model.viewAngle) / 2.0);\n\n      var _width;\n\n      var _height;\n\n      if (model.useHorizontalViewAngle === true) {\n        _width = model.clippingRange[0] * tmp;\n        _height = model.clippingRange[0] * tmp / aspect;\n      } else {\n        _width = model.clippingRange[0] * tmp * aspect;\n        _height = model.clippingRange[0] * tmp;\n      }\n\n      var _xmin = (model.windowCenter[0] - 1.0) * _width;\n\n      var _xmax = (model.windowCenter[0] + 1.0) * _width;\n\n      var _ymin = (model.windowCenter[1] - 1.0) * _height;\n\n      var _ymax = (model.windowCenter[1] + 1.0) * _height;\n\n      var znear = cRange[0];\n      var zfar = cRange[1];\n      tmpMatrix[0] = 2.0 * znear / (_xmax - _xmin);\n      tmpMatrix[5] = 2.0 * znear / (_ymax - _ymin);\n      tmpMatrix[2] = (_xmin + _xmax) / (_xmax - _xmin);\n      tmpMatrix[6] = (_ymin + _ymax) / (_ymax - _ymin);\n      tmpMatrix[10] = -(znear + zfar) / (zfar - znear);\n      tmpMatrix[14] = -1.0;\n      tmpMatrix[11] = -2.0 * znear * zfar / (zfar - znear);\n      tmpMatrix[15] = 0.0;\n    }\n\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.c)(result, tmpMatrix);\n    return result;\n  };\n\n  publicAPI.getCompositeProjectionMatrix = function (aspect, nearz, farz) {\n    var vMat = publicAPI.getViewMatrix();\n    var pMat = publicAPI.getProjectionMatrix(aspect, nearz, farz); // mats are transposed so the order is A then B\n    // we reuse pMat as it is a copy so we can do what we want with it\n\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.m)(pMat, vMat, pMat);\n    return pMat;\n  };\n\n  publicAPI.setDirectionOfProjection = function (x, y, z) {\n    if (model.directionOfProjection[0] === x && model.directionOfProjection[1] === y && model.directionOfProjection[2] === z) {\n      return;\n    }\n\n    model.directionOfProjection[0] = x;\n    model.directionOfProjection[1] = y;\n    model.directionOfProjection[2] = z;\n    var vec = model.directionOfProjection; // recalculate FocalPoint\n\n    model.focalPoint[0] = model.position[0] + vec[0] * model.distance;\n    model.focalPoint[1] = model.position[1] + vec[1] * model.distance;\n    model.focalPoint[2] = model.position[2] + vec[2] * model.distance;\n    computeViewPlaneNormal();\n  }; // used to handle convert js device orientation angles\n  // when you use this method the camera will adjust to the\n  // device orientation such that the physicalViewUp you set\n  // in world coordinates looks up, and the physicalViewNorth\n  // you set in world coorindates will (maybe) point north\n  //\n  // NOTE WARNING - much of the documentation out there on how\n  // orientation works is seriously wrong. Even worse the Chrome\n  // device orientation simulator is completely wrong and should\n  // never be used. OMG it is so messed up.\n  //\n  // how it seems to work on iOS is that the device orientation\n  // is specified in extrinsic angles with a alpha, beta, gamma\n  // convention with axes of Z, X, Y (the code below substitutes\n  // the physical coordinate system for these axes to get the right\n  // modified coordinate system.\n\n\n  publicAPI.setDeviceAngles = function (alpha, beta, gamma, screen) {\n    var physVRight = [3];\n    (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.g)(model.physicalViewNorth, model.physicalViewUp, physVRight); // phone to physical coordinates\n\n    var rotmat = (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(new Float64Array(16));\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.r)(rotmat, rotmat, (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(alpha), model.physicalViewUp);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.r)(rotmat, rotmat, (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(beta), physVRight);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.r)(rotmat, rotmat, (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(gamma), model.physicalViewNorth);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.r)(rotmat, rotmat, (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(-screen), model.physicalViewUp);\n    var dop = new Float64Array([-model.physicalViewUp[0], -model.physicalViewUp[1], -model.physicalViewUp[2]]);\n    var vup = new Float64Array(model.physicalViewNorth);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.t)(dop, dop, rotmat);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.t)(vup, vup, rotmat);\n    publicAPI.setDirectionOfProjection(dop[0], dop[1], dop[2]);\n    publicAPI.setViewUp(vup[0], vup[1], vup[2]);\n    publicAPI.modified();\n  };\n\n  publicAPI.setOrientationWXYZ = function (degrees, x, y, z) {\n    var quatMat = (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(new Float64Array(16));\n\n    if (degrees !== 0.0 && (x !== 0.0 || y !== 0.0 || z !== 0.0)) {\n      // convert to radians\n      var angle = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(degrees);\n      var q = (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_6__.c)();\n      (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_6__.s)(q, [x, y, z], angle);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.k)(quatMat, q);\n    }\n\n    var newdop = new Float64Array(3);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.t)(newdop, [0.0, 0.0, -1.0], quatMat);\n    var newvup = new Float64Array(3);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_5__.t)(newvup, [0.0, 1.0, 0.0], quatMat);\n    publicAPI.setDirectionOfProjection.apply(publicAPI, (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(newdop));\n    publicAPI.setViewUp.apply(publicAPI, (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(newvup));\n    publicAPI.modified();\n  };\n\n  publicAPI.computeClippingRange = function (bounds) {\n    var vn = null;\n    var position = null;\n    vn = model.viewPlaneNormal;\n    position = model.position;\n    var a = -vn[0];\n    var b = -vn[1];\n    var c = -vn[2];\n    var d = -(a * position[0] + b * position[1] + c * position[2]); // Set the max near clipping plane and the min far clipping plane\n\n    var range = [a * bounds[0] + b * bounds[2] + c * bounds[4] + d, 1e-18]; // Find the closest / farthest bounding box vertex\n\n    for (var k = 0; k < 2; k++) {\n      for (var j = 0; j < 2; j++) {\n        for (var i = 0; i < 2; i++) {\n          var dist = a * bounds[i] + b * bounds[2 + j] + c * bounds[4 + k] + d;\n          range[0] = dist < range[0] ? dist : range[0];\n          range[1] = dist > range[1] ? dist : range[1];\n        }\n      }\n    }\n\n    return range;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  position: [0, 0, 1],\n  focalPoint: [0, 0, 0],\n  viewUp: [0, 1, 0],\n  directionOfProjection: [0, 0, -1],\n  parallelProjection: false,\n  useHorizontalViewAngle: false,\n  viewAngle: 30,\n  parallelScale: 1,\n  clippingRange: [0.01, 1000.01],\n  windowCenter: [0, 0],\n  viewPlaneNormal: [0, 0, 1],\n  useOffAxisProjection: false,\n  screenBottomLeft: [-0.5, -0.5, -0.5],\n  screenBottomRight: [0.5, -0.5, -0.5],\n  screenTopRight: [0.5, 0.5, -0.5],\n  freezeFocalPoint: false,\n  projectionMatrix: null,\n  viewMatrix: null,\n  // used for world to physical transformations\n  physicalTranslation: [0, 0, 0],\n  physicalScale: 1.0,\n  physicalViewUp: [0, 1, 0],\n  physicalViewNorth: [0, 0, -1]\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['distance']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['parallelProjection', 'useHorizontalViewAngle', 'viewAngle', 'parallelScale', 'useOffAxisProjection', 'freezeFocalPoint', 'physicalScale']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.getArray(publicAPI, model, ['directionOfProjection', 'viewPlaneNormal', 'position', 'focalPoint']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGetArray(publicAPI, model, ['clippingRange', 'windowCenter'], 2);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGetArray(publicAPI, model, ['viewUp', 'screenBottomLeft', 'screenBottomRight', 'screenTopRight', 'physicalTranslation', 'physicalViewUp', 'physicalViewNorth'], 3); // Object methods\n\n  vtkCamera(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkCamera'); // ----------------------------------------------------------------------------\n\nvar vtkCamera$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkCamera$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Camera.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _Common_Core_ScalarsToColors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Core/ScalarsToColors.js */ \"./node_modules/@kitware/vtk.js/Common/Core/ScalarsToColors.js\");\n/* harmony import */ var _ColorTransferFunction_Constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ColorTransferFunction/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction/Constants.js\");\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar ColorSpace = _ColorTransferFunction_Constants_js__WEBPACK_IMPORTED_MODULE_4__.default.ColorSpace,\n    Scale = _ColorTransferFunction_Constants_js__WEBPACK_IMPORTED_MODULE_4__.default.Scale;\nvar ScalarMappingTarget = _Common_Core_ScalarsToColors_js__WEBPACK_IMPORTED_MODULE_3__.default.ScalarMappingTarget;\nvar vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkDebugMacro,\n    vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkErrorMacro,\n    vtkWarningMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkWarningMacro; // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n\n/* eslint-disable no-continue                                                */\n// Convert to and from a special polar version of CIELAB (useful for creating\n// continuous diverging color maps).\n\nfunction vtkColorTransferFunctionLabToMsh(lab, msh) {\n  var L = lab[0];\n  var a = lab[1];\n  var b = lab[2];\n  var M = Math.sqrt(L * L + a * a + b * b);\n  var s = M > 0.001 ? Math.acos(L / M) : 0.0;\n  var h = s > 0.001 ? Math.atan2(b, a) : 0.0;\n  msh[0] = M;\n  msh[1] = s;\n  msh[2] = h;\n}\n\nfunction vtkColorTransferFunctionMshToLab(msh, lab) {\n  var M = msh[0];\n  var s = msh[1];\n  var h = msh[2];\n  lab[0] = M * Math.cos(s);\n  lab[1] = M * Math.sin(s) * Math.cos(h);\n  lab[2] = M * Math.sin(s) * Math.sin(h);\n} // For the case when interpolating from a saturated color to an unsaturated\n// color, find a hue for the unsaturated color that makes sense.\n\n\nfunction vtkColorTransferFunctionAdjustHue(msh, unsatM) {\n  if (msh[0] >= unsatM - 0.1) {\n    // The best we can do is hold hue constant.\n    return msh[2];\n  } // This equation is designed to make the perceptual change of the\n  // interpolation to be close to constant.\n\n\n  var hueSpin = msh[1] * Math.sqrt(unsatM * unsatM - msh[0] * msh[0]) / (msh[0] * Math.sin(msh[1])); // Spin hue away from 0 except in purple hues.\n\n  if (msh[2] > -0.3 * Math.PI) {\n    return msh[2] + hueSpin;\n  }\n\n  return msh[2] - hueSpin;\n}\n\nfunction vtkColorTransferFunctionAngleDiff(a1, a2) {\n  var adiff = a1 - a2;\n\n  if (adiff < 0.0) {\n    adiff = -adiff;\n  }\n\n  while (adiff >= 2.0 * Math.PI) {\n    adiff -= 2.0 * Math.PI;\n  }\n\n  if (adiff > Math.PI) {\n    adiff = 2.0 * Math.PI - adiff;\n  }\n\n  return adiff;\n} // Interpolate a diverging color map.\n\n\nfunction vtkColorTransferFunctionInterpolateDiverging(s, rgb1, rgb2, result) {\n  var lab1 = [];\n  var lab2 = [];\n  (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.G)(rgb1, lab1);\n  (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.G)(rgb2, lab2);\n  var msh1 = [];\n  var msh2 = [];\n  vtkColorTransferFunctionLabToMsh(lab1, msh1);\n  vtkColorTransferFunctionLabToMsh(lab2, msh2); // If the endpoints are distinct saturated colors, then place white in between\n  // them.\n\n  var localS = s;\n\n  if (msh1[1] > 0.05 && msh2[1] > 0.05 && vtkColorTransferFunctionAngleDiff(msh1[2], msh2[2]) > 0.33 * Math.PI) {\n    // Insert the white midpoint by setting one end to white and adjusting the\n    // scalar value.\n    var Mmid = Math.max(msh1[0], msh2[0]);\n    Mmid = Math.max(88.0, Mmid);\n\n    if (s < 0.5) {\n      msh2[0] = Mmid;\n      msh2[1] = 0.0;\n      msh2[2] = 0.0;\n      localS *= 2.0;\n    } else {\n      msh1[0] = Mmid;\n      msh1[1] = 0.0;\n      msh1[2] = 0.0;\n      localS = 2.0 * localS - 1.0;\n    }\n  } // If one color has no saturation, then its hue value is invalid.  In this\n  // case, we want to set it to something logical so that the interpolation of\n  // hue makes sense.\n\n\n  if (msh1[1] < 0.05 && msh2[1] > 0.05) {\n    msh1[2] = vtkColorTransferFunctionAdjustHue(msh2, msh1[0]);\n  } else if (msh2[1] < 0.05 && msh1[1] > 0.05) {\n    msh2[2] = vtkColorTransferFunctionAdjustHue(msh1, msh2[0]);\n  }\n\n  var mshTmp = [];\n  mshTmp[0] = (1 - localS) * msh1[0] + localS * msh2[0];\n  mshTmp[1] = (1 - localS) * msh1[1] + localS * msh2[1];\n  mshTmp[2] = (1 - localS) * msh1[2] + localS * msh2[2]; // Now convert back to RGB\n\n  var labTmp = [];\n  vtkColorTransferFunctionMshToLab(mshTmp, labTmp);\n  (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.H)(labTmp, result);\n} // ----------------------------------------------------------------------------\n// vtkColorTransferFunction methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkColorTransferFunction(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkColorTransferFunction'); // Return the number of points which specify this function\n\n  publicAPI.getSize = function () {\n    return model.nodes.length;\n  }; //----------------------------------------------------------------------------\n  // Add a point defined in RGB\n\n\n  publicAPI.addRGBPoint = function (x, r, g, b) {\n    return publicAPI.addRGBPointLong(x, r, g, b, 0.5, 0.0);\n  }; //----------------------------------------------------------------------------\n  // Add a point defined in RGB\n\n\n  publicAPI.addRGBPointLong = function (x, r, g, b) {\n    var midpoint = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0.5;\n    var sharpness = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0.0;\n\n    // Error check\n    if (midpoint < 0.0 || midpoint > 1.0) {\n      vtkErrorMacro('Midpoint outside range [0.0, 1.0]');\n      return -1;\n    }\n\n    if (sharpness < 0.0 || sharpness > 1.0) {\n      vtkErrorMacro('Sharpness outside range [0.0, 1.0]');\n      return -1;\n    } // remove any node already at this X location\n\n\n    if (!model.allowDuplicateScalars) {\n      publicAPI.removePoint(x);\n    } // Create the new node\n\n\n    var node = {\n      x: x,\n      r: r,\n      g: g,\n      b: b,\n      midpoint: midpoint,\n      sharpness: sharpness\n    }; // Add it, then sort to get everything in order\n\n    model.nodes.push(node);\n    publicAPI.sortAndUpdateRange(); // We need to find the index of the node we just added in order\n    // to return this value\n\n    var i = 0;\n\n    for (; i < model.nodes.length; i++) {\n      if (model.nodes[i].x === x) {\n        break;\n      }\n    } // If we didn't find it, something went horribly wrong so\n    // return -1\n\n\n    if (i < model.nodes.length) {\n      return i;\n    }\n\n    return -1;\n  }; //----------------------------------------------------------------------------\n  // Add a point defined in HSV\n\n\n  publicAPI.addHSVPoint = function (x, h, s, v) {\n    return publicAPI.addHSVPointLong(x, h, s, v, 0.5, 0.0);\n  }; //----------------------------------------------------------------------------\n  // Add a point defined in HSV\n\n\n  publicAPI.addHSVPointLong = function (x, h, s, v) {\n    var midpoint = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0.5;\n    var sharpness = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0.0;\n    var rgb = [];\n    var hsv = [h, s, v];\n    (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.h)(hsv, rgb);\n    return publicAPI.addRGBPoint(x, rgb[0], rgb[1], rgb[2], midpoint, sharpness);\n  }; //----------------------------------------------------------------------------\n  // Set nodes directly\n\n\n  publicAPI.setNodes = function (nodes) {\n    if (model.nodes !== nodes) {\n      model.nodes = nodes;\n      publicAPI.sortAndUpdateRange();\n    }\n  }; //----------------------------------------------------------------------------\n  // Sort the vector in increasing order, then fill in\n  // the Range\n\n\n  publicAPI.sortAndUpdateRange = function () {\n    model.nodes.sort(function (a, b) {\n      return a.x - b.x;\n    });\n    var modifiedInvoked = publicAPI.updateRange(); // If range is updated, Modified() has been called, don't call it again.\n\n    if (!modifiedInvoked) {\n      publicAPI.modified();\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.updateRange = function () {\n    var oldRange = [2];\n    oldRange[0] = model.mappingRange[0];\n    oldRange[1] = model.mappingRange[1];\n    var size = model.nodes.length;\n\n    if (size) {\n      model.mappingRange[0] = model.nodes[0].x;\n      model.mappingRange[1] = model.nodes[size - 1].x;\n    } else {\n      model.mappingRange[0] = 0;\n      model.mappingRange[1] = 0;\n    } // If the range is the same, then no need to call Modified()\n\n\n    if (oldRange[0] === model.mappingRange[0] && oldRange[1] === model.mappingRange[1]) {\n      return false;\n    }\n\n    publicAPI.modified();\n    return true;\n  }; //----------------------------------------------------------------------------\n  // Remove a point\n\n\n  publicAPI.removePoint = function (x) {\n    // First find the node since we need to know its\n    // index as our return value\n    var i = 0;\n\n    for (; i < model.nodes.length; i++) {\n      if (model.nodes[i].x === x) {\n        break;\n      }\n    }\n\n    var retVal = i; // If the node doesn't exist, we return -1\n\n    if (i >= model.nodes.length) {\n      return -1;\n    } // If the first or last point has been removed, then we update the range\n    // No need to sort here as the order of points hasn't changed.\n\n\n    var modifiedInvoked = false;\n    model.nodes.splice(i, 1);\n\n    if (i === 0 || i === model.nodes.length) {\n      modifiedInvoked = publicAPI.updateRange();\n    }\n\n    if (!modifiedInvoked) {\n      publicAPI.modified();\n    }\n\n    return retVal;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.movePoint = function (oldX, newX) {\n    if (oldX === newX) {\n      // Nothing to do.\n      return;\n    }\n\n    publicAPI.removePoint(newX);\n\n    for (var i = 0; i < model.nodes.length; i++) {\n      if (model.nodes[i].x === oldX) {\n        model.nodes[i].x = newX;\n        publicAPI.sortAndUpdateRange();\n        break;\n      }\n    }\n  }; //----------------------------------------------------------------------------\n  // Remove all points\n\n\n  publicAPI.removeAllPoints = function () {\n    model.nodes = [];\n    publicAPI.sortAndUpdateRange();\n  }; //----------------------------------------------------------------------------\n  // Add a line defined in RGB\n\n\n  publicAPI.addRGBSegment = function (x1, r1, g1, b1, x2, r2, g2, b2) {\n    // First, find all points in this range and remove them\n    publicAPI.sortAndUpdateRange();\n\n    for (var i = 0; i < model.nodes.length;) {\n      if (model.nodes[i].x >= x1 && model.nodes[i].x <= x2) {\n        model.nodes.splice(i, 1);\n      } else {\n        i++;\n      }\n    } // Now add the points\n\n\n    publicAPI.addRGBPointLong(x1, r1, g1, b1, 0.5, 0.0);\n    publicAPI.addRGBPointLong(x2, r2, g2, b2, 0.5, 0.0);\n    publicAPI.modified();\n  }; //----------------------------------------------------------------------------\n  // Add a line defined in HSV\n\n\n  publicAPI.addHSVSegment = function (x1, h1, s1, v1, x2, h2, s2, v2) {\n    var hsv1 = [h1, s1, v1];\n    var hsv2 = [h2, s2, v2];\n    var rgb1 = [];\n    var rgb2 = [];\n    (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.h)(hsv1, rgb1);\n    (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.h)(hsv2, rgb2);\n    publicAPI.addRGBSegment(x1, rgb1[0], rgb1[1], rgb1[2], x2, rgb2[0], rgb2[1], rgb2[2]);\n  }; //----------------------------------------------------------------------------\n  // Returns the RGBA color evaluated at the specified location\n\n\n  publicAPI.mapValue = function (x) {\n    var rgb = [];\n    publicAPI.getColor(x, rgb);\n    return [Math.floor(255.0 * rgb[0] + 0.5), Math.floor(255.0 * rgb[1] + 0.5), Math.floor(255.0 * rgb[2] + 0.5), 255];\n  }; //----------------------------------------------------------------------------\n  // Returns the RGB color evaluated at the specified location\n\n\n  publicAPI.getColor = function (x, rgb) {\n    if (model.indexedLookup) {\n      var numNodes = publicAPI.getSize(); // todo\n\n      var idx = publicAPI.getAnnotatedValueIndexInternal(x);\n\n      if (idx < 0 || numNodes === 0) {\n        publicAPI.getNanColor(rgb);\n      } else {\n        var nodeVal = [];\n        publicAPI.getNodeValue(idx % numNodes, nodeVal);\n        rgb[0] = nodeVal.r;\n        rgb[1] = nodeVal.g;\n        rgb[2] = nodeVal.b;\n      }\n\n      return;\n    }\n\n    publicAPI.getTable(x, x, 1, rgb);\n  }; //----------------------------------------------------------------------------\n  // Returns the red color evaluated at the specified location\n\n\n  publicAPI.getRedValue = function (x) {\n    var rgb = [];\n    publicAPI.getColor(x, rgb);\n    return rgb[0];\n  }; //----------------------------------------------------------------------------\n  // Returns the green color evaluated at the specified location\n\n\n  publicAPI.getGreenValue = function (x) {\n    var rgb = [];\n    publicAPI.getColor(x, rgb);\n    return rgb[1];\n  }; //----------------------------------------------------------------------------\n  // Returns the blue color evaluated at the specified location\n\n\n  publicAPI.getBlueValue = function (x) {\n    var rgb = [];\n    publicAPI.getColor(x, rgb);\n    return rgb[2];\n  }; //----------------------------------------------------------------------------\n  // Returns a table of RGB colors at regular intervals along the function\n\n\n  publicAPI.getTable = function (xStart, xEnd, size, table) {\n    // Special case: If either the start or end is a NaN, then all any\n    // interpolation done on them is also a NaN.  Therefore, fill the table with\n    // the NaN color.\n    if ((0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.i)(xStart) || (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.i)(xEnd)) {\n      for (var i = 0; i < size; i++) {\n        table[i * 3 + 0] = model.nanColor[0];\n        table[i * 3 + 1] = model.nanColor[1];\n        table[i * 3 + 2] = model.nanColor[2];\n      }\n\n      return;\n    }\n\n    var idx = 0;\n    var numNodes = model.nodes.length; // Need to keep track of the last value so that\n    // we can fill in table locations past this with\n    // this value if Clamping is On.\n\n    var lastR = 0.0;\n    var lastG = 0.0;\n    var lastB = 0.0;\n\n    if (numNodes !== 0) {\n      lastR = model.nodes[numNodes - 1].r;\n      lastG = model.nodes[numNodes - 1].g;\n      lastB = model.nodes[numNodes - 1].b;\n    }\n\n    var x = 0.0;\n    var x1 = 0.0;\n    var x2 = 0.0;\n    var rgb1 = [0.0, 0.0, 0.0];\n    var rgb2 = [0.0, 0.0, 0.0];\n    var midpoint = 0.0;\n    var sharpness = 0.0;\n    var tmpVec = []; // If the scale is logarithmic, make sure the range is valid.\n\n    var usingLogScale = model.scale === Scale.LOG10;\n\n    if (usingLogScale) {\n      // Note: This requires range[0] <= range[1].\n      usingLogScale = model.mappingRange[0] > 0.0;\n    }\n\n    var logStart = 0.0;\n    var logEnd = 0.0;\n    var logX = 0.0;\n\n    if (usingLogScale) {\n      logStart = Math.log10(xStart);\n      logEnd = Math.log10(xEnd);\n    } // For each table entry\n\n\n    for (var _i = 0; _i < size; _i++) {\n      // Find our location in the table\n      var tidx = 3 * _i; // Find our X location. If we are taking only 1 sample, make\n      // it halfway between start and end (usually start and end will\n      // be the same in this case)\n\n      if (size > 1) {\n        if (usingLogScale) {\n          logX = logStart + _i / (size - 1.0) * (logEnd - logStart);\n          x = Math.pow(10.0, logX);\n        } else {\n          x = xStart + _i / (size - 1.0) * (xEnd - xStart);\n        }\n      } else if (usingLogScale) {\n        logX = 0.5 * (logStart + logEnd);\n        x = Math.pow(10.0, logX);\n      } else {\n        x = 0.5 * (xStart + xEnd);\n      } // Linearly map x from mappingRange to [0, numberOfValues-1],\n      // discretize (round down to the closest integer),\n      // then map back to mappingRange\n\n\n      if (model.discretize) {\n        var range = model.mappingRange;\n\n        if (x >= range[0] && x <= range[1]) {\n          var numberOfValues = model.numberOfValues;\n          var deltaRange = range[1] - range[0];\n\n          if (numberOfValues <= 1) {\n            x = range[0] + deltaRange / 2.0;\n          } else {\n            // normalize x\n            var xn = (x - range[0]) / deltaRange; // discretize\n\n            var discretizeIndex = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.I)(numberOfValues * xn); // get discretized x\n\n            x = range[0] + discretizeIndex / (numberOfValues - 1) * deltaRange;\n          }\n        }\n      } // Do we need to move to the next node?\n\n\n      while (idx < numNodes && x > model.nodes[idx].x) {\n        idx++; // If we are at a valid point index, fill in\n        // the value at this node, and the one before (the\n        // two that surround our current sample location)\n        // idx cannot be 0 since we just incremented it.\n\n        if (idx < numNodes) {\n          x1 = model.nodes[idx - 1].x;\n          x2 = model.nodes[idx].x;\n\n          if (usingLogScale) {\n            x1 = Math.log10(x1);\n            x2 = Math.log10(x2);\n          }\n\n          rgb1[0] = model.nodes[idx - 1].r;\n          rgb2[0] = model.nodes[idx].r;\n          rgb1[1] = model.nodes[idx - 1].g;\n          rgb2[1] = model.nodes[idx].g;\n          rgb1[2] = model.nodes[idx - 1].b;\n          rgb2[2] = model.nodes[idx].b; // We only need the previous midpoint and sharpness\n          // since these control this region\n\n          midpoint = model.nodes[idx - 1].midpoint;\n          sharpness = model.nodes[idx - 1].sharpness; // Move midpoint away from extreme ends of range to avoid\n          // degenerate math\n\n          if (midpoint < 0.00001) {\n            midpoint = 0.00001;\n          }\n\n          if (midpoint > 0.99999) {\n            midpoint = 0.99999;\n          }\n        }\n      } // Are we at or past the end? If so, just use the last value\n\n\n      if (x > model.mappingRange[1]) {\n        table[tidx] = 0.0;\n        table[tidx + 1] = 0.0;\n        table[tidx + 2] = 0.0;\n\n        if (model.clamping) {\n          if (publicAPI.getUseAboveRangeColor()) {\n            table[tidx] = model.aboveRangeColor[0];\n            table[tidx + 1] = model.aboveRangeColor[1];\n            table[tidx + 2] = model.aboveRangeColor[2];\n          } else {\n            table[tidx] = lastR;\n            table[tidx + 1] = lastG;\n            table[tidx + 2] = lastB;\n          }\n        }\n      } else if (x < model.mappingRange[0] || (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.E)(x) && x < 0) {\n        // we are before the first node? If so, duplicate this node's values.\n        // We have to deal with -inf here\n        table[tidx] = 0.0;\n        table[tidx + 1] = 0.0;\n        table[tidx + 2] = 0.0;\n\n        if (model.clamping) {\n          if (publicAPI.getUseBelowRangeColor()) {\n            table[tidx] = model.belowRangeColor[0];\n            table[tidx + 1] = model.belowRangeColor[1];\n            table[tidx + 2] = model.belowRangeColor[2];\n          } else if (numNodes > 0) {\n            table[tidx] = model.nodes[0].r;\n            table[tidx + 1] = model.nodes[0].g;\n            table[tidx + 2] = model.nodes[0].b;\n          }\n        }\n      } else if (idx === 0 && (Math.abs(x - xStart) < 1e-6 || model.discretize)) {\n        if (numNodes > 0) {\n          table[tidx] = model.nodes[0].r;\n          table[tidx + 1] = model.nodes[0].g;\n          table[tidx + 2] = model.nodes[0].b;\n        } else {\n          table[tidx] = 0.0;\n          table[tidx + 1] = 0.0;\n          table[tidx + 2] = 0.0;\n        }\n      } else {\n        // OK, we are between two nodes - interpolate\n        // Our first attempt at a normalized location [0,1] -\n        // we will be modifying this based on midpoint and\n        // sharpness to get the curve shape we want and to have\n        // it pass through (y1+y2)/2 at the midpoint.\n        var s = 0.0;\n\n        if (usingLogScale) {\n          s = (logX - x1) / (x2 - x1);\n        } else {\n          s = (x - x1) / (x2 - x1);\n        } // Readjust based on the midpoint - linear adjustment\n\n\n        if (s < midpoint) {\n          s = 0.5 * s / midpoint;\n        } else {\n          s = 0.5 + 0.5 * (s - midpoint) / (1.0 - midpoint);\n        } // override for sharpness > 0.99\n        // In this case we just want piecewise constant\n\n\n        if (sharpness > 0.99) {\n          // Use the first value since we are below the midpoint\n          if (s < 0.5) {\n            table[tidx] = rgb1[0];\n            table[tidx + 1] = rgb1[1];\n            table[tidx + 2] = rgb1[2];\n            continue;\n          } else {\n            // Use the second value at or above the midpoint\n            table[tidx] = rgb2[0];\n            table[tidx + 1] = rgb2[1];\n            table[tidx + 2] = rgb2[2];\n            continue;\n          }\n        } // Override for sharpness < 0.01\n        // In this case we want piecewise linear\n\n\n        if (sharpness < 0.01) {\n          // Simple linear interpolation\n          if (model.colorSpace === ColorSpace.RGB) {\n            table[tidx] = (1 - s) * rgb1[0] + s * rgb2[0];\n            table[tidx + 1] = (1 - s) * rgb1[1] + s * rgb2[1];\n            table[tidx + 2] = (1 - s) * rgb1[2] + s * rgb2[2];\n          } else if (model.colorSpace === ColorSpace.HSV) {\n            var hsv1 = [];\n            var hsv2 = [];\n            (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.F)(rgb1, hsv1);\n            (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.F)(rgb2, hsv2);\n\n            if (model.hSVWrap && (hsv1[0] - hsv2[0] > 0.5 || hsv2[0] - hsv1[0] > 0.5)) {\n              if (hsv1[0] > hsv2[0]) {\n                hsv1[0] -= 1.0;\n              } else {\n                hsv2[0] -= 1.0;\n              }\n            }\n\n            var hsvTmp = [];\n            hsvTmp[0] = (1.0 - s) * hsv1[0] + s * hsv2[0];\n\n            if (hsvTmp[0] < 0.0) {\n              hsvTmp[0] += 1.0;\n            }\n\n            hsvTmp[1] = (1.0 - s) * hsv1[1] + s * hsv2[1];\n            hsvTmp[2] = (1.0 - s) * hsv1[2] + s * hsv2[2]; // Now convert this back to RGB\n\n            (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.h)(hsvTmp, tmpVec);\n            table[tidx] = tmpVec[0];\n            table[tidx + 1] = tmpVec[1];\n            table[tidx + 2] = tmpVec[2];\n          } else if (model.colorSpace === ColorSpace.LAB) {\n            var lab1 = [];\n            var lab2 = [];\n            (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.G)(rgb1, lab1);\n            (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.G)(rgb2, lab2);\n            var labTmp = [];\n            labTmp[0] = (1 - s) * lab1[0] + s * lab2[0];\n            labTmp[1] = (1 - s) * lab1[1] + s * lab2[1];\n            labTmp[2] = (1 - s) * lab1[2] + s * lab2[2]; // Now convert back to RGB\n\n            (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.H)(labTmp, tmpVec);\n            table[tidx] = tmpVec[0];\n            table[tidx + 1] = tmpVec[1];\n            table[tidx + 2] = tmpVec[2];\n          } else if (model.colorSpace === ColorSpace.DIVERGING) {\n            vtkColorTransferFunctionInterpolateDiverging(s, rgb1, rgb2, tmpVec);\n            table[tidx] = tmpVec[0];\n            table[tidx + 1] = tmpVec[1];\n            table[tidx + 2] = tmpVec[2];\n          } else {\n            vtkErrorMacro('ColorSpace set to invalid value.', model.colorSpace);\n          }\n\n          continue;\n        } // We have a sharpness between [0.01, 0.99] - we will\n        // used a modified hermite curve interpolation where we\n        // derive the slope based on the sharpness, and we compress\n        // the curve non-linearly based on the sharpness\n        // First, we will adjust our position based on sharpness in\n        // order to make the curve sharper (closer to piecewise constant)\n\n\n        if (s < 0.5) {\n          s = 0.5 * Math.pow(s * 2.0, 1.0 + 10.0 * sharpness);\n        } else if (s > 0.5) {\n          s = 1.0 - 0.5 * Math.pow((1.0 - s) * 2, 1 + 10.0 * sharpness);\n        } // Compute some coefficients we will need for the hermite curve\n\n\n        var ss = s * s;\n        var sss = ss * s;\n        var h1 = 2.0 * sss - 3 * ss + 1;\n        var h2 = -2 * sss + 3 * ss;\n        var h3 = sss - 2 * ss + s;\n        var h4 = sss - ss;\n        var slope = void 0;\n        var t = void 0;\n\n        if (model.colorSpace === ColorSpace.RGB) {\n          for (var j = 0; j < 3; j++) {\n            // Use one slope for both end points\n            slope = rgb2[j] - rgb1[j];\n            t = (1.0 - sharpness) * slope; // Compute the value\n\n            table[tidx + j] = h1 * rgb1[j] + h2 * rgb2[j] + h3 * t + h4 * t;\n          }\n        } else if (model.colorSpace === ColorSpace.HSV) {\n          var _hsv = [];\n          var _hsv2 = [];\n          (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.F)(rgb1, _hsv);\n          (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.F)(rgb2, _hsv2);\n\n          if (model.hSVWrap && (_hsv[0] - _hsv2[0] > 0.5 || _hsv2[0] - _hsv[0] > 0.5)) {\n            if (_hsv[0] > _hsv2[0]) {\n              _hsv[0] -= 1.0;\n            } else {\n              _hsv2[0] -= 1.0;\n            }\n          }\n\n          var _hsvTmp = [];\n\n          for (var _j = 0; _j < 3; _j++) {\n            // Use one slope for both end points\n            slope = _hsv2[_j] - _hsv[_j];\n            t = (1.0 - sharpness) * slope; // Compute the value\n\n            _hsvTmp[_j] = h1 * _hsv[_j] + h2 * _hsv2[_j] + h3 * t + h4 * t;\n\n            if (_j === 0 && _hsvTmp[_j] < 0.0) {\n              _hsvTmp[_j] += 1.0;\n            }\n          } // Now convert this back to RGB\n\n\n          (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.h)(_hsvTmp, tmpVec);\n          table[tidx] = tmpVec[0];\n          table[tidx + 1] = tmpVec[1];\n          table[tidx + 2] = tmpVec[2];\n        } else if (model.colorSpace === ColorSpace.LAB) {\n          var _lab = [];\n          var _lab2 = [];\n          (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.G)(rgb1, _lab);\n          (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.G)(rgb2, _lab2);\n          var _labTmp = [];\n\n          for (var _j2 = 0; _j2 < 3; _j2++) {\n            // Use one slope for both end points\n            slope = _lab2[_j2] - _lab[_j2];\n            t = (1.0 - sharpness) * slope; // Compute the value\n\n            _labTmp[_j2] = h1 * _lab[_j2] + h2 * _lab2[_j2] + h3 * t + h4 * t;\n          } // Now convert this back to RGB\n\n\n          (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.H)(_labTmp, tmpVec);\n          table[tidx] = tmpVec[0];\n          table[tidx + 1] = tmpVec[1];\n          table[tidx + 2] = tmpVec[2];\n        } else if (model.colorSpace === ColorSpace.DIVERGING) {\n          // I have not implemented proper interpolation by a hermite curve for\n          // the diverging color map, but I cannot think of a good use case for\n          // that anyway.\n          vtkColorTransferFunctionInterpolateDiverging(s, rgb1, rgb2, tmpVec);\n          table[tidx] = tmpVec[0];\n          table[tidx + 1] = tmpVec[1];\n          table[tidx + 2] = tmpVec[2];\n        } else {\n          vtkErrorMacro('ColorSpace set to invalid value.');\n        } // Final error check to make sure we don't go outside [0,1]\n\n\n        for (var _j3 = 0; _j3 < 3; _j3++) {\n          table[tidx + _j3] = table[tidx + _j3] < 0.0 ? 0.0 : table[tidx + _j3];\n          table[tidx + _j3] = table[tidx + _j3] > 1.0 ? 1.0 : table[tidx + _j3];\n        }\n      }\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getUint8Table = function (xStart, xEnd, size) {\n    var withAlpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n    if (publicAPI.getMTime() <= model.buildTime && model.tableSize === size && model.tableWithAlpha !== withAlpha) {\n      return model.table;\n    }\n\n    if (model.nodes.length === 0) {\n      vtkErrorMacro('Attempting to lookup a value with no points in the function');\n      return model.table;\n    }\n\n    var nbChannels = withAlpha ? 4 : 3;\n\n    if (model.tableSize !== size || model.tableWithAlpha !== withAlpha) {\n      model.table = new Uint8Array(size * nbChannels);\n      model.tableSize = size;\n      model.tableWithAlpha = withAlpha;\n    }\n\n    var tmpTable = [];\n    publicAPI.getTable(xStart, xEnd, size, tmpTable);\n\n    for (var i = 0; i < size; i++) {\n      model.table[i * nbChannels + 0] = Math.floor(tmpTable[i * 3 + 0] * 255.0 + 0.5);\n      model.table[i * nbChannels + 1] = Math.floor(tmpTable[i * 3 + 1] * 255.0 + 0.5);\n      model.table[i * nbChannels + 2] = Math.floor(tmpTable[i * 3 + 2] * 255.0 + 0.5);\n\n      if (withAlpha) {\n        model.table[i * nbChannels + 3] = 255;\n      }\n    }\n\n    model.buildTime.modified();\n    return model.table;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.buildFunctionFromTable = function (xStart, xEnd, size, table) {\n    var inc = 0.0;\n    publicAPI.removeAllPoints();\n\n    if (size > 1) {\n      inc = (xEnd - xStart) / (size - 1.0);\n    }\n\n    for (var i = 0; i < size; i++) {\n      var node = {\n        x: xStart + inc * i,\n        r: table[i * 3],\n        g: table[i * 3 + 1],\n        b: table[i * 3 + 2],\n        sharpness: 0.0,\n        midpoint: 0.5\n      };\n      model.nodes.push(node);\n    }\n\n    publicAPI.sortAndUpdateRange();\n  }; //----------------------------------------------------------------------------\n  // For a specified index value, get the node parameters\n\n\n  publicAPI.getNodeValue = function (index, val) {\n    if (index < 0 || index >= model.nodes.length) {\n      vtkErrorMacro('Index out of range!');\n      return -1;\n    }\n\n    val[0] = model.nodes[index].x;\n    val[1] = model.nodes[index].r;\n    val[2] = model.nodes[index].g;\n    val[3] = model.nodes[index].b;\n    val[4] = model.nodes[index].midpoint;\n    val[5] = model.nodes[index].sharpness;\n    return 1;\n  }; //----------------------------------------------------------------------------\n  // For a specified index value, get the node parameters\n\n\n  publicAPI.setNodeValue = function (index, val) {\n    if (index < 0 || index >= model.nodes.length) {\n      vtkErrorMacro('Index out of range!');\n      return -1;\n    }\n\n    var oldX = model.nodes[index].x;\n    model.nodes[index].x = val[0];\n    model.nodes[index].r = val[1];\n    model.nodes[index].g = val[2];\n    model.nodes[index].b = val[3];\n    model.nodes[index].midpoint = val[4];\n    model.nodes[index].sharpness = val[5];\n\n    if (oldX !== val[0]) {\n      // The point has been moved, the order of points or the range might have\n      // been modified.\n      publicAPI.sortAndUpdateRange(); // No need to call Modified() here because SortAndUpdateRange() has done it\n      // already.\n    } else {\n      publicAPI.modified();\n    }\n\n    return 1;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getNumberOfAvailableColors = function () {\n    if (model.indexedLookup && publicAPI.getSize()) {\n      return publicAPI.getSize();\n    }\n\n    if (model.tableSize) {\n      // Not sure if this is correct since it is only set if\n      // \"const unsigned char *::GetTable(double xStart, double xEnd,int size)\"\n      // has been called.\n      return model.tableSize;\n    }\n\n    return 16777216; // 2^24\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getIndexedColor = function (idx, rgba) {\n    var n = publicAPI.getSize();\n\n    if (n > 0 && idx >= 0) {\n      var nodeValue = [];\n      publicAPI.getNodeValue(idx % n, nodeValue);\n\n      for (var j = 0; j < 3; ++j) {\n        rgba[j] = nodeValue[j + 1];\n      }\n\n      rgba[3] = 1.0; // NodeColor is RGB-only.\n\n      return;\n    }\n\n    publicAPI.getNanColor(rgba);\n    rgba[3] = 1.0; // NanColor is RGB-only.\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.fillFromDataPointer = function (nb, ptr) {\n    if (nb <= 0 || !ptr) {\n      return;\n    }\n\n    publicAPI.removeAllPoints();\n\n    for (var i = 0; i < nb; i++) {\n      publicAPI.addRGBPoint(ptr[i * 4], ptr[i * 4 + 1], ptr[i * 4 + 2], ptr[i * 4 + 3]);\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.setMappingRange = function (min, max) {\n    var range = [min, max];\n    var originalRange = publicAPI.getRange();\n\n    if (originalRange[1] === range[1] && originalRange[0] === range[0]) {\n      return;\n    }\n\n    if (range[1] === range[0]) {\n      vtkErrorMacro('attempt to set zero width color range');\n      return;\n    }\n\n    var scale = (range[1] - range[0]) / (originalRange[1] - originalRange[0]);\n    var shift = range[0] - originalRange[0] * scale;\n\n    for (var i = 0; i < model.nodes.length; ++i) {\n      model.nodes[i].x = model.nodes[i].x * scale + shift;\n    }\n\n    model.mappingRange[0] = range[0];\n    model.mappingRange[1] = range[1];\n    publicAPI.modified();\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.adjustRange = function (range) {\n    var functionRange = publicAPI.getRange(); // Make sure we have points at each end of the range\n\n    var rgb = [];\n\n    if (functionRange[0] < range[0]) {\n      publicAPI.getColor(range[0], rgb);\n      publicAPI.addRGBPoint(range[0], rgb[0], rgb[1], rgb[2]);\n    } else {\n      publicAPI.getColor(functionRange[0], rgb);\n      publicAPI.addRGBPoint(range[0], rgb[0], rgb[1], rgb[2]);\n    }\n\n    if (functionRange[1] > range[1]) {\n      publicAPI.getColor(range[1], rgb);\n      publicAPI.addRGBPoint(range[1], rgb[0], rgb[1], rgb[2]);\n    } else {\n      publicAPI.getColor(functionRange[1], rgb);\n      publicAPI.addRGBPoint(range[1], rgb[0], rgb[1], rgb[2]);\n    } // Remove all points out-of-range\n\n\n    publicAPI.sortAndUpdateRange();\n\n    for (var i = 0; i < model.nodes.length;) {\n      if (model.nodes[i].x >= range[0] && model.nodes[i].x <= range[1]) {\n        model.nodes.splice(i, 1);\n      } else {\n        ++i;\n      }\n    }\n\n    return 1;\n  }; //--------------------------------------------------------------------------\n\n\n  publicAPI.estimateMinNumberOfSamples = function (x1, x2) {\n    var d = publicAPI.findMinimumXDistance();\n    return Math.ceil((x2 - x1) / d);\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.findMinimumXDistance = function () {\n    if (model.nodes.length < 2) {\n      return -1.0;\n    }\n\n    var distance = Number.MAX_VALUE;\n\n    for (var i = 0; i < model.nodes.length - 1; i++) {\n      var currentDist = model.nodes[i + 1].x - model.nodes[i].x;\n\n      if (currentDist < distance) {\n        distance = currentDist;\n      }\n    }\n\n    return distance;\n  };\n\n  publicAPI.mapScalarsThroughTable = function (input, output, outFormat, inputOffset) {\n    if (publicAPI.getSize() === 0) {\n      vtkDebugMacro('Transfer Function Has No Points!');\n      return;\n    }\n\n    if (model.indexedLookup) {\n      publicAPI.mapDataIndexed(input, output, outFormat, inputOffset);\n    } else {\n      publicAPI.mapData(input, output, outFormat, inputOffset);\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.mapData = function (input, output, outFormat, inputOffset) {\n    if (publicAPI.getSize() === 0) {\n      vtkWarningMacro('Transfer Function Has No Points!');\n      return;\n    }\n\n    var alpha = Math.floor(publicAPI.getAlpha() * 255.0 + 0.5);\n    var length = input.getNumberOfTuples();\n    var inIncr = input.getNumberOfComponents();\n    var outputV = output.getData();\n    var inputV = input.getData();\n    var rgb = [];\n\n    if (outFormat === ScalarMappingTarget.RGBA) {\n      for (var i = 0; i < length; i++) {\n        var x = inputV[i * inIncr + inputOffset];\n        publicAPI.getColor(x, rgb);\n        outputV[i * 4] = Math.floor(rgb[0] * 255.0 + 0.5);\n        outputV[i * 4 + 1] = Math.floor(rgb[1] * 255.0 + 0.5);\n        outputV[i * 4 + 2] = Math.floor(rgb[2] * 255.0 + 0.5);\n        outputV[i * 4 + 3] = alpha;\n      }\n    }\n\n    if (outFormat === ScalarMappingTarget.RGB) {\n      for (var _i2 = 0; _i2 < length; _i2++) {\n        var _x = inputV[_i2 * inIncr + inputOffset];\n        publicAPI.getColor(_x, rgb);\n        outputV[_i2 * 3] = Math.floor(rgb[0] * 255.0 + 0.5);\n        outputV[_i2 * 3 + 1] = Math.floor(rgb[1] * 255.0 + 0.5);\n        outputV[_i2 * 3 + 2] = Math.floor(rgb[2] * 255.0 + 0.5);\n      }\n    }\n\n    if (outFormat === ScalarMappingTarget.LUMINANCE) {\n      for (var _i3 = 0; _i3 < length; _i3++) {\n        var _x2 = inputV[_i3 * inIncr + inputOffset];\n        publicAPI.getColor(_x2, rgb);\n        outputV[_i3] = Math.floor(rgb[0] * 76.5 + rgb[1] * 150.45 + rgb[2] * 28.05 + 0.5);\n      }\n    }\n\n    if (outFormat === ScalarMappingTarget.LUMINANCE_ALPHA) {\n      for (var _i4 = 0; _i4 < length; _i4++) {\n        var _x3 = inputV[_i4 * inIncr + inputOffset];\n        publicAPI.getColor(_x3, rgb);\n        outputV[_i4 * 2] = Math.floor(rgb[0] * 76.5 + rgb[1] * 150.45 + rgb[2] * 28.05 + 0.5);\n        outputV[_i4 * 2 + 1] = alpha;\n      }\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.applyColorMap = function (colorMap) {\n    if (colorMap.ColorSpace) {\n      model.colorSpace = ColorSpace[colorMap.ColorSpace.toUpperCase()];\n\n      if (model.colorSpace === undefined) {\n        vtkErrorMacro(\"ColorSpace \".concat(colorMap.ColorSpace, \" not supported, using RGB instead\"));\n        model.colorSpace = ColorSpace.RGB;\n      }\n    }\n\n    if (colorMap.NanColor) {\n      model.nanColor = [].concat(colorMap.NanColor);\n\n      while (model.nanColor.length < 4) {\n        model.nanColor.push(1.0);\n      }\n    }\n\n    if (colorMap.RGBPoints) {\n      var size = colorMap.RGBPoints.length;\n      model.nodes = [];\n      var midpoint = 0.5;\n      var sharpness = 0.0;\n\n      for (var i = 0; i < size; i += 4) {\n        model.nodes.push({\n          x: colorMap.RGBPoints[i],\n          r: colorMap.RGBPoints[i + 1],\n          g: colorMap.RGBPoints[i + 2],\n          b: colorMap.RGBPoints[i + 3],\n          midpoint: midpoint,\n          sharpness: sharpness\n        });\n      }\n    } // FIXME: not supported ?\n    // if (colorMap.IndexedColors) {\n    // }\n    // if (colorMap.Annotations) {\n    // }\n\n\n    publicAPI.sortAndUpdateRange();\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  clamping: true,\n  colorSpace: ColorSpace.RGB,\n  hSVWrap: true,\n  scale: Scale.LINEAR,\n  nanColor: null,\n  belowRangeColor: null,\n  aboveRangeColor: null,\n  useAboveRangeColor: false,\n  useBelowRangeColor: false,\n  allowDuplicateScalars: false,\n  table: null,\n  tableSize: 0,\n  buildTime: null,\n  nodes: null,\n  discretize: false,\n  numberOfValues: 256\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _Common_Core_ScalarsToColors_js__WEBPACK_IMPORTED_MODULE_3__.default.extend(publicAPI, model, initialValues); // Internal objects initialization\n\n  model.table = [];\n  model.nodes = [];\n  model.nanColor = [0.5, 0.0, 0.0, 1.0];\n  model.belowRangeColor = [0.0, 0.0, 0.0, 1.0];\n  model.aboveRangeColor = [1.0, 1.0, 1.0, 1.0];\n  model.buildTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(model.buildTime); // Create get-only macros\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['buildTime', 'mappingRange']); // Create get-set macros\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['useAboveRangeColor', 'useBelowRangeColor', 'colorSpace', 'discretize', 'numberOfValues']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setArray(publicAPI, model, ['nanColor', 'belowRangeColor', 'aboveRangeColor'], 4); // Create get macros for array\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.getArray(publicAPI, model, ['nanColor', 'belowRangeColor', 'aboveRangeColor']); // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkColorTransferFunction(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkColorTransferFunction'); // ----------------------------------------------------------------------------\n\nvar vtkColorTransferFunction$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, _ColorTransferFunction_Constants_js__WEBPACK_IMPORTED_MODULE_4__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkColorTransferFunction$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ColorMaps_json_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ColorMaps.json.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps.json.js\");\n\n\nvar presetMap = Object.create(null);\n_ColorMaps_json_js__WEBPACK_IMPORTED_MODULE_0__.v.filter(function (p) {\n  return p.RGBPoints;\n}).filter(function (p) {\n  return p.ColorSpace !== 'CIELAB';\n}).forEach(function (p) {\n  presetMap[p.Name] = p;\n}); // ----------------------------------------------------------------------------\n\nvar rgbPresetNames = Object.keys(presetMap);\nrgbPresetNames.sort(); // ----------------------------------------------------------------------------\n\nfunction getPresetByName(name) {\n  return presetMap[name];\n} // ----------------------------------------------------------------------------\n\n\nfunction addPreset(preset) {\n  if (!preset.RGBPoints || preset.ColorSpace === 'CIELAB') {\n    return;\n  }\n\n  if (!presetMap[preset.Name]) {\n    rgbPresetNames.push(preset.Name);\n    rgbPresetNames.sort();\n  }\n\n  presetMap[preset.Name] = preset;\n} // ----------------------------------------------------------------------------\n\n\nfunction removePresetByName(name) {\n  var index = rgbPresetNames.indexOf(name);\n\n  if (index > -1) {\n    rgbPresetNames.splice(index, 1);\n  }\n\n  delete presetMap[name];\n} // ----------------------------------------------------------------------------\n\n\nvar vtkColorMaps = {\n  addPreset: addPreset,\n  removePresetByName: removePresetByName,\n  getPresetByName: getPresetByName,\n  rgbPresetNames: rgbPresetNames\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkColorMaps);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps.json.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps.json.js ***!
  \*********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"v\": () => (/* binding */ vtkColorMaps)\n/* harmony export */ });\nvar vtkColorMaps = [\n\t{\n\t\tName: \"KAAMS\",\n\t\tIndexedColors: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.63,\n\t\t\t0.63,\n\t\t\t1,\n\t\t\t0.67,\n\t\t\t0.5,\n\t\t\t0.33,\n\t\t\t1,\n\t\t\t0.5,\n\t\t\t0.75,\n\t\t\t0.53,\n\t\t\t0.35,\n\t\t\t0.7,\n\t\t\t1,\n\t\t\t0.75,\n\t\t\t0.5\n\t\t],\n\t\tAnnotations: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t2,\n\t\t\t2,\n\t\t\t3,\n\t\t\t3,\n\t\t\t4,\n\t\t\t4,\n\t\t\t5,\n\t\t\t5,\n\t\t\t6,\n\t\t\t6,\n\t\t\t7,\n\t\t\t7,\n\t\t\t8,\n\t\t\t8,\n\t\t\t9,\n\t\t\t9,\n\t\t\t10,\n\t\t\t10,\n\t\t\t11,\n\t\t\t11\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Diverging\",\n\t\tName: \"Cool to Warm\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.23137254902,\n\t\t\t0.298039215686,\n\t\t\t0.752941176471,\n\t\t\t0.5,\n\t\t\t0.865,\n\t\t\t0.865,\n\t\t\t0.865,\n\t\t\t1,\n\t\t\t0.705882352941,\n\t\t\t0.0156862745098,\n\t\t\t0.149019607843\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tCreator: \"Francesca Samsel\",\n\t\tName: \"Cool to Warm (Extended)\",\n\t\tNanColor: [\n\t\t\t0.25,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.34902,\n\t\t\t0.03125,\n\t\t\t0.039216,\n\t\t\t0.062745,\n\t\t\t0.380392,\n\t\t\t0.0625,\n\t\t\t0.062745,\n\t\t\t0.117647,\n\t\t\t0.411765,\n\t\t\t0.09375,\n\t\t\t0.090196,\n\t\t\t0.184314,\n\t\t\t0.45098,\n\t\t\t0.125,\n\t\t\t0.12549,\n\t\t\t0.262745,\n\t\t\t0.501961,\n\t\t\t0.15625,\n\t\t\t0.160784,\n\t\t\t0.337255,\n\t\t\t0.541176,\n\t\t\t0.1875,\n\t\t\t0.2,\n\t\t\t0.396078,\n\t\t\t0.568627,\n\t\t\t0.21875,\n\t\t\t0.239216,\n\t\t\t0.454902,\n\t\t\t0.6,\n\t\t\t0.25,\n\t\t\t0.286275,\n\t\t\t0.521569,\n\t\t\t0.65098,\n\t\t\t0.28125,\n\t\t\t0.337255,\n\t\t\t0.592157,\n\t\t\t0.701961,\n\t\t\t0.3125,\n\t\t\t0.388235,\n\t\t\t0.654902,\n\t\t\t0.74902,\n\t\t\t0.34375,\n\t\t\t0.466667,\n\t\t\t0.737255,\n\t\t\t0.819608,\n\t\t\t0.375,\n\t\t\t0.572549,\n\t\t\t0.819608,\n\t\t\t0.878431,\n\t\t\t0.40625,\n\t\t\t0.654902,\n\t\t\t0.866667,\n\t\t\t0.909804,\n\t\t\t0.4375,\n\t\t\t0.752941,\n\t\t\t0.917647,\n\t\t\t0.941176,\n\t\t\t0.46875,\n\t\t\t0.823529,\n\t\t\t0.956863,\n\t\t\t0.968627,\n\t\t\t0.5,\n\t\t\t0.988235,\n\t\t\t0.960784,\n\t\t\t0.901961,\n\t\t\t0.5,\n\t\t\t0.941176,\n\t\t\t0.984314,\n\t\t\t0.988235,\n\t\t\t0.52,\n\t\t\t0.988235,\n\t\t\t0.945098,\n\t\t\t0.85098,\n\t\t\t0.54,\n\t\t\t0.980392,\n\t\t\t0.898039,\n\t\t\t0.784314,\n\t\t\t0.5625,\n\t\t\t0.968627,\n\t\t\t0.835294,\n\t\t\t0.698039,\n\t\t\t0.59375,\n\t\t\t0.94902,\n\t\t\t0.733333,\n\t\t\t0.588235,\n\t\t\t0.625,\n\t\t\t0.929412,\n\t\t\t0.65098,\n\t\t\t0.509804,\n\t\t\t0.65625,\n\t\t\t0.909804,\n\t\t\t0.564706,\n\t\t\t0.435294,\n\t\t\t0.6875,\n\t\t\t0.878431,\n\t\t\t0.458824,\n\t\t\t0.352941,\n\t\t\t0.71875,\n\t\t\t0.839216,\n\t\t\t0.388235,\n\t\t\t0.286275,\n\t\t\t0.75,\n\t\t\t0.760784,\n\t\t\t0.294118,\n\t\t\t0.211765,\n\t\t\t0.78125,\n\t\t\t0.701961,\n\t\t\t0.211765,\n\t\t\t0.168627,\n\t\t\t0.8125,\n\t\t\t0.65098,\n\t\t\t0.156863,\n\t\t\t0.129412,\n\t\t\t0.84375,\n\t\t\t0.6,\n\t\t\t0.094118,\n\t\t\t0.094118,\n\t\t\t0.875,\n\t\t\t0.54902,\n\t\t\t0.066667,\n\t\t\t0.098039,\n\t\t\t0.90625,\n\t\t\t0.501961,\n\t\t\t0.05098,\n\t\t\t0.12549,\n\t\t\t0.9375,\n\t\t\t0.45098,\n\t\t\t0.054902,\n\t\t\t0.172549,\n\t\t\t0.96875,\n\t\t\t0.4,\n\t\t\t0.054902,\n\t\t\t0.192157,\n\t\t\t1,\n\t\t\t0.34902,\n\t\t\t0.070588,\n\t\t\t0.211765\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Diverging\",\n\t\tName: \"Warm to Cool\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.705882352941,\n\t\t\t0.0156862745098,\n\t\t\t0.149019607843,\n\t\t\t0.5,\n\t\t\t0.865,\n\t\t\t0.865,\n\t\t\t0.865,\n\t\t\t1,\n\t\t\t0.23137254902,\n\t\t\t0.298039215686,\n\t\t\t0.752941176471\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tCreator: \"Francesca Samsel\",\n\t\tName: \"Warm to Cool (Extended)\",\n\t\tNanColor: [\n\t\t\t0.250004,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.34902,\n\t\t\t0,\n\t\t\t0.129412,\n\t\t\t0.025,\n\t\t\t0.4,\n\t\t\t0.00392157,\n\t\t\t0.101961,\n\t\t\t0.05,\n\t\t\t0.470588,\n\t\t\t0.0156863,\n\t\t\t0.0901961,\n\t\t\t0.075,\n\t\t\t0.54902,\n\t\t\t0.027451,\n\t\t\t0.0705882,\n\t\t\t0.1,\n\t\t\t0.619608,\n\t\t\t0.0627451,\n\t\t\t0.0431373,\n\t\t\t0.125,\n\t\t\t0.690196,\n\t\t\t0.12549,\n\t\t\t0.0627451,\n\t\t\t0.15,\n\t\t\t0.741176,\n\t\t\t0.184314,\n\t\t\t0.0745098,\n\t\t\t0.175,\n\t\t\t0.788235,\n\t\t\t0.266667,\n\t\t\t0.0941176,\n\t\t\t0.2,\n\t\t\t0.811765,\n\t\t\t0.345098,\n\t\t\t0.113725,\n\t\t\t0.225,\n\t\t\t0.831373,\n\t\t\t0.411765,\n\t\t\t0.133333,\n\t\t\t0.25,\n\t\t\t0.85098,\n\t\t\t0.47451,\n\t\t\t0.145098,\n\t\t\t0.275,\n\t\t\t0.870588,\n\t\t\t0.54902,\n\t\t\t0.156863,\n\t\t\t0.3,\n\t\t\t0.878431,\n\t\t\t0.619608,\n\t\t\t0.168627,\n\t\t\t0.325,\n\t\t\t0.890196,\n\t\t\t0.658824,\n\t\t\t0.196078,\n\t\t\t0.35,\n\t\t\t0.909804,\n\t\t\t0.717647,\n\t\t\t0.235294,\n\t\t\t0.375,\n\t\t\t0.929412,\n\t\t\t0.776471,\n\t\t\t0.278431,\n\t\t\t0.395522,\n\t\t\t0.94902,\n\t\t\t0.823529,\n\t\t\t0.321569,\n\t\t\t0.418905,\n\t\t\t0.968627,\n\t\t\t0.87451,\n\t\t\t0.407843,\n\t\t\t0.444278,\n\t\t\t0.980392,\n\t\t\t0.917647,\n\t\t\t0.509804,\n\t\t\t0.470149,\n\t\t\t0.988235,\n\t\t\t0.956863,\n\t\t\t0.643137,\n\t\t\t0.483582,\n\t\t\t0.992157,\n\t\t\t0.964706,\n\t\t\t0.713725,\n\t\t\t0.499,\n\t\t\t0.988235,\n\t\t\t0.980392,\n\t\t\t0.870588,\n\t\t\t0.5,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.501,\n\t\t\t0.913725,\n\t\t\t0.988235,\n\t\t\t0.937255,\n\t\t\t0.516418,\n\t\t\t0.827451,\n\t\t\t0.980392,\n\t\t\t0.886275,\n\t\t\t0.531343,\n\t\t\t0.764706,\n\t\t\t0.980392,\n\t\t\t0.866667,\n\t\t\t0.546766,\n\t\t\t0.658824,\n\t\t\t0.980392,\n\t\t\t0.843137,\n\t\t\t0.564179,\n\t\t\t0.572549,\n\t\t\t0.964706,\n\t\t\t0.835294,\n\t\t\t0.587562,\n\t\t\t0.423529,\n\t\t\t0.941176,\n\t\t\t0.87451,\n\t\t\t0.60597,\n\t\t\t0.262745,\n\t\t\t0.901961,\n\t\t\t0.862745,\n\t\t\t0.629851,\n\t\t\t0.0705882,\n\t\t\t0.854902,\n\t\t\t0.870588,\n\t\t\t0.651741,\n\t\t\t0.0509804,\n\t\t\t0.8,\n\t\t\t0.85098,\n\t\t\t0.681592,\n\t\t\t0.0235294,\n\t\t\t0.709804,\n\t\t\t0.831373,\n\t\t\t0.712935,\n\t\t\t0.0313725,\n\t\t\t0.615686,\n\t\t\t0.811765,\n\t\t\t0.75,\n\t\t\t0.0313725,\n\t\t\t0.537255,\n\t\t\t0.788235,\n\t\t\t0.775,\n\t\t\t0.0392157,\n\t\t\t0.466667,\n\t\t\t0.768627,\n\t\t\t0.8,\n\t\t\t0.0509804,\n\t\t\t0.396078,\n\t\t\t0.741176,\n\t\t\t0.825,\n\t\t\t0.054902,\n\t\t\t0.317647,\n\t\t\t0.709804,\n\t\t\t0.85,\n\t\t\t0.054902,\n\t\t\t0.243137,\n\t\t\t0.678431,\n\t\t\t0.875,\n\t\t\t0.0431373,\n\t\t\t0.164706,\n\t\t\t0.639216,\n\t\t\t0.9,\n\t\t\t0.0313725,\n\t\t\t0.0980392,\n\t\t\t0.6,\n\t\t\t0.925,\n\t\t\t0.0392157,\n\t\t\t0.0392157,\n\t\t\t0.560784,\n\t\t\t0.95,\n\t\t\t0.105882,\n\t\t\t0.0509804,\n\t\t\t0.509804,\n\t\t\t0.975,\n\t\t\t0.113725,\n\t\t\t0.0235294,\n\t\t\t0.45098,\n\t\t\t1,\n\t\t\t0.12549,\n\t\t\t0,\n\t\t\t0.380392\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"Rainbow Desaturated\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.278431372549,\n\t\t\t0.278431372549,\n\t\t\t0.858823529412,\n\t\t\t0.143,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.360784313725,\n\t\t\t0.285,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.429,\n\t\t\t0,\n\t\t\t0.501960784314,\n\t\t\t0,\n\t\t\t0.571,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.714,\n\t\t\t1,\n\t\t\t0.380392156863,\n\t\t\t0,\n\t\t\t0.857,\n\t\t\t0.419607843137,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.878431372549,\n\t\t\t0.301960784314,\n\t\t\t0.301960784314\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"Cold and Hot\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.45,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.5,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.501960784314,\n\t\t\t0.55,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"Black-Body Radiation\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t0.498039215686,\n\t\t\t1\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.4,\n\t\t\t0.901960784314,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.8,\n\t\t\t0.901960784314,\n\t\t\t0.901960784314,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"X Ray\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"Grayscale\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"BkRd\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t1,\n\t\t\t1\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"BkGn\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t0,\n\t\t\t1\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"BkBu\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"BkMa\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"BkCy\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t1,\n\t\t\t1\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"Black, Blue and White\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.333,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.501960784314,\n\t\t\t0.666,\n\t\t\t0,\n\t\t\t0.501960784314,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"Black, Orange and White\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.333,\n\t\t\t0.501960784314,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.666,\n\t\t\t1,\n\t\t\t0.501960784314,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tCreator: \"Francesca Samsel\",\n\t\tName: \"Linear YGB 1211g\",\n\t\tNanColor: [\n\t\t\t0.25,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.988235,\n\t\t\t0.968627,\n\t\t\t0.02,\n\t\t\t1,\n\t\t\t0.952941,\n\t\t\t0.878431,\n\t\t\t0.05,\n\t\t\t0.968627,\n\t\t\t0.905882,\n\t\t\t0.776471,\n\t\t\t0.1,\n\t\t\t0.94902,\n\t\t\t0.898039,\n\t\t\t0.647059,\n\t\t\t0.15,\n\t\t\t0.901961,\n\t\t\t0.878431,\n\t\t\t0.556863,\n\t\t\t0.2,\n\t\t\t0.847059,\n\t\t\t0.858824,\n\t\t\t0.482353,\n\t\t\t0.25,\n\t\t\t0.690196,\n\t\t\t0.819608,\n\t\t\t0.435294,\n\t\t\t0.3,\n\t\t\t0.513725,\n\t\t\t0.768627,\n\t\t\t0.384314,\n\t\t\t0.35,\n\t\t\t0.337255,\n\t\t\t0.721569,\n\t\t\t0.337255,\n\t\t\t0.4,\n\t\t\t0.278431,\n\t\t\t0.658824,\n\t\t\t0.392157,\n\t\t\t0.45,\n\t\t\t0.231373,\n\t\t\t0.639216,\n\t\t\t0.435294,\n\t\t\t0.5,\n\t\t\t0.203922,\n\t\t\t0.6,\n\t\t\t0.486275,\n\t\t\t0.55,\n\t\t\t0.172549,\n\t\t\t0.568627,\n\t\t\t0.537255,\n\t\t\t0.6,\n\t\t\t0.141176,\n\t\t\t0.517647,\n\t\t\t0.54902,\n\t\t\t0.65,\n\t\t\t0.133333,\n\t\t\t0.458824,\n\t\t\t0.541176,\n\t\t\t0.7,\n\t\t\t0.12549,\n\t\t\t0.396078,\n\t\t\t0.529412,\n\t\t\t0.75,\n\t\t\t0.117647,\n\t\t\t0.321569,\n\t\t\t0.521569,\n\t\t\t0.8,\n\t\t\t0.121569,\n\t\t\t0.258824,\n\t\t\t0.509804,\n\t\t\t0.85,\n\t\t\t0.133333,\n\t\t\t0.227451,\n\t\t\t0.501961,\n\t\t\t0.9,\n\t\t\t0.145098,\n\t\t\t0.192157,\n\t\t\t0.490196,\n\t\t\t0.95,\n\t\t\t0.188235,\n\t\t\t0.164706,\n\t\t\t0.470588,\n\t\t\t1,\n\t\t\t0.258824,\n\t\t\t0.196078,\n\t\t\t0.439216\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"CIELAB\",\n\t\tCreator: \"Francesca Samsel\",\n\t\tName: \"Linear Green (Gr4L)\",\n\t\tNanColor: [\n\t\t\t0.25,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.054902,\n\t\t\t0.109804,\n\t\t\t0.121569,\n\t\t\t0.05,\n\t\t\t0.07451,\n\t\t\t0.172549,\n\t\t\t0.180392,\n\t\t\t0.1,\n\t\t\t0.086275,\n\t\t\t0.231373,\n\t\t\t0.219608,\n\t\t\t0.15,\n\t\t\t0.094118,\n\t\t\t0.278431,\n\t\t\t0.25098,\n\t\t\t0.2,\n\t\t\t0.109804,\n\t\t\t0.34902,\n\t\t\t0.278431,\n\t\t\t0.25,\n\t\t\t0.113725,\n\t\t\t0.4,\n\t\t\t0.278431,\n\t\t\t0.3,\n\t\t\t0.117647,\n\t\t\t0.45098,\n\t\t\t0.270588,\n\t\t\t0.35,\n\t\t\t0.117647,\n\t\t\t0.490196,\n\t\t\t0.243137,\n\t\t\t0.4,\n\t\t\t0.113725,\n\t\t\t0.521569,\n\t\t\t0.203922,\n\t\t\t0.45,\n\t\t\t0.109804,\n\t\t\t0.54902,\n\t\t\t0.152941,\n\t\t\t0.5,\n\t\t\t0.082353,\n\t\t\t0.588235,\n\t\t\t0.082353,\n\t\t\t0.55,\n\t\t\t0.109804,\n\t\t\t0.631373,\n\t\t\t0.05098,\n\t\t\t0.6,\n\t\t\t0.211765,\n\t\t\t0.678431,\n\t\t\t0.082353,\n\t\t\t0.65,\n\t\t\t0.317647,\n\t\t\t0.721569,\n\t\t\t0.113725,\n\t\t\t0.7,\n\t\t\t0.431373,\n\t\t\t0.760784,\n\t\t\t0.160784,\n\t\t\t0.75,\n\t\t\t0.556863,\n\t\t\t0.8,\n\t\t\t0.239216,\n\t\t\t0.8,\n\t\t\t0.666667,\n\t\t\t0.839216,\n\t\t\t0.294118,\n\t\t\t0.85,\n\t\t\t0.784314,\n\t\t\t0.878431,\n\t\t\t0.396078,\n\t\t\t0.9,\n\t\t\t0.886275,\n\t\t\t0.921569,\n\t\t\t0.533333,\n\t\t\t0.95,\n\t\t\t0.960784,\n\t\t\t0.94902,\n\t\t\t0.670588,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.984314,\n\t\t\t0.901961\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tCreator: \"Francesca Samsel\",\n\t\tName: \"Linear Blue (8_31f)\",\n\t\tNanColor: [\n\t\t\t0.25,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.960784,\n\t\t\t1,\n\t\t\t0.980392,\n\t\t\t0.05,\n\t\t\t0.815686,\n\t\t\t0.960784,\n\t\t\t0.913725,\n\t\t\t0.1,\n\t\t\t0.670588,\n\t\t\t0.929412,\n\t\t\t0.870588,\n\t\t\t0.15,\n\t\t\t0.556863,\n\t\t\t0.901961,\n\t\t\t0.843137,\n\t\t\t0.2,\n\t\t\t0.478431,\n\t\t\t0.870588,\n\t\t\t0.823529,\n\t\t\t0.25,\n\t\t\t0.439216,\n\t\t\t0.831373,\n\t\t\t0.803922,\n\t\t\t0.3,\n\t\t\t0.4,\n\t\t\t0.8,\n\t\t\t0.788235,\n\t\t\t0.35,\n\t\t\t0.376471,\n\t\t\t0.768627,\n\t\t\t0.768627,\n\t\t\t0.4,\n\t\t\t0.34902,\n\t\t\t0.709804,\n\t\t\t0.729412,\n\t\t\t0.45,\n\t\t\t0.32549,\n\t\t\t0.654902,\n\t\t\t0.690196,\n\t\t\t0.5,\n\t\t\t0.301961,\n\t\t\t0.607843,\n\t\t\t0.658824,\n\t\t\t0.55,\n\t\t\t0.247059,\n\t\t\t0.545098,\n\t\t\t0.619608,\n\t\t\t0.6,\n\t\t\t0.239216,\n\t\t\t0.494118,\n\t\t\t0.580392,\n\t\t\t0.65,\n\t\t\t0.227451,\n\t\t\t0.439216,\n\t\t\t0.541176,\n\t\t\t0.7,\n\t\t\t0.227451,\n\t\t\t0.403922,\n\t\t\t0.521569,\n\t\t\t0.75,\n\t\t\t0.231373,\n\t\t\t0.368627,\n\t\t\t0.501961,\n\t\t\t0.8,\n\t\t\t0.227451,\n\t\t\t0.321569,\n\t\t\t0.470588,\n\t\t\t0.85,\n\t\t\t0.219608,\n\t\t\t0.282353,\n\t\t\t0.439216,\n\t\t\t0.9,\n\t\t\t0.192157,\n\t\t\t0.235294,\n\t\t\t0.4,\n\t\t\t0.95,\n\t\t\t0.160784,\n\t\t\t0.184314,\n\t\t\t0.34902,\n\t\t\t1,\n\t\t\t0.133333,\n\t\t\t0.12549,\n\t\t\t0.301961\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"HSV\",\n\t\tName: \"Blue to Red Rainbow\",\n\t\tNanColor: [\n\t\t\t0.498039215686,\n\t\t\t0.498039215686,\n\t\t\t0.498039215686\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"HSV\",\n\t\tName: \"Red to Blue Rainbow\",\n\t\tNanColor: [\n\t\t\t0.498039215686,\n\t\t\t0.498039215686,\n\t\t\t0.498039215686\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"Rainbow Blended White\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.17,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.34,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.5,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.67,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.84,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.878431372549,\n\t\t\t0,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"Rainbow Blended Grey\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.317647058824,\n\t\t\t0.341176470588,\n\t\t\t0.43137254902,\n\t\t\t0.17,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.34,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.5,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.67,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.84,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.878431372549,\n\t\t\t0,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"Rainbow Blended Black\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.17,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.34,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.5,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.67,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.84,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.878431372549,\n\t\t\t0,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"Blue to Yellow\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.0392156862745,\n\t\t\t0.0392156862745,\n\t\t\t0.949019607843,\n\t\t\t1,\n\t\t\t0.949019607843,\n\t\t\t0.949019607843,\n\t\t\t0.0392156862745\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"HSV\",\n\t\tName: \"blot\",\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.166,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.167,\n\t\t\t1,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.332,\n\t\t\t1,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.333,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.5,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.501,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.666,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.667,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.832,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.833,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"CIELab Blue to Red\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.6,\n\t\t\t0.749019607843,\n\t\t\t1,\n\t\t\t0.76862745098,\n\t\t\t0.466666666667,\n\t\t\t0.341176470588\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"jet\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.5625,\n\t\t\t-0.777778,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t-0.269841,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t-0.015873,\n\t\t\t0.5,\n\t\t\t1,\n\t\t\t0.5,\n\t\t\t0.238095,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.746032,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.5,\n\t\t\t0,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"rainbow\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t-0.5,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.5,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_rainbow_bright\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.32549,\n\t\t\t0.14902,\n\t\t\t0.960784,\n\t\t\t-0.866221,\n\t\t\t0.297047,\n\t\t\t0.375586,\n\t\t\t0.963836,\n\t\t\t-0.732441,\n\t\t\t0.180302,\n\t\t\t0.536818,\n\t\t\t0.964627,\n\t\t\t-0.598662,\n\t\t\t0.1302,\n\t\t\t0.649207,\n\t\t\t0.929647,\n\t\t\t-0.464883,\n\t\t\t0.0445143,\n\t\t\t0.749654,\n\t\t\t0.855998,\n\t\t\t-0.331104,\n\t\t\t0.0271325,\n\t\t\t0.830713,\n\t\t\t0.721527,\n\t\t\t-0.197324,\n\t\t\t0.259504,\n\t\t\t0.866145,\n\t\t\t0.543555,\n\t\t\t-0.0635452,\n\t\t\t0.428364,\n\t\t\t0.890725,\n\t\t\t0.329819,\n\t\t\t0.0702341,\n\t\t\t0.568503,\n\t\t\t0.898508,\n\t\t\t0.187623,\n\t\t\t0.204013,\n\t\t\t0.738259,\n\t\t\t0.890317,\n\t\t\t0.0825461,\n\t\t\t0.337793,\n\t\t\t0.84546,\n\t\t\t0.86136,\n\t\t\t0.0147555,\n\t\t\t0.471572,\n\t\t\t0.912191,\n\t\t\t0.808018,\n\t\t\t0,\n\t\t\t0.605351,\n\t\t\t0.962848,\n\t\t\t0.710445,\n\t\t\t0,\n\t\t\t0.73913,\n\t\t\t0.999469,\n\t\t\t0.600258,\n\t\t\t0.0176284,\n\t\t\t0.87291,\n\t\t\t0.994156,\n\t\t\t0.445975,\n\t\t\t0.193912,\n\t\t\t1,\n\t\t\t0.980407,\n\t\t\t0.247105,\n\t\t\t0.262699\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_rainbow_dark\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.423499,\n\t\t\t-0.866221,\n\t\t\t0,\n\t\t\t0.119346,\n\t\t\t0.529237,\n\t\t\t-0.732441,\n\t\t\t0,\n\t\t\t0.238691,\n\t\t\t0.634976,\n\t\t\t-0.598662,\n\t\t\t0,\n\t\t\t0.346852,\n\t\t\t0.68788,\n\t\t\t-0.464883,\n\t\t\t0,\n\t\t\t0.45022,\n\t\t\t0.718141,\n\t\t\t-0.331104,\n\t\t\t0,\n\t\t\t0.553554,\n\t\t\t0.664839,\n\t\t\t-0.197324,\n\t\t\t0,\n\t\t\t0.651082,\n\t\t\t0.519303,\n\t\t\t-0.0635452,\n\t\t\t0.115841,\n\t\t\t0.72479,\n\t\t\t0.352857,\n\t\t\t0.0702341,\n\t\t\t0.326771,\n\t\t\t0.781195,\n\t\t\t0.140187,\n\t\t\t0.204013,\n\t\t\t0.522765,\n\t\t\t0.798524,\n\t\t\t0.0284624,\n\t\t\t0.337793,\n\t\t\t0.703162,\n\t\t\t0.788685,\n\t\t\t0.00885756,\n\t\t\t0.471572,\n\t\t\t0.845118,\n\t\t\t0.751133,\n\t\t\t0,\n\t\t\t0.605351,\n\t\t\t0.955734,\n\t\t\t0.690825,\n\t\t\t0,\n\t\t\t0.73913,\n\t\t\t0.995402,\n\t\t\t0.567916,\n\t\t\t0.0618524,\n\t\t\t0.87291,\n\t\t\t0.987712,\n\t\t\t0.403398,\n\t\t\t0.164851,\n\t\t\t1,\n\t\t\t0.980407,\n\t\t\t0.247105,\n\t\t\t0.262699\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"nic_CubicL\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.479965,\n\t\t\t0.0118108,\n\t\t\t0.5307,\n\t\t\t-0.87451,\n\t\t\t0.522213,\n\t\t\t0.0551282,\n\t\t\t0.706919,\n\t\t\t-0.74902,\n\t\t\t0.50839,\n\t\t\t0.237278,\n\t\t\t0.867764,\n\t\t\t-0.623529,\n\t\t\t0.451617,\n\t\t\t0.373834,\n\t\t\t0.987255,\n\t\t\t-0.498039,\n\t\t\t0.39365,\n\t\t\t0.497255,\n\t\t\t0.97506,\n\t\t\t-0.372549,\n\t\t\t0.328631,\n\t\t\t0.599639,\n\t\t\t0.891843,\n\t\t\t-0.247059,\n\t\t\t0.250043,\n\t\t\t0.690286,\n\t\t\t0.778553,\n\t\t\t-0.121569,\n\t\t\t0.249656,\n\t\t\t0.764905,\n\t\t\t0.645857,\n\t\t\t0.00392157,\n\t\t\t0.297954,\n\t\t\t0.821466,\n\t\t\t0.50449,\n\t\t\t0.129412,\n\t\t\t0.337509,\n\t\t\t0.872595,\n\t\t\t0.358447,\n\t\t\t0.254902,\n\t\t\t0.430011,\n\t\t\t0.913789,\n\t\t\t0.297079,\n\t\t\t0.380392,\n\t\t\t0.587191,\n\t\t\t0.931381,\n\t\t\t0.333353,\n\t\t\t0.505882,\n\t\t\t0.727937,\n\t\t\t0.93591,\n\t\t\t0.353742,\n\t\t\t0.631373,\n\t\t\t0.826403,\n\t\t\t0.921081,\n\t\t\t0.365066,\n\t\t\t0.756863,\n\t\t\t0.893201,\n\t\t\t0.846317,\n\t\t\t0.372662,\n\t\t\t0.882353,\n\t\t\t0.965347,\n\t\t\t0.73884,\n\t\t\t0.378506,\n\t\t\t1,\n\t\t\t0.983235,\n\t\t\t0.597451,\n\t\t\t0.366856\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"nic_CubicYF\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.5151,\n\t\t\t0.0482,\n\t\t\t0.6697,\n\t\t\t-0.87451,\n\t\t\t0.520711,\n\t\t\t0.168955,\n\t\t\t0.800574,\n\t\t\t-0.74902,\n\t\t\t0.493694,\n\t\t\t0.278596,\n\t\t\t0.911824,\n\t\t\t-0.623529,\n\t\t\t0.440026,\n\t\t\t0.369475,\n\t\t\t0.984978,\n\t\t\t-0.498039,\n\t\t\t0.398932,\n\t\t\t0.457593,\n\t\t\t0.987053,\n\t\t\t-0.372549,\n\t\t\t0.350651,\n\t\t\t0.540644,\n\t\t\t0.929608,\n\t\t\t-0.247059,\n\t\t\t0.298827,\n\t\t\t0.615625,\n\t\t\t0.857729,\n\t\t\t-0.121569,\n\t\t\t0.239928,\n\t\t\t0.685061,\n\t\t\t0.769531,\n\t\t\t0.00392157,\n\t\t\t0.228832,\n\t\t\t0.739349,\n\t\t\t0.673287,\n\t\t\t0.129412,\n\t\t\t0.263297,\n\t\t\t0.78608,\n\t\t\t0.569988,\n\t\t\t0.254902,\n\t\t\t0.298107,\n\t\t\t0.828337,\n\t\t\t0.460214,\n\t\t\t0.380392,\n\t\t\t0.33092,\n\t\t\t0.864071,\n\t\t\t0.352674,\n\t\t\t0.505882,\n\t\t\t0.38306,\n\t\t\t0.898169,\n\t\t\t0.287309,\n\t\t\t0.631373,\n\t\t\t0.49023,\n\t\t\t0.917481,\n\t\t\t0.307961,\n\t\t\t0.756863,\n\t\t\t0.62372,\n\t\t\t0.926026,\n\t\t\t0.332309,\n\t\t\t0.882353,\n\t\t\t0.717458,\n\t\t\t0.92527,\n\t\t\t0.342476,\n\t\t\t1,\n\t\t\t0.8,\n\t\t\t0.9255,\n\t\t\t0.3529\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"gist_earth\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.239216,\n\t\t\t0.027451,\n\t\t\t0.415686,\n\t\t\t-0.74902,\n\t\t\t0.0901961,\n\t\t\t0.254902,\n\t\t\t0.556863,\n\t\t\t-0.623529,\n\t\t\t0.0941176,\n\t\t\t0.352941,\n\t\t\t0.54902,\n\t\t\t-0.498039,\n\t\t\t0.105882,\n\t\t\t0.435294,\n\t\t\t0.533333,\n\t\t\t-0.372549,\n\t\t\t0.12549,\n\t\t\t0.52549,\n\t\t\t0.501961,\n\t\t\t-0.247059,\n\t\t\t0.156863,\n\t\t\t0.596078,\n\t\t\t0.443137,\n\t\t\t-0.121569,\n\t\t\t0.196078,\n\t\t\t0.65098,\n\t\t\t0.380392,\n\t\t\t0.00392157,\n\t\t\t0.282353,\n\t\t\t0.717647,\n\t\t\t0.301961,\n\t\t\t0.129412,\n\t\t\t0.466667,\n\t\t\t0.772549,\n\t\t\t0.27451,\n\t\t\t0.254902,\n\t\t\t0.678431,\n\t\t\t0.784314,\n\t\t\t0.309804,\n\t\t\t0.380392,\n\t\t\t0.901961,\n\t\t\t0.756863,\n\t\t\t0.376471,\n\t\t\t0.505882,\n\t\t\t0.992157,\n\t\t\t0.705882,\n\t\t\t0.521569,\n\t\t\t0.631373,\n\t\t\t1,\n\t\t\t0.721569,\n\t\t\t0.701961,\n\t\t\t0.756863,\n\t\t\t1,\n\t\t\t0.784314,\n\t\t\t0.784314,\n\t\t\t0.882353,\n\t\t\t1,\n\t\t\t0.866667,\n\t\t\t0.866667,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"2hot\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.0416667,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.873016,\n\t\t\t0.208333,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.746032,\n\t\t\t0.375,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.619048,\n\t\t\t0.541667,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.492063,\n\t\t\t0.708333,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.365079,\n\t\t\t0.854137,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.238095,\n\t\t\t0.937488,\n\t\t\t0.039062,\n\t\t\t0,\n\t\t\t-0.111111,\n\t\t\t1,\n\t\t\t0.208333,\n\t\t\t0,\n\t\t\t0.015873,\n\t\t\t1,\n\t\t\t0.375,\n\t\t\t0,\n\t\t\t0.142857,\n\t\t\t1,\n\t\t\t0.541667,\n\t\t\t0,\n\t\t\t0.269841,\n\t\t\t1,\n\t\t\t0.708333,\n\t\t\t0,\n\t\t\t0.396825,\n\t\t\t1,\n\t\t\t0.858805,\n\t\t\t0.03125,\n\t\t\t0.52381,\n\t\t\t1,\n\t\t\t0.947392,\n\t\t\t0.15625,\n\t\t\t0.650794,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.3125,\n\t\t\t0.777778,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.5625,\n\t\t\t0.904762,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.8125,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_red2yellow_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t7.54296e-7,\n\t\t\t0,\n\t\t\t0.0000109827,\n\t\t\t-0.87451,\n\t\t\t0.18285,\n\t\t\t0.0264094,\n\t\t\t0,\n\t\t\t-0.74902,\n\t\t\t0.3066,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.623529,\n\t\t\t0.422841,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.498039,\n\t\t\t0.522945,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.372549,\n\t\t\t0.605721,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.247059,\n\t\t\t0.672502,\n\t\t\t0.14168,\n\t\t\t0,\n\t\t\t-0.121569,\n\t\t\t0.728167,\n\t\t\t0.244025,\n\t\t\t0,\n\t\t\t0.00392157,\n\t\t\t0.781215,\n\t\t\t0.333454,\n\t\t\t0,\n\t\t\t0.129412,\n\t\t\t0.825,\n\t\t\t0.423586,\n\t\t\t0,\n\t\t\t0.254902,\n\t\t\t0.855893,\n\t\t\t0.516793,\n\t\t\t0,\n\t\t\t0.380392,\n\t\t\t0.880491,\n\t\t\t0.608846,\n\t\t\t0,\n\t\t\t0.505882,\n\t\t\t0.910305,\n\t\t\t0.695505,\n\t\t\t0,\n\t\t\t0.631373,\n\t\t\t0.94109,\n\t\t\t0.779067,\n\t\t\t0.223528,\n\t\t\t0.756863,\n\t\t\t0.967873,\n\t\t\t0.858572,\n\t\t\t0.473521,\n\t\t\t0.882353,\n\t\t\t0.986815,\n\t\t\t0.933211,\n\t\t\t0.751583,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.999997\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_marine2gold_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t1.11641e-7,\n\t\t\t0,\n\t\t\t0.00000162551,\n\t\t\t-0.87451,\n\t\t\t0.0413146,\n\t\t\t0.0619808,\n\t\t\t0.209857,\n\t\t\t-0.74902,\n\t\t\t0.0185557,\n\t\t\t0.101341,\n\t\t\t0.350684,\n\t\t\t-0.623529,\n\t\t\t0.00486405,\n\t\t\t0.149847,\n\t\t\t0.461054,\n\t\t\t-0.498039,\n\t\t\t0.0836345,\n\t\t\t0.210845,\n\t\t\t0.517906,\n\t\t\t-0.372549,\n\t\t\t0.173222,\n\t\t\t0.276134,\n\t\t\t0.541793,\n\t\t\t-0.247059,\n\t\t\t0.259857,\n\t\t\t0.343877,\n\t\t\t0.535869,\n\t\t\t-0.121569,\n\t\t\t0.362299,\n\t\t\t0.408124,\n\t\t\t0.504293,\n\t\t\t0.00392157,\n\t\t\t0.468266,\n\t\t\t0.468276,\n\t\t\t0.468257,\n\t\t\t0.129412,\n\t\t\t0.582781,\n\t\t\t0.527545,\n\t\t\t0.374914,\n\t\t\t0.254902,\n\t\t\t0.691591,\n\t\t\t0.585251,\n\t\t\t0.274266,\n\t\t\t0.380392,\n\t\t\t0.784454,\n\t\t\t0.645091,\n\t\t\t0.247332,\n\t\t\t0.505882,\n\t\t\t0.862299,\n\t\t\t0.710383,\n\t\t\t0.27518,\n\t\t\t0.631373,\n\t\t\t0.920863,\n\t\t\t0.782923,\n\t\t\t0.351563,\n\t\t\t0.756863,\n\t\t\t0.955792,\n\t\t\t0.859699,\n\t\t\t0.533541,\n\t\t\t0.882353,\n\t\t\t0.976162,\n\t\t\t0.93433,\n\t\t\t0.780671,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.999983\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_blue2gold_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.0742735,\n\t\t\t0.0440331,\n\t\t\t0.230013,\n\t\t\t-0.74902,\n\t\t\t0.125276,\n\t\t\t0.0258685,\n\t\t\t0.415826,\n\t\t\t-0.623529,\n\t\t\t0.143879,\n\t\t\t0.0163031,\n\t\t\t0.591346,\n\t\t\t-0.498039,\n\t\t\t0.212261,\n\t\t\t0.0627855,\n\t\t\t0.705239,\n\t\t\t-0.372549,\n\t\t\t0.306048,\n\t\t\t0.141178,\n\t\t\t0.763636,\n\t\t\t-0.247059,\n\t\t\t0.391537,\n\t\t\t0.232286,\n\t\t\t0.773263,\n\t\t\t-0.121569,\n\t\t\t0.461734,\n\t\t\t0.336633,\n\t\t\t0.708321,\n\t\t\t0.00392157,\n\t\t\t0.54209,\n\t\t\t0.427581,\n\t\t\t0.590007,\n\t\t\t0.129412,\n\t\t\t0.61704,\n\t\t\t0.508623,\n\t\t\t0.460978,\n\t\t\t0.254902,\n\t\t\t0.702703,\n\t\t\t0.579586,\n\t\t\t0.309117,\n\t\t\t0.380392,\n\t\t\t0.790336,\n\t\t\t0.644811,\n\t\t\t0.170397,\n\t\t\t0.505882,\n\t\t\t0.870173,\n\t\t\t0.710733,\n\t\t\t0.117134,\n\t\t\t0.631373,\n\t\t\t0.93656,\n\t\t\t0.781991,\n\t\t\t0.157144,\n\t\t\t0.756863,\n\t\t\t0.965672,\n\t\t\t0.862068,\n\t\t\t0.409836,\n\t\t\t0.882353,\n\t\t\t0.985751,\n\t\t\t0.936296,\n\t\t\t0.714162,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.999999\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_sapphire2gold_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.107704,\n\t\t\t0.107708,\n\t\t\t0.107694,\n\t\t\t-0.87451,\n\t\t\t0.1851,\n\t\t\t0.112354,\n\t\t\t0.308554,\n\t\t\t-0.74902,\n\t\t\t0.236782,\n\t\t\t0.114233,\n\t\t\t0.48788,\n\t\t\t-0.623529,\n\t\t\t0.28296,\n\t\t\t0.126187,\n\t\t\t0.639464,\n\t\t\t-0.498039,\n\t\t\t0.344787,\n\t\t\t0.171643,\n\t\t\t0.739713,\n\t\t\t-0.372549,\n\t\t\t0.413325,\n\t\t\t0.242371,\n\t\t\t0.76913,\n\t\t\t-0.247059,\n\t\t\t0.481863,\n\t\t\t0.3131,\n\t\t\t0.719841,\n\t\t\t-0.121569,\n\t\t\t0.550402,\n\t\t\t0.383829,\n\t\t\t0.612222,\n\t\t\t0.00392157,\n\t\t\t0.61894,\n\t\t\t0.454558,\n\t\t\t0.51126,\n\t\t\t0.129412,\n\t\t\t0.687478,\n\t\t\t0.525287,\n\t\t\t0.39993,\n\t\t\t0.254902,\n\t\t\t0.756017,\n\t\t\t0.596016,\n\t\t\t0.289923,\n\t\t\t0.380392,\n\t\t\t0.824555,\n\t\t\t0.666745,\n\t\t\t0.255498,\n\t\t\t0.505882,\n\t\t\t0.892979,\n\t\t\t0.736822,\n\t\t\t0.27696,\n\t\t\t0.631373,\n\t\t\t0.938851,\n\t\t\t0.804966,\n\t\t\t0.351734,\n\t\t\t0.756863,\n\t\t\t0.966491,\n\t\t\t0.874853,\n\t\t\t0.53572,\n\t\t\t0.882353,\n\t\t\t0.982105,\n\t\t\t0.94153,\n\t\t\t0.782579,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.999986\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_red2purple_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.167793,\n\t\t\t0.0166271,\n\t\t\t0.0431278,\n\t\t\t-0.74902,\n\t\t\t0.262608,\n\t\t\t0.0107595,\n\t\t\t0.0791181,\n\t\t\t-0.623529,\n\t\t\t0.351902,\n\t\t\t0.0101858,\n\t\t\t0.100926,\n\t\t\t-0.498039,\n\t\t\t0.441257,\n\t\t\t0.0160835,\n\t\t\t0.131919,\n\t\t\t-0.372549,\n\t\t\t0.5221,\n\t\t\t0.0555972,\n\t\t\t0.195625,\n\t\t\t-0.247059,\n\t\t\t0.593852,\n\t\t\t0.104294,\n\t\t\t0.310234,\n\t\t\t-0.121569,\n\t\t\t0.654628,\n\t\t\t0.158115,\n\t\t\t0.448486,\n\t\t\t0.00392157,\n\t\t\t0.707443,\n\t\t\t0.220914,\n\t\t\t0.570253,\n\t\t\t0.129412,\n\t\t\t0.749504,\n\t\t\t0.293268,\n\t\t\t0.67897,\n\t\t\t0.254902,\n\t\t\t0.781587,\n\t\t\t0.370517,\n\t\t\t0.779269,\n\t\t\t0.380392,\n\t\t\t0.809951,\n\t\t\t0.451099,\n\t\t\t0.855831,\n\t\t\t0.505882,\n\t\t\t0.84424,\n\t\t\t0.531462,\n\t\t\t0.900451,\n\t\t\t0.631373,\n\t\t\t0.865174,\n\t\t\t0.620901,\n\t\t\t0.91606,\n\t\t\t0.756863,\n\t\t\t0.875041,\n\t\t\t0.714054,\n\t\t\t0.910284,\n\t\t\t0.882353,\n\t\t\t0.880764,\n\t\t\t0.80554,\n\t\t\t0.896276,\n\t\t\t1,\n\t\t\t0.887572,\n\t\t\t0.887591,\n\t\t\t0.887556\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_purple2pink_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.117562,\n\t\t\t0.0291202,\n\t\t\t0.175876,\n\t\t\t-0.74902,\n\t\t\t0.178368,\n\t\t\t0.0458476,\n\t\t\t0.285454,\n\t\t\t-0.623529,\n\t\t\t0.237731,\n\t\t\t0.0680173,\n\t\t\t0.387717,\n\t\t\t-0.498039,\n\t\t\t0.300877,\n\t\t\t0.0956291,\n\t\t\t0.484802,\n\t\t\t-0.372549,\n\t\t\t0.370929,\n\t\t\t0.136858,\n\t\t\t0.554985,\n\t\t\t-0.247059,\n\t\t\t0.449033,\n\t\t\t0.189273,\n\t\t\t0.58863,\n\t\t\t-0.121569,\n\t\t\t0.529971,\n\t\t\t0.245796,\n\t\t\t0.598587,\n\t\t\t0.00392157,\n\t\t\t0.609914,\n\t\t\t0.300643,\n\t\t\t0.610244,\n\t\t\t0.129412,\n\t\t\t0.697079,\n\t\t\t0.351286,\n\t\t\t0.616371,\n\t\t\t0.254902,\n\t\t\t0.785858,\n\t\t\t0.401991,\n\t\t\t0.617376,\n\t\t\t0.380392,\n\t\t\t0.862517,\n\t\t\t0.45745,\n\t\t\t0.64463,\n\t\t\t0.505882,\n\t\t\t0.91359,\n\t\t\t0.525462,\n\t\t\t0.705336,\n\t\t\t0.631373,\n\t\t\t0.932583,\n\t\t\t0.61064,\n\t\t\t0.767412,\n\t\t\t0.756863,\n\t\t\t0.922478,\n\t\t\t0.706966,\n\t\t\t0.817522,\n\t\t\t0.882353,\n\t\t\t0.901302,\n\t\t\t0.803071,\n\t\t\t0.856311,\n\t\t\t1,\n\t\t\t0.887571,\n\t\t\t0.887591,\n\t\t\t0.887549\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_pbj_lin\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.091821,\n\t\t\t0.0611476,\n\t\t\t0.10617,\n\t\t\t-0.74902,\n\t\t\t0.160311,\n\t\t\t0.0900022,\n\t\t\t0.192713,\n\t\t\t-0.623529,\n\t\t\t0.22484,\n\t\t\t0.12126,\n\t\t\t0.272128,\n\t\t\t-0.498039,\n\t\t\t0.291263,\n\t\t\t0.157469,\n\t\t\t0.340828,\n\t\t\t-0.372549,\n\t\t\t0.360015,\n\t\t\t0.200388,\n\t\t\t0.388903,\n\t\t\t-0.247059,\n\t\t\t0.437497,\n\t\t\t0.250058,\n\t\t\t0.387201,\n\t\t\t-0.121569,\n\t\t\t0.512636,\n\t\t\t0.304969,\n\t\t\t0.355955,\n\t\t\t0.00392157,\n\t\t\t0.582603,\n\t\t\t0.360874,\n\t\t\t0.33488,\n\t\t\t0.129412,\n\t\t\t0.655126,\n\t\t\t0.416374,\n\t\t\t0.306351,\n\t\t\t0.254902,\n\t\t\t0.725889,\n\t\t\t0.473329,\n\t\t\t0.279051,\n\t\t\t0.380392,\n\t\t\t0.778125,\n\t\t\t0.537928,\n\t\t\t0.302697,\n\t\t\t0.505882,\n\t\t\t0.815894,\n\t\t\t0.606931,\n\t\t\t0.382431,\n\t\t\t0.631373,\n\t\t\t0.839159,\n\t\t\t0.679308,\n\t\t\t0.497608,\n\t\t\t0.756863,\n\t\t\t0.854748,\n\t\t\t0.751666,\n\t\t\t0.631792,\n\t\t\t0.882353,\n\t\t\t0.869483,\n\t\t\t0.822508,\n\t\t\t0.768592,\n\t\t\t1,\n\t\t\t0.887572,\n\t\t\t0.887589,\n\t\t\t0.887565\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_blue2green_muted\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.107704,\n\t\t\t0.107708,\n\t\t\t0.107695,\n\t\t\t-0.87451,\n\t\t\t0.141522,\n\t\t\t0.13066,\n\t\t\t0.270741,\n\t\t\t-0.74902,\n\t\t\t0.180123,\n\t\t\t0.146119,\n\t\t\t0.42308,\n\t\t\t-0.623529,\n\t\t\t0.210161,\n\t\t\t0.169674,\n\t\t\t0.551795,\n\t\t\t-0.498039,\n\t\t\t0.239701,\n\t\t\t0.212939,\n\t\t\t0.634969,\n\t\t\t-0.372549,\n\t\t\t0.253916,\n\t\t\t0.282947,\n\t\t\t0.653641,\n\t\t\t-0.247059,\n\t\t\t0.242791,\n\t\t\t0.366933,\n\t\t\t0.608521,\n\t\t\t-0.121569,\n\t\t\t0.226302,\n\t\t\t0.446776,\n\t\t\t0.52693,\n\t\t\t0.00392157,\n\t\t\t0.236237,\n\t\t\t0.514689,\n\t\t\t0.458798,\n\t\t\t0.129412,\n\t\t\t0.274641,\n\t\t\t0.577589,\n\t\t\t0.376069,\n\t\t\t0.254902,\n\t\t\t0.349625,\n\t\t\t0.633993,\n\t\t\t0.288131,\n\t\t\t0.380392,\n\t\t\t0.4437,\n\t\t\t0.683677,\n\t\t\t0.260497,\n\t\t\t0.505882,\n\t\t\t0.536247,\n\t\t\t0.731214,\n\t\t\t0.285424,\n\t\t\t0.631373,\n\t\t\t0.628472,\n\t\t\t0.777128,\n\t\t\t0.349151,\n\t\t\t0.756863,\n\t\t\t0.718259,\n\t\t\t0.819287,\n\t\t\t0.496825,\n\t\t\t0.882353,\n\t\t\t0.804768,\n\t\t\t0.856164,\n\t\t\t0.703299,\n\t\t\t1,\n\t\t\t0.887571,\n\t\t\t0.887591,\n\t\t\t0.887548\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_blue2green_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t3.63578e-7,\n\t\t\t0,\n\t\t\t0.00000529374,\n\t\t\t-0.87451,\n\t\t\t0.0539915,\n\t\t\t0.0577948,\n\t\t\t0.212806,\n\t\t\t-0.74902,\n\t\t\t0.0620393,\n\t\t\t0.0758942,\n\t\t\t0.388959,\n\t\t\t-0.623529,\n\t\t\t0.0697499,\n\t\t\t0.102032,\n\t\t\t0.54177,\n\t\t\t-0.498039,\n\t\t\t0.113295,\n\t\t\t0.156156,\n\t\t\t0.64334,\n\t\t\t-0.372549,\n\t\t\t0.152047,\n\t\t\t0.243196,\n\t\t\t0.670283,\n\t\t\t-0.247059,\n\t\t\t0.158096,\n\t\t\t0.344084,\n\t\t\t0.622864,\n\t\t\t-0.121569,\n\t\t\t0.151142,\n\t\t\t0.43922,\n\t\t\t0.532767,\n\t\t\t0.00392157,\n\t\t\t0.17155,\n\t\t\t0.521588,\n\t\t\t0.457719,\n\t\t\t0.129412,\n\t\t\t0.225861,\n\t\t\t0.599141,\n\t\t\t0.363997,\n\t\t\t0.254902,\n\t\t\t0.32328,\n\t\t\t0.67007,\n\t\t\t0.259083,\n\t\t\t0.380392,\n\t\t\t0.442344,\n\t\t\t0.733697,\n\t\t\t0.223754,\n\t\t\t0.505882,\n\t\t\t0.558409,\n\t\t\t0.794941,\n\t\t\t0.257411,\n\t\t\t0.631373,\n\t\t\t0.673875,\n\t\t\t0.854344,\n\t\t\t0.340822,\n\t\t\t0.756863,\n\t\t\t0.787244,\n\t\t\t0.909326,\n\t\t\t0.524717,\n\t\t\t0.882353,\n\t\t\t0.896483,\n\t\t\t0.958063,\n\t\t\t0.775914,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.999982\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"GREEN-WHITE_LINEAR\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0,\n\t\t\t0.062745,\n\t\t\t0,\n\t\t\t-0.74902,\n\t\t\t0,\n\t\t\t0.12549,\n\t\t\t0,\n\t\t\t-0.623529,\n\t\t\t0,\n\t\t\t0.188235,\n\t\t\t0,\n\t\t\t-0.498039,\n\t\t\t0,\n\t\t\t0.25098,\n\t\t\t0,\n\t\t\t-0.372549,\n\t\t\t0,\n\t\t\t0.313725,\n\t\t\t0,\n\t\t\t-0.247059,\n\t\t\t0,\n\t\t\t0.376471,\n\t\t\t0,\n\t\t\t-0.121569,\n\t\t\t0.094118,\n\t\t\t0.439216,\n\t\t\t0,\n\t\t\t0.00392157,\n\t\t\t0.196078,\n\t\t\t0.501961,\n\t\t\t0,\n\t\t\t0.129412,\n\t\t\t0.294118,\n\t\t\t0.564706,\n\t\t\t0,\n\t\t\t0.254902,\n\t\t\t0.396078,\n\t\t\t0.627451,\n\t\t\t0,\n\t\t\t0.380392,\n\t\t\t0.498039,\n\t\t\t0.690196,\n\t\t\t0,\n\t\t\t0.505882,\n\t\t\t0.6,\n\t\t\t0.752941,\n\t\t\t0.145098,\n\t\t\t0.631373,\n\t\t\t0.701961,\n\t\t\t0.815686,\n\t\t\t0.364706,\n\t\t\t0.756863,\n\t\t\t0.8,\n\t\t\t0.878431,\n\t\t\t0.580392,\n\t\t\t0.882353,\n\t\t\t0.901961,\n\t\t\t0.941176,\n\t\t\t0.796078,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_green2yellow_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0,\n\t\t\t0.105542,\n\t\t\t0.0603919,\n\t\t\t-0.74902,\n\t\t\t0,\n\t\t\t0.159454,\n\t\t\t0.104148,\n\t\t\t-0.623529,\n\t\t\t0,\n\t\t\t0.219502,\n\t\t\t0.15542,\n\t\t\t-0.498039,\n\t\t\t0,\n\t\t\t0.282276,\n\t\t\t0.203811,\n\t\t\t-0.372549,\n\t\t\t0,\n\t\t\t0.346331,\n\t\t\t0.235652,\n\t\t\t-0.247059,\n\t\t\t0,\n\t\t\t0.411765,\n\t\t\t0.235428,\n\t\t\t-0.121569,\n\t\t\t0,\n\t\t\t0.477177,\n\t\t\t0.217977,\n\t\t\t0.00392157,\n\t\t\t0.0593644,\n\t\t\t0.541635,\n\t\t\t0.21361,\n\t\t\t0.129412,\n\t\t\t0.233081,\n\t\t\t0.604722,\n\t\t\t0.210591,\n\t\t\t0.254902,\n\t\t\t0.369803,\n\t\t\t0.664942,\n\t\t\t0.226536,\n\t\t\t0.380392,\n\t\t\t0.498446,\n\t\t\t0.722367,\n\t\t\t0.288237,\n\t\t\t0.505882,\n\t\t\t0.601929,\n\t\t\t0.782244,\n\t\t\t0.380815,\n\t\t\t0.631373,\n\t\t\t0.703207,\n\t\t\t0.840497,\n\t\t\t0.512134,\n\t\t\t0.756863,\n\t\t\t0.803186,\n\t\t\t0.896433,\n\t\t\t0.674462,\n\t\t\t0.882353,\n\t\t\t0.903834,\n\t\t\t0.950266,\n\t\t\t0.846715,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.999981\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"blue2cyan\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0,\n\t\t\t0.152941,\n\t\t\t0.364706,\n\t\t\t-0.74902,\n\t\t\t0,\n\t\t\t0.254902,\n\t\t\t0.470588,\n\t\t\t-0.623529,\n\t\t\t0,\n\t\t\t0.34902,\n\t\t\t0.572549,\n\t\t\t-0.498039,\n\t\t\t0,\n\t\t\t0.443137,\n\t\t\t0.670588,\n\t\t\t-0.372549,\n\t\t\t0,\n\t\t\t0.537255,\n\t\t\t0.772549,\n\t\t\t-0.247059,\n\t\t\t0,\n\t\t\t0.627451,\n\t\t\t0.870588,\n\t\t\t-0.121569,\n\t\t\t0,\n\t\t\t0.717647,\n\t\t\t0.964706,\n\t\t\t0.00392157,\n\t\t\t0.0784314,\n\t\t\t0.772549,\n\t\t\t1,\n\t\t\t0.129412,\n\t\t\t0.207843,\n\t\t\t0.858824,\n\t\t\t1,\n\t\t\t0.254902,\n\t\t\t0.32549,\n\t\t\t0.941176,\n\t\t\t1,\n\t\t\t0.380392,\n\t\t\t0.45098,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.505882,\n\t\t\t0.560784,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.631373,\n\t\t\t0.662745,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.756863,\n\t\t\t0.760784,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.882353,\n\t\t\t0.870588,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_blue2cyan_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t4.05298e-7,\n\t\t\t0,\n\t\t\t0.0000059012,\n\t\t\t-0.87451,\n\t\t\t0.0207526,\n\t\t\t0.0740933,\n\t\t\t0.18093,\n\t\t\t-0.74902,\n\t\t\t0,\n\t\t\t0.121033,\n\t\t\t0.30343,\n\t\t\t-0.623529,\n\t\t\t0,\n\t\t\t0.166892,\n\t\t\t0.416095,\n\t\t\t-0.498039,\n\t\t\t0,\n\t\t\t0.216768,\n\t\t\t0.524796,\n\t\t\t-0.372549,\n\t\t\t0.0164769,\n\t\t\t0.275471,\n\t\t\t0.608585,\n\t\t\t-0.247059,\n\t\t\t0.0544527,\n\t\t\t0.344824,\n\t\t\t0.659267,\n\t\t\t-0.121569,\n\t\t\t0.0880643,\n\t\t\t0.419118,\n\t\t\t0.688675,\n\t\t\t0.00392157,\n\t\t\t0.127938,\n\t\t\t0.492556,\n\t\t\t0.720256,\n\t\t\t0.129412,\n\t\t\t0.149476,\n\t\t\t0.566946,\n\t\t\t0.756918,\n\t\t\t0.254902,\n\t\t\t0.188961,\n\t\t\t0.641333,\n\t\t\t0.792122,\n\t\t\t0.380392,\n\t\t\t0.245482,\n\t\t\t0.715336,\n\t\t\t0.827609,\n\t\t\t0.505882,\n\t\t\t0.329216,\n\t\t\t0.786235,\n\t\t\t0.874761,\n\t\t\t0.631373,\n\t\t\t0.453558,\n\t\t\t0.852803,\n\t\t\t0.918466,\n\t\t\t0.756863,\n\t\t\t0.626281,\n\t\t\t0.910493,\n\t\t\t0.954,\n\t\t\t0.882353,\n\t\t\t0.82257,\n\t\t\t0.958709,\n\t\t\t0.980146,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.999989\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_blue_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.0425591,\n\t\t\t0.0763529,\n\t\t\t0.150682,\n\t\t\t-0.74902,\n\t\t\t0.0569472,\n\t\t\t0.119154,\n\t\t\t0.275403,\n\t\t\t-0.623529,\n\t\t\t0.0635978,\n\t\t\t0.164772,\n\t\t\t0.395427,\n\t\t\t-0.498039,\n\t\t\t0.0774342,\n\t\t\t0.213851,\n\t\t\t0.510014,\n\t\t\t-0.372549,\n\t\t\t0.106815,\n\t\t\t0.267034,\n\t\t\t0.615102,\n\t\t\t-0.247059,\n\t\t\t0.122093,\n\t\t\t0.324649,\n\t\t\t0.720068,\n\t\t\t-0.121569,\n\t\t\t0.160851,\n\t\t\t0.387068,\n\t\t\t0.806956,\n\t\t\t0.00392157,\n\t\t\t0.213754,\n\t\t\t0.453516,\n\t\t\t0.878012,\n\t\t\t0.129412,\n\t\t\t0.26722,\n\t\t\t0.524656,\n\t\t\t0.932436,\n\t\t\t0.254902,\n\t\t\t0.326844,\n\t\t\t0.599279,\n\t\t\t0.968038,\n\t\t\t0.380392,\n\t\t\t0.403403,\n\t\t\t0.674712,\n\t\t\t0.984784,\n\t\t\t0.505882,\n\t\t\t0.499703,\n\t\t\t0.745519,\n\t\t\t1,\n\t\t\t0.631373,\n\t\t\t0.615055,\n\t\t\t0.813983,\n\t\t\t1,\n\t\t\t0.756863,\n\t\t\t0.74405,\n\t\t\t0.879228,\n\t\t\t1,\n\t\t\t0.882353,\n\t\t\t0.877909,\n\t\t\t0.941913,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.999996\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"BLUE-WHITE\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.082353,\n\t\t\t-0.74902,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.168627,\n\t\t\t-0.623529,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.254902,\n\t\t\t-0.498039,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.337255,\n\t\t\t-0.372549,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.423529,\n\t\t\t-0.247059,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.509804,\n\t\t\t-0.121569,\n\t\t\t0,\n\t\t\t0.101961,\n\t\t\t0.592157,\n\t\t\t0.00392157,\n\t\t\t0,\n\t\t\t0.203922,\n\t\t\t0.678431,\n\t\t\t0.129412,\n\t\t\t0,\n\t\t\t0.301961,\n\t\t\t0.764706,\n\t\t\t0.254902,\n\t\t\t0,\n\t\t\t0.403922,\n\t\t\t0.85098,\n\t\t\t0.380392,\n\t\t\t0,\n\t\t\t0.505882,\n\t\t\t0.933333,\n\t\t\t0.505882,\n\t\t\t0,\n\t\t\t0.603922,\n\t\t\t1,\n\t\t\t0.631373,\n\t\t\t0.254902,\n\t\t\t0.705882,\n\t\t\t1,\n\t\t\t0.756863,\n\t\t\t0.509804,\n\t\t\t0.807843,\n\t\t\t1,\n\t\t\t0.882353,\n\t\t\t0.764706,\n\t\t\t0.905882,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_purple_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t4.264e-8,\n\t\t\t0,\n\t\t\t6.20844e-7,\n\t\t\t-0.87451,\n\t\t\t0.100579,\n\t\t\t0.0593111,\n\t\t\t0.145666,\n\t\t\t-0.74902,\n\t\t\t0.167794,\n\t\t\t0.0889224,\n\t\t\t0.254953,\n\t\t\t-0.623529,\n\t\t\t0.231446,\n\t\t\t0.123339,\n\t\t\t0.360511,\n\t\t\t-0.498039,\n\t\t\t0.296699,\n\t\t\t0.163027,\n\t\t\t0.461278,\n\t\t\t-0.372549,\n\t\t\t0.363211,\n\t\t\t0.209286,\n\t\t\t0.55306,\n\t\t\t-0.247059,\n\t\t\t0.431136,\n\t\t\t0.260776,\n\t\t\t0.637195,\n\t\t\t-0.121569,\n\t\t\t0.498202,\n\t\t\t0.320012,\n\t\t\t0.705799,\n\t\t\t0.00392157,\n\t\t\t0.567456,\n\t\t\t0.380459,\n\t\t\t0.778091,\n\t\t\t0.129412,\n\t\t\t0.629381,\n\t\t\t0.445284,\n\t\t\t0.8448,\n\t\t\t0.254902,\n\t\t\t0.688373,\n\t\t\t0.517374,\n\t\t\t0.895694,\n\t\t\t0.380392,\n\t\t\t0.74891,\n\t\t\t0.590906,\n\t\t\t0.93976,\n\t\t\t0.505882,\n\t\t\t0.805017,\n\t\t\t0.667956,\n\t\t\t0.977626,\n\t\t\t0.631373,\n\t\t\t0.850914,\n\t\t\t0.752618,\n\t\t\t0.992396,\n\t\t\t0.756863,\n\t\t\t0.89724,\n\t\t\t0.838454,\n\t\t\t0.994093,\n\t\t\t0.882353,\n\t\t\t0.948461,\n\t\t\t0.922603,\n\t\t\t0.994449,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.999967\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_magenta_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.0000254023,\n\t\t\t-0.87451,\n\t\t\t0.128696,\n\t\t\t0.0456782,\n\t\t\t0.11635,\n\t\t\t-0.74902,\n\t\t\t0.228133,\n\t\t\t0.0476299,\n\t\t\t0.201452,\n\t\t\t-0.623529,\n\t\t\t0.327273,\n\t\t\t0.0374065,\n\t\t\t0.282107,\n\t\t\t-0.498039,\n\t\t\t0.420953,\n\t\t\t0.0408166,\n\t\t\t0.35709,\n\t\t\t-0.372549,\n\t\t\t0.511562,\n\t\t\t0.0642203,\n\t\t\t0.430511,\n\t\t\t-0.247059,\n\t\t\t0.599552,\n\t\t\t0.102686,\n\t\t\t0.504257,\n\t\t\t-0.121569,\n\t\t\t0.684646,\n\t\t\t0.150536,\n\t\t\t0.579429,\n\t\t\t0.00392157,\n\t\t\t0.765817,\n\t\t\t0.205978,\n\t\t\t0.656062,\n\t\t\t0.129412,\n\t\t\t0.839176,\n\t\t\t0.27229,\n\t\t\t0.731807,\n\t\t\t0.254902,\n\t\t\t0.89536,\n\t\t\t0.357594,\n\t\t\t0.797309,\n\t\t\t0.380392,\n\t\t\t0.930238,\n\t\t\t0.457825,\n\t\t\t0.846984,\n\t\t\t0.505882,\n\t\t\t0.945921,\n\t\t\t0.564536,\n\t\t\t0.880571,\n\t\t\t0.631373,\n\t\t\t0.948995,\n\t\t\t0.670753,\n\t\t\t0.902279,\n\t\t\t0.756863,\n\t\t\t0.947124,\n\t\t\t0.772819,\n\t\t\t0.918171,\n\t\t\t0.882353,\n\t\t\t0.947265,\n\t\t\t0.869424,\n\t\t\t0.934352,\n\t\t\t1,\n\t\t\t0.954719,\n\t\t\t0.95475,\n\t\t\t0.954726\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"magenta\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.364706,\n\t\t\t0,\n\t\t\t0.152941,\n\t\t\t-0.74902,\n\t\t\t0.470588,\n\t\t\t0,\n\t\t\t0.254902,\n\t\t\t-0.623529,\n\t\t\t0.572549,\n\t\t\t0,\n\t\t\t0.34902,\n\t\t\t-0.498039,\n\t\t\t0.670588,\n\t\t\t0,\n\t\t\t0.443137,\n\t\t\t-0.372549,\n\t\t\t0.772549,\n\t\t\t0,\n\t\t\t0.537255,\n\t\t\t-0.247059,\n\t\t\t0.870588,\n\t\t\t0,\n\t\t\t0.627451,\n\t\t\t-0.121569,\n\t\t\t0.964706,\n\t\t\t0,\n\t\t\t0.717647,\n\t\t\t0.00392157,\n\t\t\t1,\n\t\t\t0.0784314,\n\t\t\t0.772549,\n\t\t\t0.129412,\n\t\t\t1,\n\t\t\t0.207843,\n\t\t\t0.858824,\n\t\t\t0.254902,\n\t\t\t1,\n\t\t\t0.32549,\n\t\t\t0.941176,\n\t\t\t0.380392,\n\t\t\t1,\n\t\t\t0.45098,\n\t\t\t1,\n\t\t\t0.505882,\n\t\t\t1,\n\t\t\t0.560784,\n\t\t\t1,\n\t\t\t0.631373,\n\t\t\t1,\n\t\t\t0.662745,\n\t\t\t1,\n\t\t\t0.756863,\n\t\t\t1,\n\t\t\t0.760784,\n\t\t\t1,\n\t\t\t0.882353,\n\t\t\t1,\n\t\t\t0.870588,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"RED-PURPLE\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.188235,\n\t\t\t0,\n\t\t\t0.007843,\n\t\t\t-0.74902,\n\t\t\t0.345098,\n\t\t\t0,\n\t\t\t0.035294,\n\t\t\t-0.623529,\n\t\t\t0.439216,\n\t\t\t0,\n\t\t\t0.098039,\n\t\t\t-0.498039,\n\t\t\t0.533333,\n\t\t\t0,\n\t\t\t0.152941,\n\t\t\t-0.372549,\n\t\t\t0.627451,\n\t\t\t0.015686,\n\t\t\t0.211765,\n\t\t\t-0.247059,\n\t\t\t0.721569,\n\t\t\t0.031373,\n\t\t\t0.266667,\n\t\t\t-0.121569,\n\t\t\t0.8,\n\t\t\t0.047059,\n\t\t\t0.329412,\n\t\t\t0.00392157,\n\t\t\t0.862745,\n\t\t\t0.047059,\n\t\t\t0.403922,\n\t\t\t0.129412,\n\t\t\t0.941176,\n\t\t\t0.062745,\n\t\t\t0.466667,\n\t\t\t0.254902,\n\t\t\t0.988235,\n\t\t\t0.078431,\n\t\t\t0.54902,\n\t\t\t0.380392,\n\t\t\t0.988235,\n\t\t\t0.141176,\n\t\t\t0.643137,\n\t\t\t0.505882,\n\t\t\t0.988235,\n\t\t\t0.25098,\n\t\t\t0.729412,\n\t\t\t0.631373,\n\t\t\t0.988235,\n\t\t\t0.376471,\n\t\t\t0.811765,\n\t\t\t0.756863,\n\t\t\t0.988235,\n\t\t\t0.54902,\n\t\t\t0.886275,\n\t\t\t0.882353,\n\t\t\t0.988235,\n\t\t\t0.752941,\n\t\t\t0.952941,\n\t\t\t1,\n\t\t\t0.996078,\n\t\t\t0.996078,\n\t\t\t0.996078\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_red_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.147204,\n\t\t\t0.0480135,\n\t\t\t0.0401815,\n\t\t\t-0.74902,\n\t\t\t0.253411,\n\t\t\t0.0617478,\n\t\t\t0.0301333,\n\t\t\t-0.623529,\n\t\t\t0.356059,\n\t\t\t0.0746331,\n\t\t\t0.0446897,\n\t\t\t-0.498039,\n\t\t\t0.457731,\n\t\t\t0.0934935,\n\t\t\t0.0636931,\n\t\t\t-0.372549,\n\t\t\t0.557199,\n\t\t\t0.122714,\n\t\t\t0.0860013,\n\t\t\t-0.247059,\n\t\t\t0.665179,\n\t\t\t0.144238,\n\t\t\t0.105585,\n\t\t\t-0.121569,\n\t\t\t0.763833,\n\t\t\t0.187056,\n\t\t\t0.138326,\n\t\t\t0.00392157,\n\t\t\t0.847035,\n\t\t\t0.254558,\n\t\t\t0.189407,\n\t\t\t0.129412,\n\t\t\t0.905663,\n\t\t\t0.345937,\n\t\t\t0.258215,\n\t\t\t0.254902,\n\t\t\t0.941431,\n\t\t\t0.447111,\n\t\t\t0.346277,\n\t\t\t0.380392,\n\t\t\t0.962608,\n\t\t\t0.546927,\n\t\t\t0.457571,\n\t\t\t0.505882,\n\t\t\t0.987833,\n\t\t\t0.637276,\n\t\t\t0.569944,\n\t\t\t0.631373,\n\t\t\t0.994202,\n\t\t\t0.732176,\n\t\t\t0.687958,\n\t\t\t0.756863,\n\t\t\t0.993304,\n\t\t\t0.826268,\n\t\t\t0.800567,\n\t\t\t0.882353,\n\t\t\t0.994413,\n\t\t\t0.917205,\n\t\t\t0.906393,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.999979\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"RED_TEMPERATURE\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.090196,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.74902,\n\t\t\t0.180392,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.623529,\n\t\t\t0.270588,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.498039,\n\t\t\t0.360784,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.372549,\n\t\t\t0.45098,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.247059,\n\t\t\t0.545098,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.121569,\n\t\t\t0.635294,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.00392157,\n\t\t\t0.72549,\n\t\t\t0.058824,\n\t\t\t0,\n\t\t\t0.129412,\n\t\t\t0.815686,\n\t\t\t0.176471,\n\t\t\t0,\n\t\t\t0.254902,\n\t\t\t0.905882,\n\t\t\t0.294118,\n\t\t\t0,\n\t\t\t0.380392,\n\t\t\t1,\n\t\t\t0.411765,\n\t\t\t0,\n\t\t\t0.505882,\n\t\t\t1,\n\t\t\t0.533333,\n\t\t\t0.027451,\n\t\t\t0.631373,\n\t\t\t1,\n\t\t\t0.65098,\n\t\t\t0.27451,\n\t\t\t0.756863,\n\t\t\t1,\n\t\t\t0.768627,\n\t\t\t0.521569,\n\t\t\t0.882353,\n\t\t\t1,\n\t\t\t0.886275,\n\t\t\t0.768627,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_orange_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.0000253806,\n\t\t\t-0.87451,\n\t\t\t0.135871,\n\t\t\t0.0593824,\n\t\t\t0,\n\t\t\t-0.74902,\n\t\t\t0.224328,\n\t\t\t0.0907216,\n\t\t\t0,\n\t\t\t-0.623529,\n\t\t\t0.318083,\n\t\t\t0.119647,\n\t\t\t0,\n\t\t\t-0.498039,\n\t\t\t0.414443,\n\t\t\t0.150246,\n\t\t\t0,\n\t\t\t-0.372549,\n\t\t\t0.511077,\n\t\t\t0.184884,\n\t\t\t0,\n\t\t\t-0.247059,\n\t\t\t0.605501,\n\t\t\t0.226033,\n\t\t\t0,\n\t\t\t-0.121569,\n\t\t\t0.695274,\n\t\t\t0.275491,\n\t\t\t0,\n\t\t\t0.00392157,\n\t\t\t0.777826,\n\t\t\t0.334445,\n\t\t\t0,\n\t\t\t0.129412,\n\t\t\t0.851498,\n\t\t\t0.402441,\n\t\t\t0,\n\t\t\t0.254902,\n\t\t\t0.915899,\n\t\t\t0.47759,\n\t\t\t0.000602975,\n\t\t\t0.380392,\n\t\t\t0.971984,\n\t\t\t0.557882,\n\t\t\t0.0361443,\n\t\t\t0.505882,\n\t\t\t1,\n\t\t\t0.641287,\n\t\t\t0.135967,\n\t\t\t0.631373,\n\t\t\t1,\n\t\t\t0.725198,\n\t\t\t0.27997,\n\t\t\t0.756863,\n\t\t\t1,\n\t\t\t0.808205,\n\t\t\t0.438135,\n\t\t\t0.882353,\n\t\t\t1,\n\t\t\t0.89306,\n\t\t\t0.587036,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.977928,\n\t\t\t0.721599\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"heated_object\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.34902,\n\t\t\t0.0862745,\n\t\t\t0,\n\t\t\t-0.74902,\n\t\t\t0.45098,\n\t\t\t0.172549,\n\t\t\t0,\n\t\t\t-0.623529,\n\t\t\t0.52549,\n\t\t\t0.231373,\n\t\t\t0,\n\t\t\t-0.498039,\n\t\t\t0.580392,\n\t\t\t0.278431,\n\t\t\t0,\n\t\t\t-0.372549,\n\t\t\t0.623529,\n\t\t\t0.313725,\n\t\t\t0,\n\t\t\t-0.247059,\n\t\t\t0.670588,\n\t\t\t0.352941,\n\t\t\t0,\n\t\t\t-0.121569,\n\t\t\t0.717647,\n\t\t\t0.392157,\n\t\t\t0,\n\t\t\t0.00392157,\n\t\t\t0.772549,\n\t\t\t0.439216,\n\t\t\t0,\n\t\t\t0.129412,\n\t\t\t0.839216,\n\t\t\t0.494118,\n\t\t\t0,\n\t\t\t0.254902,\n\t\t\t0.901961,\n\t\t\t0.541176,\n\t\t\t0,\n\t\t\t0.380392,\n\t\t\t0.968627,\n\t\t\t0.6,\n\t\t\t0,\n\t\t\t0.505882,\n\t\t\t1,\n\t\t\t0.658824,\n\t\t\t0,\n\t\t\t0.631373,\n\t\t\t1,\n\t\t\t0.721569,\n\t\t\t0,\n\t\t\t0.756863,\n\t\t\t1,\n\t\t\t0.827451,\n\t\t\t0.298039,\n\t\t\t0.882353,\n\t\t\t1,\n\t\t\t0.976471,\n\t\t\t0.72549,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_gold_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.0000190933,\n\t\t\t-0.87451,\n\t\t\t0.128363,\n\t\t\t0.0636265,\n\t\t\t0,\n\t\t\t-0.74902,\n\t\t\t0.193795,\n\t\t\t0.111057,\n\t\t\t0,\n\t\t\t-0.623529,\n\t\t\t0.25976,\n\t\t\t0.15987,\n\t\t\t0,\n\t\t\t-0.498039,\n\t\t\t0.328546,\n\t\t\t0.210589,\n\t\t\t0,\n\t\t\t-0.372549,\n\t\t\t0.399726,\n\t\t\t0.26332,\n\t\t\t0,\n\t\t\t-0.247059,\n\t\t\t0.472969,\n\t\t\t0.318261,\n\t\t\t0,\n\t\t\t-0.121569,\n\t\t\t0.546245,\n\t\t\t0.375827,\n\t\t\t0,\n\t\t\t0.00392157,\n\t\t\t0.61745,\n\t\t\t0.436719,\n\t\t\t0,\n\t\t\t0.129412,\n\t\t\t0.685545,\n\t\t\t0.501113,\n\t\t\t0,\n\t\t\t0.254902,\n\t\t\t0.749578,\n\t\t\t0.568799,\n\t\t\t0,\n\t\t\t0.380392,\n\t\t\t0.80962,\n\t\t\t0.6394,\n\t\t\t0,\n\t\t\t0.505882,\n\t\t\t0.865572,\n\t\t\t0.712699,\n\t\t\t0.10257,\n\t\t\t0.631373,\n\t\t\t0.917709,\n\t\t\t0.787569,\n\t\t\t0.233665,\n\t\t\t0.756863,\n\t\t\t0.966914,\n\t\t\t0.863138,\n\t\t\t0.369608,\n\t\t\t0.882353,\n\t\t\t1,\n\t\t\t0.939405,\n\t\t\t0.496104,\n\t\t\t1,\n\t\t\t0.999225,\n\t\t\t1,\n\t\t\t0.612275\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_brown_BW\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t3.3216e-7,\n\t\t\t0,\n\t\t\t0.00000483629,\n\t\t\t-0.87451,\n\t\t\t0.14693,\n\t\t\t0.0518172,\n\t\t\t0,\n\t\t\t-0.74902,\n\t\t\t0.225806,\n\t\t\t0.0814996,\n\t\t\t0,\n\t\t\t-0.623529,\n\t\t\t0.301681,\n\t\t\t0.111452,\n\t\t\t0,\n\t\t\t-0.498039,\n\t\t\t0.370487,\n\t\t\t0.150664,\n\t\t\t0,\n\t\t\t-0.372549,\n\t\t\t0.43108,\n\t\t\t0.199477,\n\t\t\t0,\n\t\t\t-0.247059,\n\t\t\t0.4849,\n\t\t\t0.255107,\n\t\t\t0,\n\t\t\t-0.121569,\n\t\t\t0.536798,\n\t\t\t0.313486,\n\t\t\t0,\n\t\t\t0.00392157,\n\t\t\t0.59286,\n\t\t\t0.371167,\n\t\t\t0,\n\t\t\t0.129412,\n\t\t\t0.653119,\n\t\t\t0.428135,\n\t\t\t0,\n\t\t\t0.254902,\n\t\t\t0.714589,\n\t\t\t0.485917,\n\t\t\t0.0379541,\n\t\t\t0.380392,\n\t\t\t0.774667,\n\t\t\t0.54565,\n\t\t\t0.116634,\n\t\t\t0.505882,\n\t\t\t0.831222,\n\t\t\t0.608047,\n\t\t\t0.183895,\n\t\t\t0.631373,\n\t\t\t0.880305,\n\t\t\t0.674199,\n\t\t\t0.260298,\n\t\t\t0.756863,\n\t\t\t0.922314,\n\t\t\t0.742472,\n\t\t\t0.367086,\n\t\t\t0.882353,\n\t\t\t0.959408,\n\t\t\t0.811222,\n\t\t\t0.497258,\n\t\t\t1,\n\t\t\t0.993548,\n\t\t\t0.875183,\n\t\t\t0.622093\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"copper_Matlab\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.0784314,\n\t\t\t0.0501961,\n\t\t\t0.0313725,\n\t\t\t-0.74902,\n\t\t\t0.156863,\n\t\t\t0.100392,\n\t\t\t0.0627451,\n\t\t\t-0.623529,\n\t\t\t0.235294,\n\t\t\t0.150588,\n\t\t\t0.0941176,\n\t\t\t-0.498039,\n\t\t\t0.313725,\n\t\t\t0.200784,\n\t\t\t0.12549,\n\t\t\t-0.372549,\n\t\t\t0.392157,\n\t\t\t0.25098,\n\t\t\t0.156863,\n\t\t\t-0.247059,\n\t\t\t0.470588,\n\t\t\t0.301176,\n\t\t\t0.188235,\n\t\t\t-0.121569,\n\t\t\t0.54902,\n\t\t\t0.351373,\n\t\t\t0.219608,\n\t\t\t0.00392157,\n\t\t\t0.627451,\n\t\t\t0.401569,\n\t\t\t0.25098,\n\t\t\t0.129412,\n\t\t\t0.705882,\n\t\t\t0.451765,\n\t\t\t0.282353,\n\t\t\t0.254902,\n\t\t\t0.784314,\n\t\t\t0.501961,\n\t\t\t0.313725,\n\t\t\t0.380392,\n\t\t\t0.862745,\n\t\t\t0.552157,\n\t\t\t0.345098,\n\t\t\t0.505882,\n\t\t\t0.941176,\n\t\t\t0.602353,\n\t\t\t0.376471,\n\t\t\t0.631373,\n\t\t\t1,\n\t\t\t0.652549,\n\t\t\t0.407843,\n\t\t\t0.756863,\n\t\t\t1,\n\t\t\t0.702745,\n\t\t\t0.439216,\n\t\t\t0.882353,\n\t\t\t1,\n\t\t\t0.752941,\n\t\t\t0.470588,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.8,\n\t\t\t0.5\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"pink_Matlab\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.312416,\n\t\t\t0.204524,\n\t\t\t0.204524,\n\t\t\t-0.74902,\n\t\t\t0.441822,\n\t\t\t0.289241,\n\t\t\t0.289241,\n\t\t\t-0.623529,\n\t\t\t0.54112,\n\t\t\t0.354246,\n\t\t\t0.354246,\n\t\t\t-0.498039,\n\t\t\t0.624831,\n\t\t\t0.409048,\n\t\t\t0.409048,\n\t\t\t-0.372549,\n\t\t\t0.698582,\n\t\t\t0.45733,\n\t\t\t0.45733,\n\t\t\t-0.247059,\n\t\t\t0.764404,\n\t\t\t0.502282,\n\t\t\t0.500979,\n\t\t\t-0.121569,\n\t\t\t0.791292,\n\t\t\t0.591516,\n\t\t\t0.54112,\n\t\t\t0.00392157,\n\t\t\t0.817297,\n\t\t\t0.66895,\n\t\t\t0.578481,\n\t\t\t0.129412,\n\t\t\t0.842499,\n\t\t\t0.738308,\n\t\t\t0.613572,\n\t\t\t0.254902,\n\t\t\t0.866968,\n\t\t\t0.801687,\n\t\t\t0.646762,\n\t\t\t0.380392,\n\t\t\t0.890766,\n\t\t\t0.86041,\n\t\t\t0.678329,\n\t\t\t0.505882,\n\t\t\t0.913944,\n\t\t\t0.913944,\n\t\t\t0.711254,\n\t\t\t0.631373,\n\t\t\t0.936549,\n\t\t\t0.936549,\n\t\t\t0.79459,\n\t\t\t0.756863,\n\t\t\t0.958621,\n\t\t\t0.958621,\n\t\t\t0.869979,\n\t\t\t0.882353,\n\t\t\t0.980196,\n\t\t\t0.980196,\n\t\t\t0.939336,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"bone_Matlab\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.054902,\n\t\t\t0.054902,\n\t\t\t0.075817,\n\t\t\t-0.74902,\n\t\t\t0.109804,\n\t\t\t0.109804,\n\t\t\t0.151634,\n\t\t\t-0.623529,\n\t\t\t0.164706,\n\t\t\t0.164706,\n\t\t\t0.227451,\n\t\t\t-0.498039,\n\t\t\t0.219608,\n\t\t\t0.219608,\n\t\t\t0.303268,\n\t\t\t-0.372549,\n\t\t\t0.27451,\n\t\t\t0.27451,\n\t\t\t0.379085,\n\t\t\t-0.247059,\n\t\t\t0.329412,\n\t\t\t0.329902,\n\t\t\t0.454412,\n\t\t\t-0.121569,\n\t\t\t0.384314,\n\t\t\t0.405719,\n\t\t\t0.509314,\n\t\t\t0.00392157,\n\t\t\t0.439216,\n\t\t\t0.481536,\n\t\t\t0.564216,\n\t\t\t0.129412,\n\t\t\t0.494118,\n\t\t\t0.557353,\n\t\t\t0.619118,\n\t\t\t0.254902,\n\t\t\t0.54902,\n\t\t\t0.63317,\n\t\t\t0.67402,\n\t\t\t0.380392,\n\t\t\t0.603922,\n\t\t\t0.708987,\n\t\t\t0.728922,\n\t\t\t0.505882,\n\t\t\t0.660294,\n\t\t\t0.783824,\n\t\t\t0.783824,\n\t\t\t0.631373,\n\t\t\t0.746569,\n\t\t\t0.838725,\n\t\t\t0.838725,\n\t\t\t0.756863,\n\t\t\t0.832843,\n\t\t\t0.893627,\n\t\t\t0.893627,\n\t\t\t0.882353,\n\t\t\t0.919118,\n\t\t\t0.948529,\n\t\t\t0.948529,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"gray_Matlab\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.0627451,\n\t\t\t0.0627451,\n\t\t\t0.0627451,\n\t\t\t-0.74902,\n\t\t\t0.12549,\n\t\t\t0.12549,\n\t\t\t0.12549,\n\t\t\t-0.623529,\n\t\t\t0.188235,\n\t\t\t0.188235,\n\t\t\t0.188235,\n\t\t\t-0.498039,\n\t\t\t0.25098,\n\t\t\t0.25098,\n\t\t\t0.25098,\n\t\t\t-0.372549,\n\t\t\t0.313725,\n\t\t\t0.313725,\n\t\t\t0.313725,\n\t\t\t-0.247059,\n\t\t\t0.376471,\n\t\t\t0.376471,\n\t\t\t0.376471,\n\t\t\t-0.121569,\n\t\t\t0.439216,\n\t\t\t0.439216,\n\t\t\t0.439216,\n\t\t\t0.00392157,\n\t\t\t0.501961,\n\t\t\t0.501961,\n\t\t\t0.501961,\n\t\t\t0.129412,\n\t\t\t0.564706,\n\t\t\t0.564706,\n\t\t\t0.564706,\n\t\t\t0.254902,\n\t\t\t0.627451,\n\t\t\t0.627451,\n\t\t\t0.627451,\n\t\t\t0.380392,\n\t\t\t0.690196,\n\t\t\t0.690196,\n\t\t\t0.690196,\n\t\t\t0.505882,\n\t\t\t0.752941,\n\t\t\t0.752941,\n\t\t\t0.752941,\n\t\t\t0.631373,\n\t\t\t0.815686,\n\t\t\t0.815686,\n\t\t\t0.815686,\n\t\t\t0.756863,\n\t\t\t0.878431,\n\t\t\t0.878431,\n\t\t\t0.878431,\n\t\t\t0.882353,\n\t\t\t0.941176,\n\t\t\t0.941176,\n\t\t\t0.941176,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"Purples\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.247059,\n\t\t\t0,\n\t\t\t0.490196,\n\t\t\t-0.87451,\n\t\t\t0.288397,\n\t\t\t0.07677,\n\t\t\t0.525629,\n\t\t\t-0.74902,\n\t\t\t0.32975,\n\t\t\t0.153587,\n\t\t\t0.561092,\n\t\t\t-0.623529,\n\t\t\t0.373057,\n\t\t\t0.236263,\n\t\t\t0.600461,\n\t\t\t-0.498039,\n\t\t\t0.416363,\n\t\t\t0.319,\n\t\t\t0.639923,\n\t\t\t-0.372549,\n\t\t\t0.459669,\n\t\t\t0.405613,\n\t\t\t0.685198,\n\t\t\t-0.247059,\n\t\t\t0.503345,\n\t\t\t0.491534,\n\t\t\t0.730058,\n\t\t\t-0.121569,\n\t\t\t0.562399,\n\t\t\t0.54862,\n\t\t\t0.757616,\n\t\t\t0.00392157,\n\t\t\t0.621453,\n\t\t\t0.606075,\n\t\t\t0.785544,\n\t\t\t0.129412,\n\t\t\t0.680508,\n\t\t\t0.674971,\n\t\t\t0.824914,\n\t\t\t0.254902,\n\t\t\t0.739562,\n\t\t\t0.743406,\n\t\t\t0.863899,\n\t\t\t0.380392,\n\t\t\t0.798616,\n\t\t\t0.800492,\n\t\t\t0.893426,\n\t\t\t0.505882,\n\t\t\t0.85684,\n\t\t\t0.856655,\n\t\t\t0.922491,\n\t\t\t0.631373,\n\t\t\t0.898178,\n\t\t\t0.894056,\n\t\t\t0.942176,\n\t\t\t0.756863,\n\t\t\t0.938654,\n\t\t\t0.930919,\n\t\t\t0.961646,\n\t\t\t0.882353,\n\t\t\t0.964245,\n\t\t\t0.958478,\n\t\t\t0.977393,\n\t\t\t1,\n\t\t\t0.988235,\n\t\t\t0.984314,\n\t\t\t0.992157\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"Blues\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.031373,\n\t\t\t0.188235,\n\t\t\t0.419608,\n\t\t\t-0.87451,\n\t\t\t0.031373,\n\t\t\t0.253195,\n\t\t\t0.516063,\n\t\t\t-0.74902,\n\t\t\t0.031757,\n\t\t\t0.318139,\n\t\t\t0.612149,\n\t\t\t-0.623529,\n\t\t\t0.080969,\n\t\t\t0.38113,\n\t\t\t0.661361,\n\t\t\t-0.498039,\n\t\t\t0.130427,\n\t\t\t0.444152,\n\t\t\t0.710327,\n\t\t\t-0.372549,\n\t\t\t0.195386,\n\t\t\t0.509112,\n\t\t\t0.743791,\n\t\t\t-0.247059,\n\t\t\t0.260715,\n\t\t\t0.573841,\n\t\t\t0.777209,\n\t\t\t-0.121569,\n\t\t\t0.341423,\n\t\t\t0.628958,\n\t\t\t0.808704,\n\t\t\t0.00392157,\n\t\t\t0.422745,\n\t\t\t0.684075,\n\t\t\t0.839892,\n\t\t\t0.129412,\n\t\t\t0.523137,\n\t\t\t0.739193,\n\t\t\t0.861546,\n\t\t\t0.254902,\n\t\t\t0.622684,\n\t\t\t0.793464,\n\t\t\t0.883429,\n\t\t\t0.380392,\n\t\t\t0.701423,\n\t\t\t0.826928,\n\t\t\t0.910988,\n\t\t\t0.505882,\n\t\t\t0.778685,\n\t\t\t0.8603,\n\t\t\t0.937993,\n\t\t\t0.631373,\n\t\t\t0.825928,\n\t\t\t0.891795,\n\t\t\t0.953741,\n\t\t\t0.756863,\n\t\t\t0.87328,\n\t\t\t0.923291,\n\t\t\t0.969489,\n\t\t\t0.882353,\n\t\t\t0.922491,\n\t\t\t0.954787,\n\t\t\t0.985236,\n\t\t\t1,\n\t\t\t0.968627,\n\t\t\t0.984314,\n\t\t\t1\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"Greens\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0.266667,\n\t\t\t0.105882,\n\t\t\t-0.87451,\n\t\t\t0,\n\t\t\t0.347374,\n\t\t\t0.139346,\n\t\t\t-0.74902,\n\t\t\t0.000538,\n\t\t\t0.427912,\n\t\t\t0.172933,\n\t\t\t-0.623529,\n\t\t\t0.069435,\n\t\t\t0.486967,\n\t\t\t0.222145,\n\t\t\t-0.498039,\n\t\t\t0.138178,\n\t\t\t0.546082,\n\t\t\t0.271326,\n\t\t\t-0.372549,\n\t\t\t0.197232,\n\t\t\t0.609073,\n\t\t\t0.31857,\n\t\t\t-0.247059,\n\t\t\t0.257255,\n\t\t\t0.671742,\n\t\t\t0.365859,\n\t\t\t-0.121569,\n\t\t\t0.357647,\n\t\t\t0.720953,\n\t\t\t0.415071,\n\t\t\t0.00392157,\n\t\t\t0.45767,\n\t\t\t0.769919,\n\t\t\t0.465021,\n\t\t\t0.129412,\n\t\t\t0.546251,\n\t\t\t0.811257,\n\t\t\t0.537855,\n\t\t\t0.254902,\n\t\t\t0.634295,\n\t\t\t0.852211,\n\t\t\t0.610688,\n\t\t\t0.380392,\n\t\t\t0.709097,\n\t\t\t0.883706,\n\t\t\t0.683522,\n\t\t\t0.505882,\n\t\t\t0.78316,\n\t\t\t0.914833,\n\t\t\t0.755894,\n\t\t\t0.631373,\n\t\t\t0.842215,\n\t\t\t0.938454,\n\t\t\t0.818885,\n\t\t\t0.756863,\n\t\t\t0.899977,\n\t\t\t0.961538,\n\t\t\t0.880692,\n\t\t\t0.882353,\n\t\t\t0.935409,\n\t\t\t0.975317,\n\t\t\t0.92203,\n\t\t\t1,\n\t\t\t0.968627,\n\t\t\t0.988235,\n\t\t\t0.960784\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"PuBu\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.301961,\n\t\t\t0,\n\t\t\t0.294118,\n\t\t\t-0.87451,\n\t\t\t0.404321,\n\t\t\t0.029527,\n\t\t\t0.390573,\n\t\t\t-0.74902,\n\t\t\t0.50599,\n\t\t\t0.059592,\n\t\t\t0.486782,\n\t\t\t-0.623529,\n\t\t\t0.519769,\n\t\t\t0.158016,\n\t\t\t0.551742,\n\t\t\t-0.498039,\n\t\t\t0.533456,\n\t\t\t0.256194,\n\t\t\t0.616301,\n\t\t\t-0.372549,\n\t\t\t0.54133,\n\t\t\t0.33887,\n\t\t\t0.655671,\n\t\t\t-0.247059,\n\t\t\t0.54902,\n\t\t\t0.421592,\n\t\t\t0.695087,\n\t\t\t-0.121569,\n\t\t\t0.54902,\n\t\t\t0.506236,\n\t\t\t0.736424,\n\t\t\t0.00392157,\n\t\t\t0.550127,\n\t\t\t0.590573,\n\t\t\t0.777701,\n\t\t\t0.129412,\n\t\t\t0.585559,\n\t\t\t0.665375,\n\t\t\t0.81707,\n\t\t\t0.254902,\n\t\t\t0.622145,\n\t\t\t0.739023,\n\t\t\t0.855825,\n\t\t\t0.380392,\n\t\t\t0.687105,\n\t\t\t0.784298,\n\t\t\t0.879446,\n\t\t\t0.505882,\n\t\t\t0.752065,\n\t\t\t0.829758,\n\t\t\t0.903253,\n\t\t\t0.631373,\n\t\t\t0.817024,\n\t\t\t0.87897,\n\t\t\t0.930811,\n\t\t\t0.756863,\n\t\t\t0.880907,\n\t\t\t0.927213,\n\t\t\t0.957832,\n\t\t\t0.882353,\n\t\t\t0.926182,\n\t\t\t0.958708,\n\t\t\t0.975548,\n\t\t\t1,\n\t\t\t0.968627,\n\t\t\t0.988235,\n\t\t\t0.992157\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"BuPu\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.007843,\n\t\t\t0.219608,\n\t\t\t0.345098,\n\t\t\t-0.87451,\n\t\t\t0.01178,\n\t\t\t0.286536,\n\t\t\t0.449427,\n\t\t\t-0.74902,\n\t\t\t0.015702,\n\t\t\t0.35328,\n\t\t\t0.553479,\n\t\t\t-0.623529,\n\t\t\t0.01767,\n\t\t\t0.396586,\n\t\t\t0.622376,\n\t\t\t-0.498039,\n\t\t\t0.021115,\n\t\t\t0.4402,\n\t\t\t0.690688,\n\t\t\t-0.372549,\n\t\t\t0.11757,\n\t\t\t0.503191,\n\t\t\t0.722184,\n\t\t\t-0.247059,\n\t\t\t0.214625,\n\t\t\t0.565859,\n\t\t\t0.753633,\n\t\t\t-0.121569,\n\t\t\t0.336671,\n\t\t\t0.615071,\n\t\t\t0.78316,\n\t\t\t0.00392157,\n\t\t\t0.457978,\n\t\t\t0.663975,\n\t\t\t0.812503,\n\t\t\t0.129412,\n\t\t\t0.556401,\n\t\t\t0.703345,\n\t\t\t0.836125,\n\t\t\t0.254902,\n\t\t\t0.65421,\n\t\t\t0.742714,\n\t\t\t0.859669,\n\t\t\t0.380392,\n\t\t\t0.736886,\n\t\t\t0.782084,\n\t\t\t0.881323,\n\t\t\t0.505882,\n\t\t\t0.81827,\n\t\t\t0.821638,\n\t\t\t0.903068,\n\t\t\t0.631373,\n\t\t\t0.873387,\n\t\t\t0.864944,\n\t\t\t0.92669,\n\t\t\t0.756863,\n\t\t\t0.927536,\n\t\t\t0.907605,\n\t\t\t0.949988,\n\t\t\t0.882353,\n\t\t\t0.964937,\n\t\t\t0.9391,\n\t\t\t0.967705,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.968627,\n\t\t\t0.984314\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"BuGn\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.031373,\n\t\t\t0.25098,\n\t\t\t0.505882,\n\t\t\t-0.87451,\n\t\t\t0.031373,\n\t\t\t0.329719,\n\t\t\t0.590527,\n\t\t\t-0.74902,\n\t\t\t0.031911,\n\t\t\t0.408397,\n\t\t\t0.674787,\n\t\t\t-0.623529,\n\t\t\t0.100807,\n\t\t\t0.479262,\n\t\t\t0.710219,\n\t\t\t-0.498039,\n\t\t\t0.169704,\n\t\t\t0.550219,\n\t\t\t0.745744,\n\t\t\t-0.372549,\n\t\t\t0.238601,\n\t\t\t0.62699,\n\t\t\t0.787082,\n\t\t\t-0.247059,\n\t\t\t0.307958,\n\t\t\t0.703114,\n\t\t\t0.826759,\n\t\t\t-0.121569,\n\t\t\t0.39654,\n\t\t\t0.752326,\n\t\t\t0.797232,\n\t\t\t0.00392157,\n\t\t\t0.485121,\n\t\t\t0.801046,\n\t\t\t0.767705,\n\t\t\t0.129412,\n\t\t\t0.573702,\n\t\t\t0.83451,\n\t\t\t0.738178,\n\t\t\t0.254902,\n\t\t\t0.661592,\n\t\t\t0.867743,\n\t\t\t0.711034,\n\t\t\t0.380392,\n\t\t\t0.732457,\n\t\t\t0.895302,\n\t\t\t0.74253,\n\t\t\t0.505882,\n\t\t\t0.801845,\n\t\t\t0.922307,\n\t\t\t0.774579,\n\t\t\t0.631373,\n\t\t\t0.841215,\n\t\t\t0.938055,\n\t\t\t0.817885,\n\t\t\t0.756863,\n\t\t\t0.880907,\n\t\t\t0.95391,\n\t\t\t0.861084,\n\t\t\t0.882353,\n\t\t\t0.926182,\n\t\t\t0.971626,\n\t\t\t0.902422,\n\t\t\t1,\n\t\t\t0.968627,\n\t\t\t0.988235,\n\t\t\t0.941176\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"GnBu\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0.266667,\n\t\t\t0.105882,\n\t\t\t-0.87451,\n\t\t\t0,\n\t\t\t0.347374,\n\t\t\t0.139346,\n\t\t\t-0.74902,\n\t\t\t0.000538,\n\t\t\t0.427912,\n\t\t\t0.172933,\n\t\t\t-0.623529,\n\t\t\t0.069435,\n\t\t\t0.486967,\n\t\t\t0.222145,\n\t\t\t-0.498039,\n\t\t\t0.138178,\n\t\t\t0.546175,\n\t\t\t0.272095,\n\t\t\t-0.372549,\n\t\t\t0.197232,\n\t\t\t0.615071,\n\t\t\t0.368551,\n\t\t\t-0.247059,\n\t\t\t0.256609,\n\t\t\t0.683276,\n\t\t\t0.464867,\n\t\t\t-0.121569,\n\t\t\t0.329443,\n\t\t\t0.722645,\n\t\t\t0.555417,\n\t\t\t0.00392157,\n\t\t\t0.403137,\n\t\t\t0.762138,\n\t\t\t0.645413,\n\t\t\t0.129412,\n\t\t\t0.503529,\n\t\t\t0.805444,\n\t\t\t0.718247,\n\t\t\t0.254902,\n\t\t\t0.603922,\n\t\t\t0.848597,\n\t\t\t0.790465,\n\t\t\t0.380392,\n\t\t\t0.704314,\n\t\t\t0.887966,\n\t\t\t0.847551,\n\t\t\t0.505882,\n\t\t\t0.802307,\n\t\t\t0.926321,\n\t\t\t0.903714,\n\t\t\t0.631373,\n\t\t\t0.851519,\n\t\t\t0.944037,\n\t\t\t0.941115,\n\t\t\t0.756863,\n\t\t\t0.899977,\n\t\t\t0.961538,\n\t\t\t0.976901,\n\t\t\t0.882353,\n\t\t\t0.935409,\n\t\t\t0.975317,\n\t\t\t0.984775,\n\t\t\t1,\n\t\t\t0.968627,\n\t\t\t0.988235,\n\t\t\t0.992157\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"GnBuPu\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.003922,\n\t\t\t0.27451,\n\t\t\t0.211765,\n\t\t\t-0.87451,\n\t\t\t0.003922,\n\t\t\t0.349312,\n\t\t\t0.280661,\n\t\t\t-0.74902,\n\t\t\t0.003937,\n\t\t\t0.423852,\n\t\t\t0.349773,\n\t\t\t-0.623529,\n\t\t\t0.005905,\n\t\t\t0.46519,\n\t\t\t0.446228,\n\t\t\t-0.498039,\n\t\t\t0.009443,\n\t\t\t0.506344,\n\t\t\t0.542837,\n\t\t\t-0.372549,\n\t\t\t0.111803,\n\t\t\t0.535871,\n\t\t\t0.649135,\n\t\t\t-0.247059,\n\t\t\t0.214025,\n\t\t\t0.565859,\n\t\t\t0.753633,\n\t\t\t-0.121569,\n\t\t\t0.310481,\n\t\t\t0.615071,\n\t\t\t0.78316,\n\t\t\t0.00392157,\n\t\t\t0.407797,\n\t\t\t0.663975,\n\t\t\t0.812503,\n\t\t\t0.129412,\n\t\t\t0.531811,\n\t\t\t0.703345,\n\t\t\t0.836125,\n\t\t\t0.254902,\n\t\t\t0.65421,\n\t\t\t0.742714,\n\t\t\t0.859669,\n\t\t\t0.380392,\n\t\t\t0.736886,\n\t\t\t0.782084,\n\t\t\t0.881323,\n\t\t\t0.505882,\n\t\t\t0.81827,\n\t\t\t0.821176,\n\t\t\t0.902884,\n\t\t\t0.631373,\n\t\t\t0.873387,\n\t\t\t0.854641,\n\t\t\t0.922568,\n\t\t\t0.756863,\n\t\t\t0.927536,\n\t\t\t0.888535,\n\t\t\t0.942361,\n\t\t\t0.882353,\n\t\t\t0.964937,\n\t\t\t0.929873,\n\t\t\t0.964014,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.968627,\n\t\t\t0.984314\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"BuGnYl\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.031373,\n\t\t\t0.113725,\n\t\t\t0.345098,\n\t\t\t-0.87451,\n\t\t\t0.088458,\n\t\t\t0.159,\n\t\t\t0.463206,\n\t\t\t-0.74902,\n\t\t\t0.145052,\n\t\t\t0.204567,\n\t\t\t0.5807,\n\t\t\t-0.623529,\n\t\t\t0.139146,\n\t\t\t0.287243,\n\t\t\t0.620069,\n\t\t\t-0.498039,\n\t\t\t0.13318,\n\t\t\t0.370196,\n\t\t\t0.659562,\n\t\t\t-0.372549,\n\t\t\t0.123337,\n\t\t\t0.470588,\n\t\t\t0.706805,\n\t\t\t-0.247059,\n\t\t\t0.115386,\n\t\t\t0.570335,\n\t\t\t0.753126,\n\t\t\t-0.121569,\n\t\t\t0.186251,\n\t\t\t0.643168,\n\t\t\t0.761,\n\t\t\t0.00392157,\n\t\t\t0.258716,\n\t\t\t0.71514,\n\t\t\t0.768074,\n\t\t\t0.129412,\n\t\t\t0.380761,\n\t\t\t0.760415,\n\t\t\t0.750358,\n\t\t\t0.254902,\n\t\t\t0.503576,\n\t\t\t0.806075,\n\t\t\t0.732795,\n\t\t\t0.380392,\n\t\t\t0.645306,\n\t\t\t0.861192,\n\t\t\t0.719016,\n\t\t\t0.505882,\n\t\t\t0.783899,\n\t\t\t0.91511,\n\t\t\t0.705606,\n\t\t\t0.631373,\n\t\t\t0.858701,\n\t\t\t0.944637,\n\t\t\t0.6997,\n\t\t\t0.756863,\n\t\t\t0.931349,\n\t\t\t0.973303,\n\t\t\t0.698424,\n\t\t\t0.882353,\n\t\t\t0.966782,\n\t\t\t0.987082,\n\t\t\t0.777163,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.85098\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"PuRd\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.286275,\n\t\t\t0,\n\t\t\t0.415686,\n\t\t\t-0.87451,\n\t\t\t0.38273,\n\t\t\t0.001968,\n\t\t\t0.441276,\n\t\t\t-0.74902,\n\t\t\t0.479231,\n\t\t\t0.003922,\n\t\t\t0.466774,\n\t\t\t-0.623529,\n\t\t\t0.581592,\n\t\t\t0.003922,\n\t\t\t0.480554,\n\t\t\t-0.498039,\n\t\t\t0.683799,\n\t\t\t0.00549,\n\t\t\t0.494887,\n\t\t\t-0.372549,\n\t\t\t0.776317,\n\t\t\t0.105882,\n\t\t\t0.544098,\n\t\t\t-0.247059,\n\t\t\t0.867866,\n\t\t\t0.206321,\n\t\t\t0.592618,\n\t\t\t-0.121569,\n\t\t\t0.919047,\n\t\t\t0.308681,\n\t\t\t0.612303,\n\t\t\t0.00392157,\n\t\t\t0.968812,\n\t\t\t0.411226,\n\t\t\t0.632603,\n\t\t\t0.129412,\n\t\t\t0.974717,\n\t\t\t0.519493,\n\t\t\t0.671972,\n\t\t\t0.254902,\n\t\t\t0.980546,\n\t\t\t0.626451,\n\t\t\t0.71065,\n\t\t\t0.380392,\n\t\t\t0.984483,\n\t\t\t0.701253,\n\t\t\t0.732303,\n\t\t\t0.505882,\n\t\t\t0.988328,\n\t\t\t0.77504,\n\t\t\t0.755617,\n\t\t\t0.631373,\n\t\t\t0.990296,\n\t\t\t0.828189,\n\t\t\t0.812703,\n\t\t\t0.756863,\n\t\t\t0.992372,\n\t\t\t0.880907,\n\t\t\t0.869035,\n\t\t\t0.882353,\n\t\t\t0.996309,\n\t\t\t0.926182,\n\t\t\t0.912341,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.968627,\n\t\t\t0.952941\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"RdPu\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.403922,\n\t\t\t0,\n\t\t\t0.121569,\n\t\t\t-0.87451,\n\t\t\t0.500377,\n\t\t\t0,\n\t\t\t0.192434,\n\t\t\t-0.74902,\n\t\t\t0.596909,\n\t\t\t0.000277,\n\t\t\t0.263037,\n\t\t\t-0.623529,\n\t\t\t0.703206,\n\t\t\t0.035709,\n\t\t\t0.300438,\n\t\t\t-0.498039,\n\t\t\t0.808612,\n\t\t\t0.071296,\n\t\t\t0.338854,\n\t\t\t-0.372549,\n\t\t\t0.857824,\n\t\t\t0.116571,\n\t\t\t0.441215,\n\t\t\t-0.247059,\n\t\t\t0.905513,\n\t\t\t0.163552,\n\t\t\t0.54293,\n\t\t\t-0.121569,\n\t\t\t0.889765,\n\t\t\t0.281661,\n\t\t\t0.617732,\n\t\t\t0.00392157,\n\t\t\t0.873156,\n\t\t\t0.39897,\n\t\t\t0.691611,\n\t\t\t0.129412,\n\t\t\t0.82985,\n\t\t\t0.491488,\n\t\t\t0.736886,\n\t\t\t0.254902,\n\t\t\t0.789081,\n\t\t\t0.583237,\n\t\t\t0.781853,\n\t\t\t0.380392,\n\t\t\t0.810734,\n\t\t\t0.656071,\n\t\t\t0.819254,\n\t\t\t0.505882,\n\t\t\t0.833126,\n\t\t\t0.729181,\n\t\t\t0.85684,\n\t\t\t0.631373,\n\t\t\t0.870527,\n\t\t\t0.80792,\n\t\t\t0.898178,\n\t\t\t0.756863,\n\t\t\t0.907605,\n\t\t\t0.884398,\n\t\t\t0.938331,\n\t\t\t0.882353,\n\t\t\t0.9391,\n\t\t\t0.921799,\n\t\t\t0.958016,\n\t\t\t1,\n\t\t\t0.968627,\n\t\t\t0.956863,\n\t\t\t0.976471\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"Oranges\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.498039,\n\t\t\t0.152941,\n\t\t\t0.015686,\n\t\t\t-0.87451,\n\t\t\t0.57481,\n\t\t\t0.182468,\n\t\t\t0.013718,\n\t\t\t-0.74902,\n\t\t\t0.651765,\n\t\t\t0.212042,\n\t\t\t0.011734,\n\t\t\t-0.623529,\n\t\t\t0.752157,\n\t\t\t0.247474,\n\t\t\t0.007797,\n\t\t\t-0.498039,\n\t\t\t0.851719,\n\t\t\t0.283368,\n\t\t\t0.004475,\n\t\t\t-0.372549,\n\t\t\t0.898962,\n\t\t\t0.348328,\n\t\t\t0.039908,\n\t\t\t-0.247059,\n\t\t\t0.945652,\n\t\t\t0.413426,\n\t\t\t0.076401,\n\t\t\t-0.121569,\n\t\t\t0.969273,\n\t\t\t0.484291,\n\t\t\t0.157109,\n\t\t\t0.00392157,\n\t\t\t0.992157,\n\t\t\t0.554971,\n\t\t\t0.238185,\n\t\t\t0.129412,\n\t\t\t0.992157,\n\t\t\t0.619931,\n\t\t\t0.330704,\n\t\t\t0.254902,\n\t\t\t0.992157,\n\t\t\t0.684967,\n\t\t\t0.423837,\n\t\t\t0.380392,\n\t\t\t0.992157,\n\t\t\t0.751895,\n\t\t\t0.532103,\n\t\t\t0.505882,\n\t\t\t0.992249,\n\t\t\t0.817716,\n\t\t\t0.639354,\n\t\t\t0.631373,\n\t\t\t0.994218,\n\t\t\t0.861023,\n\t\t\t0.725967,\n\t\t\t0.756863,\n\t\t\t0.996186,\n\t\t\t0.903576,\n\t\t\t0.810965,\n\t\t\t0.882353,\n\t\t\t0.998155,\n\t\t\t0.933103,\n\t\t\t0.868051,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.960784,\n\t\t\t0.921569\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"Reds\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.403922,\n\t\t\t0,\n\t\t\t0.05098,\n\t\t\t-0.87451,\n\t\t\t0.525967,\n\t\t\t0.029527,\n\t\t\t0.066728,\n\t\t\t-0.74902,\n\t\t\t0.647643,\n\t\t\t0.058962,\n\t\t\t0.082476,\n\t\t\t-0.623529,\n\t\t\t0.722445,\n\t\t\t0.076678,\n\t\t\t0.098224,\n\t\t\t-0.498039,\n\t\t\t0.797186,\n\t\t\t0.095194,\n\t\t\t0.114187,\n\t\t\t-0.372549,\n\t\t\t0.868051,\n\t\t\t0.164091,\n\t\t\t0.143714,\n\t\t\t-0.247059,\n\t\t\t0.937809,\n\t\t\t0.233541,\n\t\t\t0.173933,\n\t\t\t-0.121569,\n\t\t\t0.96143,\n\t\t\t0.326059,\n\t\t\t0.232987,\n\t\t\t0.00392157,\n\t\t\t0.984375,\n\t\t\t0.418147,\n\t\t\t0.292657,\n\t\t\t0.129412,\n\t\t\t0.986344,\n\t\t\t0.496886,\n\t\t\t0.371396,\n\t\t\t0.254902,\n\t\t\t0.988235,\n\t\t\t0.575702,\n\t\t\t0.450673,\n\t\t\t0.380392,\n\t\t\t0.988235,\n\t\t\t0.656409,\n\t\t\t0.543191,\n\t\t\t0.505882,\n\t\t\t0.98842,\n\t\t\t0.736747,\n\t\t\t0.635894,\n\t\t\t0.631373,\n\t\t\t0.992357,\n\t\t\t0.809581,\n\t\t\t0.732349,\n\t\t\t0.756863,\n\t\t\t0.996186,\n\t\t\t0.880692,\n\t\t\t0.826759,\n\t\t\t0.882353,\n\t\t\t0.998155,\n\t\t\t0.92203,\n\t\t\t0.885813,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.960784,\n\t\t\t0.941176\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"RdOr\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.498039,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.87451,\n\t\t\t0.6004,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.74902,\n\t\t\t0.702514,\n\t\t\t0.000738,\n\t\t\t0.000477,\n\t\t\t-0.623529,\n\t\t\t0.773379,\n\t\t\t0.095225,\n\t\t\t0.061499,\n\t\t\t-0.498039,\n\t\t\t0.843875,\n\t\t\t0.189865,\n\t\t\t0.12283,\n\t\t\t-0.372549,\n\t\t\t0.891119,\n\t\t\t0.294195,\n\t\t\t0.203537,\n\t\t\t-0.247059,\n\t\t\t0.937855,\n\t\t\t0.397924,\n\t\t\t0.283137,\n\t\t\t-0.121569,\n\t\t\t0.963445,\n\t\t\t0.476663,\n\t\t\t0.316601,\n\t\t\t0.00392157,\n\t\t\t0.988297,\n\t\t\t0.555771,\n\t\t\t0.351665,\n\t\t\t0.129412,\n\t\t\t0.990265,\n\t\t\t0.646321,\n\t\t\t0.436309,\n\t\t\t0.254902,\n\t\t\t0.992157,\n\t\t\t0.735256,\n\t\t\t0.519646,\n\t\t\t0.380392,\n\t\t\t0.992157,\n\t\t\t0.784468,\n\t\t\t0.570827,\n\t\t\t0.505882,\n\t\t\t0.992249,\n\t\t\t0.833218,\n\t\t\t0.623483,\n\t\t\t0.631373,\n\t\t\t0.994218,\n\t\t\t0.872587,\n\t\t\t0.706159,\n\t\t\t0.756863,\n\t\t\t0.996186,\n\t\t\t0.911419,\n\t\t\t0.788189,\n\t\t\t0.882353,\n\t\t\t0.998155,\n\t\t\t0.940946,\n\t\t\t0.859054,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.968627,\n\t\t\t0.92549\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"BrOrYl\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.4,\n\t\t\t0.145098,\n\t\t\t0.023529,\n\t\t\t-0.87451,\n\t\t\t0.500392,\n\t\t\t0.174625,\n\t\t\t0.019592,\n\t\t\t-0.74902,\n\t\t\t0.600784,\n\t\t\t0.204291,\n\t\t\t0.015656,\n\t\t\t-0.623529,\n\t\t\t0.701176,\n\t\t\t0.251534,\n\t\t\t0.011719,\n\t\t\t-0.498039,\n\t\t\t0.800984,\n\t\t\t0.299146,\n\t\t\t0.008397,\n\t\t\t-0.372549,\n\t\t\t0.863975,\n\t\t\t0.370012,\n\t\t\t0.043829,\n\t\t\t-0.247059,\n\t\t\t0.926321,\n\t\t\t0.441107,\n\t\t\t0.0794,\n\t\t\t-0.121569,\n\t\t\t0.961753,\n\t\t\t0.521815,\n\t\t\t0.120738,\n\t\t\t0.00392157,\n\t\t\t0.996078,\n\t\t\t0.602645,\n\t\t\t0.163122,\n\t\t\t0.129412,\n\t\t\t0.996078,\n\t\t\t0.68729,\n\t\t\t0.237924,\n\t\t\t0.254902,\n\t\t\t0.996078,\n\t\t\t0.771011,\n\t\t\t0.314879,\n\t\t\t0.380392,\n\t\t\t0.996078,\n\t\t\t0.832034,\n\t\t\t0.444798,\n\t\t\t0.505882,\n\t\t\t0.996171,\n\t\t\t0.892042,\n\t\t\t0.572595,\n\t\t\t0.631373,\n\t\t\t0.998139,\n\t\t\t0.931411,\n\t\t\t0.65724,\n\t\t\t0.756863,\n\t\t\t1,\n\t\t\t0.969489,\n\t\t\t0.741669,\n\t\t\t0.882353,\n\t\t\t1,\n\t\t\t0.985236,\n\t\t\t0.822376,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.898039\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"RdOrYl\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.501961,\n\t\t\t0,\n\t\t\t0.14902,\n\t\t\t-0.87451,\n\t\t\t0.622038,\n\t\t\t0,\n\t\t\t0.14902,\n\t\t\t-0.74902,\n\t\t\t0.741761,\n\t\t\t0.0004,\n\t\t\t0.148866,\n\t\t\t-0.623529,\n\t\t\t0.816563,\n\t\t\t0.05158,\n\t\t\t0.129181,\n\t\t\t-0.498039,\n\t\t\t0.890965,\n\t\t\t0.10356,\n\t\t\t0.110235,\n\t\t\t-0.372549,\n\t\t\t0.940177,\n\t\t\t0.205921,\n\t\t\t0.137793,\n\t\t\t-0.247059,\n\t\t\t0.988281,\n\t\t\t0.308789,\n\t\t\t0.165536,\n\t\t\t-0.121569,\n\t\t\t0.99025,\n\t\t\t0.432803,\n\t\t\t0.200969,\n\t\t\t0.00392157,\n\t\t\t0.992218,\n\t\t\t0.555217,\n\t\t\t0.236278,\n\t\t\t0.129412,\n\t\t\t0.994187,\n\t\t\t0.628051,\n\t\t\t0.267774,\n\t\t\t0.254902,\n\t\t\t0.996078,\n\t\t\t0.701038,\n\t\t\t0.301269,\n\t\t\t0.380392,\n\t\t\t0.996078,\n\t\t\t0.777809,\n\t\t\t0.383945,\n\t\t\t0.505882,\n\t\t\t0.996171,\n\t\t\t0.852826,\n\t\t\t0.466621,\n\t\t\t0.631373,\n\t\t\t0.998139,\n\t\t\t0.892195,\n\t\t\t0.549296,\n\t\t\t0.756863,\n\t\t\t1,\n\t\t\t0.931349,\n\t\t\t0.632188,\n\t\t\t0.882353,\n\t\t\t1,\n\t\t\t0.966782,\n\t\t\t0.7188,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.8\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"CIELab_blue2red\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0.6,\n\t\t\t0.74902,\n\t\t\t1,\n\t\t\t0.76863,\n\t\t\t0.46667,\n\t\t\t0.34118\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"blue2yellow\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.5,\n\t\t\t0.5,\n\t\t\t0.5,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_blue2gold\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.175119,\n\t\t\t0.0438468,\n\t\t\t1,\n\t\t\t-0.874016,\n\t\t\t0.22383,\n\t\t\t0.159771,\n\t\t\t0.94557,\n\t\t\t-0.748031,\n\t\t\t0.27254,\n\t\t\t0.233611,\n\t\t\t0.891216,\n\t\t\t-0.622047,\n\t\t\t0.321251,\n\t\t\t0.296526,\n\t\t\t0.836857,\n\t\t\t-0.496063,\n\t\t\t0.369962,\n\t\t\t0.354296,\n\t\t\t0.782359,\n\t\t\t-0.370079,\n\t\t\t0.418672,\n\t\t\t0.409139,\n\t\t\t0.72754,\n\t\t\t-0.244094,\n\t\t\t0.467383,\n\t\t\t0.462152,\n\t\t\t0.672148,\n\t\t\t-0.11811,\n\t\t\t0.51609,\n\t\t\t0.51396,\n\t\t\t0.615825,\n\t\t\t0.00787402,\n\t\t\t0.572863,\n\t\t\t0.55452,\n\t\t\t0.559172,\n\t\t\t0.133858,\n\t\t\t0.630269,\n\t\t\t0.593822,\n\t\t\t0.517729,\n\t\t\t0.259843,\n\t\t\t0.689588,\n\t\t\t0.624668,\n\t\t\t0.47446,\n\t\t\t0.385827,\n\t\t\t0.745394,\n\t\t\t0.656113,\n\t\t\t0.428638,\n\t\t\t0.511811,\n\t\t\t0.798624,\n\t\t\t0.688104,\n\t\t\t0.379105,\n\t\t\t0.637795,\n\t\t\t0.849926,\n\t\t\t0.720593,\n\t\t\t0.323834,\n\t\t\t0.76378,\n\t\t\t0.899765,\n\t\t\t0.753543,\n\t\t\t0.258657,\n\t\t\t0.889764,\n\t\t\t0.948487,\n\t\t\t0.78692,\n\t\t\t0.171778,\n\t\t\t1,\n\t\t\t0.990413,\n\t\t\t0.816451,\n\t\t\t0.00729848\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_blue2yellow\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.0830122,\n\t\t\t0,\n\t\t\t0.495617,\n\t\t\t-0.87451,\n\t\t\t0.141973,\n\t\t\t0.0551288,\n\t\t\t0.57363,\n\t\t\t-0.74902,\n\t\t\t0.193048,\n\t\t\t0.110258,\n\t\t\t0.604561,\n\t\t\t-0.623529,\n\t\t\t0.234231,\n\t\t\t0.165386,\n\t\t\t0.57643,\n\t\t\t-0.498039,\n\t\t\t0.275413,\n\t\t\t0.220515,\n\t\t\t0.548299,\n\t\t\t-0.372549,\n\t\t\t0.316596,\n\t\t\t0.275644,\n\t\t\t0.520169,\n\t\t\t-0.247059,\n\t\t\t0.357778,\n\t\t\t0.330773,\n\t\t\t0.492038,\n\t\t\t-0.121569,\n\t\t\t0.398961,\n\t\t\t0.385901,\n\t\t\t0.463908,\n\t\t\t0.00392157,\n\t\t\t0.449929,\n\t\t\t0.438487,\n\t\t\t0.426815,\n\t\t\t0.129412,\n\t\t\t0.511572,\n\t\t\t0.488299,\n\t\t\t0.379944,\n\t\t\t0.254902,\n\t\t\t0.581222,\n\t\t\t0.53603,\n\t\t\t0.325741,\n\t\t\t0.380392,\n\t\t\t0.650871,\n\t\t\t0.583761,\n\t\t\t0.271538,\n\t\t\t0.505882,\n\t\t\t0.720521,\n\t\t\t0.631493,\n\t\t\t0.217335,\n\t\t\t0.631373,\n\t\t\t0.79017,\n\t\t\t0.679224,\n\t\t\t0.163132,\n\t\t\t0.756863,\n\t\t\t0.85982,\n\t\t\t0.726955,\n\t\t\t0.108929,\n\t\t\t0.882353,\n\t\t\t0.910254,\n\t\t\t0.774159,\n\t\t\t0.14112,\n\t\t\t1,\n\t\t\t0.927513,\n\t\t\t0.81759,\n\t\t\t0.306289\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_cyan2orange\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.0471513,\n\t\t\t0.213874,\n\t\t\t0.414329,\n\t\t\t-0.87451,\n\t\t\t0.0674702,\n\t\t\t0.256648,\n\t\t\t0.439027,\n\t\t\t-0.74902,\n\t\t\t0.0959957,\n\t\t\t0.299331,\n\t\t\t0.462089,\n\t\t\t-0.623529,\n\t\t\t0.132428,\n\t\t\t0.341872,\n\t\t\t0.483212,\n\t\t\t-0.498039,\n\t\t\t0.188743,\n\t\t\t0.38277,\n\t\t\t0.500597,\n\t\t\t-0.372549,\n\t\t\t0.268511,\n\t\t\t0.420229,\n\t\t\t0.512179,\n\t\t\t-0.247059,\n\t\t\t0.352945,\n\t\t\t0.455602,\n\t\t\t0.519101,\n\t\t\t-0.121569,\n\t\t\t0.43893,\n\t\t\t0.489368,\n\t\t\t0.521538,\n\t\t\t0.00392157,\n\t\t\t0.522445,\n\t\t\t0.522495,\n\t\t\t0.522436,\n\t\t\t0.129412,\n\t\t\t0.600089,\n\t\t\t0.555682,\n\t\t\t0.53205,\n\t\t\t0.254902,\n\t\t\t0.67988,\n\t\t\t0.587981,\n\t\t\t0.539163,\n\t\t\t0.380392,\n\t\t\t0.761011,\n\t\t\t0.619586,\n\t\t\t0.544439,\n\t\t\t0.505882,\n\t\t\t0.84278,\n\t\t\t0.650741,\n\t\t\t0.548567,\n\t\t\t0.631373,\n\t\t\t0.910713,\n\t\t\t0.687347,\n\t\t\t0.557822,\n\t\t\t0.756863,\n\t\t\t0.952232,\n\t\t\t0.734972,\n\t\t\t0.577775,\n\t\t\t0.882353,\n\t\t\t0.975642,\n\t\t\t0.789858,\n\t\t\t0.604868,\n\t\t\t1,\n\t\t\t0.990752,\n\t\t\t0.843643,\n\t\t\t0.632857\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_purple2green\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.235006,\n\t\t\t0.0483128,\n\t\t\t0.530899,\n\t\t\t-0.87451,\n\t\t\t0.302968,\n\t\t\t0.108419,\n\t\t\t0.552391,\n\t\t\t-0.74902,\n\t\t\t0.360241,\n\t\t\t0.166059,\n\t\t\t0.569502,\n\t\t\t-0.623529,\n\t\t\t0.406746,\n\t\t\t0.226782,\n\t\t\t0.579373,\n\t\t\t-0.498039,\n\t\t\t0.444073,\n\t\t\t0.28964,\n\t\t\t0.582094,\n\t\t\t-0.372549,\n\t\t\t0.473648,\n\t\t\t0.353774,\n\t\t\t0.577947,\n\t\t\t-0.247059,\n\t\t\t0.497636,\n\t\t\t0.418154,\n\t\t\t0.567911,\n\t\t\t-0.121569,\n\t\t\t0.519086,\n\t\t\t0.481741,\n\t\t\t0.553968,\n\t\t\t0.00392157,\n\t\t\t0.542884,\n\t\t\t0.542914,\n\t\t\t0.542875,\n\t\t\t0.129412,\n\t\t\t0.566303,\n\t\t\t0.603989,\n\t\t\t0.527499,\n\t\t\t0.254902,\n\t\t\t0.595218,\n\t\t\t0.662965,\n\t\t\t0.516857,\n\t\t\t0.380392,\n\t\t\t0.628641,\n\t\t\t0.720701,\n\t\t\t0.510673,\n\t\t\t0.505882,\n\t\t\t0.665373,\n\t\t\t0.777849,\n\t\t\t0.508165,\n\t\t\t0.631373,\n\t\t\t0.704182,\n\t\t\t0.834921,\n\t\t\t0.508303,\n\t\t\t0.756863,\n\t\t\t0.743846,\n\t\t\t0.892328,\n\t\t\t0.50999,\n\t\t\t0.882353,\n\t\t\t0.783158,\n\t\t\t0.950422,\n\t\t\t0.512181,\n\t\t\t1,\n\t\t\t0.818617,\n\t\t\t1,\n\t\t\t0.513888\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_purple2green_dark\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.107656,\n\t\t\t0,\n\t\t\t0.428682,\n\t\t\t-0.87451,\n\t\t\t0.1924,\n\t\t\t0,\n\t\t\t0.449799,\n\t\t\t-0.74902,\n\t\t\t0.255118,\n\t\t\t0.0648939,\n\t\t\t0.466726,\n\t\t\t-0.623529,\n\t\t\t0.304256,\n\t\t\t0.133066,\n\t\t\t0.476703,\n\t\t\t-0.498039,\n\t\t\t0.343202,\n\t\t\t0.19716,\n\t\t\t0.479793,\n\t\t\t-0.372549,\n\t\t\t0.373876,\n\t\t\t0.260353,\n\t\t\t0.476241,\n\t\t\t-0.247059,\n\t\t\t0.398497,\n\t\t\t0.322872,\n\t\t\t0.466953,\n\t\t\t-0.121569,\n\t\t\t0.420016,\n\t\t\t0.384252,\n\t\t\t0.453785,\n\t\t\t0.00392157,\n\t\t\t0.44319,\n\t\t\t0.443216,\n\t\t\t0.443186,\n\t\t\t0.129412,\n\t\t\t0.465553,\n\t\t\t0.502139,\n\t\t\t0.428233,\n\t\t\t0.254902,\n\t\t\t0.492959,\n\t\t\t0.559151,\n\t\t\t0.417591,\n\t\t\t0.380392,\n\t\t\t0.524654,\n\t\t\t0.615092,\n\t\t\t0.411016,\n\t\t\t0.505882,\n\t\t\t0.55959,\n\t\t\t0.670583,\n\t\t\t0.40779,\n\t\t\t0.631373,\n\t\t\t0.596614,\n\t\t\t0.726102,\n\t\t\t0.406948,\n\t\t\t0.756863,\n\t\t\t0.634544,\n\t\t\t0.782032,\n\t\t\t0.407439,\n\t\t\t0.882353,\n\t\t\t0.672183,\n\t\t\t0.838703,\n\t\t\t0.408237,\n\t\t\t1,\n\t\t\t0.706131,\n\t\t\t0.892759,\n\t\t\t0.408452\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"coolwarm\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.229806,\n\t\t\t0.298718,\n\t\t\t0.753683,\n\t\t\t-0.875,\n\t\t\t0.303869,\n\t\t\t0.406535,\n\t\t\t0.844959,\n\t\t\t-0.75,\n\t\t\t0.383013,\n\t\t\t0.509419,\n\t\t\t0.917388,\n\t\t\t-0.625,\n\t\t\t0.466667,\n\t\t\t0.604563,\n\t\t\t0.968155,\n\t\t\t-0.5,\n\t\t\t0.552953,\n\t\t\t0.688929,\n\t\t\t0.995376,\n\t\t\t-0.375,\n\t\t\t0.639176,\n\t\t\t0.7596,\n\t\t\t0.998151,\n\t\t\t-0.25,\n\t\t\t0.722193,\n\t\t\t0.813953,\n\t\t\t0.976575,\n\t\t\t-0.125,\n\t\t\t0.798692,\n\t\t\t0.849786,\n\t\t\t0.931689,\n\t\t\t0,\n\t\t\t0.865395,\n\t\t\t0.86541,\n\t\t\t0.865396,\n\t\t\t0.125,\n\t\t\t0.924128,\n\t\t\t0.827385,\n\t\t\t0.774508,\n\t\t\t0.25,\n\t\t\t0.958853,\n\t\t\t0.769768,\n\t\t\t0.678008,\n\t\t\t0.375,\n\t\t\t0.969954,\n\t\t\t0.694267,\n\t\t\t0.579375,\n\t\t\t0.5,\n\t\t\t0.958003,\n\t\t\t0.602842,\n\t\t\t0.481776,\n\t\t\t0.625,\n\t\t\t0.923945,\n\t\t\t0.497309,\n\t\t\t0.38797,\n\t\t\t0.75,\n\t\t\t0.869187,\n\t\t\t0.378313,\n\t\t\t0.300267,\n\t\t\t0.875,\n\t\t\t0.795632,\n\t\t\t0.241284,\n\t\t\t0.220526,\n\t\t\t1,\n\t\t\t0.705673,\n\t\t\t0.0155562,\n\t\t\t0.150233\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"BuRd\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.019608,\n\t\t\t0.188235,\n\t\t\t0.380392,\n\t\t\t-0.87451,\n\t\t\t0.088504,\n\t\t\t0.321107,\n\t\t\t0.564937,\n\t\t\t-0.74902,\n\t\t\t0.163399,\n\t\t\t0.444983,\n\t\t\t0.697501,\n\t\t\t-0.623529,\n\t\t\t0.247059,\n\t\t\t0.555709,\n\t\t\t0.754095,\n\t\t\t-0.498039,\n\t\t\t0.420684,\n\t\t\t0.676432,\n\t\t\t0.818685,\n\t\t\t-0.372549,\n\t\t\t0.606459,\n\t\t\t0.789773,\n\t\t\t0.880277,\n\t\t\t-0.247059,\n\t\t\t0.761476,\n\t\t\t0.868512,\n\t\t\t0.924567,\n\t\t\t-0.121569,\n\t\t\t0.878047,\n\t\t\t0.925721,\n\t\t\t0.951942,\n\t\t\t0.00392157,\n\t\t\t0.969089,\n\t\t\t0.966474,\n\t\t\t0.964937,\n\t\t\t0.129412,\n\t\t\t0.983852,\n\t\t\t0.897578,\n\t\t\t0.846828,\n\t\t\t0.254902,\n\t\t\t0.982468,\n\t\t\t0.800692,\n\t\t\t0.706113,\n\t\t\t0.380392,\n\t\t\t0.960323,\n\t\t\t0.66782,\n\t\t\t0.536332,\n\t\t\t0.505882,\n\t\t\t0.894579,\n\t\t\t0.503806,\n\t\t\t0.399769,\n\t\t\t0.631373,\n\t\t\t0.81707,\n\t\t\t0.33218,\n\t\t\t0.281046,\n\t\t\t0.756863,\n\t\t\t0.728489,\n\t\t\t0.155017,\n\t\t\t0.197386,\n\t\t\t0.882353,\n\t\t\t0.576932,\n\t\t\t0.055363,\n\t\t\t0.14925,\n\t\t\t1,\n\t\t\t0.403922,\n\t\t\t0,\n\t\t\t0.121569\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"Spectral_lowBlue\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.368627,\n\t\t\t0.309804,\n\t\t\t0.635294,\n\t\t\t-0.87451,\n\t\t\t0.260361,\n\t\t\t0.450058,\n\t\t\t0.70173,\n\t\t\t-0.74902,\n\t\t\t0.248058,\n\t\t\t0.591311,\n\t\t\t0.717186,\n\t\t\t-0.623529,\n\t\t\t0.376009,\n\t\t\t0.734025,\n\t\t\t0.658132,\n\t\t\t-0.498039,\n\t\t\t0.537947,\n\t\t\t0.814764,\n\t\t\t0.64506,\n\t\t\t-0.372549,\n\t\t\t0.702345,\n\t\t\t0.879585,\n\t\t\t0.636678,\n\t\t\t-0.247059,\n\t\t\t0.84752,\n\t\t\t0.938639,\n\t\t\t0.607151,\n\t\t\t-0.121569,\n\t\t\t0.940408,\n\t\t\t0.976163,\n\t\t\t0.656055,\n\t\t\t0.00392157,\n\t\t\t0.999923,\n\t\t\t0.997616,\n\t\t\t0.745021,\n\t\t\t0.129412,\n\t\t\t0.997463,\n\t\t\t0.921338,\n\t\t\t0.61707,\n\t\t\t0.254902,\n\t\t\t0.995002,\n\t\t\t0.824606,\n\t\t\t0.499885,\n\t\t\t0.380392,\n\t\t\t0.992541,\n\t\t\t0.701576,\n\t\t\t0.39654,\n\t\t\t0.505882,\n\t\t\t0.973472,\n\t\t\t0.547405,\n\t\t\t0.318108,\n\t\t\t0.631373,\n\t\t\t0.937793,\n\t\t\t0.398539,\n\t\t\t0.270127,\n\t\t\t0.756863,\n\t\t\t0.861515,\n\t\t\t0.282891,\n\t\t\t0.299654,\n\t\t\t0.882353,\n\t\t\t0.746482,\n\t\t\t0.144637,\n\t\t\t0.288812,\n\t\t\t1,\n\t\t\t0.619608,\n\t\t\t0.003922,\n\t\t\t0.258824\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"GnRP\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0.266667,\n\t\t\t0.105882,\n\t\t\t-0.87451,\n\t\t\t0.066436,\n\t\t\t0.394617,\n\t\t\t0.174779,\n\t\t\t-0.74902,\n\t\t\t0.168858,\n\t\t\t0.524567,\n\t\t\t0.25767,\n\t\t\t-0.623529,\n\t\t\t0.323875,\n\t\t\t0.657439,\n\t\t\t0.361015,\n\t\t\t-0.498039,\n\t\t\t0.504883,\n\t\t\t0.772318,\n\t\t\t0.506344,\n\t\t\t-0.372549,\n\t\t\t0.678431,\n\t\t\t0.870127,\n\t\t\t0.654902,\n\t\t\t-0.247059,\n\t\t\t0.803922,\n\t\t\t0.921799,\n\t\t\t0.780392,\n\t\t\t-0.121569,\n\t\t\t0.897116,\n\t\t\t0.951942,\n\t\t\t0.882814,\n\t\t\t0.00392157,\n\t\t\t0.967397,\n\t\t\t0.965936,\n\t\t\t0.967474,\n\t\t\t0.129412,\n\t\t\t0.928028,\n\t\t\t0.879815,\n\t\t\t0.930565,\n\t\t\t0.254902,\n\t\t\t0.866052,\n\t\t\t0.780777,\n\t\t\t0.882891,\n\t\t\t0.380392,\n\t\t\t0.77501,\n\t\t\t0.665129,\n\t\t\t0.821376,\n\t\t\t0.505882,\n\t\t\t0.675663,\n\t\t\t0.537024,\n\t\t\t0.737024,\n\t\t\t0.631373,\n\t\t\t0.57847,\n\t\t\t0.396155,\n\t\t\t0.645982,\n\t\t\t0.756863,\n\t\t\t0.492349,\n\t\t\t0.223914,\n\t\t\t0.547559,\n\t\t\t0.882353,\n\t\t\t0.375548,\n\t\t\t0.096886,\n\t\t\t0.423299,\n\t\t\t1,\n\t\t\t0.25098,\n\t\t\t0,\n\t\t\t0.294118\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"GYPi\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.152941,\n\t\t\t0.392157,\n\t\t\t0.098039,\n\t\t\t-0.87451,\n\t\t\t0.246444,\n\t\t\t0.505344,\n\t\t\t0.117724,\n\t\t\t-0.74902,\n\t\t\t0.351942,\n\t\t\t0.614533,\n\t\t\t0.161399,\n\t\t\t-0.623529,\n\t\t\t0.474971,\n\t\t\t0.717878,\n\t\t\t0.240138,\n\t\t\t-0.498039,\n\t\t\t0.611995,\n\t\t\t0.811226,\n\t\t\t0.392849,\n\t\t\t-0.372549,\n\t\t\t0.746328,\n\t\t\t0.893118,\n\t\t\t0.565321,\n\t\t\t-0.247059,\n\t\t\t0.859516,\n\t\t\t0.94233,\n\t\t\t0.747405,\n\t\t\t-0.121569,\n\t\t\t0.928105,\n\t\t\t0.96386,\n\t\t\t0.875663,\n\t\t\t0.00392157,\n\t\t\t0.969089,\n\t\t\t0.966859,\n\t\t\t0.968012,\n\t\t\t0.129412,\n\t\t\t0.983852,\n\t\t\t0.910265,\n\t\t\t0.948328,\n\t\t\t0.254902,\n\t\t\t0.979239,\n\t\t\t0.833218,\n\t\t\t0.914648,\n\t\t\t0.380392,\n\t\t\t0.949712,\n\t\t\t0.729873,\n\t\t\t0.862976,\n\t\t\t0.505882,\n\t\t\t0.905652,\n\t\t\t0.58293,\n\t\t\t0.763552,\n\t\t\t0.631373,\n\t\t\t0.85521,\n\t\t\t0.410073,\n\t\t\t0.652211,\n\t\t\t0.756863,\n\t\t\t0.793695,\n\t\t\t0.183699,\n\t\t\t0.531642,\n\t\t\t0.882353,\n\t\t\t0.683737,\n\t\t\t0.063899,\n\t\t\t0.420761,\n\t\t\t1,\n\t\t\t0.556863,\n\t\t\t0.003922,\n\t\t\t0.321569\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"GnYlRd\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0.407843,\n\t\t\t0.215686,\n\t\t\t-0.87451,\n\t\t\t0.063975,\n\t\t\t0.525952,\n\t\t\t0.277201,\n\t\t\t-0.74902,\n\t\t\t0.177932,\n\t\t\t0.633064,\n\t\t\t0.332718,\n\t\t\t-0.623529,\n\t\t\t0.364937,\n\t\t\t0.724106,\n\t\t\t0.379469,\n\t\t\t-0.498039,\n\t\t\t0.527951,\n\t\t\t0.797155,\n\t\t\t0.40223,\n\t\t\t-0.372549,\n\t\t\t0.678431,\n\t\t\t0.862822,\n\t\t\t0.433449,\n\t\t\t-0.247059,\n\t\t\t0.803922,\n\t\t\t0.916955,\n\t\t\t0.514648,\n\t\t\t-0.121569,\n\t\t\t0.909419,\n\t\t\t0.961861,\n\t\t\t0.625067,\n\t\t\t0.00392157,\n\t\t\t0.999923,\n\t\t\t0.997616,\n\t\t\t0.745021,\n\t\t\t0.129412,\n\t\t\t0.997463,\n\t\t\t0.921338,\n\t\t\t0.61707,\n\t\t\t0.254902,\n\t\t\t0.995002,\n\t\t\t0.824606,\n\t\t\t0.499885,\n\t\t\t0.380392,\n\t\t\t0.992541,\n\t\t\t0.701576,\n\t\t\t0.39654,\n\t\t\t0.505882,\n\t\t\t0.973472,\n\t\t\t0.547405,\n\t\t\t0.318108,\n\t\t\t0.631373,\n\t\t\t0.939023,\n\t\t\t0.389927,\n\t\t\t0.245521,\n\t\t\t0.756863,\n\t\t\t0.867666,\n\t\t\t0.239831,\n\t\t\t0.176624,\n\t\t\t0.882353,\n\t\t\t0.762399,\n\t\t\t0.110727,\n\t\t\t0.151326,\n\t\t\t1,\n\t\t\t0.647059,\n\t\t\t0,\n\t\t\t0.14902\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"GBBr\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0,\n\t\t\t0.235294,\n\t\t\t0.188235,\n\t\t\t-0.87451,\n\t\t\t0.002461,\n\t\t\t0.338639,\n\t\t\t0.301423,\n\t\t\t-0.74902,\n\t\t\t0.055902,\n\t\t\t0.448981,\n\t\t\t0.417609,\n\t\t\t-0.623529,\n\t\t\t0.183852,\n\t\t\t0.56955,\n\t\t\t0.538178,\n\t\t\t-0.498039,\n\t\t\t0.357785,\n\t\t\t0.700115,\n\t\t\t0.660746,\n\t\t\t-0.372549,\n\t\t\t0.540177,\n\t\t\t0.819531,\n\t\t\t0.77624,\n\t\t\t-0.247059,\n\t\t\t0.714879,\n\t\t\t0.890888,\n\t\t\t0.864821,\n\t\t\t-0.121569,\n\t\t\t0.851134,\n\t\t\t0.934564,\n\t\t\t0.922645,\n\t\t\t0.00392157,\n\t\t\t0.960861,\n\t\t\t0.959785,\n\t\t\t0.95694,\n\t\t\t0.129412,\n\t\t\t0.963322,\n\t\t\t0.927797,\n\t\t\t0.83391,\n\t\t\t0.254902,\n\t\t\t0.939946,\n\t\t\t0.868897,\n\t\t\t0.68935,\n\t\t\t0.380392,\n\t\t\t0.883353,\n\t\t\t0.775394,\n\t\t\t0.517109,\n\t\t\t0.505882,\n\t\t\t0.808074,\n\t\t\t0.625836,\n\t\t\t0.324106,\n\t\t\t0.631373,\n\t\t\t0.717647,\n\t\t\t0.476355,\n\t\t\t0.15494,\n\t\t\t0.756863,\n\t\t\t0.592157,\n\t\t\t0.358247,\n\t\t\t0.06882,\n\t\t\t0.882353,\n\t\t\t0.458593,\n\t\t\t0.26436,\n\t\t\t0.031142,\n\t\t\t1,\n\t\t\t0.329412,\n\t\t\t0.188235,\n\t\t\t0.019608\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"PuOr\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.498039,\n\t\t\t0.231373,\n\t\t\t0.031373,\n\t\t\t-0.87451,\n\t\t\t0.62599,\n\t\t\t0.30273,\n\t\t\t0.026451,\n\t\t\t-0.74902,\n\t\t\t0.746943,\n\t\t\t0.387082,\n\t\t\t0.037524,\n\t\t\t-0.623529,\n\t\t\t0.85767,\n\t\t\t0.490427,\n\t\t\t0.071972,\n\t\t\t-0.498039,\n\t\t\t0.936409,\n\t\t\t0.617762,\n\t\t\t0.236371,\n\t\t\t-0.372549,\n\t\t\t0.992695,\n\t\t\t0.743099,\n\t\t\t0.43291,\n\t\t\t-0.247059,\n\t\t\t0.995156,\n\t\t\t0.841523,\n\t\t\t0.63714,\n\t\t\t-0.121569,\n\t\t\t0.985313,\n\t\t\t0.913802,\n\t\t\t0.813687,\n\t\t\t0.00392157,\n\t\t\t0.966244,\n\t\t\t0.966398,\n\t\t\t0.967705,\n\t\t\t0.129412,\n\t\t\t0.889965,\n\t\t\t0.89504,\n\t\t\t0.938178,\n\t\t\t0.254902,\n\t\t\t0.806151,\n\t\t\t0.804306,\n\t\t\t0.894656,\n\t\t\t0.380392,\n\t\t\t0.712649,\n\t\t\t0.688658,\n\t\t\t0.833141,\n\t\t\t0.505882,\n\t\t\t0.594233,\n\t\t\t0.554325,\n\t\t\t0.744637,\n\t\t\t0.631373,\n\t\t\t0.474894,\n\t\t\t0.404229,\n\t\t\t0.652364,\n\t\t\t0.756863,\n\t\t\t0.366628,\n\t\t\t0.217224,\n\t\t\t0.563783,\n\t\t\t0.882353,\n\t\t\t0.266436,\n\t\t\t0.089965,\n\t\t\t0.434833,\n\t\t\t1,\n\t\t\t0.176471,\n\t\t\t0,\n\t\t\t0.294118\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"PRGn\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.25098,\n\t\t\t0,\n\t\t\t0.294118,\n\t\t\t-0.87451,\n\t\t\t0.383852,\n\t\t\t0.103345,\n\t\t\t0.431911,\n\t\t\t-0.74902,\n\t\t\t0.497732,\n\t\t\t0.234679,\n\t\t\t0.55371,\n\t\t\t-0.623529,\n\t\t\t0.583852,\n\t\t\t0.40692,\n\t\t\t0.652134,\n\t\t\t-0.498039,\n\t\t\t0.681968,\n\t\t\t0.545175,\n\t\t\t0.742561,\n\t\t\t-0.372549,\n\t\t\t0.7807,\n\t\t\t0.672357,\n\t\t\t0.825221,\n\t\t\t-0.247059,\n\t\t\t0.871742,\n\t\t\t0.788005,\n\t\t\t0.886736,\n\t\t\t-0.121569,\n\t\t\t0.930488,\n\t\t\t0.885198,\n\t\t\t0.932872,\n\t\t\t0.00392157,\n\t\t\t0.966321,\n\t\t\t0.968089,\n\t\t\t0.965859,\n\t\t\t0.129412,\n\t\t\t0.892503,\n\t\t\t0.950865,\n\t\t\t0.877278,\n\t\t\t0.254902,\n\t\t\t0.796078,\n\t\t\t0.91857,\n\t\t\t0.772549,\n\t\t\t0.380392,\n\t\t\t0.670588,\n\t\t\t0.866897,\n\t\t\t0.647059,\n\t\t\t0.505882,\n\t\t\t0.493195,\n\t\t\t0.765398,\n\t\t\t0.496655,\n\t\t\t0.631373,\n\t\t\t0.314187,\n\t\t\t0.649135,\n\t\t\t0.354556,\n\t\t\t0.756863,\n\t\t\t0.15917,\n\t\t\t0.516263,\n\t\t\t0.251211,\n\t\t\t0.882353,\n\t\t\t0.062284,\n\t\t\t0.386621,\n\t\t\t0.170473,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.266667,\n\t\t\t0.105882\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"PiYG\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.556863,\n\t\t\t0.003922,\n\t\t\t0.321569,\n\t\t\t-0.87451,\n\t\t\t0.692195,\n\t\t\t0.067897,\n\t\t\t0.427374,\n\t\t\t-0.74902,\n\t\t\t0.797539,\n\t\t\t0.197847,\n\t\t\t0.539177,\n\t\t\t-0.623529,\n\t\t\t0.859054,\n\t\t\t0.424221,\n\t\t\t0.659746,\n\t\t\t-0.498039,\n\t\t\t0.908574,\n\t\t\t0.592618,\n\t\t\t0.770319,\n\t\t\t-0.372549,\n\t\t\t0.951557,\n\t\t\t0.736332,\n\t\t\t0.866205,\n\t\t\t-0.247059,\n\t\t\t0.981084,\n\t\t\t0.839677,\n\t\t\t0.917878,\n\t\t\t-0.121569,\n\t\t\t0.98293,\n\t\t\t0.913802,\n\t\t\t0.949558,\n\t\t\t0.00392157,\n\t\t\t0.96732,\n\t\t\t0.968474,\n\t\t\t0.965629,\n\t\t\t0.129412,\n\t\t\t0.92549,\n\t\t\t0.963552,\n\t\t\t0.869666,\n\t\t\t0.254902,\n\t\t\t0.852441,\n\t\t\t0.939254,\n\t\t\t0.736025,\n\t\t\t0.380392,\n\t\t\t0.739254,\n\t\t\t0.890042,\n\t\t\t0.553941,\n\t\t\t0.505882,\n\t\t\t0.60323,\n\t\t\t0.805536,\n\t\t\t0.382238,\n\t\t\t0.631373,\n\t\t\t0.467282,\n\t\t\t0.711419,\n\t\t\t0.235217,\n\t\t\t0.756863,\n\t\t\t0.344252,\n\t\t\t0.608074,\n\t\t\t0.156478,\n\t\t\t0.882353,\n\t\t\t0.2406,\n\t\t\t0.49827,\n\t\t\t0.116494,\n\t\t\t1,\n\t\t\t0.152941,\n\t\t\t0.392157,\n\t\t\t0.098039\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"OrPu\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.176471,\n\t\t\t0,\n\t\t\t0.294118,\n\t\t\t-0.87451,\n\t\t\t0.272434,\n\t\t\t0.095963,\n\t\t\t0.444214,\n\t\t\t-0.74902,\n\t\t\t0.373395,\n\t\t\t0.228912,\n\t\t\t0.56932,\n\t\t\t-0.623529,\n\t\t\t0.481661,\n\t\t\t0.415917,\n\t\t\t0.657901,\n\t\t\t-0.498039,\n\t\t\t0.601922,\n\t\t\t0.562937,\n\t\t\t0.750481,\n\t\t\t-0.372549,\n\t\t\t0.718493,\n\t\t\t0.695886,\n\t\t\t0.836986,\n\t\t\t-0.247059,\n\t\t\t0.811995,\n\t\t\t0.811534,\n\t\t\t0.898501,\n\t\t\t-0.121569,\n\t\t\t0.894733,\n\t\t\t0.8995,\n\t\t\t0.940023,\n\t\t\t0.00392157,\n\t\t\t0.969166,\n\t\t\t0.966859,\n\t\t\t0.963629,\n\t\t\t0.129412,\n\t\t\t0.98639,\n\t\t\t0.910265,\n\t\t\t0.803691,\n\t\t\t0.254902,\n\t\t\t0.995002,\n\t\t\t0.835371,\n\t\t\t0.624375,\n\t\t\t0.380392,\n\t\t\t0.992541,\n\t\t\t0.736947,\n\t\t\t0.420146,\n\t\t\t0.505882,\n\t\t\t0.931949,\n\t\t\t0.609458,\n\t\t\t0.224221,\n\t\t\t0.631373,\n\t\t\t0.85075,\n\t\t\t0.483968,\n\t\t\t0.069819,\n\t\t\t0.756863,\n\t\t\t0.740023,\n\t\t\t0.380623,\n\t\t\t0.035371,\n\t\t\t0.882353,\n\t\t\t0.617993,\n\t\t\t0.29827,\n\t\t\t0.026759,\n\t\t\t1,\n\t\t\t0.498039,\n\t\t\t0.231373,\n\t\t\t0.031373\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"BrBG\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.329412,\n\t\t\t0.188235,\n\t\t\t0.019608,\n\t\t\t-0.87451,\n\t\t\t0.467205,\n\t\t\t0.269435,\n\t\t\t0.031911,\n\t\t\t-0.74902,\n\t\t\t0.6,\n\t\t\t0.365629,\n\t\t\t0.074202,\n\t\t\t-0.623529,\n\t\t\t0.72549,\n\t\t\t0.483737,\n\t\t\t0.160323,\n\t\t\t-0.498039,\n\t\t\t0.812995,\n\t\t\t0.635832,\n\t\t\t0.336409,\n\t\t\t-0.372549,\n\t\t\t0.88689,\n\t\t\t0.781238,\n\t\t\t0.527874,\n\t\t\t-0.247059,\n\t\t\t0.943483,\n\t\t\t0.87474,\n\t\t\t0.700115,\n\t\t\t-0.121569,\n\t\t\t0.963168,\n\t\t\t0.929796,\n\t\t\t0.841599,\n\t\t\t0.00392157,\n\t\t\t0.957247,\n\t\t\t0.959938,\n\t\t\t0.959554,\n\t\t\t0.129412,\n\t\t\t0.84406,\n\t\t\t0.932872,\n\t\t\t0.920185,\n\t\t\t0.254902,\n\t\t\t0.70396,\n\t\t\t0.886428,\n\t\t\t0.859285,\n\t\t\t0.380392,\n\t\t\t0.529258,\n\t\t\t0.815071,\n\t\t\t0.770704,\n\t\t\t0.505882,\n\t\t\t0.346251,\n\t\t\t0.691811,\n\t\t\t0.653057,\n\t\t\t0.631373,\n\t\t\t0.175855,\n\t\t\t0.562015,\n\t\t\t0.530642,\n\t\t\t0.756863,\n\t\t\t0.047905,\n\t\t\t0.441446,\n\t\t\t0.410073,\n\t\t\t0.882353,\n\t\t\t0.002307,\n\t\t\t0.33218,\n\t\t\t0.294348,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.235294,\n\t\t\t0.188235\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"GyRd\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.101961,\n\t\t\t0.101961,\n\t\t\t0.101961,\n\t\t\t-0.87451,\n\t\t\t0.227451,\n\t\t\t0.227451,\n\t\t\t0.227451,\n\t\t\t-0.74902,\n\t\t\t0.359939,\n\t\t\t0.359939,\n\t\t\t0.359939,\n\t\t\t-0.623529,\n\t\t\t0.502653,\n\t\t\t0.502653,\n\t\t\t0.502653,\n\t\t\t-0.498039,\n\t\t\t0.631373,\n\t\t\t0.631373,\n\t\t\t0.631373,\n\t\t\t-0.372549,\n\t\t\t0.749865,\n\t\t\t0.749865,\n\t\t\t0.749865,\n\t\t\t-0.247059,\n\t\t\t0.843368,\n\t\t\t0.843368,\n\t\t\t0.843368,\n\t\t\t-0.121569,\n\t\t\t0.926105,\n\t\t\t0.926105,\n\t\t\t0.926105,\n\t\t\t0.00392157,\n\t\t\t0.999846,\n\t\t\t0.997232,\n\t\t\t0.995694,\n\t\t\t0.129412,\n\t\t\t0.994925,\n\t\t\t0.908651,\n\t\t\t0.857901,\n\t\t\t0.254902,\n\t\t\t0.982468,\n\t\t\t0.800692,\n\t\t\t0.706113,\n\t\t\t0.380392,\n\t\t\t0.960323,\n\t\t\t0.66782,\n\t\t\t0.536332,\n\t\t\t0.505882,\n\t\t\t0.894579,\n\t\t\t0.503806,\n\t\t\t0.399769,\n\t\t\t0.631373,\n\t\t\t0.81707,\n\t\t\t0.33218,\n\t\t\t0.281046,\n\t\t\t0.756863,\n\t\t\t0.728489,\n\t\t\t0.155017,\n\t\t\t0.197386,\n\t\t\t0.882353,\n\t\t\t0.576932,\n\t\t\t0.055363,\n\t\t\t0.14925,\n\t\t\t1,\n\t\t\t0.403922,\n\t\t\t0,\n\t\t\t0.121569\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_divHi_purpleGreen\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.297553,\n\t\t\t0,\n\t\t\t0.489074,\n\t\t\t-0.87451,\n\t\t\t0.40259,\n\t\t\t0.151146,\n\t\t\t0.567754,\n\t\t\t-0.74902,\n\t\t\t0.516038,\n\t\t\t0.284843,\n\t\t\t0.658231,\n\t\t\t-0.623529,\n\t\t\t0.629783,\n\t\t\t0.423646,\n\t\t\t0.750938,\n\t\t\t-0.498039,\n\t\t\t0.735198,\n\t\t\t0.563697,\n\t\t\t0.835956,\n\t\t\t-0.372549,\n\t\t\t0.82408,\n\t\t\t0.695541,\n\t\t\t0.903582,\n\t\t\t-0.247059,\n\t\t\t0.889091,\n\t\t\t0.807454,\n\t\t\t0.944862,\n\t\t\t-0.121569,\n\t\t\t0.92334,\n\t\t\t0.886917,\n\t\t\t0.951839,\n\t\t\t0.00392157,\n\t\t\t0.921045,\n\t\t\t0.921084,\n\t\t\t0.921003,\n\t\t\t0.129412,\n\t\t\t0.877324,\n\t\t\t0.907455,\n\t\t\t0.845381,\n\t\t\t0.254902,\n\t\t\t0.797649,\n\t\t\t0.849713,\n\t\t\t0.734695,\n\t\t\t0.380392,\n\t\t\t0.691646,\n\t\t\t0.75964,\n\t\t\t0.600532,\n\t\t\t0.505882,\n\t\t\t0.568981,\n\t\t\t0.649159,\n\t\t\t0.453807,\n\t\t\t0.631373,\n\t\t\t0.438945,\n\t\t\t0.529756,\n\t\t\t0.304259,\n\t\t\t0.756863,\n\t\t\t0.30973,\n\t\t\t0.412001,\n\t\t\t0.158303,\n\t\t\t0.882353,\n\t\t\t0.187078,\n\t\t\t0.305111,\n\t\t\t0.00251458,\n\t\t\t1,\n\t\t\t0.101655,\n\t\t\t0.220836,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_divHi_purpleGreen_dim\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.404088,\n\t\t\t0.131038,\n\t\t\t0.592767,\n\t\t\t-0.87451,\n\t\t\t0.486469,\n\t\t\t0.230957,\n\t\t\t0.651243,\n\t\t\t-0.74902,\n\t\t\t0.575165,\n\t\t\t0.339335,\n\t\t\t0.717723,\n\t\t\t-0.623529,\n\t\t\t0.662741,\n\t\t\t0.454332,\n\t\t\t0.784263,\n\t\t\t-0.498039,\n\t\t\t0.742071,\n\t\t\t0.570213,\n\t\t\t0.842918,\n\t\t\t-0.372549,\n\t\t\t0.806935,\n\t\t\t0.678992,\n\t\t\t0.886227,\n\t\t\t-0.247059,\n\t\t\t0.852219,\n\t\t\t0.771315,\n\t\t\t0.90763,\n\t\t\t-0.121569,\n\t\t\t0.873345,\n\t\t\t0.837327,\n\t\t\t0.901572,\n\t\t\t0.00392157,\n\t\t\t0.866783,\n\t\t\t0.86682,\n\t\t\t0.866745,\n\t\t\t0.129412,\n\t\t\t0.82839,\n\t\t\t0.858225,\n\t\t\t0.796812,\n\t\t\t0.254902,\n\t\t\t0.762578,\n\t\t\t0.814287,\n\t\t\t0.700202,\n\t\t\t0.380392,\n\t\t\t0.676429,\n\t\t\t0.744229,\n\t\t\t0.585735,\n\t\t\t0.505882,\n\t\t\t0.577033,\n\t\t\t0.65732,\n\t\t\t0.461526,\n\t\t\t0.631373,\n\t\t\t0.47128,\n\t\t\t0.562476,\n\t\t\t0.33476,\n\t\t\t0.756863,\n\t\t\t0.365461,\n\t\t\t0.467957,\n\t\t\t0.21076,\n\t\t\t0.882353,\n\t\t\t0.264758,\n\t\t\t0.381138,\n\t\t\t0.0878313,\n\t\t\t1,\n\t\t\t0.182591,\n\t\t\t0.312249,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_divLow_icePeach\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.480048,\n\t\t\t0.817441,\n\t\t\t0.998056,\n\t\t\t-0.87451,\n\t\t\t0.425898,\n\t\t\t0.726921,\n\t\t\t0.883187,\n\t\t\t-0.74902,\n\t\t\t0.366682,\n\t\t\t0.629445,\n\t\t\t0.761936,\n\t\t\t-0.623529,\n\t\t\t0.308756,\n\t\t\t0.531002,\n\t\t\t0.640217,\n\t\t\t-0.498039,\n\t\t\t0.258021,\n\t\t\t0.43705,\n\t\t\t0.523433,\n\t\t\t-0.372549,\n\t\t\t0.219244,\n\t\t\t0.352381,\n\t\t\t0.416348,\n\t\t\t-0.247059,\n\t\t\t0.195127,\n\t\t\t0.281032,\n\t\t\t0.322979,\n\t\t\t-0.121569,\n\t\t\t0.186286,\n\t\t\t0.22627,\n\t\t\t0.246525,\n\t\t\t0.00392157,\n\t\t\t0.192352,\n\t\t\t0.19236,\n\t\t\t0.192364,\n\t\t\t0.129412,\n\t\t\t0.255927,\n\t\t\t0.214469,\n\t\t\t0.191756,\n\t\t\t0.254902,\n\t\t\t0.340459,\n\t\t\t0.254426,\n\t\t\t0.206666,\n\t\t\t0.380392,\n\t\t\t0.444655,\n\t\t\t0.309315,\n\t\t\t0.234029,\n\t\t\t0.505882,\n\t\t\t0.565353,\n\t\t\t0.376004,\n\t\t\t0.270969,\n\t\t\t0.631373,\n\t\t\t0.697917,\n\t\t\t0.450748,\n\t\t\t0.314293,\n\t\t\t0.756863,\n\t\t\t0.836657,\n\t\t\t0.529064,\n\t\t\t0.360227,\n\t\t\t0.882353,\n\t\t\t0.972695,\n\t\t\t0.614884,\n\t\t\t0.413123,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.705904,\n\t\t\t0.472699\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_divLow_purpleGreen\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.956034,\n\t\t\t0.666487,\n\t\t\t0.952663,\n\t\t\t-0.87451,\n\t\t\t0.874457,\n\t\t\t0.572698,\n\t\t\t0.936352,\n\t\t\t-0.74902,\n\t\t\t0.753465,\n\t\t\t0.488253,\n\t\t\t0.909063,\n\t\t\t-0.623529,\n\t\t\t0.63309,\n\t\t\t0.413507,\n\t\t\t0.763833,\n\t\t\t-0.498039,\n\t\t\t0.514491,\n\t\t\t0.345878,\n\t\t\t0.620015,\n\t\t\t-0.372549,\n\t\t\t0.405008,\n\t\t\t0.288141,\n\t\t\t0.484376,\n\t\t\t-0.247059,\n\t\t\t0.311388,\n\t\t\t0.241986,\n\t\t\t0.363556,\n\t\t\t-0.121569,\n\t\t\t0.238722,\n\t\t\t0.209044,\n\t\t\t0.263449,\n\t\t\t0.00392157,\n\t\t\t0.192352,\n\t\t\t0.192366,\n\t\t\t0.192362,\n\t\t\t0.129412,\n\t\t\t0.200379,\n\t\t\t0.233201,\n\t\t\t0.168618,\n\t\t\t0.254902,\n\t\t\t0.230151,\n\t\t\t0.291737,\n\t\t\t0.165227,\n\t\t\t0.380392,\n\t\t\t0.279481,\n\t\t\t0.366076,\n\t\t\t0.178607,\n\t\t\t0.505882,\n\t\t\t0.344927,\n\t\t\t0.453267,\n\t\t\t0.205703,\n\t\t\t0.631373,\n\t\t\t0.421554,\n\t\t\t0.549449,\n\t\t\t0.242643,\n\t\t\t0.756863,\n\t\t\t0.503334,\n\t\t\t0.649999,\n\t\t\t0.284377,\n\t\t\t0.882353,\n\t\t\t0.583497,\n\t\t\t0.749672,\n\t\t\t0.324969,\n\t\t\t1,\n\t\t\t0.650705,\n\t\t\t0.837228,\n\t\t\t0.356264\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"Haze_green\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t1,\n\t\t\t0.835294,\n\t\t\t0.886275,\n\t\t\t-0.87451,\n\t\t\t0.937255,\n\t\t\t0.756863,\n\t\t\t0.870443,\n\t\t\t-0.74902,\n\t\t\t0.875817,\n\t\t\t0.666376,\n\t\t\t0.857807,\n\t\t\t-0.623529,\n\t\t\t0.778359,\n\t\t\t0.583007,\n\t\t\t0.808134,\n\t\t\t-0.498039,\n\t\t\t0.676253,\n\t\t\t0.494118,\n\t\t\t0.745098,\n\t\t\t-0.372549,\n\t\t\t0.561365,\n\t\t\t0.390123,\n\t\t\t0.682353,\n\t\t\t-0.247059,\n\t\t\t0.438344,\n\t\t\t0.262745,\n\t\t\t0.621496,\n\t\t\t-0.121569,\n\t\t\t0.321133,\n\t\t\t0.141031,\n\t\t\t0.558751,\n\t\t\t0.00392157,\n\t\t\t0.203922,\n\t\t\t0.0217865,\n\t\t\t0.495861,\n\t\t\t0.129412,\n\t\t\t0.265505,\n\t\t\t0.129412,\n\t\t\t0.433261,\n\t\t\t0.254902,\n\t\t\t0.311692,\n\t\t\t0.255338,\n\t\t\t0.37008,\n\t\t\t0.380392,\n\t\t\t0.356282,\n\t\t\t0.377342,\n\t\t\t0.310821,\n\t\t\t0.505882,\n\t\t\t0.39971,\n\t\t\t0.488889,\n\t\t\t0.258243,\n\t\t\t0.631373,\n\t\t\t0.442556,\n\t\t\t0.604357,\n\t\t\t0.205519,\n\t\t\t0.756863,\n\t\t\t0.48671,\n\t\t\t0.71968,\n\t\t\t0.152941,\n\t\t\t0.882353,\n\t\t\t0.529847,\n\t\t\t0.830356,\n\t\t\t0.100944,\n\t\t\t1,\n\t\t\t0.572549,\n\t\t\t0.933333,\n\t\t\t0.054902\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"Haze_lime\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.704034,\n\t\t\t0.784196,\n\t\t\t1,\n\t\t\t-0.87451,\n\t\t\t0.633111,\n\t\t\t0.691418,\n\t\t\t0.956078,\n\t\t\t-0.74902,\n\t\t\t0.564021,\n\t\t\t0.600606,\n\t\t\t0.912157,\n\t\t\t-0.623529,\n\t\t\t0.496827,\n\t\t\t0.51189,\n\t\t\t0.868235,\n\t\t\t-0.498039,\n\t\t\t0.43157,\n\t\t\t0.425416,\n\t\t\t0.824314,\n\t\t\t-0.372549,\n\t\t\t0.368248,\n\t\t\t0.341347,\n\t\t\t0.780392,\n\t\t\t-0.247059,\n\t\t\t0.306767,\n\t\t\t0.259855,\n\t\t\t0.736471,\n\t\t\t-0.121569,\n\t\t\t0.246862,\n\t\t\t0.181069,\n\t\t\t0.692549,\n\t\t\t0.00392157,\n\t\t\t0.191619,\n\t\t\t0.109542,\n\t\t\t0.648627,\n\t\t\t0.129412,\n\t\t\t0.257404,\n\t\t\t0.194031,\n\t\t\t0.604706,\n\t\t\t0.254902,\n\t\t\t0.321794,\n\t\t\t0.278775,\n\t\t\t0.560784,\n\t\t\t0.380392,\n\t\t\t0.387909,\n\t\t\t0.364617,\n\t\t\t0.516863,\n\t\t\t0.505882,\n\t\t\t0.456569,\n\t\t\t0.451881,\n\t\t\t0.472941,\n\t\t\t0.631373,\n\t\t\t0.527424,\n\t\t\t0.540773,\n\t\t\t0.42902,\n\t\t\t0.756863,\n\t\t\t0.599759,\n\t\t\t0.631427,\n\t\t\t0.385098,\n\t\t\t0.882353,\n\t\t\t0.673065,\n\t\t\t0.723898,\n\t\t\t0.341176,\n\t\t\t1,\n\t\t\t0.742751,\n\t\t\t0.812252,\n\t\t\t0.3\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"Haze\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t1,\n\t\t\t0.835294,\n\t\t\t0.996078,\n\t\t\t-0.00392157,\n\t\t\t0.023529,\n\t\t\t0.141176,\n\t\t\t0.498039,\n\t\t\t0.00392157,\n\t\t\t0.015686,\n\t\t\t0.137255,\n\t\t\t0.494118,\n\t\t\t1,\n\t\t\t0.984314,\n\t\t\t0.764706,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"Haze_cyan\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.956863,\n\t\t\t1,\n\t\t\t0.835294,\n\t\t\t-0.87451,\n\t\t\t0.933188,\n\t\t\t0.921714,\n\t\t\t0.760784,\n\t\t\t-0.74902,\n\t\t\t0.870588,\n\t\t\t0.803486,\n\t\t\t0.671605,\n\t\t\t-0.623529,\n\t\t\t0.807843,\n\t\t\t0.684096,\n\t\t\t0.583297,\n\t\t\t-0.498039,\n\t\t\t0.745098,\n\t\t\t0.569208,\n\t\t\t0.494118,\n\t\t\t-0.372549,\n\t\t\t0.682353,\n\t\t\t0.437763,\n\t\t\t0.390123,\n\t\t\t-0.247059,\n\t\t\t0.621496,\n\t\t\t0.288163,\n\t\t\t0.262745,\n\t\t\t-0.121569,\n\t\t\t0.558751,\n\t\t\t0.144517,\n\t\t\t0.141031,\n\t\t\t0.00392157,\n\t\t\t0.495861,\n\t\t\t0.0217865,\n\t\t\t0.0413943,\n\t\t\t0.129412,\n\t\t\t0.433261,\n\t\t\t0.137255,\n\t\t\t0.129412,\n\t\t\t0.254902,\n\t\t\t0.37008,\n\t\t\t0.263181,\n\t\t\t0.255338,\n\t\t\t0.380392,\n\t\t\t0.306318,\n\t\t\t0.381845,\n\t\t\t0.372694,\n\t\t\t0.505882,\n\t\t\t0.243137,\n\t\t\t0.503994,\n\t\t\t0.494263,\n\t\t\t0.631373,\n\t\t\t0.180392,\n\t\t\t0.629484,\n\t\t\t0.619753,\n\t\t\t0.756863,\n\t\t\t0.117647,\n\t\t\t0.754975,\n\t\t\t0.747131,\n\t\t\t0.882353,\n\t\t\t0.054902,\n\t\t\t0.876398,\n\t\t\t0.866812,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.988235,\n\t\t\t0.976471\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"nic_Edge\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.191208,\n\t\t\t0.191208,\n\t\t\t0.191208,\n\t\t\t-0.87451,\n\t\t\t0.239484,\n\t\t\t0.00545035,\n\t\t\t0.614821,\n\t\t\t-0.74902,\n\t\t\t0.220593,\n\t\t\t0.0617459,\n\t\t\t0.863547,\n\t\t\t-0.623529,\n\t\t\t0.17509,\n\t\t\t0.278988,\n\t\t\t0.97794,\n\t\t\t-0.498039,\n\t\t\t0.143526,\n\t\t\t0.576069,\n\t\t\t0.998553,\n\t\t\t-0.372549,\n\t\t\t0.166456,\n\t\t\t0.871883,\n\t\t\t0.96594,\n\t\t\t-0.247059,\n\t\t\t0.376202,\n\t\t\t0.993555,\n\t\t\t0.981833,\n\t\t\t-0.121569,\n\t\t\t0.681996,\n\t\t\t0.991297,\n\t\t\t0.999239,\n\t\t\t0.00392157,\n\t\t\t0.954172,\n\t\t\t0.952734,\n\t\t\t0.94374,\n\t\t\t0.129412,\n\t\t\t0.999735,\n\t\t\t0.99301,\n\t\t\t0.662896,\n\t\t\t0.254902,\n\t\t\t0.979399,\n\t\t\t0.991466,\n\t\t\t0.357973,\n\t\t\t0.380392,\n\t\t\t0.968771,\n\t\t\t0.854967,\n\t\t\t0.162659,\n\t\t\t0.505882,\n\t\t\t0.999245,\n\t\t\t0.556697,\n\t\t\t0.144323,\n\t\t\t0.631373,\n\t\t\t0.973959,\n\t\t\t0.26223,\n\t\t\t0.177946,\n\t\t\t0.756863,\n\t\t\t0.852358,\n\t\t\t0.0526707,\n\t\t\t0.222974,\n\t\t\t0.882353,\n\t\t\t0.593889,\n\t\t\t0.00912724,\n\t\t\t0.238855,\n\t\t\t1,\n\t\t\t0.191208,\n\t\t\t0.191208,\n\t\t\t0.191208\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_iceFire_H\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t4.05432e-7,\n\t\t\t0,\n\t\t\t0.00000590122,\n\t\t\t-0.87451,\n\t\t\t0,\n\t\t\t0.120401,\n\t\t\t0.302675,\n\t\t\t-0.74902,\n\t\t\t0,\n\t\t\t0.216583,\n\t\t\t0.524574,\n\t\t\t-0.623529,\n\t\t\t0.0552475,\n\t\t\t0.345025,\n\t\t\t0.6595,\n\t\t\t-0.498039,\n\t\t\t0.128047,\n\t\t\t0.492588,\n\t\t\t0.720288,\n\t\t\t-0.372549,\n\t\t\t0.188955,\n\t\t\t0.641309,\n\t\t\t0.792092,\n\t\t\t-0.247059,\n\t\t\t0.327673,\n\t\t\t0.784935,\n\t\t\t0.873434,\n\t\t\t-0.121569,\n\t\t\t0.60824,\n\t\t\t0.892164,\n\t\t\t0.935547,\n\t\t\t0.00392157,\n\t\t\t0.881371,\n\t\t\t0.912178,\n\t\t\t0.818099,\n\t\t\t0.129412,\n\t\t\t0.951407,\n\t\t\t0.835621,\n\t\t\t0.449279,\n\t\t\t0.254902,\n\t\t\t0.904481,\n\t\t\t0.690489,\n\t\t\t0,\n\t\t\t0.380392,\n\t\t\t0.85407,\n\t\t\t0.510864,\n\t\t\t0,\n\t\t\t0.505882,\n\t\t\t0.777093,\n\t\t\t0.33018,\n\t\t\t0.00088199,\n\t\t\t0.631373,\n\t\t\t0.672862,\n\t\t\t0.139087,\n\t\t\t0.00269398,\n\t\t\t0.756863,\n\t\t\t0.508815,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.882353,\n\t\t\t0.299417,\n\t\t\t0.000366289,\n\t\t\t0.000547829,\n\t\t\t1,\n\t\t\t0.0157519,\n\t\t\t0.00332021,\n\t\t\t4.55569e-8\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"erdc_iceFire_L\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.870485,\n\t\t\t0.913768,\n\t\t\t0.832905,\n\t\t\t-0.87451,\n\t\t\t0.586919,\n\t\t\t0.887865,\n\t\t\t0.934003,\n\t\t\t-0.74902,\n\t\t\t0.31583,\n\t\t\t0.776442,\n\t\t\t0.867858,\n\t\t\t-0.623529,\n\t\t\t0.18302,\n\t\t\t0.632034,\n\t\t\t0.787722,\n\t\t\t-0.498039,\n\t\t\t0.117909,\n\t\t\t0.484134,\n\t\t\t0.713825,\n\t\t\t-0.372549,\n\t\t\t0.0507239,\n\t\t\t0.335979,\n\t\t\t0.654741,\n\t\t\t-0.247059,\n\t\t\t0,\n\t\t\t0.209874,\n\t\t\t0.511832,\n\t\t\t-0.121569,\n\t\t\t0,\n\t\t\t0.114689,\n\t\t\t0.28935,\n\t\t\t0.00392157,\n\t\t\t0.0157519,\n\t\t\t0.00332021,\n\t\t\t4.55569e-8,\n\t\t\t0.129412,\n\t\t\t0.312914,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.254902,\n\t\t\t0.520865,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.380392,\n\t\t\t0.680105,\n\t\t\t0.15255,\n\t\t\t0.0025996,\n\t\t\t0.505882,\n\t\t\t0.785109,\n\t\t\t0.339479,\n\t\t\t0.000797922,\n\t\t\t0.631373,\n\t\t\t0.857354,\n\t\t\t0.522494,\n\t\t\t0,\n\t\t\t0.756863,\n\t\t\t0.910974,\n\t\t\t0.699774,\n\t\t\t0,\n\t\t\t0.882353,\n\t\t\t0.951921,\n\t\t\t0.842817,\n\t\t\t0.478545,\n\t\t\t1,\n\t\t\t0.881371,\n\t\t\t0.912178,\n\t\t\t0.818099\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"RGB\",\n\t\tName: \"hsv\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t-0.666666,\n\t\t\t1,\n\t\t\t0,\n\t\t\t1,\n\t\t\t-0.333333,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.33333,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.66666,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tName: \"hue_L60\",\n\t\tRGBPoints: [\n\t\t\t-1,\n\t\t\t0.964784,\n\t\t\t0.400592,\n\t\t\t0.349549,\n\t\t\t-0.87451,\n\t\t\t0.964915,\n\t\t\t0.372498,\n\t\t\t0.53785,\n\t\t\t-0.74902,\n\t\t\t0.892353,\n\t\t\t0.401039,\n\t\t\t0.759569,\n\t\t\t-0.623529,\n\t\t\t0.79263,\n\t\t\t0.446956,\n\t\t\t0.903017,\n\t\t\t-0.498039,\n\t\t\t0.682208,\n\t\t\t0.49954,\n\t\t\t0.966673,\n\t\t\t-0.372549,\n\t\t\t0.56392,\n\t\t\t0.553082,\n\t\t\t0.968836,\n\t\t\t-0.247059,\n\t\t\t0.442031,\n\t\t\t0.606396,\n\t\t\t0.901601,\n\t\t\t-0.121569,\n\t\t\t0.305499,\n\t\t\t0.65701,\n\t\t\t0.765784,\n\t\t\t0.00392157,\n\t\t\t0.197251,\n\t\t\t0.687914,\n\t\t\t0.620914,\n\t\t\t0.129412,\n\t\t\t0.193882,\n\t\t\t0.701887,\n\t\t\t0.472654,\n\t\t\t0.254902,\n\t\t\t0.249866,\n\t\t\t0.706123,\n\t\t\t0.320005,\n\t\t\t0.380392,\n\t\t\t0.35132,\n\t\t\t0.697417,\n\t\t\t0.202919,\n\t\t\t0.505882,\n\t\t\t0.498097,\n\t\t\t0.669467,\n\t\t\t0.125232,\n\t\t\t0.631373,\n\t\t\t0.637477,\n\t\t\t0.626239,\n\t\t\t0.107431,\n\t\t\t0.756863,\n\t\t\t0.762115,\n\t\t\t0.56872,\n\t\t\t0.155812,\n\t\t\t0.882353,\n\t\t\t0.889434,\n\t\t\t0.481116,\n\t\t\t0.240445,\n\t\t\t1,\n\t\t\t0.964784,\n\t\t\t0.400592,\n\t\t\t0.349549\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.8941176470588236,\n\t\t\t0.1019607843137255,\n\t\t\t0.1098039215686274,\n\t\t\t0.2156862745098039,\n\t\t\t0.4941176470588236,\n\t\t\t0.7215686274509804,\n\t\t\t0.3019607843137255,\n\t\t\t0.6862745098039216,\n\t\t\t0.2901960784313726,\n\t\t\t0.596078431372549,\n\t\t\t0.3058823529411765,\n\t\t\t0.6392156862745098,\n\t\t\t1,\n\t\t\t0.4980392156862745,\n\t\t\t0,\n\t\t\t0.6509803921568628,\n\t\t\t0.3372549019607843,\n\t\t\t0.1568627450980392\n\t\t],\n\t\tName: \"Spectrum\",\n\t\tNanColor: [\n\t\t\t0.6509803921568628,\n\t\t\t0.3372549019607843,\n\t\t\t0.1568627450980392\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.4745098039215686,\n\t\t\t0.09019607843137255,\n\t\t\t0.09019607843137255,\n\t\t\t0.7098039215686275,\n\t\t\t0.00392156862745098,\n\t\t\t0.00392156862745098,\n\t\t\t0.9372549019607843,\n\t\t\t0.2784313725490196,\n\t\t\t0.09803921568627451,\n\t\t\t0.9764705882352941,\n\t\t\t0.5137254901960784,\n\t\t\t0.1411764705882353,\n\t\t\t1,\n\t\t\t0.7058823529411765,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.8980392156862745,\n\t\t\t0.02352941176470588\n\t\t],\n\t\tName: \"Warm\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t0.8980392156862745,\n\t\t\t0.02352941176470588\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.4588235294117647,\n\t\t\t0.6941176470588235,\n\t\t\t0.00392156862745098,\n\t\t\t0.3450980392156863,\n\t\t\t0.5019607843137255,\n\t\t\t0.1607843137254902,\n\t\t\t0.3137254901960784,\n\t\t\t0.8431372549019608,\n\t\t\t0.7490196078431373,\n\t\t\t0.1098039215686274,\n\t\t\t0.5843137254901961,\n\t\t\t0.803921568627451,\n\t\t\t0.2313725490196079,\n\t\t\t0.407843137254902,\n\t\t\t0.6705882352941176,\n\t\t\t0.6039215686274509,\n\t\t\t0.407843137254902,\n\t\t\t1,\n\t\t\t0.3725490196078431,\n\t\t\t0.2,\n\t\t\t0.5019607843137255\n\t\t],\n\t\tName: \"Cool\",\n\t\tNanColor: [\n\t\t\t0.3725490196078431,\n\t\t\t0.2,\n\t\t\t0.5019607843137255\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.2313725490196079,\n\t\t\t0.407843137254902,\n\t\t\t0.6705882352941176,\n\t\t\t0.1098039215686274,\n\t\t\t0.5843137254901961,\n\t\t\t0.803921568627451,\n\t\t\t0.3058823529411765,\n\t\t\t0.8509803921568627,\n\t\t\t0.9176470588235294,\n\t\t\t0.4509803921568628,\n\t\t\t0.6039215686274509,\n\t\t\t0.8352941176470589,\n\t\t\t0.2588235294117647,\n\t\t\t0.2392156862745098,\n\t\t\t0.6627450980392157,\n\t\t\t0.3137254901960784,\n\t\t\t0.3294117647058823,\n\t\t\t0.5294117647058824,\n\t\t\t0.06274509803921569,\n\t\t\t0.1647058823529412,\n\t\t\t0.3215686274509804\n\t\t],\n\t\tName: \"Blues\",\n\t\tNanColor: [\n\t\t\t0.06274509803921569,\n\t\t\t0.1647058823529412,\n\t\t\t0.3215686274509804\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.1098039215686274,\n\t\t\t0.5843137254901961,\n\t\t\t0.803921568627451,\n\t\t\t0.2313725490196079,\n\t\t\t0.407843137254902,\n\t\t\t0.6705882352941176,\n\t\t\t0.4,\n\t\t\t0.2431372549019608,\n\t\t\t0.7176470588235294,\n\t\t\t0.6352941176470588,\n\t\t\t0.3294117647058823,\n\t\t\t0.8117647058823529,\n\t\t\t0.8705882352941177,\n\t\t\t0.3803921568627451,\n\t\t\t0.807843137254902,\n\t\t\t0.8627450980392157,\n\t\t\t0.3803921568627451,\n\t\t\t0.5843137254901961,\n\t\t\t0.2392156862745098,\n\t\t\t0.06274509803921569,\n\t\t\t0.3215686274509804\n\t\t],\n\t\tName: \"Wild Flower\",\n\t\tNanColor: [\n\t\t\t0.2392156862745098,\n\t\t\t0.06274509803921569,\n\t\t\t0.3215686274509804\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.396078431372549,\n\t\t\t0.4862745098039216,\n\t\t\t0.2156862745098039,\n\t\t\t0.4588235294117647,\n\t\t\t0.6941176470588235,\n\t\t\t0.00392156862745098,\n\t\t\t0.6980392156862745,\n\t\t\t0.7294117647058823,\n\t\t\t0.1882352941176471,\n\t\t\t1,\n\t\t\t0.8980392156862745,\n\t\t\t0.02352941176470588,\n\t\t\t1,\n\t\t\t0.7058823529411765,\n\t\t\t0,\n\t\t\t0.9764705882352941,\n\t\t\t0.5137254901960784,\n\t\t\t0.1411764705882353\n\t\t],\n\t\tName: \"Citrus\",\n\t\tNanColor: [\n\t\t\t0.9764705882352941,\n\t\t\t0.5137254901960784,\n\t\t\t0.1411764705882353\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.4980392156862745,\n\t\t\t0.2313725490196079,\n\t\t\t0.03137254901960784,\n\t\t\t0.7019607843137254,\n\t\t\t0.3450980392156863,\n\t\t\t0.02352941176470588,\n\t\t\t0.8784313725490196,\n\t\t\t0.5098039215686274,\n\t\t\t0.0784313725490196,\n\t\t\t0.9921568627450981,\n\t\t\t0.7215686274509804,\n\t\t\t0.3882352941176471,\n\t\t\t0.996078431372549,\n\t\t\t0.8784313725490196,\n\t\t\t0.7137254901960784,\n\t\t\t0.9686274509803922,\n\t\t\t0.9686274509803922,\n\t\t\t0.9686274509803922,\n\t\t\t0.8470588235294118,\n\t\t\t0.8549019607843137,\n\t\t\t0.9215686274509803,\n\t\t\t0.6980392156862745,\n\t\t\t0.6705882352941176,\n\t\t\t0.8235294117647058,\n\t\t\t0.5019607843137255,\n\t\t\t0.4509803921568628,\n\t\t\t0.6745098039215687,\n\t\t\t0.3294117647058823,\n\t\t\t0.1529411764705882,\n\t\t\t0.5333333333333333,\n\t\t\t0.1764705882352941,\n\t\t\t0,\n\t\t\t0.2941176470588235\n\t\t],\n\t\tName: \"Brewer Diverging Purple-Orange (11)\",\n\t\tNanColor: [\n\t\t\t0.1764705882352941,\n\t\t\t0,\n\t\t\t0.2941176470588235\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.4980392156862745,\n\t\t\t0.2313725490196079,\n\t\t\t0.03137254901960784,\n\t\t\t0.7019607843137254,\n\t\t\t0.3450980392156863,\n\t\t\t0.02352941176470588,\n\t\t\t0.8784313725490196,\n\t\t\t0.5098039215686274,\n\t\t\t0.0784313725490196,\n\t\t\t0.9921568627450981,\n\t\t\t0.7215686274509804,\n\t\t\t0.3882352941176471,\n\t\t\t0.996078431372549,\n\t\t\t0.8784313725490196,\n\t\t\t0.7137254901960784,\n\t\t\t0.8470588235294118,\n\t\t\t0.8549019607843137,\n\t\t\t0.9215686274509803,\n\t\t\t0.6980392156862745,\n\t\t\t0.6705882352941176,\n\t\t\t0.8235294117647058,\n\t\t\t0.5019607843137255,\n\t\t\t0.4509803921568628,\n\t\t\t0.6745098039215687,\n\t\t\t0.3294117647058823,\n\t\t\t0.1529411764705882,\n\t\t\t0.5333333333333333,\n\t\t\t0.1764705882352941,\n\t\t\t0,\n\t\t\t0.2941176470588235\n\t\t],\n\t\tName: \"Brewer Diverging Purple-Orange (10)\",\n\t\tNanColor: [\n\t\t\t0.1764705882352941,\n\t\t\t0,\n\t\t\t0.2941176470588235\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.7019607843137254,\n\t\t\t0.3450980392156863,\n\t\t\t0.02352941176470588,\n\t\t\t0.8784313725490196,\n\t\t\t0.5098039215686274,\n\t\t\t0.0784313725490196,\n\t\t\t0.9921568627450981,\n\t\t\t0.7215686274509804,\n\t\t\t0.3882352941176471,\n\t\t\t0.996078431372549,\n\t\t\t0.8784313725490196,\n\t\t\t0.7137254901960784,\n\t\t\t0.9686274509803922,\n\t\t\t0.9686274509803922,\n\t\t\t0.9686274509803922,\n\t\t\t0.8470588235294118,\n\t\t\t0.8549019607843137,\n\t\t\t0.9215686274509803,\n\t\t\t0.6980392156862745,\n\t\t\t0.6705882352941176,\n\t\t\t0.8235294117647058,\n\t\t\t0.5019607843137255,\n\t\t\t0.4509803921568628,\n\t\t\t0.6745098039215687,\n\t\t\t0.3294117647058823,\n\t\t\t0.1529411764705882,\n\t\t\t0.5333333333333333\n\t\t],\n\t\tName: \"Brewer Diverging Purple-Orange (9)\",\n\t\tNanColor: [\n\t\t\t0.3294117647058823,\n\t\t\t0.1529411764705882,\n\t\t\t0.5333333333333333\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.7019607843137254,\n\t\t\t0.3450980392156863,\n\t\t\t0.02352941176470588,\n\t\t\t0.8784313725490196,\n\t\t\t0.5098039215686274,\n\t\t\t0.0784313725490196,\n\t\t\t0.9921568627450981,\n\t\t\t0.7215686274509804,\n\t\t\t0.3882352941176471,\n\t\t\t0.996078431372549,\n\t\t\t0.8784313725490196,\n\t\t\t0.7137254901960784,\n\t\t\t0.8470588235294118,\n\t\t\t0.8549019607843137,\n\t\t\t0.9215686274509803,\n\t\t\t0.6980392156862745,\n\t\t\t0.6705882352941176,\n\t\t\t0.8235294117647058,\n\t\t\t0.5019607843137255,\n\t\t\t0.4509803921568628,\n\t\t\t0.6745098039215687,\n\t\t\t0.3294117647058823,\n\t\t\t0.1529411764705882,\n\t\t\t0.5333333333333333\n\t\t],\n\t\tName: \"Brewer Diverging Purple-Orange (8)\",\n\t\tNanColor: [\n\t\t\t0.3294117647058823,\n\t\t\t0.1529411764705882,\n\t\t\t0.5333333333333333\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.7019607843137254,\n\t\t\t0.3450980392156863,\n\t\t\t0.02352941176470588,\n\t\t\t0.9450980392156862,\n\t\t\t0.6392156862745098,\n\t\t\t0.2509803921568627,\n\t\t\t0.996078431372549,\n\t\t\t0.8784313725490196,\n\t\t\t0.7137254901960784,\n\t\t\t0.9686274509803922,\n\t\t\t0.9686274509803922,\n\t\t\t0.9686274509803922,\n\t\t\t0.8470588235294118,\n\t\t\t0.8549019607843137,\n\t\t\t0.9215686274509803,\n\t\t\t0.6,\n\t\t\t0.5568627450980392,\n\t\t\t0.7647058823529411,\n\t\t\t0.3294117647058823,\n\t\t\t0.1529411764705882,\n\t\t\t0.5333333333333333\n\t\t],\n\t\tName: \"Brewer Diverging Purple-Orange (7)\",\n\t\tNanColor: [\n\t\t\t0.3294117647058823,\n\t\t\t0.1529411764705882,\n\t\t\t0.5333333333333333\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.7019607843137254,\n\t\t\t0.3450980392156863,\n\t\t\t0.02352941176470588,\n\t\t\t0.9450980392156862,\n\t\t\t0.6392156862745098,\n\t\t\t0.2509803921568627,\n\t\t\t0.996078431372549,\n\t\t\t0.8784313725490196,\n\t\t\t0.7137254901960784,\n\t\t\t0.8470588235294118,\n\t\t\t0.8549019607843137,\n\t\t\t0.9215686274509803,\n\t\t\t0.6,\n\t\t\t0.5568627450980392,\n\t\t\t0.7647058823529411,\n\t\t\t0.3294117647058823,\n\t\t\t0.1529411764705882,\n\t\t\t0.5333333333333333\n\t\t],\n\t\tName: \"Brewer Diverging Purple-Orange (6)\",\n\t\tNanColor: [\n\t\t\t0.3294117647058823,\n\t\t\t0.1529411764705882,\n\t\t\t0.5333333333333333\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9019607843137255,\n\t\t\t0.3803921568627451,\n\t\t\t0.00392156862745098,\n\t\t\t0.9921568627450981,\n\t\t\t0.7215686274509804,\n\t\t\t0.3882352941176471,\n\t\t\t0.9686274509803922,\n\t\t\t0.9686274509803922,\n\t\t\t0.9686274509803922,\n\t\t\t0.6980392156862745,\n\t\t\t0.6705882352941176,\n\t\t\t0.8235294117647058,\n\t\t\t0.3686274509803922,\n\t\t\t0.2352941176470588,\n\t\t\t0.6\n\t\t],\n\t\tName: \"Brewer Diverging Purple-Orange (5)\",\n\t\tNanColor: [\n\t\t\t0.3686274509803922,\n\t\t\t0.2352941176470588,\n\t\t\t0.6\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9019607843137255,\n\t\t\t0.3803921568627451,\n\t\t\t0.00392156862745098,\n\t\t\t0.9921568627450981,\n\t\t\t0.7215686274509804,\n\t\t\t0.3882352941176471,\n\t\t\t0.6980392156862745,\n\t\t\t0.6705882352941176,\n\t\t\t0.8235294117647058,\n\t\t\t0.3686274509803922,\n\t\t\t0.2352941176470588,\n\t\t\t0.6\n\t\t],\n\t\tName: \"Brewer Diverging Purple-Orange (4)\",\n\t\tNanColor: [\n\t\t\t0.3686274509803922,\n\t\t\t0.2352941176470588,\n\t\t\t0.6\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9450980392156862,\n\t\t\t0.6392156862745098,\n\t\t\t0.2509803921568627,\n\t\t\t0.9686274509803922,\n\t\t\t0.9686274509803922,\n\t\t\t0.9686274509803922,\n\t\t\t0.6,\n\t\t\t0.5568627450980392,\n\t\t\t0.7647058823529411\n\t\t],\n\t\tName: \"Brewer Diverging Purple-Orange (3)\",\n\t\tNanColor: [\n\t\t\t0.6,\n\t\t\t0.5568627450980392,\n\t\t\t0.7647058823529411\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.6196078431372549,\n\t\t\t0.00392156862745098,\n\t\t\t0.2588235294117647,\n\t\t\t0.8352941176470589,\n\t\t\t0.2431372549019608,\n\t\t\t0.3098039215686275,\n\t\t\t0.9568627450980393,\n\t\t\t0.4274509803921568,\n\t\t\t0.2627450980392157,\n\t\t\t0.9921568627450981,\n\t\t\t0.6823529411764706,\n\t\t\t0.3803921568627451,\n\t\t\t0.996078431372549,\n\t\t\t0.8784313725490196,\n\t\t\t0.5450980392156862,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.7490196078431373,\n\t\t\t0.9019607843137255,\n\t\t\t0.9607843137254902,\n\t\t\t0.596078431372549,\n\t\t\t0.6705882352941176,\n\t\t\t0.8666666666666667,\n\t\t\t0.6431372549019608,\n\t\t\t0.4,\n\t\t\t0.7607843137254902,\n\t\t\t0.6470588235294118,\n\t\t\t0.196078431372549,\n\t\t\t0.5333333333333333,\n\t\t\t0.7411764705882353,\n\t\t\t0.3686274509803922,\n\t\t\t0.3098039215686275,\n\t\t\t0.6352941176470588\n\t\t],\n\t\tName: \"Brewer Diverging Spectral (11)\",\n\t\tNanColor: [\n\t\t\t0.3686274509803922,\n\t\t\t0.3098039215686275,\n\t\t\t0.6352941176470588\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.6196078431372549,\n\t\t\t0.00392156862745098,\n\t\t\t0.2588235294117647,\n\t\t\t0.8352941176470589,\n\t\t\t0.2431372549019608,\n\t\t\t0.3098039215686275,\n\t\t\t0.9568627450980393,\n\t\t\t0.4274509803921568,\n\t\t\t0.2627450980392157,\n\t\t\t0.9921568627450981,\n\t\t\t0.6823529411764706,\n\t\t\t0.3803921568627451,\n\t\t\t0.996078431372549,\n\t\t\t0.8784313725490196,\n\t\t\t0.5450980392156862,\n\t\t\t0.9019607843137255,\n\t\t\t0.9607843137254902,\n\t\t\t0.596078431372549,\n\t\t\t0.6705882352941176,\n\t\t\t0.8666666666666667,\n\t\t\t0.6431372549019608,\n\t\t\t0.4,\n\t\t\t0.7607843137254902,\n\t\t\t0.6470588235294118,\n\t\t\t0.196078431372549,\n\t\t\t0.5333333333333333,\n\t\t\t0.7411764705882353,\n\t\t\t0.3686274509803922,\n\t\t\t0.3098039215686275,\n\t\t\t0.6352941176470588\n\t\t],\n\t\tName: \"Brewer Diverging Spectral (10)\",\n\t\tNanColor: [\n\t\t\t0.3686274509803922,\n\t\t\t0.3098039215686275,\n\t\t\t0.6352941176470588\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.8352941176470589,\n\t\t\t0.2431372549019608,\n\t\t\t0.3098039215686275,\n\t\t\t0.9568627450980393,\n\t\t\t0.4274509803921568,\n\t\t\t0.2627450980392157,\n\t\t\t0.9921568627450981,\n\t\t\t0.6823529411764706,\n\t\t\t0.3803921568627451,\n\t\t\t0.996078431372549,\n\t\t\t0.8784313725490196,\n\t\t\t0.5450980392156862,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.7490196078431373,\n\t\t\t0.9019607843137255,\n\t\t\t0.9607843137254902,\n\t\t\t0.596078431372549,\n\t\t\t0.6705882352941176,\n\t\t\t0.8666666666666667,\n\t\t\t0.6431372549019608,\n\t\t\t0.4,\n\t\t\t0.7607843137254902,\n\t\t\t0.6470588235294118,\n\t\t\t0.196078431372549,\n\t\t\t0.5333333333333333,\n\t\t\t0.7411764705882353\n\t\t],\n\t\tName: \"Brewer Diverging Spectral (9)\",\n\t\tNanColor: [\n\t\t\t0.196078431372549,\n\t\t\t0.5333333333333333,\n\t\t\t0.7411764705882353\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.8352941176470589,\n\t\t\t0.2431372549019608,\n\t\t\t0.3098039215686275,\n\t\t\t0.9568627450980393,\n\t\t\t0.4274509803921568,\n\t\t\t0.2627450980392157,\n\t\t\t0.9921568627450981,\n\t\t\t0.6823529411764706,\n\t\t\t0.3803921568627451,\n\t\t\t0.996078431372549,\n\t\t\t0.8784313725490196,\n\t\t\t0.5450980392156862,\n\t\t\t0.9019607843137255,\n\t\t\t0.9607843137254902,\n\t\t\t0.596078431372549,\n\t\t\t0.6705882352941176,\n\t\t\t0.8666666666666667,\n\t\t\t0.6431372549019608,\n\t\t\t0.4,\n\t\t\t0.7607843137254902,\n\t\t\t0.6470588235294118,\n\t\t\t0.196078431372549,\n\t\t\t0.5333333333333333,\n\t\t\t0.7411764705882353\n\t\t],\n\t\tName: \"Brewer Diverging Spectral (8)\",\n\t\tNanColor: [\n\t\t\t0.196078431372549,\n\t\t\t0.5333333333333333,\n\t\t\t0.7411764705882353\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.8352941176470589,\n\t\t\t0.2431372549019608,\n\t\t\t0.3098039215686275,\n\t\t\t0.9882352941176471,\n\t\t\t0.5529411764705883,\n\t\t\t0.3490196078431372,\n\t\t\t0.996078431372549,\n\t\t\t0.8784313725490196,\n\t\t\t0.5450980392156862,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.7490196078431373,\n\t\t\t0.9019607843137255,\n\t\t\t0.9607843137254902,\n\t\t\t0.596078431372549,\n\t\t\t0.6,\n\t\t\t0.8352941176470589,\n\t\t\t0.5803921568627451,\n\t\t\t0.196078431372549,\n\t\t\t0.5333333333333333,\n\t\t\t0.7411764705882353\n\t\t],\n\t\tName: \"Brewer Diverging Spectral (7)\",\n\t\tNanColor: [\n\t\t\t0.196078431372549,\n\t\t\t0.5333333333333333,\n\t\t\t0.7411764705882353\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.8352941176470589,\n\t\t\t0.2431372549019608,\n\t\t\t0.3098039215686275,\n\t\t\t0.9882352941176471,\n\t\t\t0.5529411764705883,\n\t\t\t0.3490196078431372,\n\t\t\t0.996078431372549,\n\t\t\t0.8784313725490196,\n\t\t\t0.5450980392156862,\n\t\t\t0.9019607843137255,\n\t\t\t0.9607843137254902,\n\t\t\t0.596078431372549,\n\t\t\t0.6,\n\t\t\t0.8352941176470589,\n\t\t\t0.5803921568627451,\n\t\t\t0.196078431372549,\n\t\t\t0.5333333333333333,\n\t\t\t0.7411764705882353\n\t\t],\n\t\tName: \"Brewer Diverging Spectral (6)\",\n\t\tNanColor: [\n\t\t\t0.196078431372549,\n\t\t\t0.5333333333333333,\n\t\t\t0.7411764705882353\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.8431372549019608,\n\t\t\t0.09803921568627451,\n\t\t\t0.1098039215686274,\n\t\t\t0.9921568627450981,\n\t\t\t0.6823529411764706,\n\t\t\t0.3803921568627451,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.7490196078431373,\n\t\t\t0.6705882352941176,\n\t\t\t0.8666666666666667,\n\t\t\t0.6431372549019608,\n\t\t\t0.1686274509803922,\n\t\t\t0.5137254901960784,\n\t\t\t0.7294117647058823\n\t\t],\n\t\tName: \"Brewer Diverging Spectral (5)\",\n\t\tNanColor: [\n\t\t\t0.1686274509803922,\n\t\t\t0.5137254901960784,\n\t\t\t0.7294117647058823\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.8431372549019608,\n\t\t\t0.09803921568627451,\n\t\t\t0.1098039215686274,\n\t\t\t0.9921568627450981,\n\t\t\t0.6823529411764706,\n\t\t\t0.3803921568627451,\n\t\t\t0.6705882352941176,\n\t\t\t0.8666666666666667,\n\t\t\t0.6431372549019608,\n\t\t\t0.1686274509803922,\n\t\t\t0.5137254901960784,\n\t\t\t0.7294117647058823\n\t\t],\n\t\tName: \"Brewer Diverging Spectral (4)\",\n\t\tNanColor: [\n\t\t\t0.1686274509803922,\n\t\t\t0.5137254901960784,\n\t\t\t0.7294117647058823\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9882352941176471,\n\t\t\t0.5529411764705883,\n\t\t\t0.3490196078431372,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.7490196078431373,\n\t\t\t0.6,\n\t\t\t0.8352941176470589,\n\t\t\t0.5803921568627451\n\t\t],\n\t\tName: \"Brewer Diverging Spectral (3)\",\n\t\tNanColor: [\n\t\t\t0.6,\n\t\t\t0.8352941176470589,\n\t\t\t0.5803921568627451\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.3294117647058823,\n\t\t\t0.1882352941176471,\n\t\t\t0.0196078431372549,\n\t\t\t0.5490196078431373,\n\t\t\t0.3176470588235294,\n\t\t\t0.0392156862745098,\n\t\t\t0.7490196078431373,\n\t\t\t0.5058823529411764,\n\t\t\t0.1764705882352941,\n\t\t\t0.8745098039215686,\n\t\t\t0.7607843137254902,\n\t\t\t0.4901960784313725,\n\t\t\t0.9647058823529412,\n\t\t\t0.9098039215686274,\n\t\t\t0.7647058823529411,\n\t\t\t0.9607843137254902,\n\t\t\t0.9607843137254902,\n\t\t\t0.9607843137254902,\n\t\t\t0.7803921568627451,\n\t\t\t0.9176470588235294,\n\t\t\t0.8980392156862745,\n\t\t\t0.5019607843137255,\n\t\t\t0.803921568627451,\n\t\t\t0.7568627450980392,\n\t\t\t0.207843137254902,\n\t\t\t0.592156862745098,\n\t\t\t0.5607843137254902,\n\t\t\t0.00392156862745098,\n\t\t\t0.4,\n\t\t\t0.3686274509803922,\n\t\t\t0,\n\t\t\t0.2352941176470588,\n\t\t\t0.1882352941176471\n\t\t],\n\t\tName: \"Brewer Diverging Brown-Blue-Green (11)\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t0.2352941176470588,\n\t\t\t0.1882352941176471\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.3294117647058823,\n\t\t\t0.1882352941176471,\n\t\t\t0.0196078431372549,\n\t\t\t0.5490196078431373,\n\t\t\t0.3176470588235294,\n\t\t\t0.0392156862745098,\n\t\t\t0.7490196078431373,\n\t\t\t0.5058823529411764,\n\t\t\t0.1764705882352941,\n\t\t\t0.8745098039215686,\n\t\t\t0.7607843137254902,\n\t\t\t0.4901960784313725,\n\t\t\t0.9647058823529412,\n\t\t\t0.9098039215686274,\n\t\t\t0.7647058823529411,\n\t\t\t0.7803921568627451,\n\t\t\t0.9176470588235294,\n\t\t\t0.8980392156862745,\n\t\t\t0.5019607843137255,\n\t\t\t0.803921568627451,\n\t\t\t0.7568627450980392,\n\t\t\t0.207843137254902,\n\t\t\t0.592156862745098,\n\t\t\t0.5607843137254902,\n\t\t\t0.00392156862745098,\n\t\t\t0.4,\n\t\t\t0.3686274509803922,\n\t\t\t0,\n\t\t\t0.2352941176470588,\n\t\t\t0.1882352941176471\n\t\t],\n\t\tName: \"Brewer Diverging Brown-Blue-Green (10)\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t0.2352941176470588,\n\t\t\t0.1882352941176471\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.5490196078431373,\n\t\t\t0.3176470588235294,\n\t\t\t0.0392156862745098,\n\t\t\t0.7490196078431373,\n\t\t\t0.5058823529411764,\n\t\t\t0.1764705882352941,\n\t\t\t0.8745098039215686,\n\t\t\t0.7607843137254902,\n\t\t\t0.4901960784313725,\n\t\t\t0.9647058823529412,\n\t\t\t0.9098039215686274,\n\t\t\t0.7647058823529411,\n\t\t\t0.9607843137254902,\n\t\t\t0.9607843137254902,\n\t\t\t0.9607843137254902,\n\t\t\t0.7803921568627451,\n\t\t\t0.9176470588235294,\n\t\t\t0.8980392156862745,\n\t\t\t0.5019607843137255,\n\t\t\t0.803921568627451,\n\t\t\t0.7568627450980392,\n\t\t\t0.207843137254902,\n\t\t\t0.592156862745098,\n\t\t\t0.5607843137254902,\n\t\t\t0.00392156862745098,\n\t\t\t0.4,\n\t\t\t0.3686274509803922\n\t\t],\n\t\tName: \"Brewer Diverging Brown-Blue-Green (9)\",\n\t\tNanColor: [\n\t\t\t0.00392156862745098,\n\t\t\t0.4,\n\t\t\t0.3686274509803922\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.5490196078431373,\n\t\t\t0.3176470588235294,\n\t\t\t0.0392156862745098,\n\t\t\t0.7490196078431373,\n\t\t\t0.5058823529411764,\n\t\t\t0.1764705882352941,\n\t\t\t0.8745098039215686,\n\t\t\t0.7607843137254902,\n\t\t\t0.4901960784313725,\n\t\t\t0.9647058823529412,\n\t\t\t0.9098039215686274,\n\t\t\t0.7647058823529411,\n\t\t\t0.7803921568627451,\n\t\t\t0.9176470588235294,\n\t\t\t0.8980392156862745,\n\t\t\t0.5019607843137255,\n\t\t\t0.803921568627451,\n\t\t\t0.7568627450980392,\n\t\t\t0.207843137254902,\n\t\t\t0.592156862745098,\n\t\t\t0.5607843137254902,\n\t\t\t0.00392156862745098,\n\t\t\t0.4,\n\t\t\t0.3686274509803922\n\t\t],\n\t\tName: \"Brewer Diverging Brown-Blue-Green (8)\",\n\t\tNanColor: [\n\t\t\t0.00392156862745098,\n\t\t\t0.4,\n\t\t\t0.3686274509803922\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.5490196078431373,\n\t\t\t0.3176470588235294,\n\t\t\t0.0392156862745098,\n\t\t\t0.8470588235294118,\n\t\t\t0.7019607843137254,\n\t\t\t0.396078431372549,\n\t\t\t0.9647058823529412,\n\t\t\t0.9098039215686274,\n\t\t\t0.7647058823529411,\n\t\t\t0.9607843137254902,\n\t\t\t0.9607843137254902,\n\t\t\t0.9607843137254902,\n\t\t\t0.7803921568627451,\n\t\t\t0.9176470588235294,\n\t\t\t0.8980392156862745,\n\t\t\t0.3529411764705883,\n\t\t\t0.7058823529411765,\n\t\t\t0.6745098039215687,\n\t\t\t0.00392156862745098,\n\t\t\t0.4,\n\t\t\t0.3686274509803922\n\t\t],\n\t\tName: \"Brewer Diverging Brown-Blue-Green (7)\",\n\t\tNanColor: [\n\t\t\t0.00392156862745098,\n\t\t\t0.4,\n\t\t\t0.3686274509803922\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.5490196078431373,\n\t\t\t0.3176470588235294,\n\t\t\t0.0392156862745098,\n\t\t\t0.8470588235294118,\n\t\t\t0.7019607843137254,\n\t\t\t0.396078431372549,\n\t\t\t0.9647058823529412,\n\t\t\t0.9098039215686274,\n\t\t\t0.7647058823529411,\n\t\t\t0.7803921568627451,\n\t\t\t0.9176470588235294,\n\t\t\t0.8980392156862745,\n\t\t\t0.3529411764705883,\n\t\t\t0.7058823529411765,\n\t\t\t0.6745098039215687,\n\t\t\t0.00392156862745098,\n\t\t\t0.4,\n\t\t\t0.3686274509803922\n\t\t],\n\t\tName: \"Brewer Diverging Brown-Blue-Green (6)\",\n\t\tNanColor: [\n\t\t\t0.00392156862745098,\n\t\t\t0.4,\n\t\t\t0.3686274509803922\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.6509803921568628,\n\t\t\t0.3803921568627451,\n\t\t\t0.1019607843137255,\n\t\t\t0.8745098039215686,\n\t\t\t0.7607843137254902,\n\t\t\t0.4901960784313725,\n\t\t\t0.9607843137254902,\n\t\t\t0.9607843137254902,\n\t\t\t0.9607843137254902,\n\t\t\t0.5019607843137255,\n\t\t\t0.803921568627451,\n\t\t\t0.7568627450980392,\n\t\t\t0.00392156862745098,\n\t\t\t0.5215686274509804,\n\t\t\t0.4431372549019608\n\t\t],\n\t\tName: \"Brewer Diverging Brown-Blue-Green (5)\",\n\t\tNanColor: [\n\t\t\t0.00392156862745098,\n\t\t\t0.5215686274509804,\n\t\t\t0.4431372549019608\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.6509803921568628,\n\t\t\t0.3803921568627451,\n\t\t\t0.1019607843137255,\n\t\t\t0.8745098039215686,\n\t\t\t0.7607843137254902,\n\t\t\t0.4901960784313725,\n\t\t\t0.5019607843137255,\n\t\t\t0.803921568627451,\n\t\t\t0.7568627450980392,\n\t\t\t0.00392156862745098,\n\t\t\t0.5215686274509804,\n\t\t\t0.4431372549019608\n\t\t],\n\t\tName: \"Brewer Diverging Brown-Blue-Green (4)\",\n\t\tNanColor: [\n\t\t\t0.00392156862745098,\n\t\t\t0.5215686274509804,\n\t\t\t0.4431372549019608\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.8470588235294118,\n\t\t\t0.7019607843137254,\n\t\t\t0.396078431372549,\n\t\t\t0.9607843137254902,\n\t\t\t0.9607843137254902,\n\t\t\t0.9607843137254902,\n\t\t\t0.3529411764705883,\n\t\t\t0.7058823529411765,\n\t\t\t0.6745098039215687\n\t\t],\n\t\tName: \"Brewer Diverging Brown-Blue-Green (3)\",\n\t\tNanColor: [\n\t\t\t0.3529411764705883,\n\t\t\t0.7058823529411765,\n\t\t\t0.6745098039215687\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9686274509803922,\n\t\t\t0.9882352941176471,\n\t\t\t0.9921568627450981,\n\t\t\t0.8980392156862745,\n\t\t\t0.9607843137254902,\n\t\t\t0.9764705882352941,\n\t\t\t0.8,\n\t\t\t0.9254901960784314,\n\t\t\t0.9019607843137255,\n\t\t\t0.6,\n\t\t\t0.8470588235294118,\n\t\t\t0.788235294117647,\n\t\t\t0.4,\n\t\t\t0.7607843137254902,\n\t\t\t0.6431372549019608,\n\t\t\t0.2549019607843137,\n\t\t\t0.6823529411764706,\n\t\t\t0.4627450980392157,\n\t\t\t0.1372549019607843,\n\t\t\t0.5450980392156862,\n\t\t\t0.2705882352941176,\n\t\t\t0,\n\t\t\t0.4274509803921568,\n\t\t\t0.1725490196078431,\n\t\t\t0,\n\t\t\t0.2666666666666667,\n\t\t\t0.1058823529411765\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Green (9)\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t0.2666666666666667,\n\t\t\t0.1058823529411765\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9686274509803922,\n\t\t\t0.9882352941176471,\n\t\t\t0.9921568627450981,\n\t\t\t0.8980392156862745,\n\t\t\t0.9607843137254902,\n\t\t\t0.9764705882352941,\n\t\t\t0.8,\n\t\t\t0.9254901960784314,\n\t\t\t0.9019607843137255,\n\t\t\t0.6,\n\t\t\t0.8470588235294118,\n\t\t\t0.788235294117647,\n\t\t\t0.4,\n\t\t\t0.7607843137254902,\n\t\t\t0.6431372549019608,\n\t\t\t0.2549019607843137,\n\t\t\t0.6823529411764706,\n\t\t\t0.4627450980392157,\n\t\t\t0.1372549019607843,\n\t\t\t0.5450980392156862,\n\t\t\t0.2705882352941176,\n\t\t\t0,\n\t\t\t0.3450980392156863,\n\t\t\t0.1411764705882353\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Green (8)\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t0.3450980392156863,\n\t\t\t0.1411764705882353\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9294117647058824,\n\t\t\t0.9725490196078431,\n\t\t\t0.984313725490196,\n\t\t\t0.8,\n\t\t\t0.9254901960784314,\n\t\t\t0.9019607843137255,\n\t\t\t0.8,\n\t\t\t0.9254901960784314,\n\t\t\t0.9019607843137255,\n\t\t\t0.4,\n\t\t\t0.7607843137254902,\n\t\t\t0.6431372549019608,\n\t\t\t0.2549019607843137,\n\t\t\t0.6823529411764706,\n\t\t\t0.4627450980392157,\n\t\t\t0.1372549019607843,\n\t\t\t0.5450980392156862,\n\t\t\t0.2705882352941176,\n\t\t\t0,\n\t\t\t0.3450980392156863,\n\t\t\t0.1411764705882353\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Green (7)\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t0.3450980392156863,\n\t\t\t0.1411764705882353\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9294117647058824,\n\t\t\t0.9725490196078431,\n\t\t\t0.984313725490196,\n\t\t\t0.8,\n\t\t\t0.9254901960784314,\n\t\t\t0.9019607843137255,\n\t\t\t0.6,\n\t\t\t0.8470588235294118,\n\t\t\t0.788235294117647,\n\t\t\t0.4,\n\t\t\t0.7607843137254902,\n\t\t\t0.6431372549019608,\n\t\t\t0.1725490196078431,\n\t\t\t0.6352941176470588,\n\t\t\t0.3725490196078431,\n\t\t\t0,\n\t\t\t0.4274509803921568,\n\t\t\t0.1725490196078431\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Green (6)\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t0.4274509803921568,\n\t\t\t0.1725490196078431\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9294117647058824,\n\t\t\t0.9725490196078431,\n\t\t\t0.984313725490196,\n\t\t\t0.6980392156862745,\n\t\t\t0.8862745098039215,\n\t\t\t0.8862745098039215,\n\t\t\t0.4,\n\t\t\t0.7607843137254902,\n\t\t\t0.6431372549019608,\n\t\t\t0.1725490196078431,\n\t\t\t0.6352941176470588,\n\t\t\t0.3725490196078431,\n\t\t\t0,\n\t\t\t0.4274509803921568,\n\t\t\t0.1725490196078431\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Green (5)\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t0.4274509803921568,\n\t\t\t0.1725490196078431\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9294117647058824,\n\t\t\t0.9725490196078431,\n\t\t\t0.984313725490196,\n\t\t\t0.6980392156862745,\n\t\t\t0.8862745098039215,\n\t\t\t0.8862745098039215,\n\t\t\t0.4,\n\t\t\t0.7607843137254902,\n\t\t\t0.6431372549019608,\n\t\t\t0.1372549019607843,\n\t\t\t0.5450980392156862,\n\t\t\t0.2705882352941176\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Green (4)\",\n\t\tNanColor: [\n\t\t\t0.1372549019607843,\n\t\t\t0.5450980392156862,\n\t\t\t0.2705882352941176\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.8980392156862745,\n\t\t\t0.9607843137254902,\n\t\t\t0.9764705882352941,\n\t\t\t0.6,\n\t\t\t0.8470588235294118,\n\t\t\t0.788235294117647,\n\t\t\t0.1725490196078431,\n\t\t\t0.6352941176470588,\n\t\t\t0.3725490196078431\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Green (3)\",\n\t\tNanColor: [\n\t\t\t0.1725490196078431,\n\t\t\t0.6352941176470588,\n\t\t\t0.3725490196078431\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.8980392156862745,\n\t\t\t1,\n\t\t\t0.9686274509803922,\n\t\t\t0.7372549019607844,\n\t\t\t0.996078431372549,\n\t\t\t0.8901960784313725,\n\t\t\t0.5686274509803921,\n\t\t\t0.996078431372549,\n\t\t\t0.7686274509803922,\n\t\t\t0.3098039215686275,\n\t\t\t0.996078431372549,\n\t\t\t0.6,\n\t\t\t0.1607843137254902,\n\t\t\t0.9254901960784314,\n\t\t\t0.4392156862745098,\n\t\t\t0.0784313725490196,\n\t\t\t0.8,\n\t\t\t0.2980392156862745,\n\t\t\t0.00784313725490196,\n\t\t\t0.6,\n\t\t\t0.203921568627451,\n\t\t\t0.01568627450980392,\n\t\t\t0.4,\n\t\t\t0.1450980392156863,\n\t\t\t0.02352941176470588\n\t\t],\n\t\tName: \"Brewer Sequential Yellow-Orange-Brown (9)\",\n\t\tNanColor: [\n\t\t\t0.4,\n\t\t\t0.1450980392156863,\n\t\t\t0.02352941176470588\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.8980392156862745,\n\t\t\t1,\n\t\t\t0.9686274509803922,\n\t\t\t0.7372549019607844,\n\t\t\t0.996078431372549,\n\t\t\t0.8901960784313725,\n\t\t\t0.5686274509803921,\n\t\t\t0.996078431372549,\n\t\t\t0.7686274509803922,\n\t\t\t0.3098039215686275,\n\t\t\t0.996078431372549,\n\t\t\t0.6,\n\t\t\t0.1607843137254902,\n\t\t\t0.9254901960784314,\n\t\t\t0.4392156862745098,\n\t\t\t0.0784313725490196,\n\t\t\t0.8,\n\t\t\t0.2980392156862745,\n\t\t\t0.00784313725490196,\n\t\t\t0.5490196078431373,\n\t\t\t0.1764705882352941,\n\t\t\t0.01568627450980392\n\t\t],\n\t\tName: \"Brewer Sequential Yellow-Orange-Brown (8)\",\n\t\tNanColor: [\n\t\t\t0.5490196078431373,\n\t\t\t0.1764705882352941,\n\t\t\t0.01568627450980392\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.8313725490196079,\n\t\t\t0.996078431372549,\n\t\t\t0.8901960784313725,\n\t\t\t0.5686274509803921,\n\t\t\t0.996078431372549,\n\t\t\t0.7686274509803922,\n\t\t\t0.3098039215686275,\n\t\t\t0.996078431372549,\n\t\t\t0.6,\n\t\t\t0.1607843137254902,\n\t\t\t0.9254901960784314,\n\t\t\t0.4392156862745098,\n\t\t\t0.0784313725490196,\n\t\t\t0.8,\n\t\t\t0.2980392156862745,\n\t\t\t0.00784313725490196,\n\t\t\t0.5490196078431373,\n\t\t\t0.1764705882352941,\n\t\t\t0.01568627450980392\n\t\t],\n\t\tName: \"Brewer Sequential Yellow-Orange-Brown (7)\",\n\t\tNanColor: [\n\t\t\t0.5490196078431373,\n\t\t\t0.1764705882352941,\n\t\t\t0.01568627450980392\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.8313725490196079,\n\t\t\t0.996078431372549,\n\t\t\t0.8901960784313725,\n\t\t\t0.5686274509803921,\n\t\t\t0.996078431372549,\n\t\t\t0.7686274509803922,\n\t\t\t0.3098039215686275,\n\t\t\t0.996078431372549,\n\t\t\t0.6,\n\t\t\t0.1607843137254902,\n\t\t\t0.8509803921568627,\n\t\t\t0.3725490196078431,\n\t\t\t0.05490196078431372,\n\t\t\t0.6,\n\t\t\t0.203921568627451,\n\t\t\t0.01568627450980392\n\t\t],\n\t\tName: \"Brewer Sequential Yellow-Orange-Brown (6)\",\n\t\tNanColor: [\n\t\t\t0.6,\n\t\t\t0.203921568627451,\n\t\t\t0.01568627450980392\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.8313725490196079,\n\t\t\t0.996078431372549,\n\t\t\t0.8509803921568627,\n\t\t\t0.5568627450980392,\n\t\t\t0.996078431372549,\n\t\t\t0.6,\n\t\t\t0.1607843137254902,\n\t\t\t0.8509803921568627,\n\t\t\t0.3725490196078431,\n\t\t\t0.05490196078431372,\n\t\t\t0.6,\n\t\t\t0.203921568627451,\n\t\t\t0.01568627450980392\n\t\t],\n\t\tName: \"Brewer Sequential Yellow-Orange-Brown (5)\",\n\t\tNanColor: [\n\t\t\t0.6,\n\t\t\t0.203921568627451,\n\t\t\t0.01568627450980392\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.8313725490196079,\n\t\t\t0.996078431372549,\n\t\t\t0.8509803921568627,\n\t\t\t0.5568627450980392,\n\t\t\t0.996078431372549,\n\t\t\t0.6,\n\t\t\t0.1607843137254902,\n\t\t\t0.8,\n\t\t\t0.2980392156862745,\n\t\t\t0.00784313725490196\n\t\t],\n\t\tName: \"Brewer Sequential Yellow-Orange-Brown (4)\",\n\t\tNanColor: [\n\t\t\t0.8,\n\t\t\t0.2980392156862745,\n\t\t\t0.00784313725490196\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t1,\n\t\t\t0.9686274509803922,\n\t\t\t0.7372549019607844,\n\t\t\t0.996078431372549,\n\t\t\t0.7686274509803922,\n\t\t\t0.3098039215686275,\n\t\t\t0.8509803921568627,\n\t\t\t0.3725490196078431,\n\t\t\t0.05490196078431372\n\t\t],\n\t\tName: \"Brewer Sequential Yellow-Orange-Brown (3)\",\n\t\tNanColor: [\n\t\t\t0.8509803921568627,\n\t\t\t0.3725490196078431,\n\t\t\t0.05490196078431372\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9686274509803922,\n\t\t\t0.9882352941176471,\n\t\t\t0.9921568627450981,\n\t\t\t0.8784313725490196,\n\t\t\t0.9254901960784314,\n\t\t\t0.9568627450980393,\n\t\t\t0.7490196078431373,\n\t\t\t0.8274509803921568,\n\t\t\t0.9019607843137255,\n\t\t\t0.6196078431372549,\n\t\t\t0.7372549019607844,\n\t\t\t0.8549019607843137,\n\t\t\t0.5490196078431373,\n\t\t\t0.5882352941176471,\n\t\t\t0.7764705882352941,\n\t\t\t0.5490196078431373,\n\t\t\t0.4196078431372549,\n\t\t\t0.6941176470588235,\n\t\t\t0.5333333333333333,\n\t\t\t0.2549019607843137,\n\t\t\t0.615686274509804,\n\t\t\t0.5058823529411764,\n\t\t\t0.05882352941176471,\n\t\t\t0.4862745098039216,\n\t\t\t0.3019607843137255,\n\t\t\t0,\n\t\t\t0.2941176470588235\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Purple (9)\",\n\t\tNanColor: [\n\t\t\t0.3019607843137255,\n\t\t\t0,\n\t\t\t0.2941176470588235\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9686274509803922,\n\t\t\t0.9882352941176471,\n\t\t\t0.9921568627450981,\n\t\t\t0.8784313725490196,\n\t\t\t0.9254901960784314,\n\t\t\t0.9568627450980393,\n\t\t\t0.7490196078431373,\n\t\t\t0.8274509803921568,\n\t\t\t0.9019607843137255,\n\t\t\t0.6196078431372549,\n\t\t\t0.7372549019607844,\n\t\t\t0.8549019607843137,\n\t\t\t0.5490196078431373,\n\t\t\t0.5882352941176471,\n\t\t\t0.7764705882352941,\n\t\t\t0.5490196078431373,\n\t\t\t0.4196078431372549,\n\t\t\t0.6941176470588235,\n\t\t\t0.5333333333333333,\n\t\t\t0.2549019607843137,\n\t\t\t0.615686274509804,\n\t\t\t0.4313725490196079,\n\t\t\t0.00392156862745098,\n\t\t\t0.4196078431372549\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Purple (8)\",\n\t\tNanColor: [\n\t\t\t0.4313725490196079,\n\t\t\t0.00392156862745098,\n\t\t\t0.4196078431372549\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9294117647058824,\n\t\t\t0.9725490196078431,\n\t\t\t0.984313725490196,\n\t\t\t0.7490196078431373,\n\t\t\t0.8274509803921568,\n\t\t\t0.9019607843137255,\n\t\t\t0.6196078431372549,\n\t\t\t0.7372549019607844,\n\t\t\t0.8549019607843137,\n\t\t\t0.5490196078431373,\n\t\t\t0.5882352941176471,\n\t\t\t0.7764705882352941,\n\t\t\t0.5490196078431373,\n\t\t\t0.4196078431372549,\n\t\t\t0.6941176470588235,\n\t\t\t0.5333333333333333,\n\t\t\t0.2549019607843137,\n\t\t\t0.615686274509804,\n\t\t\t0.4313725490196079,\n\t\t\t0.00392156862745098,\n\t\t\t0.4196078431372549\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Purple (7)\",\n\t\tNanColor: [\n\t\t\t0.4313725490196079,\n\t\t\t0.00392156862745098,\n\t\t\t0.4196078431372549\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9294117647058824,\n\t\t\t0.9725490196078431,\n\t\t\t0.984313725490196,\n\t\t\t0.7490196078431373,\n\t\t\t0.8274509803921568,\n\t\t\t0.9019607843137255,\n\t\t\t0.6196078431372549,\n\t\t\t0.7372549019607844,\n\t\t\t0.8549019607843137,\n\t\t\t0.5490196078431373,\n\t\t\t0.5882352941176471,\n\t\t\t0.7764705882352941,\n\t\t\t0.5333333333333333,\n\t\t\t0.3372549019607843,\n\t\t\t0.6549019607843137,\n\t\t\t0.5058823529411764,\n\t\t\t0.05882352941176471,\n\t\t\t0.4862745098039216\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Purple (6)\",\n\t\tNanColor: [\n\t\t\t0.5058823529411764,\n\t\t\t0.05882352941176471,\n\t\t\t0.4862745098039216\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9294117647058824,\n\t\t\t0.9725490196078431,\n\t\t\t0.984313725490196,\n\t\t\t0.7019607843137254,\n\t\t\t0.803921568627451,\n\t\t\t0.8901960784313725,\n\t\t\t0.5490196078431373,\n\t\t\t0.5882352941176471,\n\t\t\t0.7764705882352941,\n\t\t\t0.5333333333333333,\n\t\t\t0.3372549019607843,\n\t\t\t0.6549019607843137,\n\t\t\t0.5058823529411764,\n\t\t\t0.05882352941176471,\n\t\t\t0.4862745098039216\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Purple (5)\",\n\t\tNanColor: [\n\t\t\t0.5058823529411764,\n\t\t\t0.05882352941176471,\n\t\t\t0.4862745098039216\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.9294117647058824,\n\t\t\t0.9725490196078431,\n\t\t\t0.984313725490196,\n\t\t\t0.7019607843137254,\n\t\t\t0.803921568627451,\n\t\t\t0.8901960784313725,\n\t\t\t0.5490196078431373,\n\t\t\t0.5882352941176471,\n\t\t\t0.7764705882352941,\n\t\t\t0.5333333333333333,\n\t\t\t0.2549019607843137,\n\t\t\t0.615686274509804\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Purple (4)\",\n\t\tNanColor: [\n\t\t\t0.5333333333333333,\n\t\t\t0.2549019607843137,\n\t\t\t0.615686274509804\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.8784313725490196,\n\t\t\t0.9254901960784314,\n\t\t\t0.9568627450980393,\n\t\t\t0.6196078431372549,\n\t\t\t0.7372549019607844,\n\t\t\t0.8549019607843137,\n\t\t\t0.5333333333333333,\n\t\t\t0.3372549019607843,\n\t\t\t0.6549019607843137\n\t\t],\n\t\tName: \"Brewer Sequential Blue-Purple (3)\",\n\t\tNanColor: [\n\t\t\t0.5333333333333333,\n\t\t\t0.3372549019607843,\n\t\t\t0.6549019607843137\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.4980392156862745,\n\t\t\t0.788235294117647,\n\t\t\t0.4980392156862745,\n\t\t\t0.7450980392156863,\n\t\t\t0.6823529411764706,\n\t\t\t0.8313725490196079,\n\t\t\t0.9921568627450981,\n\t\t\t0.7529411764705882,\n\t\t\t0.5254901960784314,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.6,\n\t\t\t0.2196078431372549,\n\t\t\t0.4235294117647059,\n\t\t\t0.6901960784313725,\n\t\t\t0.9411764705882353,\n\t\t\t0.00784313725490196,\n\t\t\t0.4980392156862745,\n\t\t\t0.7490196078431373,\n\t\t\t0.3568627450980392,\n\t\t\t0.09019607843137255,\n\t\t\t0.4,\n\t\t\t0.4,\n\t\t\t0.4\n\t\t],\n\t\tName: \"Brewer Qualitative Accent\",\n\t\tNanColor: [\n\t\t\t0.4,\n\t\t\t0.4,\n\t\t\t0.4\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.1058823529411765,\n\t\t\t0.6196078431372549,\n\t\t\t0.4666666666666667,\n\t\t\t0.8509803921568627,\n\t\t\t0.3725490196078431,\n\t\t\t0.00784313725490196,\n\t\t\t0.4588235294117647,\n\t\t\t0.4392156862745098,\n\t\t\t0.7019607843137254,\n\t\t\t0.9058823529411765,\n\t\t\t0.1607843137254902,\n\t\t\t0.5411764705882353,\n\t\t\t0.4,\n\t\t\t0.6509803921568628,\n\t\t\t0.1176470588235294,\n\t\t\t0.9019607843137255,\n\t\t\t0.6705882352941176,\n\t\t\t0.00784313725490196,\n\t\t\t0.6509803921568628,\n\t\t\t0.4627450980392157,\n\t\t\t0.1137254901960784,\n\t\t\t0.4,\n\t\t\t0.4,\n\t\t\t0.4\n\t\t],\n\t\tName: \"Brewer Qualitative Dark2\",\n\t\tNanColor: [\n\t\t\t0.4,\n\t\t\t0.4,\n\t\t\t0.4\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.4,\n\t\t\t0.7607843137254902,\n\t\t\t0.6470588235294118,\n\t\t\t0.9882352941176471,\n\t\t\t0.5529411764705883,\n\t\t\t0.3843137254901961,\n\t\t\t0.5529411764705883,\n\t\t\t0.6274509803921569,\n\t\t\t0.796078431372549,\n\t\t\t0.9058823529411765,\n\t\t\t0.5411764705882353,\n\t\t\t0.7647058823529411,\n\t\t\t0.6509803921568628,\n\t\t\t0.8470588235294118,\n\t\t\t0.3294117647058823,\n\t\t\t1,\n\t\t\t0.8509803921568627,\n\t\t\t0.1843137254901961,\n\t\t\t0.8980392156862745,\n\t\t\t0.7686274509803922,\n\t\t\t0.5803921568627451,\n\t\t\t0.7019607843137254,\n\t\t\t0.7019607843137254,\n\t\t\t0.7019607843137254\n\t\t],\n\t\tName: \"Brewer Qualitative Set2\",\n\t\tNanColor: [\n\t\t\t0.7019607843137254,\n\t\t\t0.7019607843137254,\n\t\t\t0.7019607843137254\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.7019607843137254,\n\t\t\t0.8862745098039215,\n\t\t\t0.803921568627451,\n\t\t\t0.9921568627450981,\n\t\t\t0.803921568627451,\n\t\t\t0.6745098039215687,\n\t\t\t0.796078431372549,\n\t\t\t0.8352941176470589,\n\t\t\t0.9098039215686274,\n\t\t\t0.9568627450980393,\n\t\t\t0.792156862745098,\n\t\t\t0.8941176470588236,\n\t\t\t0.9019607843137255,\n\t\t\t0.9607843137254902,\n\t\t\t0.788235294117647,\n\t\t\t1,\n\t\t\t0.9490196078431372,\n\t\t\t0.6823529411764706,\n\t\t\t0.9450980392156862,\n\t\t\t0.8862745098039215,\n\t\t\t0.8,\n\t\t\t0.8,\n\t\t\t0.8,\n\t\t\t0.8\n\t\t],\n\t\tName: \"Brewer Qualitative Pastel2\",\n\t\tNanColor: [\n\t\t\t0.8,\n\t\t\t0.8,\n\t\t\t0.8\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.984313725490196,\n\t\t\t0.7058823529411765,\n\t\t\t0.6823529411764706,\n\t\t\t0.7019607843137254,\n\t\t\t0.803921568627451,\n\t\t\t0.8901960784313725,\n\t\t\t0.8,\n\t\t\t0.9215686274509803,\n\t\t\t0.7725490196078432,\n\t\t\t0.8705882352941177,\n\t\t\t0.796078431372549,\n\t\t\t0.8941176470588236,\n\t\t\t0.996078431372549,\n\t\t\t0.8509803921568627,\n\t\t\t0.6509803921568628,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.8,\n\t\t\t0.8980392156862745,\n\t\t\t0.8470588235294118,\n\t\t\t0.7411764705882353,\n\t\t\t0.9921568627450981,\n\t\t\t0.8549019607843137,\n\t\t\t0.9254901960784314,\n\t\t\t0.9490196078431372,\n\t\t\t0.9490196078431372,\n\t\t\t0.9490196078431372\n\t\t],\n\t\tName: \"Brewer Qualitative Pastel1\",\n\t\tNanColor: [\n\t\t\t0.9490196078431372,\n\t\t\t0.9490196078431372,\n\t\t\t0.9490196078431372\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.8941176470588236,\n\t\t\t0.1019607843137255,\n\t\t\t0.1098039215686274,\n\t\t\t0.2156862745098039,\n\t\t\t0.4941176470588236,\n\t\t\t0.7215686274509804,\n\t\t\t0.3019607843137255,\n\t\t\t0.6862745098039216,\n\t\t\t0.2901960784313726,\n\t\t\t0.596078431372549,\n\t\t\t0.3058823529411765,\n\t\t\t0.6392156862745098,\n\t\t\t1,\n\t\t\t0.4980392156862745,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.2,\n\t\t\t0.6509803921568628,\n\t\t\t0.3372549019607843,\n\t\t\t0.1568627450980392,\n\t\t\t0.9686274509803922,\n\t\t\t0.5058823529411764,\n\t\t\t0.7490196078431373,\n\t\t\t0.6,\n\t\t\t0.6,\n\t\t\t0.6\n\t\t],\n\t\tName: \"Brewer Qualitative Set1\",\n\t\tNanColor: [\n\t\t\t0.6,\n\t\t\t0.6,\n\t\t\t0.6\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.6509803921568628,\n\t\t\t0.807843137254902,\n\t\t\t0.8901960784313725,\n\t\t\t0.1215686274509804,\n\t\t\t0.4705882352941176,\n\t\t\t0.7058823529411765,\n\t\t\t0.6980392156862745,\n\t\t\t0.8745098039215686,\n\t\t\t0.5411764705882353,\n\t\t\t0.2,\n\t\t\t0.6274509803921569,\n\t\t\t0.1725490196078431,\n\t\t\t0.984313725490196,\n\t\t\t0.6039215686274509,\n\t\t\t0.6,\n\t\t\t0.8901960784313725,\n\t\t\t0.1019607843137255,\n\t\t\t0.1098039215686274,\n\t\t\t0.9921568627450981,\n\t\t\t0.7490196078431373,\n\t\t\t0.4352941176470588,\n\t\t\t1,\n\t\t\t0.4980392156862745,\n\t\t\t0,\n\t\t\t0.792156862745098,\n\t\t\t0.6980392156862745,\n\t\t\t0.8392156862745098,\n\t\t\t0.4156862745098039,\n\t\t\t0.2392156862745098,\n\t\t\t0.6039215686274509,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.6\n\t\t],\n\t\tName: \"Brewer Qualitative Paired\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.6\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.5529411764705883,\n\t\t\t0.8274509803921568,\n\t\t\t0.7803921568627451,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.7019607843137254,\n\t\t\t0.7450980392156863,\n\t\t\t0.7294117647058823,\n\t\t\t0.8549019607843137,\n\t\t\t0.984313725490196,\n\t\t\t0.5019607843137255,\n\t\t\t0.4470588235294118,\n\t\t\t0.5019607843137255,\n\t\t\t0.6941176470588235,\n\t\t\t0.8274509803921568,\n\t\t\t0.9921568627450981,\n\t\t\t0.7058823529411765,\n\t\t\t0.3843137254901961,\n\t\t\t0.7019607843137254,\n\t\t\t0.8705882352941177,\n\t\t\t0.4117647058823529,\n\t\t\t0.9882352941176471,\n\t\t\t0.803921568627451,\n\t\t\t0.8980392156862745,\n\t\t\t0.8509803921568627,\n\t\t\t0.8509803921568627,\n\t\t\t0.8509803921568627,\n\t\t\t0.7372549019607844,\n\t\t\t0.5019607843137255,\n\t\t\t0.7411764705882353,\n\t\t\t0.8,\n\t\t\t0.9215686274509803,\n\t\t\t0.7725490196078432,\n\t\t\t1,\n\t\t\t0.9294117647058824,\n\t\t\t0.4352941176470588\n\t\t],\n\t\tName: \"Brewer Qualitative Set3\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t0.9294117647058824,\n\t\t\t0.4352941176470588\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t1,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.862745,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.695201,\n\t\t\t0\n\t\t],\n\t\tName: \"Traffic Lights\",\n\t\tNanColor: [\n\t\t\t0.803922,\n\t\t\t0,\n\t\t\t0.803922\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.908659,\n\t\t\t0.604013,\n\t\t\t0.581857,\n\t\t\t1,\n\t\t\t0.862745,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0.695201,\n\t\t\t0\n\t\t],\n\t\tName: \"Traffic Lights For Deuteranopes\",\n\t\tNanColor: [\n\t\t\t0.803922,\n\t\t\t0,\n\t\t\t0.803922\n\t\t]\n\t},\n\t{\n\t\tIndexedColors: [\n\t\t\t0.4196078431372549,\n\t\t\t0,\n\t\t\t0.07058823529411765,\n\t\t\t0.9019607843137255,\n\t\t\t0.9411764705882353,\n\t\t\t0.0196078431372549,\n\t\t\t0.01568627450980392,\n\t\t\t0.6196078431372549,\n\t\t\t0.00784313725490196\n\t\t],\n\t\tName: \"Traffic Lights For Deuteranopes 2\",\n\t\tNanColor: [\n\t\t\t0.803922,\n\t\t\t0,\n\t\t\t0.803922\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tCreator: \"Francesca Samsel\",\n\t\tName: \"Muted Blue-Green\",\n\t\tNanColor: [\n\t\t\t0.25,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.109804,\n\t\t\t0.27451,\n\t\t\t0.301961,\n\t\t\t0.02,\n\t\t\t0.129412,\n\t\t\t0.309804,\n\t\t\t0.341176,\n\t\t\t0.05,\n\t\t\t0.14902,\n\t\t\t0.341176,\n\t\t\t0.380392,\n\t\t\t0.1,\n\t\t\t0.188235,\n\t\t\t0.403922,\n\t\t\t0.458824,\n\t\t\t0.15,\n\t\t\t0.227451,\n\t\t\t0.447059,\n\t\t\t0.521569,\n\t\t\t0.2,\n\t\t\t0.290196,\n\t\t\t0.494118,\n\t\t\t0.588235,\n\t\t\t0.25,\n\t\t\t0.368627,\n\t\t\t0.552941,\n\t\t\t0.670588,\n\t\t\t0.3,\n\t\t\t0.458824,\n\t\t\t0.619608,\n\t\t\t0.74902,\n\t\t\t0.35,\n\t\t\t0.588235,\n\t\t\t0.713725,\n\t\t\t0.85098,\n\t\t\t0.4,\n\t\t\t0.72549,\n\t\t\t0.815686,\n\t\t\t0.941176,\n\t\t\t0.45,\n\t\t\t0.831373,\n\t\t\t0.882353,\n\t\t\t0.980392,\n\t\t\t0.475,\n\t\t\t0.909804,\n\t\t\t0.933333,\n\t\t\t1,\n\t\t\t0.5,\n\t\t\t0.980392,\n\t\t\t0.984314,\n\t\t\t1,\n\t\t\t0.5,\n\t\t\t0.996078,\n\t\t\t1,\n\t\t\t0.94902,\n\t\t\t0.5,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.980392,\n\t\t\t0.5,\n\t\t\t0.980392,\n\t\t\t0.984314,\n\t\t\t1,\n\t\t\t0.525,\n\t\t\t0.972549,\n\t\t\t0.988235,\n\t\t\t0.890196,\n\t\t\t0.55,\n\t\t\t0.917647,\n\t\t\t0.960784,\n\t\t\t0.835294,\n\t\t\t0.6,\n\t\t\t0.835294,\n\t\t\t0.921569,\n\t\t\t0.772549,\n\t\t\t0.65,\n\t\t\t0.768627,\n\t\t\t0.901961,\n\t\t\t0.737255,\n\t\t\t0.7,\n\t\t\t0.670588,\n\t\t\t0.831373,\n\t\t\t0.654902,\n\t\t\t0.75,\n\t\t\t0.576471,\n\t\t\t0.760784,\n\t\t\t0.584314,\n\t\t\t0.8,\n\t\t\t0.498039,\n\t\t\t0.678431,\n\t\t\t0.521569,\n\t\t\t0.85,\n\t\t\t0.392157,\n\t\t\t0.560784,\n\t\t\t0.427451,\n\t\t\t0.9,\n\t\t\t0.294118,\n\t\t\t0.45098,\n\t\t\t0.333333,\n\t\t\t0.95,\n\t\t\t0.211765,\n\t\t\t0.34902,\n\t\t\t0.254902,\n\t\t\t1,\n\t\t\t0.152941,\n\t\t\t0.278431,\n\t\t\t0.196078\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tCreator: \"Francesca Samsel\",\n\t\tName: \"Green-Blue Asymmetric Divergent (62Blbc)\",\n\t\tNanColor: [\n\t\t\t0.25,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.121569,\n\t\t\t0.2,\n\t\t\t0.145098,\n\t\t\t0.05,\n\t\t\t0.196078,\n\t\t\t0.301961,\n\t\t\t0.223529,\n\t\t\t0.1,\n\t\t\t0.258824,\n\t\t\t0.4,\n\t\t\t0.278431,\n\t\t\t0.2,\n\t\t\t0.341176,\n\t\t\t0.54902,\n\t\t\t0.341176,\n\t\t\t0.25,\n\t\t\t0.419608,\n\t\t\t0.619608,\n\t\t\t0.376471,\n\t\t\t0.3,\n\t\t\t0.545098,\n\t\t\t0.701961,\n\t\t\t0.392157,\n\t\t\t0.35,\n\t\t\t0.643137,\n\t\t\t0.780392,\n\t\t\t0.403922,\n\t\t\t0.4,\n\t\t\t0.729412,\n\t\t\t0.819608,\n\t\t\t0.45098,\n\t\t\t0.45,\n\t\t\t0.811765,\n\t\t\t0.870588,\n\t\t\t0.521569,\n\t\t\t0.5,\n\t\t\t0.898039,\n\t\t\t0.909804,\n\t\t\t0.564706,\n\t\t\t0.55,\n\t\t\t0.941176,\n\t\t\t0.92549,\n\t\t\t0.686275,\n\t\t\t0.6,\n\t\t\t0.960784,\n\t\t\t0.94902,\n\t\t\t0.776471,\n\t\t\t0.64,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.65,\n\t\t\t0.890196,\n\t\t\t0.988235,\n\t\t\t0.972549,\n\t\t\t0.7,\n\t\t\t0.721569,\n\t\t\t0.894118,\n\t\t\t0.901961,\n\t\t\t0.75,\n\t\t\t0.631373,\n\t\t\t0.823529,\n\t\t\t0.839216,\n\t\t\t0.8,\n\t\t\t0.517647,\n\t\t\t0.662745,\n\t\t\t0.701961,\n\t\t\t0.85,\n\t\t\t0.384314,\n\t\t\t0.494118,\n\t\t\t0.54902,\n\t\t\t0.9,\n\t\t\t0.298039,\n\t\t\t0.360784,\n\t\t\t0.45098,\n\t\t\t0.95,\n\t\t\t0.223529,\n\t\t\t0.25098,\n\t\t\t0.34902,\n\t\t\t0.99,\n\t\t\t0.156863,\n\t\t\t0.172549,\n\t\t\t0.25098,\n\t\t\t1,\n\t\t\t0.137255,\n\t\t\t0.137255,\n\t\t\t0.188235\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tCreator: \"Francesca Samsel\",\n\t\tName: \"Asymmtrical Earth Tones (6_21b)\",\n\t\tNanColor: [\n\t\t\t0.25,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.141176,\n\t\t\t0.14902,\n\t\t\t0.2,\n\t\t\t0.05,\n\t\t\t0.215686,\n\t\t\t0.258824,\n\t\t\t0.321569,\n\t\t\t0.1,\n\t\t\t0.243137,\n\t\t\t0.368627,\n\t\t\t0.380392,\n\t\t\t0.15,\n\t\t\t0.27451,\n\t\t\t0.439216,\n\t\t\t0.4,\n\t\t\t0.2,\n\t\t\t0.32549,\n\t\t\t0.501961,\n\t\t\t0.384314,\n\t\t\t0.25,\n\t\t\t0.403922,\n\t\t\t0.6,\n\t\t\t0.419608,\n\t\t\t0.3,\n\t\t\t0.486275,\n\t\t\t0.701961,\n\t\t\t0.454902,\n\t\t\t0.35,\n\t\t\t0.556863,\n\t\t\t0.74902,\n\t\t\t0.494118,\n\t\t\t0.4,\n\t\t\t0.670588,\n\t\t\t0.8,\n\t\t\t0.545098,\n\t\t\t0.5,\n\t\t\t0.854902,\n\t\t\t0.901961,\n\t\t\t0.631373,\n\t\t\t0.55,\n\t\t\t0.92549,\n\t\t\t0.941176,\n\t\t\t0.694118,\n\t\t\t0.6,\n\t\t\t0.960784,\n\t\t\t0.94902,\n\t\t\t0.776471,\n\t\t\t0.65,\n\t\t\t0.988235,\n\t\t\t0.968627,\n\t\t\t0.909804,\n\t\t\t0.7,\n\t\t\t0.839216,\n\t\t\t0.815686,\n\t\t\t0.772549,\n\t\t\t0.75,\n\t\t\t0.701961,\n\t\t\t0.662745,\n\t\t\t0.615686,\n\t\t\t0.8,\n\t\t\t0.6,\n\t\t\t0.529412,\n\t\t\t0.478431,\n\t\t\t0.85,\n\t\t\t0.501961,\n\t\t\t0.403922,\n\t\t\t0.360784,\n\t\t\t0.9,\n\t\t\t0.439216,\n\t\t\t0.313725,\n\t\t\t0.290196,\n\t\t\t1,\n\t\t\t0.301961,\n\t\t\t0.164706,\n\t\t\t0.176471\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Lab\",\n\t\tCreator: \"Francesca Samsel\",\n\t\tName: \"Yellow 15\",\n\t\tNanColor: [\n\t\t\t0.25,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.988235,\n\t\t\t0.002,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.988235,\n\t\t\t0.05,\n\t\t\t0.984314,\n\t\t\t0.988235,\n\t\t\t0.843137,\n\t\t\t0.1,\n\t\t\t0.988235,\n\t\t\t0.988235,\n\t\t\t0.741176,\n\t\t\t0.15,\n\t\t\t0.980392,\n\t\t\t0.968627,\n\t\t\t0.654902,\n\t\t\t0.2,\n\t\t\t0.980392,\n\t\t\t0.945098,\n\t\t\t0.576471,\n\t\t\t0.25,\n\t\t\t0.968627,\n\t\t\t0.905882,\n\t\t\t0.486275,\n\t\t\t0.3,\n\t\t\t0.968627,\n\t\t\t0.862745,\n\t\t\t0.388235,\n\t\t\t0.35,\n\t\t\t0.960784,\n\t\t\t0.803922,\n\t\t\t0.286275,\n\t\t\t0.4,\n\t\t\t0.94902,\n\t\t\t0.741176,\n\t\t\t0.219608,\n\t\t\t0.45,\n\t\t\t0.941176,\n\t\t\t0.678431,\n\t\t\t0.14902,\n\t\t\t0.5,\n\t\t\t0.929412,\n\t\t\t0.607843,\n\t\t\t0.094118,\n\t\t\t0.55,\n\t\t\t0.921569,\n\t\t\t0.545098,\n\t\t\t0.054902,\n\t\t\t0.6,\n\t\t\t0.909804,\n\t\t\t0.486275,\n\t\t\t0.035294,\n\t\t\t0.65,\n\t\t\t0.890196,\n\t\t\t0.411765,\n\t\t\t0.019608,\n\t\t\t0.7,\n\t\t\t0.8,\n\t\t\t0.305882,\n\t\t\t0,\n\t\t\t0.75,\n\t\t\t0.760784,\n\t\t\t0.239216,\n\t\t\t0,\n\t\t\t0.8,\n\t\t\t0.678431,\n\t\t\t0.180392,\n\t\t\t0.011765,\n\t\t\t0.85,\n\t\t\t0.6,\n\t\t\t0.121569,\n\t\t\t0.023529,\n\t\t\t0.9,\n\t\t\t0.501961,\n\t\t\t0.054902,\n\t\t\t0.031373,\n\t\t\t0.95,\n\t\t\t0.4,\n\t\t\t0.039216,\n\t\t\t0.058824,\n\t\t\t1,\n\t\t\t0.301961,\n\t\t\t0.047059,\n\t\t\t0.090196\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Diverging\",\n\t\tName: \"Magma (matplotlib)\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tSource: \"https://github.com/BIDS/colormap/blob/master/colormaps.py\",\n\t\tLicense: \"CC0\",\n\t\tCreator: \"Nathaniel J. Smith & Stefan van der Walt\",\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.001462,\n\t\t\t0.000466,\n\t\t\t0.013866,\n\t\t\t0.003922,\n\t\t\t0.002258,\n\t\t\t0.001295,\n\t\t\t0.018331,\n\t\t\t0.007843,\n\t\t\t0.003279,\n\t\t\t0.002305,\n\t\t\t0.023708,\n\t\t\t0.011765,\n\t\t\t0.004512,\n\t\t\t0.00349,\n\t\t\t0.029965,\n\t\t\t0.015686,\n\t\t\t0.00595,\n\t\t\t0.004843,\n\t\t\t0.03713,\n\t\t\t0.019608,\n\t\t\t0.007588,\n\t\t\t0.006356,\n\t\t\t0.044973,\n\t\t\t0.023529,\n\t\t\t0.009426,\n\t\t\t0.008022,\n\t\t\t0.052844,\n\t\t\t0.027451,\n\t\t\t0.011465,\n\t\t\t0.009828,\n\t\t\t0.06075,\n\t\t\t0.031373,\n\t\t\t0.013708,\n\t\t\t0.011771,\n\t\t\t0.068667,\n\t\t\t0.035294,\n\t\t\t0.016156,\n\t\t\t0.01384,\n\t\t\t0.076603,\n\t\t\t0.039216,\n\t\t\t0.018815,\n\t\t\t0.016026,\n\t\t\t0.084584,\n\t\t\t0.043137,\n\t\t\t0.021692,\n\t\t\t0.01832,\n\t\t\t0.09261,\n\t\t\t0.047059,\n\t\t\t0.024792,\n\t\t\t0.020715,\n\t\t\t0.100676,\n\t\t\t0.05098,\n\t\t\t0.028123,\n\t\t\t0.023201,\n\t\t\t0.108787,\n\t\t\t0.054902,\n\t\t\t0.031696,\n\t\t\t0.025765,\n\t\t\t0.116965,\n\t\t\t0.058824,\n\t\t\t0.03552,\n\t\t\t0.028397,\n\t\t\t0.125209,\n\t\t\t0.062745,\n\t\t\t0.039608,\n\t\t\t0.03109,\n\t\t\t0.133515,\n\t\t\t0.066667,\n\t\t\t0.04383,\n\t\t\t0.03383,\n\t\t\t0.141886,\n\t\t\t0.070588,\n\t\t\t0.048062,\n\t\t\t0.036607,\n\t\t\t0.150327,\n\t\t\t0.07451,\n\t\t\t0.05232,\n\t\t\t0.039407,\n\t\t\t0.158841,\n\t\t\t0.078431,\n\t\t\t0.056615,\n\t\t\t0.04216,\n\t\t\t0.167446,\n\t\t\t0.082353,\n\t\t\t0.060949,\n\t\t\t0.044794,\n\t\t\t0.176129,\n\t\t\t0.086275,\n\t\t\t0.06533,\n\t\t\t0.047318,\n\t\t\t0.184892,\n\t\t\t0.090196,\n\t\t\t0.069764,\n\t\t\t0.049726,\n\t\t\t0.193735,\n\t\t\t0.094118,\n\t\t\t0.074257,\n\t\t\t0.052017,\n\t\t\t0.20266,\n\t\t\t0.098039,\n\t\t\t0.078815,\n\t\t\t0.054184,\n\t\t\t0.211667,\n\t\t\t0.101961,\n\t\t\t0.083446,\n\t\t\t0.056225,\n\t\t\t0.220755,\n\t\t\t0.105882,\n\t\t\t0.088155,\n\t\t\t0.058133,\n\t\t\t0.229922,\n\t\t\t0.109804,\n\t\t\t0.092949,\n\t\t\t0.059904,\n\t\t\t0.239164,\n\t\t\t0.113725,\n\t\t\t0.097833,\n\t\t\t0.061531,\n\t\t\t0.248477,\n\t\t\t0.117647,\n\t\t\t0.102815,\n\t\t\t0.06301,\n\t\t\t0.257854,\n\t\t\t0.121569,\n\t\t\t0.107899,\n\t\t\t0.064335,\n\t\t\t0.267289,\n\t\t\t0.12549,\n\t\t\t0.113094,\n\t\t\t0.065492,\n\t\t\t0.276784,\n\t\t\t0.129412,\n\t\t\t0.118405,\n\t\t\t0.066479,\n\t\t\t0.286321,\n\t\t\t0.133333,\n\t\t\t0.123833,\n\t\t\t0.067295,\n\t\t\t0.295879,\n\t\t\t0.137255,\n\t\t\t0.12938,\n\t\t\t0.067935,\n\t\t\t0.305443,\n\t\t\t0.141176,\n\t\t\t0.135053,\n\t\t\t0.068391,\n\t\t\t0.315,\n\t\t\t0.145098,\n\t\t\t0.140858,\n\t\t\t0.068654,\n\t\t\t0.324538,\n\t\t\t0.14902,\n\t\t\t0.146785,\n\t\t\t0.068738,\n\t\t\t0.334011,\n\t\t\t0.152941,\n\t\t\t0.152839,\n\t\t\t0.068637,\n\t\t\t0.343404,\n\t\t\t0.156863,\n\t\t\t0.159018,\n\t\t\t0.068354,\n\t\t\t0.352688,\n\t\t\t0.160784,\n\t\t\t0.165308,\n\t\t\t0.067911,\n\t\t\t0.361816,\n\t\t\t0.164706,\n\t\t\t0.171713,\n\t\t\t0.067305,\n\t\t\t0.370771,\n\t\t\t0.168627,\n\t\t\t0.178212,\n\t\t\t0.066576,\n\t\t\t0.379497,\n\t\t\t0.172549,\n\t\t\t0.184801,\n\t\t\t0.065732,\n\t\t\t0.387973,\n\t\t\t0.176471,\n\t\t\t0.19146,\n\t\t\t0.064818,\n\t\t\t0.396152,\n\t\t\t0.180392,\n\t\t\t0.198177,\n\t\t\t0.063862,\n\t\t\t0.404009,\n\t\t\t0.184314,\n\t\t\t0.204935,\n\t\t\t0.062907,\n\t\t\t0.411514,\n\t\t\t0.188235,\n\t\t\t0.211718,\n\t\t\t0.061992,\n\t\t\t0.418647,\n\t\t\t0.192157,\n\t\t\t0.218512,\n\t\t\t0.061158,\n\t\t\t0.425392,\n\t\t\t0.196078,\n\t\t\t0.225302,\n\t\t\t0.060445,\n\t\t\t0.431742,\n\t\t\t0.2,\n\t\t\t0.232077,\n\t\t\t0.059889,\n\t\t\t0.437695,\n\t\t\t0.203922,\n\t\t\t0.238826,\n\t\t\t0.059517,\n\t\t\t0.443256,\n\t\t\t0.207843,\n\t\t\t0.245543,\n\t\t\t0.059352,\n\t\t\t0.448436,\n\t\t\t0.211765,\n\t\t\t0.25222,\n\t\t\t0.059415,\n\t\t\t0.453248,\n\t\t\t0.215686,\n\t\t\t0.258857,\n\t\t\t0.059706,\n\t\t\t0.45771,\n\t\t\t0.219608,\n\t\t\t0.265447,\n\t\t\t0.060237,\n\t\t\t0.46184,\n\t\t\t0.223529,\n\t\t\t0.271994,\n\t\t\t0.060994,\n\t\t\t0.46566,\n\t\t\t0.227451,\n\t\t\t0.278493,\n\t\t\t0.061978,\n\t\t\t0.46919,\n\t\t\t0.231373,\n\t\t\t0.284951,\n\t\t\t0.063168,\n\t\t\t0.472451,\n\t\t\t0.235294,\n\t\t\t0.291366,\n\t\t\t0.064553,\n\t\t\t0.475462,\n\t\t\t0.239216,\n\t\t\t0.29774,\n\t\t\t0.066117,\n\t\t\t0.478243,\n\t\t\t0.243137,\n\t\t\t0.304081,\n\t\t\t0.067835,\n\t\t\t0.480812,\n\t\t\t0.247059,\n\t\t\t0.310382,\n\t\t\t0.069702,\n\t\t\t0.483186,\n\t\t\t0.25098,\n\t\t\t0.316654,\n\t\t\t0.07169,\n\t\t\t0.48538,\n\t\t\t0.254902,\n\t\t\t0.322899,\n\t\t\t0.073782,\n\t\t\t0.487408,\n\t\t\t0.258824,\n\t\t\t0.329114,\n\t\t\t0.075972,\n\t\t\t0.489287,\n\t\t\t0.262745,\n\t\t\t0.335308,\n\t\t\t0.078236,\n\t\t\t0.491024,\n\t\t\t0.266667,\n\t\t\t0.341482,\n\t\t\t0.080564,\n\t\t\t0.492631,\n\t\t\t0.270588,\n\t\t\t0.347636,\n\t\t\t0.082946,\n\t\t\t0.494121,\n\t\t\t0.27451,\n\t\t\t0.353773,\n\t\t\t0.085373,\n\t\t\t0.495501,\n\t\t\t0.278431,\n\t\t\t0.359898,\n\t\t\t0.087831,\n\t\t\t0.496778,\n\t\t\t0.282353,\n\t\t\t0.366012,\n\t\t\t0.090314,\n\t\t\t0.49796,\n\t\t\t0.286275,\n\t\t\t0.372116,\n\t\t\t0.092816,\n\t\t\t0.499053,\n\t\t\t0.290196,\n\t\t\t0.378211,\n\t\t\t0.095332,\n\t\t\t0.500067,\n\t\t\t0.294118,\n\t\t\t0.384299,\n\t\t\t0.097855,\n\t\t\t0.501002,\n\t\t\t0.298039,\n\t\t\t0.390384,\n\t\t\t0.100379,\n\t\t\t0.501864,\n\t\t\t0.301961,\n\t\t\t0.396467,\n\t\t\t0.102902,\n\t\t\t0.502658,\n\t\t\t0.305882,\n\t\t\t0.402548,\n\t\t\t0.10542,\n\t\t\t0.503386,\n\t\t\t0.309804,\n\t\t\t0.408629,\n\t\t\t0.10793,\n\t\t\t0.504052,\n\t\t\t0.313725,\n\t\t\t0.414709,\n\t\t\t0.110431,\n\t\t\t0.504662,\n\t\t\t0.317647,\n\t\t\t0.420791,\n\t\t\t0.11292,\n\t\t\t0.505215,\n\t\t\t0.321569,\n\t\t\t0.426877,\n\t\t\t0.115395,\n\t\t\t0.505714,\n\t\t\t0.32549,\n\t\t\t0.432967,\n\t\t\t0.117855,\n\t\t\t0.50616,\n\t\t\t0.329412,\n\t\t\t0.439062,\n\t\t\t0.120298,\n\t\t\t0.506555,\n\t\t\t0.333333,\n\t\t\t0.445163,\n\t\t\t0.122724,\n\t\t\t0.506901,\n\t\t\t0.337255,\n\t\t\t0.451271,\n\t\t\t0.125132,\n\t\t\t0.507198,\n\t\t\t0.341176,\n\t\t\t0.457386,\n\t\t\t0.127522,\n\t\t\t0.507448,\n\t\t\t0.345098,\n\t\t\t0.463508,\n\t\t\t0.129893,\n\t\t\t0.507652,\n\t\t\t0.34902,\n\t\t\t0.46964,\n\t\t\t0.132245,\n\t\t\t0.507809,\n\t\t\t0.352941,\n\t\t\t0.47578,\n\t\t\t0.134577,\n\t\t\t0.507921,\n\t\t\t0.356863,\n\t\t\t0.481929,\n\t\t\t0.136891,\n\t\t\t0.507989,\n\t\t\t0.360784,\n\t\t\t0.488088,\n\t\t\t0.139186,\n\t\t\t0.508011,\n\t\t\t0.364706,\n\t\t\t0.494258,\n\t\t\t0.141462,\n\t\t\t0.507988,\n\t\t\t0.368627,\n\t\t\t0.500438,\n\t\t\t0.143719,\n\t\t\t0.50792,\n\t\t\t0.372549,\n\t\t\t0.506629,\n\t\t\t0.145958,\n\t\t\t0.507806,\n\t\t\t0.376471,\n\t\t\t0.512831,\n\t\t\t0.148179,\n\t\t\t0.507648,\n\t\t\t0.380392,\n\t\t\t0.519045,\n\t\t\t0.150383,\n\t\t\t0.507443,\n\t\t\t0.384314,\n\t\t\t0.52527,\n\t\t\t0.152569,\n\t\t\t0.507192,\n\t\t\t0.388235,\n\t\t\t0.531507,\n\t\t\t0.154739,\n\t\t\t0.506895,\n\t\t\t0.392157,\n\t\t\t0.537755,\n\t\t\t0.156894,\n\t\t\t0.506551,\n\t\t\t0.396078,\n\t\t\t0.544015,\n\t\t\t0.159033,\n\t\t\t0.506159,\n\t\t\t0.4,\n\t\t\t0.550287,\n\t\t\t0.161158,\n\t\t\t0.505719,\n\t\t\t0.403922,\n\t\t\t0.556571,\n\t\t\t0.163269,\n\t\t\t0.50523,\n\t\t\t0.407843,\n\t\t\t0.562866,\n\t\t\t0.165368,\n\t\t\t0.504692,\n\t\t\t0.411765,\n\t\t\t0.569172,\n\t\t\t0.167454,\n\t\t\t0.504105,\n\t\t\t0.415686,\n\t\t\t0.57549,\n\t\t\t0.16953,\n\t\t\t0.503466,\n\t\t\t0.419608,\n\t\t\t0.581819,\n\t\t\t0.171596,\n\t\t\t0.502777,\n\t\t\t0.423529,\n\t\t\t0.588158,\n\t\t\t0.173652,\n\t\t\t0.502035,\n\t\t\t0.427451,\n\t\t\t0.594508,\n\t\t\t0.175701,\n\t\t\t0.501241,\n\t\t\t0.431373,\n\t\t\t0.600868,\n\t\t\t0.177743,\n\t\t\t0.500394,\n\t\t\t0.435294,\n\t\t\t0.607238,\n\t\t\t0.179779,\n\t\t\t0.499492,\n\t\t\t0.439216,\n\t\t\t0.613617,\n\t\t\t0.181811,\n\t\t\t0.498536,\n\t\t\t0.443137,\n\t\t\t0.620005,\n\t\t\t0.18384,\n\t\t\t0.497524,\n\t\t\t0.447059,\n\t\t\t0.626401,\n\t\t\t0.185867,\n\t\t\t0.496456,\n\t\t\t0.45098,\n\t\t\t0.632805,\n\t\t\t0.187893,\n\t\t\t0.495332,\n\t\t\t0.454902,\n\t\t\t0.639216,\n\t\t\t0.189921,\n\t\t\t0.49415,\n\t\t\t0.458824,\n\t\t\t0.645633,\n\t\t\t0.191952,\n\t\t\t0.49291,\n\t\t\t0.462745,\n\t\t\t0.652056,\n\t\t\t0.193986,\n\t\t\t0.491611,\n\t\t\t0.466667,\n\t\t\t0.658483,\n\t\t\t0.196027,\n\t\t\t0.490253,\n\t\t\t0.470588,\n\t\t\t0.664915,\n\t\t\t0.198075,\n\t\t\t0.488836,\n\t\t\t0.47451,\n\t\t\t0.671349,\n\t\t\t0.200133,\n\t\t\t0.487358,\n\t\t\t0.478431,\n\t\t\t0.677786,\n\t\t\t0.202203,\n\t\t\t0.485819,\n\t\t\t0.482353,\n\t\t\t0.684224,\n\t\t\t0.204286,\n\t\t\t0.484219,\n\t\t\t0.486275,\n\t\t\t0.690661,\n\t\t\t0.206384,\n\t\t\t0.482558,\n\t\t\t0.490196,\n\t\t\t0.697098,\n\t\t\t0.208501,\n\t\t\t0.480835,\n\t\t\t0.494118,\n\t\t\t0.703532,\n\t\t\t0.210638,\n\t\t\t0.479049,\n\t\t\t0.498039,\n\t\t\t0.709962,\n\t\t\t0.212797,\n\t\t\t0.477201,\n\t\t\t0.501961,\n\t\t\t0.716387,\n\t\t\t0.214982,\n\t\t\t0.47529,\n\t\t\t0.505882,\n\t\t\t0.722805,\n\t\t\t0.217194,\n\t\t\t0.473316,\n\t\t\t0.509804,\n\t\t\t0.729216,\n\t\t\t0.219437,\n\t\t\t0.471279,\n\t\t\t0.513725,\n\t\t\t0.735616,\n\t\t\t0.221713,\n\t\t\t0.46918,\n\t\t\t0.517647,\n\t\t\t0.742004,\n\t\t\t0.224025,\n\t\t\t0.467018,\n\t\t\t0.521569,\n\t\t\t0.748378,\n\t\t\t0.226377,\n\t\t\t0.464794,\n\t\t\t0.52549,\n\t\t\t0.754737,\n\t\t\t0.228772,\n\t\t\t0.462509,\n\t\t\t0.529412,\n\t\t\t0.761077,\n\t\t\t0.231214,\n\t\t\t0.460162,\n\t\t\t0.533333,\n\t\t\t0.767398,\n\t\t\t0.233705,\n\t\t\t0.457755,\n\t\t\t0.537255,\n\t\t\t0.773695,\n\t\t\t0.236249,\n\t\t\t0.455289,\n\t\t\t0.541176,\n\t\t\t0.779968,\n\t\t\t0.238851,\n\t\t\t0.452765,\n\t\t\t0.545098,\n\t\t\t0.786212,\n\t\t\t0.241514,\n\t\t\t0.450184,\n\t\t\t0.54902,\n\t\t\t0.792427,\n\t\t\t0.244242,\n\t\t\t0.447543,\n\t\t\t0.552941,\n\t\t\t0.798608,\n\t\t\t0.24704,\n\t\t\t0.444848,\n\t\t\t0.556863,\n\t\t\t0.804752,\n\t\t\t0.249911,\n\t\t\t0.442102,\n\t\t\t0.560784,\n\t\t\t0.810855,\n\t\t\t0.252861,\n\t\t\t0.439305,\n\t\t\t0.564706,\n\t\t\t0.816914,\n\t\t\t0.255895,\n\t\t\t0.436461,\n\t\t\t0.568627,\n\t\t\t0.822926,\n\t\t\t0.259016,\n\t\t\t0.433573,\n\t\t\t0.572549,\n\t\t\t0.828886,\n\t\t\t0.262229,\n\t\t\t0.430644,\n\t\t\t0.576471,\n\t\t\t0.834791,\n\t\t\t0.26554,\n\t\t\t0.427671,\n\t\t\t0.580392,\n\t\t\t0.840636,\n\t\t\t0.268953,\n\t\t\t0.424666,\n\t\t\t0.584314,\n\t\t\t0.846416,\n\t\t\t0.272473,\n\t\t\t0.421631,\n\t\t\t0.588235,\n\t\t\t0.852126,\n\t\t\t0.276106,\n\t\t\t0.418573,\n\t\t\t0.592157,\n\t\t\t0.857763,\n\t\t\t0.279857,\n\t\t\t0.415496,\n\t\t\t0.596078,\n\t\t\t0.86332,\n\t\t\t0.283729,\n\t\t\t0.412403,\n\t\t\t0.6,\n\t\t\t0.868793,\n\t\t\t0.287728,\n\t\t\t0.409303,\n\t\t\t0.603922,\n\t\t\t0.874176,\n\t\t\t0.291859,\n\t\t\t0.406205,\n\t\t\t0.607843,\n\t\t\t0.879464,\n\t\t\t0.296125,\n\t\t\t0.403118,\n\t\t\t0.611765,\n\t\t\t0.884651,\n\t\t\t0.30053,\n\t\t\t0.400047,\n\t\t\t0.615686,\n\t\t\t0.889731,\n\t\t\t0.305079,\n\t\t\t0.397002,\n\t\t\t0.619608,\n\t\t\t0.8947,\n\t\t\t0.309773,\n\t\t\t0.393995,\n\t\t\t0.623529,\n\t\t\t0.899552,\n\t\t\t0.314616,\n\t\t\t0.391037,\n\t\t\t0.627451,\n\t\t\t0.904281,\n\t\t\t0.31961,\n\t\t\t0.388137,\n\t\t\t0.631373,\n\t\t\t0.908884,\n\t\t\t0.324755,\n\t\t\t0.385308,\n\t\t\t0.635294,\n\t\t\t0.913354,\n\t\t\t0.330052,\n\t\t\t0.382563,\n\t\t\t0.639216,\n\t\t\t0.917689,\n\t\t\t0.3355,\n\t\t\t0.379915,\n\t\t\t0.643137,\n\t\t\t0.921884,\n\t\t\t0.341098,\n\t\t\t0.377376,\n\t\t\t0.647059,\n\t\t\t0.925937,\n\t\t\t0.346844,\n\t\t\t0.374959,\n\t\t\t0.65098,\n\t\t\t0.929845,\n\t\t\t0.352734,\n\t\t\t0.372677,\n\t\t\t0.654902,\n\t\t\t0.933606,\n\t\t\t0.358764,\n\t\t\t0.370541,\n\t\t\t0.658824,\n\t\t\t0.937221,\n\t\t\t0.364929,\n\t\t\t0.368567,\n\t\t\t0.662745,\n\t\t\t0.940687,\n\t\t\t0.371224,\n\t\t\t0.366762,\n\t\t\t0.666667,\n\t\t\t0.944006,\n\t\t\t0.377643,\n\t\t\t0.365136,\n\t\t\t0.670588,\n\t\t\t0.94718,\n\t\t\t0.384178,\n\t\t\t0.363701,\n\t\t\t0.67451,\n\t\t\t0.95021,\n\t\t\t0.39082,\n\t\t\t0.362468,\n\t\t\t0.678431,\n\t\t\t0.953099,\n\t\t\t0.397563,\n\t\t\t0.361438,\n\t\t\t0.682353,\n\t\t\t0.955849,\n\t\t\t0.4044,\n\t\t\t0.360619,\n\t\t\t0.686275,\n\t\t\t0.958464,\n\t\t\t0.411324,\n\t\t\t0.360014,\n\t\t\t0.690196,\n\t\t\t0.960949,\n\t\t\t0.418323,\n\t\t\t0.35963,\n\t\t\t0.694118,\n\t\t\t0.96331,\n\t\t\t0.42539,\n\t\t\t0.359469,\n\t\t\t0.698039,\n\t\t\t0.965549,\n\t\t\t0.432519,\n\t\t\t0.359529,\n\t\t\t0.701961,\n\t\t\t0.967671,\n\t\t\t0.439703,\n\t\t\t0.35981,\n\t\t\t0.705882,\n\t\t\t0.96968,\n\t\t\t0.446936,\n\t\t\t0.360311,\n\t\t\t0.709804,\n\t\t\t0.971582,\n\t\t\t0.45421,\n\t\t\t0.36103,\n\t\t\t0.713725,\n\t\t\t0.973381,\n\t\t\t0.46152,\n\t\t\t0.361965,\n\t\t\t0.717647,\n\t\t\t0.975082,\n\t\t\t0.468861,\n\t\t\t0.363111,\n\t\t\t0.721569,\n\t\t\t0.97669,\n\t\t\t0.476226,\n\t\t\t0.364466,\n\t\t\t0.72549,\n\t\t\t0.97821,\n\t\t\t0.483612,\n\t\t\t0.366025,\n\t\t\t0.729412,\n\t\t\t0.979645,\n\t\t\t0.491014,\n\t\t\t0.367783,\n\t\t\t0.733333,\n\t\t\t0.981,\n\t\t\t0.498428,\n\t\t\t0.369734,\n\t\t\t0.737255,\n\t\t\t0.982279,\n\t\t\t0.505851,\n\t\t\t0.371874,\n\t\t\t0.741176,\n\t\t\t0.983485,\n\t\t\t0.51328,\n\t\t\t0.374198,\n\t\t\t0.745098,\n\t\t\t0.984622,\n\t\t\t0.520713,\n\t\t\t0.376698,\n\t\t\t0.74902,\n\t\t\t0.985693,\n\t\t\t0.528148,\n\t\t\t0.379371,\n\t\t\t0.752941,\n\t\t\t0.9867,\n\t\t\t0.535582,\n\t\t\t0.38221,\n\t\t\t0.756863,\n\t\t\t0.987646,\n\t\t\t0.543015,\n\t\t\t0.38521,\n\t\t\t0.760784,\n\t\t\t0.988533,\n\t\t\t0.550446,\n\t\t\t0.388365,\n\t\t\t0.764706,\n\t\t\t0.989363,\n\t\t\t0.557873,\n\t\t\t0.391671,\n\t\t\t0.768627,\n\t\t\t0.990138,\n\t\t\t0.565296,\n\t\t\t0.395122,\n\t\t\t0.772549,\n\t\t\t0.990871,\n\t\t\t0.572706,\n\t\t\t0.398714,\n\t\t\t0.776471,\n\t\t\t0.991558,\n\t\t\t0.580107,\n\t\t\t0.402441,\n\t\t\t0.780392,\n\t\t\t0.992196,\n\t\t\t0.587502,\n\t\t\t0.406299,\n\t\t\t0.784314,\n\t\t\t0.992785,\n\t\t\t0.594891,\n\t\t\t0.410283,\n\t\t\t0.788235,\n\t\t\t0.993326,\n\t\t\t0.602275,\n\t\t\t0.41439,\n\t\t\t0.792157,\n\t\t\t0.993834,\n\t\t\t0.609644,\n\t\t\t0.418613,\n\t\t\t0.796078,\n\t\t\t0.994309,\n\t\t\t0.616999,\n\t\t\t0.42295,\n\t\t\t0.8,\n\t\t\t0.994738,\n\t\t\t0.62435,\n\t\t\t0.427397,\n\t\t\t0.803922,\n\t\t\t0.995122,\n\t\t\t0.631696,\n\t\t\t0.431951,\n\t\t\t0.807843,\n\t\t\t0.99548,\n\t\t\t0.639027,\n\t\t\t0.436607,\n\t\t\t0.811765,\n\t\t\t0.99581,\n\t\t\t0.646344,\n\t\t\t0.441361,\n\t\t\t0.815686,\n\t\t\t0.996096,\n\t\t\t0.653659,\n\t\t\t0.446213,\n\t\t\t0.819608,\n\t\t\t0.996341,\n\t\t\t0.660969,\n\t\t\t0.45116,\n\t\t\t0.823529,\n\t\t\t0.99658,\n\t\t\t0.668256,\n\t\t\t0.456192,\n\t\t\t0.827451,\n\t\t\t0.996775,\n\t\t\t0.675541,\n\t\t\t0.461314,\n\t\t\t0.831373,\n\t\t\t0.996925,\n\t\t\t0.682828,\n\t\t\t0.466526,\n\t\t\t0.835294,\n\t\t\t0.997077,\n\t\t\t0.690088,\n\t\t\t0.471811,\n\t\t\t0.839216,\n\t\t\t0.997186,\n\t\t\t0.697349,\n\t\t\t0.477182,\n\t\t\t0.843137,\n\t\t\t0.997254,\n\t\t\t0.704611,\n\t\t\t0.482635,\n\t\t\t0.847059,\n\t\t\t0.997325,\n\t\t\t0.711848,\n\t\t\t0.488154,\n\t\t\t0.85098,\n\t\t\t0.997351,\n\t\t\t0.719089,\n\t\t\t0.493755,\n\t\t\t0.854902,\n\t\t\t0.997351,\n\t\t\t0.726324,\n\t\t\t0.499428,\n\t\t\t0.858824,\n\t\t\t0.997341,\n\t\t\t0.733545,\n\t\t\t0.505167,\n\t\t\t0.862745,\n\t\t\t0.997285,\n\t\t\t0.740772,\n\t\t\t0.510983,\n\t\t\t0.866667,\n\t\t\t0.997228,\n\t\t\t0.747981,\n\t\t\t0.516859,\n\t\t\t0.870588,\n\t\t\t0.997138,\n\t\t\t0.75519,\n\t\t\t0.522806,\n\t\t\t0.87451,\n\t\t\t0.997019,\n\t\t\t0.762398,\n\t\t\t0.528821,\n\t\t\t0.878431,\n\t\t\t0.996898,\n\t\t\t0.769591,\n\t\t\t0.534892,\n\t\t\t0.882353,\n\t\t\t0.996727,\n\t\t\t0.776795,\n\t\t\t0.541039,\n\t\t\t0.886275,\n\t\t\t0.996571,\n\t\t\t0.783977,\n\t\t\t0.547233,\n\t\t\t0.890196,\n\t\t\t0.996369,\n\t\t\t0.791167,\n\t\t\t0.553499,\n\t\t\t0.894118,\n\t\t\t0.996162,\n\t\t\t0.798348,\n\t\t\t0.55982,\n\t\t\t0.898039,\n\t\t\t0.995932,\n\t\t\t0.805527,\n\t\t\t0.566202,\n\t\t\t0.901961,\n\t\t\t0.99568,\n\t\t\t0.812706,\n\t\t\t0.572645,\n\t\t\t0.905882,\n\t\t\t0.995424,\n\t\t\t0.819875,\n\t\t\t0.57914,\n\t\t\t0.909804,\n\t\t\t0.995131,\n\t\t\t0.827052,\n\t\t\t0.585701,\n\t\t\t0.913725,\n\t\t\t0.994851,\n\t\t\t0.834213,\n\t\t\t0.592307,\n\t\t\t0.917647,\n\t\t\t0.994524,\n\t\t\t0.841387,\n\t\t\t0.598983,\n\t\t\t0.921569,\n\t\t\t0.994222,\n\t\t\t0.84854,\n\t\t\t0.605696,\n\t\t\t0.92549,\n\t\t\t0.993866,\n\t\t\t0.855711,\n\t\t\t0.612482,\n\t\t\t0.929412,\n\t\t\t0.993545,\n\t\t\t0.862859,\n\t\t\t0.619299,\n\t\t\t0.933333,\n\t\t\t0.99317,\n\t\t\t0.870024,\n\t\t\t0.626189,\n\t\t\t0.937255,\n\t\t\t0.992831,\n\t\t\t0.877168,\n\t\t\t0.633109,\n\t\t\t0.941176,\n\t\t\t0.99244,\n\t\t\t0.88433,\n\t\t\t0.640099,\n\t\t\t0.945098,\n\t\t\t0.992089,\n\t\t\t0.89147,\n\t\t\t0.647116,\n\t\t\t0.94902,\n\t\t\t0.991688,\n\t\t\t0.898627,\n\t\t\t0.654202,\n\t\t\t0.952941,\n\t\t\t0.991332,\n\t\t\t0.905763,\n\t\t\t0.661309,\n\t\t\t0.956863,\n\t\t\t0.99093,\n\t\t\t0.912915,\n\t\t\t0.668481,\n\t\t\t0.960784,\n\t\t\t0.99057,\n\t\t\t0.920049,\n\t\t\t0.675675,\n\t\t\t0.964706,\n\t\t\t0.990175,\n\t\t\t0.927196,\n\t\t\t0.682926,\n\t\t\t0.968627,\n\t\t\t0.989815,\n\t\t\t0.934329,\n\t\t\t0.690198,\n\t\t\t0.972549,\n\t\t\t0.989434,\n\t\t\t0.94147,\n\t\t\t0.697519,\n\t\t\t0.976471,\n\t\t\t0.989077,\n\t\t\t0.948604,\n\t\t\t0.704863,\n\t\t\t0.980392,\n\t\t\t0.988717,\n\t\t\t0.955742,\n\t\t\t0.712242,\n\t\t\t0.984314,\n\t\t\t0.988367,\n\t\t\t0.962878,\n\t\t\t0.719649,\n\t\t\t0.988235,\n\t\t\t0.988033,\n\t\t\t0.970012,\n\t\t\t0.727077,\n\t\t\t0.992157,\n\t\t\t0.987691,\n\t\t\t0.977154,\n\t\t\t0.734536,\n\t\t\t0.996078,\n\t\t\t0.987387,\n\t\t\t0.984288,\n\t\t\t0.742002,\n\t\t\t1,\n\t\t\t0.987053,\n\t\t\t0.991438,\n\t\t\t0.749504\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Diverging\",\n\t\tName: \"Inferno (matplotlib)\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tSource: \"https://github.com/BIDS/colormap/blob/master/colormaps.py\",\n\t\tLicense: \"CC0\",\n\t\tCreator: \"Nathaniel J. Smith & Stefan van der Walt\",\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.001462,\n\t\t\t0.000466,\n\t\t\t0.013866,\n\t\t\t0.003922,\n\t\t\t0.002267,\n\t\t\t0.00127,\n\t\t\t0.01857,\n\t\t\t0.007843,\n\t\t\t0.003299,\n\t\t\t0.002249,\n\t\t\t0.024239,\n\t\t\t0.011765,\n\t\t\t0.004547,\n\t\t\t0.003392,\n\t\t\t0.030909,\n\t\t\t0.015686,\n\t\t\t0.006006,\n\t\t\t0.004692,\n\t\t\t0.038558,\n\t\t\t0.019608,\n\t\t\t0.007676,\n\t\t\t0.006136,\n\t\t\t0.046836,\n\t\t\t0.023529,\n\t\t\t0.009561,\n\t\t\t0.007713,\n\t\t\t0.055143,\n\t\t\t0.027451,\n\t\t\t0.011663,\n\t\t\t0.009417,\n\t\t\t0.06346,\n\t\t\t0.031373,\n\t\t\t0.013995,\n\t\t\t0.011225,\n\t\t\t0.071862,\n\t\t\t0.035294,\n\t\t\t0.016561,\n\t\t\t0.013136,\n\t\t\t0.080282,\n\t\t\t0.039216,\n\t\t\t0.019373,\n\t\t\t0.015133,\n\t\t\t0.088767,\n\t\t\t0.043137,\n\t\t\t0.022447,\n\t\t\t0.017199,\n\t\t\t0.097327,\n\t\t\t0.047059,\n\t\t\t0.025793,\n\t\t\t0.019331,\n\t\t\t0.10593,\n\t\t\t0.05098,\n\t\t\t0.029432,\n\t\t\t0.021503,\n\t\t\t0.114621,\n\t\t\t0.054902,\n\t\t\t0.033385,\n\t\t\t0.023702,\n\t\t\t0.123397,\n\t\t\t0.058824,\n\t\t\t0.037668,\n\t\t\t0.025921,\n\t\t\t0.132232,\n\t\t\t0.062745,\n\t\t\t0.042253,\n\t\t\t0.028139,\n\t\t\t0.141141,\n\t\t\t0.066667,\n\t\t\t0.046915,\n\t\t\t0.030324,\n\t\t\t0.150164,\n\t\t\t0.070588,\n\t\t\t0.051644,\n\t\t\t0.032474,\n\t\t\t0.159254,\n\t\t\t0.07451,\n\t\t\t0.056449,\n\t\t\t0.034569,\n\t\t\t0.168414,\n\t\t\t0.078431,\n\t\t\t0.06134,\n\t\t\t0.03659,\n\t\t\t0.177642,\n\t\t\t0.082353,\n\t\t\t0.066331,\n\t\t\t0.038504,\n\t\t\t0.186962,\n\t\t\t0.086275,\n\t\t\t0.071429,\n\t\t\t0.040294,\n\t\t\t0.196354,\n\t\t\t0.090196,\n\t\t\t0.076637,\n\t\t\t0.041905,\n\t\t\t0.205799,\n\t\t\t0.094118,\n\t\t\t0.081962,\n\t\t\t0.043328,\n\t\t\t0.215289,\n\t\t\t0.098039,\n\t\t\t0.087411,\n\t\t\t0.044556,\n\t\t\t0.224813,\n\t\t\t0.101961,\n\t\t\t0.09299,\n\t\t\t0.045583,\n\t\t\t0.234358,\n\t\t\t0.105882,\n\t\t\t0.098702,\n\t\t\t0.046402,\n\t\t\t0.243904,\n\t\t\t0.109804,\n\t\t\t0.104551,\n\t\t\t0.047008,\n\t\t\t0.25343,\n\t\t\t0.113725,\n\t\t\t0.110536,\n\t\t\t0.047399,\n\t\t\t0.262912,\n\t\t\t0.117647,\n\t\t\t0.116656,\n\t\t\t0.047574,\n\t\t\t0.272321,\n\t\t\t0.121569,\n\t\t\t0.122908,\n\t\t\t0.047536,\n\t\t\t0.281624,\n\t\t\t0.12549,\n\t\t\t0.129285,\n\t\t\t0.047293,\n\t\t\t0.290788,\n\t\t\t0.129412,\n\t\t\t0.135778,\n\t\t\t0.046856,\n\t\t\t0.299776,\n\t\t\t0.133333,\n\t\t\t0.142378,\n\t\t\t0.046242,\n\t\t\t0.308553,\n\t\t\t0.137255,\n\t\t\t0.149073,\n\t\t\t0.045468,\n\t\t\t0.317085,\n\t\t\t0.141176,\n\t\t\t0.15585,\n\t\t\t0.044559,\n\t\t\t0.325338,\n\t\t\t0.145098,\n\t\t\t0.162689,\n\t\t\t0.043554,\n\t\t\t0.333277,\n\t\t\t0.14902,\n\t\t\t0.169575,\n\t\t\t0.042489,\n\t\t\t0.340874,\n\t\t\t0.152941,\n\t\t\t0.176493,\n\t\t\t0.041402,\n\t\t\t0.348111,\n\t\t\t0.156863,\n\t\t\t0.183429,\n\t\t\t0.040329,\n\t\t\t0.354971,\n\t\t\t0.160784,\n\t\t\t0.190367,\n\t\t\t0.039309,\n\t\t\t0.361447,\n\t\t\t0.164706,\n\t\t\t0.197297,\n\t\t\t0.0384,\n\t\t\t0.367535,\n\t\t\t0.168627,\n\t\t\t0.204209,\n\t\t\t0.037632,\n\t\t\t0.373238,\n\t\t\t0.172549,\n\t\t\t0.211095,\n\t\t\t0.03703,\n\t\t\t0.378563,\n\t\t\t0.176471,\n\t\t\t0.217949,\n\t\t\t0.036615,\n\t\t\t0.383522,\n\t\t\t0.180392,\n\t\t\t0.224763,\n\t\t\t0.036405,\n\t\t\t0.388129,\n\t\t\t0.184314,\n\t\t\t0.231538,\n\t\t\t0.036405,\n\t\t\t0.3924,\n\t\t\t0.188235,\n\t\t\t0.238273,\n\t\t\t0.036621,\n\t\t\t0.396353,\n\t\t\t0.192157,\n\t\t\t0.244967,\n\t\t\t0.037055,\n\t\t\t0.400007,\n\t\t\t0.196078,\n\t\t\t0.25162,\n\t\t\t0.037705,\n\t\t\t0.403378,\n\t\t\t0.2,\n\t\t\t0.258234,\n\t\t\t0.038571,\n\t\t\t0.406485,\n\t\t\t0.203922,\n\t\t\t0.26481,\n\t\t\t0.039647,\n\t\t\t0.409345,\n\t\t\t0.207843,\n\t\t\t0.271347,\n\t\t\t0.040922,\n\t\t\t0.411976,\n\t\t\t0.211765,\n\t\t\t0.27785,\n\t\t\t0.042353,\n\t\t\t0.414392,\n\t\t\t0.215686,\n\t\t\t0.284321,\n\t\t\t0.043933,\n\t\t\t0.416608,\n\t\t\t0.219608,\n\t\t\t0.290763,\n\t\t\t0.045644,\n\t\t\t0.418637,\n\t\t\t0.223529,\n\t\t\t0.297178,\n\t\t\t0.04747,\n\t\t\t0.420491,\n\t\t\t0.227451,\n\t\t\t0.303568,\n\t\t\t0.049396,\n\t\t\t0.422182,\n\t\t\t0.231373,\n\t\t\t0.309935,\n\t\t\t0.051407,\n\t\t\t0.423721,\n\t\t\t0.235294,\n\t\t\t0.316282,\n\t\t\t0.05349,\n\t\t\t0.425116,\n\t\t\t0.239216,\n\t\t\t0.32261,\n\t\t\t0.055634,\n\t\t\t0.426377,\n\t\t\t0.243137,\n\t\t\t0.328921,\n\t\t\t0.057827,\n\t\t\t0.427511,\n\t\t\t0.247059,\n\t\t\t0.335217,\n\t\t\t0.06006,\n\t\t\t0.428524,\n\t\t\t0.25098,\n\t\t\t0.3415,\n\t\t\t0.062325,\n\t\t\t0.429425,\n\t\t\t0.254902,\n\t\t\t0.347771,\n\t\t\t0.064616,\n\t\t\t0.430217,\n\t\t\t0.258824,\n\t\t\t0.354032,\n\t\t\t0.066925,\n\t\t\t0.430906,\n\t\t\t0.262745,\n\t\t\t0.360284,\n\t\t\t0.069247,\n\t\t\t0.431497,\n\t\t\t0.266667,\n\t\t\t0.366529,\n\t\t\t0.071579,\n\t\t\t0.431994,\n\t\t\t0.270588,\n\t\t\t0.372768,\n\t\t\t0.073915,\n\t\t\t0.4324,\n\t\t\t0.27451,\n\t\t\t0.379001,\n\t\t\t0.076253,\n\t\t\t0.432719,\n\t\t\t0.278431,\n\t\t\t0.385228,\n\t\t\t0.078591,\n\t\t\t0.432955,\n\t\t\t0.282353,\n\t\t\t0.391453,\n\t\t\t0.080927,\n\t\t\t0.433109,\n\t\t\t0.286275,\n\t\t\t0.397674,\n\t\t\t0.083257,\n\t\t\t0.433183,\n\t\t\t0.290196,\n\t\t\t0.403894,\n\t\t\t0.08558,\n\t\t\t0.433179,\n\t\t\t0.294118,\n\t\t\t0.410113,\n\t\t\t0.087896,\n\t\t\t0.433098,\n\t\t\t0.298039,\n\t\t\t0.416331,\n\t\t\t0.090203,\n\t\t\t0.432943,\n\t\t\t0.301961,\n\t\t\t0.422549,\n\t\t\t0.092501,\n\t\t\t0.432714,\n\t\t\t0.305882,\n\t\t\t0.428768,\n\t\t\t0.09479,\n\t\t\t0.432412,\n\t\t\t0.309804,\n\t\t\t0.434987,\n\t\t\t0.097069,\n\t\t\t0.432039,\n\t\t\t0.313725,\n\t\t\t0.441207,\n\t\t\t0.099338,\n\t\t\t0.431594,\n\t\t\t0.317647,\n\t\t\t0.447428,\n\t\t\t0.101597,\n\t\t\t0.43108,\n\t\t\t0.321569,\n\t\t\t0.453651,\n\t\t\t0.103848,\n\t\t\t0.430498,\n\t\t\t0.32549,\n\t\t\t0.459875,\n\t\t\t0.106089,\n\t\t\t0.429846,\n\t\t\t0.329412,\n\t\t\t0.4661,\n\t\t\t0.108322,\n\t\t\t0.429125,\n\t\t\t0.333333,\n\t\t\t0.472328,\n\t\t\t0.110547,\n\t\t\t0.428334,\n\t\t\t0.337255,\n\t\t\t0.478558,\n\t\t\t0.112764,\n\t\t\t0.427475,\n\t\t\t0.341176,\n\t\t\t0.484789,\n\t\t\t0.114974,\n\t\t\t0.426548,\n\t\t\t0.345098,\n\t\t\t0.491022,\n\t\t\t0.117179,\n\t\t\t0.425552,\n\t\t\t0.34902,\n\t\t\t0.497257,\n\t\t\t0.119379,\n\t\t\t0.424488,\n\t\t\t0.352941,\n\t\t\t0.503493,\n\t\t\t0.121575,\n\t\t\t0.423356,\n\t\t\t0.356863,\n\t\t\t0.50973,\n\t\t\t0.123769,\n\t\t\t0.422156,\n\t\t\t0.360784,\n\t\t\t0.515967,\n\t\t\t0.12596,\n\t\t\t0.420887,\n\t\t\t0.364706,\n\t\t\t0.522206,\n\t\t\t0.12815,\n\t\t\t0.419549,\n\t\t\t0.368627,\n\t\t\t0.528444,\n\t\t\t0.130341,\n\t\t\t0.418142,\n\t\t\t0.372549,\n\t\t\t0.534683,\n\t\t\t0.132534,\n\t\t\t0.416667,\n\t\t\t0.376471,\n\t\t\t0.54092,\n\t\t\t0.134729,\n\t\t\t0.415123,\n\t\t\t0.380392,\n\t\t\t0.547157,\n\t\t\t0.136929,\n\t\t\t0.413511,\n\t\t\t0.384314,\n\t\t\t0.553392,\n\t\t\t0.139134,\n\t\t\t0.411829,\n\t\t\t0.388235,\n\t\t\t0.559624,\n\t\t\t0.141346,\n\t\t\t0.410078,\n\t\t\t0.392157,\n\t\t\t0.565854,\n\t\t\t0.143567,\n\t\t\t0.408258,\n\t\t\t0.396078,\n\t\t\t0.572081,\n\t\t\t0.145797,\n\t\t\t0.406369,\n\t\t\t0.4,\n\t\t\t0.578304,\n\t\t\t0.148039,\n\t\t\t0.404411,\n\t\t\t0.403922,\n\t\t\t0.584521,\n\t\t\t0.150294,\n\t\t\t0.402385,\n\t\t\t0.407843,\n\t\t\t0.590734,\n\t\t\t0.152563,\n\t\t\t0.40029,\n\t\t\t0.411765,\n\t\t\t0.59694,\n\t\t\t0.154848,\n\t\t\t0.398125,\n\t\t\t0.415686,\n\t\t\t0.603139,\n\t\t\t0.157151,\n\t\t\t0.395891,\n\t\t\t0.419608,\n\t\t\t0.60933,\n\t\t\t0.159474,\n\t\t\t0.393589,\n\t\t\t0.423529,\n\t\t\t0.615513,\n\t\t\t0.161817,\n\t\t\t0.391219,\n\t\t\t0.427451,\n\t\t\t0.621685,\n\t\t\t0.164184,\n\t\t\t0.388781,\n\t\t\t0.431373,\n\t\t\t0.627847,\n\t\t\t0.166575,\n\t\t\t0.386276,\n\t\t\t0.435294,\n\t\t\t0.633998,\n\t\t\t0.168992,\n\t\t\t0.383704,\n\t\t\t0.439216,\n\t\t\t0.640135,\n\t\t\t0.171438,\n\t\t\t0.381065,\n\t\t\t0.443137,\n\t\t\t0.64626,\n\t\t\t0.173914,\n\t\t\t0.378359,\n\t\t\t0.447059,\n\t\t\t0.652369,\n\t\t\t0.176421,\n\t\t\t0.375586,\n\t\t\t0.45098,\n\t\t\t0.658463,\n\t\t\t0.178962,\n\t\t\t0.372748,\n\t\t\t0.454902,\n\t\t\t0.66454,\n\t\t\t0.181539,\n\t\t\t0.369846,\n\t\t\t0.458824,\n\t\t\t0.670599,\n\t\t\t0.184153,\n\t\t\t0.366879,\n\t\t\t0.462745,\n\t\t\t0.676638,\n\t\t\t0.186807,\n\t\t\t0.363849,\n\t\t\t0.466667,\n\t\t\t0.682656,\n\t\t\t0.189501,\n\t\t\t0.360757,\n\t\t\t0.470588,\n\t\t\t0.688653,\n\t\t\t0.192239,\n\t\t\t0.357603,\n\t\t\t0.47451,\n\t\t\t0.694627,\n\t\t\t0.195021,\n\t\t\t0.354388,\n\t\t\t0.478431,\n\t\t\t0.700576,\n\t\t\t0.197851,\n\t\t\t0.351113,\n\t\t\t0.482353,\n\t\t\t0.7065,\n\t\t\t0.200728,\n\t\t\t0.347777,\n\t\t\t0.486275,\n\t\t\t0.712396,\n\t\t\t0.203656,\n\t\t\t0.344383,\n\t\t\t0.490196,\n\t\t\t0.718264,\n\t\t\t0.206636,\n\t\t\t0.340931,\n\t\t\t0.494118,\n\t\t\t0.724103,\n\t\t\t0.20967,\n\t\t\t0.337424,\n\t\t\t0.498039,\n\t\t\t0.729909,\n\t\t\t0.212759,\n\t\t\t0.333861,\n\t\t\t0.501961,\n\t\t\t0.735683,\n\t\t\t0.215906,\n\t\t\t0.330245,\n\t\t\t0.505882,\n\t\t\t0.741423,\n\t\t\t0.219112,\n\t\t\t0.326576,\n\t\t\t0.509804,\n\t\t\t0.747127,\n\t\t\t0.222378,\n\t\t\t0.322856,\n\t\t\t0.513725,\n\t\t\t0.752794,\n\t\t\t0.225706,\n\t\t\t0.319085,\n\t\t\t0.517647,\n\t\t\t0.758422,\n\t\t\t0.229097,\n\t\t\t0.315266,\n\t\t\t0.521569,\n\t\t\t0.76401,\n\t\t\t0.232554,\n\t\t\t0.311399,\n\t\t\t0.52549,\n\t\t\t0.769556,\n\t\t\t0.236077,\n\t\t\t0.307485,\n\t\t\t0.529412,\n\t\t\t0.775059,\n\t\t\t0.239667,\n\t\t\t0.303526,\n\t\t\t0.533333,\n\t\t\t0.780517,\n\t\t\t0.243327,\n\t\t\t0.299523,\n\t\t\t0.537255,\n\t\t\t0.785929,\n\t\t\t0.247056,\n\t\t\t0.295477,\n\t\t\t0.541176,\n\t\t\t0.791293,\n\t\t\t0.250856,\n\t\t\t0.29139,\n\t\t\t0.545098,\n\t\t\t0.796607,\n\t\t\t0.254728,\n\t\t\t0.287264,\n\t\t\t0.54902,\n\t\t\t0.801871,\n\t\t\t0.258674,\n\t\t\t0.283099,\n\t\t\t0.552941,\n\t\t\t0.807082,\n\t\t\t0.262692,\n\t\t\t0.278898,\n\t\t\t0.556863,\n\t\t\t0.812239,\n\t\t\t0.266786,\n\t\t\t0.274661,\n\t\t\t0.560784,\n\t\t\t0.817341,\n\t\t\t0.270954,\n\t\t\t0.27039,\n\t\t\t0.564706,\n\t\t\t0.822386,\n\t\t\t0.275197,\n\t\t\t0.266085,\n\t\t\t0.568627,\n\t\t\t0.827372,\n\t\t\t0.279517,\n\t\t\t0.26175,\n\t\t\t0.572549,\n\t\t\t0.832299,\n\t\t\t0.283913,\n\t\t\t0.257383,\n\t\t\t0.576471,\n\t\t\t0.837165,\n\t\t\t0.288385,\n\t\t\t0.252988,\n\t\t\t0.580392,\n\t\t\t0.841969,\n\t\t\t0.292933,\n\t\t\t0.248564,\n\t\t\t0.584314,\n\t\t\t0.846709,\n\t\t\t0.297559,\n\t\t\t0.244113,\n\t\t\t0.588235,\n\t\t\t0.851384,\n\t\t\t0.30226,\n\t\t\t0.239636,\n\t\t\t0.592157,\n\t\t\t0.855992,\n\t\t\t0.307038,\n\t\t\t0.235133,\n\t\t\t0.596078,\n\t\t\t0.860533,\n\t\t\t0.311892,\n\t\t\t0.230606,\n\t\t\t0.6,\n\t\t\t0.865006,\n\t\t\t0.316822,\n\t\t\t0.226055,\n\t\t\t0.603922,\n\t\t\t0.869409,\n\t\t\t0.321827,\n\t\t\t0.221482,\n\t\t\t0.607843,\n\t\t\t0.873741,\n\t\t\t0.326906,\n\t\t\t0.216886,\n\t\t\t0.611765,\n\t\t\t0.878001,\n\t\t\t0.33206,\n\t\t\t0.212268,\n\t\t\t0.615686,\n\t\t\t0.882188,\n\t\t\t0.337287,\n\t\t\t0.207628,\n\t\t\t0.619608,\n\t\t\t0.886302,\n\t\t\t0.342586,\n\t\t\t0.202968,\n\t\t\t0.623529,\n\t\t\t0.890341,\n\t\t\t0.347957,\n\t\t\t0.198286,\n\t\t\t0.627451,\n\t\t\t0.894305,\n\t\t\t0.353399,\n\t\t\t0.193584,\n\t\t\t0.631373,\n\t\t\t0.898192,\n\t\t\t0.358911,\n\t\t\t0.18886,\n\t\t\t0.635294,\n\t\t\t0.902003,\n\t\t\t0.364492,\n\t\t\t0.184116,\n\t\t\t0.639216,\n\t\t\t0.905735,\n\t\t\t0.37014,\n\t\t\t0.17935,\n\t\t\t0.643137,\n\t\t\t0.90939,\n\t\t\t0.375856,\n\t\t\t0.174563,\n\t\t\t0.647059,\n\t\t\t0.912966,\n\t\t\t0.381636,\n\t\t\t0.169755,\n\t\t\t0.65098,\n\t\t\t0.916462,\n\t\t\t0.387481,\n\t\t\t0.164924,\n\t\t\t0.654902,\n\t\t\t0.919879,\n\t\t\t0.393389,\n\t\t\t0.16007,\n\t\t\t0.658824,\n\t\t\t0.923215,\n\t\t\t0.399359,\n\t\t\t0.155193,\n\t\t\t0.662745,\n\t\t\t0.92647,\n\t\t\t0.405389,\n\t\t\t0.150292,\n\t\t\t0.666667,\n\t\t\t0.929644,\n\t\t\t0.411479,\n\t\t\t0.145367,\n\t\t\t0.670588,\n\t\t\t0.932737,\n\t\t\t0.417627,\n\t\t\t0.140417,\n\t\t\t0.67451,\n\t\t\t0.935747,\n\t\t\t0.423831,\n\t\t\t0.13544,\n\t\t\t0.678431,\n\t\t\t0.938675,\n\t\t\t0.430091,\n\t\t\t0.130438,\n\t\t\t0.682353,\n\t\t\t0.941521,\n\t\t\t0.436405,\n\t\t\t0.125409,\n\t\t\t0.686275,\n\t\t\t0.944285,\n\t\t\t0.442772,\n\t\t\t0.120354,\n\t\t\t0.690196,\n\t\t\t0.946965,\n\t\t\t0.449191,\n\t\t\t0.115272,\n\t\t\t0.694118,\n\t\t\t0.949562,\n\t\t\t0.45566,\n\t\t\t0.110164,\n\t\t\t0.698039,\n\t\t\t0.952075,\n\t\t\t0.462178,\n\t\t\t0.105031,\n\t\t\t0.701961,\n\t\t\t0.954506,\n\t\t\t0.468744,\n\t\t\t0.099874,\n\t\t\t0.705882,\n\t\t\t0.956852,\n\t\t\t0.475356,\n\t\t\t0.094695,\n\t\t\t0.709804,\n\t\t\t0.959114,\n\t\t\t0.482014,\n\t\t\t0.089499,\n\t\t\t0.713725,\n\t\t\t0.961293,\n\t\t\t0.488716,\n\t\t\t0.084289,\n\t\t\t0.717647,\n\t\t\t0.963387,\n\t\t\t0.495462,\n\t\t\t0.079073,\n\t\t\t0.721569,\n\t\t\t0.965397,\n\t\t\t0.502249,\n\t\t\t0.073859,\n\t\t\t0.72549,\n\t\t\t0.967322,\n\t\t\t0.509078,\n\t\t\t0.068659,\n\t\t\t0.729412,\n\t\t\t0.969163,\n\t\t\t0.515946,\n\t\t\t0.063488,\n\t\t\t0.733333,\n\t\t\t0.970919,\n\t\t\t0.522853,\n\t\t\t0.058367,\n\t\t\t0.737255,\n\t\t\t0.97259,\n\t\t\t0.529798,\n\t\t\t0.053324,\n\t\t\t0.741176,\n\t\t\t0.974176,\n\t\t\t0.53678,\n\t\t\t0.048392,\n\t\t\t0.745098,\n\t\t\t0.975677,\n\t\t\t0.543798,\n\t\t\t0.043618,\n\t\t\t0.74902,\n\t\t\t0.977092,\n\t\t\t0.55085,\n\t\t\t0.03905,\n\t\t\t0.752941,\n\t\t\t0.978422,\n\t\t\t0.557937,\n\t\t\t0.034931,\n\t\t\t0.756863,\n\t\t\t0.979666,\n\t\t\t0.565057,\n\t\t\t0.031409,\n\t\t\t0.760784,\n\t\t\t0.980824,\n\t\t\t0.572209,\n\t\t\t0.028508,\n\t\t\t0.764706,\n\t\t\t0.981895,\n\t\t\t0.579392,\n\t\t\t0.02625,\n\t\t\t0.768627,\n\t\t\t0.982881,\n\t\t\t0.586606,\n\t\t\t0.024661,\n\t\t\t0.772549,\n\t\t\t0.983779,\n\t\t\t0.593849,\n\t\t\t0.02377,\n\t\t\t0.776471,\n\t\t\t0.984591,\n\t\t\t0.601122,\n\t\t\t0.023606,\n\t\t\t0.780392,\n\t\t\t0.985315,\n\t\t\t0.608422,\n\t\t\t0.024202,\n\t\t\t0.784314,\n\t\t\t0.985952,\n\t\t\t0.61575,\n\t\t\t0.025592,\n\t\t\t0.788235,\n\t\t\t0.986502,\n\t\t\t0.623105,\n\t\t\t0.027814,\n\t\t\t0.792157,\n\t\t\t0.986964,\n\t\t\t0.630485,\n\t\t\t0.030908,\n\t\t\t0.796078,\n\t\t\t0.987337,\n\t\t\t0.63789,\n\t\t\t0.034916,\n\t\t\t0.8,\n\t\t\t0.987622,\n\t\t\t0.64532,\n\t\t\t0.039886,\n\t\t\t0.803922,\n\t\t\t0.987819,\n\t\t\t0.652773,\n\t\t\t0.045581,\n\t\t\t0.807843,\n\t\t\t0.987926,\n\t\t\t0.66025,\n\t\t\t0.05175,\n\t\t\t0.811765,\n\t\t\t0.987945,\n\t\t\t0.667748,\n\t\t\t0.058329,\n\t\t\t0.815686,\n\t\t\t0.987874,\n\t\t\t0.675267,\n\t\t\t0.065257,\n\t\t\t0.819608,\n\t\t\t0.987714,\n\t\t\t0.682807,\n\t\t\t0.072489,\n\t\t\t0.823529,\n\t\t\t0.987464,\n\t\t\t0.690366,\n\t\t\t0.07999,\n\t\t\t0.827451,\n\t\t\t0.987124,\n\t\t\t0.697944,\n\t\t\t0.087731,\n\t\t\t0.831373,\n\t\t\t0.986694,\n\t\t\t0.70554,\n\t\t\t0.095694,\n\t\t\t0.835294,\n\t\t\t0.986175,\n\t\t\t0.713153,\n\t\t\t0.103863,\n\t\t\t0.839216,\n\t\t\t0.985566,\n\t\t\t0.720782,\n\t\t\t0.112229,\n\t\t\t0.843137,\n\t\t\t0.984865,\n\t\t\t0.728427,\n\t\t\t0.120785,\n\t\t\t0.847059,\n\t\t\t0.984075,\n\t\t\t0.736087,\n\t\t\t0.129527,\n\t\t\t0.85098,\n\t\t\t0.983196,\n\t\t\t0.743758,\n\t\t\t0.138453,\n\t\t\t0.854902,\n\t\t\t0.982228,\n\t\t\t0.751442,\n\t\t\t0.147565,\n\t\t\t0.858824,\n\t\t\t0.981173,\n\t\t\t0.759135,\n\t\t\t0.156863,\n\t\t\t0.862745,\n\t\t\t0.980032,\n\t\t\t0.766837,\n\t\t\t0.166353,\n\t\t\t0.866667,\n\t\t\t0.978806,\n\t\t\t0.774545,\n\t\t\t0.176037,\n\t\t\t0.870588,\n\t\t\t0.977497,\n\t\t\t0.782258,\n\t\t\t0.185923,\n\t\t\t0.87451,\n\t\t\t0.976108,\n\t\t\t0.789974,\n\t\t\t0.196018,\n\t\t\t0.878431,\n\t\t\t0.974638,\n\t\t\t0.797692,\n\t\t\t0.206332,\n\t\t\t0.882353,\n\t\t\t0.973088,\n\t\t\t0.805409,\n\t\t\t0.216877,\n\t\t\t0.886275,\n\t\t\t0.971468,\n\t\t\t0.813122,\n\t\t\t0.227658,\n\t\t\t0.890196,\n\t\t\t0.969783,\n\t\t\t0.820825,\n\t\t\t0.238686,\n\t\t\t0.894118,\n\t\t\t0.968041,\n\t\t\t0.828515,\n\t\t\t0.249972,\n\t\t\t0.898039,\n\t\t\t0.966243,\n\t\t\t0.836191,\n\t\t\t0.261534,\n\t\t\t0.901961,\n\t\t\t0.964394,\n\t\t\t0.843848,\n\t\t\t0.273391,\n\t\t\t0.905882,\n\t\t\t0.962517,\n\t\t\t0.851476,\n\t\t\t0.285546,\n\t\t\t0.909804,\n\t\t\t0.960626,\n\t\t\t0.859069,\n\t\t\t0.29801,\n\t\t\t0.913725,\n\t\t\t0.95872,\n\t\t\t0.866624,\n\t\t\t0.31082,\n\t\t\t0.917647,\n\t\t\t0.956834,\n\t\t\t0.874129,\n\t\t\t0.323974,\n\t\t\t0.921569,\n\t\t\t0.954997,\n\t\t\t0.881569,\n\t\t\t0.337475,\n\t\t\t0.92549,\n\t\t\t0.953215,\n\t\t\t0.888942,\n\t\t\t0.351369,\n\t\t\t0.929412,\n\t\t\t0.951546,\n\t\t\t0.896226,\n\t\t\t0.365627,\n\t\t\t0.933333,\n\t\t\t0.950018,\n\t\t\t0.903409,\n\t\t\t0.380271,\n\t\t\t0.937255,\n\t\t\t0.948683,\n\t\t\t0.910473,\n\t\t\t0.395289,\n\t\t\t0.941176,\n\t\t\t0.947594,\n\t\t\t0.917399,\n\t\t\t0.410665,\n\t\t\t0.945098,\n\t\t\t0.946809,\n\t\t\t0.924168,\n\t\t\t0.426373,\n\t\t\t0.94902,\n\t\t\t0.946392,\n\t\t\t0.930761,\n\t\t\t0.442367,\n\t\t\t0.952941,\n\t\t\t0.946403,\n\t\t\t0.937159,\n\t\t\t0.458592,\n\t\t\t0.956863,\n\t\t\t0.946903,\n\t\t\t0.943348,\n\t\t\t0.47497,\n\t\t\t0.960784,\n\t\t\t0.947937,\n\t\t\t0.949318,\n\t\t\t0.491426,\n\t\t\t0.964706,\n\t\t\t0.949545,\n\t\t\t0.955063,\n\t\t\t0.50786,\n\t\t\t0.968627,\n\t\t\t0.95174,\n\t\t\t0.960587,\n\t\t\t0.524203,\n\t\t\t0.972549,\n\t\t\t0.954529,\n\t\t\t0.965896,\n\t\t\t0.540361,\n\t\t\t0.976471,\n\t\t\t0.957896,\n\t\t\t0.971003,\n\t\t\t0.556275,\n\t\t\t0.980392,\n\t\t\t0.961812,\n\t\t\t0.975924,\n\t\t\t0.571925,\n\t\t\t0.984314,\n\t\t\t0.966249,\n\t\t\t0.980678,\n\t\t\t0.587206,\n\t\t\t0.988235,\n\t\t\t0.971162,\n\t\t\t0.985282,\n\t\t\t0.602154,\n\t\t\t0.992157,\n\t\t\t0.976511,\n\t\t\t0.989753,\n\t\t\t0.61676,\n\t\t\t0.996078,\n\t\t\t0.982257,\n\t\t\t0.994109,\n\t\t\t0.631017,\n\t\t\t1,\n\t\t\t0.988362,\n\t\t\t0.998364,\n\t\t\t0.644924\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Diverging\",\n\t\tName: \"Plasma (matplotlib)\",\n\t\tNanColor: [\n\t\t\t0,\n\t\t\t1,\n\t\t\t0\n\t\t],\n\t\tSource: \"https://github.com/BIDS/colormap/blob/master/colormaps.py\",\n\t\tLicense: \"CC0\",\n\t\tCreator: \"Nathaniel J. Smith & Stefan van der Walt\",\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.050383,\n\t\t\t0.029803,\n\t\t\t0.527975,\n\t\t\t0.003922,\n\t\t\t0.063536,\n\t\t\t0.028426,\n\t\t\t0.533124,\n\t\t\t0.007843,\n\t\t\t0.075353,\n\t\t\t0.027206,\n\t\t\t0.538007,\n\t\t\t0.011765,\n\t\t\t0.086222,\n\t\t\t0.026125,\n\t\t\t0.542658,\n\t\t\t0.015686,\n\t\t\t0.096379,\n\t\t\t0.025165,\n\t\t\t0.547103,\n\t\t\t0.019608,\n\t\t\t0.10598,\n\t\t\t0.024309,\n\t\t\t0.551368,\n\t\t\t0.023529,\n\t\t\t0.115124,\n\t\t\t0.023556,\n\t\t\t0.555468,\n\t\t\t0.027451,\n\t\t\t0.123903,\n\t\t\t0.022878,\n\t\t\t0.559423,\n\t\t\t0.031373,\n\t\t\t0.132381,\n\t\t\t0.022258,\n\t\t\t0.56325,\n\t\t\t0.035294,\n\t\t\t0.140603,\n\t\t\t0.021687,\n\t\t\t0.566959,\n\t\t\t0.039216,\n\t\t\t0.148607,\n\t\t\t0.021154,\n\t\t\t0.570562,\n\t\t\t0.043137,\n\t\t\t0.156421,\n\t\t\t0.020651,\n\t\t\t0.574065,\n\t\t\t0.047059,\n\t\t\t0.16407,\n\t\t\t0.020171,\n\t\t\t0.577478,\n\t\t\t0.05098,\n\t\t\t0.171574,\n\t\t\t0.019706,\n\t\t\t0.580806,\n\t\t\t0.054902,\n\t\t\t0.17895,\n\t\t\t0.019252,\n\t\t\t0.584054,\n\t\t\t0.058824,\n\t\t\t0.186213,\n\t\t\t0.018803,\n\t\t\t0.587228,\n\t\t\t0.062745,\n\t\t\t0.193374,\n\t\t\t0.018354,\n\t\t\t0.59033,\n\t\t\t0.066667,\n\t\t\t0.200445,\n\t\t\t0.017902,\n\t\t\t0.593364,\n\t\t\t0.070588,\n\t\t\t0.207435,\n\t\t\t0.017442,\n\t\t\t0.596333,\n\t\t\t0.07451,\n\t\t\t0.21435,\n\t\t\t0.016973,\n\t\t\t0.599239,\n\t\t\t0.078431,\n\t\t\t0.221197,\n\t\t\t0.016497,\n\t\t\t0.602083,\n\t\t\t0.082353,\n\t\t\t0.227983,\n\t\t\t0.016007,\n\t\t\t0.604867,\n\t\t\t0.086275,\n\t\t\t0.234715,\n\t\t\t0.015502,\n\t\t\t0.607592,\n\t\t\t0.090196,\n\t\t\t0.241396,\n\t\t\t0.014979,\n\t\t\t0.610259,\n\t\t\t0.094118,\n\t\t\t0.248032,\n\t\t\t0.014439,\n\t\t\t0.612868,\n\t\t\t0.098039,\n\t\t\t0.254627,\n\t\t\t0.013882,\n\t\t\t0.615419,\n\t\t\t0.101961,\n\t\t\t0.261183,\n\t\t\t0.013308,\n\t\t\t0.617911,\n\t\t\t0.105882,\n\t\t\t0.267703,\n\t\t\t0.012716,\n\t\t\t0.620346,\n\t\t\t0.109804,\n\t\t\t0.274191,\n\t\t\t0.012109,\n\t\t\t0.622722,\n\t\t\t0.113725,\n\t\t\t0.280648,\n\t\t\t0.011488,\n\t\t\t0.625038,\n\t\t\t0.117647,\n\t\t\t0.287076,\n\t\t\t0.010855,\n\t\t\t0.627295,\n\t\t\t0.121569,\n\t\t\t0.293478,\n\t\t\t0.010213,\n\t\t\t0.62949,\n\t\t\t0.12549,\n\t\t\t0.299855,\n\t\t\t0.009561,\n\t\t\t0.631624,\n\t\t\t0.129412,\n\t\t\t0.30621,\n\t\t\t0.008902,\n\t\t\t0.633694,\n\t\t\t0.133333,\n\t\t\t0.312543,\n\t\t\t0.008239,\n\t\t\t0.6357,\n\t\t\t0.137255,\n\t\t\t0.318856,\n\t\t\t0.007576,\n\t\t\t0.63764,\n\t\t\t0.141176,\n\t\t\t0.32515,\n\t\t\t0.006915,\n\t\t\t0.639512,\n\t\t\t0.145098,\n\t\t\t0.331426,\n\t\t\t0.006261,\n\t\t\t0.641316,\n\t\t\t0.14902,\n\t\t\t0.337683,\n\t\t\t0.005618,\n\t\t\t0.643049,\n\t\t\t0.152941,\n\t\t\t0.343925,\n\t\t\t0.004991,\n\t\t\t0.64471,\n\t\t\t0.156863,\n\t\t\t0.35015,\n\t\t\t0.004382,\n\t\t\t0.646298,\n\t\t\t0.160784,\n\t\t\t0.356359,\n\t\t\t0.003798,\n\t\t\t0.64781,\n\t\t\t0.164706,\n\t\t\t0.362553,\n\t\t\t0.003243,\n\t\t\t0.649245,\n\t\t\t0.168627,\n\t\t\t0.368733,\n\t\t\t0.002724,\n\t\t\t0.650601,\n\t\t\t0.172549,\n\t\t\t0.374897,\n\t\t\t0.002245,\n\t\t\t0.651876,\n\t\t\t0.176471,\n\t\t\t0.381047,\n\t\t\t0.001814,\n\t\t\t0.653068,\n\t\t\t0.180392,\n\t\t\t0.387183,\n\t\t\t0.001434,\n\t\t\t0.654177,\n\t\t\t0.184314,\n\t\t\t0.393304,\n\t\t\t0.001114,\n\t\t\t0.655199,\n\t\t\t0.188235,\n\t\t\t0.399411,\n\t\t\t0.000859,\n\t\t\t0.656133,\n\t\t\t0.192157,\n\t\t\t0.405503,\n\t\t\t0.000678,\n\t\t\t0.656977,\n\t\t\t0.196078,\n\t\t\t0.41158,\n\t\t\t0.000577,\n\t\t\t0.65773,\n\t\t\t0.2,\n\t\t\t0.417642,\n\t\t\t0.000564,\n\t\t\t0.65839,\n\t\t\t0.203922,\n\t\t\t0.423689,\n\t\t\t0.000646,\n\t\t\t0.658956,\n\t\t\t0.207843,\n\t\t\t0.429719,\n\t\t\t0.000831,\n\t\t\t0.659425,\n\t\t\t0.211765,\n\t\t\t0.435734,\n\t\t\t0.001127,\n\t\t\t0.659797,\n\t\t\t0.215686,\n\t\t\t0.441732,\n\t\t\t0.00154,\n\t\t\t0.660069,\n\t\t\t0.219608,\n\t\t\t0.447714,\n\t\t\t0.00208,\n\t\t\t0.66024,\n\t\t\t0.223529,\n\t\t\t0.453677,\n\t\t\t0.002755,\n\t\t\t0.66031,\n\t\t\t0.227451,\n\t\t\t0.459623,\n\t\t\t0.003574,\n\t\t\t0.660277,\n\t\t\t0.231373,\n\t\t\t0.46555,\n\t\t\t0.004545,\n\t\t\t0.660139,\n\t\t\t0.235294,\n\t\t\t0.471457,\n\t\t\t0.005678,\n\t\t\t0.659897,\n\t\t\t0.239216,\n\t\t\t0.477344,\n\t\t\t0.00698,\n\t\t\t0.659549,\n\t\t\t0.243137,\n\t\t\t0.48321,\n\t\t\t0.00846,\n\t\t\t0.659095,\n\t\t\t0.247059,\n\t\t\t0.489055,\n\t\t\t0.010127,\n\t\t\t0.658534,\n\t\t\t0.25098,\n\t\t\t0.494877,\n\t\t\t0.01199,\n\t\t\t0.657865,\n\t\t\t0.254902,\n\t\t\t0.500678,\n\t\t\t0.014055,\n\t\t\t0.657088,\n\t\t\t0.258824,\n\t\t\t0.506454,\n\t\t\t0.016333,\n\t\t\t0.656202,\n\t\t\t0.262745,\n\t\t\t0.512206,\n\t\t\t0.018833,\n\t\t\t0.655209,\n\t\t\t0.266667,\n\t\t\t0.517933,\n\t\t\t0.021563,\n\t\t\t0.654109,\n\t\t\t0.270588,\n\t\t\t0.523633,\n\t\t\t0.024532,\n\t\t\t0.652901,\n\t\t\t0.27451,\n\t\t\t0.529306,\n\t\t\t0.027747,\n\t\t\t0.651586,\n\t\t\t0.278431,\n\t\t\t0.534952,\n\t\t\t0.031217,\n\t\t\t0.650165,\n\t\t\t0.282353,\n\t\t\t0.54057,\n\t\t\t0.03495,\n\t\t\t0.64864,\n\t\t\t0.286275,\n\t\t\t0.546157,\n\t\t\t0.038954,\n\t\t\t0.64701,\n\t\t\t0.290196,\n\t\t\t0.551715,\n\t\t\t0.043136,\n\t\t\t0.645277,\n\t\t\t0.294118,\n\t\t\t0.557243,\n\t\t\t0.047331,\n\t\t\t0.643443,\n\t\t\t0.298039,\n\t\t\t0.562738,\n\t\t\t0.051545,\n\t\t\t0.641509,\n\t\t\t0.301961,\n\t\t\t0.568201,\n\t\t\t0.055778,\n\t\t\t0.639477,\n\t\t\t0.305882,\n\t\t\t0.573632,\n\t\t\t0.060028,\n\t\t\t0.637349,\n\t\t\t0.309804,\n\t\t\t0.579029,\n\t\t\t0.064296,\n\t\t\t0.635126,\n\t\t\t0.313725,\n\t\t\t0.584391,\n\t\t\t0.068579,\n\t\t\t0.632812,\n\t\t\t0.317647,\n\t\t\t0.589719,\n\t\t\t0.072878,\n\t\t\t0.630408,\n\t\t\t0.321569,\n\t\t\t0.595011,\n\t\t\t0.07719,\n\t\t\t0.627917,\n\t\t\t0.32549,\n\t\t\t0.600266,\n\t\t\t0.081516,\n\t\t\t0.625342,\n\t\t\t0.329412,\n\t\t\t0.605485,\n\t\t\t0.085854,\n\t\t\t0.622686,\n\t\t\t0.333333,\n\t\t\t0.610667,\n\t\t\t0.090204,\n\t\t\t0.619951,\n\t\t\t0.337255,\n\t\t\t0.615812,\n\t\t\t0.094564,\n\t\t\t0.61714,\n\t\t\t0.341176,\n\t\t\t0.620919,\n\t\t\t0.098934,\n\t\t\t0.614257,\n\t\t\t0.345098,\n\t\t\t0.625987,\n\t\t\t0.103312,\n\t\t\t0.611305,\n\t\t\t0.34902,\n\t\t\t0.631017,\n\t\t\t0.107699,\n\t\t\t0.608287,\n\t\t\t0.352941,\n\t\t\t0.636008,\n\t\t\t0.112092,\n\t\t\t0.605205,\n\t\t\t0.356863,\n\t\t\t0.640959,\n\t\t\t0.116492,\n\t\t\t0.602065,\n\t\t\t0.360784,\n\t\t\t0.645872,\n\t\t\t0.120898,\n\t\t\t0.598867,\n\t\t\t0.364706,\n\t\t\t0.650746,\n\t\t\t0.125309,\n\t\t\t0.595617,\n\t\t\t0.368627,\n\t\t\t0.65558,\n\t\t\t0.129725,\n\t\t\t0.592317,\n\t\t\t0.372549,\n\t\t\t0.660374,\n\t\t\t0.134144,\n\t\t\t0.588971,\n\t\t\t0.376471,\n\t\t\t0.665129,\n\t\t\t0.138566,\n\t\t\t0.585582,\n\t\t\t0.380392,\n\t\t\t0.669845,\n\t\t\t0.142992,\n\t\t\t0.582154,\n\t\t\t0.384314,\n\t\t\t0.674522,\n\t\t\t0.147419,\n\t\t\t0.578688,\n\t\t\t0.388235,\n\t\t\t0.67916,\n\t\t\t0.151848,\n\t\t\t0.575189,\n\t\t\t0.392157,\n\t\t\t0.683758,\n\t\t\t0.156278,\n\t\t\t0.57166,\n\t\t\t0.396078,\n\t\t\t0.688318,\n\t\t\t0.160709,\n\t\t\t0.568103,\n\t\t\t0.4,\n\t\t\t0.69284,\n\t\t\t0.165141,\n\t\t\t0.564522,\n\t\t\t0.403922,\n\t\t\t0.697324,\n\t\t\t0.169573,\n\t\t\t0.560919,\n\t\t\t0.407843,\n\t\t\t0.701769,\n\t\t\t0.174005,\n\t\t\t0.557296,\n\t\t\t0.411765,\n\t\t\t0.706178,\n\t\t\t0.178437,\n\t\t\t0.553657,\n\t\t\t0.415686,\n\t\t\t0.710549,\n\t\t\t0.182868,\n\t\t\t0.550004,\n\t\t\t0.419608,\n\t\t\t0.714883,\n\t\t\t0.187299,\n\t\t\t0.546338,\n\t\t\t0.423529,\n\t\t\t0.719181,\n\t\t\t0.191729,\n\t\t\t0.542663,\n\t\t\t0.427451,\n\t\t\t0.723444,\n\t\t\t0.196158,\n\t\t\t0.538981,\n\t\t\t0.431373,\n\t\t\t0.72767,\n\t\t\t0.200586,\n\t\t\t0.535293,\n\t\t\t0.435294,\n\t\t\t0.731862,\n\t\t\t0.205013,\n\t\t\t0.531601,\n\t\t\t0.439216,\n\t\t\t0.736019,\n\t\t\t0.209439,\n\t\t\t0.527908,\n\t\t\t0.443137,\n\t\t\t0.740143,\n\t\t\t0.213864,\n\t\t\t0.524216,\n\t\t\t0.447059,\n\t\t\t0.744232,\n\t\t\t0.218288,\n\t\t\t0.520524,\n\t\t\t0.45098,\n\t\t\t0.748289,\n\t\t\t0.222711,\n\t\t\t0.516834,\n\t\t\t0.454902,\n\t\t\t0.752312,\n\t\t\t0.227133,\n\t\t\t0.513149,\n\t\t\t0.458824,\n\t\t\t0.756304,\n\t\t\t0.231555,\n\t\t\t0.509468,\n\t\t\t0.462745,\n\t\t\t0.760264,\n\t\t\t0.235976,\n\t\t\t0.505794,\n\t\t\t0.466667,\n\t\t\t0.764193,\n\t\t\t0.240396,\n\t\t\t0.502126,\n\t\t\t0.470588,\n\t\t\t0.76809,\n\t\t\t0.244817,\n\t\t\t0.498465,\n\t\t\t0.47451,\n\t\t\t0.771958,\n\t\t\t0.249237,\n\t\t\t0.494813,\n\t\t\t0.478431,\n\t\t\t0.775796,\n\t\t\t0.253658,\n\t\t\t0.491171,\n\t\t\t0.482353,\n\t\t\t0.779604,\n\t\t\t0.258078,\n\t\t\t0.487539,\n\t\t\t0.486275,\n\t\t\t0.783383,\n\t\t\t0.2625,\n\t\t\t0.483918,\n\t\t\t0.490196,\n\t\t\t0.787133,\n\t\t\t0.266922,\n\t\t\t0.480307,\n\t\t\t0.494118,\n\t\t\t0.790855,\n\t\t\t0.271345,\n\t\t\t0.476706,\n\t\t\t0.498039,\n\t\t\t0.794549,\n\t\t\t0.27577,\n\t\t\t0.473117,\n\t\t\t0.501961,\n\t\t\t0.798216,\n\t\t\t0.280197,\n\t\t\t0.469538,\n\t\t\t0.505882,\n\t\t\t0.801855,\n\t\t\t0.284626,\n\t\t\t0.465971,\n\t\t\t0.509804,\n\t\t\t0.805467,\n\t\t\t0.289057,\n\t\t\t0.462415,\n\t\t\t0.513725,\n\t\t\t0.809052,\n\t\t\t0.293491,\n\t\t\t0.45887,\n\t\t\t0.517647,\n\t\t\t0.812612,\n\t\t\t0.297928,\n\t\t\t0.455338,\n\t\t\t0.521569,\n\t\t\t0.816144,\n\t\t\t0.302368,\n\t\t\t0.451816,\n\t\t\t0.52549,\n\t\t\t0.819651,\n\t\t\t0.306812,\n\t\t\t0.448306,\n\t\t\t0.529412,\n\t\t\t0.823132,\n\t\t\t0.311261,\n\t\t\t0.444806,\n\t\t\t0.533333,\n\t\t\t0.826588,\n\t\t\t0.315714,\n\t\t\t0.441316,\n\t\t\t0.537255,\n\t\t\t0.830018,\n\t\t\t0.320172,\n\t\t\t0.437836,\n\t\t\t0.541176,\n\t\t\t0.833422,\n\t\t\t0.324635,\n\t\t\t0.434366,\n\t\t\t0.545098,\n\t\t\t0.836801,\n\t\t\t0.329105,\n\t\t\t0.430905,\n\t\t\t0.54902,\n\t\t\t0.840155,\n\t\t\t0.33358,\n\t\t\t0.427455,\n\t\t\t0.552941,\n\t\t\t0.843484,\n\t\t\t0.338062,\n\t\t\t0.424013,\n\t\t\t0.556863,\n\t\t\t0.846788,\n\t\t\t0.342551,\n\t\t\t0.420579,\n\t\t\t0.560784,\n\t\t\t0.850066,\n\t\t\t0.347048,\n\t\t\t0.417153,\n\t\t\t0.564706,\n\t\t\t0.853319,\n\t\t\t0.351553,\n\t\t\t0.413734,\n\t\t\t0.568627,\n\t\t\t0.856547,\n\t\t\t0.356066,\n\t\t\t0.410322,\n\t\t\t0.572549,\n\t\t\t0.85975,\n\t\t\t0.360588,\n\t\t\t0.406917,\n\t\t\t0.576471,\n\t\t\t0.862927,\n\t\t\t0.365119,\n\t\t\t0.403519,\n\t\t\t0.580392,\n\t\t\t0.866078,\n\t\t\t0.36966,\n\t\t\t0.400126,\n\t\t\t0.584314,\n\t\t\t0.869203,\n\t\t\t0.374212,\n\t\t\t0.396738,\n\t\t\t0.588235,\n\t\t\t0.872303,\n\t\t\t0.378774,\n\t\t\t0.393355,\n\t\t\t0.592157,\n\t\t\t0.875376,\n\t\t\t0.383347,\n\t\t\t0.389976,\n\t\t\t0.596078,\n\t\t\t0.878423,\n\t\t\t0.387932,\n\t\t\t0.3866,\n\t\t\t0.6,\n\t\t\t0.881443,\n\t\t\t0.392529,\n\t\t\t0.383229,\n\t\t\t0.603922,\n\t\t\t0.884436,\n\t\t\t0.397139,\n\t\t\t0.37986,\n\t\t\t0.607843,\n\t\t\t0.887402,\n\t\t\t0.401762,\n\t\t\t0.376494,\n\t\t\t0.611765,\n\t\t\t0.89034,\n\t\t\t0.406398,\n\t\t\t0.37313,\n\t\t\t0.615686,\n\t\t\t0.89325,\n\t\t\t0.411048,\n\t\t\t0.369768,\n\t\t\t0.619608,\n\t\t\t0.896131,\n\t\t\t0.415712,\n\t\t\t0.366407,\n\t\t\t0.623529,\n\t\t\t0.898984,\n\t\t\t0.420392,\n\t\t\t0.363047,\n\t\t\t0.627451,\n\t\t\t0.901807,\n\t\t\t0.425087,\n\t\t\t0.359688,\n\t\t\t0.631373,\n\t\t\t0.904601,\n\t\t\t0.429797,\n\t\t\t0.356329,\n\t\t\t0.635294,\n\t\t\t0.907365,\n\t\t\t0.434524,\n\t\t\t0.35297,\n\t\t\t0.639216,\n\t\t\t0.910098,\n\t\t\t0.439268,\n\t\t\t0.34961,\n\t\t\t0.643137,\n\t\t\t0.9128,\n\t\t\t0.444029,\n\t\t\t0.346251,\n\t\t\t0.647059,\n\t\t\t0.915471,\n\t\t\t0.448807,\n\t\t\t0.34289,\n\t\t\t0.65098,\n\t\t\t0.918109,\n\t\t\t0.453603,\n\t\t\t0.339529,\n\t\t\t0.654902,\n\t\t\t0.920714,\n\t\t\t0.458417,\n\t\t\t0.336166,\n\t\t\t0.658824,\n\t\t\t0.923287,\n\t\t\t0.463251,\n\t\t\t0.332801,\n\t\t\t0.662745,\n\t\t\t0.925825,\n\t\t\t0.468103,\n\t\t\t0.329435,\n\t\t\t0.666667,\n\t\t\t0.928329,\n\t\t\t0.472975,\n\t\t\t0.326067,\n\t\t\t0.670588,\n\t\t\t0.930798,\n\t\t\t0.477867,\n\t\t\t0.322697,\n\t\t\t0.67451,\n\t\t\t0.933232,\n\t\t\t0.48278,\n\t\t\t0.319325,\n\t\t\t0.678431,\n\t\t\t0.93563,\n\t\t\t0.487712,\n\t\t\t0.315952,\n\t\t\t0.682353,\n\t\t\t0.93799,\n\t\t\t0.492667,\n\t\t\t0.312575,\n\t\t\t0.686275,\n\t\t\t0.940313,\n\t\t\t0.497642,\n\t\t\t0.309197,\n\t\t\t0.690196,\n\t\t\t0.942598,\n\t\t\t0.502639,\n\t\t\t0.305816,\n\t\t\t0.694118,\n\t\t\t0.944844,\n\t\t\t0.507658,\n\t\t\t0.302433,\n\t\t\t0.698039,\n\t\t\t0.947051,\n\t\t\t0.512699,\n\t\t\t0.299049,\n\t\t\t0.701961,\n\t\t\t0.949217,\n\t\t\t0.517763,\n\t\t\t0.295662,\n\t\t\t0.705882,\n\t\t\t0.951344,\n\t\t\t0.52285,\n\t\t\t0.292275,\n\t\t\t0.709804,\n\t\t\t0.953428,\n\t\t\t0.52796,\n\t\t\t0.288883,\n\t\t\t0.713725,\n\t\t\t0.95547,\n\t\t\t0.533093,\n\t\t\t0.28549,\n\t\t\t0.717647,\n\t\t\t0.957469,\n\t\t\t0.53825,\n\t\t\t0.282096,\n\t\t\t0.721569,\n\t\t\t0.959424,\n\t\t\t0.543431,\n\t\t\t0.278701,\n\t\t\t0.72549,\n\t\t\t0.961336,\n\t\t\t0.548636,\n\t\t\t0.275305,\n\t\t\t0.729412,\n\t\t\t0.963203,\n\t\t\t0.553865,\n\t\t\t0.271909,\n\t\t\t0.733333,\n\t\t\t0.965024,\n\t\t\t0.559118,\n\t\t\t0.268513,\n\t\t\t0.737255,\n\t\t\t0.966798,\n\t\t\t0.564396,\n\t\t\t0.265118,\n\t\t\t0.741176,\n\t\t\t0.968526,\n\t\t\t0.5697,\n\t\t\t0.261721,\n\t\t\t0.745098,\n\t\t\t0.970205,\n\t\t\t0.575028,\n\t\t\t0.258325,\n\t\t\t0.74902,\n\t\t\t0.971835,\n\t\t\t0.580382,\n\t\t\t0.254931,\n\t\t\t0.752941,\n\t\t\t0.973416,\n\t\t\t0.585761,\n\t\t\t0.25154,\n\t\t\t0.756863,\n\t\t\t0.974947,\n\t\t\t0.591165,\n\t\t\t0.248151,\n\t\t\t0.760784,\n\t\t\t0.976428,\n\t\t\t0.596595,\n\t\t\t0.244767,\n\t\t\t0.764706,\n\t\t\t0.977856,\n\t\t\t0.602051,\n\t\t\t0.241387,\n\t\t\t0.768627,\n\t\t\t0.979233,\n\t\t\t0.607532,\n\t\t\t0.238013,\n\t\t\t0.772549,\n\t\t\t0.980556,\n\t\t\t0.613039,\n\t\t\t0.234646,\n\t\t\t0.776471,\n\t\t\t0.981826,\n\t\t\t0.618572,\n\t\t\t0.231287,\n\t\t\t0.780392,\n\t\t\t0.983041,\n\t\t\t0.624131,\n\t\t\t0.227937,\n\t\t\t0.784314,\n\t\t\t0.984199,\n\t\t\t0.629718,\n\t\t\t0.224595,\n\t\t\t0.788235,\n\t\t\t0.985301,\n\t\t\t0.63533,\n\t\t\t0.221265,\n\t\t\t0.792157,\n\t\t\t0.986345,\n\t\t\t0.640969,\n\t\t\t0.217948,\n\t\t\t0.796078,\n\t\t\t0.987332,\n\t\t\t0.646633,\n\t\t\t0.214648,\n\t\t\t0.8,\n\t\t\t0.98826,\n\t\t\t0.652325,\n\t\t\t0.211364,\n\t\t\t0.803922,\n\t\t\t0.989128,\n\t\t\t0.658043,\n\t\t\t0.2081,\n\t\t\t0.807843,\n\t\t\t0.989935,\n\t\t\t0.663787,\n\t\t\t0.204859,\n\t\t\t0.811765,\n\t\t\t0.990681,\n\t\t\t0.669558,\n\t\t\t0.201642,\n\t\t\t0.815686,\n\t\t\t0.991365,\n\t\t\t0.675355,\n\t\t\t0.198453,\n\t\t\t0.819608,\n\t\t\t0.991985,\n\t\t\t0.681179,\n\t\t\t0.195295,\n\t\t\t0.823529,\n\t\t\t0.992541,\n\t\t\t0.68703,\n\t\t\t0.19217,\n\t\t\t0.827451,\n\t\t\t0.993032,\n\t\t\t0.692907,\n\t\t\t0.189084,\n\t\t\t0.831373,\n\t\t\t0.993456,\n\t\t\t0.69881,\n\t\t\t0.186041,\n\t\t\t0.835294,\n\t\t\t0.993814,\n\t\t\t0.704741,\n\t\t\t0.183043,\n\t\t\t0.839216,\n\t\t\t0.994103,\n\t\t\t0.710698,\n\t\t\t0.180097,\n\t\t\t0.843137,\n\t\t\t0.994324,\n\t\t\t0.716681,\n\t\t\t0.177208,\n\t\t\t0.847059,\n\t\t\t0.994474,\n\t\t\t0.722691,\n\t\t\t0.174381,\n\t\t\t0.85098,\n\t\t\t0.994553,\n\t\t\t0.728728,\n\t\t\t0.171622,\n\t\t\t0.854902,\n\t\t\t0.994561,\n\t\t\t0.734791,\n\t\t\t0.168938,\n\t\t\t0.858824,\n\t\t\t0.994495,\n\t\t\t0.74088,\n\t\t\t0.166335,\n\t\t\t0.862745,\n\t\t\t0.994355,\n\t\t\t0.746995,\n\t\t\t0.163821,\n\t\t\t0.866667,\n\t\t\t0.994141,\n\t\t\t0.753137,\n\t\t\t0.161404,\n\t\t\t0.870588,\n\t\t\t0.993851,\n\t\t\t0.759304,\n\t\t\t0.159092,\n\t\t\t0.87451,\n\t\t\t0.993482,\n\t\t\t0.765499,\n\t\t\t0.156891,\n\t\t\t0.878431,\n\t\t\t0.993033,\n\t\t\t0.77172,\n\t\t\t0.154808,\n\t\t\t0.882353,\n\t\t\t0.992505,\n\t\t\t0.777967,\n\t\t\t0.152855,\n\t\t\t0.886275,\n\t\t\t0.991897,\n\t\t\t0.784239,\n\t\t\t0.151042,\n\t\t\t0.890196,\n\t\t\t0.991209,\n\t\t\t0.790537,\n\t\t\t0.149377,\n\t\t\t0.894118,\n\t\t\t0.990439,\n\t\t\t0.796859,\n\t\t\t0.14787,\n\t\t\t0.898039,\n\t\t\t0.989587,\n\t\t\t0.803205,\n\t\t\t0.146529,\n\t\t\t0.901961,\n\t\t\t0.988648,\n\t\t\t0.809579,\n\t\t\t0.145357,\n\t\t\t0.905882,\n\t\t\t0.987621,\n\t\t\t0.815978,\n\t\t\t0.144363,\n\t\t\t0.909804,\n\t\t\t0.986509,\n\t\t\t0.822401,\n\t\t\t0.143557,\n\t\t\t0.913725,\n\t\t\t0.985314,\n\t\t\t0.828846,\n\t\t\t0.142945,\n\t\t\t0.917647,\n\t\t\t0.984031,\n\t\t\t0.835315,\n\t\t\t0.142528,\n\t\t\t0.921569,\n\t\t\t0.982653,\n\t\t\t0.841812,\n\t\t\t0.142303,\n\t\t\t0.92549,\n\t\t\t0.98119,\n\t\t\t0.848329,\n\t\t\t0.142279,\n\t\t\t0.929412,\n\t\t\t0.979644,\n\t\t\t0.854866,\n\t\t\t0.142453,\n\t\t\t0.933333,\n\t\t\t0.977995,\n\t\t\t0.861432,\n\t\t\t0.142808,\n\t\t\t0.937255,\n\t\t\t0.976265,\n\t\t\t0.868016,\n\t\t\t0.143351,\n\t\t\t0.941176,\n\t\t\t0.974443,\n\t\t\t0.874622,\n\t\t\t0.144061,\n\t\t\t0.945098,\n\t\t\t0.97253,\n\t\t\t0.88125,\n\t\t\t0.144923,\n\t\t\t0.94902,\n\t\t\t0.970533,\n\t\t\t0.887896,\n\t\t\t0.145919,\n\t\t\t0.952941,\n\t\t\t0.968443,\n\t\t\t0.894564,\n\t\t\t0.147014,\n\t\t\t0.956863,\n\t\t\t0.966271,\n\t\t\t0.901249,\n\t\t\t0.14818,\n\t\t\t0.960784,\n\t\t\t0.964021,\n\t\t\t0.90795,\n\t\t\t0.14937,\n\t\t\t0.964706,\n\t\t\t0.961681,\n\t\t\t0.914672,\n\t\t\t0.15052,\n\t\t\t0.968627,\n\t\t\t0.959276,\n\t\t\t0.921407,\n\t\t\t0.151566,\n\t\t\t0.972549,\n\t\t\t0.956808,\n\t\t\t0.928152,\n\t\t\t0.152409,\n\t\t\t0.976471,\n\t\t\t0.954287,\n\t\t\t0.934908,\n\t\t\t0.152921,\n\t\t\t0.980392,\n\t\t\t0.951726,\n\t\t\t0.941671,\n\t\t\t0.152925,\n\t\t\t0.984314,\n\t\t\t0.949151,\n\t\t\t0.948435,\n\t\t\t0.152178,\n\t\t\t0.988235,\n\t\t\t0.946602,\n\t\t\t0.95519,\n\t\t\t0.150328,\n\t\t\t0.992157,\n\t\t\t0.944152,\n\t\t\t0.961916,\n\t\t\t0.146861,\n\t\t\t0.996078,\n\t\t\t0.941896,\n\t\t\t0.96859,\n\t\t\t0.140956,\n\t\t\t1,\n\t\t\t0.940015,\n\t\t\t0.975158,\n\t\t\t0.131326\n\t\t]\n\t},\n\t{\n\t\tColorSpace: \"Diverging\",\n\t\tName: \"Viridis (matplotlib)\",\n\t\tNanColor: [\n\t\t\t1,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tSource: \"https://github.com/BIDS/colormap/blob/master/colormaps.py\",\n\t\tLicense: \"CC0\",\n\t\tCreator: \"Eric Firing\",\n\t\tRGBPoints: [\n\t\t\t0,\n\t\t\t0.267004,\n\t\t\t0.004874,\n\t\t\t0.329415,\n\t\t\t0.003922,\n\t\t\t0.26851,\n\t\t\t0.009605,\n\t\t\t0.335427,\n\t\t\t0.007843,\n\t\t\t0.269944,\n\t\t\t0.014625,\n\t\t\t0.341379,\n\t\t\t0.011765,\n\t\t\t0.271305,\n\t\t\t0.019942,\n\t\t\t0.347269,\n\t\t\t0.015686,\n\t\t\t0.272594,\n\t\t\t0.025563,\n\t\t\t0.353093,\n\t\t\t0.019608,\n\t\t\t0.273809,\n\t\t\t0.031497,\n\t\t\t0.358853,\n\t\t\t0.023529,\n\t\t\t0.274952,\n\t\t\t0.037752,\n\t\t\t0.364543,\n\t\t\t0.027451,\n\t\t\t0.276022,\n\t\t\t0.044167,\n\t\t\t0.370164,\n\t\t\t0.031373,\n\t\t\t0.277018,\n\t\t\t0.050344,\n\t\t\t0.375715,\n\t\t\t0.035294,\n\t\t\t0.277941,\n\t\t\t0.056324,\n\t\t\t0.381191,\n\t\t\t0.039216,\n\t\t\t0.278791,\n\t\t\t0.062145,\n\t\t\t0.386592,\n\t\t\t0.043137,\n\t\t\t0.279566,\n\t\t\t0.067836,\n\t\t\t0.391917,\n\t\t\t0.047059,\n\t\t\t0.280267,\n\t\t\t0.073417,\n\t\t\t0.397163,\n\t\t\t0.05098,\n\t\t\t0.280894,\n\t\t\t0.078907,\n\t\t\t0.402329,\n\t\t\t0.054902,\n\t\t\t0.281446,\n\t\t\t0.08432,\n\t\t\t0.407414,\n\t\t\t0.058824,\n\t\t\t0.281924,\n\t\t\t0.089666,\n\t\t\t0.412415,\n\t\t\t0.062745,\n\t\t\t0.282327,\n\t\t\t0.094955,\n\t\t\t0.417331,\n\t\t\t0.066667,\n\t\t\t0.282656,\n\t\t\t0.100196,\n\t\t\t0.42216,\n\t\t\t0.070588,\n\t\t\t0.28291,\n\t\t\t0.105393,\n\t\t\t0.426902,\n\t\t\t0.07451,\n\t\t\t0.283091,\n\t\t\t0.110553,\n\t\t\t0.431554,\n\t\t\t0.078431,\n\t\t\t0.283197,\n\t\t\t0.11568,\n\t\t\t0.436115,\n\t\t\t0.082353,\n\t\t\t0.283229,\n\t\t\t0.120777,\n\t\t\t0.440584,\n\t\t\t0.086275,\n\t\t\t0.283187,\n\t\t\t0.125848,\n\t\t\t0.44496,\n\t\t\t0.090196,\n\t\t\t0.283072,\n\t\t\t0.130895,\n\t\t\t0.449241,\n\t\t\t0.094118,\n\t\t\t0.282884,\n\t\t\t0.13592,\n\t\t\t0.453427,\n\t\t\t0.098039,\n\t\t\t0.282623,\n\t\t\t0.140926,\n\t\t\t0.457517,\n\t\t\t0.101961,\n\t\t\t0.28229,\n\t\t\t0.145912,\n\t\t\t0.46151,\n\t\t\t0.105882,\n\t\t\t0.281887,\n\t\t\t0.150881,\n\t\t\t0.465405,\n\t\t\t0.109804,\n\t\t\t0.281412,\n\t\t\t0.155834,\n\t\t\t0.469201,\n\t\t\t0.113725,\n\t\t\t0.280868,\n\t\t\t0.160771,\n\t\t\t0.472899,\n\t\t\t0.117647,\n\t\t\t0.280255,\n\t\t\t0.165693,\n\t\t\t0.476498,\n\t\t\t0.121569,\n\t\t\t0.279574,\n\t\t\t0.170599,\n\t\t\t0.479997,\n\t\t\t0.12549,\n\t\t\t0.278826,\n\t\t\t0.17549,\n\t\t\t0.483397,\n\t\t\t0.129412,\n\t\t\t0.278012,\n\t\t\t0.180367,\n\t\t\t0.486697,\n\t\t\t0.133333,\n\t\t\t0.277134,\n\t\t\t0.185228,\n\t\t\t0.489898,\n\t\t\t0.137255,\n\t\t\t0.276194,\n\t\t\t0.190074,\n\t\t\t0.493001,\n\t\t\t0.141176,\n\t\t\t0.275191,\n\t\t\t0.194905,\n\t\t\t0.496005,\n\t\t\t0.145098,\n\t\t\t0.274128,\n\t\t\t0.199721,\n\t\t\t0.498911,\n\t\t\t0.14902,\n\t\t\t0.273006,\n\t\t\t0.20452,\n\t\t\t0.501721,\n\t\t\t0.152941,\n\t\t\t0.271828,\n\t\t\t0.209303,\n\t\t\t0.504434,\n\t\t\t0.156863,\n\t\t\t0.270595,\n\t\t\t0.214069,\n\t\t\t0.507052,\n\t\t\t0.160784,\n\t\t\t0.269308,\n\t\t\t0.218818,\n\t\t\t0.509577,\n\t\t\t0.164706,\n\t\t\t0.267968,\n\t\t\t0.223549,\n\t\t\t0.512008,\n\t\t\t0.168627,\n\t\t\t0.26658,\n\t\t\t0.228262,\n\t\t\t0.514349,\n\t\t\t0.172549,\n\t\t\t0.265145,\n\t\t\t0.232956,\n\t\t\t0.516599,\n\t\t\t0.176471,\n\t\t\t0.263663,\n\t\t\t0.237631,\n\t\t\t0.518762,\n\t\t\t0.180392,\n\t\t\t0.262138,\n\t\t\t0.242286,\n\t\t\t0.520837,\n\t\t\t0.184314,\n\t\t\t0.260571,\n\t\t\t0.246922,\n\t\t\t0.522828,\n\t\t\t0.188235,\n\t\t\t0.258965,\n\t\t\t0.251537,\n\t\t\t0.524736,\n\t\t\t0.192157,\n\t\t\t0.257322,\n\t\t\t0.25613,\n\t\t\t0.526563,\n\t\t\t0.196078,\n\t\t\t0.255645,\n\t\t\t0.260703,\n\t\t\t0.528312,\n\t\t\t0.2,\n\t\t\t0.253935,\n\t\t\t0.265254,\n\t\t\t0.529983,\n\t\t\t0.203922,\n\t\t\t0.252194,\n\t\t\t0.269783,\n\t\t\t0.531579,\n\t\t\t0.207843,\n\t\t\t0.250425,\n\t\t\t0.27429,\n\t\t\t0.533103,\n\t\t\t0.211765,\n\t\t\t0.248629,\n\t\t\t0.278775,\n\t\t\t0.534556,\n\t\t\t0.215686,\n\t\t\t0.246811,\n\t\t\t0.283237,\n\t\t\t0.535941,\n\t\t\t0.219608,\n\t\t\t0.244972,\n\t\t\t0.287675,\n\t\t\t0.53726,\n\t\t\t0.223529,\n\t\t\t0.243113,\n\t\t\t0.292092,\n\t\t\t0.538516,\n\t\t\t0.227451,\n\t\t\t0.241237,\n\t\t\t0.296485,\n\t\t\t0.539709,\n\t\t\t0.231373,\n\t\t\t0.239346,\n\t\t\t0.300855,\n\t\t\t0.540844,\n\t\t\t0.235294,\n\t\t\t0.237441,\n\t\t\t0.305202,\n\t\t\t0.541921,\n\t\t\t0.239216,\n\t\t\t0.235526,\n\t\t\t0.309527,\n\t\t\t0.542944,\n\t\t\t0.243137,\n\t\t\t0.233603,\n\t\t\t0.313828,\n\t\t\t0.543914,\n\t\t\t0.247059,\n\t\t\t0.231674,\n\t\t\t0.318106,\n\t\t\t0.544834,\n\t\t\t0.25098,\n\t\t\t0.229739,\n\t\t\t0.322361,\n\t\t\t0.545706,\n\t\t\t0.254902,\n\t\t\t0.227802,\n\t\t\t0.326594,\n\t\t\t0.546532,\n\t\t\t0.258824,\n\t\t\t0.225863,\n\t\t\t0.330805,\n\t\t\t0.547314,\n\t\t\t0.262745,\n\t\t\t0.223925,\n\t\t\t0.334994,\n\t\t\t0.548053,\n\t\t\t0.266667,\n\t\t\t0.221989,\n\t\t\t0.339161,\n\t\t\t0.548752,\n\t\t\t0.270588,\n\t\t\t0.220057,\n\t\t\t0.343307,\n\t\t\t0.549413,\n\t\t\t0.27451,\n\t\t\t0.21813,\n\t\t\t0.347432,\n\t\t\t0.550038,\n\t\t\t0.278431,\n\t\t\t0.21621,\n\t\t\t0.351535,\n\t\t\t0.550627,\n\t\t\t0.282353,\n\t\t\t0.214298,\n\t\t\t0.355619,\n\t\t\t0.551184,\n\t\t\t0.286275,\n\t\t\t0.212395,\n\t\t\t0.359683,\n\t\t\t0.55171,\n\t\t\t0.290196,\n\t\t\t0.210503,\n\t\t\t0.363727,\n\t\t\t0.552206,\n\t\t\t0.294118,\n\t\t\t0.208623,\n\t\t\t0.367752,\n\t\t\t0.552675,\n\t\t\t0.298039,\n\t\t\t0.206756,\n\t\t\t0.371758,\n\t\t\t0.553117,\n\t\t\t0.301961,\n\t\t\t0.204903,\n\t\t\t0.375746,\n\t\t\t0.553533,\n\t\t\t0.305882,\n\t\t\t0.203063,\n\t\t\t0.379716,\n\t\t\t0.553925,\n\t\t\t0.309804,\n\t\t\t0.201239,\n\t\t\t0.38367,\n\t\t\t0.554294,\n\t\t\t0.313725,\n\t\t\t0.19943,\n\t\t\t0.387607,\n\t\t\t0.554642,\n\t\t\t0.317647,\n\t\t\t0.197636,\n\t\t\t0.391528,\n\t\t\t0.554969,\n\t\t\t0.321569,\n\t\t\t0.19586,\n\t\t\t0.395433,\n\t\t\t0.555276,\n\t\t\t0.32549,\n\t\t\t0.1941,\n\t\t\t0.399323,\n\t\t\t0.555565,\n\t\t\t0.329412,\n\t\t\t0.192357,\n\t\t\t0.403199,\n\t\t\t0.555836,\n\t\t\t0.333333,\n\t\t\t0.190631,\n\t\t\t0.407061,\n\t\t\t0.556089,\n\t\t\t0.337255,\n\t\t\t0.188923,\n\t\t\t0.41091,\n\t\t\t0.556326,\n\t\t\t0.341176,\n\t\t\t0.187231,\n\t\t\t0.414746,\n\t\t\t0.556547,\n\t\t\t0.345098,\n\t\t\t0.185556,\n\t\t\t0.41857,\n\t\t\t0.556753,\n\t\t\t0.34902,\n\t\t\t0.183898,\n\t\t\t0.422383,\n\t\t\t0.556944,\n\t\t\t0.352941,\n\t\t\t0.182256,\n\t\t\t0.426184,\n\t\t\t0.55712,\n\t\t\t0.356863,\n\t\t\t0.180629,\n\t\t\t0.429975,\n\t\t\t0.557282,\n\t\t\t0.360784,\n\t\t\t0.179019,\n\t\t\t0.433756,\n\t\t\t0.55743,\n\t\t\t0.364706,\n\t\t\t0.177423,\n\t\t\t0.437527,\n\t\t\t0.557565,\n\t\t\t0.368627,\n\t\t\t0.175841,\n\t\t\t0.44129,\n\t\t\t0.557685,\n\t\t\t0.372549,\n\t\t\t0.174274,\n\t\t\t0.445044,\n\t\t\t0.557792,\n\t\t\t0.376471,\n\t\t\t0.172719,\n\t\t\t0.448791,\n\t\t\t0.557885,\n\t\t\t0.380392,\n\t\t\t0.171176,\n\t\t\t0.45253,\n\t\t\t0.557965,\n\t\t\t0.384314,\n\t\t\t0.169646,\n\t\t\t0.456262,\n\t\t\t0.55803,\n\t\t\t0.388235,\n\t\t\t0.168126,\n\t\t\t0.459988,\n\t\t\t0.558082,\n\t\t\t0.392157,\n\t\t\t0.166617,\n\t\t\t0.463708,\n\t\t\t0.558119,\n\t\t\t0.396078,\n\t\t\t0.165117,\n\t\t\t0.467423,\n\t\t\t0.558141,\n\t\t\t0.4,\n\t\t\t0.163625,\n\t\t\t0.471133,\n\t\t\t0.558148,\n\t\t\t0.403922,\n\t\t\t0.162142,\n\t\t\t0.474838,\n\t\t\t0.55814,\n\t\t\t0.407843,\n\t\t\t0.160665,\n\t\t\t0.47854,\n\t\t\t0.558115,\n\t\t\t0.411765,\n\t\t\t0.159194,\n\t\t\t0.482237,\n\t\t\t0.558073,\n\t\t\t0.415686,\n\t\t\t0.157729,\n\t\t\t0.485932,\n\t\t\t0.558013,\n\t\t\t0.419608,\n\t\t\t0.15627,\n\t\t\t0.489624,\n\t\t\t0.557936,\n\t\t\t0.423529,\n\t\t\t0.154815,\n\t\t\t0.493313,\n\t\t\t0.55784,\n\t\t\t0.427451,\n\t\t\t0.153364,\n\t\t\t0.497,\n\t\t\t0.557724,\n\t\t\t0.431373,\n\t\t\t0.151918,\n\t\t\t0.500685,\n\t\t\t0.557587,\n\t\t\t0.435294,\n\t\t\t0.150476,\n\t\t\t0.504369,\n\t\t\t0.55743,\n\t\t\t0.439216,\n\t\t\t0.149039,\n\t\t\t0.508051,\n\t\t\t0.55725,\n\t\t\t0.443137,\n\t\t\t0.147607,\n\t\t\t0.511733,\n\t\t\t0.557049,\n\t\t\t0.447059,\n\t\t\t0.14618,\n\t\t\t0.515413,\n\t\t\t0.556823,\n\t\t\t0.45098,\n\t\t\t0.144759,\n\t\t\t0.519093,\n\t\t\t0.556572,\n\t\t\t0.454902,\n\t\t\t0.143343,\n\t\t\t0.522773,\n\t\t\t0.556295,\n\t\t\t0.458824,\n\t\t\t0.141935,\n\t\t\t0.526453,\n\t\t\t0.555991,\n\t\t\t0.462745,\n\t\t\t0.140536,\n\t\t\t0.530132,\n\t\t\t0.555659,\n\t\t\t0.466667,\n\t\t\t0.139147,\n\t\t\t0.533812,\n\t\t\t0.555298,\n\t\t\t0.470588,\n\t\t\t0.13777,\n\t\t\t0.537492,\n\t\t\t0.554906,\n\t\t\t0.47451,\n\t\t\t0.136408,\n\t\t\t0.541173,\n\t\t\t0.554483,\n\t\t\t0.478431,\n\t\t\t0.135066,\n\t\t\t0.544853,\n\t\t\t0.554029,\n\t\t\t0.482353,\n\t\t\t0.133743,\n\t\t\t0.548535,\n\t\t\t0.553541,\n\t\t\t0.486275,\n\t\t\t0.132444,\n\t\t\t0.552216,\n\t\t\t0.553018,\n\t\t\t0.490196,\n\t\t\t0.131172,\n\t\t\t0.555899,\n\t\t\t0.552459,\n\t\t\t0.494118,\n\t\t\t0.129933,\n\t\t\t0.559582,\n\t\t\t0.551864,\n\t\t\t0.498039,\n\t\t\t0.128729,\n\t\t\t0.563265,\n\t\t\t0.551229,\n\t\t\t0.501961,\n\t\t\t0.127568,\n\t\t\t0.566949,\n\t\t\t0.550556,\n\t\t\t0.505882,\n\t\t\t0.126453,\n\t\t\t0.570633,\n\t\t\t0.549841,\n\t\t\t0.509804,\n\t\t\t0.125394,\n\t\t\t0.574318,\n\t\t\t0.549086,\n\t\t\t0.513725,\n\t\t\t0.124395,\n\t\t\t0.578002,\n\t\t\t0.548287,\n\t\t\t0.517647,\n\t\t\t0.123463,\n\t\t\t0.581687,\n\t\t\t0.547445,\n\t\t\t0.521569,\n\t\t\t0.122606,\n\t\t\t0.585371,\n\t\t\t0.546557,\n\t\t\t0.52549,\n\t\t\t0.121831,\n\t\t\t0.589055,\n\t\t\t0.545623,\n\t\t\t0.529412,\n\t\t\t0.121148,\n\t\t\t0.592739,\n\t\t\t0.544641,\n\t\t\t0.533333,\n\t\t\t0.120565,\n\t\t\t0.596422,\n\t\t\t0.543611,\n\t\t\t0.537255,\n\t\t\t0.120092,\n\t\t\t0.600104,\n\t\t\t0.54253,\n\t\t\t0.541176,\n\t\t\t0.119738,\n\t\t\t0.603785,\n\t\t\t0.5414,\n\t\t\t0.545098,\n\t\t\t0.119512,\n\t\t\t0.607464,\n\t\t\t0.540218,\n\t\t\t0.54902,\n\t\t\t0.119423,\n\t\t\t0.611141,\n\t\t\t0.538982,\n\t\t\t0.552941,\n\t\t\t0.119483,\n\t\t\t0.614817,\n\t\t\t0.537692,\n\t\t\t0.556863,\n\t\t\t0.119699,\n\t\t\t0.61849,\n\t\t\t0.536347,\n\t\t\t0.560784,\n\t\t\t0.120081,\n\t\t\t0.622161,\n\t\t\t0.534946,\n\t\t\t0.564706,\n\t\t\t0.120638,\n\t\t\t0.625828,\n\t\t\t0.533488,\n\t\t\t0.568627,\n\t\t\t0.12138,\n\t\t\t0.629492,\n\t\t\t0.531973,\n\t\t\t0.572549,\n\t\t\t0.122312,\n\t\t\t0.633153,\n\t\t\t0.530398,\n\t\t\t0.576471,\n\t\t\t0.123444,\n\t\t\t0.636809,\n\t\t\t0.528763,\n\t\t\t0.580392,\n\t\t\t0.12478,\n\t\t\t0.640461,\n\t\t\t0.527068,\n\t\t\t0.584314,\n\t\t\t0.126326,\n\t\t\t0.644107,\n\t\t\t0.525311,\n\t\t\t0.588235,\n\t\t\t0.128087,\n\t\t\t0.647749,\n\t\t\t0.523491,\n\t\t\t0.592157,\n\t\t\t0.130067,\n\t\t\t0.651384,\n\t\t\t0.521608,\n\t\t\t0.596078,\n\t\t\t0.132268,\n\t\t\t0.655014,\n\t\t\t0.519661,\n\t\t\t0.6,\n\t\t\t0.134692,\n\t\t\t0.658636,\n\t\t\t0.517649,\n\t\t\t0.603922,\n\t\t\t0.137339,\n\t\t\t0.662252,\n\t\t\t0.515571,\n\t\t\t0.607843,\n\t\t\t0.14021,\n\t\t\t0.665859,\n\t\t\t0.513427,\n\t\t\t0.611765,\n\t\t\t0.143303,\n\t\t\t0.669459,\n\t\t\t0.511215,\n\t\t\t0.615686,\n\t\t\t0.146616,\n\t\t\t0.67305,\n\t\t\t0.508936,\n\t\t\t0.619608,\n\t\t\t0.150148,\n\t\t\t0.676631,\n\t\t\t0.506589,\n\t\t\t0.623529,\n\t\t\t0.153894,\n\t\t\t0.680203,\n\t\t\t0.504172,\n\t\t\t0.627451,\n\t\t\t0.157851,\n\t\t\t0.683765,\n\t\t\t0.501686,\n\t\t\t0.631373,\n\t\t\t0.162016,\n\t\t\t0.687316,\n\t\t\t0.499129,\n\t\t\t0.635294,\n\t\t\t0.166383,\n\t\t\t0.690856,\n\t\t\t0.496502,\n\t\t\t0.639216,\n\t\t\t0.170948,\n\t\t\t0.694384,\n\t\t\t0.493803,\n\t\t\t0.643137,\n\t\t\t0.175707,\n\t\t\t0.6979,\n\t\t\t0.491033,\n\t\t\t0.647059,\n\t\t\t0.180653,\n\t\t\t0.701402,\n\t\t\t0.488189,\n\t\t\t0.65098,\n\t\t\t0.185783,\n\t\t\t0.704891,\n\t\t\t0.485273,\n\t\t\t0.654902,\n\t\t\t0.19109,\n\t\t\t0.708366,\n\t\t\t0.482284,\n\t\t\t0.658824,\n\t\t\t0.196571,\n\t\t\t0.711827,\n\t\t\t0.479221,\n\t\t\t0.662745,\n\t\t\t0.202219,\n\t\t\t0.715272,\n\t\t\t0.476084,\n\t\t\t0.666667,\n\t\t\t0.20803,\n\t\t\t0.718701,\n\t\t\t0.472873,\n\t\t\t0.670588,\n\t\t\t0.214,\n\t\t\t0.722114,\n\t\t\t0.469588,\n\t\t\t0.67451,\n\t\t\t0.220124,\n\t\t\t0.725509,\n\t\t\t0.466226,\n\t\t\t0.678431,\n\t\t\t0.226397,\n\t\t\t0.728888,\n\t\t\t0.462789,\n\t\t\t0.682353,\n\t\t\t0.232815,\n\t\t\t0.732247,\n\t\t\t0.459277,\n\t\t\t0.686275,\n\t\t\t0.239374,\n\t\t\t0.735588,\n\t\t\t0.455688,\n\t\t\t0.690196,\n\t\t\t0.24607,\n\t\t\t0.73891,\n\t\t\t0.452024,\n\t\t\t0.694118,\n\t\t\t0.252899,\n\t\t\t0.742211,\n\t\t\t0.448284,\n\t\t\t0.698039,\n\t\t\t0.259857,\n\t\t\t0.745492,\n\t\t\t0.444467,\n\t\t\t0.701961,\n\t\t\t0.266941,\n\t\t\t0.748751,\n\t\t\t0.440573,\n\t\t\t0.705882,\n\t\t\t0.274149,\n\t\t\t0.751988,\n\t\t\t0.436601,\n\t\t\t0.709804,\n\t\t\t0.281477,\n\t\t\t0.755203,\n\t\t\t0.432552,\n\t\t\t0.713725,\n\t\t\t0.288921,\n\t\t\t0.758394,\n\t\t\t0.428426,\n\t\t\t0.717647,\n\t\t\t0.296479,\n\t\t\t0.761561,\n\t\t\t0.424223,\n\t\t\t0.721569,\n\t\t\t0.304148,\n\t\t\t0.764704,\n\t\t\t0.419943,\n\t\t\t0.72549,\n\t\t\t0.311925,\n\t\t\t0.767822,\n\t\t\t0.415586,\n\t\t\t0.729412,\n\t\t\t0.319809,\n\t\t\t0.770914,\n\t\t\t0.411152,\n\t\t\t0.733333,\n\t\t\t0.327796,\n\t\t\t0.77398,\n\t\t\t0.40664,\n\t\t\t0.737255,\n\t\t\t0.335885,\n\t\t\t0.777018,\n\t\t\t0.402049,\n\t\t\t0.741176,\n\t\t\t0.344074,\n\t\t\t0.780029,\n\t\t\t0.397381,\n\t\t\t0.745098,\n\t\t\t0.35236,\n\t\t\t0.783011,\n\t\t\t0.392636,\n\t\t\t0.74902,\n\t\t\t0.360741,\n\t\t\t0.785964,\n\t\t\t0.387814,\n\t\t\t0.752941,\n\t\t\t0.369214,\n\t\t\t0.788888,\n\t\t\t0.382914,\n\t\t\t0.756863,\n\t\t\t0.377779,\n\t\t\t0.791781,\n\t\t\t0.377939,\n\t\t\t0.760784,\n\t\t\t0.386433,\n\t\t\t0.794644,\n\t\t\t0.372886,\n\t\t\t0.764706,\n\t\t\t0.395174,\n\t\t\t0.797475,\n\t\t\t0.367757,\n\t\t\t0.768627,\n\t\t\t0.404001,\n\t\t\t0.800275,\n\t\t\t0.362552,\n\t\t\t0.772549,\n\t\t\t0.412913,\n\t\t\t0.803041,\n\t\t\t0.357269,\n\t\t\t0.776471,\n\t\t\t0.421908,\n\t\t\t0.805774,\n\t\t\t0.35191,\n\t\t\t0.780392,\n\t\t\t0.430983,\n\t\t\t0.808473,\n\t\t\t0.346476,\n\t\t\t0.784314,\n\t\t\t0.440137,\n\t\t\t0.811138,\n\t\t\t0.340967,\n\t\t\t0.788235,\n\t\t\t0.449368,\n\t\t\t0.813768,\n\t\t\t0.335384,\n\t\t\t0.792157,\n\t\t\t0.458674,\n\t\t\t0.816363,\n\t\t\t0.329727,\n\t\t\t0.796078,\n\t\t\t0.468053,\n\t\t\t0.818921,\n\t\t\t0.323998,\n\t\t\t0.8,\n\t\t\t0.477504,\n\t\t\t0.821444,\n\t\t\t0.318195,\n\t\t\t0.803922,\n\t\t\t0.487026,\n\t\t\t0.823929,\n\t\t\t0.312321,\n\t\t\t0.807843,\n\t\t\t0.496615,\n\t\t\t0.826376,\n\t\t\t0.306377,\n\t\t\t0.811765,\n\t\t\t0.506271,\n\t\t\t0.828786,\n\t\t\t0.300362,\n\t\t\t0.815686,\n\t\t\t0.515992,\n\t\t\t0.831158,\n\t\t\t0.294279,\n\t\t\t0.819608,\n\t\t\t0.525776,\n\t\t\t0.833491,\n\t\t\t0.288127,\n\t\t\t0.823529,\n\t\t\t0.535621,\n\t\t\t0.835785,\n\t\t\t0.281908,\n\t\t\t0.827451,\n\t\t\t0.545524,\n\t\t\t0.838039,\n\t\t\t0.275626,\n\t\t\t0.831373,\n\t\t\t0.555484,\n\t\t\t0.840254,\n\t\t\t0.269281,\n\t\t\t0.835294,\n\t\t\t0.565498,\n\t\t\t0.84243,\n\t\t\t0.262877,\n\t\t\t0.839216,\n\t\t\t0.575563,\n\t\t\t0.844566,\n\t\t\t0.256415,\n\t\t\t0.843137,\n\t\t\t0.585678,\n\t\t\t0.846661,\n\t\t\t0.249897,\n\t\t\t0.847059,\n\t\t\t0.595839,\n\t\t\t0.848717,\n\t\t\t0.243329,\n\t\t\t0.85098,\n\t\t\t0.606045,\n\t\t\t0.850733,\n\t\t\t0.236712,\n\t\t\t0.854902,\n\t\t\t0.616293,\n\t\t\t0.852709,\n\t\t\t0.230052,\n\t\t\t0.858824,\n\t\t\t0.626579,\n\t\t\t0.854645,\n\t\t\t0.223353,\n\t\t\t0.862745,\n\t\t\t0.636902,\n\t\t\t0.856542,\n\t\t\t0.21662,\n\t\t\t0.866667,\n\t\t\t0.647257,\n\t\t\t0.8584,\n\t\t\t0.209861,\n\t\t\t0.870588,\n\t\t\t0.657642,\n\t\t\t0.860219,\n\t\t\t0.203082,\n\t\t\t0.87451,\n\t\t\t0.668054,\n\t\t\t0.861999,\n\t\t\t0.196293,\n\t\t\t0.878431,\n\t\t\t0.678489,\n\t\t\t0.863742,\n\t\t\t0.189503,\n\t\t\t0.882353,\n\t\t\t0.688944,\n\t\t\t0.865448,\n\t\t\t0.182725,\n\t\t\t0.886275,\n\t\t\t0.699415,\n\t\t\t0.867117,\n\t\t\t0.175971,\n\t\t\t0.890196,\n\t\t\t0.709898,\n\t\t\t0.868751,\n\t\t\t0.169257,\n\t\t\t0.894118,\n\t\t\t0.720391,\n\t\t\t0.87035,\n\t\t\t0.162603,\n\t\t\t0.898039,\n\t\t\t0.730889,\n\t\t\t0.871916,\n\t\t\t0.156029,\n\t\t\t0.901961,\n\t\t\t0.741388,\n\t\t\t0.873449,\n\t\t\t0.149561,\n\t\t\t0.905882,\n\t\t\t0.751884,\n\t\t\t0.874951,\n\t\t\t0.143228,\n\t\t\t0.909804,\n\t\t\t0.762373,\n\t\t\t0.876424,\n\t\t\t0.137064,\n\t\t\t0.913725,\n\t\t\t0.772852,\n\t\t\t0.877868,\n\t\t\t0.131109,\n\t\t\t0.917647,\n\t\t\t0.783315,\n\t\t\t0.879285,\n\t\t\t0.125405,\n\t\t\t0.921569,\n\t\t\t0.79376,\n\t\t\t0.880678,\n\t\t\t0.120005,\n\t\t\t0.92549,\n\t\t\t0.804182,\n\t\t\t0.882046,\n\t\t\t0.114965,\n\t\t\t0.929412,\n\t\t\t0.814576,\n\t\t\t0.883393,\n\t\t\t0.110347,\n\t\t\t0.933333,\n\t\t\t0.82494,\n\t\t\t0.88472,\n\t\t\t0.106217,\n\t\t\t0.937255,\n\t\t\t0.83527,\n\t\t\t0.886029,\n\t\t\t0.102646,\n\t\t\t0.941176,\n\t\t\t0.845561,\n\t\t\t0.887322,\n\t\t\t0.099702,\n\t\t\t0.945098,\n\t\t\t0.85581,\n\t\t\t0.888601,\n\t\t\t0.097452,\n\t\t\t0.94902,\n\t\t\t0.866013,\n\t\t\t0.889868,\n\t\t\t0.095953,\n\t\t\t0.952941,\n\t\t\t0.876168,\n\t\t\t0.891125,\n\t\t\t0.09525,\n\t\t\t0.956863,\n\t\t\t0.886271,\n\t\t\t0.892374,\n\t\t\t0.095374,\n\t\t\t0.960784,\n\t\t\t0.89632,\n\t\t\t0.893616,\n\t\t\t0.096335,\n\t\t\t0.964706,\n\t\t\t0.906311,\n\t\t\t0.894855,\n\t\t\t0.098125,\n\t\t\t0.968627,\n\t\t\t0.916242,\n\t\t\t0.896091,\n\t\t\t0.100717,\n\t\t\t0.972549,\n\t\t\t0.926106,\n\t\t\t0.89733,\n\t\t\t0.104071,\n\t\t\t0.976471,\n\t\t\t0.935904,\n\t\t\t0.89857,\n\t\t\t0.108131,\n\t\t\t0.980392,\n\t\t\t0.945636,\n\t\t\t0.899815,\n\t\t\t0.112838,\n\t\t\t0.984314,\n\t\t\t0.9553,\n\t\t\t0.901065,\n\t\t\t0.118128,\n\t\t\t0.988235,\n\t\t\t0.964894,\n\t\t\t0.902323,\n\t\t\t0.123941,\n\t\t\t0.992157,\n\t\t\t0.974417,\n\t\t\t0.90359,\n\t\t\t0.130215,\n\t\t\t0.996078,\n\t\t\t0.983868,\n\t\t\t0.904867,\n\t\t\t0.136897,\n\t\t\t1,\n\t\t\t0.993248,\n\t\t\t0.906157,\n\t\t\t0.143936\n\t\t]\n\t},\n\t{\n\t\tShowIndexedColorActiveValues: 1,\n\t\tIndexedColors: [\n\t\t\t0.07,\n\t\t\t0.5,\n\t\t\t0.7,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.85,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.8,\n\t\t\t0.5,\n\t\t\t1,\n\t\t\t0.76,\n\t\t\t1,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.71,\n\t\t\t0.71,\n\t\t\t0.5,\n\t\t\t0.5,\n\t\t\t0.5,\n\t\t\t0.05,\n\t\t\t0.05,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.05,\n\t\t\t0.05,\n\t\t\t0.7,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.7,\n\t\t\t0.89,\n\t\t\t0.96,\n\t\t\t0.67,\n\t\t\t0.36,\n\t\t\t0.95,\n\t\t\t0.54,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.75,\n\t\t\t0.65,\n\t\t\t0.65,\n\t\t\t0.5,\n\t\t\t0.6,\n\t\t\t0.6,\n\t\t\t1,\n\t\t\t0.5,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.19,\n\t\t\t0.12,\n\t\t\t0.94,\n\t\t\t0.12,\n\t\t\t0.5,\n\t\t\t0.82,\n\t\t\t0.89,\n\t\t\t0.56,\n\t\t\t0.25,\n\t\t\t0.83,\n\t\t\t0.24,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.9,\n\t\t\t0.9,\n\t\t\t0.9,\n\t\t\t0.75,\n\t\t\t0.76,\n\t\t\t0.78,\n\t\t\t0.65,\n\t\t\t0.65,\n\t\t\t0.67,\n\t\t\t0.54,\n\t\t\t0.6,\n\t\t\t0.78,\n\t\t\t0.61,\n\t\t\t0.48,\n\t\t\t0.78,\n\t\t\t0.5,\n\t\t\t0.48,\n\t\t\t0.78,\n\t\t\t0.44,\n\t\t\t0.48,\n\t\t\t0.78,\n\t\t\t0.36,\n\t\t\t0.48,\n\t\t\t0.76,\n\t\t\t1,\n\t\t\t0.48,\n\t\t\t0.38,\n\t\t\t0.49,\n\t\t\t0.5,\n\t\t\t0.69,\n\t\t\t0.76,\n\t\t\t0.56,\n\t\t\t0.56,\n\t\t\t0.4,\n\t\t\t0.56,\n\t\t\t0.56,\n\t\t\t0.74,\n\t\t\t0.5,\n\t\t\t0.89,\n\t\t\t1,\n\t\t\t0.63,\n\t\t\t0,\n\t\t\t0.65,\n\t\t\t0.16,\n\t\t\t0.16,\n\t\t\t0.36,\n\t\t\t0.72,\n\t\t\t0.82,\n\t\t\t0.44,\n\t\t\t0.18,\n\t\t\t0.69,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.58,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.58,\n\t\t\t0.88,\n\t\t\t0.88,\n\t\t\t0.45,\n\t\t\t0.76,\n\t\t\t0.79,\n\t\t\t0.33,\n\t\t\t0.71,\n\t\t\t0.71,\n\t\t\t0.23,\n\t\t\t0.62,\n\t\t\t0.62,\n\t\t\t0.14,\n\t\t\t0.56,\n\t\t\t0.56,\n\t\t\t0.04,\n\t\t\t0.49,\n\t\t\t0.55,\n\t\t\t0,\n\t\t\t0.41,\n\t\t\t0.52,\n\t\t\t0.88,\n\t\t\t0.88,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.85,\n\t\t\t0.56,\n\t\t\t0.65,\n\t\t\t0.46,\n\t\t\t0.45,\n\t\t\t0.4,\n\t\t\t0.5,\n\t\t\t0.5,\n\t\t\t0.62,\n\t\t\t0.39,\n\t\t\t0.71,\n\t\t\t0.83,\n\t\t\t0.48,\n\t\t\t0,\n\t\t\t0.58,\n\t\t\t0,\n\t\t\t0.58,\n\t\t\t0.26,\n\t\t\t0.62,\n\t\t\t0.69,\n\t\t\t0.34,\n\t\t\t0.09,\n\t\t\t0.56,\n\t\t\t0,\n\t\t\t0.79,\n\t\t\t0,\n\t\t\t0.44,\n\t\t\t0.83,\n\t\t\t1,\n\t\t\t1,\n\t\t\t1,\n\t\t\t0.78,\n\t\t\t0.85,\n\t\t\t1,\n\t\t\t0.78,\n\t\t\t0.78,\n\t\t\t1,\n\t\t\t0.78,\n\t\t\t0.64,\n\t\t\t1,\n\t\t\t0.78,\n\t\t\t0.56,\n\t\t\t1,\n\t\t\t0.78,\n\t\t\t0.38,\n\t\t\t1,\n\t\t\t0.78,\n\t\t\t0.27,\n\t\t\t1,\n\t\t\t0.78,\n\t\t\t0.19,\n\t\t\t1,\n\t\t\t0.78,\n\t\t\t0.12,\n\t\t\t1,\n\t\t\t0.78,\n\t\t\t0,\n\t\t\t1,\n\t\t\t0.61,\n\t\t\t0,\n\t\t\t0.9,\n\t\t\t0.46,\n\t\t\t0,\n\t\t\t0.83,\n\t\t\t0.32,\n\t\t\t0,\n\t\t\t0.75,\n\t\t\t0.22,\n\t\t\t0,\n\t\t\t0.67,\n\t\t\t0.14,\n\t\t\t0.3,\n\t\t\t0.76,\n\t\t\t1,\n\t\t\t0.3,\n\t\t\t0.65,\n\t\t\t1,\n\t\t\t0.13,\n\t\t\t0.58,\n\t\t\t0.84,\n\t\t\t0.15,\n\t\t\t0.49,\n\t\t\t0.67,\n\t\t\t0.15,\n\t\t\t0.4,\n\t\t\t0.59,\n\t\t\t0.09,\n\t\t\t0.33,\n\t\t\t0.53,\n\t\t\t0.96,\n\t\t\t0.93,\n\t\t\t0.82,\n\t\t\t0.8,\n\t\t\t0.82,\n\t\t\t0.12,\n\t\t\t0.71,\n\t\t\t0.71,\n\t\t\t0.76,\n\t\t\t0.65,\n\t\t\t0.33,\n\t\t\t0.3,\n\t\t\t0.34,\n\t\t\t0.35,\n\t\t\t0.38,\n\t\t\t0.62,\n\t\t\t0.31,\n\t\t\t0.71,\n\t\t\t0.67,\n\t\t\t0.36,\n\t\t\t0,\n\t\t\t0.46,\n\t\t\t0.31,\n\t\t\t0.27,\n\t\t\t0.26,\n\t\t\t0.51,\n\t\t\t0.59,\n\t\t\t0.26,\n\t\t\t0,\n\t\t\t0.4,\n\t\t\t0,\n\t\t\t0.49,\n\t\t\t0,\n\t\t\t0.44,\n\t\t\t0.67,\n\t\t\t0.98,\n\t\t\t0,\n\t\t\t0.73,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.63,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.56,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.5,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.42,\n\t\t\t1,\n\t\t\t0.33,\n\t\t\t0.36,\n\t\t\t0.95,\n\t\t\t0.47,\n\t\t\t0.36,\n\t\t\t0.89,\n\t\t\t0.54,\n\t\t\t0.31,\n\t\t\t0.89,\n\t\t\t0.63,\n\t\t\t0.21,\n\t\t\t0.83,\n\t\t\t0.7,\n\t\t\t0.12,\n\t\t\t0.83,\n\t\t\t0.7,\n\t\t\t0.12,\n\t\t\t0.73,\n\t\t\t0.7,\n\t\t\t0.05,\n\t\t\t0.65,\n\t\t\t0.74,\n\t\t\t0.05,\n\t\t\t0.53,\n\t\t\t0.78,\n\t\t\t0,\n\t\t\t0.4,\n\t\t\t0.8,\n\t\t\t0,\n\t\t\t0.35,\n\t\t\t0.82,\n\t\t\t0,\n\t\t\t0.31,\n\t\t\t0.85,\n\t\t\t0,\n\t\t\t0.27,\n\t\t\t0.88,\n\t\t\t0,\n\t\t\t0.22,\n\t\t\t0.9,\n\t\t\t0,\n\t\t\t0.18,\n\t\t\t0.91,\n\t\t\t0,\n\t\t\t0.15,\n\t\t\t0.92,\n\t\t\t0,\n\t\t\t0.14,\n\t\t\t0.93,\n\t\t\t0,\n\t\t\t0.13,\n\t\t\t0.94,\n\t\t\t0,\n\t\t\t0.12,\n\t\t\t0.95,\n\t\t\t0,\n\t\t\t0.11,\n\t\t\t0.96,\n\t\t\t0,\n\t\t\t0.1,\n\t\t\t0.97,\n\t\t\t0,\n\t\t\t0.09,\n\t\t\t0.98,\n\t\t\t0,\n\t\t\t0.08,\n\t\t\t0.99,\n\t\t\t0,\n\t\t\t0.07,\n\t\t\t1,\n\t\t\t0,\n\t\t\t0.06\n\t\t],\n\t\tAnnotations: [\n\t\t\t0,\n\t\t\t\"Xx\",\n\t\t\t1,\n\t\t\t\"H\",\n\t\t\t2,\n\t\t\t\"He\",\n\t\t\t3,\n\t\t\t\"Li\",\n\t\t\t4,\n\t\t\t\"Be\",\n\t\t\t5,\n\t\t\t\"B\",\n\t\t\t6,\n\t\t\t\"C\",\n\t\t\t7,\n\t\t\t\"N\",\n\t\t\t8,\n\t\t\t\"O\",\n\t\t\t9,\n\t\t\t\"F\",\n\t\t\t10,\n\t\t\t\"Ne\",\n\t\t\t11,\n\t\t\t\"Na\",\n\t\t\t12,\n\t\t\t\"Mg\",\n\t\t\t13,\n\t\t\t\"Al\",\n\t\t\t14,\n\t\t\t\"Si\",\n\t\t\t15,\n\t\t\t\"P\",\n\t\t\t16,\n\t\t\t\"S\",\n\t\t\t17,\n\t\t\t\"Cl\",\n\t\t\t18,\n\t\t\t\"Ar\",\n\t\t\t19,\n\t\t\t\"K\",\n\t\t\t20,\n\t\t\t\"Ca\",\n\t\t\t21,\n\t\t\t\"Sc\",\n\t\t\t22,\n\t\t\t\"Ti\",\n\t\t\t23,\n\t\t\t\"V\",\n\t\t\t24,\n\t\t\t\"Cr\",\n\t\t\t25,\n\t\t\t\"Mn\",\n\t\t\t26,\n\t\t\t\"Fe\",\n\t\t\t27,\n\t\t\t\"Co\",\n\t\t\t28,\n\t\t\t\"Ni\",\n\t\t\t29,\n\t\t\t\"Cu\",\n\t\t\t30,\n\t\t\t\"Zn\",\n\t\t\t31,\n\t\t\t\"Ga\",\n\t\t\t32,\n\t\t\t\"Ge\",\n\t\t\t33,\n\t\t\t\"As\",\n\t\t\t34,\n\t\t\t\"Se\",\n\t\t\t35,\n\t\t\t\"Br\",\n\t\t\t36,\n\t\t\t\"Kr\",\n\t\t\t37,\n\t\t\t\"Rb\",\n\t\t\t38,\n\t\t\t\"Sr\",\n\t\t\t39,\n\t\t\t\"Y\",\n\t\t\t40,\n\t\t\t\"Zr\",\n\t\t\t41,\n\t\t\t\"Nb\",\n\t\t\t42,\n\t\t\t\"Mo\",\n\t\t\t43,\n\t\t\t\"Tc\",\n\t\t\t44,\n\t\t\t\"Ru\",\n\t\t\t45,\n\t\t\t\"Rh\",\n\t\t\t46,\n\t\t\t\"Pd\",\n\t\t\t47,\n\t\t\t\"Ag\",\n\t\t\t48,\n\t\t\t\"Cd\",\n\t\t\t49,\n\t\t\t\"In\",\n\t\t\t50,\n\t\t\t\"Sn\",\n\t\t\t51,\n\t\t\t\"Sb\",\n\t\t\t52,\n\t\t\t\"Te\",\n\t\t\t53,\n\t\t\t\"I\",\n\t\t\t54,\n\t\t\t\"Xe\",\n\t\t\t55,\n\t\t\t\"Cs\",\n\t\t\t56,\n\t\t\t\"Ba\",\n\t\t\t57,\n\t\t\t\"La\",\n\t\t\t58,\n\t\t\t\"Ce\",\n\t\t\t59,\n\t\t\t\"Pr\",\n\t\t\t60,\n\t\t\t\"Nd\",\n\t\t\t61,\n\t\t\t\"Pm\",\n\t\t\t62,\n\t\t\t\"Sm\",\n\t\t\t63,\n\t\t\t\"Eu\",\n\t\t\t64,\n\t\t\t\"Gd\",\n\t\t\t65,\n\t\t\t\"Tb\",\n\t\t\t66,\n\t\t\t\"Dy\",\n\t\t\t67,\n\t\t\t\"Ho\",\n\t\t\t68,\n\t\t\t\"Er\",\n\t\t\t69,\n\t\t\t\"Tm\",\n\t\t\t70,\n\t\t\t\"Yb\",\n\t\t\t71,\n\t\t\t\"Lu\",\n\t\t\t72,\n\t\t\t\"Hf\",\n\t\t\t73,\n\t\t\t\"Ta\",\n\t\t\t74,\n\t\t\t\"W\",\n\t\t\t75,\n\t\t\t\"Re\",\n\t\t\t76,\n\t\t\t\"Os\",\n\t\t\t77,\n\t\t\t\"Ir\",\n\t\t\t78,\n\t\t\t\"Pt\",\n\t\t\t79,\n\t\t\t\"Au\",\n\t\t\t80,\n\t\t\t\"Hg\",\n\t\t\t81,\n\t\t\t\"Tl\",\n\t\t\t82,\n\t\t\t\"Pb\",\n\t\t\t83,\n\t\t\t\"Bi\",\n\t\t\t84,\n\t\t\t\"Po\",\n\t\t\t85,\n\t\t\t\"At\",\n\t\t\t86,\n\t\t\t\"Rn\",\n\t\t\t87,\n\t\t\t\"Fr\",\n\t\t\t88,\n\t\t\t\"Ra\",\n\t\t\t89,\n\t\t\t\"Ac\",\n\t\t\t90,\n\t\t\t\"Th\",\n\t\t\t91,\n\t\t\t\"Pa\",\n\t\t\t92,\n\t\t\t\"U\",\n\t\t\t93,\n\t\t\t\"Np\",\n\t\t\t94,\n\t\t\t\"Pu\",\n\t\t\t95,\n\t\t\t\"Am\",\n\t\t\t96,\n\t\t\t\"Cm\",\n\t\t\t97,\n\t\t\t\"Bk\",\n\t\t\t98,\n\t\t\t\"Cf\",\n\t\t\t99,\n\t\t\t\"Es\",\n\t\t\t100,\n\t\t\t\"Fm\",\n\t\t\t101,\n\t\t\t\"Md\",\n\t\t\t102,\n\t\t\t\"No\",\n\t\t\t103,\n\t\t\t\"Lr\",\n\t\t\t104,\n\t\t\t\"Rf\",\n\t\t\t105,\n\t\t\t\"Db\",\n\t\t\t106,\n\t\t\t\"Sg\",\n\t\t\t107,\n\t\t\t\"Bh\",\n\t\t\t108,\n\t\t\t\"Hs\",\n\t\t\t109,\n\t\t\t\"Mt\",\n\t\t\t110,\n\t\t\t\"Ds\",\n\t\t\t111,\n\t\t\t\"Rg\",\n\t\t\t112,\n\t\t\t\"Cn\",\n\t\t\t113,\n\t\t\t\"Uut\",\n\t\t\t114,\n\t\t\t\"Uuq\",\n\t\t\t115,\n\t\t\t\"Uup\",\n\t\t\t116,\n\t\t\t\"Uuh\",\n\t\t\t117,\n\t\t\t\"Uus\",\n\t\t\t118,\n\t\t\t\"Uuo\"\n\t\t],\n\t\tName: \"BlueObeliskElements\"\n\t}\n];\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps.json.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction/Constants.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction/Constants.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"ColorSpace\": () => (/* binding */ ColorSpace),\n/* harmony export */   \"Scale\": () => (/* binding */ Scale)\n/* harmony export */ });\nvar ColorSpace = {\n  RGB: 0,\n  HSV: 1,\n  LAB: 2,\n  DIVERGING: 3\n};\nvar Scale = {\n  LINEAR: 0,\n  LOG10: 1\n};\nvar Constants = {\n  ColorSpace: ColorSpace,\n  Scale: Scale\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/HardwareSelector.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/HardwareSelector.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_DataModel_DataSet_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/DataModel/DataSet.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/DataSet.js\");\n\n\n\n\n\nvar FieldAssociations = _Common_DataModel_DataSet_js__WEBPACK_IMPORTED_MODULE_3__.default.FieldAssociations; // ----------------------------------------------------------------------------\n// vtkHardwareSelector methods\n// ----------------------------------------------------------------------------\n\nfunction vtkHardwareSelector(publicAPI, model) {\n  model.classHierarchy.push('vtkHardwareSelector'); // get the source data that is used for generating a selection. This\n  // must be called at least once before calling generateSelection. In\n  // raster based backends this method will capture the buffers. You can\n  // call this once and then make multiple calls to generateSelection.\n\n  publicAPI.getSourceDataAsync = /*#__PURE__*/function () {\n    var _ref = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(renderer, fx1, fy1, fx2, fy2) {\n      return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function _callee$(_context) {\n        while (1) {\n          switch (_context.prev = _context.next) {\n            case 0:\n            case \"end\":\n              return _context.stop();\n          }\n        }\n      }, _callee);\n    }));\n\n    return function (_x, _x2, _x3, _x4, _x5) {\n      return _ref.apply(this, arguments);\n    };\n  }();\n\n  publicAPI.selectAsync = /*#__PURE__*/function () {\n    var _ref2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee2(renderer, fx1, fy1, fx2, fy2) {\n      var srcData;\n      return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function _callee2$(_context2) {\n        while (1) {\n          switch (_context2.prev = _context2.next) {\n            case 0:\n              _context2.next = 2;\n              return publicAPI.getSourceDataAsync(renderer, fx1, fy1, fx2, fy2);\n\n            case 2:\n              srcData = _context2.sent;\n\n              if (!srcData) {\n                _context2.next = 5;\n                break;\n              }\n\n              return _context2.abrupt(\"return\", srcData.generateSelection(fx1, fy1, fx2, fy2));\n\n            case 5:\n              return _context2.abrupt(\"return\", []);\n\n            case 6:\n            case \"end\":\n              return _context2.stop();\n          }\n        }\n      }, _callee2);\n    }));\n\n    return function (_x6, _x7, _x8, _x9, _x10) {\n      return _ref2.apply(this, arguments);\n    };\n  }();\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  fieldAssociation: FieldAssociations.FIELD_ASSOCIATION_CELLS,\n  captureZValues: false\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.setGet(publicAPI, model, ['fieldAssociation', 'captureZValues']); // Object methods\n\n  vtkHardwareSelector(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance(extend, 'vtkHardwareSelector'); // ----------------------------------------------------------------------------\n\nvar vtkHardwareSelector$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkHardwareSelector$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/HardwareSelector.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/InteractorObserver.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/InteractorObserver.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"STATIC\": () => (/* binding */ STATIC),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _RenderWindowInteractor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RenderWindowInteractor.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindowInteractor.js\");\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkErrorMacro,\n    VOID = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.VOID; // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n//----------------------------------------------------------------------------\n// Description:\n// Transform from world to display coordinates.\n\nfunction computeWorldToDisplay(renderer, x, y, z) {\n  var view = renderer.getRenderWindow().getViews()[0];\n  return view.worldToDisplay(x, y, z, renderer);\n} //----------------------------------------------------------------------------\n// Description:\n// Transform from display to world coordinates.\n\n\nfunction computeDisplayToWorld(renderer, x, y, z) {\n  var view = renderer.getRenderWindow().getViews()[0];\n  return view.displayToWorld(x, y, z, renderer);\n} // ----------------------------------------------------------------------------\n// Static API\n// ----------------------------------------------------------------------------\n\n\nvar STATIC = {\n  computeWorldToDisplay: computeWorldToDisplay,\n  computeDisplayToWorld: computeDisplayToWorld\n}; // ----------------------------------------------------------------------------\n// vtkInteractorObserver methods\n// ----------------------------------------------------------------------------\n\nfunction vtkInteractorObserver(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkInteractorObserver');\n\n  var superClass = _objectSpread({}, publicAPI); //----------------------------------------------------------------------------\n\n\n  function unsubscribeFromEvents() {\n    while (model.subscribedEvents.length) {\n      model.subscribedEvents.pop().unsubscribe();\n    }\n  } //----------------------------------------------------------------------------\n  // Check what events we can handle and register callbacks\n\n\n  function subscribeToEvents() {\n    _RenderWindowInteractor_js__WEBPACK_IMPORTED_MODULE_2__.default.handledEvents.forEach(function (eventName) {\n      if (publicAPI[\"handle\".concat(eventName)]) {\n        model.subscribedEvents.push(model.interactor[\"on\".concat(eventName)](function (callData) {\n          if (model.processEvents) {\n            return publicAPI[\"handle\".concat(eventName)](callData);\n          }\n\n          return VOID;\n        }, model.priority));\n      }\n    });\n  } //----------------------------------------------------------------------------\n  // Public API methods\n  //----------------------------------------------------------------------------\n\n\n  publicAPI.setInteractor = function (i) {\n    if (i === model.interactor) {\n      return;\n    }\n\n    unsubscribeFromEvents();\n    model.interactor = i;\n\n    if (i && model.enabled) {\n      subscribeToEvents();\n    }\n\n    publicAPI.modified();\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.setEnabled = function (enable) {\n    if (enable === model.enabled) {\n      return;\n    }\n\n    unsubscribeFromEvents();\n\n    if (enable) {\n      if (model.interactor) {\n        subscribeToEvents();\n      } else {\n        vtkErrorMacro(\"\\n          The interactor must be set before subscribing to events\\n        \");\n      }\n    }\n\n    model.enabled = enable;\n    publicAPI.modified();\n  }; //----------------------------------------------------------------------------\n  // Description:\n  // Transform from display to world coordinates.\n\n\n  publicAPI.computeDisplayToWorld = function (renderer, x, y, z) {\n    if (!renderer) {\n      return null;\n    }\n\n    return model.interactor.getView().displayToWorld(x, y, z, renderer);\n  }; //----------------------------------------------------------------------------\n  // Description:\n  // Transform from world to display coordinates.\n\n\n  publicAPI.computeWorldToDisplay = function (renderer, x, y, z) {\n    if (!renderer) {\n      return null;\n    }\n\n    return model.interactor.getView().worldToDisplay(x, y, z, renderer);\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.setPriority = function (priority) {\n    var modified = superClass.setPriority(priority);\n\n    if (modified && model.interactor) {\n      unsubscribeFromEvents();\n      subscribeToEvents();\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  enabled: true,\n  interactor: null,\n  priority: 0.0,\n  processEvents: true,\n  subscribedEvents: []\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.event(publicAPI, model, 'InteractionEvent');\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.event(publicAPI, model, 'StartInteractionEvent');\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.event(publicAPI, model, 'EndInteractionEvent'); // Create get-only macros\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['interactor', 'enabled']); // Create get-set macros\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['priority', 'processEvents']); // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkInteractorObserver(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkInteractorObserver'); // ----------------------------------------------------------------------------\n\nvar vtkInteractorObserver$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, STATIC);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkInteractorObserver$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/InteractorObserver.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/InteractorStyle.js":
/*!************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/InteractorStyle.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _InteractorObserver_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./InteractorObserver.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/InteractorObserver.js\");\n/* harmony import */ var _InteractorStyle_Constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./InteractorStyle/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/InteractorStyle/Constants.js\");\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar States = _InteractorStyle_Constants_js__WEBPACK_IMPORTED_MODULE_3__.default.States; // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n// Add module-level functions or api that you want to expose statically via\n// the next section...\n\nvar stateNames = {\n  Rotate: States.IS_ROTATE,\n  Pan: States.IS_PAN,\n  Spin: States.IS_SPIN,\n  Dolly: States.IS_DOLLY,\n  CameraPose: States.IS_CAMERA_POSE,\n  WindowLevel: States.IS_WINDOW_LEVEL,\n  Slice: States.IS_SLICE\n}; // ----------------------------------------------------------------------------\n// vtkInteractorStyle methods\n// ----------------------------------------------------------------------------\n\nfunction vtkInteractorStyle(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkInteractorStyle'); // Public API methods\n  // create bunch of Start/EndState methods\n\n  Object.keys(stateNames).forEach(function (key) {\n    _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.event(publicAPI, model, \"Start\".concat(key, \"Event\"));\n\n    publicAPI[\"start\".concat(key)] = function () {\n      if (model.state !== States.IS_NONE) {\n        return;\n      }\n\n      model.state = stateNames[key];\n      model.interactor.requestAnimation(publicAPI);\n      publicAPI.invokeStartInteractionEvent({\n        type: 'StartInteractionEvent'\n      });\n      publicAPI[\"invokeStart\".concat(key, \"Event\")]({\n        type: \"Start\".concat(key, \"Event\")\n      });\n    };\n\n    _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.event(publicAPI, model, \"End\".concat(key, \"Event\"));\n\n    publicAPI[\"end\".concat(key)] = function () {\n      if (model.state !== stateNames[key]) {\n        return;\n      }\n\n      model.state = States.IS_NONE;\n      model.interactor.cancelAnimation(publicAPI);\n      publicAPI.invokeEndInteractionEvent({\n        type: 'EndInteractionEvent'\n      });\n      publicAPI[\"invokeEnd\".concat(key, \"Event\")]({\n        type: \"End\".concat(key, \"Event\")\n      });\n      model.interactor.render();\n    };\n  }); //----------------------------------------------------------------------------\n\n  publicAPI.handleKeyPress = function (callData) {\n    var rwi = model.interactor;\n    var ac = null;\n\n    switch (callData.key) {\n      case 'r':\n      case 'R':\n        callData.pokedRenderer.resetCamera();\n        rwi.render();\n        break;\n\n      case 'w':\n      case 'W':\n        ac = callData.pokedRenderer.getActors();\n        ac.forEach(function (anActor) {\n          var prop = anActor.getProperty();\n\n          if (prop.setRepresentationToWireframe) {\n            prop.setRepresentationToWireframe();\n          }\n        });\n        rwi.render();\n        break;\n\n      case 's':\n      case 'S':\n        ac = callData.pokedRenderer.getActors();\n        ac.forEach(function (anActor) {\n          var prop = anActor.getProperty();\n\n          if (prop.setRepresentationToSurface) {\n            prop.setRepresentationToSurface();\n          }\n        });\n        rwi.render();\n        break;\n\n      case 'v':\n      case 'V':\n        ac = callData.pokedRenderer.getActors();\n        ac.forEach(function (anActor) {\n          var prop = anActor.getProperty();\n\n          if (prop.setRepresentationToPoints) {\n            prop.setRepresentationToPoints();\n          }\n        });\n        rwi.render();\n        break;\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  state: States.IS_NONE,\n  handleObservers: 1,\n  autoAdjustCameraClippingRange: 1\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _InteractorObserver_js__WEBPACK_IMPORTED_MODULE_2__.default.extend(publicAPI, model, initialValues); // Object specific methods\n\n  vtkInteractorStyle(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkInteractorStyle'); // ----------------------------------------------------------------------------\n\nvar vtkInteractorStyle$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, _InteractorStyle_Constants_js__WEBPACK_IMPORTED_MODULE_3__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkInteractorStyle$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/InteractorStyle.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/InteractorStyle/Constants.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/InteractorStyle/Constants.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"States\": () => (/* binding */ States)\n/* harmony export */ });\nvar States = {\n  IS_START: 0,\n  IS_NONE: 0,\n  IS_ROTATE: 1,\n  IS_PAN: 2,\n  IS_SPIN: 3,\n  IS_DOLLY: 4,\n  IS_CAMERA_POSE: 11,\n  IS_WINDOW_LEVEL: 1024,\n  IS_SLICE: 1025\n};\nvar vtkInteractorStyleConstants = {\n  States: States\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkInteractorStyleConstants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/InteractorStyle/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Light.js":
/*!**************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Light.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"LIGHT_TYPES\": () => (/* binding */ LIGHT_TYPES),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n\n\n\nvar LIGHT_TYPES = ['HeadLight', 'CameraLight', 'SceneLight']; // ----------------------------------------------------------------------------\n// vtkLight methods\n// ----------------------------------------------------------------------------\n\nfunction vtkLight(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkLight');\n\n  publicAPI.getTransformedPosition = function () {\n    if (model.transformMatrix) {\n      return []; // FIXME !!!!\n    }\n\n    return [].concat(model.position);\n  };\n\n  publicAPI.getTransformedFocalPoint = function () {\n    if (model.transformMatrix) {\n      return []; // FIXME !!!!\n    }\n\n    return [].concat(model.focalPoint);\n  };\n\n  publicAPI.getDirection = function () {\n    if (model.directionMTime < model.mtime) {\n      model.direction[0] = model.focalPoint[0] - model.position[0];\n      model.direction[1] = model.focalPoint[1] - model.position[1];\n      model.direction[2] = model.focalPoint[2] - model.position[2];\n      (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.k)(model.direction);\n      model.directionMTime = model.mtime;\n    }\n\n    return model.direction;\n  };\n\n  publicAPI.setDirectionAngle = function (elevation, azimuth) {\n    var elevationRadians = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.r)(elevation);\n    var azimuthRadians = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_1__.r)(azimuth);\n    publicAPI.setPosition(Math.cos(elevationRadians) * Math.sin(azimuthRadians), Math.sin(elevationRadians), Math.cos(elevationRadians) * Math.cos(azimuthRadians));\n    publicAPI.setFocalPoint(0, 0, 0);\n    publicAPI.setPositional(0);\n  };\n\n  publicAPI.setLightTypeToHeadLight = function () {\n    publicAPI.setLightType('HeadLight');\n  };\n\n  publicAPI.setLightTypeToCameraLight = function () {\n    publicAPI.setLightType('CameraLight');\n  };\n\n  publicAPI.setLightTypeToSceneLight = function () {\n    publicAPI.setTransformMatrix(null);\n    publicAPI.setLightType('SceneLight');\n  };\n\n  publicAPI.lightTypeIsHeadLight = function () {\n    return model.lightType === 'HeadLight';\n  };\n\n  publicAPI.lightTypeIsSceneLight = function () {\n    return model.lightType === 'SceneLight';\n  };\n\n  publicAPI.lightTypeIsCameraLight = function () {\n    return model.lightType === 'CameraLight';\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  switch: true,\n  intensity: 1,\n  color: [1, 1, 1],\n  position: [0, 0, 1],\n  focalPoint: [0, 0, 0],\n  positional: false,\n  exponent: 1,\n  coneAngle: 30,\n  attenuationValues: [1, 0, 0],\n  transformMatrix: null,\n  lightType: 'SceneLight',\n  shadowAttenuation: 1,\n  direction: [0, 0, 0],\n  directionMTime: 0\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['intensity', 'switch', 'positional', 'exponent', 'coneAngle', 'transformMatrix', 'lightType', 'shadowAttenuation']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGetArray(publicAPI, model, ['color', 'position', 'focalPoint', 'attenuationValues'], 3); // Object methods\n\n  vtkLight(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkLight'); // ----------------------------------------------------------------------------\n\nvar vtkLight$1 = {\n  newInstance: newInstance,\n  extend: extend,\n  LIGHT_TYPES: LIGHT_TYPES\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkLight$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Light.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Mapper.js":
/*!***************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Mapper.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _AbstractMapper3D_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractMapper3D.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/AbstractMapper3D.js\");\n/* harmony import */ var _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Core/DataArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n/* harmony import */ var _Common_DataModel_ImageData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Common/DataModel/ImageData.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/ImageData.js\");\n/* harmony import */ var _Common_Core_LookupTable_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Common/Core/LookupTable.js */ \"./node_modules/@kitware/vtk.js/Common/Core/LookupTable.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _Common_Core_ScalarsToColors_Constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/Core/ScalarsToColors/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/Core/ScalarsToColors/Constants.js\");\n/* harmony import */ var _Mapper_CoincidentTopologyHelper_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Mapper/CoincidentTopologyHelper.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/CoincidentTopologyHelper.js\");\n/* harmony import */ var _Mapper_Constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Mapper/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/Constants.js\");\n\n\n\n\n\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar staticOffsetAPI = _Mapper_CoincidentTopologyHelper_js__WEBPACK_IMPORTED_MODULE_8__.default.staticOffsetAPI,\n    otherStaticMethods = _Mapper_CoincidentTopologyHelper_js__WEBPACK_IMPORTED_MODULE_8__.default.otherStaticMethods;\nvar ColorMode = _Mapper_Constants_js__WEBPACK_IMPORTED_MODULE_9__.default.ColorMode,\n    ScalarMode = _Mapper_Constants_js__WEBPACK_IMPORTED_MODULE_9__.default.ScalarMode,\n    GetArray = _Mapper_Constants_js__WEBPACK_IMPORTED_MODULE_9__.default.GetArray;\nvar VectorMode = _Common_Core_ScalarsToColors_Constants_js__WEBPACK_IMPORTED_MODULE_7__.default.VectorMode;\nvar VtkDataTypes = _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_3__.default.VtkDataTypes; // ----------------------------------------------------------------------------\n\nfunction notImplemented(method) {\n  return function () {\n    return _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkErrorMacro(\"vtkMapper::\".concat(method, \" - NOT IMPLEMENTED\"));\n  };\n} // ----------------------------------------------------------------------------\n// vtkMapper methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkMapper(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkMapper');\n\n  publicAPI.getBounds = function () {\n    var input = publicAPI.getInputData();\n\n    if (!input) {\n      model.bounds = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_6__.M)();\n    } else {\n      if (!model.static) {\n        publicAPI.update();\n      }\n\n      model.bounds = input.getBounds();\n    }\n\n    return model.bounds;\n  };\n\n  publicAPI.setForceCompileOnly = function (v) {\n    model.forceCompileOnly = v; // make sure we do NOT call modified()\n  };\n\n  publicAPI.createDefaultLookupTable = function () {\n    model.lookupTable = _Common_Core_LookupTable_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance();\n  };\n\n  publicAPI.getColorModeAsString = function () {\n    return _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.enumToString(ColorMode, model.colorMode);\n  };\n\n  publicAPI.setColorModeToDefault = function () {\n    return publicAPI.setColorMode(0);\n  };\n\n  publicAPI.setColorModeToMapScalars = function () {\n    return publicAPI.setColorMode(1);\n  };\n\n  publicAPI.setColorModeToDirectScalars = function () {\n    return publicAPI.setColorMode(2);\n  };\n\n  publicAPI.getScalarModeAsString = function () {\n    return _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.enumToString(ScalarMode, model.scalarMode);\n  };\n\n  publicAPI.setScalarModeToDefault = function () {\n    return publicAPI.setScalarMode(0);\n  };\n\n  publicAPI.setScalarModeToUsePointData = function () {\n    return publicAPI.setScalarMode(1);\n  };\n\n  publicAPI.setScalarModeToUseCellData = function () {\n    return publicAPI.setScalarMode(2);\n  };\n\n  publicAPI.setScalarModeToUsePointFieldData = function () {\n    return publicAPI.setScalarMode(3);\n  };\n\n  publicAPI.setScalarModeToUseCellFieldData = function () {\n    return publicAPI.setScalarMode(4);\n  };\n\n  publicAPI.setScalarModeToUseFieldData = function () {\n    return publicAPI.setScalarMode(5);\n  };\n\n  publicAPI.getAbstractScalars = function (input, scalarMode, arrayAccessMode, arrayId, arrayName) {\n    // make sure we have an input\n    if (!input || !model.scalarVisibility) {\n      return {\n        scalars: null,\n        cellFLag: false\n      };\n    }\n\n    var scalars = null;\n    var cellFlag = false; // get and scalar data according to scalar mode\n\n    if (scalarMode === ScalarMode.DEFAULT) {\n      scalars = input.getPointData().getScalars();\n\n      if (!scalars) {\n        scalars = input.getCellData().getScalars();\n        cellFlag = true;\n      }\n    } else if (scalarMode === ScalarMode.USE_POINT_DATA) {\n      scalars = input.getPointData().getScalars();\n    } else if (scalarMode === ScalarMode.USE_CELL_DATA) {\n      scalars = input.getCellData().getScalars();\n      cellFlag = true;\n    } else if (scalarMode === ScalarMode.USE_POINT_FIELD_DATA) {\n      var pd = input.getPointData();\n\n      if (arrayAccessMode === GetArray.BY_ID) {\n        scalars = pd.getArrayByIndex(arrayId);\n      } else {\n        scalars = pd.getArrayByName(arrayName);\n      }\n    } else if (scalarMode === ScalarMode.USE_CELL_FIELD_DATA) {\n      var cd = input.getCellData();\n      cellFlag = true;\n\n      if (arrayAccessMode === GetArray.BY_ID) {\n        scalars = cd.getArrayByIndex(arrayId);\n      } else {\n        scalars = cd.getArrayByName(arrayName);\n      }\n    } else if (scalarMode === ScalarMode.USE_FIELD_DATA) {\n      var fd = input.getFieldData();\n\n      if (arrayAccessMode === GetArray.BY_ID) {\n        scalars = fd.getArrayByIndex(arrayId);\n      } else {\n        scalars = fd.getArrayByName(arrayName);\n      }\n    }\n\n    return {\n      scalars: scalars,\n      cellFlag: cellFlag\n    };\n  };\n\n  publicAPI.mapScalars = function (input, alpha) {\n    var scalars = publicAPI.getAbstractScalars(input, model.scalarMode, model.arrayAccessMode, model.arrayId, model.colorByArrayName).scalars;\n\n    if (!scalars) {\n      model.colorCoordinates = null;\n      model.colorTextureMap = null;\n      model.colorMapColors = null;\n      return;\n    } // we want to only recompute when something has changed\n\n\n    var toString = \"\".concat(publicAPI.getMTime()).concat(scalars.getMTime()).concat(alpha);\n    if (model.colorBuildString === toString) return;\n\n    if (!model.useLookupTableScalarRange) {\n      publicAPI.getLookupTable().setRange(model.scalarRange[0], model.scalarRange[1]);\n    } // Decide between texture color or vertex color.\n    // Cell data always uses vertex color.\n    // Only point data can use both texture and vertex coloring.\n\n\n    if (publicAPI.canUseTextureMapForColoring(input)) {\n      publicAPI.mapScalarsToTexture(scalars, alpha);\n    } else {\n      model.colorCoordinates = null;\n      model.colorTextureMap = null;\n      var lut = publicAPI.getLookupTable();\n\n      if (lut) {\n        // Ensure that the lookup table is built\n        lut.build();\n        model.colorMapColors = lut.mapScalars(scalars, model.colorMode, -1);\n      }\n    }\n\n    model.colorBuildString = \"\".concat(publicAPI.getMTime()).concat(scalars.getMTime()).concat(alpha);\n  }; //-----------------------------------------------------------------------------\n\n\n  publicAPI.scalarToTextureCoordinate = function (scalarValue, // Input scalar\n  rangeMin, // range[0]\n  invRangeWidth) {\n    // 1/(range[1]-range[0])\n    var texCoordS = 0.5; // Scalar value is arbitrary when NaN\n\n    var texCoordT = 1.0; // 1.0 in t coordinate means NaN\n\n    if (!(0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_6__.i)(scalarValue)) {\n      // 0.0 in t coordinate means not NaN.  So why am I setting it to 0.49?\n      // Because when you are mapping scalars and you have a NaN adjacent to\n      // anything else, the interpolation everywhere should be NaN.  Thus, I\n      // want the NaN color everywhere except right on the non-NaN neighbors.\n      // To simulate this, I set the t coord for the real numbers close to\n      // the threshold so that the interpolation almost immediately looks up\n      // the NaN value.\n      texCoordT = 0.49;\n      texCoordS = (scalarValue - rangeMin) * invRangeWidth; // Some implementations apparently don't handle relatively large\n      // numbers (compared to the range [0.0, 1.0]) very well. In fact,\n      // values above 1122.0f appear to cause texture wrap-around on\n      // some systems even when edge clamping is enabled. Why 1122.0f? I\n      // don't know. For safety, we'll clamp at +/- 1000. This will\n      // result in incorrect images when the texture value should be\n      // above or below 1000, but I don't have a better solution.\n\n      if (texCoordS > 1000.0) {\n        texCoordS = 1000.0;\n      } else if (texCoordS < -1000.0) {\n        texCoordS = -1000.0;\n      }\n    }\n\n    return {\n      texCoordS: texCoordS,\n      texCoordT: texCoordT\n    };\n  }; //-----------------------------------------------------------------------------\n\n\n  publicAPI.createColorTextureCoordinates = function (input, output, numScalars, numComps, component, range, tableRange, tableNumberOfColors, useLogScale) {\n    // We have to change the range used for computing texture\n    // coordinates slightly to accommodate the special above- and\n    // below-range colors that are the first and last texels,\n    // respectively.\n    var scalarTexelWidth = (range[1] - range[0]) / tableNumberOfColors;\n    var paddedRange = [];\n    paddedRange[0] = range[0] - scalarTexelWidth;\n    paddedRange[1] = range[1] + scalarTexelWidth;\n    var invRangeWidth = 1.0 / (paddedRange[1] - paddedRange[0]);\n    var outputV = output.getData();\n    var inputV = input.getData();\n    var count = 0;\n    var outputCount = 0;\n\n    if (component < 0 || component >= numComps) {\n      for (var scalarIdx = 0; scalarIdx < numScalars; ++scalarIdx) {\n        var sum = 0;\n\n        for (var compIdx = 0; compIdx < numComps; ++compIdx) {\n          sum += inputV[count] * inputV[count];\n          count++;\n        }\n\n        var magnitude = Math.sqrt(sum);\n\n        if (useLogScale) {\n          magnitude = _Common_Core_LookupTable_js__WEBPACK_IMPORTED_MODULE_5__.default.applyLogScale(magnitude, tableRange, range);\n        }\n\n        var outputs = publicAPI.scalarToTextureCoordinate(magnitude, paddedRange[0], invRangeWidth);\n        outputV[outputCount] = outputs.texCoordS;\n        outputV[outputCount + 1] = outputs.texCoordT;\n        outputCount += 2;\n      }\n    } else {\n      count += component;\n\n      for (var _scalarIdx = 0; _scalarIdx < numScalars; ++_scalarIdx) {\n        var inputValue = inputV[count];\n\n        if (useLogScale) {\n          inputValue = _Common_Core_LookupTable_js__WEBPACK_IMPORTED_MODULE_5__.default.applyLogScale(inputValue, tableRange, range);\n        }\n\n        var _outputs = publicAPI.scalarToTextureCoordinate(inputValue, paddedRange[0], invRangeWidth);\n\n        outputV[outputCount] = _outputs.texCoordS;\n        outputV[outputCount + 1] = _outputs.texCoordT;\n        outputCount += 2;\n        count += numComps;\n      }\n    }\n  };\n\n  publicAPI.mapScalarsToTexture = function (scalars, alpha) {\n    var range = model.lookupTable.getRange();\n    var useLogScale = model.lookupTable.usingLogScale();\n\n    if (useLogScale) {\n      // convert range to log.\n      _Common_Core_LookupTable_js__WEBPACK_IMPORTED_MODULE_5__.default.getLogRange(range, range);\n    }\n\n    var origAlpha = model.lookupTable.getAlpha(); // Get rid of vertex color array.  Only texture or vertex coloring\n    // can be active at one time.  The existence of the array is the\n    // signal to use that technique.\n\n    model.colorMapColors = null; // If the lookup table has changed, then recreate the color texture map.\n    // Set a new lookup table changes this->MTime.\n\n    if (model.colorTextureMap == null || publicAPI.getMTime() > model.colorTextureMap.getMTime() || model.lookupTable.getMTime() > model.colorTextureMap.getMTime() || model.lookupTable.getAlpha() !== alpha) {\n      model.lookupTable.setAlpha(alpha);\n      model.colorTextureMap = null; // Get the texture map from the lookup table.\n      // Create a dummy ramp of scalars.\n      // In the future, we could extend vtkScalarsToColors.\n\n      model.lookupTable.build();\n      var numberOfColors = model.lookupTable.getNumberOfAvailableColors();\n\n      if (numberOfColors > 4094) {\n        numberOfColors = 4094;\n      }\n\n      numberOfColors += 2;\n      var k = (range[1] - range[0]) / (numberOfColors - 1 - 2);\n      var newArray = new Float64Array(numberOfColors * 2);\n\n      for (var i = 0; i < numberOfColors; ++i) {\n        newArray[i] = range[0] + i * k - k; // minus k to start at below range color\n\n        if (useLogScale) {\n          newArray[i] = Math.pow(10.0, newArray[i]);\n        }\n      } // Dimension on NaN.\n\n\n      for (var _i = 0; _i < numberOfColors; ++_i) {\n        newArray[_i + numberOfColors] = NaN;\n      }\n\n      model.colorTextureMap = _Common_DataModel_ImageData_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n      model.colorTextureMap.setExtent(0, numberOfColors - 1, 0, 1, 0, 0);\n      var tmp = _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance({\n        numberOfComponents: 1,\n        values: newArray\n      });\n      model.colorTextureMap.getPointData().setScalars(model.lookupTable.mapScalars(tmp, model.colorMode, 0));\n      model.lookupTable.setAlpha(origAlpha);\n    } // Create new coordinates if necessary.\n    // Need to compare lookup table in case the range has changed.\n\n\n    if (!model.colorCoordinates || publicAPI.getMTime() > model.colorCoordinates.getMTime() || publicAPI.getInputData(0).getMTime() > model.colorCoordinates.getMTime() || model.lookupTable.getMTime() > model.colorCoordinates.getMTime()) {\n      // Get rid of old colors\n      model.colorCoordinates = null; // Now create the color texture coordinates.\n\n      var numComps = scalars.getNumberOfComponents();\n      var num = scalars.getNumberOfTuples(); // const fArray = new FloatArray(num * 2);\n\n      model.colorCoordinates = _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance({\n        numberOfComponents: 2,\n        values: new Float32Array(num * 2)\n      });\n      var scalarComponent = model.lookupTable.getVectorComponent(); // Although I like the feature of applying magnitude to single component\n      // scalars, it is not how the old MapScalars for vertex coloring works.\n\n      if (model.lookupTable.getVectorMode() === VectorMode.MAGNITUDE && scalars.getNumberOfComponents() > 1) {\n        scalarComponent = -1;\n      }\n\n      publicAPI.createColorTextureCoordinates(scalars, model.colorCoordinates, num, numComps, scalarComponent, range, model.lookupTable.getRange(), model.colorTextureMap.getPointData().getScalars().getNumberOfTuples() / 2 - 2, useLogScale);\n    }\n  };\n\n  publicAPI.getIsOpaque = function () {\n    var lut = publicAPI.getLookupTable();\n\n    if (lut) {\n      // Ensure that the lookup table is built\n      lut.build();\n      return lut.isOpaque();\n    }\n\n    return true;\n  };\n\n  publicAPI.canUseTextureMapForColoring = function (input) {\n    if (!model.interpolateScalarsBeforeMapping) {\n      return false; // user doesn't want us to use texture maps at all.\n    } // index color does not use textures\n\n\n    if (model.lookupTable && model.lookupTable.getIndexedLookup()) {\n      return false;\n    }\n\n    var gasResult = publicAPI.getAbstractScalars(input, model.scalarMode, model.arrayAccessMode, model.arrayId, model.colorByArrayName);\n    var scalars = gasResult.scalars;\n\n    if (!scalars) {\n      // no scalars on this dataset, we don't care if texture is used at all.\n      return false;\n    }\n\n    if (gasResult.cellFlag) {\n      return false; // cell data colors, don't use textures.\n    }\n\n    if (model.colorMode === ColorMode.DEFAULT && scalars.getDataType() === VtkDataTypes.UNSIGNED_CHAR || model.colorMode === ColorMode.DIRECT_SCALARS) {\n      // Don't use texture is direct coloring using RGB unsigned chars is\n      // requested.\n      return false;\n    }\n\n    return true;\n  };\n\n  publicAPI.clearColorArrays = function () {\n    model.colorMapColors = null;\n    model.colorCoordinates = null;\n    model.colorTextureMap = null;\n  };\n\n  publicAPI.getLookupTable = function () {\n    if (!model.lookupTable) {\n      publicAPI.createDefaultLookupTable();\n    }\n\n    return model.lookupTable;\n  };\n\n  publicAPI.getMTime = function () {\n    var mt = model.mtime;\n\n    if (model.lookupTable !== null) {\n      var time = model.lookupTable.getMTime();\n      mt = time > mt ? time : mt;\n    }\n\n    return mt;\n  };\n\n  publicAPI.getPrimitiveCount = function () {\n    var input = publicAPI.getInputData();\n    var pcount = {\n      points: input.getPoints().getNumberOfValues() / 3,\n      verts: input.getVerts().getNumberOfValues() - input.getVerts().getNumberOfCells(),\n      lines: input.getLines().getNumberOfValues() - 2 * input.getLines().getNumberOfCells(),\n      triangles: input.getPolys().getNumberOfValues() - 3 * input.getLines().getNumberOfCells()\n    };\n    return pcount;\n  };\n\n  publicAPI.acquireInvertibleLookupTable = notImplemented('AcquireInvertibleLookupTable');\n  publicAPI.valueToColor = notImplemented('ValueToColor');\n  publicAPI.colorToValue = notImplemented('ColorToValue');\n  publicAPI.useInvertibleColorFor = notImplemented('UseInvertibleColorFor');\n  publicAPI.clearInvertibleColor = notImplemented('ClearInvertibleColor');\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  colorMapColors: null,\n  // Same as this->Colors\n  static: false,\n  lookupTable: null,\n  scalarVisibility: true,\n  scalarRange: [0, 1],\n  useLookupTableScalarRange: false,\n  colorMode: 0,\n  scalarMode: 0,\n  arrayAccessMode: 1,\n  // By_NAME\n  renderTime: 0,\n  colorByArrayName: null,\n  fieldDataTupleId: -1,\n  interpolateScalarsBeforeMapping: false,\n  colorCoordinates: null,\n  colorTextureMap: null,\n  forceCompileOnly: 0,\n  useInvertibleColors: false,\n  invertibleScalars: null,\n  viewSpecificProperties: null,\n  customShaderAttributes: []\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _AbstractMapper3D_js__WEBPACK_IMPORTED_MODULE_2__.default.extend(publicAPI, model, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['colorCoordinates', 'colorMapColors', 'colorTextureMap']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['colorByArrayName', 'arrayAccessMode', 'colorMode', 'fieldDataTupleId', 'interpolateScalarsBeforeMapping', 'lookupTable', 'renderTime', 'scalarMode', 'scalarVisibility', 'static', 'useLookupTableScalarRange', 'viewSpecificProperties', 'customShaderAttributes' // point data array names that will be transferred to the VBO\n  ]);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGetArray(publicAPI, model, ['scalarRange'], 2);\n\n  if (!model.viewSpecificProperties) {\n    model.viewSpecificProperties = {};\n  }\n\n  _Mapper_CoincidentTopologyHelper_js__WEBPACK_IMPORTED_MODULE_8__.default.implementCoincidentTopologyMethods(publicAPI, model); // Object methods\n\n  vtkMapper(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkMapper'); // ----------------------------------------------------------------------------\n\nvar vtkMapper$1 = _objectSpread(_objectSpread(_objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, staticOffsetAPI), otherStaticMethods), _Mapper_Constants_js__WEBPACK_IMPORTED_MODULE_9__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkMapper$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Mapper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/CoincidentTopologyHelper.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/CoincidentTopologyHelper.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"CATEGORIES\": () => (/* binding */ CATEGORIES)\n/* harmony export */ });\n/* harmony import */ var _Static_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Static.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/Static.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\n\n/* eslint-disable arrow-body-style */\n\nfunction addCoincidentTopologyMethods(publicAPI, model, nameList) {\n  nameList.forEach(function (item) {\n    publicAPI[\"get\".concat(item.method)] = function () {\n      return model[item.key];\n    };\n\n    publicAPI[\"set\".concat(item.method)] = function (factor, offset) {\n      model[item.key] = {\n        factor: factor,\n        offset: offset\n      };\n    };\n  });\n}\n\nvar CATEGORIES = ['Polygon', 'Line', 'Point']; // CoincidentTopology static methods ------------------------------------------\n\nvar staticOffsetModel = {\n  Polygon: {\n    factor: 2,\n    offset: 0\n  },\n  Line: {\n    factor: 1,\n    offset: -1\n  },\n  Point: {\n    factor: 0,\n    offset: -2\n  }\n};\nvar staticOffsetAPI = {};\naddCoincidentTopologyMethods(staticOffsetAPI, staticOffsetModel, CATEGORIES.map(function (key) {\n  return {\n    key: key,\n    method: \"ResolveCoincidentTopology\".concat(key, \"OffsetParameters\")\n  };\n}));\n\nfunction implementCoincidentTopologyMethods(publicAPI, model) {\n  if (model.resolveCoincidentTopology === undefined) {\n    model.resolveCoincidentTopology = false;\n  }\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['resolveCoincidentTopology']); // Relative methods\n\n  model.topologyOffset = {\n    Polygon: {\n      factor: 0,\n      offset: 0\n    },\n    Line: {\n      factor: 0,\n      offset: 0\n    },\n    Point: {\n      factor: 0,\n      offset: 0\n    }\n  }; // Add Static methods to our instance\n\n  Object.keys(_Static_js__WEBPACK_IMPORTED_MODULE_0__.default).forEach(function (methodName) {\n    publicAPI[methodName] = _Static_js__WEBPACK_IMPORTED_MODULE_0__.default[methodName];\n  });\n  Object.keys(staticOffsetAPI).forEach(function (methodName) {\n    publicAPI[methodName] = staticOffsetAPI[methodName];\n  });\n  addCoincidentTopologyMethods(publicAPI, model.topologyOffset, CATEGORIES.map(function (key) {\n    return {\n      key: key,\n      method: \"RelativeCoincidentTopology\".concat(key, \"OffsetParameters\")\n    };\n  }));\n\n  publicAPI.getCoincidentTopologyPolygonOffsetParameters = function () {\n    var globalValue = staticOffsetAPI.getResolveCoincidentTopologyPolygonOffsetParameters();\n    var localValue = publicAPI.getRelativeCoincidentTopologyPolygonOffsetParameters();\n    return {\n      factor: globalValue.factor + localValue.factor,\n      offset: globalValue.offset + localValue.offset\n    };\n  };\n\n  publicAPI.getCoincidentTopologyLineOffsetParameters = function () {\n    var globalValue = staticOffsetAPI.getResolveCoincidentTopologyLineOffsetParameters();\n    var localValue = publicAPI.getRelativeCoincidentTopologyLineOffsetParameters();\n    return {\n      factor: globalValue.factor + localValue.factor,\n      offset: globalValue.offset + localValue.offset\n    };\n  };\n\n  publicAPI.getCoincidentTopologyPointOffsetParameter = function () {\n    var globalValue = staticOffsetAPI.getResolveCoincidentTopologyPointOffsetParameters();\n    var localValue = publicAPI.getRelativeCoincidentTopologyPointOffsetParameters();\n    return {\n      factor: globalValue.factor + localValue.factor,\n      offset: globalValue.offset + localValue.offset\n    };\n  };\n}\n\nvar CoincidentTopologyHelper = {\n  implementCoincidentTopologyMethods: implementCoincidentTopologyMethods,\n  staticOffsetAPI: staticOffsetAPI,\n  otherStaticMethods: _Static_js__WEBPACK_IMPORTED_MODULE_0__.default,\n  CATEGORIES: CATEGORIES\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CoincidentTopologyHelper);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/CoincidentTopologyHelper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/Constants.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/Constants.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"ColorMode\": () => (/* binding */ ColorMode),\n/* harmony export */   \"GetArray\": () => (/* binding */ GetArray),\n/* harmony export */   \"ScalarMode\": () => (/* binding */ ScalarMode)\n/* harmony export */ });\nvar ColorMode = {\n  DEFAULT: 0,\n  MAP_SCALARS: 1,\n  DIRECT_SCALARS: 2\n};\nvar ScalarMode = {\n  DEFAULT: 0,\n  USE_POINT_DATA: 1,\n  USE_CELL_DATA: 2,\n  USE_POINT_FIELD_DATA: 3,\n  USE_CELL_FIELD_DATA: 4,\n  USE_FIELD_DATA: 5\n};\nvar GetArray = {\n  BY_ID: 0,\n  BY_NAME: 1\n};\nvar Constants = {\n  ColorMode: ColorMode,\n  GetArray: GetArray,\n  ScalarMode: ScalarMode\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/Static.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/Static.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"RESOLVE_COINCIDENT_TOPOLOGY_MODE\": () => (/* binding */ RESOLVE_COINCIDENT_TOPOLOGY_MODE),\n/* harmony export */   \"getResolveCoincidentTopology\": () => (/* binding */ getResolveCoincidentTopology),\n/* harmony export */   \"getResolveCoincidentTopologyAsString\": () => (/* binding */ getResolveCoincidentTopologyAsString),\n/* harmony export */   \"getResolveCoincidentTopologyPolygonOffsetFaces\": () => (/* binding */ getResolveCoincidentTopologyPolygonOffsetFaces),\n/* harmony export */   \"setResolveCoincidentTopology\": () => (/* binding */ setResolveCoincidentTopology),\n/* harmony export */   \"setResolveCoincidentTopologyPolygonOffsetFaces\": () => (/* binding */ setResolveCoincidentTopologyPolygonOffsetFaces),\n/* harmony export */   \"setResolveCoincidentTopologyToDefault\": () => (/* binding */ setResolveCoincidentTopologyToDefault),\n/* harmony export */   \"setResolveCoincidentTopologyToOff\": () => (/* binding */ setResolveCoincidentTopologyToOff),\n/* harmony export */   \"setResolveCoincidentTopologyToPolygonOffset\": () => (/* binding */ setResolveCoincidentTopologyToPolygonOffset)\n/* harmony export */ });\nvar resolveCoincidentTopologyPolygonOffsetFaces = 1;\nvar resolveCoincidentTopology = 0;\nvar RESOLVE_COINCIDENT_TOPOLOGY_MODE = ['VTK_RESOLVE_OFF', 'VTK_RESOLVE_POLYGON_OFFSET'];\nfunction getResolveCoincidentTopologyPolygonOffsetFaces() {\n  return resolveCoincidentTopologyPolygonOffsetFaces;\n}\nfunction setResolveCoincidentTopologyPolygonOffsetFaces(value) {\n  resolveCoincidentTopologyPolygonOffsetFaces = value;\n}\nfunction getResolveCoincidentTopology() {\n  return resolveCoincidentTopology;\n}\nfunction setResolveCoincidentTopology() {\n  var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n  resolveCoincidentTopology = mode;\n}\nfunction setResolveCoincidentTopologyToDefault() {\n  setResolveCoincidentTopology(0); // VTK_RESOLVE_OFF\n}\nfunction setResolveCoincidentTopologyToOff() {\n  setResolveCoincidentTopology(0); // VTK_RESOLVE_OFF\n}\nfunction setResolveCoincidentTopologyToPolygonOffset() {\n  setResolveCoincidentTopology(1); // VTK_RESOLVE_POLYGON_OFFSET\n}\nfunction getResolveCoincidentTopologyAsString() {\n  return RESOLVE_COINCIDENT_TOPOLOGY_MODE[resolveCoincidentTopology];\n}\nvar otherStaticMethods = {\n  getResolveCoincidentTopologyAsString: getResolveCoincidentTopologyAsString,\n  getResolveCoincidentTopologyPolygonOffsetFaces: getResolveCoincidentTopologyPolygonOffsetFaces,\n  getResolveCoincidentTopology: getResolveCoincidentTopology,\n  setResolveCoincidentTopology: setResolveCoincidentTopology,\n  setResolveCoincidentTopologyPolygonOffsetFaces: setResolveCoincidentTopologyPolygonOffsetFaces,\n  setResolveCoincidentTopologyToDefault: setResolveCoincidentTopologyToDefault,\n  setResolveCoincidentTopologyToOff: setResolveCoincidentTopologyToOff,\n  setResolveCoincidentTopologyToPolygonOffset: setResolveCoincidentTopologyToPolygonOffset\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (otherStaticMethods);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/Static.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/PixelSpaceCallbackMapper.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/PixelSpaceCallbackMapper.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Mapper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Mapper.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Mapper.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/vec3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js\");\n\n\n\n\n\n// vtkPixelSpaceCallbackMapper methods\n// ----------------------------------------------------------------------------\n\nfunction vtkPixelSpaceCallbackMapper(publicAPI, model) {\n  model.classHierarchy.push('vtkPixelSpaceCallbackMapper');\n\n  if (!model.callback) {\n    model.callback = function () {};\n  }\n\n  publicAPI.invokeCallback = function (dataset, camera, aspect, windowSize, depthValues) {\n    if (!model.callback) {\n      return;\n    }\n\n    var matrix = camera.getCompositeProjectionMatrix(aspect, -1, 1);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_2__.j)(matrix, matrix);\n    var dataPoints = dataset.getPoints();\n    var result = new Float64Array(3);\n    var width = windowSize.usize;\n    var height = windowSize.vsize;\n    var hw = width / 2;\n    var hh = height / 2;\n    var coords = [];\n\n    for (var pidx = 0; pidx < dataPoints.getNumberOfPoints(); pidx += 1) {\n      var point = dataPoints.getPoint(pidx);\n      (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_3__.t)(result, point, matrix);\n      var coord = [result[0] * hw + hw, result[1] * hh + hh, result[2], 0];\n\n      if (depthValues) {\n        var linIdx = Math.floor(coord[1]) * width + Math.floor(coord[0]);\n        var idx = linIdx * 4;\n        var r = depthValues[idx] / 255;\n        var g = depthValues[idx + 1] / 255;\n        var z = (r * 256 + g) / 257;\n        coord[3] = z * 2 - 1;\n      }\n\n      coords.push(coord);\n    }\n\n    model.callback(coords, camera, aspect, depthValues, [width, height]);\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  callback: null,\n  useZValues: false\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _Mapper_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['callback', 'useZValues']); // Object methods\n\n  vtkPixelSpaceCallbackMapper(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkPixelSpaceCallbackMapper'); // ----------------------------------------------------------------------------\n\nvar vtkPixelSpaceCallbackMapper$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkPixelSpaceCallbackMapper$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/PixelSpaceCallbackMapper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Prop.js":
/*!*************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Prop.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\nfunction notImplemented(method) {\n  return function () {\n    return _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.vtkErrorMacro(\"vtkProp::\".concat(method, \" - NOT IMPLEMENTED\"));\n  };\n} // ----------------------------------------------------------------------------\n// vtkProp methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkProp(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkProp');\n\n  publicAPI.getMTime = function () {\n    var m1 = model.mtime;\n\n    for (var index = 0; index < model.textures.length; ++index) {\n      var m2 = model.textures[index].getMTime();\n\n      if (m2 > m1) {\n        m1 = m2;\n      }\n    }\n\n    return m1;\n  };\n\n  publicAPI.getNestedProps = function () {\n    return null;\n  };\n\n  publicAPI.getActors = function () {\n    return [];\n  };\n\n  publicAPI.getActors2D = function () {\n    return [];\n  };\n\n  publicAPI.getVolumes = function () {\n    return [];\n  };\n\n  publicAPI.pick = notImplemented('pick');\n  publicAPI.hasKey = notImplemented('hasKey');\n\n  publicAPI.getRedrawMTime = function () {\n    return model.mtime;\n  };\n\n  publicAPI.setEstimatedRenderTime = function (t) {\n    model.estimatedRenderTime = t;\n    model.savedEstimatedRenderTime = t;\n  };\n\n  publicAPI.restoreEstimatedRenderTime = function () {\n    model.estimatedRenderTime = model.savedEstimatedRenderTime;\n  };\n\n  publicAPI.addEstimatedRenderTime = function (t) {\n    model.estimatedRenderTime += t;\n  };\n\n  publicAPI.setAllocatedRenderTime = function (t) {\n    model.allocatedRenderTime = t;\n    model.savedEstimatedRenderTime = model.estimatedRenderTime;\n    model.estimatedRenderTime = 0;\n  };\n\n  publicAPI.getSupportsSelection = function () {\n    return false;\n  };\n\n  publicAPI.getTextures = function () {\n    return model.textures;\n  };\n\n  publicAPI.hasTexture = function (texture) {\n    return model.textures.indexOf(texture) !== -1;\n  };\n\n  publicAPI.addTexture = function (texture) {\n    if (texture && !publicAPI.hasTexture(texture)) {\n      model.textures = model.textures.concat(texture);\n      publicAPI.modified();\n    }\n  };\n\n  publicAPI.removeTexture = function (texture) {\n    var newTextureList = model.textures.filter(function (item) {\n      return item !== texture;\n    });\n\n    if (model.textures.length !== newTextureList.length) {\n      model.textures = newTextureList;\n      publicAPI.modified();\n    }\n  };\n\n  publicAPI.removeAllTextures = function () {\n    model.textures = [];\n    publicAPI.modified();\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  visibility: true,\n  pickable: true,\n  dragable: true,\n  useBounds: true,\n  allocatedRenderTime: 10,\n  estimatedRenderTime: 0,\n  savedEstimatedRenderTime: 0,\n  renderTimeMultiplier: 1,\n  paths: null,\n  textures: []\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['estimatedRenderTime', 'allocatedRenderTime']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['visibility', 'pickable', 'dragable', 'useBounds', 'renderTimeMultiplier']); // Object methods\n\n  vtkProp(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkProp'); // ----------------------------------------------------------------------------\n\nvar vtkProp$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkProp$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Prop.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Prop3D.js":
/*!***************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Prop3D.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/DataModel/BoundingBox.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/BoundingBox.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _Prop_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Prop.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Prop.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/quat.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/quat.js\");\n\n\n\n\n\n\n\n// vtkProp3D methods\n// ----------------------------------------------------------------------------\n\nfunction vtkProp3D(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkProp3D');\n\n  publicAPI.addPosition = function (deltaXYZ) {\n    model.position = model.position.map(function (value, index) {\n      return value + deltaXYZ[index];\n    });\n    publicAPI.modified();\n  };\n\n  publicAPI.getOrientationWXYZ = function () {\n    var q = (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_5__.c)();\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.n)(q, model.rotation);\n    var oaxis = new Float64Array(3);\n    var w = (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_5__.g)(oaxis, q);\n    return [(0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.x)(w), oaxis[0], oaxis[1], oaxis[2]];\n  };\n\n  publicAPI.rotateX = function (val) {\n    if (val === 0.0) {\n      return;\n    }\n\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.d)(model.rotation, model.rotation, (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(val));\n    publicAPI.modified();\n  };\n\n  publicAPI.rotateY = function (val) {\n    if (val === 0.0) {\n      return;\n    }\n\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.g)(model.rotation, model.rotation, (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(val));\n    publicAPI.modified();\n  };\n\n  publicAPI.rotateZ = function (val) {\n    if (val === 0.0) {\n      return;\n    }\n\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.h)(model.rotation, model.rotation, (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(val));\n    publicAPI.modified();\n  };\n\n  publicAPI.rotateWXYZ = function (degrees, x, y, z) {\n    if (degrees === 0.0 || x === 0.0 && y === 0.0 && z === 0.0) {\n      return;\n    } // convert to radians\n\n\n    var angle = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.r)(degrees);\n    var q = (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_5__.c)();\n    (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_5__.s)(q, [x, y, z], angle);\n    var quatMat = new Float64Array(16);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.k)(quatMat, q);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.m)(model.rotation, model.rotation, quatMat);\n    publicAPI.modified();\n  };\n\n  publicAPI.setOrientation = function (x, y, z) {\n    if (x === model.orientation[0] && y === model.orientation[1] && z === model.orientation[2]) {\n      return false;\n    }\n\n    model.orientation = [x, y, z];\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.a)(model.rotation);\n    publicAPI.rotateZ(z);\n    publicAPI.rotateX(x);\n    publicAPI.rotateY(y);\n    publicAPI.modified();\n    return true;\n  };\n\n  publicAPI.setUserMatrix = function (matrix) {\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.c)(model.userMatrix, matrix);\n    publicAPI.modified();\n  };\n\n  publicAPI.getMatrix = function () {\n    publicAPI.computeMatrix();\n    return model.matrix;\n  };\n\n  publicAPI.computeMatrix = function () {\n    // check whether or not need to rebuild the matrix\n    if (publicAPI.getMTime() > model.matrixMTime.getMTime()) {\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.a)(model.matrix);\n\n      if (model.userMatrix) {\n        (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.m)(model.matrix, model.matrix, model.userMatrix);\n      }\n\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.t)(model.matrix, model.matrix, model.origin);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.t)(model.matrix, model.matrix, model.position);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.m)(model.matrix, model.matrix, model.rotation);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.s)(model.matrix, model.matrix, model.scale);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.t)(model.matrix, model.matrix, [-model.origin[0], -model.origin[1], -model.origin[2]]);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.j)(model.matrix, model.matrix); // check for identity\n\n      model.isIdentity = true;\n\n      for (var i = 0; i < 4; ++i) {\n        for (var j = 0; j < 4; ++j) {\n          if ((i === j ? 1.0 : 0.0) !== model.matrix[i + j * 4]) {\n            model.isIdentity = false;\n          }\n        }\n      }\n\n      model.matrixMTime.modified();\n    }\n  };\n\n  publicAPI.getCenter = function () {\n    return _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_1__.default.getCenter(model.bounds);\n  };\n\n  publicAPI.getLength = function () {\n    return _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_1__.default.getLength(model.bounds);\n  };\n\n  publicAPI.getXRange = function () {\n    return _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_1__.default.getXRange(model.bounds);\n  };\n\n  publicAPI.getYRange = function () {\n    return _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_1__.default.getYRange(model.bounds);\n  };\n\n  publicAPI.getZRange = function () {\n    return _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_1__.default.getZRange(model.bounds);\n  };\n\n  publicAPI.getUserMatrix = function () {\n    return model.userMatrix;\n  };\n\n  function updateIdentityFlag() {\n    publicAPI.computeMatrix();\n  }\n\n  publicAPI.onModified(updateIdentityFlag);\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  origin: [0, 0, 0],\n  position: [0, 0, 0],\n  orientation: [0, 0, 0],\n  rotation: null,\n  scale: [1, 1, 1],\n  bounds: [1, -1, 1, -1, 1, -1],\n  userMatrix: null,\n  userMatrixMTime: null,\n  cachedProp3D: null,\n  isIdentity: true,\n  matrixMTime: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _Prop_js__WEBPACK_IMPORTED_MODULE_3__.default.extend(publicAPI, model, initialValues);\n  model.matrixMTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model.matrixMTime); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['bounds', 'isIdentity']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.getArray(publicAPI, model, ['orientation']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGetArray(publicAPI, model, ['origin', 'position', 'scale'], 3); // Object internal instance\n\n  model.matrix = (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.a)(new Float64Array(16));\n  model.rotation = (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.a)(new Float64Array(16));\n  model.userMatrix = (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.a)(new Float64Array(16));\n  model.transform = null; // FIXME\n  // Object methods\n\n  vtkProp3D(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkProp3D'); // ----------------------------------------------------------------------------\n\nvar vtkProp3D$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkProp3D$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Prop3D.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Property.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Property.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Property_Constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Property/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Property/Constants.js\");\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar Representation = _Property_Constants_js__WEBPACK_IMPORTED_MODULE_2__.default.Representation,\n    Interpolation = _Property_Constants_js__WEBPACK_IMPORTED_MODULE_2__.default.Interpolation;\n\nfunction notImplemented(method) {\n  return function () {\n    return _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkErrorMacro(\"vtkProperty::\".concat(method, \" - NOT IMPLEMENTED\"));\n  };\n} // ----------------------------------------------------------------------------\n// vtkProperty methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkProperty(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkProperty');\n\n  publicAPI.setColor = function (r, g, b) {\n    if (Array.isArray(r)) {\n      if (model.color[0] !== r[0] || model.color[1] !== r[1] || model.color[2] !== r[2]) {\n        model.color[0] = r[0];\n        model.color[1] = r[1];\n        model.color[2] = r[2];\n        publicAPI.modified();\n      }\n    } else if (model.color[0] !== r || model.color[1] !== g || model.color[2] !== b) {\n      model.color[0] = r;\n      model.color[1] = g;\n      model.color[2] = b;\n      publicAPI.modified();\n    }\n\n    publicAPI.setDiffuseColor(model.color);\n    publicAPI.setAmbientColor(model.color);\n    publicAPI.setSpecularColor(model.color);\n  };\n\n  publicAPI.computeCompositeColor = notImplemented('ComputeCompositeColor');\n\n  publicAPI.getColor = function () {\n    // Inline computeCompositeColor\n    var norm = 0.0;\n\n    if (model.ambient + model.diffuse + model.specular > 0) {\n      norm = 1.0 / (model.ambient + model.diffuse + model.specular);\n    }\n\n    for (var i = 0; i < 3; i++) {\n      model.color[i] = norm * (model.ambient * model.ambientColor[i] + model.diffuse * model.diffuseColor[i] + model.specular * model.specularColor[i]);\n    }\n\n    return [].concat(model.color);\n  };\n\n  publicAPI.addShaderVariable = notImplemented('AddShaderVariable');\n\n  publicAPI.setInterpolationToFlat = function () {\n    return publicAPI.setInterpolation(Interpolation.FLAT);\n  };\n\n  publicAPI.setInterpolationToGouraud = function () {\n    return publicAPI.setInterpolation(Interpolation.GOURAUD);\n  };\n\n  publicAPI.setInterpolationToPhong = function () {\n    return publicAPI.setInterpolation(Interpolation.PHONG);\n  };\n\n  publicAPI.getInterpolationAsString = function () {\n    return _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.enumToString(Interpolation, model.interpolation);\n  };\n\n  publicAPI.setRepresentationToWireframe = function () {\n    return publicAPI.setRepresentation(Representation.WIREFRAME);\n  };\n\n  publicAPI.setRepresentationToSurface = function () {\n    return publicAPI.setRepresentation(Representation.SURFACE);\n  };\n\n  publicAPI.setRepresentationToPoints = function () {\n    return publicAPI.setRepresentation(Representation.POINTS);\n  };\n\n  publicAPI.getRepresentationAsString = function () {\n    return _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.enumToString(Representation, model.representation);\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  color: [1, 1, 1],\n  ambientColor: [1, 1, 1],\n  diffuseColor: [1, 1, 1],\n  specularColor: [1, 1, 1],\n  edgeColor: [0, 0, 0],\n  ambient: 0,\n  diffuse: 1,\n  specular: 0,\n  specularPower: 1,\n  opacity: 1,\n  interpolation: Interpolation.GOURAUD,\n  representation: Representation.SURFACE,\n  edgeVisibility: false,\n  backfaceCulling: false,\n  frontfaceCulling: false,\n  pointSize: 1,\n  lineWidth: 1,\n  lighting: true,\n  shading: false,\n  materialName: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['lighting', 'interpolation', 'ambient', 'diffuse', 'specular', 'specularPower', 'opacity', 'edgeVisibility', 'lineWidth', 'pointSize', 'backfaceCulling', 'frontfaceCulling', 'representation']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGetArray(publicAPI, model, ['ambientColor', 'specularColor', 'diffuseColor', 'edgeColor'], 3); // Object methods\n\n  vtkProperty(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkProperty'); // ----------------------------------------------------------------------------\n\nvar vtkProperty$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, _Property_Constants_js__WEBPACK_IMPORTED_MODULE_2__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkProperty$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Property.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Property/Constants.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Property/Constants.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"Interpolation\": () => (/* binding */ Interpolation),\n/* harmony export */   \"Representation\": () => (/* binding */ Representation),\n/* harmony export */   \"Shading\": () => (/* binding */ Shading)\n/* harmony export */ });\nvar Shading = {\n  FLAT: 0,\n  GOURAUD: 1,\n  PHONG: 2\n};\nvar Representation = {\n  POINTS: 0,\n  WIREFRAME: 1,\n  SURFACE: 2\n};\nvar Interpolation = Shading;\nvar PropertyConst = {\n  Shading: Shading,\n  Representation: Representation,\n  Interpolation: Interpolation\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PropertyConst);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Property/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindow.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindow.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"listViewAPIs\": () => (/* binding */ listViewAPIs),\n/* harmony export */   \"newAPISpecificView\": () => (/* binding */ newAPISpecificView),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance),\n/* harmony export */   \"registerViewConstructor\": () => (/* binding */ registerViewConstructor)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\nvar DEFAULT_VIEW_API = navigator.gpu ? 'WebGPU' : 'WebGL';\nvar VIEW_CONSTRUCTORS = Object.create(null); // ----------------------------------------------------------------------------\n// static methods\n// ----------------------------------------------------------------------------\n\nfunction registerViewConstructor(name, constructor) {\n  VIEW_CONSTRUCTORS[name] = constructor;\n}\nfunction listViewAPIs() {\n  return Object.keys(VIEW_CONSTRUCTORS);\n}\nfunction newAPISpecificView(name) {\n  var initialValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return VIEW_CONSTRUCTORS[name] && VIEW_CONSTRUCTORS[name](initialValues);\n} // ----------------------------------------------------------------------------\n// vtkRenderWindow methods\n// ----------------------------------------------------------------------------\n\nfunction vtkRenderWindow(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkRenderWindow'); // Add renderer\n\n  publicAPI.addRenderer = function (renderer) {\n    if (publicAPI.hasRenderer(renderer)) {\n      return;\n    }\n\n    renderer.setRenderWindow(publicAPI);\n    model.renderers.push(renderer); // for (this->Renderers->InitTraversal(rsit);\n    //      (aren = this->Renderers->GetNextRenderer(rsit)); )\n    //   {\n    //   aren->SetAllocatedRenderTime\n    //     (1.0/(this->DesiredUpdateRate*this->Renderers->GetNumberOfItems()));\n    //   }\n\n    publicAPI.modified();\n  }; // Remove renderer\n\n\n  publicAPI.removeRenderer = function (renderer) {\n    model.renderers = model.renderers.filter(function (r) {\n      return r !== renderer;\n    });\n    publicAPI.modified();\n  };\n\n  publicAPI.hasRenderer = function (ren) {\n    return model.renderers.indexOf(ren) !== -1;\n  }; // get an API specific view of this data\n\n\n  publicAPI.newAPISpecificView = function (name) {\n    var initialValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    return newAPISpecificView(name || model.defaultViewAPI, initialValues);\n  }; // Add renderer\n\n\n  publicAPI.addView = function (view) {\n    if (publicAPI.hasView(view)) {\n      return;\n    }\n\n    view.setRenderable(publicAPI);\n    model.views.push(view);\n    publicAPI.modified();\n  }; // Remove renderer\n\n\n  publicAPI.removeView = function (view) {\n    model.views = model.views.filter(function (r) {\n      return r !== view;\n    });\n    publicAPI.modified();\n  };\n\n  publicAPI.hasView = function (view) {\n    return model.views.indexOf(view) !== -1;\n  };\n\n  publicAPI.render = function () {\n    if (model.interactor) {\n      model.interactor.render();\n    } else {\n      model.views.forEach(function (view) {\n        return view.traverseAllPasses();\n      });\n    }\n  };\n\n  publicAPI.getStatistics = function () {\n    var results = {\n      propCount: 0,\n      invisiblePropCount: 0\n    };\n    model.renderers.forEach(function (ren) {\n      var props = ren.getViewProps();\n      props.forEach(function (prop) {\n        if (prop.getVisibility()) {\n          results.propCount += 1;\n          var mpr = prop.getMapper && prop.getMapper();\n\n          if (mpr && mpr.getPrimitiveCount) {\n            var pcount = mpr.getPrimitiveCount();\n            Object.keys(pcount).forEach(function (keyName) {\n              if (!results[keyName]) {\n                results[keyName] = 0;\n              }\n\n              results[keyName] += pcount[keyName];\n            });\n          }\n        } else {\n          results.invisiblePropCount += 1;\n        }\n      });\n    });\n    results.str = Object.keys(results).map(function (keyName) {\n      return \"\".concat(keyName, \": \").concat(results[keyName]);\n    }).join('\\n');\n    return results;\n  };\n\n  publicAPI.captureImages = function () {\n    var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'image/png';\n    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setImmediate(publicAPI.render);\n    return model.views.map(function (view) {\n      return view.captureNextImage ? view.captureNextImage(format, opts) : undefined;\n    }).filter(function (i) {\n      return !!i;\n    });\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  defaultViewAPI: DEFAULT_VIEW_API,\n  renderers: [],\n  views: [],\n  interactor: null,\n  neverRendered: true,\n  numberOfLayers: 1\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['interactor', 'numberOfLayers', 'views', 'defaultViewAPI']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['neverRendered']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.getArray(publicAPI, model, ['renderers']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.event(publicAPI, model, 'completion'); // Object methods\n\n  vtkRenderWindow(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkRenderWindow'); // ----------------------------------------------------------------------------\n\nvar vtkRenderWindow$1 = {\n  newInstance: newInstance,\n  extend: extend,\n  registerViewConstructor: registerViewConstructor,\n  listViewAPIs: listViewAPIs,\n  newAPISpecificView: newAPISpecificView\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkRenderWindow$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindow.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindowInteractor.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindowInteractor.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _RenderWindowInteractor_Constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RenderWindowInteractor/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindowInteractor/Constants.js\");\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar Device = _RenderWindowInteractor_Constants_js__WEBPACK_IMPORTED_MODULE_3__.default.Device,\n    Input = _RenderWindowInteractor_Constants_js__WEBPACK_IMPORTED_MODULE_3__.default.Input;\nvar vtkWarningMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkWarningMacro,\n    vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkErrorMacro,\n    normalizeWheel = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.normalizeWheel,\n    vtkOnceErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkOnceErrorMacro; // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n\nvar deviceInputMap = {\n  'OpenVR Gamepad': [Input.TrackPad, Input.Trigger, Input.Grip, Input.ApplicationMenu]\n};\nvar handledEvents = ['StartAnimation', 'Animation', 'EndAnimation', 'MouseEnter', 'MouseLeave', 'StartMouseMove', 'MouseMove', 'EndMouseMove', 'LeftButtonPress', 'LeftButtonRelease', 'MiddleButtonPress', 'MiddleButtonRelease', 'RightButtonPress', 'RightButtonRelease', 'KeyPress', 'KeyDown', 'KeyUp', 'StartMouseWheel', 'MouseWheel', 'EndMouseWheel', 'StartPinch', 'Pinch', 'EndPinch', 'StartPan', 'Pan', 'EndPan', 'StartRotate', 'Rotate', 'EndRotate', 'Button3D', 'Move3D', 'StartPointerLock', 'EndPointerLock', 'StartInteraction', 'Interaction', 'EndInteraction'];\n\nfunction preventDefault(event) {\n  if (event.cancelable) {\n    event.stopPropagation();\n    event.preventDefault();\n  }\n\n  return false;\n} // ----------------------------------------------------------------------------\n// vtkRenderWindowInteractor methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkRenderWindowInteractor(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkRenderWindowInteractor'); // Initialize list of requesters\n\n  var animationRequesters = new Set(); // track active event listeners to handle simultaneous button tracking\n\n  var activeListenerCount = 0; // Public API methods\n  //----------------------------------------------------------------------\n\n  publicAPI.start = function () {\n    // Let the compositing handle the event loop if it wants to.\n    // if (publicAPI.HasObserver(vtkCommand::StartEvent) && !publicAPI.HandleEventLoop) {\n    //   publicAPI.invokeEvent({ type: 'StartEvent' });\n    //   return;\n    // }\n    // As a convenience, initialize if we aren't initialized yet.\n    if (!model.initialized) {\n      publicAPI.initialize();\n\n      if (!model.initialized) {\n        return;\n      }\n    } // Pass execution to the subclass which will run the event loop,\n    // this will not return until TerminateApp is called.\n\n\n    publicAPI.startEventLoop();\n  }; //----------------------------------------------------------------------\n\n\n  publicAPI.setRenderWindow = function (aren) {\n    vtkErrorMacro('you want to call setView(view) instead of setRenderWindow on a vtk.js interactor');\n  }; //----------------------------------------------------------------------\n\n\n  publicAPI.setInteractorStyle = function (style) {\n    if (model.interactorStyle !== style) {\n      if (model.interactorStyle != null) {\n        model.interactorStyle.setInteractor(null);\n      }\n\n      model.interactorStyle = style;\n\n      if (model.interactorStyle != null) {\n        if (model.interactorStyle.getInteractor() !== publicAPI) {\n          model.interactorStyle.setInteractor(publicAPI);\n        }\n      }\n    }\n  }; //---------------------------------------------------------------------\n\n\n  publicAPI.initialize = function () {\n    model.initialized = true;\n    publicAPI.enable();\n    publicAPI.render();\n  };\n\n  publicAPI.enable = function () {\n    return publicAPI.setEnabled(true);\n  };\n\n  publicAPI.disable = function () {\n    return publicAPI.setEnabled(false);\n  };\n\n  publicAPI.startEventLoop = function () {\n    return vtkWarningMacro('empty event loop');\n  };\n\n  function updateCurrentRenderer(x, y) {\n    if (!model._forcedRenderer) {\n      model.currentRenderer = publicAPI.findPokedRenderer(x, y);\n    }\n  }\n\n  publicAPI.getCurrentRenderer = function () {\n    if (model.currentRenderer) {\n      return model.currentRenderer;\n    }\n\n    updateCurrentRenderer(0, 0);\n    return model.currentRenderer;\n  };\n\n  function getScreenEventPositionFor(source) {\n    var bounds = model.container.getBoundingClientRect();\n    var canvas = model.view.getCanvas();\n    var scaleX = canvas.width / bounds.width;\n    var scaleY = canvas.height / bounds.height;\n    var position = {\n      x: scaleX * (source.clientX - bounds.left),\n      y: scaleY * (bounds.height - source.clientY + bounds.top),\n      z: 0\n    };\n    updateCurrentRenderer(position.x, position.y);\n    return position;\n  }\n\n  function getTouchEventPositionsFor(touches) {\n    var positions = {};\n\n    for (var i = 0; i < touches.length; i++) {\n      var touch = touches[i];\n      positions[touch.identifier] = getScreenEventPositionFor(touch);\n    }\n\n    return positions;\n  }\n\n  function getModifierKeysFor(event) {\n    return {\n      controlKey: event.ctrlKey,\n      altKey: event.altKey,\n      shiftKey: event.shiftKey\n    };\n  }\n\n  function getKeysFor(event) {\n    var modifierKeys = getModifierKeysFor(event);\n\n    var keys = _objectSpread({\n      key: event.key,\n      keyCode: event.charCode\n    }, modifierKeys);\n\n    return keys;\n  }\n\n  function interactionRegistration(addListeners) {\n    var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    var rootElm = document;\n    var method = addListeners ? 'addEventListener' : 'removeEventListener';\n    var invMethod = addListeners ? 'removeEventListener' : 'addEventListener';\n\n    if (!force && !addListeners && activeListenerCount > 0) {\n      --activeListenerCount;\n    } // only add/remove listeners when there are no registered listeners\n\n\n    if (!activeListenerCount || force) {\n      activeListenerCount = 0;\n\n      if (model.container) {\n        model.container[invMethod]('mousemove', publicAPI.handleMouseMove);\n      }\n\n      rootElm[method]('mouseup', publicAPI.handleMouseUp);\n      rootElm[method]('mousemove', publicAPI.handleMouseMove);\n      rootElm[method]('touchend', publicAPI.handleTouchEnd, false);\n      rootElm[method]('touchcancel', publicAPI.handleTouchEnd, false);\n      rootElm[method]('touchmove', publicAPI.handleTouchMove, false);\n    }\n\n    if (!force && addListeners) {\n      ++activeListenerCount;\n    }\n  }\n\n  publicAPI.bindEvents = function (container) {\n    model.container = container;\n    container.addEventListener('contextmenu', preventDefault); // container.addEventListener('click', preventDefault); // Avoid stopping event propagation\n\n    container.addEventListener('wheel', publicAPI.handleWheel);\n    container.addEventListener('DOMMouseScroll', publicAPI.handleWheel);\n    container.addEventListener('mouseenter', publicAPI.handleMouseEnter);\n    container.addEventListener('mouseleave', publicAPI.handleMouseLeave);\n    container.addEventListener('mousemove', publicAPI.handleMouseMove);\n    container.addEventListener('mousedown', publicAPI.handleMouseDown);\n    document.addEventListener('keypress', publicAPI.handleKeyPress);\n    document.addEventListener('keydown', publicAPI.handleKeyDown);\n    document.addEventListener('keyup', publicAPI.handleKeyUp);\n    document.addEventListener('pointerlockchange', publicAPI.handlePointerLockChange);\n    container.addEventListener('touchstart', publicAPI.handleTouchStart, false);\n  };\n\n  publicAPI.unbindEvents = function () {\n    // force unbinding listeners\n    interactionRegistration(false, true);\n    model.container.removeEventListener('contextmenu', preventDefault); // model.container.removeEventListener('click', preventDefault); // Avoid stopping event propagation\n\n    model.container.removeEventListener('wheel', publicAPI.handleWheel);\n    model.container.removeEventListener('DOMMouseScroll', publicAPI.handleWheel);\n    model.container.removeEventListener('mouseenter', publicAPI.handleMouseEnter);\n    model.container.removeEventListener('mouseleave', publicAPI.handleMouseLeave);\n    model.container.removeEventListener('mousemove', publicAPI.handleMouseMove);\n    model.container.removeEventListener('mousedown', publicAPI.handleMouseDown);\n    document.removeEventListener('keypress', publicAPI.handleKeyPress);\n    document.removeEventListener('keydown', publicAPI.handleKeyDown);\n    document.removeEventListener('keyup', publicAPI.handleKeyUp);\n    document.removeEventListener('pointerlockchange', publicAPI.handlePointerLockChange);\n    model.container.removeEventListener('touchstart', publicAPI.handleTouchStart);\n    model.container = null;\n  };\n\n  publicAPI.handleKeyPress = function (event) {\n    var data = getKeysFor(event);\n    publicAPI.keyPressEvent(data);\n  };\n\n  publicAPI.handleKeyDown = function (event) {\n    var data = getKeysFor(event);\n    publicAPI.keyDownEvent(data);\n  };\n\n  publicAPI.handleKeyUp = function (event) {\n    var data = getKeysFor(event);\n    publicAPI.keyUpEvent(data);\n  };\n\n  publicAPI.handleMouseDown = function (event) {\n    if (event.button > 2) {\n      // ignore events from extra mouse buttons such as `back` and `forward`\n      return;\n    }\n\n    interactionRegistration(true);\n    preventDefault(event);\n\n    var callData = _objectSpread(_objectSpread({}, getModifierKeysFor(event)), {}, {\n      position: getScreenEventPositionFor(event)\n    });\n\n    switch (event.button) {\n      case 0:\n        publicAPI.leftButtonPressEvent(callData);\n        break;\n\n      case 1:\n        publicAPI.middleButtonPressEvent(callData);\n        break;\n\n      case 2:\n        publicAPI.rightButtonPressEvent(callData);\n        break;\n\n      default:\n        vtkErrorMacro(\"Unknown mouse button pressed: \".concat(event.button));\n        break;\n    }\n  }; //----------------------------------------------------------------------\n\n\n  publicAPI.requestPointerLock = function () {\n    var canvas = publicAPI.getView().getCanvas();\n    canvas.requestPointerLock();\n  }; //----------------------------------------------------------------------\n\n\n  publicAPI.exitPointerLock = function () {\n    return document.exitPointerLock();\n  }; //----------------------------------------------------------------------\n\n\n  publicAPI.isPointerLocked = function () {\n    return !!document.pointerLockElement;\n  }; //----------------------------------------------------------------------\n\n\n  publicAPI.handlePointerLockChange = function () {\n    if (publicAPI.isPointerLocked()) {\n      publicAPI.startPointerLockEvent();\n    } else {\n      publicAPI.endPointerLockEvent();\n    }\n  }; //----------------------------------------------------------------------\n\n\n  function forceRender() {\n    if (model.view && model.enabled && model.enableRender) {\n      model.inRender = true;\n      model.view.traverseAllPasses();\n      model.inRender = false;\n    } // outside the above test so that third-party code can redirect\n    // the render to the appropriate class\n\n\n    publicAPI.invokeRenderEvent();\n  }\n\n  publicAPI.requestAnimation = function (requestor) {\n    if (requestor === undefined) {\n      vtkErrorMacro(\"undefined requester, can not start animating\");\n      return;\n    }\n\n    if (animationRequesters.has(requestor)) {\n      vtkWarningMacro(\"requester is already registered for animating\");\n      return;\n    }\n\n    animationRequesters.add(requestor);\n\n    if (animationRequesters.size === 1) {\n      model.lastFrameTime = 0.1;\n      model.lastFrameStart = Date.now();\n      model.animationRequest = requestAnimationFrame(publicAPI.handleAnimation);\n      publicAPI.startAnimationEvent();\n    }\n  };\n\n  publicAPI.isAnimating = function () {\n    return model.vrAnimation || model.animationRequest !== null;\n  };\n\n  publicAPI.cancelAnimation = function (requestor) {\n    var skipWarning = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n    if (!animationRequesters.has(requestor)) {\n      if (!skipWarning) {\n        var requestStr = requestor && requestor.getClassName ? requestor.getClassName() : requestor;\n        vtkWarningMacro(\"\".concat(requestStr, \" did not request an animation\"));\n      }\n\n      return;\n    }\n\n    animationRequesters.delete(requestor);\n\n    if (model.animationRequest && animationRequesters.size === 0) {\n      cancelAnimationFrame(model.animationRequest);\n      model.animationRequest = null;\n      publicAPI.endAnimationEvent();\n      publicAPI.render();\n    }\n  };\n\n  publicAPI.switchToVRAnimation = function () {\n    // cancel existing animation if any\n    if (model.animationRequest) {\n      cancelAnimationFrame(model.animationRequest);\n      model.animationRequest = null;\n    }\n\n    model.vrAnimation = true;\n  };\n\n  publicAPI.returnFromVRAnimation = function () {\n    model.vrAnimation = false;\n\n    if (animationRequesters.size !== 0) {\n      model.FrameTime = -1;\n      model.animationRequest = requestAnimationFrame(publicAPI.handleAnimation);\n    }\n  };\n\n  publicAPI.updateGamepads = function (displayId) {\n    var gamepads = navigator.getGamepads(); // watch for when buttons change state and fire events\n\n    for (var i = 0; i < gamepads.length; ++i) {\n      var gp = gamepads[i];\n\n      if (gp && gp.displayId === displayId) {\n        if (!(gp.index in model.lastGamepadValues)) {\n          model.lastGamepadValues[gp.index] = {\n            buttons: {}\n          };\n        }\n\n        for (var b = 0; b < gp.buttons.length; ++b) {\n          if (!(b in model.lastGamepadValues[gp.index].buttons)) {\n            model.lastGamepadValues[gp.index].buttons[b] = false;\n          }\n\n          if (model.lastGamepadValues[gp.index].buttons[b] !== gp.buttons[b].pressed) {\n            publicAPI.button3DEvent({\n              gamepad: gp,\n              position: gp.pose.position,\n              orientation: gp.pose.orientation,\n              pressed: gp.buttons[b].pressed,\n              device: gp.hand === 'left' ? Device.LeftController : Device.RightController,\n              input: deviceInputMap[gp.id] && deviceInputMap[gp.id][b] ? deviceInputMap[gp.id][b] : Input.Trigger\n            });\n            model.lastGamepadValues[gp.index].buttons[b] = gp.buttons[b].pressed;\n          }\n\n          if (model.lastGamepadValues[gp.index].buttons[b]) {\n            publicAPI.move3DEvent({\n              gamepad: gp,\n              position: gp.pose.position,\n              orientation: gp.pose.orientation,\n              device: gp.hand === 'left' ? Device.LeftController : Device.RightController\n            });\n          }\n        }\n      }\n    }\n  };\n\n  publicAPI.handleMouseMove = function (event) {\n    // Do not consume event for move\n    // preventDefault(event);\n    var callData = _objectSpread(_objectSpread({}, getModifierKeysFor(event)), {}, {\n      position: getScreenEventPositionFor(event)\n    });\n\n    if (model.moveTimeoutID === 0) {\n      publicAPI.startMouseMoveEvent(callData);\n    } else {\n      publicAPI.mouseMoveEvent(callData);\n      clearTimeout(model.moveTimeoutID);\n    } // start a timer to keep us animating while we get mouse move events\n\n\n    model.moveTimeoutID = setTimeout(function () {\n      publicAPI.endMouseMoveEvent();\n      model.moveTimeoutID = 0;\n    }, 200);\n  };\n\n  publicAPI.handleAnimation = function () {\n    var currTime = Date.now();\n\n    if (model.FrameTime === -1.0) {\n      model.lastFrameTime = 0.1;\n    } else {\n      model.lastFrameTime = (currTime - model.lastFrameStart) / 1000.0;\n    }\n\n    model.lastFrameTime = Math.max(0.01, model.lastFrameTime);\n    model.lastFrameStart = currTime;\n    publicAPI.animationEvent();\n    forceRender();\n    model.animationRequest = requestAnimationFrame(publicAPI.handleAnimation);\n  };\n\n  publicAPI.handleWheel = function (event) {\n    preventDefault(event);\n    /**\n     * wheel event values can vary significantly across browsers, platforms\n     * and devices [1]. `normalizeWheel` uses facebook's solution from their\n     * fixed-data-table repository [2].\n     *\n     * [1] https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel\n     * [2] https://github.com/facebookarchive/fixed-data-table/blob/master/src/vendor_upstream/dom/normalizeWheel.js\n     *\n     * This code will return an object with properties:\n     *\n     *   spinX   -- normalized spin speed (use for zoom) - x plane\n     *   spinY   -- \" - y plane\n     *   pixelX  -- normalized distance (to pixels) - x plane\n     *   pixelY  -- \" - y plane\n     *\n     */\n\n    var callData = _objectSpread(_objectSpread(_objectSpread({}, normalizeWheel(event)), getModifierKeysFor(event)), {}, {\n      position: getScreenEventPositionFor(event)\n    });\n\n    if (model.wheelTimeoutID === 0) {\n      publicAPI.startMouseWheelEvent(callData);\n    } else {\n      publicAPI.mouseWheelEvent(callData);\n      clearTimeout(model.wheelTimeoutID);\n    } // start a timer to keep us animating while we get wheel events\n\n\n    model.wheelTimeoutID = setTimeout(function () {\n      publicAPI.endMouseWheelEvent();\n      model.wheelTimeoutID = 0;\n    }, 200);\n  };\n\n  publicAPI.handleMouseEnter = function (event) {\n    var callData = _objectSpread(_objectSpread({}, getModifierKeysFor(event)), {}, {\n      position: getScreenEventPositionFor(event)\n    });\n\n    publicAPI.mouseEnterEvent(callData);\n  };\n\n  publicAPI.handleMouseLeave = function (event) {\n    var callData = _objectSpread(_objectSpread({}, getModifierKeysFor(event)), {}, {\n      position: getScreenEventPositionFor(event)\n    });\n\n    publicAPI.mouseLeaveEvent(callData);\n  };\n\n  publicAPI.handleMouseUp = function (event) {\n    interactionRegistration(false);\n    preventDefault(event);\n\n    var callData = _objectSpread(_objectSpread({}, getModifierKeysFor(event)), {}, {\n      position: getScreenEventPositionFor(event)\n    });\n\n    switch (event.button) {\n      case 0:\n        publicAPI.leftButtonReleaseEvent(callData);\n        break;\n\n      case 1:\n        publicAPI.middleButtonReleaseEvent(callData);\n        break;\n\n      case 2:\n        publicAPI.rightButtonReleaseEvent(callData);\n        break;\n\n      default:\n        vtkErrorMacro(\"Unknown mouse button released: \".concat(event.button));\n        break;\n    }\n  };\n\n  publicAPI.handleTouchStart = function (event) {\n    interactionRegistration(true);\n    preventDefault(event); // If multitouch\n\n    if (model.recognizeGestures && event.touches.length > 1) {\n      var positions = getTouchEventPositionsFor(event.touches); // did we just transition to multitouch?\n\n      if (event.touches.length === 2) {\n        var touch = event.touches[0];\n        var callData = {\n          position: getScreenEventPositionFor(touch),\n          shiftKey: false,\n          altKey: false,\n          controlKey: false\n        };\n        publicAPI.leftButtonReleaseEvent(callData);\n      } // handle the gesture\n\n\n      publicAPI.recognizeGesture('TouchStart', positions);\n    } else {\n      var _touch = event.touches[0];\n      var _callData = {\n        position: getScreenEventPositionFor(_touch),\n        shiftKey: false,\n        altKey: false,\n        controlKey: false\n      };\n      publicAPI.leftButtonPressEvent(_callData);\n    }\n  };\n\n  publicAPI.handleTouchMove = function (event) {\n    preventDefault(event);\n\n    if (model.recognizeGestures && event.touches.length > 1) {\n      var positions = getTouchEventPositionsFor(event.touches);\n      publicAPI.recognizeGesture('TouchMove', positions);\n    } else {\n      var touch = event.touches[0];\n      var callData = {\n        position: getScreenEventPositionFor(touch),\n        shiftKey: false,\n        altKey: false,\n        controlKey: false\n      };\n      publicAPI.mouseMoveEvent(callData);\n    }\n  };\n\n  publicAPI.handleTouchEnd = function (event) {\n    preventDefault(event);\n\n    if (model.recognizeGestures) {\n      // No more fingers down\n      if (event.touches.length === 0) {\n        // If just one finger released, consider as left button\n        if (event.changedTouches.length === 1) {\n          var touch = event.changedTouches[0];\n          var callData = {\n            position: getScreenEventPositionFor(touch),\n            shiftKey: false,\n            altKey: false,\n            controlKey: false\n          };\n          publicAPI.leftButtonReleaseEvent(callData);\n          interactionRegistration(false);\n        } else {\n          // If more than one finger released, recognize touchend\n          var positions = getTouchEventPositionsFor(event.changedTouches);\n          publicAPI.recognizeGesture('TouchEnd', positions);\n          interactionRegistration(false);\n        }\n      } else if (event.touches.length === 1) {\n        // If one finger left, end touch and start button press\n        var _positions = getTouchEventPositionsFor(event.changedTouches);\n\n        publicAPI.recognizeGesture('TouchEnd', _positions);\n        var _touch2 = event.touches[0];\n        var _callData2 = {\n          position: getScreenEventPositionFor(_touch2),\n          shiftKey: false,\n          altKey: false,\n          controlKey: false\n        };\n        publicAPI.leftButtonPressEvent(_callData2);\n      } else {\n        // If more than one finger left, keep touch move\n        var _positions2 = getTouchEventPositionsFor(event.touches);\n\n        publicAPI.recognizeGesture('TouchMove', _positions2);\n      }\n    } else {\n      var _touch3 = event.changedTouches[0];\n      var _callData3 = {\n        position: getScreenEventPositionFor(_touch3),\n        shiftKey: false,\n        altKey: false,\n        controlKey: false\n      };\n      publicAPI.leftButtonReleaseEvent(_callData3);\n      interactionRegistration(false);\n    }\n  };\n\n  publicAPI.setView = function (val) {\n    if (model.view === val) {\n      return;\n    }\n\n    model.view = val;\n    model.view.getRenderable().setInteractor(publicAPI);\n    publicAPI.modified();\n  };\n\n  publicAPI.getFirstRenderer = function () {\n    return model.view.getRenderable().getRenderersByReference()[0];\n  };\n\n  publicAPI.findPokedRenderer = function () {\n    var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n    var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n    if (!model.view) {\n      return null;\n    } // The original order of renderers needs to remain as\n    // the first one is the one we want to manipulate the camera on.\n\n\n    var rc = model.view.getRenderable().getRenderers();\n    rc.sort(function (a, b) {\n      return a.getLayer() - b.getLayer();\n    });\n    var interactiveren = null;\n    var viewportren = null;\n    var currentRenderer = null;\n    var count = rc.length;\n\n    while (count--) {\n      var aren = rc[count];\n\n      if (model.view.isInViewport(x, y, aren) && aren.getInteractive()) {\n        currentRenderer = aren;\n        break;\n      }\n\n      if (interactiveren === null && aren.getInteractive()) {\n        // Save this renderer in case we can't find one in the viewport that\n        // is interactive.\n        interactiveren = aren;\n      }\n\n      if (viewportren === null && model.view.isInViewport(x, y, aren)) {\n        // Save this renderer in case we can't find one in the viewport that\n        // is interactive.\n        viewportren = aren;\n      }\n    } // We must have a value.  If we found an interactive renderer before, that's\n    // better than a non-interactive renderer.\n\n\n    if (currentRenderer === null) {\n      currentRenderer = interactiveren;\n    } // We must have a value.  If we found a renderer that is in the viewport,\n    // that is better than any old viewport (but not as good as an interactive\n    // one).\n\n\n    if (currentRenderer === null) {\n      currentRenderer = viewportren;\n    } // We must have a value - take anything.\n\n\n    if (currentRenderer == null) {\n      currentRenderer = rc[0];\n    }\n\n    return currentRenderer;\n  }; // only render if we are not animating. If we are animating\n  // then renders will happen naturally anyhow and we definitely\n  // do not want extra renders as the make the apparent interaction\n  // rate slower.\n\n\n  publicAPI.render = function () {\n    if (model.animationRequest === null && !model.inRender) {\n      forceRender();\n    }\n  }; // create the generic Event methods\n\n\n  handledEvents.forEach(function (eventName) {\n    var lowerFirst = eventName.charAt(0).toLowerCase() + eventName.slice(1);\n\n    publicAPI[\"\".concat(lowerFirst, \"Event\")] = function (arg) {\n      // Check that interactor enabled\n      if (!model.enabled) {\n        return;\n      } // Check that a poked renderer exists\n\n\n      var renderer = publicAPI.getCurrentRenderer();\n\n      if (!renderer) {\n        vtkOnceErrorMacro(\"\\n          Can not forward events without a current renderer on the interactor.\\n        \");\n        return;\n      } // Pass the eventName and the poked renderer\n\n\n      var callData = _objectSpread({\n        type: eventName,\n        pokedRenderer: model.currentRenderer,\n        firstRenderer: publicAPI.getFirstRenderer()\n      }, arg); // Call invoke\n\n\n      publicAPI[\"invoke\".concat(eventName)](callData);\n    };\n  }); // we know we are in multitouch now, so start recognizing\n\n  publicAPI.recognizeGesture = function (event, positions) {\n    // more than two pointers we ignore\n    if (Object.keys(positions).length > 2) {\n      return;\n    }\n\n    if (!model.startingEventPositions) {\n      model.startingEventPositions = {};\n    } // store the initial positions\n\n\n    if (event === 'TouchStart') {\n      Object.keys(positions).forEach(function (key) {\n        model.startingEventPositions[key] = positions[key];\n      }); // we do not know what the gesture is yet\n\n      model.currentGesture = 'Start';\n      return;\n    } // end the gesture if needed\n\n\n    if (event === 'TouchEnd') {\n      if (model.currentGesture === 'Pinch') {\n        publicAPI.render();\n        publicAPI.endPinchEvent();\n      }\n\n      if (model.currentGesture === 'Rotate') {\n        publicAPI.render();\n        publicAPI.endRotateEvent();\n      }\n\n      if (model.currentGesture === 'Pan') {\n        publicAPI.render();\n        publicAPI.endPanEvent();\n      }\n\n      model.currentGesture = 'Start';\n      model.startingEventPositions = {};\n      return;\n    } // what are the two pointers we are working with\n\n\n    var count = 0;\n    var posVals = [];\n    var startVals = [];\n    Object.keys(positions).forEach(function (key) {\n      posVals[count] = positions[key];\n      startVals[count] = model.startingEventPositions[key];\n      count++;\n    }); // The meat of the algorithm\n    // on move events we analyze them to determine what type\n    // of movement it is and then deal with it.\n    // calculate the distances\n\n    var originalDistance = Math.sqrt((startVals[0].x - startVals[1].x) * (startVals[0].x - startVals[1].x) + (startVals[0].y - startVals[1].y) * (startVals[0].y - startVals[1].y));\n    var newDistance = Math.sqrt((posVals[0].x - posVals[1].x) * (posVals[0].x - posVals[1].x) + (posVals[0].y - posVals[1].y) * (posVals[0].y - posVals[1].y)); // calculate rotations\n\n    var originalAngle = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.x)(Math.atan2(startVals[1].y - startVals[0].y, startVals[1].x - startVals[0].x));\n    var newAngle = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.x)(Math.atan2(posVals[1].y - posVals[0].y, posVals[1].x - posVals[0].x)); // angles are cyclic so watch for that, 1 and 359 are only 2 apart :)\n\n    var angleDeviation = newAngle - originalAngle;\n    newAngle = newAngle + 180.0 >= 360.0 ? newAngle - 180.0 : newAngle + 180.0;\n    originalAngle = originalAngle + 180.0 >= 360.0 ? originalAngle - 180.0 : originalAngle + 180.0;\n\n    if (Math.abs(newAngle - originalAngle) < Math.abs(angleDeviation)) {\n      angleDeviation = newAngle - originalAngle;\n    } // calculate the translations\n\n\n    var trans = [];\n    trans[0] = (posVals[0].x - startVals[0].x + posVals[1].x - startVals[1].x) / 2.0;\n    trans[1] = (posVals[0].y - startVals[0].y + posVals[1].y - startVals[1].y) / 2.0;\n\n    if (event === 'TouchMove') {\n      // OK we want to\n      // - immediately respond to the user\n      // - allow the user to zoom without panning (saves focal point)\n      // - allow the user to rotate without panning (saves focal point)\n      // do we know what gesture we are doing yet? If not\n      // see if we can figure it out\n      if (model.currentGesture === 'Start') {\n        // pinch is a move to/from the center point\n        // rotate is a move along the circumference\n        // pan is a move of the center point\n        // compute the distance along each of these axes in pixels\n        // the first to break thresh wins\n        var thresh = 0.01 * Math.sqrt(model.container.clientWidth * model.container.clientWidth + model.container.clientHeight * model.container.clientHeight);\n\n        if (thresh < 15.0) {\n          thresh = 15.0;\n        }\n\n        var pinchDistance = Math.abs(newDistance - originalDistance);\n        var rotateDistance = newDistance * 3.1415926 * Math.abs(angleDeviation) / 360.0;\n        var panDistance = Math.sqrt(trans[0] * trans[0] + trans[1] * trans[1]);\n\n        if (pinchDistance > thresh && pinchDistance > rotateDistance && pinchDistance > panDistance) {\n          model.currentGesture = 'Pinch';\n          var callData = {\n            scale: 1.0,\n            touches: positions\n          };\n          publicAPI.startPinchEvent(callData);\n        } else if (rotateDistance > thresh && rotateDistance > panDistance) {\n          model.currentGesture = 'Rotate';\n          var _callData4 = {\n            rotation: 0.0,\n            touches: positions\n          };\n          publicAPI.startRotateEvent(_callData4);\n        } else if (panDistance > thresh) {\n          model.currentGesture = 'Pan';\n          var _callData5 = {\n            translation: [0, 0],\n            touches: positions\n          };\n          publicAPI.startPanEvent(_callData5);\n        }\n      } else {\n        // if we have found a specific type of movement then\n        // handle it\n        if (model.currentGesture === 'Rotate') {\n          var _callData6 = {\n            rotation: angleDeviation,\n            touches: positions\n          };\n          publicAPI.rotateEvent(_callData6);\n        }\n\n        if (model.currentGesture === 'Pinch') {\n          var _callData7 = {\n            scale: newDistance / originalDistance,\n            touches: positions\n          };\n          publicAPI.pinchEvent(_callData7);\n        }\n\n        if (model.currentGesture === 'Pan') {\n          var _callData8 = {\n            translation: trans,\n            touches: positions\n          };\n          publicAPI.panEvent(_callData8);\n        }\n      }\n    }\n  };\n\n  publicAPI.handleVisibilityChange = function () {\n    model.lastFrameStart = Date.now();\n  };\n\n  publicAPI.setCurrentRenderer = function (r) {\n    model._forcedRenderer = !!r;\n    model.currentRenderer = r;\n  }; // Stop animating if the renderWindowInteractor is deleted.\n\n\n  var superDelete = publicAPI.delete;\n\n  publicAPI.delete = function () {\n    while (animationRequesters.size) {\n      publicAPI.cancelAnimation(animationRequesters.values().next().value);\n    }\n\n    if (typeof document.hidden !== 'undefined') {\n      document.removeEventListener('visibilitychange', publicAPI.handleVisibilityChange);\n    }\n\n    superDelete();\n  }; // Use the Page Visibility API to detect when we switch away from or back to\n  // this tab, and reset the lastFrameStart. When tabs are not active, browsers\n  // will stop calling requestAnimationFrame callbacks.\n\n\n  if (typeof document.hidden !== 'undefined') {\n    document.addEventListener('visibilitychange', publicAPI.handleVisibilityChange, false);\n  }\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  renderWindow: null,\n  interactorStyle: null,\n  picker: null,\n  pickingManager: null,\n  initialized: false,\n  enabled: false,\n  enableRender: true,\n  currentRenderer: null,\n  lightFollowCamera: true,\n  desiredUpdateRate: 30.0,\n  stillUpdateRate: 2.0,\n  container: null,\n  view: null,\n  recognizeGestures: true,\n  currentGesture: 'Start',\n  animationRequest: null,\n  lastFrameTime: 0.1,\n  wheelTimeoutID: 0,\n  moveTimeoutID: 0,\n  lastGamepadValues: {}\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.event(publicAPI, model, 'RenderEvent');\n  handledEvents.forEach(function (eventName) {\n    return _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.event(publicAPI, model, eventName);\n  }); // Create get-only macros\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['initialized', 'container', 'interactorStyle', 'lastFrameTime', 'view']); // Create get-set macros\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['lightFollowCamera', 'enabled', 'enableRender', 'recognizeGestures', 'desiredUpdateRate', 'stillUpdateRate', 'picker']); // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkRenderWindowInteractor(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkRenderWindowInteractor'); // ----------------------------------------------------------------------------\n\nvar vtkRenderWindowInteractor$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend,\n  handledEvents: handledEvents\n}, _RenderWindowInteractor_Constants_js__WEBPACK_IMPORTED_MODULE_3__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkRenderWindowInteractor$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindowInteractor.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindowInteractor/Constants.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindowInteractor/Constants.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"Device\": () => (/* binding */ Device),\n/* harmony export */   \"Input\": () => (/* binding */ Input)\n/* harmony export */ });\nvar Device = {\n  Unknown: 0,\n  LeftController: 1,\n  RightController: 2\n};\nvar Input = {\n  Unknown: 0,\n  Trigger: 1,\n  TrackPad: 2,\n  Grip: 3,\n  ApplicationMenu: 4\n};\nvar Constants = {\n  Device: Device,\n  Input: Input\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindowInteractor/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Renderer.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Renderer.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Camera_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Camera.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Camera.js\");\n/* harmony import */ var _Light_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Light.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Light.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _Viewport_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Viewport.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Viewport.js\");\n/* harmony import */ var _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Common/DataModel/BoundingBox.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/BoundingBox.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/vec3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js\");\n\n\n\n\n\n\n\n\n\nvar vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkDebugMacro,\n    vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkErrorMacro,\n    vtkWarningMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkWarningMacro;\n\nfunction notImplemented(method) {\n  return function () {\n    return vtkErrorMacro(\"vtkRenderer::\".concat(method, \" - NOT IMPLEMENTED\"));\n  };\n} // ----------------------------------------------------------------------------\n// vtkRenderer methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkRenderer(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkRenderer'); // make sure background has 4 entries. Default to opaque black\n\n  if (!model.background) model.background = [0, 0, 0, 1];\n\n  while (model.background.length < 3) {\n    model.background.push(0);\n  }\n\n  if (model.background.length === 3) model.background.push(1); // Events\n\n  var COMPUTE_VISIBLE_PROP_BOUNDS_EVENT = {\n    type: 'ComputeVisiblePropBoundsEvent',\n    renderer: publicAPI\n  };\n  var RESET_CAMERA_CLIPPING_RANGE_EVENT = {\n    type: 'ResetCameraClippingRangeEvent',\n    renderer: publicAPI\n  };\n  var RESET_CAMERA_EVENT = {\n    type: 'ResetCameraEvent',\n    renderer: publicAPI\n  };\n\n  publicAPI.updateCamera = function () {\n    if (!model.activeCamera) {\n      vtkDebugMacro('No cameras are on, creating one.'); // the get method will automagically create a camera\n      // and reset it since one hasn't been specified yet.\n\n      publicAPI.getActiveCameraAndResetIfCreated();\n    } // update the viewing transformation\n\n\n    model.activeCamera.render(publicAPI);\n    return true;\n  };\n\n  publicAPI.updateLightsGeometryToFollowCamera = function () {\n    // only update the light's geometry if this Renderer is tracking\n    // this lights.  That allows one renderer to view the lights that\n    // another renderer is setting up.\n    var camera = publicAPI.getActiveCameraAndResetIfCreated();\n    model.lights.forEach(function (light) {\n      if (light.lightTypeIsSceneLight() || light.lightTypeIsCameraLight()) ; else if (light.lightTypeIsHeadLight()) {\n        // update position and orientation of light to match camera.\n        light.setPositionFrom(camera.getPositionByReference());\n        light.setFocalPointFrom(camera.getFocalPointByReference());\n        light.modified(camera.getMTime());\n      } else {\n        vtkErrorMacro('light has unknown light type', light.get());\n      }\n    });\n  };\n\n  publicAPI.updateLightGeometry = function () {\n    if (model.lightFollowCamera) {\n      // only update the light's geometry if this Renderer is tracking\n      // this lights.  That allows one renderer to view the lights that\n      // another renderer is setting up.\n      return publicAPI.updateLightsGeometryToFollowCamera();\n    }\n\n    return true;\n  };\n\n  publicAPI.allocateTime = notImplemented('allocateTime');\n  publicAPI.updateGeometry = notImplemented('updateGeometry');\n\n  publicAPI.getVTKWindow = function () {\n    return model.renderWindow;\n  };\n\n  publicAPI.setLayer = function (layer) {\n    vtkDebugMacro(publicAPI.getClassName(), publicAPI, 'setting Layer to ', layer);\n\n    if (model.layer !== layer) {\n      model.layer = layer;\n      publicAPI.modified();\n    }\n\n    publicAPI.setPreserveColorBuffer(!!layer);\n  };\n\n  publicAPI.setActiveCamera = function (camera) {\n    if (model.activeCamera === camera) {\n      return false;\n    }\n\n    model.activeCamera = camera;\n    publicAPI.modified();\n    publicAPI.invokeEvent({\n      type: 'ActiveCameraEvent',\n      camera: camera\n    });\n    return true;\n  };\n\n  publicAPI.makeCamera = function () {\n    var camera = _Camera_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n    publicAPI.invokeEvent({\n      type: 'CreateCameraEvent',\n      camera: camera\n    });\n    return camera;\n  }; // Replace the set/get macro method\n\n\n  publicAPI.getActiveCamera = function () {\n    if (!model.activeCamera) {\n      model.activeCamera = publicAPI.makeCamera();\n    }\n\n    return model.activeCamera;\n  };\n\n  publicAPI.getActiveCameraAndResetIfCreated = function () {\n    if (!model.activeCamera) {\n      publicAPI.getActiveCamera();\n      publicAPI.resetCamera();\n    }\n\n    return model.activeCamera;\n  };\n\n  publicAPI.getActors = function () {\n    model.actors = [];\n    model.props.forEach(function (prop) {\n      model.actors = model.actors.concat(prop.getActors());\n    });\n    return model.actors;\n  };\n\n  publicAPI.addActor = publicAPI.addViewProp;\n\n  publicAPI.removeActor = function (actor) {\n    model.actors = model.actors.filter(function (a) {\n      return a !== actor;\n    });\n    publicAPI.removeViewProp(actor);\n    publicAPI.modified();\n  };\n\n  publicAPI.removeAllActors = function () {\n    var actors = publicAPI.getActors();\n    actors.forEach(function (actor) {\n      publicAPI.removeViewProp(actor);\n    });\n    model.actors = [];\n    publicAPI.modified();\n  };\n\n  publicAPI.getVolumes = function () {\n    model.volumes = [];\n    model.props.forEach(function (prop) {\n      model.volumes = model.volumes.concat(prop.getVolumes());\n    });\n    return model.volumes;\n  };\n\n  publicAPI.addVolume = publicAPI.addViewProp;\n\n  publicAPI.removeVolume = function (volume) {\n    model.volumes = model.volumes.filter(function (v) {\n      return v !== volume;\n    });\n    publicAPI.removeViewProp(volume);\n    publicAPI.modified();\n  };\n\n  publicAPI.removeAllVolumes = function () {\n    var volumes = publicAPI.getVolumes();\n    volumes.forEach(function (volume) {\n      publicAPI.removeViewProp(volume);\n    });\n    model.volumes = [];\n    publicAPI.modified();\n  };\n\n  publicAPI.addLight = function (light) {\n    model.lights = [].concat(model.lights, light);\n    publicAPI.modified();\n  };\n\n  publicAPI.removeLight = function (light) {\n    model.lights = model.lights.filter(function (l) {\n      return l !== light;\n    });\n    publicAPI.modified();\n  };\n\n  publicAPI.removeAllLights = function () {\n    model.lights = [];\n    publicAPI.modified();\n  };\n\n  publicAPI.setLightCollection = function (lights) {\n    model.lights = lights;\n    publicAPI.modified();\n  };\n\n  publicAPI.makeLight = _Light_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance;\n\n  publicAPI.createLight = function () {\n    if (!model.automaticLightCreation) {\n      return;\n    }\n\n    if (model.createdLight) {\n      publicAPI.removeLight(model.createdLight);\n      model.createdLight.delete();\n      model.createdLight = null;\n    }\n\n    model.createdLight = publicAPI.makeLight();\n    publicAPI.addLight(model.createdLight);\n    model.createdLight.setLightTypeToHeadLight(); // set these values just to have a good default should LightFollowCamera\n    // be turned off.\n\n    model.createdLight.setPosition(publicAPI.getActiveCamera().getPosition());\n    model.createdLight.setFocalPoint(publicAPI.getActiveCamera().getFocalPoint());\n  }; // requires the aspect ratio of the viewport as X/Y\n\n\n  publicAPI.normalizedDisplayToWorld = function (x, y, z, aspect) {\n    var vpd = publicAPI.normalizedDisplayToProjection(x, y, z);\n    vpd = publicAPI.projectionToView(vpd[0], vpd[1], vpd[2], aspect);\n    return publicAPI.viewToWorld(vpd[0], vpd[1], vpd[2]);\n  }; // requires the aspect ratio of the viewport as X/Y\n\n\n  publicAPI.worldToNormalizedDisplay = function (x, y, z, aspect) {\n    var vpd = publicAPI.worldToView(x, y, z);\n    vpd = publicAPI.viewToProjection(vpd[0], vpd[1], vpd[2], aspect);\n    return publicAPI.projectionToNormalizedDisplay(vpd[0], vpd[1], vpd[2]);\n  }; // requires the aspect ratio of the viewport as X/Y\n\n\n  publicAPI.viewToWorld = function (x, y, z) {\n    if (model.activeCamera === null) {\n      vtkErrorMacro('ViewToWorld: no active camera, cannot compute view to world, returning 0,0,0');\n      return [0, 0, 0];\n    } // get the view matrix from the active camera\n\n\n    var matrix = model.activeCamera.getViewMatrix();\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_6__.i)(matrix, matrix);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_6__.j)(matrix, matrix); // Transform point to world coordinates\n\n    var result = new Float64Array([x, y, z]);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_7__.t)(result, result, matrix);\n    return result;\n  };\n\n  publicAPI.projectionToView = function (x, y, z, aspect) {\n    if (model.activeCamera === null) {\n      vtkErrorMacro('ProjectionToView: no active camera, cannot compute projection to view, returning 0,0,0');\n      return [0, 0, 0];\n    } // get the projection transformation from the active camera\n\n\n    var matrix = model.activeCamera.getProjectionMatrix(aspect, -1.0, 1.0);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_6__.i)(matrix, matrix);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_6__.j)(matrix, matrix); // Transform point to world coordinates\n\n    var result = new Float64Array([x, y, z]);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_7__.t)(result, result, matrix);\n    return result;\n  }; // Convert world point coordinates to view coordinates.\n\n\n  publicAPI.worldToView = function (x, y, z) {\n    if (model.activeCamera === null) {\n      vtkErrorMacro('WorldToView: no active camera, cannot compute view to world, returning 0,0,0');\n      return [0, 0, 0];\n    } // get the view transformation from the active camera\n\n\n    var matrix = model.activeCamera.getViewMatrix();\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_6__.j)(matrix, matrix);\n    var result = new Float64Array([x, y, z]);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_7__.t)(result, result, matrix);\n    return result;\n  }; // Convert world point coordinates to view coordinates.\n  // requires the aspect ratio of the viewport as X/Y\n\n\n  publicAPI.viewToProjection = function (x, y, z, aspect) {\n    if (model.activeCamera === null) {\n      vtkErrorMacro('ViewToProjection: no active camera, cannot compute view to projection, returning 0,0,0');\n      return [0, 0, 0];\n    } // get the projeciton transformation from the active camera\n\n\n    var matrix = model.activeCamera.getProjectionMatrix(aspect, -1.0, 1.0);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_6__.j)(matrix, matrix);\n    var result = new Float64Array([x, y, z]);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_7__.t)(result, result, matrix);\n    return result;\n  };\n\n  publicAPI.computeVisiblePropBounds = function () {\n    model.allBounds[0] = _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_5__.default.INIT_BOUNDS[0];\n    model.allBounds[1] = _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_5__.default.INIT_BOUNDS[1];\n    model.allBounds[2] = _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_5__.default.INIT_BOUNDS[2];\n    model.allBounds[3] = _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_5__.default.INIT_BOUNDS[3];\n    model.allBounds[4] = _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_5__.default.INIT_BOUNDS[4];\n    model.allBounds[5] = _Common_DataModel_BoundingBox_js__WEBPACK_IMPORTED_MODULE_5__.default.INIT_BOUNDS[5];\n    var nothingVisible = true;\n    publicAPI.invokeEvent(COMPUTE_VISIBLE_PROP_BOUNDS_EVENT); // loop through all props\n\n    for (var index = 0; index < model.props.length; ++index) {\n      var prop = model.props[index];\n\n      if (prop.getVisibility() && prop.getUseBounds()) {\n        var bounds = prop.getBounds();\n\n        if (bounds && (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.O)(bounds)) {\n          nothingVisible = false;\n\n          if (bounds[0] < model.allBounds[0]) {\n            model.allBounds[0] = bounds[0];\n          }\n\n          if (bounds[1] > model.allBounds[1]) {\n            model.allBounds[1] = bounds[1];\n          }\n\n          if (bounds[2] < model.allBounds[2]) {\n            model.allBounds[2] = bounds[2];\n          }\n\n          if (bounds[3] > model.allBounds[3]) {\n            model.allBounds[3] = bounds[3];\n          }\n\n          if (bounds[4] < model.allBounds[4]) {\n            model.allBounds[4] = bounds[4];\n          }\n\n          if (bounds[5] > model.allBounds[5]) {\n            model.allBounds[5] = bounds[5];\n          }\n        }\n      }\n    }\n\n    if (nothingVisible) {\n      (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.u)(model.allBounds);\n      vtkDebugMacro(\"Can't compute bounds, no 3D props are visible\");\n    }\n\n    return model.allBounds;\n  };\n\n  publicAPI.resetCamera = function () {\n    var bounds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n    var boundsToUse = bounds || publicAPI.computeVisiblePropBounds();\n    var center = [0, 0, 0];\n\n    if (!(0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.O)(boundsToUse)) {\n      vtkDebugMacro('Cannot reset camera!');\n      return false;\n    }\n\n    var vn = null;\n\n    if (publicAPI.getActiveCamera()) {\n      vn = model.activeCamera.getViewPlaneNormal();\n    } else {\n      vtkErrorMacro('Trying to reset non-existent camera');\n      return false;\n    } // Reset the perspective zoom factors, otherwise subsequent zooms will cause\n    // the view angle to become very small and cause bad depth sorting.\n\n\n    model.activeCamera.setViewAngle(30.0);\n    center[0] = (boundsToUse[0] + boundsToUse[1]) / 2.0;\n    center[1] = (boundsToUse[2] + boundsToUse[3]) / 2.0;\n    center[2] = (boundsToUse[4] + boundsToUse[5]) / 2.0;\n    var w1 = boundsToUse[1] - boundsToUse[0];\n    var w2 = boundsToUse[3] - boundsToUse[2];\n    var w3 = boundsToUse[5] - boundsToUse[4];\n    w1 *= w1;\n    w2 *= w2;\n    w3 *= w3;\n    var radius = w1 + w2 + w3; // If we have just a single point, pick a radius of 1.0\n\n    radius = radius === 0 ? 1.0 : radius; // compute the radius of the enclosing sphere\n\n    radius = Math.sqrt(radius) * 0.5; // default so that the bounding sphere fits within the view fustrum\n    // compute the distance from the intersection of the view frustum with the\n    // bounding sphere. Basically in 2D draw a circle representing the bounding\n    // sphere in 2D then draw a horizontal line going out from the center of\n    // the circle. That is the camera view. Then draw a line from the camera\n    // position to the point where it intersects the circle. (it will be tangent\n    // to the circle at this point, this is important, only go to the tangent\n    // point, do not draw all the way to the view plane). Then draw the radius\n    // from the tangent point to the center of the circle. You will note that\n    // this forms a right triangle with one side being the radius, another being\n    // the target distance for the camera, then just find the target dist using\n    // a sin.\n\n    var angle = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.r)(model.activeCamera.getViewAngle());\n    var parallelScale = radius;\n    var distance = radius / Math.sin(angle * 0.5); // check view-up vector against view plane normal\n\n    var vup = model.activeCamera.getViewUp();\n\n    if (Math.abs((0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.d)(vup, vn)) > 0.999) {\n      vtkWarningMacro('Resetting view-up since view plane normal is parallel');\n      model.activeCamera.setViewUp(-vup[2], vup[0], vup[1]);\n    } // update the camera\n\n\n    model.activeCamera.setFocalPoint(center[0], center[1], center[2]);\n    model.activeCamera.setPosition(center[0] + distance * vn[0], center[1] + distance * vn[1], center[2] + distance * vn[2]);\n    publicAPI.resetCameraClippingRange(boundsToUse); // setup default parallel scale\n\n    model.activeCamera.setParallelScale(parallelScale); // update reasonable world to physical values\n\n    model.activeCamera.setPhysicalScale(radius);\n    model.activeCamera.setPhysicalTranslation(-center[0], -center[1], -center[2]); // Here to let parallel/distributed compositing intercept\n    // and do the right thing.\n\n    publicAPI.invokeEvent(RESET_CAMERA_EVENT);\n    return true;\n  };\n\n  publicAPI.resetCameraClippingRange = function () {\n    var bounds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n    var boundsToUse = bounds || publicAPI.computeVisiblePropBounds();\n\n    if (!(0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.O)(boundsToUse)) {\n      vtkDebugMacro('Cannot reset camera clipping range!');\n      return false;\n    } // Make sure we have an active camera\n\n\n    publicAPI.getActiveCameraAndResetIfCreated();\n\n    if (!model.activeCamera) {\n      vtkErrorMacro('Trying to reset clipping range of non-existent camera');\n      return false;\n    } // Get the exact range for the bounds\n\n\n    var range = model.activeCamera.computeClippingRange(boundsToUse); // do not let far - near be less than 0.1 of the window height\n    // this is for cases such as 2D images which may have zero range\n\n    var minGap = 0.0;\n\n    if (model.activeCamera.getParallelProjection()) {\n      minGap = 0.1 * model.activeCamera.getParallelScale();\n    } else {\n      var angle = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.r)(model.activeCamera.getViewAngle());\n      minGap = 0.2 * Math.tan(angle / 2.0) * range[1];\n    }\n\n    if (range[1] - range[0] < minGap) {\n      minGap = minGap - range[1] + range[0];\n      range[1] += minGap / 2.0;\n      range[0] -= minGap / 2.0;\n    } // Do not let the range behind the camera throw off the calculation.\n\n\n    if (range[0] < 0.0) {\n      range[0] = 0.0;\n    } // Give ourselves a little breathing room\n\n\n    range[0] = 0.99 * range[0] - (range[1] - range[0]) * model.clippingRangeExpansion;\n    range[1] = 1.01 * range[1] + (range[1] - range[0]) * model.clippingRangeExpansion; // Make sure near is not bigger than far\n\n    range[0] = range[0] >= range[1] ? 0.01 * range[1] : range[0]; // Make sure near is at least some fraction of far - this prevents near\n    // from being behind the camera or too close in front. How close is too\n    // close depends on the resolution of the depth buffer\n\n    if (!model.nearClippingPlaneTolerance) {\n      model.nearClippingPlaneTolerance = 0.01;\n    } // make sure the front clipping range is not too far from the far clippnig\n    // range, this is to make sure that the zbuffer resolution is effectively\n    // used\n\n\n    if (range[0] < model.nearClippingPlaneTolerance * range[1]) {\n      range[0] = model.nearClippingPlaneTolerance * range[1];\n    }\n\n    model.activeCamera.setClippingRange(range[0], range[1]); // Here to let parallel/distributed compositing intercept\n    // and do the right thing.\n\n    publicAPI.invokeEvent(RESET_CAMERA_CLIPPING_RANGE_EVENT);\n    return false;\n  };\n\n  publicAPI.setRenderWindow = function (renderWindow) {\n    if (renderWindow !== model.renderWindow) {\n      model.vtkWindow = renderWindow;\n      model.renderWindow = renderWindow;\n    }\n  };\n\n  publicAPI.visibleActorCount = function () {\n    return model.props.filter(function (prop) {\n      return prop.getVisibility();\n    }).length;\n  };\n\n  publicAPI.visibleVolumeCount = publicAPI.visibleActorCount;\n\n  publicAPI.getMTime = function () {\n    var m1 = model.mtime;\n    var m2 = model.activeCamera ? model.activeCamera.getMTime() : 0;\n\n    if (m2 > m1) {\n      m1 = m2;\n    }\n\n    var m3 = model.createdLight ? model.createdLight.getMTime() : 0;\n\n    if (m3 > m1) {\n      m1 = m3;\n    }\n\n    return m1;\n  };\n\n  publicAPI.getTransparent = function () {\n    return !!model.preserveColorBuffer;\n  };\n\n  publicAPI.isActiveCameraCreated = function () {\n    return !!model.activeCamera;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  pickedProp: null,\n  activeCamera: null,\n  allBounds: [],\n  ambient: [1, 1, 1],\n  allocatedRenderTime: 100,\n  timeFactor: 1,\n  createdLight: null,\n  automaticLightCreation: true,\n  twoSidedLighting: true,\n  lastRenderTimeInSeconds: -1,\n  renderWindow: null,\n  lights: [],\n  actors: [],\n  volumes: [],\n  lightFollowCamera: true,\n  numberOfPropsRendered: 0,\n  propArray: null,\n  pathArray: null,\n  layer: 0,\n  preserveColorBuffer: false,\n  preserveDepthBuffer: false,\n  computeVisiblePropBounds: (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_3__.M)(),\n  interactive: true,\n  nearClippingPlaneTolerance: 0,\n  clippingRangeExpansion: 0.05,\n  erase: true,\n  draw: true,\n  useShadows: false,\n  useDepthPeeling: false,\n  occlusionRatio: 0,\n  maximumNumberOfPeels: 4,\n  selector: null,\n  delegate: null,\n  texturedBackground: false,\n  backgroundTexture: null,\n  pass: 0\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _Viewport_js__WEBPACK_IMPORTED_MODULE_4__.default.extend(publicAPI, model, initialValues); // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.get)(publicAPI, model, ['renderWindow', 'allocatedRenderTime', 'timeFactor', 'lastRenderTimeInSeconds', 'numberOfPropsRendered', 'lastRenderingUsedDepthPeeling', 'selector']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['twoSidedLighting', 'lightFollowCamera', 'automaticLightCreation', 'erase', 'draw', 'nearClippingPlaneTolerance', 'clippingRangeExpansion', 'backingStore', 'interactive', 'layer', 'preserveColorBuffer', 'preserveDepthBuffer', 'useDepthPeeling', 'occlusionRatio', 'maximumNumberOfPeels', 'delegate', 'backgroundTexture', 'texturedBackground', 'useShadows', 'pass']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.getArray)(publicAPI, model, ['actors', 'volumes', 'lights']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGetArray)(publicAPI, model, ['background'], 4, 1.0); // Object methods\n\n  vtkRenderer(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend, 'vtkRenderer'); // ----------------------------------------------------------------------------\n\nvar vtkRenderer$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkRenderer$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Renderer.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/ScalarBarActor.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/ScalarBarActor.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Actor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Actor.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Actor.js\");\n/* harmony import */ var _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Common/Core/DataArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n/* harmony import */ var _Common_Core_ScalarsToColors_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Common/Core/ScalarsToColors.js */ \"./node_modules/@kitware/vtk.js/Common/Core/ScalarsToColors.js\");\n/* harmony import */ var _Mapper_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Mapper.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Mapper.js\");\n/* harmony import */ var _PixelSpaceCallbackMapper_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PixelSpaceCallbackMapper.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/PixelSpaceCallbackMapper.js\");\n/* harmony import */ var _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Common/DataModel/PolyData.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/PolyData.js\");\n/* harmony import */ var _Texture_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Texture.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Texture.js\");\n/* harmony import */ var _vendor_d3_scale_src_linear_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../vendor/d3-scale/src/linear.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-scale/src/linear.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/vec3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar VectorMode = _Common_Core_ScalarsToColors_js__WEBPACK_IMPORTED_MODULE_6__.default.VectorMode; // ----------------------------------------------------------------------------\n// vtkScalarBarActor\n//\n// Note log scales are currently not supported\n// ----------------------------------------------------------------------------\n// some shared temp variables to reduce heap allocs\n\nvar ptv3 = new Float64Array(3);\nvar pt2v3 = new Float64Array(3);\nvar tmpv3 = new Float64Array(3);\nvar tmp2v3 = new Float64Array(3);\nvar xDir = new Float64Array(3);\nvar yDir = new Float64Array(3);\nvar invmat = new Float64Array(16);\n\nfunction applyTextStyle(ctx, style) {\n  ctx.strokeStyle = style.strokeColor;\n  ctx.lineWidth = style.strokeSize;\n  ctx.fillStyle = style.fontColor;\n  ctx.font = \"\".concat(style.fontStyle, \" \").concat(style.fontSize, \"px \").concat(style.fontFamily);\n}\n\nfunction vtkScalarBarActor(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkScalarBarActor'); // compute good values to use based on window size etc\n  // a bunch of heuristics here with hand tuned constants\n  // These values worked for me but really this method\n  // could be redically changed. The basic gist is\n  // 1) compute a resonable font size\n  // 2) render the text atlas using those font sizes\n  // 3) pick horizontal or vertical bsed on window size\n  // 4) based on the size of the title and tick labels rendered\n  //    compute the box size and position such that\n  //    the text will all fit nicely and the bar will be a resonable size\n  // 5) compute the bar segments based on the above settings\n\n  publicAPI.computeAndApplyAutomatedSettings = function () {\n    // we don't do a linear scale, the proportions for\n    // a 700 pixel window differ from a 1400\n    var xAxisAdjust = Math.pow(model.lastSize[0] / 700, 0.8);\n    var yAxisAdjust = Math.pow(model.lastSize[1] / 700, 0.8);\n    var minAdjust = Math.min(xAxisAdjust, yAxisAdjust); // compute a reasonable font size first\n\n    model.axisTextStyle.fontSize = Math.max(24 * minAdjust, 12);\n\n    if (model.lastAspectRatio > 1.0) {\n      model.tickTextStyle.fontSize = Math.max(20 * minAdjust, 10);\n    } else {\n      model.tickTextStyle.fontSize = Math.max(16 * minAdjust, 10);\n    } // rebuild the text atlas\n\n\n    var textSizes = publicAPI.updateTextureAtlas(); // now compute the boxSize and pixel offsets, different algorithm\n    // for horizonal versus vertical\n\n    model.topTitle = false; // if vertical\n\n    if (model.lastAspectRatio > 1.0) {\n      model.tickLabelPixelOffset = 0.4 * model.tickTextStyle.fontSize;\n      var tickWidth = 2.0 * (textSizes.tickWidth + model.tickLabelPixelOffset) / model.lastSize[0];\n      model.axisTitlePixelOffset = 0.8 * model.axisTextStyle.fontSize; // width required if the title is vertical\n\n      var titleWidth = 2.0 * (textSizes.titleHeight + model.axisTitlePixelOffset) / model.lastSize[0]; // if the title will fit within the width of the bar then that looks\n      // nicer to put it at the top (model.topTitle), otherwise rotate it\n      // and place it sideways\n\n      if (tickWidth + 0.4 * titleWidth > 2.0 * textSizes.titleWidth / model.lastSize[0]) {\n        model.topTitle = true;\n        model.boxSize[0] = tickWidth + 0.4 * titleWidth;\n        model.boxPosition = [0.98 - model.boxSize[0], -0.92];\n      } else {\n        model.boxSize[0] = tickWidth + 1.4 * titleWidth;\n        model.boxPosition = [0.99 - model.boxSize[0], -0.92];\n      }\n\n      model.boxSize[1] = Math.max(1.2, Math.min(1.84 / yAxisAdjust, 1.84));\n    } else {\n      // horizontal\n      model.axisTitlePixelOffset = 2.0 * model.tickTextStyle.fontSize;\n      model.tickLabelPixelOffset = 0.5 * model.tickTextStyle.fontSize;\n      var tickHeight = 2.0 * (textSizes.tickHeight + model.tickLabelPixelOffset) / model.lastSize[1];\n      var titleHeight = 2.0 * (textSizes.titleHeight + model.axisTitlePixelOffset) / model.lastSize[1];\n\n      var _tickWidth = 2.0 * textSizes.tickWidth / model.lastSize[0];\n\n      model.boxSize[0] = Math.min(1.9, Math.max(1.4, 1.4 * _tickWidth * (model.ticks.length + 3)));\n      model.boxSize[1] = tickHeight + titleHeight;\n      model.boxPosition = [-0.5 * model.boxSize[0], -0.97];\n    } // recomute bar segments based on positioning\n\n\n    publicAPI.recomputeBarSegments(textSizes);\n  }; // main method to rebuild the scalarBar when something has changed\n  // tracks modified times\n\n\n  publicAPI.update = function () {\n    if (!model.scalarsToColors || !model.visibility) {\n      return;\n    } // make sure the lut is assigned to our mapper\n\n\n    model.barMapper.setLookupTable(model.scalarsToColors); // did something significant change? If so rebuild a lot of things\n\n    if (model.forceUpdate || Math.max(model.scalarsToColors.getMTime(), publicAPI.getMTime()) > model.lastRebuildTime.getMTime()) {\n      var range = model.scalarsToColors.getMappingRange();\n      model.lastTickBounds = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__.default)(range);\n      model.barMapper.setScalarRange(model.lastTickBounds); // compute tick marks for axes (update for log scale)\n\n      var scale = (0,_vendor_d3_scale_src_linear_js__WEBPACK_IMPORTED_MODULE_11__.l)().domain([model.lastTickBounds[0], model.lastTickBounds[1]]);\n      model.ticks = scale.ticks(5);\n      var format = scale.tickFormat(5);\n      model.tickStrings = model.ticks.map(format);\n\n      if (model.automated) {\n        publicAPI.computeAndApplyAutomatedSettings();\n      } else {\n        // rebuild the texture only when force or changed bounds, face\n        // visibility changes do to change the atlas\n        var textSizes = publicAPI.updateTextureAtlas(); // recompute bar segments based on positioning\n\n        publicAPI.recomputeBarSegments(textSizes);\n      }\n\n      model.forceViewUpdate = true;\n      model.lastRebuildTime.modified();\n      model.forceUpdate = false;\n    } // compute bounds for label quads whenever the camera changes or forced\n    // the polydata mapper could be modified to accept NDC coords then this\n    // would be called far less often\n\n\n    if (model.forceViewUpdate || model.camera.getMTime() > model.lastRedrawTime.getMTime()) {\n      publicAPI.updatePolyDataForLabels();\n      publicAPI.updatePolyDataForBarSegments();\n      model.lastRedrawTime.modified();\n      model.forceViewUpdate = false;\n    }\n  }; // The text atlas is an image and as loading images is async we call this when\n  // the promise resolves. The old texture is used until then\n\n\n  publicAPI.completedImage = function (doUpdate) {\n    if (model.nextImage && model.nextImage.complete) {\n      model.tmTexture.setImage(model.nextImage);\n      model.nextImage = null;\n      model._tmAtlas = model._nextAtlas;\n      model._nextAtlas = null;\n\n      if (doUpdate) {\n        model.forceViewUpdate = true;\n        publicAPI.update();\n      }\n    }\n  }; // create the texture map atlas that contains the rendering of\n  // all the text strings. Only needs to be called when the text strings\n  // have changed (labels and ticks)\n\n\n  publicAPI.updateTextureAtlas = function () {\n    // set the text properties\n    model.tmContext.textBaseline = 'bottom';\n    model.tmContext.textAlign = 'left'; // return some factors about the text atlas\n\n    var results = {}; // first the axislabel\n\n    var newTmAtlas = new Map();\n    var maxWidth = 0;\n    var totalHeight = 1; // start one pixel in so we have a border\n\n    applyTextStyle(model.tmContext, model.axisTextStyle);\n    var metrics = model.tmContext.measureText(model.axisLabel);\n    var entry = {\n      height: metrics.actualBoundingBoxAscent + 2,\n      startingHeight: totalHeight,\n      width: metrics.width + 2,\n      textStyle: model.axisTextStyle\n    };\n    newTmAtlas.set(model.axisLabel, entry);\n    totalHeight += entry.height;\n    maxWidth = entry.width;\n    results.titleWidth = entry.width;\n    results.titleHeight = entry.height; // and the ticks, NaN Below and Above\n\n    results.tickWidth = 0;\n    results.tickHeight = 0;\n    applyTextStyle(model.tmContext, model.tickTextStyle);\n    var strings = [].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__.default)(model.tickStrings), ['NaN', 'Below', 'Above']);\n\n    for (var t = 0; t < strings.length; t++) {\n      if (!newTmAtlas.has(strings[t])) {\n        metrics = model.tmContext.measureText(strings[t]);\n        entry = {\n          height: metrics.actualBoundingBoxAscent + 2,\n          startingHeight: totalHeight,\n          width: metrics.width + 2,\n          textStyle: model.tickTextStyle\n        };\n        newTmAtlas.set(strings[t], entry);\n        totalHeight += entry.height;\n\n        if (maxWidth < entry.width) {\n          maxWidth = entry.width;\n        }\n\n        if (results.tickWidth < entry.width) {\n          results.tickWidth = entry.width;\n        }\n\n        if (results.tickHeight < entry.height) {\n          results.tickHeight = entry.height;\n        }\n      }\n    } // always use power of two to avoid interpolation\n    // in cases where PO2 is required\n\n\n    maxWidth = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.K)(maxWidth);\n    totalHeight = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.K)(totalHeight); // set the tcoord values\n\n    newTmAtlas.forEach(function (value) {\n      value.tcoords = [0.0, (totalHeight - value.startingHeight - value.height) / totalHeight, value.width / maxWidth, (totalHeight - value.startingHeight - value.height) / totalHeight, value.width / maxWidth, (totalHeight - value.startingHeight) / totalHeight, 0.0, (totalHeight - value.startingHeight) / totalHeight];\n    }); // make sure we have power of two dimensions\n\n    model.tmCanvas.width = maxWidth;\n    model.tmCanvas.height = totalHeight;\n    model.tmContext.textBaseline = 'bottom';\n    model.tmContext.textAlign = 'left';\n    model.tmContext.clearRect(0, 0, maxWidth, totalHeight); // draw the text onto the texture\n\n    newTmAtlas.forEach(function (value, key) {\n      applyTextStyle(model.tmContext, value.textStyle);\n      model.tmContext.fillText(key, 1, value.startingHeight + value.height - 1);\n    });\n    var image = new Image();\n    image.src = model.tmCanvas.toDataURL('image/png');\n    model.nextImage = image;\n    model._nextAtlas = newTmAtlas;\n\n    if (image.complete) {\n      publicAPI.completedImage(false);\n    } else {\n      image.addEventListener('load', function () {\n        publicAPI.completedImage(true);\n      });\n    }\n\n    return results;\n  };\n\n  publicAPI.computeBarSize = function (textSizes) {\n    // compute orientation\n    model.vertical = model.boxSize[1] > model.boxSize[0];\n    var tickHeight = 2.0 * textSizes.tickHeight / model.lastSize[1];\n    var segSize = [1, 1]; // horizontal and vertical have different astetics so adjust based on\n    // orientation\n\n    if (model.vertical) {\n      var tickWidth = 2.0 * (textSizes.tickWidth + model.tickLabelPixelOffset) / model.lastSize[0];\n\n      if (model.topTitle) {\n        var titleHeight = 2.0 * (textSizes.titleHeight + model.axisTitlePixelOffset) / model.lastSize[1];\n        model.barSize[0] = model.boxSize[0] - tickWidth;\n        model.barSize[1] = model.boxSize[1] - titleHeight;\n      } else {\n        // rotated title so width is based off height\n        var titleWidth = 2.0 * (textSizes.titleHeight + model.axisTitlePixelOffset) / model.lastSize[0];\n        model.barSize[0] = model.boxSize[0] - titleWidth - tickWidth;\n        model.barSize[1] = model.boxSize[1];\n      }\n\n      model.barPosition[0] = model.boxPosition[0] + tickWidth;\n      model.barPosition[1] = model.boxPosition[1];\n      segSize[1] = tickHeight;\n    } else {\n      var _tickWidth2 = (2.0 * textSizes.tickWidth - 8) / model.lastSize[0];\n\n      var _titleHeight = 2.0 * (textSizes.titleHeight + model.axisTitlePixelOffset) / model.lastSize[1];\n\n      model.barSize[0] = model.boxSize[0];\n      model.barPosition[0] = model.boxPosition[0];\n      model.barSize[1] = model.boxSize[1] - _titleHeight - tickHeight;\n      model.barPosition[1] = model.boxPosition[1];\n      segSize[0] = _tickWidth2;\n    }\n\n    return segSize;\n  }; // based on all the settins compute a barSegments array\n  // containing the segments opf the scalar bar\n  // each segment contains\n  //   corners[4][2]\n  //   title - e.g. NaN, Above, ticks\n  //   scalars - the normalized scalars values to use for that segment\n  //\n  // Note that the bar consumes the space in the box that remains after\n  // leaving room for the text labels\n\n\n  publicAPI.recomputeBarSegments = function (textSizes) {\n    // first compute the barSize/Position\n    var segSize = publicAPI.computeBarSize(textSizes);\n    model.barSegments = [];\n    var startPos = [0.0, 0.0]; // horizontal and vertical have different astetics so adjust based on\n    // orientation\n\n    var barAxis = model.vertical ? 1 : 0;\n    var segSpace = model.vertical ? 0.01 : 0.02;\n\n    function pushSeg(title, scalars) {\n      model.barSegments.push({\n        corners: [[].concat(startPos), [startPos[0] + segSize[0], startPos[1]], [startPos[0] + segSize[0], startPos[1] + segSize[1]], [startPos[0], startPos[1] + segSize[1]]],\n        scalars: scalars,\n        title: title\n      });\n      startPos[barAxis] += segSize[barAxis] + segSpace;\n    }\n\n    if (typeof model.scalarsToColors.getNanColor === 'function') {\n      pushSeg('NaN', [NaN, NaN, NaN, NaN]);\n    }\n\n    if (typeof model.scalarsToColors.getUseBelowRangeColor === 'function' && model.scalarsToColors.getUseBelowRangeColor()) {\n      pushSeg('Below', [-0.1, -0.1, -0.1, -0.1]);\n    }\n\n    var haveAbove = typeof model.scalarsToColors.getUseAboveRangeColor === 'function' && model.scalarsToColors.getUseAboveRangeColor(); // extra space around the ticks section\n\n    startPos[barAxis] += segSpace;\n    var oldSegSize = segSize[barAxis];\n    segSize[barAxis] = haveAbove ? 1.0 - 2.0 * segSpace - segSize[barAxis] - startPos[barAxis] : 1.0 - segSpace - startPos[barAxis];\n    pushSeg('ticks', model.vertical ? [0, 0, 0.995, 0.995] : [0, 0.995, 0.995, 0]);\n\n    if (haveAbove) {\n      segSize[barAxis] = oldSegSize;\n      startPos[barAxis] += segSpace;\n      pushSeg('Above', [1.1, 1.1, 1.1, 1.1]);\n    }\n  }; // called by updatePolyDataForLabels\n  // modifies class constants ptv3, tmpv3\n\n\n  publicAPI.createPolyDataForOneLabel = function (text, pos, xdir, ydir, dir, offset, results) {\n    var value = model._tmAtlas.get(text);\n\n    if (!value) {\n      return;\n    } // have to find the four corners of the texture polygon for this label\n    // convert anchor point to View Coords\n\n\n    var ptIdx = results.ptIdx;\n    var cellIdx = results.cellIdx;\n    ptv3[0] = pos[0];\n    ptv3[1] = pos[1];\n    ptv3[2] = pos[2]; // horizontal left, right, or middle alignment based on dir[0]\n\n    if (dir[0] < -0.5) {\n      (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.b)(tmpv3, xdir, dir[0] * offset - value.width);\n    } else if (dir[0] > 0.5) {\n      (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.b)(tmpv3, xdir, dir[0] * offset);\n    } else {\n      (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.b)(tmpv3, xdir, dir[0] * offset - value.width / 2.0);\n    }\n\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.j)(ptv3, ptv3, tmpv3);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.b)(tmpv3, ydir, dir[1] * offset - value.height / 2.0);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.j)(ptv3, ptv3, tmpv3);\n    results.points[ptIdx * 3] = ptv3[0];\n    results.points[ptIdx * 3 + 1] = ptv3[1];\n    results.points[ptIdx * 3 + 2] = ptv3[2];\n    results.tcoords[ptIdx * 2] = value.tcoords[0];\n    results.tcoords[ptIdx * 2 + 1] = value.tcoords[1];\n    ptIdx++;\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.b)(tmpv3, xdir, value.width);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.j)(ptv3, ptv3, tmpv3);\n    results.points[ptIdx * 3] = ptv3[0];\n    results.points[ptIdx * 3 + 1] = ptv3[1];\n    results.points[ptIdx * 3 + 2] = ptv3[2];\n    results.tcoords[ptIdx * 2] = value.tcoords[2];\n    results.tcoords[ptIdx * 2 + 1] = value.tcoords[3];\n    ptIdx++;\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.b)(tmpv3, ydir, value.height);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.j)(ptv3, ptv3, tmpv3);\n    results.points[ptIdx * 3] = ptv3[0];\n    results.points[ptIdx * 3 + 1] = ptv3[1];\n    results.points[ptIdx * 3 + 2] = ptv3[2];\n    results.tcoords[ptIdx * 2] = value.tcoords[4];\n    results.tcoords[ptIdx * 2 + 1] = value.tcoords[5];\n    ptIdx++;\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.b)(tmpv3, xdir, value.width);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.a)(ptv3, ptv3, tmpv3);\n    results.points[ptIdx * 3] = ptv3[0];\n    results.points[ptIdx * 3 + 1] = ptv3[1];\n    results.points[ptIdx * 3 + 2] = ptv3[2];\n    results.tcoords[ptIdx * 2] = value.tcoords[6];\n    results.tcoords[ptIdx * 2 + 1] = value.tcoords[7];\n    ptIdx++; // add the two triangles to represent the quad\n\n    results.polys[cellIdx * 4] = 3;\n    results.polys[cellIdx * 4 + 1] = ptIdx - 4;\n    results.polys[cellIdx * 4 + 2] = ptIdx - 3;\n    results.polys[cellIdx * 4 + 3] = ptIdx - 2;\n    cellIdx++;\n    results.polys[cellIdx * 4] = 3;\n    results.polys[cellIdx * 4 + 1] = ptIdx - 4;\n    results.polys[cellIdx * 4 + 2] = ptIdx - 2;\n    results.polys[cellIdx * 4 + 3] = ptIdx - 1;\n    results.ptIdx += 4;\n    results.cellIdx += 2;\n  }; // update the polydata associated with drawing the text labels\n  // specifically the quads used for each label and their associated tcoords\n  // etc. This changes every time the camera viewpoint changes\n\n\n  publicAPI.updatePolyDataForLabels = function () {\n    var cmat = model.camera.getCompositeProjectionMatrix(model.lastAspectRatio, -1, 1);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_13__.j)(cmat, cmat);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_13__.i)(invmat, cmat);\n    var size = model.lastSize; // compute pixel to distance factors\n\n    tmpv3[0] = 0.0;\n    tmpv3[1] = 0.0;\n    tmpv3[2] = -0.99; // near plane\n\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.t)(ptv3, tmpv3, invmat); // moving 0.1 in NDC\n\n    tmpv3[0] += 0.1;\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.t)(pt2v3, tmpv3, invmat); // results in WC move of\n\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.a)(xDir, pt2v3, ptv3);\n    tmpv3[0] -= 0.1;\n    tmpv3[1] += 0.1;\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.t)(pt2v3, tmpv3, invmat); // results in WC move of\n\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.a)(yDir, pt2v3, ptv3);\n\n    for (var i = 0; i < 3; i++) {\n      xDir[i] /= 0.5 * 0.1 * size[0];\n      yDir[i] /= 0.5 * 0.1 * size[1];\n    } // update the polydata\n\n\n    var numLabels = model.tickStrings.length + model.barSegments.length;\n    var numPts = numLabels * 4;\n    var numTris = numLabels * 2;\n    var points = new Float64Array(numPts * 3);\n    var polys = new Uint16Array(numTris * 4);\n    var tcoords = new Float32Array(numPts * 2);\n    var results = {\n      ptIdx: 0,\n      cellIdx: 0,\n      polys: polys,\n      points: points,\n      tcoords: tcoords\n    }; // compute the direction vector, to make the code general we place text\n\n    var offsetAxis = model.vertical ? 0 : 1;\n    var spacedAxis = model.vertical ? 1 : 0; // draw the title\n\n    var dir = [0, 1];\n\n    if (model.vertical) {\n      if (model.topTitle) {\n        tmpv3[0] = model.boxPosition[0] + 0.5 * model.boxSize[0];\n        tmpv3[1] = model.barPosition[1] + model.barSize[1];\n        (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.t)(ptv3, tmpv3, invmat); // write the axis label\n\n        publicAPI.createPolyDataForOneLabel(model.axisLabel, ptv3, xDir, yDir, [0, 1], model.axisTitlePixelOffset, results);\n      } else {\n        tmpv3[0] = model.barPosition[0] + model.barSize[0];\n        tmpv3[1] = model.barPosition[1] + 0.5 * model.barSize[1];\n        (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.t)(ptv3, tmpv3, invmat); // write the axis label\n\n        (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.b)(xDir, xDir, -1);\n        publicAPI.createPolyDataForOneLabel(model.axisLabel, ptv3, yDir, xDir, [0, -1], model.axisTitlePixelOffset, results);\n        (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.b)(xDir, xDir, -1);\n      }\n\n      dir = [-1, 0];\n    } else {\n      tmpv3[0] = model.barPosition[0] + 0.5 * model.barSize[0];\n      tmpv3[1] = model.barPosition[1] + model.barSize[1];\n      (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.t)(ptv3, tmpv3, invmat);\n      publicAPI.createPolyDataForOneLabel(model.axisLabel, ptv3, xDir, yDir, dir, model.axisTitlePixelOffset, results);\n    }\n\n    tmp2v3[2] = -0.99; // near plane\n\n    tmp2v3[offsetAxis] = model.barPosition[offsetAxis] + (0.5 * dir[offsetAxis] + 0.5) * model.barSize[offsetAxis];\n    tmp2v3[spacedAxis] = model.barPosition[spacedAxis] + model.barSize[spacedAxis] * 0.5; // draw bar segment labels\n\n    var tickSeg = null;\n\n    for (var _i = 0; _i < model.barSegments.length; _i++) {\n      var seg = model.barSegments[_i];\n\n      if (seg.title === 'ticks') {\n        // handle ticks below\n        tickSeg = seg;\n      } else {\n        tmp2v3[spacedAxis] = model.barPosition[spacedAxis] + 0.5 * model.barSize[spacedAxis] * (seg.corners[2][spacedAxis] + seg.corners[0][spacedAxis]);\n        (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.t)(ptv3, tmp2v3, invmat);\n        publicAPI.createPolyDataForOneLabel(seg.title, ptv3, xDir, yDir, dir, model.tickLabelPixelOffset, results);\n      }\n    } // write the tick labels\n\n\n    var tickSegmentStart = model.barPosition[spacedAxis] + model.barSize[spacedAxis] * tickSeg.corners[0][spacedAxis];\n    var tickSegmentSize = model.barSize[spacedAxis] * (tickSeg.corners[2][spacedAxis] - tickSeg.corners[0][spacedAxis]);\n\n    for (var t = 0; t < model.ticks.length; t++) {\n      var tickPos = (model.ticks[t] - model.lastTickBounds[0]) / (model.lastTickBounds[1] - model.lastTickBounds[0]);\n      tmp2v3[spacedAxis] = tickSegmentStart + tickSegmentSize * tickPos;\n      (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.t)(ptv3, tmp2v3, invmat);\n      publicAPI.createPolyDataForOneLabel(model.tickStrings[t], ptv3, xDir, yDir, dir, model.tickLabelPixelOffset, results);\n    }\n\n    var tcoordDA = _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance({\n      numberOfComponents: 2,\n      values: tcoords,\n      name: 'TextureCoordinates'\n    });\n    model.tmPolyData.getPointData().setTCoords(tcoordDA);\n    model.tmPolyData.getPoints().setData(points, 3);\n    model.tmPolyData.getPoints().modified();\n    model.tmPolyData.getPolys().setData(polys, 1);\n    model.tmPolyData.getPolys().modified();\n    model.tmPolyData.modified();\n  };\n\n  publicAPI.updatePolyDataForBarSegments = function () {\n    var cmat = model.camera.getCompositeProjectionMatrix(model.lastAspectRatio, -1, 1);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_13__.j)(cmat, cmat);\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_13__.i)(invmat, cmat);\n    var haveExtraColors = typeof model.scalarsToColors.getNanColor === 'function' && typeof model.scalarsToColors.getAboveRangeColor === 'function' && typeof model.scalarsToColors.getBelowRangeColor === 'function';\n    var numPts = 4 + (haveExtraColors ? 12 : 0);\n    var numQuads = numPts; // handle vector component mode\n\n    var numComps = 1;\n\n    if (model.scalarsToColors.getVectorMode() === VectorMode.COMPONENT) {\n      numComps = model.scalarsToColors.getVectorComponent() + 1;\n    } // create the colored bars\n\n\n    var points = new Float64Array(numPts * 3);\n    var cells = new Uint16Array(numQuads * 5);\n    var scalars = new Float32Array(numPts * numComps);\n    var ptIdx = 0;\n    var cellIdx = 0;\n\n    for (var i = 0; i < model.barSegments.length; i++) {\n      var seg = model.barSegments[i];\n      tmp2v3[1] = model.barPosition[1] + model.barSize[1] * 0.5;\n      tmp2v3[2] = -0.99; // near plane\n\n      for (var e = 0; e < 4; e++) {\n        tmp2v3[0] = model.barPosition[0] + seg.corners[e][0] * model.barSize[0];\n        tmp2v3[1] = model.barPosition[1] + seg.corners[e][1] * model.barSize[1];\n        (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_12__.t)(ptv3, tmp2v3, invmat);\n        points[ptIdx * 3] = ptv3[0];\n        points[ptIdx * 3 + 1] = ptv3[1];\n        points[ptIdx * 3 + 2] = ptv3[2];\n\n        for (var nc = 0; nc < numComps; nc++) {\n          scalars[ptIdx * numComps + nc] = model.lastTickBounds[0] + seg.scalars[e] * (model.lastTickBounds[1] - model.lastTickBounds[0]);\n        }\n\n        ptIdx++;\n      }\n\n      cells[cellIdx * 5] = 4;\n      cells[cellIdx * 5 + 1] = ptIdx - 4;\n      cells[cellIdx * 5 + 2] = ptIdx - 3;\n      cells[cellIdx * 5 + 3] = ptIdx - 2;\n      cells[cellIdx * 5 + 4] = ptIdx - 1;\n      cellIdx++;\n    }\n\n    var scalarsDA = _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance({\n      numberOfComponents: numComps,\n      values: scalars,\n      name: 'Scalars'\n    });\n    model.polyData.getPointData().setScalars(scalarsDA);\n    model.polyData.getPoints().setData(points, 3);\n    model.polyData.getPoints().modified();\n    model.polyData.getPolys().setData(cells, 1);\n    model.polyData.getPolys().modified();\n    model.polyData.modified();\n  };\n\n  publicAPI.getActors = function () {\n    return [model.barActor, model.tmActor];\n  };\n\n  publicAPI.getNestedProps = function () {\n    return publicAPI.getActors();\n  };\n\n  publicAPI.setTickTextStyle = function (tickStyle) {\n    model.tickTextStyle = _objectSpread(_objectSpread({}, model.tickTextStyle), tickStyle);\n    publicAPI.modified();\n  };\n\n  publicAPI.setAxisTextStyle = function (axisStyle) {\n    model.axisTextStyle = _objectSpread(_objectSpread({}, model.axisTextStyle), axisStyle);\n    publicAPI.modified();\n  };\n\n  publicAPI.setVisibility = _macro_js__WEBPACK_IMPORTED_MODULE_3__.default.chain(publicAPI.setVisibility, model.barActor.setVisibility, model.tmActor.setVisibility);\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nfunction defaultValues(initialValues) {\n  return _objectSpread({\n    automated: true,\n    axisLabel: 'Scalar Value',\n    barPosition: [0, 0],\n    barSize: [0, 0],\n    boxPosition: [0.88, -0.92],\n    boxSize: [0.1, 1.1],\n    scalarToColors: null,\n    axisTitlePixelOffset: 36.0,\n    axisTextStyle: {\n      fontColor: 'white',\n      fontStyle: 'normal',\n      fontSize: 18,\n      fontFamily: 'serif'\n    },\n    tickLabelPixelOffset: 14.0,\n    tickTextStyle: {\n      fontColor: 'white',\n      fontStyle: 'normal',\n      fontSize: 14,\n      fontFamily: 'serif'\n    }\n  }, initialValues);\n} // ----------------------------------------------------------------------------\n\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, defaultValues(initialValues)); // Inheritance\n\n  _Actor_js__WEBPACK_IMPORTED_MODULE_4__.default.extend(publicAPI, model, initialValues);\n  publicAPI.getProperty().setDiffuse(0.0);\n  publicAPI.getProperty().setAmbient(1.0);\n  model._tmAtlas = new Map(); // internal variables\n\n  model.lastSize = [800, 800];\n  model.lastAspectRatio = 1.0;\n  model.textValues = [];\n  model.lastTickBounds = [];\n  model.barMapper = _Mapper_js__WEBPACK_IMPORTED_MODULE_7__.default.newInstance();\n  model.barMapper.setInterpolateScalarsBeforeMapping(true);\n  model.polyData = _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_9__.default.newInstance();\n  model.barMapper.setInputData(model.polyData);\n  model.barActor = _Actor_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n  model.barActor.setMapper(model.barMapper);\n  model.barActor.setProperty(publicAPI.getProperty());\n  model.lastRedrawTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_3__.default.obj(model.lastRedrawTime, {\n    mtime: 0\n  });\n  model.lastRebuildTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_3__.default.obj(model.lastRebuildTime, {\n    mtime: 0\n  });\n  model.textPolyData = _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_9__.default.newInstance(); // for texture atlas\n\n  model.tmPolyData = _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_9__.default.newInstance();\n  model.tmMapper = _Mapper_js__WEBPACK_IMPORTED_MODULE_7__.default.newInstance();\n  model.tmMapper.setInputData(model.tmPolyData);\n  model.tmTexture = _Texture_js__WEBPACK_IMPORTED_MODULE_10__.default.newInstance();\n  model.tmTexture.setInterpolate(false);\n  model.tmActor = _Actor_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n  model.tmActor.setMapper(model.tmMapper);\n  model.tmActor.addTexture(model.tmTexture);\n  model.tmActor.setProperty(publicAPI.getProperty());\n  model.tmCanvas = document.createElement('canvas');\n  model.tmContext = model.tmCanvas.getContext('2d'); // PixelSpaceCallbackMapper - we do need an empty polydata\n  // really just used to get the window size which we need to do\n  // proper text positioning and scaling.\n\n  model.mapper = _PixelSpaceCallbackMapper_js__WEBPACK_IMPORTED_MODULE_8__.default.newInstance();\n  model.pixelMapperPolyData = _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_9__.default.newInstance();\n  model.mapper.setInputData(model.pixelMapperPolyData);\n  model.mapper.setCallback(function (coords, camera, aspect, depthValues, size) {\n    model.camera = camera;\n\n    if (model.lastSize[0] !== size[0] || model.lastSize[1] !== size[1]) {\n      model.lastSize[0] = size[0];\n      model.lastSize[1] = size[1];\n      model.lastAspectRatio = size[0] / size[1]; // we could use modified, but really the public state is not\n      // modified\n\n      model.forceUpdate = true;\n    }\n\n    publicAPI.update();\n  });\n  _macro_js__WEBPACK_IMPORTED_MODULE_3__.default.setGet(publicAPI, model, ['automated', 'axisTitlePixelOffset', 'axisLabel', 'scalarsToColors', 'tickLabelPixelOffset']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_3__.default.get(publicAPI, model, ['axisTextStyle', 'tickTextStyle']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_3__.default.getArray(publicAPI, model, ['boxPosition', 'boxSize']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_3__.default.setArray(publicAPI, model, ['boxPosition', 'boxSize'], 2); // Object methods\n\n  vtkScalarBarActor(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance(extend, 'vtkScalarBarActor'); // ----------------------------------------------------------------------------\n\nvar vtkScalarBarActor$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkScalarBarActor$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/ScalarBarActor.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Texture.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Texture.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\n// vtkTexture methods\n// ----------------------------------------------------------------------------\n\nfunction vtkTexture(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkTexture');\n\n  publicAPI.imageLoaded = function () {\n    model.image.removeEventListener('load', publicAPI.imageLoaded);\n    model.imageLoaded = true;\n    publicAPI.modified();\n  };\n\n  publicAPI.setImage = function (image) {\n    if (model.image === image) {\n      return;\n    }\n\n    if (image !== null) {\n      publicAPI.setInputData(null);\n      publicAPI.setInputConnection(null);\n    }\n\n    model.image = image;\n    model.imageLoaded = false;\n\n    if (image.complete) {\n      publicAPI.imageLoaded();\n    } else {\n      image.addEventListener('load', publicAPI.imageLoaded);\n    }\n\n    publicAPI.modified();\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  repeat: false,\n  interpolate: false,\n  edgeClamp: false,\n  image: null,\n  imageLoaded: false\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.algo(publicAPI, model, 6, 0);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['imageLoaded']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['repeat', 'edgeClamp', 'interpolate', 'image']);\n  vtkTexture(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkTexture'); // ----------------------------------------------------------------------------\n\nvar vtkTexture$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkTexture$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Texture.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/Viewport.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/Viewport.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.vtkErrorMacro;\n\nfunction notImplemented(method) {\n  return function () {\n    return vtkErrorMacro(\"vtkViewport::\".concat(method, \" - NOT IMPLEMENTED\"));\n  };\n} // ----------------------------------------------------------------------------\n// vtkViewport methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkViewport(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkViewport'); // Public API methods\n\n  publicAPI.getViewProps = function () {\n    return model.props;\n  };\n\n  publicAPI.hasViewProp = function (prop) {\n    return !!model.props.filter(function (item) {\n      return item === prop;\n    }).length;\n  };\n\n  publicAPI.addViewProp = function (prop) {\n    if (prop && !publicAPI.hasViewProp(prop)) {\n      model.props = model.props.concat(prop);\n    }\n  };\n\n  publicAPI.removeViewProp = function (prop) {\n    var newPropList = model.props.filter(function (item) {\n      return item !== prop;\n    });\n\n    if (model.props.length !== newPropList.length) {\n      model.props = newPropList;\n    }\n  };\n\n  publicAPI.removeAllViewProps = function () {\n    model.props = [];\n  }; // this method get all the props including any nested props\n\n\n  function gatherProps(prop) {\n    var allProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n    allProps.push(prop);\n    var children = prop.getNestedProps();\n\n    if (children && children.length) {\n      for (var i = 0; i < children.length; i++) {\n        gatherProps(children[i], allProps);\n      }\n    }\n\n    return allProps;\n  }\n\n  publicAPI.getViewPropsWithNestedProps = function () {\n    var allPropsArray = [];\n\n    for (var i = 0; i < model.props.length; i++) {\n      gatherProps(model.props[i], allPropsArray);\n    }\n\n    return allPropsArray;\n  };\n\n  publicAPI.addActor2D = publicAPI.addViewProp;\n\n  publicAPI.removeActor2D = function (prop) {\n    // VTK way: model.actors2D.RemoveItem(prop);\n    publicAPI.removeViewProp(prop);\n  };\n\n  publicAPI.getActors2D = function () {\n    model.actors2D = [];\n    model.props.forEach(function (prop) {\n      model.actors2D = model.actors2D.concat(prop.getActors2D());\n    });\n    return model.actors2D;\n  };\n\n  publicAPI.displayToView = function () {\n    return vtkErrorMacro('call displayToView on your view instead');\n  };\n\n  publicAPI.viewToDisplay = function () {\n    return vtkErrorMacro('callviewtodisplay on your view instead');\n  };\n\n  publicAPI.getSize = function () {\n    return vtkErrorMacro('call getSize on your View instead');\n  };\n\n  publicAPI.normalizedDisplayToProjection = function (x, y, z) {\n    // first to normalized viewport\n    var nvp = publicAPI.normalizedDisplayToNormalizedViewport(x, y, z); // then to view\n\n    return publicAPI.normalizedViewportToProjection(nvp[0], nvp[1], nvp[2]);\n  };\n\n  publicAPI.normalizedDisplayToNormalizedViewport = function (x, y, z) {\n    var scale = [model.viewport[2] - model.viewport[0], model.viewport[3] - model.viewport[1]];\n    return [(x - model.viewport[0]) / scale[0], (y - model.viewport[1]) / scale[1], z];\n  };\n\n  publicAPI.normalizedViewportToProjection = function (x, y, z) {\n    return [x * 2.0 - 1.0, y * 2.0 - 1.0, z * 2.0 - 1.0];\n  };\n\n  publicAPI.projectionToNormalizedDisplay = function (x, y, z) {\n    // first to nvp\n    var nvp = publicAPI.projectionToNormalizedViewport(x, y, z); // then to ndp\n\n    return publicAPI.normalizedViewportToNormalizedDisplay(nvp[0], nvp[1], nvp[2]);\n  };\n\n  publicAPI.normalizedViewportToNormalizedDisplay = function (x, y, z) {\n    var scale = [model.viewport[2] - model.viewport[0], model.viewport[3] - model.viewport[1]];\n    return [x * scale[0] + model.viewport[0], y * scale[1] + model.viewport[1], z];\n  };\n\n  publicAPI.projectionToNormalizedViewport = function (x, y, z) {\n    return [(x + 1.0) * 0.5, (y + 1.0) * 0.5, (z + 1.0) * 0.5];\n  };\n\n  publicAPI.PickPropFrom = notImplemented('PickPropFrom');\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  vtkWindow: null,\n  background: [0, 0, 0],\n  background2: [0.2, 0.2, 0.2],\n  gradientBackground: false,\n  viewport: [0, 0, 1, 1],\n  aspect: [1, 1],\n  pixelAspect: [1, 1],\n  props: [],\n  actors2D: []\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.event(publicAPI, model, 'event');\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGetArray(publicAPI, model, ['viewport'], 4);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGetArray(publicAPI, model, ['background', 'background2'], 3);\n  vtkViewport(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkViewport'); // ----------------------------------------------------------------------------\n\nvar vtkViewport$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkViewport$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/Viewport.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Core/VolumeMapper/Constants.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Core/VolumeMapper/Constants.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"BlendMode\": () => (/* binding */ BlendMode)\n/* harmony export */ });\nvar BlendMode = {\n  COMPOSITE_BLEND: 0,\n  MAXIMUM_INTENSITY_BLEND: 1,\n  MINIMUM_INTENSITY_BLEND: 2,\n  AVERAGE_INTENSITY_BLEND: 3,\n  ADDITIVE_INTENSITY_BLEND: 4\n};\nvar Constants = {\n  BlendMode: BlendMode\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Core/VolumeMapper/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Misc/FullScreenRenderWindow.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Misc/FullScreenRenderWindow.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Core_Renderer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Core/Renderer.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Renderer.js\");\n/* harmony import */ var _Core_RenderWindow_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Core/RenderWindow.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindow.js\");\n/* harmony import */ var _Core_RenderWindowInteractor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Core/RenderWindowInteractor.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindowInteractor.js\");\n/* harmony import */ var _Interaction_Style_InteractorStyleTrackballCamera_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Interaction/Style/InteractorStyleTrackballCamera.js */ \"./node_modules/@kitware/vtk.js/Interaction/Style/InteractorStyleTrackballCamera.js\");\n/* harmony import */ var _Common_Core_URLExtract_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Common/Core/URLExtract.js */ \"./node_modules/@kitware/vtk.js/Common/Core/URLExtract.js\");\n/* harmony import */ var _Common_Core_Points_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/Core/Points.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Points.js\");\n/* harmony import */ var _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Common/Core/DataArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n/* harmony import */ var _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Common/DataModel/PolyData.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/PolyData.js\");\n/* harmony import */ var _Core_Actor_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Core/Actor.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Actor.js\");\n/* harmony import */ var _Core_Mapper_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Core/Mapper.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Mapper.js\");\n/* harmony import */ var _OpenGL_RenderWindow_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../OpenGL/RenderWindow.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/RenderWindow.js\");\n/* harmony import */ var _WebGPU_RenderWindow_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../WebGPU/RenderWindow.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/RenderWindow.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar userParams = _Common_Core_URLExtract_js__WEBPACK_IMPORTED_MODULE_6__.default.extractURLParameters();\nvar STYLE_CONTAINER = {\n  margin: '0',\n  padding: '0',\n  position: 'absolute',\n  top: '0',\n  left: '0',\n  width: '100%',\n  height: '100%',\n  overflow: 'hidden'\n};\nvar STYLE_CONTROL_PANEL = {\n  position: 'absolute',\n  left: '25px',\n  top: '25px',\n  backgroundColor: 'white',\n  borderRadius: '5px',\n  listStyle: 'none',\n  padding: '5px 10px',\n  margin: '0',\n  display: 'block',\n  border: 'solid 1px black',\n  maxWidth: 'calc(100% - 70px)',\n  maxHeight: 'calc(100% - 60px)',\n  overflow: 'auto'\n};\n\nfunction applyStyle(el, style) {\n  Object.keys(style).forEach(function (key) {\n    el.style[key] = style[key];\n  });\n}\n\nfunction vtkFullScreenRenderWindow(publicAPI, model) {\n  model.classHierarchy.push('vtkFullScreenRenderWindow');\n  var body = document.querySelector('body'); // Full screen DOM handler\n\n  if (!model.rootContainer) {\n    model.rootContainer = body;\n  }\n\n  if (!model.container) {\n    model.container = document.createElement('div');\n    applyStyle(model.container, model.containerStyle || STYLE_CONTAINER);\n    model.rootContainer.appendChild(model.container);\n  } // apply 100% to html and body for fullscreen\n\n\n  if (model.rootContainer === body) {\n    document.documentElement.style.height = '100%';\n    body.style.height = '100%';\n    body.style.padding = '0';\n    body.style.margin = '0';\n  } // VTK renderWindow/renderer\n\n\n  model.renderWindow = _Core_RenderWindow_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n  model.renderer = _Core_Renderer_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n  model.renderWindow.addRenderer(model.renderer); // apiSpecificRenderWindow\n\n  model.apiSpecificRenderWindow = model.renderWindow.newAPISpecificView(userParams.viewAPI);\n  model.apiSpecificRenderWindow.setContainer(model.container);\n  model.renderWindow.addView(model.apiSpecificRenderWindow); // Interactor\n\n  model.interactor = _Core_RenderWindowInteractor_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n  model.interactor.setInteractorStyle(_Interaction_Style_InteractorStyleTrackballCamera_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance());\n  model.interactor.setView(model.apiSpecificRenderWindow);\n  model.interactor.initialize();\n  model.interactor.bindEvents(model.container); // Expose background\n\n  publicAPI.setBackground = model.renderer.setBackground;\n\n  publicAPI.removeController = function () {\n    var el = model.controlContainer;\n\n    if (el) {\n      el.parentNode.removeChild(el);\n    }\n  };\n\n  publicAPI.setControllerVisibility = function (visible) {\n    model.controllerVisibility = visible;\n\n    if (model.controlContainer) {\n      if (visible) {\n        model.controlContainer.style.display = 'block';\n      } else {\n        model.controlContainer.style.display = 'none';\n      }\n    }\n  };\n\n  publicAPI.toggleControllerVisibility = function () {\n    publicAPI.setControllerVisibility(!model.controllerVisibility);\n  };\n\n  publicAPI.addController = function (html) {\n    model.controlContainer = document.createElement('div');\n    applyStyle(model.controlContainer, model.controlPanelStyle || STYLE_CONTROL_PANEL);\n    model.rootContainer.appendChild(model.controlContainer);\n    model.controlContainer.innerHTML = html;\n    publicAPI.setControllerVisibility(model.controllerVisibility);\n    model.rootContainer.addEventListener('keypress', function (e) {\n      if (String.fromCharCode(e.charCode) === 'c') {\n        publicAPI.toggleControllerVisibility();\n      }\n    });\n  }; // Update BG color\n\n\n  publicAPI.setBackground.apply(publicAPI, (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(model.background)); // Representation API\n\n  publicAPI.addRepresentation = function (representation) {\n    representation.getActors().forEach(function (actor) {\n      model.renderer.addActor(actor);\n    });\n  };\n\n  publicAPI.removeRepresentation = function (representation) {\n    representation.getActors().forEach(function (actor) {\n      return model.renderer.removeActor(actor);\n    });\n  }; // Properly release GL context\n\n\n  publicAPI.delete = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.chain(publicAPI.setContainer, model.apiSpecificRenderWindow.delete, publicAPI.delete); // Handle window resize\n\n  publicAPI.resize = function () {\n    var dims = model.container.getBoundingClientRect();\n    var devicePixelRatio = window.devicePixelRatio || 1;\n    model.apiSpecificRenderWindow.setSize(Math.floor(dims.width * devicePixelRatio), Math.floor(dims.height * devicePixelRatio));\n\n    if (model.resizeCallback) {\n      model.resizeCallback(dims);\n    }\n\n    model.renderWindow.render();\n  };\n\n  publicAPI.setResizeCallback = function (cb) {\n    model.resizeCallback = cb;\n    publicAPI.resize();\n  };\n\n  if (model.listenWindowResize) {\n    window.addEventListener('resize', publicAPI.resize);\n  }\n\n  publicAPI.resize();\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  background: [0.32, 0.34, 0.43],\n  containerStyle: null,\n  controlPanelStyle: null,\n  listenWindowResize: true,\n  resizeCallback: null,\n  controllerVisibility: true\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['renderWindow', 'renderer', 'apiSpecificRenderWindow', 'interactor', 'rootContainer', 'container', 'controlContainer']); // Object specific methods\n\n  vtkFullScreenRenderWindow(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend); // ----------------------------------------------------------------------------\n\nvar vtkFullScreenRenderWindow$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkFullScreenRenderWindow$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Misc/FullScreenRenderWindow.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/Actor.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/Actor.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ViewNodeFactory.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat3.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n\n\n\n\n\n\n// vtkOpenGLActor methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLActor(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLActor'); // Builds myself.\n\n  publicAPI.buildPass = function (prepass) {\n    if (prepass) {\n      model.openGLRenderWindow = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderWindow');\n      model.openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');\n      model.context = model.openGLRenderWindow.getContext();\n      publicAPI.prepareNodes();\n      publicAPI.addMissingNodes(model.renderable.getTextures());\n      publicAPI.addMissingNode(model.renderable.getMapper());\n      publicAPI.removeUnusedNodes(); // we store textures and mapper\n\n      model.ogltextures = null;\n      model.activeTextures = null;\n\n      for (var index = 0; index < model.children.length; index++) {\n        var child = model.children[index];\n\n        if (child.isA('vtkOpenGLTexture')) {\n          if (!model.ogltextures) {\n            model.ogltextures = [];\n          }\n\n          model.ogltextures.push(child);\n        } else {\n          model.oglmapper = child;\n        }\n      }\n    }\n  };\n\n  publicAPI.traverseOpaqueZBufferPass = function (renderPass) {\n    publicAPI.traverseOpaquePass(renderPass);\n  }; // we draw textures, then mapper, then post pass textures\n\n\n  publicAPI.traverseOpaquePass = function (renderPass) {\n    if (!model.renderable || !model.renderable.getVisibility() || !model.renderable.getIsOpaque() || model.openGLRenderer.getSelector() && !model.renderable.getPickable()) {\n      return;\n    }\n\n    publicAPI.apply(renderPass, true);\n    model.oglmapper.traverse(renderPass);\n    publicAPI.apply(renderPass, false);\n  }; // we draw textures, then mapper, then post pass textures\n\n\n  publicAPI.traverseTranslucentPass = function (renderPass) {\n    if (!model.renderable || !model.renderable.getVisibility() || model.renderable.getIsOpaque() || model.openGLRenderer.getSelector() && !model.renderable.getPickable()) {\n      return;\n    }\n\n    publicAPI.apply(renderPass, true);\n    model.oglmapper.traverse(renderPass);\n    publicAPI.apply(renderPass, false);\n  };\n\n  publicAPI.activateTextures = function () {\n    // always traverse textures first, then mapper\n    if (!model.ogltextures) {\n      return;\n    }\n\n    model.activeTextures = [];\n\n    for (var index = 0; index < model.ogltextures.length; index++) {\n      var child = model.ogltextures[index];\n      child.render();\n\n      if (child.getHandle()) {\n        model.activeTextures.push(child);\n      }\n    }\n  };\n\n  publicAPI.queryPass = function (prepass, renderPass) {\n    if (prepass) {\n      if (!model.renderable || !model.renderable.getVisibility()) {\n        return;\n      }\n\n      if (model.renderable.getIsOpaque()) {\n        renderPass.incrementOpaqueActorCount();\n      } else {\n        renderPass.incrementTranslucentActorCount();\n      }\n    }\n  };\n\n  publicAPI.opaqueZBufferPass = function (prepass, renderPass) {\n    return publicAPI.opaquePass(prepass, renderPass);\n  };\n\n  publicAPI.opaquePass = function (prepass, renderPass) {\n    if (prepass) {\n      model.openGLRenderWindow.enableDepthMask();\n      publicAPI.activateTextures();\n    } else if (model.activeTextures) {\n      for (var index = 0; index < model.activeTextures.length; index++) {\n        model.activeTextures[index].deactivate();\n      }\n    }\n  }; // Renders myself\n\n\n  publicAPI.translucentPass = function (prepass, renderPass) {\n    if (prepass) {\n      model.openGLRenderWindow.disableDepthMask();\n      publicAPI.activateTextures();\n    } else if (model.activeTextures) {\n      for (var index = 0; index < model.activeTextures.length; index++) {\n        model.activeTextures[index].deactivate();\n      }\n    }\n  };\n\n  publicAPI.getKeyMatrices = function () {\n    // has the actor changed?\n    if (model.renderable.getMTime() > model.keyMatrixTime.getMTime()) {\n      model.renderable.computeMatrix();\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.c)(model.keyMatrices.mcwc, model.renderable.getMatrix());\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.j)(model.keyMatrices.mcwc, model.keyMatrices.mcwc);\n\n      if (model.renderable.getIsIdentity()) {\n        (0,_vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_3__.i)(model.keyMatrices.normalMatrix);\n      } else {\n        (0,_vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_3__.f)(model.keyMatrices.normalMatrix, model.keyMatrices.mcwc);\n        (0,_vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_3__.a)(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);\n        (0,_vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_3__.t)(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);\n      }\n\n      model.keyMatrixTime.modified();\n    }\n\n    return model.keyMatrices;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  context: null,\n  keyMatrixTime: null,\n  keyMatrices: null,\n  activeTextures: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues);\n  model.keyMatrixTime = {};\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.obj)(model.keyMatrixTime, {\n    mtime: 0\n  });\n  model.keyMatrices = {\n    normalMatrix: (0,_vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_3__.i)(new Float64Array(9)),\n    mcwc: (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_4__.a)(new Float64Array(16))\n  }; // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['context']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.get)(publicAPI, model, ['activeTextures']); // Object methods\n\n  vtkOpenGLActor(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend); // ----------------------------------------------------------------------------\n\nvar vtkActor = {\n  newInstance: newInstance,\n  extend: extend\n}; // Register ourself to OpenGL backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__.registerOverride)('vtkActor', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkActor);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/Actor.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/Actor2D.js":
/*!******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/Actor2D.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ViewNodeFactory.js\");\n\n\n\n\n// vtkOpenGLActor methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLActor2D(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLActor2D'); // Builds myself.\n\n  publicAPI.buildPass = function (prepass) {\n    if (prepass) {\n      if (!model.renderable) {\n        return;\n      }\n\n      model.openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');\n      publicAPI.prepareNodes();\n      publicAPI.addMissingNodes(model.renderable.getTextures());\n      publicAPI.addMissingNode(model.renderable.getMapper());\n      publicAPI.removeUnusedNodes();\n    }\n  }; // we draw textures, then mapper, then post pass textures\n\n\n  publicAPI.traverseOpaquePass = function (renderPass) {\n    if (!model.renderable || !model.renderable.getVisibility() || !model.renderable.getIsOpaque() || model.openGLRenderer.getSelector() && !model.renderable.getPickable()) {\n      return;\n    }\n\n    publicAPI.apply(renderPass, true);\n    model.children.forEach(function (child) {\n      if (!child.isA('vtkOpenGLTexture')) {\n        child.traverse(renderPass);\n      }\n    });\n    publicAPI.apply(renderPass, false);\n  }; // we draw textures, then mapper, then post pass textures\n\n\n  publicAPI.traverseTranslucentPass = function (renderPass) {\n    if (!model.renderable || !model.renderable.getVisibility() || model.renderable.getIsOpaque() || model.openGLRenderer.getSelector() && !model.renderable.getPickable()) {\n      return;\n    }\n\n    publicAPI.apply(renderPass, true);\n    model.children.forEach(function (child) {\n      if (!child.isA('vtkOpenGLTexture')) {\n        child.traverse(renderPass);\n      }\n    });\n    publicAPI.apply(renderPass, false);\n  };\n\n  publicAPI.activateTextures = function () {\n    // always traverse textures first, then mapper\n    model.activeTextures = [];\n    model.children.forEach(function (child) {\n      if (child.isA('vtkOpenGLTexture')) {\n        child.render();\n\n        if (child.getHandle()) {\n          model.activeTextures.push(child);\n        }\n      }\n    });\n  }; // Renders myself\n\n\n  publicAPI.opaquePass = function (prepass, renderPass) {\n    if (prepass) {\n      model.context = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderWindow').getContext();\n      model.context.depthMask(true);\n      publicAPI.activateTextures();\n    } else {\n      // deactivate textures\n      model.activeTextures.forEach(function (child) {\n        child.deactivate();\n      });\n    }\n  }; // Renders myself\n\n\n  publicAPI.translucentPass = function (prepass, renderPass) {\n    if (prepass) {\n      model.context = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderWindow').getContext();\n      model.context.depthMask(false);\n      publicAPI.activateTextures();\n    } else {\n      // deactivate textures\n      model.activeTextures.forEach(function (child) {\n        child.deactivate();\n      });\n      model.context.depthMask(true);\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  context: null,\n  activeTextures: []\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues); // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['context']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.get)(publicAPI, model, ['activeTextures']); // Object methods\n\n  vtkOpenGLActor2D(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend); // ----------------------------------------------------------------------------\n\nvar vtkActor2D = {\n  newInstance: newInstance,\n  extend: extend\n}; // Register ourself to OpenGL backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__.registerOverride)('vtkActor2D', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkActor2D);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/Actor2D.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/BufferObject.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/BufferObject.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"STATIC\": () => (/* binding */ STATIC),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _BufferObject_Constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BufferObject/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/BufferObject/Constants.js\");\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar ObjectType = _BufferObject_Constants_js__WEBPACK_IMPORTED_MODULE_2__.default.ObjectType; // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n// ----------------------------------------------------------------------------\n// Static API\n// ----------------------------------------------------------------------------\n\nvar STATIC = {}; // ----------------------------------------------------------------------------\n// vtkOpenGLBufferObject methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLBufferObject(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLBufferObject'); // Class-specific private functions\n\n  function convertType(type) {\n    switch (type) {\n      case ObjectType.ELEMENT_ARRAY_BUFFER:\n        return model.context.ELEMENT_ARRAY_BUFFER;\n\n      case ObjectType.TEXTURE_BUFFER:\n        if ('TEXTURE_BUFFER' in model.context) {\n          return model.context.TEXTURE_BUFFER;\n        }\n\n      /* eslint-disable no-fallthrough */\n      // Intentional fallthrough in case there is no TEXTURE_BUFFER in WebGL\n\n      default:\n      /* eslint-enable no-fallthrough */\n\n      case ObjectType.ARRAY_BUFFER:\n        return model.context.ARRAY_BUFFER;\n    }\n  }\n\n  var internalType = null;\n  var internalHandle = null;\n  var dirty = true;\n  var error = ''; // Public API methods\n\n  publicAPI.getType = function () {\n    return internalType;\n  };\n\n  publicAPI.setType = function (value) {\n    internalType = value;\n  };\n\n  publicAPI.getHandle = function () {\n    return internalHandle;\n  };\n\n  publicAPI.isReady = function () {\n    return dirty === false;\n  };\n\n  publicAPI.generateBuffer = function (type) {\n    var objectTypeGL = convertType(type);\n\n    if (internalHandle === null) {\n      internalHandle = model.context.createBuffer();\n      internalType = type;\n    }\n\n    return convertType(internalType) === objectTypeGL;\n  };\n\n  publicAPI.upload = function (data, type) {\n    // buffer, size, type\n    var alreadyGenerated = publicAPI.generateBuffer(type);\n\n    if (!alreadyGenerated) {\n      error = 'Trying to upload array buffer to incompatible buffer.';\n      return false;\n    }\n\n    model.context.bindBuffer(convertType(internalType), internalHandle);\n    model.context.bufferData(convertType(internalType), data, model.context.STATIC_DRAW);\n    dirty = false;\n    return true;\n  };\n\n  publicAPI.bind = function () {\n    if (!internalHandle) {\n      return false;\n    }\n\n    model.context.bindBuffer(convertType(internalType), internalHandle);\n    return true;\n  };\n\n  publicAPI.release = function () {\n    if (!internalHandle) {\n      return false;\n    }\n\n    model.context.bindBuffer(convertType(internalType), null);\n    return true;\n  };\n\n  publicAPI.releaseGraphicsResources = function () {\n    if (internalHandle !== null) {\n      model.context.bindBuffer(convertType(internalType), null);\n      model.context.deleteBuffer(internalHandle);\n      internalHandle = null;\n    }\n  };\n\n  publicAPI.setOpenGLRenderWindow = function (rw) {\n    if (model.openGLRenderWindow === rw) {\n      return;\n    }\n\n    publicAPI.releaseGraphicsResources();\n    model.openGLRenderWindow = rw;\n    model.context = null;\n\n    if (rw) {\n      model.context = model.openGLRenderWindow.getContext();\n    }\n  };\n\n  publicAPI.getError = function () {\n    return error;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  objectType: ObjectType.ARRAY_BUFFER,\n  openGLRenderWindow: null,\n  context: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['openGLRenderWindow']);\n  vtkOpenGLBufferObject(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend); // ----------------------------------------------------------------------------\n\nvar vtkBufferObject = _objectSpread(_objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, STATIC), _BufferObject_Constants_js__WEBPACK_IMPORTED_MODULE_2__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkBufferObject);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/BufferObject.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/BufferObject/Constants.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/BufferObject/Constants.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"ObjectType\": () => (/* binding */ ObjectType)\n/* harmony export */ });\nvar ObjectType = {\n  ARRAY_BUFFER: 0,\n  ELEMENT_ARRAY_BUFFER: 1,\n  TEXTURE_BUFFER: 2\n};\nvar Constants = {\n  ObjectType: ObjectType\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/BufferObject/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/Camera.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/Camera.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ViewNodeFactory.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat3.js\");\n\n\n\n\n\n\n// vtkOpenGLCamera methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLCamera(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLCamera');\n\n  publicAPI.buildPass = function (prepass) {\n    if (prepass) {\n      model.openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');\n      model.openGLRenderWindow = model.openGLRenderer.getParent();\n      model.context = model.openGLRenderWindow.getContext();\n    }\n  }; // Renders myself\n\n\n  publicAPI.opaquePass = function (prepass) {\n    if (prepass) {\n      var tsize = model.openGLRenderer.getTiledSizeAndOrigin();\n      model.context.viewport(tsize.lowerLeftU, tsize.lowerLeftV, tsize.usize, tsize.vsize);\n      model.context.scissor(tsize.lowerLeftU, tsize.lowerLeftV, tsize.usize, tsize.vsize);\n    }\n  };\n\n  publicAPI.translucentPass = publicAPI.opaquePass;\n  publicAPI.opaqueZBufferPass = publicAPI.opaquePass;\n  publicAPI.volumePass = publicAPI.opaquePass;\n\n  publicAPI.getKeyMatrices = function (ren) {\n    // has the camera changed?\n    if (ren !== model.lastRenderer || model.openGLRenderWindow.getMTime() > model.keyMatrixTime.getMTime() || publicAPI.getMTime() > model.keyMatrixTime.getMTime() || ren.getMTime() > model.keyMatrixTime.getMTime() || model.renderable.getMTime() > model.keyMatrixTime.getMTime()) {\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.c)(model.keyMatrices.wcvc, model.renderable.getViewMatrix());\n      (0,_vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_4__.f)(model.keyMatrices.normalMatrix, model.keyMatrices.wcvc);\n      (0,_vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_4__.a)(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.j)(model.keyMatrices.wcvc, model.keyMatrices.wcvc);\n      var aspectRatio = model.openGLRenderer.getAspectRatio();\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.c)(model.keyMatrices.vcpc, model.renderable.getProjectionMatrix(aspectRatio, -1, 1));\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.j)(model.keyMatrices.vcpc, model.keyMatrices.vcpc);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.m)(model.keyMatrices.wcpc, model.keyMatrices.vcpc, model.keyMatrices.wcvc);\n      model.keyMatrixTime.modified();\n      model.lastRenderer = ren;\n    }\n\n    return model.keyMatrices;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  context: null,\n  lastRenderer: null,\n  keyMatrixTime: null,\n  keyMatrices: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues);\n  model.keyMatrixTime = {};\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.obj)(model.keyMatrixTime); // values always get set by the get method\n\n  model.keyMatrices = {\n    normalMatrix: new Float64Array(9),\n    vcpc: new Float64Array(16),\n    wcvc: new Float64Array(16),\n    wcpc: new Float64Array(16)\n  }; // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['context', 'keyMatrixTime']); // Object methods\n\n  vtkOpenGLCamera(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend); // ----------------------------------------------------------------------------\n\nvar vtkCamera = {\n  newInstance: newInstance,\n  extend: extend\n}; // Register ourself to OpenGL backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__.registerOverride)('vtkCamera', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkCamera);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/Camera.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/CellArrayBufferObject.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/CellArrayBufferObject.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _BufferObject_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BufferObject.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/BufferObject.js\");\n/* harmony import */ var _BufferObject_Constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BufferObject/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/BufferObject/Constants.js\");\n/* harmony import */ var _Core_Property_Constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Core/Property/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Property/Constants.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/vec3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/quat.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/quat.js\");\n\n\n\n\n\n\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.vtkErrorMacro; // ----------------------------------------------------------------------------\n// Static functions\n// ----------------------------------------------------------------------------\n\nfunction computeInverseShiftAndScaleMatrix(coordShift, coordScale) {\n  var inverseScale = new Float64Array(3);\n  (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_4__.m)(inverseScale, coordScale);\n  var matrix = new Float64Array(16);\n  (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_5__.p)(matrix, (0,_vendor_gl_matrix_esm_quat_js__WEBPACK_IMPORTED_MODULE_6__.c)(), coordShift, inverseScale);\n  return matrix;\n}\n\nfunction shouldApplyCoordShiftAndScale(coordShift, coordScale) {\n  if (coordShift === null || coordScale === null) {\n    return false;\n  }\n\n  return !((0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_4__.e)(coordShift, [0, 0, 0]) && (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_4__.e)(coordScale, [1, 1, 1]));\n} // ----------------------------------------------------------------------------\n// vtkOpenGLCellArrayBufferObject methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkOpenGLCellArrayBufferObject(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLCellArrayBufferObject');\n  publicAPI.setType(_BufferObject_Constants_js__WEBPACK_IMPORTED_MODULE_2__.ObjectType.ARRAY_BUFFER);\n\n  publicAPI.createVBO = function (cellArray, inRep, outRep, options) {\n    if (!cellArray.getData() || !cellArray.getData().length) {\n      model.elementCount = 0;\n      return 0;\n    } // Figure out how big each block will be, currently 6 or 7 floats.\n\n\n    model.blockSize = 3;\n    model.vertexOffset = 0;\n    model.normalOffset = 0;\n    model.tCoordOffset = 0;\n    model.tCoordComponents = 0;\n    model.colorComponents = 0;\n    model.colorOffset = 0;\n    model.customData = [];\n    var pointData = options.points.getData();\n    var normalData = null;\n    var tcoordData = null;\n    var colorData = null;\n    var colorComponents = options.colors ? options.colors.getNumberOfComponents() : 0;\n    var textureComponents = options.tcoords ? options.tcoords.getNumberOfComponents() : 0; // the values of 4 below are because floats are 4 bytes\n\n    if (options.normals) {\n      model.normalOffset = 4 * model.blockSize;\n      model.blockSize += 3;\n      normalData = options.normals.getData();\n    }\n\n    if (options.customAttributes) {\n      options.customAttributes.forEach(function (a) {\n        if (a) {\n          model.customData.push({\n            data: a.getData(),\n            offset: 4 * model.blockSize,\n            components: a.getNumberOfComponents(),\n            name: a.getName()\n          });\n          model.blockSize += a.getNumberOfComponents();\n        }\n      });\n    }\n\n    if (options.tcoords) {\n      model.tCoordOffset = 4 * model.blockSize;\n      model.tCoordComponents = textureComponents;\n      model.blockSize += textureComponents;\n      tcoordData = options.tcoords.getData();\n    }\n\n    if (options.colors) {\n      model.colorComponents = options.colors.getNumberOfComponents();\n      model.colorOffset = 0;\n      colorData = options.colors.getData();\n\n      if (!model.colorBO) {\n        model.colorBO = _BufferObject_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n      }\n\n      model.colorBO.setOpenGLRenderWindow(model.openGLRenderWindow);\n    } else {\n      model.colorBO = null;\n    }\n\n    model.stride = 4 * model.blockSize;\n    var pointIdx = 0;\n    var normalIdx = 0;\n    var tcoordIdx = 0;\n    var colorIdx = 0;\n    var custIdx = 0;\n    var cellCount = 0;\n    var addAPoint;\n    var cellBuilders = {\n      // easy, every input point becomes an output point\n      anythingToPoints: function anythingToPoints(numPoints, cellPts, offset) {\n        for (var i = 0; i < numPoints; ++i) {\n          addAPoint(cellPts[offset + i]);\n        }\n      },\n      linesToWireframe: function linesToWireframe(numPoints, cellPts, offset) {\n        // for lines we add a bunch of segments\n        for (var i = 0; i < numPoints - 1; ++i) {\n          addAPoint(cellPts[offset + i]);\n          addAPoint(cellPts[offset + i + 1]);\n        }\n      },\n      polysToWireframe: function polysToWireframe(numPoints, cellPts, offset) {\n        // for polys we add a bunch of segments and close it\n        if (numPoints > 2) {\n          for (var i = 0; i < numPoints; ++i) {\n            addAPoint(cellPts[offset + i]);\n            addAPoint(cellPts[offset + (i + 1) % numPoints]);\n          }\n        }\n      },\n      stripsToWireframe: function stripsToWireframe(numPoints, cellPts, offset) {\n        if (numPoints > 2) {\n          // for strips we add a bunch of segments and close it\n          for (var i = 0; i < numPoints - 1; ++i) {\n            addAPoint(cellPts[offset + i]);\n            addAPoint(cellPts[offset + i + 1]);\n          }\n\n          for (var _i = 0; _i < numPoints - 2; _i++) {\n            addAPoint(cellPts[offset + _i]);\n            addAPoint(cellPts[offset + _i + 2]);\n          }\n        }\n      },\n      polysToSurface: function polysToSurface(npts, cellPts, offset) {\n        for (var i = 0; i < npts - 2; i++) {\n          addAPoint(cellPts[offset + 0]);\n          addAPoint(cellPts[offset + i + 1]);\n          addAPoint(cellPts[offset + i + 2]);\n        }\n      },\n      stripsToSurface: function stripsToSurface(npts, cellPts, offset) {\n        for (var i = 0; i < npts - 2; i++) {\n          addAPoint(cellPts[offset + i]);\n          addAPoint(cellPts[offset + i + 1 + i % 2]);\n          addAPoint(cellPts[offset + i + 1 + (i + 1) % 2]);\n        }\n      }\n    };\n    var cellCounters = {\n      // easy, every input point becomes an output point\n      anythingToPoints: function anythingToPoints(numPoints, cellPts) {\n        return numPoints;\n      },\n      linesToWireframe: function linesToWireframe(numPoints, cellPts) {\n        if (numPoints > 1) {\n          return (numPoints - 1) * 2;\n        }\n\n        return 0;\n      },\n      polysToWireframe: function polysToWireframe(numPoints, cellPts) {\n        if (numPoints > 2) {\n          return numPoints * 2;\n        }\n\n        return 0;\n      },\n      stripsToWireframe: function stripsToWireframe(numPoints, cellPts) {\n        if (numPoints > 2) {\n          return numPoints * 4 - 6;\n        }\n\n        return 0;\n      },\n      polysToSurface: function polysToSurface(npts, cellPts) {\n        if (npts > 2) {\n          return (npts - 2) * 3;\n        }\n\n        return 0;\n      },\n      stripsToSurface: function stripsToSurface(npts, cellPts, offset) {\n        if (npts > 2) {\n          return (npts - 2) * 3;\n        }\n\n        return 0;\n      }\n    };\n    var func = null;\n    var countFunc = null;\n\n    if (outRep === _Core_Property_Constants_js__WEBPACK_IMPORTED_MODULE_3__.Representation.POINTS || inRep === 'verts') {\n      func = cellBuilders.anythingToPoints;\n      countFunc = cellCounters.anythingToPoints;\n    } else if (outRep === _Core_Property_Constants_js__WEBPACK_IMPORTED_MODULE_3__.Representation.WIREFRAME || inRep === 'lines') {\n      func = cellBuilders[\"\".concat(inRep, \"ToWireframe\")];\n      countFunc = cellCounters[\"\".concat(inRep, \"ToWireframe\")];\n    } else {\n      func = cellBuilders[\"\".concat(inRep, \"ToSurface\")];\n      countFunc = cellCounters[\"\".concat(inRep, \"ToSurface\")];\n    }\n\n    var array = cellArray.getData();\n    var size = array.length;\n    var caboCount = 0;\n\n    for (var index = 0; index < size;) {\n      caboCount += countFunc(array[index], array);\n      index += array[index] + 1;\n    }\n\n    var packedUCVBO = null;\n    var packedVBO = new Float32Array(caboCount * model.blockSize);\n\n    if (colorData) {\n      packedUCVBO = new Uint8Array(caboCount * 4);\n    }\n\n    var vboidx = 0;\n    var ucidx = 0; // Find out if shift scale should be used\n    // Compute squares of diagonal size and distance from the origin\n\n    var diagSq = 0.0;\n    var distSq = 0.0;\n\n    for (var i = 0; i < 3; ++i) {\n      var range = options.points.getRange(i);\n      var delta = range[1] - range[0];\n      diagSq += delta * delta;\n      var distShift = 0.5 * (range[1] + range[0]);\n      distSq += distShift * distShift;\n    }\n\n    var useShiftAndScale = diagSq > 0 && (Math.abs(distSq) / diagSq > 1.0e6 || // If data is far from the origin relative to its size\n    Math.abs(Math.log10(diagSq)) > 3.0 || // If the size is huge when not far from the origin\n    diagSq === 0 && distSq > 1.0e6); // If data is a point, but far from the origin\n\n    if (useShiftAndScale) {\n      // Compute shift and scale vectors\n      var coordShift = new Float64Array(3);\n      var coordScale = new Float64Array(3);\n\n      for (var _i2 = 0; _i2 < 3; ++_i2) {\n        var _range = options.points.getRange(_i2);\n\n        var _delta = _range[1] - _range[0];\n\n        coordShift[_i2] = 0.5 * (_range[1] + _range[0]);\n        coordScale[_i2] = _delta > 0 ? 1.0 / _delta : 1.0;\n      }\n\n      publicAPI.setCoordShiftAndScale(coordShift, coordScale);\n    } else if (model.coordShiftAndScaleEnabled === true) {\n      // Make sure to reset\n      publicAPI.setCoordShiftAndScale(null, null);\n    }\n\n    addAPoint = function addAPointFunc(i) {\n      // Vertices\n      pointIdx = i * 3;\n\n      if (!model.coordShiftAndScaleEnabled) {\n        packedVBO[vboidx++] = pointData[pointIdx++];\n        packedVBO[vboidx++] = pointData[pointIdx++];\n        packedVBO[vboidx++] = pointData[pointIdx++];\n      } else {\n        // Apply shift and scale\n        packedVBO[vboidx++] = (pointData[pointIdx++] - model.coordShift[0]) * model.coordScale[0];\n        packedVBO[vboidx++] = (pointData[pointIdx++] - model.coordShift[1]) * model.coordScale[1];\n        packedVBO[vboidx++] = (pointData[pointIdx++] - model.coordShift[2]) * model.coordScale[2];\n      }\n\n      if (normalData !== null) {\n        if (options.haveCellNormals) {\n          normalIdx = (cellCount + options.cellOffset) * 3;\n        } else {\n          normalIdx = i * 3;\n        }\n\n        packedVBO[vboidx++] = normalData[normalIdx++];\n        packedVBO[vboidx++] = normalData[normalIdx++];\n        packedVBO[vboidx++] = normalData[normalIdx++];\n      }\n\n      model.customData.forEach(function (attr) {\n        custIdx = i * attr.components;\n\n        for (var j = 0; j < attr.components; ++j) {\n          packedVBO[vboidx++] = attr.data[custIdx++];\n        }\n      });\n\n      if (tcoordData !== null) {\n        tcoordIdx = i * textureComponents;\n\n        for (var j = 0; j < textureComponents; ++j) {\n          packedVBO[vboidx++] = tcoordData[tcoordIdx++];\n        }\n      }\n\n      if (colorData !== null) {\n        if (options.haveCellScalars) {\n          colorIdx = (cellCount + options.cellOffset) * colorComponents;\n        } else {\n          colorIdx = i * colorComponents;\n        }\n\n        packedUCVBO[ucidx++] = colorData[colorIdx++];\n        packedUCVBO[ucidx++] = colorData[colorIdx++];\n        packedUCVBO[ucidx++] = colorData[colorIdx++];\n        packedUCVBO[ucidx++] = colorComponents === 4 ? colorData[colorIdx++] : 255;\n      }\n    };\n\n    for (var _index = 0; _index < size;) {\n      func(array[_index], array, _index + 1);\n      _index += array[_index] + 1;\n      cellCount++;\n    }\n\n    model.elementCount = caboCount;\n    publicAPI.upload(packedVBO, _BufferObject_Constants_js__WEBPACK_IMPORTED_MODULE_2__.ObjectType.ARRAY_BUFFER);\n\n    if (model.colorBO) {\n      model.colorBOStride = 4;\n      model.colorBO.upload(packedUCVBO, _BufferObject_Constants_js__WEBPACK_IMPORTED_MODULE_2__.ObjectType.ARRAY_BUFFER);\n    }\n\n    return cellCount;\n  };\n\n  publicAPI.setCoordShiftAndScale = function (coordShift, coordScale) {\n    if (coordShift !== null && (coordShift.constructor !== Float64Array || coordShift.length !== 3)) {\n      vtkErrorMacro('Wrong type for coordShift, expected vec3 or null');\n      return;\n    }\n\n    if (coordScale !== null && (coordScale.constructor !== Float64Array || coordScale.length !== 3)) {\n      vtkErrorMacro('Wrong type for coordScale, expected vec3 or null');\n      return;\n    }\n\n    if (model.coordShift === null || coordShift === null || !(0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_4__.k)(coordShift, model.coordShift)) {\n      model.coordShift = coordShift;\n    }\n\n    if (model.coordScale === null || coordScale === null || !(0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_4__.k)(coordScale, model.coordScale)) {\n      model.coordScale = coordScale;\n    }\n\n    model.coordShiftAndScaleEnabled = shouldApplyCoordShiftAndScale(model.coordShift, model.coordScale);\n\n    if (model.coordShiftAndScaleEnabled) {\n      model.inverseShiftAndScaleMatrix = computeInverseShiftAndScaleMatrix(model.coordShift, model.coordScale);\n    } else {\n      model.inverseShiftAndScaleMatrix = null;\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  elementCount: 0,\n  stride: 0,\n  colorBOStride: 0,\n  vertexOffset: 0,\n  normalOffset: 0,\n  tCoordOffset: 0,\n  tCoordComponents: 0,\n  colorOffset: 0,\n  colorComponents: 0,\n  tcoordBO: null,\n  customData: [],\n  coordShift: null,\n  coordScale: null,\n  coordShiftAndScaleEnabled: false,\n  inverseShiftAndScaleMatrix: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _BufferObject_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['colorBO', 'elementCount', 'stride', 'colorBOStride', 'vertexOffset', 'normalOffset', 'tCoordOffset', 'tCoordComponents', 'colorOffset', 'colorComponents', 'customData']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['coordShift', 'coordScale', 'coordShiftAndScaleEnabled', 'inverseShiftAndScaleMatrix']); // Object specific methods\n\n  vtkOpenGLCellArrayBufferObject(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend); // ----------------------------------------------------------------------------\n\nvar vtkCellArrayBufferObject = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkCellArrayBufferObject);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/CellArrayBufferObject.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/ForwardPass.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/ForwardPass.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Framebuffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Framebuffer.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Framebuffer.js\");\n/* harmony import */ var _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SceneGraph/RenderPass.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderPass.js\");\n\n\n\n\nfunction vtkForwardPass(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkForwardPass'); // this pass implements a forward rendering pipeline\n  // if both volumes and opaque geometry are present\n  // it will mix the two together by capturing a zbuffer\n  // first\n\n  publicAPI.traverse = function (viewNode) {\n    var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n    if (model.deleted) {\n      return;\n    } // we just render our delegates in order\n\n\n    model.currentParent = parent; // build\n\n    publicAPI.setCurrentOperation('buildPass');\n    viewNode.traverse(publicAPI);\n    var numlayers = viewNode.getRenderable().getNumberOfLayers(); // iterate over renderers\n\n    var renderers = viewNode.getChildren();\n\n    for (var i = 0; i < numlayers; i++) {\n      for (var index = 0; index < renderers.length; index++) {\n        var renNode = renderers[index];\n        var ren = viewNode.getRenderable().getRenderers()[index];\n\n        if (ren.getDraw() && ren.getLayer() === i) {\n          // check for both opaque and volume actors\n          model.opaqueActorCount = 0;\n          model.translucentActorCount = 0;\n          model.volumeCount = 0;\n          publicAPI.setCurrentOperation('queryPass');\n          renNode.traverse(publicAPI); // do we need to capture a zbuffer?\n\n          if (model.opaqueActorCount > 0 && model.volumeCount > 0 || model.depthRequested) {\n            var size = viewNode.getFramebufferSize(); // make sure the framebuffer is setup\n\n            if (model.framebuffer === null) {\n              model.framebuffer = _Framebuffer_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n            }\n\n            model.framebuffer.setOpenGLRenderWindow(viewNode);\n            model.framebuffer.saveCurrentBindingsAndBuffers();\n            var fbSize = model.framebuffer.getSize();\n\n            if (fbSize === null || fbSize[0] !== size[0] || fbSize[1] !== size[1]) {\n              model.framebuffer.create(size[0], size[1]);\n              model.framebuffer.populateFramebuffer();\n            }\n\n            model.framebuffer.bind();\n            publicAPI.setCurrentOperation('opaqueZBufferPass');\n            renNode.traverse(publicAPI);\n            model.framebuffer.restorePreviousBindingsAndBuffers(); // reset now that we have done it\n\n            model.depthRequested = false;\n          }\n\n          publicAPI.setCurrentOperation('cameraPass');\n          renNode.traverse(publicAPI);\n\n          if (model.opaqueActorCount > 0) {\n            publicAPI.setCurrentOperation('opaquePass');\n            renNode.traverse(publicAPI);\n          }\n\n          if (model.translucentActorCount > 0) {\n            publicAPI.setCurrentOperation('translucentPass');\n            renNode.traverse(publicAPI);\n          }\n\n          if (model.volumeCount > 0) {\n            publicAPI.setCurrentOperation('volumePass');\n            renNode.traverse(publicAPI);\n          }\n        }\n      }\n    }\n  };\n\n  publicAPI.getZBufferTexture = function () {\n    if (model.framebuffer) {\n      return model.framebuffer.getColorTexture();\n    }\n\n    return null;\n  };\n\n  publicAPI.requestDepth = function () {\n    model.depthRequested = true;\n  };\n\n  publicAPI.incrementOpaqueActorCount = function () {\n    return model.opaqueActorCount++;\n  };\n\n  publicAPI.incrementTranslucentActorCount = function () {\n    return model.translucentActorCount++;\n  };\n\n  publicAPI.incrementVolumeCount = function () {\n    return model.volumeCount++;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  opaqueActorCount: 0,\n  translucentActorCount: 0,\n  volumeCount: 0,\n  framebuffer: null,\n  depthRequested: false\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_2__.default.extend(publicAPI, model, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['framebuffer']); // Object methods\n\n  vtkForwardPass(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkForwardPass'); // ----------------------------------------------------------------------------\n\nvar vtkForwardPass$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkForwardPass$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/ForwardPass.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/Framebuffer.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/Framebuffer.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Texture_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Texture.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Texture.js\");\n/* harmony import */ var _Common_Core_DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Core/DataArray/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray/Constants.js\");\n/* harmony import */ var _Texture_Constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Texture/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Texture/Constants.js\");\n\n\n\n\n\n// vtkFramebuffer methods\n// ----------------------------------------------------------------------------\n\nfunction vtkFramebuffer(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkFramebuffer');\n\n  publicAPI.getBothMode = function () {\n    return model.context.FRAMEBUFFER;\n  }; // publicAPI.getDrawMode = () => model.context.DRAW_FRAMEBUFFER;\n  // publicAPI.getReadMode = () => model.context.READ_FRAMEBUFFER;\n\n\n  publicAPI.saveCurrentBindingsAndBuffers = function (modeIn) {\n    var mode = typeof modeIn !== 'undefined' ? modeIn : publicAPI.getBothMode();\n    publicAPI.saveCurrentBindings(mode);\n    publicAPI.saveCurrentBuffers(mode);\n  };\n\n  publicAPI.saveCurrentBindings = function (modeIn) {\n    var gl = model.context;\n    model.previousDrawBinding = gl.getParameter(model.context.FRAMEBUFFER_BINDING);\n    model.previousActiveFramebuffer = model.openGLRenderWindow.getActiveFramebuffer();\n  };\n\n  publicAPI.saveCurrentBuffers = function (modeIn) {// noop on webgl 1\n  };\n\n  publicAPI.restorePreviousBindingsAndBuffers = function (modeIn) {\n    var mode = typeof modeIn !== 'undefined' ? modeIn : publicAPI.getBothMode();\n    publicAPI.restorePreviousBindings(mode);\n    publicAPI.restorePreviousBuffers(mode);\n  };\n\n  publicAPI.restorePreviousBindings = function (modeIn) {\n    var gl = model.context;\n    gl.bindFramebuffer(gl.FRAMEBUFFER, model.previousDrawBinding);\n    model.openGLRenderWindow.setActiveFramebuffer(model.previousActiveFramebuffer);\n  };\n\n  publicAPI.restorePreviousBuffers = function (modeIn) {// currently a noop on webgl1\n  };\n\n  publicAPI.bind = function () {\n    model.context.bindFramebuffer(model.context.FRAMEBUFFER, model.glFramebuffer);\n\n    if (model.colorTexture) {\n      model.colorTexture.bind();\n    }\n\n    model.openGLRenderWindow.setActiveFramebuffer(publicAPI);\n  };\n\n  publicAPI.create = function (width, height) {\n    model.glFramebuffer = model.context.createFramebuffer();\n    model.glFramebuffer.width = width;\n    model.glFramebuffer.height = height;\n  };\n\n  publicAPI.setColorBuffer = function (texture) {\n    var attachment = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n    var gl = model.context;\n    var glAttachment = gl.COLOR_ATTACHMENT0;\n\n    if (attachment > 0) {\n      if (model.openGLRenderWindow.getWebgl2()) {\n        glAttachment += attachment;\n      } else {\n        (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkErrorMacro)('Using multiple framebuffer attachments requires WebGL 2');\n        return;\n      }\n    }\n\n    model.colorTexture = texture;\n    gl.framebufferTexture2D(gl.FRAMEBUFFER, glAttachment, gl.TEXTURE_2D, texture.getHandle(), 0);\n  };\n\n  publicAPI.removeColorBuffer = function () {\n    var attachment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n    var gl = model.context;\n    var glAttachment = gl.COLOR_ATTACHMENT0;\n\n    if (attachment > 0) {\n      if (model.openGLRenderWindow.getWebgl2()) {\n        glAttachment += attachment;\n      } else {\n        (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkErrorMacro)('Using multiple framebuffer attachments requires WebGL 2');\n        return;\n      }\n    }\n\n    gl.framebufferTexture2D(gl.FRAMEBUFFER, glAttachment, gl.TEXTURE_2D, null, 0);\n  };\n\n  publicAPI.setDepthBuffer = function (texture) {\n    if (model.openGLRenderWindow.getWebgl2()) {\n      var gl = model.context;\n      gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_2D, texture.getHandle(), 0);\n    } else {\n      (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkErrorMacro)('Attaching depth buffer textures to fbo requires WebGL 2');\n    }\n  };\n\n  publicAPI.removeDepthBuffer = function () {\n    if (model.openGLRenderWindow.getWebgl2()) {\n      var gl = model.context;\n      gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_2D, null, 0);\n    } else {\n      (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkErrorMacro)('Attaching depth buffer textures to framebuffers requires WebGL 2');\n    }\n  };\n\n  publicAPI.getGLFramebuffer = function () {\n    return model.glFramebuffer;\n  };\n\n  publicAPI.setOpenGLRenderWindow = function (rw) {\n    if (model.openGLRenderWindow === rw) {\n      return;\n    }\n\n    publicAPI.releaseGraphicsResources();\n    model.openGLRenderWindow = rw;\n    model.context = null;\n\n    if (rw) {\n      model.context = model.openGLRenderWindow.getContext();\n    }\n  };\n\n  publicAPI.releaseGraphicsResources = function () {\n    if (model.glFramebuffer) {\n      model.context.deleteFramebuffer(model.glFramebuffer);\n    }\n\n    if (model.colorTexture) {\n      model.colorTexture.releaseGraphicsResources();\n    }\n  };\n\n  publicAPI.getSize = function () {\n    var size = [0, 0];\n\n    if (model.glFramebuffer !== null) {\n      size[0] = model.glFramebuffer.width;\n      size[1] = model.glFramebuffer.height;\n    }\n\n    return size;\n  };\n\n  publicAPI.populateFramebuffer = function () {\n    publicAPI.bind();\n    var gl = model.context;\n    var texture = _Texture_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n    texture.setOpenGLRenderWindow(model.openGLRenderWindow);\n    texture.setMinificationFilter(_Texture_Constants_js__WEBPACK_IMPORTED_MODULE_3__.Filter.LINEAR);\n    texture.setMagnificationFilter(_Texture_Constants_js__WEBPACK_IMPORTED_MODULE_3__.Filter.LINEAR);\n    texture.create2DFromRaw(model.glFramebuffer.width, model.glFramebuffer.height, 4, _Common_Core_DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_2__.VtkDataTypes.UNSIGNED_CHAR, null);\n    publicAPI.setColorBuffer(texture); // for now do not count on having a depth buffer texture\n    // as they are not standard webgl 1\n\n    model.depthTexture = gl.createRenderbuffer();\n    gl.bindRenderbuffer(gl.RENDERBUFFER, model.depthTexture);\n    gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, model.glFramebuffer.width, model.glFramebuffer.height);\n    gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, model.depthTexture);\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  openGLRenderWindow: null,\n  glFramebuffer: null,\n  colorTexture: null,\n  depthTexture: null,\n  previousDrawBinding: 0,\n  previousReadBinding: 0,\n  previousDrawBuffer: 0,\n  previousReadBuffer: 0,\n  previousActiveFramebuffer: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.obj)(publicAPI, model);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['colorTexture']); // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkFramebuffer(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend, 'vtkFramebuffer'); // ----------------------------------------------------------------------------\n\nvar vtkOpenGLFramebuffer = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkOpenGLFramebuffer);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/Framebuffer.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/HardwareSelector.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/HardwareSelector.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _HardwareSelector_Constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HardwareSelector/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/HardwareSelector/Constants.js\");\n/* harmony import */ var _Core_HardwareSelector_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Core/HardwareSelector.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/HardwareSelector.js\");\n/* harmony import */ var _Framebuffer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Framebuffer.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Framebuffer.js\");\n/* harmony import */ var _Common_DataModel_SelectionNode_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Common/DataModel/SelectionNode.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/SelectionNode.js\");\n/* harmony import */ var _Common_DataModel_DataSet_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Common/DataModel/DataSet.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/DataSet.js\");\n\n\n\n\n\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar PassTypes = _HardwareSelector_Constants_js__WEBPACK_IMPORTED_MODULE_5__.default.PassTypes;\nvar SelectionContent = _Common_DataModel_SelectionNode_js__WEBPACK_IMPORTED_MODULE_8__.default.SelectionContent,\n    SelectionField = _Common_DataModel_SelectionNode_js__WEBPACK_IMPORTED_MODULE_8__.default.SelectionField;\nvar FieldAssociations = _Common_DataModel_DataSet_js__WEBPACK_IMPORTED_MODULE_9__.default.FieldAssociations;\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_4__.default.vtkErrorMacro;\nvar idOffset = 1;\n\nfunction getInfoHash(info) {\n  return \"\".concat(info.propID, \" \").concat(info.compositeID);\n}\n\nfunction convert(xx, yy, pb, area) {\n  if (!pb) {\n    return 0;\n  }\n\n  var offset = (yy * (area[2] - area[0] + 1) + xx) * 4;\n  var rgb = [];\n  rgb[0] = pb[offset];\n  rgb[1] = pb[offset + 1];\n  rgb[2] = pb[offset + 2];\n  var val = rgb[2];\n  val *= 256;\n  val += rgb[1];\n  val *= 256;\n  val += rgb[0];\n  return val;\n}\n\nfunction getPixelInformationWithData(buffdata, inDisplayPosition, maxDistance, outSelectedPosition) {\n  // Base case\n  var maxDist = maxDistance < 0 ? 0 : maxDistance;\n\n  if (maxDist === 0) {\n    outSelectedPosition[0] = inDisplayPosition[0];\n    outSelectedPosition[1] = inDisplayPosition[1];\n\n    if (inDisplayPosition[0] < buffdata.area[0] || inDisplayPosition[0] > buffdata.area[2] || inDisplayPosition[1] < buffdata.area[1] || inDisplayPosition[1] > buffdata.area[3]) {\n      return null;\n    } // offset inDisplayPosition based on the lower-left-corner of the Area.\n\n\n    var displayPosition = [inDisplayPosition[0] - buffdata.area[0], inDisplayPosition[1] - buffdata.area[1]];\n    var actorid = convert(displayPosition[0], displayPosition[1], buffdata.pixBuffer[PassTypes.ACTOR_PASS], buffdata.area);\n\n    if (actorid <= 0) {\n      // the pixel did not hit any actor.\n      return null;\n    }\n\n    var _info = {};\n    _info.valid = true;\n    _info.propID = actorid - idOffset;\n    _info.prop = buffdata.props[_info.propID];\n    var compositeID = convert(displayPosition[0], displayPosition[1], buffdata.pixBuffer[PassTypes.COMPOSITE_INDEX_PASS], buffdata.area);\n\n    if (compositeID < 0 || compositeID > 0xffffff) {\n      compositeID = 0;\n    }\n\n    _info.compositeID = compositeID - idOffset;\n\n    if (buffdata.captureZValues) {\n      var offset = (displayPosition[1] * (buffdata.area[2] - buffdata.area[0] + 1) + displayPosition[0]) * 4;\n      _info.zValue = (256 * buffdata.zBuffer[offset] + buffdata.zBuffer[offset + 1]) / 65535.0;\n      _info.displayPosition = inDisplayPosition;\n    }\n\n    return _info;\n  } // Iterate over successively growing boxes.\n  // They recursively call the base case to handle single pixels.\n\n\n  var dispPos = [inDisplayPosition[0], inDisplayPosition[1]];\n  var curPos = [0, 0];\n  var info = getPixelInformationWithData(buffdata, inDisplayPosition, 0, outSelectedPosition);\n\n  if (info && info.valid) {\n    return info;\n  }\n\n  for (var dist = 1; dist < maxDist; ++dist) {\n    // Vertical sides of box.\n    for (var y = dispPos[1] > dist ? dispPos[1] - dist : 0; y <= dispPos[1] + dist; ++y) {\n      curPos[1] = y;\n\n      if (dispPos[0] >= dist) {\n        curPos[0] = dispPos[0] - dist;\n        info = getPixelInformationWithData(buffdata, curPos, 0, outSelectedPosition);\n\n        if (info && info.valid) {\n          return info;\n        }\n      }\n\n      curPos[0] = dispPos[0] + dist;\n      info = getPixelInformationWithData(buffdata, curPos, 0, outSelectedPosition);\n\n      if (info && info.valid) {\n        return info;\n      }\n    } // Horizontal sides of box.\n\n\n    for (var x = dispPos[0] >= dist ? dispPos[0] - (dist - 1) : 0; x <= dispPos[0] + (dist - 1); ++x) {\n      curPos[0] = x;\n\n      if (dispPos[1] >= dist) {\n        curPos[1] = dispPos[1] - dist;\n        info = getPixelInformationWithData(buffdata, curPos, 0, outSelectedPosition);\n\n        if (info && info.valid) {\n          return info;\n        }\n      }\n\n      curPos[1] = dispPos[1] + dist;\n      info = getPixelInformationWithData(buffdata, curPos, 0, outSelectedPosition);\n\n      if (info && info.valid) {\n        return info;\n      }\n    }\n  } // nothing hit.\n\n\n  outSelectedPosition[0] = inDisplayPosition[0];\n  outSelectedPosition[1] = inDisplayPosition[1];\n  return null;\n} //-----------------------------------------------------------------------------\n\n\nfunction convertSelection(fieldassociation, dataMap, captureZValues, renderer, openGLRenderWindow) {\n  var sel = [];\n  var count = 0;\n  dataMap.forEach(function (value, key) {\n    var child = _Common_DataModel_SelectionNode_js__WEBPACK_IMPORTED_MODULE_8__.default.newInstance();\n    child.setContentType(SelectionContent.INDICES);\n\n    switch (fieldassociation) {\n      case FieldAssociations.FIELD_ASSOCIATION_CELLS:\n        child.setFieldType(SelectionField.CELL);\n        break;\n\n      case FieldAssociations.FIELD_ASSOCIATION_POINTS:\n        child.setFieldType(SelectionField.POINT);\n        break;\n\n      default:\n        vtkErrorMacro('Unknown field association');\n    }\n\n    child.getProperties().propID = value.info.propID;\n    child.getProperties().prop = value.info.prop;\n    child.getProperties().compositeID = value.info.compositeID;\n    child.getProperties().pixelCount = value.pixelCount;\n\n    if (captureZValues) {\n      child.getProperties().displayPosition = [value.info.displayPosition[0], value.info.displayPosition[1], value.info.zValue];\n      child.getProperties().worldPosition = openGLRenderWindow.displayToWorld(value.info.displayPosition[0], value.info.displayPosition[1], value.info.zValue, renderer);\n    }\n\n    child.setSelectionList(value.attributeIDs);\n    sel[count] = child;\n    count++;\n  });\n  return sel;\n} //----------------------------------------------------------------------------\n\n\nfunction generateSelectionWithData(buffdata, fx1, fy1, fx2, fy2) {\n  var x1 = Math.floor(fx1);\n  var y1 = Math.floor(fy1);\n  var x2 = Math.floor(fx2);\n  var y2 = Math.floor(fy2);\n  var dataMap = new Map();\n  var outSelectedPosition = [0, 0];\n\n  for (var yy = y1; yy <= y2; yy++) {\n    for (var xx = x1; xx <= x2; xx++) {\n      var pos = [xx, yy];\n      var info = getPixelInformationWithData(buffdata, pos, 0, outSelectedPosition);\n\n      if (info && info.valid) {\n        var hash = getInfoHash(info);\n\n        if (!dataMap.has(hash)) {\n          dataMap.set(hash, {\n            info: info,\n            pixelCount: 1,\n            attributeIDs: [info.attributeID]\n          });\n        } else {\n          var dmv = dataMap.get(hash);\n          dmv.pixelCount++;\n\n          if (buffdata.captureZValues) {\n            if (info.zValue < dmv.info.zValue) {\n              dmv.info = info;\n            }\n          }\n\n          if (dmv.attributeIDs.indexOf(info.attributeID) === -1) {\n            dmv.attributeIDs.push(info.attributeID);\n          }\n        }\n      }\n    }\n  }\n\n  return convertSelection(buffdata.fieldAssociation, dataMap, buffdata.captureZValues, buffdata.renderer, buffdata.openGLRenderWindow);\n} // ----------------------------------------------------------------------------\n// vtkOpenGLHardwareSelector methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkOpenGLHardwareSelector(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLHardwareSelector'); //----------------------------------------------------------------------------\n\n  publicAPI.releasePixBuffers = function () {\n    model.pixBuffer = [];\n    model.zBuffer = null;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.beginSelection = function () {\n    model.openGLRenderer = model.openGLRenderWindow.getViewNodeFor(model.renderer);\n    model.maxAttributeId = 0;\n    var size = model.openGLRenderWindow.getSize();\n\n    if (!model.framebuffer) {\n      model.framebuffer = _Framebuffer_js__WEBPACK_IMPORTED_MODULE_7__.default.newInstance();\n      model.framebuffer.setOpenGLRenderWindow(model.openGLRenderWindow);\n      model.framebuffer.saveCurrentBindingsAndBuffers();\n      model.framebuffer.create(size[0], size[1]); // this calls model.framebuffer.bind()\n\n      model.framebuffer.populateFramebuffer();\n    } else {\n      model.framebuffer.setOpenGLRenderWindow(model.openGLRenderWindow);\n      model.framebuffer.saveCurrentBindingsAndBuffers();\n      var fbSize = model.framebuffer.getSize();\n\n      if (fbSize[0] !== size[0] || fbSize[1] !== size[1]) {\n        model.framebuffer.create(size[0], size[1]); // this calls model.framebuffer.bind()\n\n        model.framebuffer.populateFramebuffer();\n      } else {\n        model.framebuffer.bind();\n      }\n    }\n\n    model.openGLRenderer.clear();\n    model.openGLRenderer.setSelector(publicAPI);\n    model.hitProps = {};\n    model.props = [];\n    publicAPI.releasePixBuffers();\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.endSelection = function () {\n    model.hitProps = {};\n    model.openGLRenderer.setSelector(null);\n    model.framebuffer.restorePreviousBindingsAndBuffers();\n  };\n\n  publicAPI.preCapturePass = function () {};\n\n  publicAPI.postCapturePass = function () {}; //----------------------------------------------------------------------------\n\n\n  publicAPI.select = function () {\n    var sel = null;\n\n    if (publicAPI.captureBuffers()) {\n      sel = publicAPI.generateSelection(model.area[0], model.area[1], model.area[2], model.area[3]);\n      publicAPI.releasePixBuffers();\n    }\n\n    return sel;\n  };\n\n  publicAPI.getSourceDataAsync = /*#__PURE__*/function () {\n    var _ref = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee(renderer, fx1, fy1, fx2, fy2) {\n      var size, result;\n      return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) {\n        while (1) {\n          switch (_context.prev = _context.next) {\n            case 0:\n              // assign the renderer\n              model.renderer = renderer; // set area to all if no arguments provided\n\n              if (fx1 === undefined) {\n                size = model.openGLRenderWindow.getSize();\n                publicAPI.setArea(0, 0, size[0] - 1, size[1] - 1);\n              } else {\n                publicAPI.setArea(fx1, fy1, fx2, fy2);\n              } // just do capture buffers and package up the result\n\n\n              if (publicAPI.captureBuffers()) {\n                _context.next = 4;\n                break;\n              }\n\n              return _context.abrupt(\"return\", false);\n\n            case 4:\n              result = {\n                area: (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__.default)(model.area),\n                pixBuffer: (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__.default)(model.pixBuffer),\n                captureZValues: model.captureZValues,\n                zBuffer: model.zBuffer,\n                props: (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__.default)(model.props),\n                fieldAssociation: model.fieldAssociation,\n                renderer: renderer,\n                openGLRenderWindow: model.openGLRenderWindow\n              };\n\n              result.generateSelection = function () {\n                for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n                  args[_key] = arguments[_key];\n                }\n\n                return generateSelectionWithData.apply(void 0, [result].concat(args));\n              };\n\n              return _context.abrupt(\"return\", result);\n\n            case 7:\n            case \"end\":\n              return _context.stop();\n          }\n        }\n      }, _callee);\n    }));\n\n    return function (_x, _x2, _x3, _x4, _x5) {\n      return _ref.apply(this, arguments);\n    };\n  }(); //----------------------------------------------------------------------------\n\n\n  publicAPI.captureBuffers = function () {\n    if (!model.renderer || !model.openGLRenderWindow) {\n      vtkErrorMacro('Renderer and view must be set before calling Select.');\n      return false;\n    }\n\n    model.openGLRenderer = model.openGLRenderWindow.getViewNodeFor(model.renderer); // int rgba[4];\n    // rwin.getColorBufferSizes(rgba);\n    // if (rgba[0] < 8 || rgba[1] < 8 || rgba[2] < 8) {\n    //   vtkErrorMacro(\"Color buffer depth must be at least 8 bit. \"\n    //     \"Currently: \" << rgba[0] << \", \" << rgba[1] << \", \" <<rgba[2]);\n    //   return false;\n    // }\n\n    publicAPI.invokeEvent({\n      type: 'StartEvent'\n    }); // Initialize renderer for selection.\n    // change the renderer's background to black, which will indicate a miss\n\n    model.originalBackground = model.renderer.getBackgroundByReference();\n    model.renderer.setBackground(0.0, 0.0, 0.0);\n    var rpasses = model.openGLRenderWindow.getRenderPasses();\n    publicAPI.beginSelection();\n\n    for (model.currentPass = PassTypes.MIN_KNOWN_PASS; model.currentPass <= PassTypes.COMPOSITE_INDEX_PASS; model.currentPass++) {\n      if (publicAPI.passRequired(model.currentPass)) {\n        publicAPI.preCapturePass(model.currentPass);\n\n        if (model.captureZValues && model.currentPass === PassTypes.ACTOR_PASS && typeof rpasses[0].requestDepth === 'function' && typeof rpasses[0].getFramebuffer === 'function') {\n          rpasses[0].requestDepth();\n          model.openGLRenderWindow.traverseAllPasses();\n        } else {\n          model.openGLRenderWindow.traverseAllPasses();\n        }\n\n        publicAPI.postCapturePass(model.currentPass);\n        publicAPI.savePixelBuffer(model.currentPass);\n      }\n    }\n\n    publicAPI.endSelection(); // restore original background\n\n    model.renderer.setBackground(model.originalBackground);\n    publicAPI.invokeEvent({\n      type: 'EndEvent'\n    }); // restore image, not needed?\n    // model.openGLRenderWindow.traverseAllPasses();\n\n    return true;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.passRequired = function (pass) {\n    return true;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.savePixelBuffer = function (passNo) {\n    model.pixBuffer[passNo] = model.openGLRenderWindow.getPixelData(model.area[0], model.area[1], model.area[2], model.area[3]);\n\n    if (passNo === PassTypes.ACTOR_PASS) {\n      if (model.captureZValues) {\n        var rpasses = model.openGLRenderWindow.getRenderPasses();\n\n        if (typeof rpasses[0].requestDepth === 'function' && typeof rpasses[0].getFramebuffer === 'function') {\n          var fb = rpasses[0].getFramebuffer();\n          fb.saveCurrentBindingsAndBuffers();\n          fb.bind();\n          model.zBuffer = model.openGLRenderWindow.getPixelData(model.area[0], model.area[1], model.area[2], model.area[3]);\n          fb.restorePreviousBindingsAndBuffers();\n        }\n      }\n\n      publicAPI.buildPropHitList(model.pixBuffer[passNo]);\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.buildPropHitList = function (pixelbuffer) {\n    for (var yy = 0; yy <= model.area[3] - model.area[1]; yy++) {\n      for (var xx = 0; xx <= model.area[2] - model.area[0]; xx++) {\n        var val = convert(xx, yy, pixelbuffer, model.area);\n\n        if (val > 0) {\n          val--;\n\n          if (!(val in model.hitProps)) {\n            model.hitProps[val] = true;\n          }\n        }\n      }\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.renderProp = function (prop) {\n    if (model.currentPass === PassTypes.ACTOR_PASS) {\n      publicAPI.setPropColorValueFromInt(model.props.length + idOffset);\n      model.props.push(prop);\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.renderCompositeIndex = function (index) {\n    if (model.currentPass === PassTypes.COMPOSITE_INDEX_PASS) {\n      publicAPI.setPropColorValueFromInt(index + idOffset);\n    }\n  }; //----------------------------------------------------------------------------\n  // TODO: make inline\n\n\n  publicAPI.renderAttributeId = function (attribid) {\n    if (attribid < 0) {\n      // negative attribid is valid. It happens when rendering higher order\n      // elements where new points are added for rendering smooth surfaces.\n      return;\n    }\n\n    model.maxAttributeId = attribid > model.maxAttributeId ? attribid : model.maxAttributeId; // if (model.currentPass < PassTypes.ID_LOW24) {\n    //   return; // useless...\n    // }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.passTypeToString = function (type) {\n    return _macro_js__WEBPACK_IMPORTED_MODULE_4__.default.enumToString(PassTypes, type);\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.isPropHit = function (id) {\n    return Boolean(model.hitProps[id]);\n  };\n\n  publicAPI.setPropColorValueFromInt = function (val) {\n    model.propColorValue[0] = val % 256 / 255.0;\n    model.propColorValue[1] = Math.floor(val / 256) % 256 / 255.0;\n    model.propColorValue[2] = Math.floor(val / 65536) % 256 / 255.0;\n  }; // info has\n  //   valid\n  //   propId\n  //   prop\n  //   compositeID\n  //   attributeID\n  //----------------------------------------------------------------------------\n\n\n  publicAPI.getPixelInformation = function (inDisplayPosition, maxDistance, outSelectedPosition) {\n    // Base case\n    var maxDist = maxDistance < 0 ? 0 : maxDistance;\n\n    if (maxDist === 0) {\n      outSelectedPosition[0] = inDisplayPosition[0];\n      outSelectedPosition[1] = inDisplayPosition[1];\n\n      if (inDisplayPosition[0] < model.area[0] || inDisplayPosition[0] > model.area[2] || inDisplayPosition[1] < model.area[1] || inDisplayPosition[1] > model.area[3]) {\n        return null;\n      } // offset inDisplayPosition based on the lower-left-corner of the Area.\n\n\n      var displayPosition = [inDisplayPosition[0] - model.area[0], inDisplayPosition[1] - model.area[1]];\n      var actorid = convert(displayPosition[0], displayPosition[1], model.pixBuffer[PassTypes.ACTOR_PASS], model.area);\n\n      if (actorid <= 0) {\n        // the pixel did not hit any actor.\n        return null;\n      }\n\n      var _info2 = {};\n      _info2.valid = true;\n      _info2.propID = actorid - idOffset;\n      _info2.prop = model.props[_info2.propID];\n      var compositeID = convert(displayPosition[0], displayPosition[1], model.pixBuffer[PassTypes.COMPOSITE_INDEX_PASS], model.area);\n\n      if (compositeID < 0 || compositeID > 0xffffff) {\n        compositeID = 0;\n      }\n\n      _info2.compositeID = compositeID - idOffset;\n\n      if (model.captureZValues) {\n        var offset = (displayPosition[1] * (model.area[2] - model.area[0] + 1) + displayPosition[0]) * 4;\n        _info2.zValue = (256 * model.zBuffer[offset] + model.zBuffer[offset + 1]) / 65535.0;\n        _info2.displayPosition = inDisplayPosition;\n      }\n\n      return _info2;\n    } // Iterate over successively growing boxes.\n    // They recursively call the base case to handle single pixels.\n\n\n    var dispPos = [inDisplayPosition[0], inDisplayPosition[1]];\n    var curPos = [0, 0];\n    var info = publicAPI.getPixelInformation(inDisplayPosition, 0, outSelectedPosition);\n\n    if (info && info.valid) {\n      return info;\n    }\n\n    for (var dist = 1; dist < maxDist; ++dist) {\n      // Vertical sides of box.\n      for (var y = dispPos[1] > dist ? dispPos[1] - dist : 0; y <= dispPos[1] + dist; ++y) {\n        curPos[1] = y;\n\n        if (dispPos[0] >= dist) {\n          curPos[0] = dispPos[0] - dist;\n          info = publicAPI.getPixelInformation(curPos, 0, outSelectedPosition);\n\n          if (info && info.valid) {\n            return info;\n          }\n        }\n\n        curPos[0] = dispPos[0] + dist;\n        info = publicAPI.getPixelInformation(curPos, 0, outSelectedPosition);\n\n        if (info && info.valid) {\n          return info;\n        }\n      } // Horizontal sides of box.\n\n\n      for (var x = dispPos[0] >= dist ? dispPos[0] - (dist - 1) : 0; x <= dispPos[0] + (dist - 1); ++x) {\n        curPos[0] = x;\n\n        if (dispPos[1] >= dist) {\n          curPos[1] = dispPos[1] - dist;\n          info = publicAPI.getPixelInformation(curPos, 0, outSelectedPosition);\n\n          if (info && info.valid) {\n            return info;\n          }\n        }\n\n        curPos[1] = dispPos[1] + dist;\n        info = publicAPI.getPixelInformation(curPos, 0, outSelectedPosition);\n\n        if (info && info.valid) {\n          return info;\n        }\n      }\n    } // nothing hit.\n\n\n    outSelectedPosition[0] = inDisplayPosition[0];\n    outSelectedPosition[1] = inDisplayPosition[1];\n    return null;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.generateSelection = function (fx1, fy1, fx2, fy2) {\n    var x1 = Math.floor(fx1);\n    var y1 = Math.floor(fy1);\n    var x2 = Math.floor(fx2);\n    var y2 = Math.floor(fy2);\n    var dataMap = new Map();\n    var outSelectedPosition = [0, 0];\n\n    for (var yy = y1; yy <= y2; yy++) {\n      for (var xx = x1; xx <= x2; xx++) {\n        var pos = [xx, yy];\n        var info = publicAPI.getPixelInformation(pos, 0, outSelectedPosition);\n\n        if (info && info.valid) {\n          var hash = getInfoHash(info);\n\n          if (!dataMap.has(hash)) {\n            dataMap.set(hash, {\n              info: info,\n              pixelCount: 1,\n              attributeIDs: [info.attributeID]\n            });\n          } else {\n            var dmv = dataMap.get(hash);\n            dmv.pixelCount++;\n\n            if (model.captureZValues) {\n              if (info.zValue < dmv.info.zValue) {\n                dmv.info = info;\n              }\n            }\n\n            if (dmv.attributeIDs.indexOf(info.attributeID) === -1) {\n              dmv.attributeIDs.push(info.attributeID);\n            }\n          }\n        }\n      }\n    }\n\n    return convertSelection(model.fieldAssociation, dataMap, model.captureZValues, model.renderer, model.openGLRenderWindow);\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.attach = function (w, r) {\n    model.openGLRenderWindow = w;\n    model.renderer = r;\n  }; // override\n\n\n  var superSetArea = publicAPI.setArea;\n\n  publicAPI.setArea = function () {\n    if (superSetArea.apply(void 0, arguments)) {\n      model.area[0] = Math.floor(model.area[0]);\n      model.area[1] = Math.floor(model.area[1]);\n      model.area[2] = Math.floor(model.area[2]);\n      model.area[3] = Math.floor(model.area[3]);\n      return true;\n    }\n\n    return false;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  area: undefined,\n  renderer: null,\n  openGLRenderWindow: null,\n  openGLRenderer: null,\n  currentPass: -1,\n  propColorValue: null,\n  props: null,\n  idOffset: 1\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _Core_HardwareSelector_js__WEBPACK_IMPORTED_MODULE_6__.default.extend(publicAPI, model, initialValues);\n  model.propColorValue = [0, 0, 0];\n  model.props = [];\n\n  if (!model.area) {\n    model.area = [0, 0, 0, 0];\n  }\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_4__.default.setGetArray(publicAPI, model, ['area'], 4);\n  _macro_js__WEBPACK_IMPORTED_MODULE_4__.default.setGet(publicAPI, model, ['renderer', 'currentPass', 'openGLRenderWindow']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_4__.default.setGetArray(publicAPI, model, ['propColorValue'], 3);\n  _macro_js__WEBPACK_IMPORTED_MODULE_4__.default.event(publicAPI, model, 'event'); // Object methods\n\n  vtkOpenGLHardwareSelector(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance(extend, 'vtkOpenGLHardwareSelector'); // ----------------------------------------------------------------------------\n\nvar vtkHardwareSelector = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, _HardwareSelector_Constants_js__WEBPACK_IMPORTED_MODULE_5__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkHardwareSelector);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/HardwareSelector.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/HardwareSelector/Constants.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/HardwareSelector/Constants.js ***!
  \*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"PassTypes\": () => (/* binding */ PassTypes)\n/* harmony export */ });\nvar PassTypes = {\n  MIN_KNOWN_PASS: 0,\n  ACTOR_PASS: 0,\n  COMPOSITE_INDEX_PASS: 1,\n  ID_LOW24: 2,\n  MAX_KNOWN_PASS: 2\n};\nvar Constants = {\n  PassTypes: PassTypes\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/HardwareSelector/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/Helper.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/Helper.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _CellArrayBufferObject_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CellArrayBufferObject.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/CellArrayBufferObject.js\");\n/* harmony import */ var _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ShaderProgram.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ShaderProgram.js\");\n/* harmony import */ var _VertexArrayObject_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VertexArrayObject.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/VertexArrayObject.js\");\n\n\n\n\n\n// vtkOpenGLHelper methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLHelper(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLHelper');\n\n  publicAPI.setOpenGLRenderWindow = function (win) {\n    model.program.setContext(win.getContext());\n    model.VAO.setOpenGLRenderWindow(win);\n    model.CABO.setOpenGLRenderWindow(win);\n  };\n\n  publicAPI.releaseGraphicsResources = function (oglwin) {\n    model.VAO.releaseGraphicsResources();\n    model.CABO.releaseGraphicsResources();\n    model.CABO.setElementCount(0);\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  program: null,\n  shaderSourceTime: null,\n  VAO: null,\n  attributeUpdateTime: null,\n  CABO: null,\n  primitiveType: 0\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  model.shaderSourceTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model.shaderSourceTime);\n  model.attributeUpdateTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model.attributeUpdateTime);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['program', 'shaderSourceTime', 'VAO', 'attributeUpdateTime', 'CABO', 'primitiveType']);\n  model.program = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n  model.VAO = _VertexArrayObject_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n  model.CABO = _CellArrayBufferObject_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(); // Object methods\n\n  vtkOpenGLHelper(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend); // ----------------------------------------------------------------------------\n\nvar vtkHelper = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkHelper);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/Helper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/PixelSpaceCallbackMapper.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/PixelSpaceCallbackMapper.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ViewNodeFactory.js\");\n\n\n\n\n// import { mat4, vec3 }     from 'gl-matrix';\nvar vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkDebugMacro; // ----------------------------------------------------------------------------\n// vtkOpenGLPixelSpaceCallbackMapper methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLPixelSpaceCallbackMapper(publicAPI, model) {\n  model.classHierarchy.push('vtkOpenGLPixelSpaceCallbackMapper');\n\n  publicAPI.opaquePass = function (prepass, renderPass) {\n    model.openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');\n    model.openGLRenderWindow = model.openGLRenderer.getParent();\n    var aspectRatio = model.openGLRenderer.getAspectRatio();\n    var camera = model.openGLRenderer ? model.openGLRenderer.getRenderable().getActiveCamera() : null;\n    var tsize = model.openGLRenderer.getTiledSizeAndOrigin();\n    var texels = null;\n\n    if (model.renderable.getUseZValues()) {\n      var zbt = renderPass.getZBufferTexture();\n      var width = Math.floor(zbt.getWidth());\n      var height = Math.floor(zbt.getHeight());\n      var gl = model.openGLRenderWindow.getContext();\n      zbt.bind(); // Here we need to use vtkFramebuffer to save current settings (bindings/buffers)\n\n      var fb = renderPass.getFramebuffer();\n\n      if (!fb) {\n        vtkDebugMacro('No framebuffer to save/restore');\n      } else {\n        // save framebuffer settings\n        fb.saveCurrentBindingsAndBuffers();\n      }\n\n      var framebuffer = gl.createFramebuffer();\n      gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\n      gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, zbt.getHandle(), 0);\n\n      if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) === gl.FRAMEBUFFER_COMPLETE) {\n        texels = new Uint8Array(width * height * 4);\n        gl.viewport(0, 0, width, height);\n        gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, texels);\n      } // Now we need to restore framebuffer bindings/buffers\n\n\n      if (fb) {\n        fb.restorePreviousBindingsAndBuffers();\n      }\n\n      gl.deleteFramebuffer(framebuffer);\n    }\n\n    model.renderable.invokeCallback(model.renderable.getInputData(), camera, aspectRatio, tsize, texels);\n  };\n\n  publicAPI.queryPass = function (prepass, renderPass) {\n    if (prepass) {\n      if (model.renderable.getUseZValues()) {\n        renderPass.requestDepth();\n      }\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues); // Object methods\n\n  vtkOpenGLPixelSpaceCallbackMapper(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend, 'vtkOpenGLPixelSpaceCallbackMapper'); // ----------------------------------------------------------------------------\n\nvar vtkPixelSpaceCallbackMapper = {\n  newInstance: newInstance,\n  extend: extend\n}; // Register ourself to OpenGL backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__.registerOverride)('vtkPixelSpaceCallbackMapper', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkPixelSpaceCallbackMapper);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/PixelSpaceCallbackMapper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/PolyDataMapper.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/PolyDataMapper.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat3.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/vec3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Helper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Helper.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Helper.js\");\n/* harmony import */ var _Core_Mapper_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Core/Mapper.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Mapper.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _Texture_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Texture.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Texture.js\");\n/* harmony import */ var _Core_Property_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Core/Property.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Property.js\");\n/* harmony import */ var _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ShaderProgram.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ShaderProgram.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _glsl_vtkPolyDataVS_glsl_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./glsl/vtkPolyDataVS.glsl.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/glsl/vtkPolyDataVS.glsl.js\");\n/* harmony import */ var _glsl_vtkPolyDataFS_glsl_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./glsl/vtkPolyDataFS.glsl.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/glsl/vtkPolyDataFS.glsl.js\");\n/* harmony import */ var _ReplacementShaderMapper_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ReplacementShaderMapper.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ReplacementShaderMapper.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ViewNodeFactory.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* eslint-disable no-lonely-if */\n\nvar primTypes = {\n  Start: 0,\n  Points: 0,\n  Lines: 1,\n  Tris: 2,\n  TriStrips: 3,\n  TrisEdges: 4,\n  TriStripsEdges: 5,\n  End: 6\n};\nvar Representation = _Core_Property_js__WEBPACK_IMPORTED_MODULE_9__.default.Representation,\n    Shading = _Core_Property_js__WEBPACK_IMPORTED_MODULE_9__.default.Shading;\nvar ScalarMode = _Core_Mapper_js__WEBPACK_IMPORTED_MODULE_6__.default.ScalarMode;\nvar Filter = _Texture_js__WEBPACK_IMPORTED_MODULE_8__.default.Filter,\n    Wrap = _Texture_js__WEBPACK_IMPORTED_MODULE_8__.default.Wrap;\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_4__.vtkErrorMacro;\nvar StartEvent = {\n  type: 'StartEvent'\n};\nvar EndEvent = {\n  type: 'EndEvent'\n}; // ----------------------------------------------------------------------------\n// vtkOpenGLPolyDataMapper methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLPolyDataMapper(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLPolyDataMapper');\n\n  publicAPI.buildPass = function (prepass) {\n    if (prepass) {\n      model.openGLActor = publicAPI.getFirstAncestorOfType('vtkOpenGLActor');\n      model.openGLRenderer = model.openGLActor.getFirstAncestorOfType('vtkOpenGLRenderer');\n      model.openGLRenderWindow = model.openGLRenderer.getParent();\n      model.openGLCamera = model.openGLRenderer.getViewNodeFor(model.openGLRenderer.getRenderable().getActiveCamera());\n    }\n  }; // Renders myself\n\n\n  publicAPI.translucentPass = function (prepass) {\n    if (prepass) {\n      publicAPI.render();\n    }\n  };\n\n  publicAPI.opaqueZBufferPass = function (prepass) {\n    if (prepass) {\n      model.haveSeenDepthRequest = true;\n      model.renderDepth = true;\n      publicAPI.render();\n      model.renderDepth = false;\n    }\n  };\n\n  publicAPI.opaquePass = function (prepass) {\n    if (prepass) {\n      publicAPI.render();\n    }\n  };\n\n  publicAPI.render = function () {\n    var ctx = model.openGLRenderWindow.getContext();\n\n    if (model.context !== ctx) {\n      model.context = ctx;\n\n      for (var i = primTypes.Start; i < primTypes.End; i++) {\n        model.primitives[i].setOpenGLRenderWindow(model.openGLRenderWindow);\n      }\n    }\n\n    var actor = model.openGLActor.getRenderable();\n    var ren = model.openGLRenderer.getRenderable();\n    publicAPI.renderPiece(ren, actor);\n  };\n\n  publicAPI.buildShaders = function (shaders, ren, actor) {\n    publicAPI.getShaderTemplate(shaders, ren, actor); // user specified pre replacements\n\n    var openGLSpec = model.renderable.getViewSpecificProperties().OpenGL;\n    var shaderReplacements = null;\n\n    if (openGLSpec) {\n      shaderReplacements = openGLSpec.ShaderReplacements;\n    }\n\n    if (shaderReplacements) {\n      for (var i = 0; i < shaderReplacements.length; i++) {\n        var currReplacement = shaderReplacements[i];\n\n        if (currReplacement.replaceFirst) {\n          var shaderType = currReplacement.shaderType;\n          var ssrc = shaders[shaderType];\n          var substituteRes = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(ssrc, currReplacement.originalValue, currReplacement.replacementValue, currReplacement.replaceAll);\n          shaders[shaderType] = substituteRes.result;\n        }\n      }\n    }\n\n    publicAPI.replaceShaderValues(shaders, ren, actor); // user specified post replacements\n\n    if (shaderReplacements) {\n      for (var _i = 0; _i < shaderReplacements.length; _i++) {\n        var _currReplacement = shaderReplacements[_i];\n\n        if (!_currReplacement.replaceFirst) {\n          var _shaderType = _currReplacement.shaderType;\n          var _ssrc = shaders[_shaderType];\n\n          var _substituteRes = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(_ssrc, _currReplacement.originalValue, _currReplacement.replacementValue, _currReplacement.replaceAll);\n\n          shaders[_shaderType] = _substituteRes.result;\n        }\n      }\n    }\n  };\n\n  publicAPI.getShaderTemplate = function (shaders, ren, actor) {\n    var openGLSpecProp = model.renderable.getViewSpecificProperties().OpenGL;\n    var vertexShaderCode = _glsl_vtkPolyDataVS_glsl_js__WEBPACK_IMPORTED_MODULE_12__.v;\n\n    if (openGLSpecProp) {\n      var vertexSpecProp = openGLSpecProp.VertexShaderCode;\n\n      if (vertexSpecProp !== undefined && vertexSpecProp !== '') {\n        vertexShaderCode = vertexSpecProp;\n      }\n    }\n\n    shaders.Vertex = vertexShaderCode;\n    var fragmentShaderCode = _glsl_vtkPolyDataFS_glsl_js__WEBPACK_IMPORTED_MODULE_13__.v;\n\n    if (openGLSpecProp) {\n      var fragmentSpecProp = openGLSpecProp.FragmentShaderCode;\n\n      if (fragmentSpecProp !== undefined && fragmentSpecProp !== '') {\n        fragmentShaderCode = fragmentSpecProp;\n      }\n    }\n\n    shaders.Fragment = fragmentShaderCode;\n    var geometryShaderCode = '';\n\n    if (openGLSpecProp) {\n      var geometrySpecProp = openGLSpecProp.GeometryShaderCode;\n\n      if (geometrySpecProp !== undefined) {\n        geometryShaderCode = geometrySpecProp;\n      }\n    }\n\n    shaders.Geometry = geometryShaderCode;\n  };\n\n  publicAPI.replaceShaderColor = function (shaders, ren, actor) {\n    var VSSource = shaders.Vertex;\n    var GSSource = shaders.Geometry;\n    var FSSource = shaders.Fragment;\n    var lastLightComplexity = model.lastBoundBO.getReferenceByName('lastLightComplexity'); // create the material/color property declarations, and VS implementation\n    // these are always defined\n\n    var colorDec = ['uniform float ambient;', 'uniform float diffuse;', 'uniform float specular;', 'uniform float opacityUniform; // the fragment opacity', 'uniform vec3 ambientColorUniform;', 'uniform vec3 diffuseColorUniform;']; // add more for specular\n\n    if (lastLightComplexity) {\n      colorDec = colorDec.concat(['uniform vec3 specularColorUniform;', 'uniform float specularPowerUniform;']);\n    } // now handle the more complex fragment shader implementation\n    // the following are always defined variables.  We start\n    // by assigning a default value from the uniform\n\n\n    var colorImpl = ['vec3 ambientColor;', '  vec3 diffuseColor;', '  float opacity;'];\n\n    if (lastLightComplexity) {\n      colorImpl = colorImpl.concat(['  vec3 specularColor;', '  float specularPower;']);\n    }\n\n    colorImpl = colorImpl.concat(['  ambientColor = ambientColorUniform;', '  diffuseColor = diffuseColorUniform;', '  opacity = opacityUniform;']);\n\n    if (lastLightComplexity) {\n      colorImpl = colorImpl.concat(['  specularColor = specularColorUniform;', '  specularPower = specularPowerUniform;']);\n    } // add scalar vertex coloring\n\n\n    if (model.lastBoundBO.getCABO().getColorComponents() !== 0 && !model.drawingEdges) {\n      colorDec = colorDec.concat(['varying vec4 vertexColorVSOutput;']);\n      VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::Color::Dec', ['attribute vec4 scalarColor;', 'varying vec4 vertexColorVSOutput;']).result;\n      VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::Color::Impl', ['vertexColorVSOutput =  scalarColor;']).result;\n      GSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(GSSource, '//VTK::Color::Dec', ['in vec4 vertexColorVSOutput[];', 'out vec4 vertexColorGSOutput;']).result;\n      GSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(GSSource, '//VTK::Color::Impl', ['vertexColorGSOutput = vertexColorVSOutput[i];']).result;\n    }\n\n    if (model.lastBoundBO.getCABO().getColorComponents() !== 0 && !model.drawingEdges) {\n      FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Color::Impl', colorImpl.concat(['  diffuseColor = vertexColorVSOutput.rgb;', '  ambientColor = vertexColorVSOutput.rgb;', '  opacity = opacity*vertexColorVSOutput.a;'])).result;\n    } else {\n      if (model.renderable.getInterpolateScalarsBeforeMapping() && model.renderable.getColorCoordinates() && !model.drawingEdges) {\n        FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Color::Impl', colorImpl.concat(['  vec4 texColor = texture2D(texture1, tcoordVCVSOutput.st);', '  diffuseColor = texColor.rgb;', '  ambientColor = texColor.rgb;', '  opacity = opacity*texColor.a;'])).result;\n      } else {\n        if (actor.getBackfaceProperty() && !model.drawingEdges) {\n          colorDec = colorDec.concat(['uniform float opacityUniformBF; // the fragment opacity', 'uniform float ambientIntensityBF; // the material ambient', 'uniform float diffuseIntensityBF; // the material diffuse', 'uniform vec3 ambientColorUniformBF; // ambient material color', 'uniform vec3 diffuseColorUniformBF; // diffuse material color']);\n\n          if (lastLightComplexity) {\n            colorDec = colorDec.concat(['uniform float specularIntensityBF; // the material specular intensity', 'uniform vec3 specularColorUniformBF; // intensity weighted color', 'uniform float specularPowerUniformBF;']);\n            colorImpl = colorImpl.concat(['if (gl_FrontFacing == false) {', '  ambientColor = ambientIntensityBF * ambientColorUniformBF;', '  diffuseColor = diffuseIntensityBF * diffuseColorUniformBF;', '  specularColor = specularIntensityBF * specularColorUniformBF;', '  specularPower = specularPowerUniformBF;', '  opacity = opacityUniformBF; }']);\n          } else {\n            colorImpl = colorImpl.concat(['if (gl_FrontFacing == false) {', '  ambientColor = ambientIntensityBF * ambientColorUniformBF;', '  diffuseColor = diffuseIntensityBF * diffuseColorUniformBF;', '  opacity = opacityUniformBF; }']);\n          }\n        }\n\n        if (model.haveCellScalars && !model.drawingEdges) {\n          colorDec = colorDec.concat(['uniform samplerBuffer texture1;']);\n        }\n\n        FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Color::Impl', colorImpl).result;\n      }\n    }\n\n    FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Color::Dec', colorDec).result;\n    shaders.Vertex = VSSource;\n    shaders.Geometry = GSSource;\n    shaders.Fragment = FSSource;\n  };\n\n  publicAPI.replaceShaderLight = function (shaders, ren, actor) {\n    var FSSource = shaders.Fragment; // check for shadow maps\n\n    var shadowFactor = '';\n    var lastLightComplexity = model.lastBoundBO.getReferenceByName('lastLightComplexity');\n    var lastLightCount = model.lastBoundBO.getReferenceByName('lastLightCount');\n    var sstring = [];\n\n    switch (lastLightComplexity) {\n      case 0:\n        // no lighting or RENDER_VALUES\n        FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Light::Impl', ['  gl_FragData[0] = vec4(ambientColor * ambient + diffuseColor * diffuse, opacity);', '  //VTK::Light::Impl'], false).result;\n        break;\n\n      case 1:\n        // headlight\n        FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Light::Impl', ['  float df = max(0.0, normalVCVSOutput.z);', '  float sf = pow(df, specularPower);', '  vec3 diffuseL = df * diffuseColor;', '  vec3 specularL = sf * specularColor;', '  gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);', '  //VTK::Light::Impl'], false).result;\n        break;\n\n      case 2:\n        // light kit\n        for (var lc = 0; lc < lastLightCount; ++lc) {\n          sstring = sstring.concat([\"uniform vec3 lightColor\".concat(lc, \";\"), \"uniform vec3 lightDirectionVC\".concat(lc, \"; // normalized\"), \"uniform vec3 lightHalfAngleVC\".concat(lc, \"; // normalized\")]);\n        }\n\n        FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Light::Dec', sstring).result;\n        sstring = ['vec3 diffuseL = vec3(0,0,0);', '  vec3 specularL = vec3(0,0,0);', '  float df;'];\n\n        for (var _lc = 0; _lc < lastLightCount; ++_lc) {\n          sstring = sstring.concat([\"  df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC\".concat(_lc, \"));\"), \"  diffuseL += ((df\".concat(shadowFactor, \") * lightColor\").concat(_lc, \");\"), \"  if (dot(normalVCVSOutput, lightDirectionVC\".concat(_lc, \") < 0.0)\"), '    {', \"    float sf = pow( max(0.0, dot(lightHalfAngleVC\".concat(_lc, \",normalVCVSOutput)), specularPower);\"), \"    specularL += ((sf\".concat(shadowFactor, \") * lightColor\").concat(_lc, \");\"), '    }']);\n        }\n\n        sstring = sstring.concat(['  diffuseL = diffuseL * diffuseColor;', '  specularL = specularL * specularColor;', '  gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);', '  //VTK::Light::Impl']);\n        FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Light::Impl', sstring, false).result;\n        break;\n\n      case 3:\n        // positional\n        for (var _lc2 = 0; _lc2 < lastLightCount; ++_lc2) {\n          sstring = sstring.concat([\"uniform vec3 lightColor\".concat(_lc2, \";\"), \"uniform vec3 lightDirectionVC\".concat(_lc2, \"; // normalized\"), \"uniform vec3 lightHalfAngleVC\".concat(_lc2, \"; // normalized\"), \"uniform vec3 lightPositionVC\".concat(_lc2, \";\"), \"uniform vec3 lightAttenuation\".concat(_lc2, \";\"), \"uniform float lightConeAngle\".concat(_lc2, \";\"), \"uniform float lightExponent\".concat(_lc2, \";\"), \"uniform int lightPositional\".concat(_lc2, \";\")]);\n        }\n\n        FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Light::Dec', sstring).result;\n        sstring = ['vec3 diffuseL = vec3(0,0,0);', '  vec3 specularL = vec3(0,0,0);', '  vec3 vertLightDirectionVC;', '  float attenuation;', '  float df;'];\n\n        for (var _lc3 = 0; _lc3 < lastLightCount; ++_lc3) {\n          sstring = sstring.concat(['  attenuation = 1.0;', \"  if (lightPositional\".concat(_lc3, \" == 0)\"), '    {', \"      vertLightDirectionVC = lightDirectionVC\".concat(_lc3, \";\"), '    }', '  else', '    {', \"    vertLightDirectionVC = vertexVC.xyz - lightPositionVC\".concat(_lc3, \";\"), '    float distanceVC = length(vertLightDirectionVC);', '    vertLightDirectionVC = normalize(vertLightDirectionVC);', '    attenuation = 1.0 /', \"      (lightAttenuation\".concat(_lc3, \".x\"), \"       + lightAttenuation\".concat(_lc3, \".y * distanceVC\"), \"       + lightAttenuation\".concat(_lc3, \".z * distanceVC * distanceVC);\"), '    // per OpenGL standard cone angle is 90 or less for a spot light', \"    if (lightConeAngle\".concat(_lc3, \" <= 90.0)\"), '      {', \"      float coneDot = dot(vertLightDirectionVC, lightDirectionVC\".concat(_lc3, \");\"), '      // if inside the cone', \"      if (coneDot >= cos(radians(lightConeAngle\".concat(_lc3, \")))\"), '        {', \"        attenuation = attenuation * pow(coneDot, lightExponent\".concat(_lc3, \");\"), '        }', '      else', '        {', '        attenuation = 0.0;', '        }', '      }', '    }', '    df = max(0.0, attenuation*dot(normalVCVSOutput, -vertLightDirectionVC));', \"    diffuseL += ((df\".concat(shadowFactor, \") * lightColor\").concat(_lc3, \");\"), '    if (dot(normalVCVSOutput, vertLightDirectionVC) < 0.0)', '      {', \"      float sf = attenuation*pow( max(0.0, dot(lightHalfAngleVC\".concat(_lc3, \",normalVCVSOutput)), specularPower);\"), \"    specularL += ((sf\".concat(shadowFactor, \") * lightColor\").concat(_lc3, \");\"), '    }']);\n        }\n\n        sstring = sstring.concat(['  diffuseL = diffuseL * diffuseColor;', '  specularL = specularL * specularColor;', '  gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);', '  //VTK::Light::Impl']);\n        FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Light::Impl', sstring, false).result;\n        break;\n\n      default:\n        vtkErrorMacro('bad light complexity');\n    }\n\n    shaders.Fragment = FSSource;\n  };\n\n  publicAPI.replaceShaderNormal = function (shaders, ren, actor) {\n    var lastLightComplexity = model.lastBoundBO.getReferenceByName('lastLightComplexity');\n\n    if (lastLightComplexity > 0) {\n      var VSSource = shaders.Vertex;\n      var GSSource = shaders.Geometry;\n      var FSSource = shaders.Fragment;\n\n      if (model.lastBoundBO.getCABO().getNormalOffset()) {\n        VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::Normal::Dec', ['attribute vec3 normalMC;', 'uniform mat3 normalMatrix;', 'varying vec3 normalVCVSOutput;']).result;\n        VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::Normal::Impl', ['normalVCVSOutput = normalMatrix * normalMC;']).result;\n        GSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(GSSource, '//VTK::Normal::Dec', ['in vec3 normalVCVSOutput[];', 'out vec3 normalVCGSOutput;']).result;\n        GSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(GSSource, '//VTK::Normal::Impl', ['normalVCGSOutput = normalVCVSOutput[i];']).result;\n        FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Normal::Dec', ['varying vec3 normalVCVSOutput;']).result;\n        FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Normal::Impl', ['vec3 normalVCVSOutput = normalize(normalVCVSOutput);', //  if (!gl_FrontFacing) does not work in intel hd4000 mac\n        //  if (int(gl_FrontFacing) == 0) does not work on mesa\n        '  if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }']).result;\n      } else {\n        if (model.haveCellNormals) {\n          FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Normal::Dec', ['uniform mat3 normalMatrix;', 'uniform samplerBuffer textureN;']).result;\n          FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Normal::Impl', ['vec3 normalVCVSOutput = normalize(normalMatrix *', '    texelFetchBuffer(textureN, gl_PrimitiveID + PrimitiveIDOffset).xyz);', '  if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }']).result;\n        } else {\n          if (publicAPI.getOpenGLMode(actor.getProperty().getRepresentation(), model.lastBoundBO.getPrimitiveType()) === model.context.LINES) {\n            // generate a normal for lines, it will be perpendicular to the line\n            // and maximally aligned with the camera view direction\n            // no clue if this is the best way to do this.\n            // the code below has been optimized a bit so what follows is\n            // an explanation of the basic approach. Compute the gradient of the line\n            // with respect to x and y, the the larger of the two\n            // cross that with the camera view direction. That gives a vector\n            // orthogonal to the camera view and the line. Note that the line and the camera\n            // view are probably not orthogonal. Which is why when we cross result that with\n            // the line gradient again we get a reasonable normal. It will be othogonal to\n            // the line (which is a plane but maximally aligned with the camera view.\n            FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::UniformFlow::Impl', ['  vec3 fdx = vec3(dFdx(vertexVC.x),dFdx(vertexVC.y),dFdx(vertexVC.z));', '  vec3 fdy = vec3(dFdy(vertexVC.x),dFdy(vertexVC.y),dFdy(vertexVC.z));', '  //VTK::UniformFlow::Impl'] // For further replacements\n            ).result;\n            FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Normal::Impl', ['vec3 normalVCVSOutput;', '  fdx = normalize(fdx);', '  fdy = normalize(fdy);', '  if (abs(fdx.x) > 0.0)', '    { normalVCVSOutput = normalize(cross(vec3(fdx.y, -fdx.x, 0.0), fdx)); }', '  else { normalVCVSOutput = normalize(cross(vec3(fdy.y, -fdy.x, 0.0), fdy));}']).result;\n          } else {\n            FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Normal::Dec', ['uniform int cameraParallel;']).result;\n            FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::UniformFlow::Impl', [// '  vec3 fdx = vec3(dFdx(vertexVC.x),dFdx(vertexVC.y),dFdx(vertexVC.z));',\n            // '  vec3 fdy = vec3(dFdy(vertexVC.x),dFdy(vertexVC.y),dFdy(vertexVC.z));',\n            '  vec3 fdx = dFdx(vertexVC.xyz);', '  vec3 fdy = dFdy(vertexVC.xyz);', '  //VTK::UniformFlow::Impl'] // For further replacements\n            ).result;\n            FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Normal::Impl', ['  fdx = normalize(fdx);', '  fdy = normalize(fdy);', '  vec3 normalVCVSOutput = normalize(cross(fdx,fdy));', // the code below is faster, but does not work on some devices\n            // 'vec3 normalVC = normalize(cross(dFdx(vertexVC.xyz), dFdy(vertexVC.xyz)));',\n            '  if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }', '  if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }']).result;\n          }\n        }\n      }\n\n      shaders.Vertex = VSSource;\n      shaders.Geometry = GSSource;\n      shaders.Fragment = FSSource;\n    }\n  };\n\n  publicAPI.replaceShaderPositionVC = function (shaders, ren, actor) {\n    var VSSource = shaders.Vertex;\n    var GSSource = shaders.Geometry;\n    var FSSource = shaders.Fragment; // for points make sure to add in the point size\n\n    if (actor.getProperty().getRepresentation() === Representation.POINTS || model.lastBoundBO.getPrimitiveType() === primTypes.Points) {\n      VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::PositionVC::Impl', ['//VTK::PositionVC::Impl', \"  gl_PointSize = \".concat(actor.getProperty().getPointSize(), \".0;\")], false).result;\n    } // do we need the vertex in the shader in View Coordinates\n\n\n    var lastLightComplexity = model.lastBoundBO.getReferenceByName('lastLightComplexity');\n\n    if (lastLightComplexity > 0) {\n      VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::PositionVC::Dec', ['varying vec4 vertexVCVSOutput;']).result;\n      VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::PositionVC::Impl', ['vertexVCVSOutput = MCVCMatrix * vertexMC;', '  gl_Position = MCPCMatrix * vertexMC;']).result;\n      VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::Camera::Dec', ['uniform mat4 MCPCMatrix;', 'uniform mat4 MCVCMatrix;']).result;\n      GSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(GSSource, '//VTK::PositionVC::Dec', ['in vec4 vertexVCVSOutput[];', 'out vec4 vertexVCGSOutput;']).result;\n      GSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(GSSource, '//VTK::PositionVC::Impl', ['vertexVCGSOutput = vertexVCVSOutput[i];']).result;\n      FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::PositionVC::Dec', ['varying vec4 vertexVCVSOutput;']).result;\n      FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::PositionVC::Impl', ['vec4 vertexVC = vertexVCVSOutput;']).result;\n    } else {\n      VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::Camera::Dec', ['uniform mat4 MCPCMatrix;']).result;\n      VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::PositionVC::Impl', ['  gl_Position = MCPCMatrix * vertexMC;']).result;\n    }\n\n    shaders.Vertex = VSSource;\n    shaders.Geometry = GSSource;\n    shaders.Fragment = FSSource;\n  };\n\n  publicAPI.replaceShaderTCoord = function (shaders, ren, actor) {\n    if (model.lastBoundBO.getCABO().getTCoordOffset()) {\n      var VSSource = shaders.Vertex;\n      var GSSource = shaders.Geometry;\n      var FSSource = shaders.Fragment;\n\n      if (model.drawingEdges) {\n        return;\n      }\n\n      VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::TCoord::Impl', 'tcoordVCVSOutput = tcoordMC;').result; // we only handle the first texture by default\n      // additional textures are activated and we set the uniform\n      // for the texture unit they are assigned to, but you have to\n      // add in the shader code to do something with them\n\n      var tus = model.openGLActor.getActiveTextures();\n      var tNumComp = 2;\n      var tcdim = 2;\n\n      if (tus && tus.length > 0) {\n        tNumComp = tus[0].getComponents();\n\n        if (tus[0].getTarget() === model.context.TEXTURE_CUBE_MAP) {\n          tcdim = 3;\n        }\n      }\n\n      if (model.renderable.getColorTextureMap()) {\n        tNumComp = model.renderable.getColorTextureMap().getPointData().getScalars().getNumberOfComponents();\n        tcdim = 2;\n      }\n\n      if (tcdim === 2) {\n        VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::TCoord::Dec', 'attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;').result;\n        GSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(GSSource, '//VTK::TCoord::Dec', ['in vec2 tcoordVCVSOutput[];', 'out vec2 tcoordVCGSOutput;']).result;\n        GSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(GSSource, '//VTK::TCoord::Impl', 'tcoordVCGSOutput = tcoordVCVSOutput[i];').result;\n        FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::TCoord::Dec', ['varying vec2 tcoordVCVSOutput;', 'uniform sampler2D texture1;']).result;\n\n        if (tus && tus.length >= 1) {\n          switch (tNumComp) {\n            case 1:\n              FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::TCoord::Impl', ['vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);', 'gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*', '  vec4(tcolor.r,tcolor.r,tcolor.r,1.0);']).result;\n              break;\n\n            case 2:\n              FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::TCoord::Impl', ['vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);', 'gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*', '  vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);']).result;\n              break;\n\n            default:\n              FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::TCoord::Impl', 'gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*texture2D(texture1, tcoordVCVSOutput.st);').result;\n          }\n        }\n      } else {\n        VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::TCoord::Dec', 'attribute vec3 tcoordMC; varying vec3 tcoordVCVSOutput;').result;\n        GSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(GSSource, '//VTK::TCoord::Dec', ['in vec3 tcoordVCVSOutput[];', 'out vec3 tcoordVCGSOutput;']).result;\n        GSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(GSSource, '//VTK::TCoord::Impl', 'tcoordVCGSOutput = tcoordVCVSOutput[i];').result;\n        FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::TCoord::Dec', ['varying vec3 tcoordVCVSOutput;', 'uniform samplerCube texture1;']).result;\n\n        switch (tNumComp) {\n          case 1:\n            FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::TCoord::Impl', ['vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);', 'gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*', '  vec4(tcolor.r,tcolor.r,tcolor.r,1.0);']).result;\n            break;\n\n          case 2:\n            FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::TCoord::Impl', ['vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);', 'gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*', '  vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);']).result;\n            break;\n\n          default:\n            FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::TCoord::Impl', 'gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*textureCube(texture1, tcoordVCVSOutput);').result;\n        }\n      }\n\n      shaders.Vertex = VSSource;\n      shaders.Geometry = GSSource;\n      shaders.Fragment = FSSource;\n    }\n  };\n\n  publicAPI.replaceShaderClip = function (shaders, ren, actor) {\n    var VSSource = shaders.Vertex;\n    var FSSource = shaders.Fragment;\n\n    if (model.renderable.getNumberOfClippingPlanes()) {\n      var numClipPlanes = model.renderable.getNumberOfClippingPlanes();\n\n      if (numClipPlanes > 6) {\n        (0,_macro_js__WEBPACK_IMPORTED_MODULE_4__.vtkErrorMacro)('OpenGL has a limit of 6 clipping planes');\n        numClipPlanes = 6;\n      }\n\n      VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::Clip::Dec', ['uniform int numClipPlanes;', 'uniform vec4 clipPlanes[6];', 'varying float clipDistancesVSOutput[6];']).result;\n      VSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(VSSource, '//VTK::Clip::Impl', ['for (int planeNum = 0; planeNum < 6; planeNum++)', '    {', '    if (planeNum >= numClipPlanes)', '        {', '        break;', '        }', '    clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);', '    }']).result;\n      FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Clip::Dec', ['uniform int numClipPlanes;', 'varying float clipDistancesVSOutput[6];']).result;\n      FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Clip::Impl', ['for (int planeNum = 0; planeNum < 6; planeNum++)', '    {', '    if (planeNum >= numClipPlanes)', '        {', '        break;', '        }', '    if (clipDistancesVSOutput[planeNum] < 0.0) discard;', '    }']).result;\n    }\n\n    shaders.Vertex = VSSource;\n    shaders.Fragment = FSSource;\n  };\n\n  publicAPI.getCoincidentParameters = function (ren, actor) {\n    // 1. ResolveCoincidentTopology is On and non zero for this primitive\n    // type\n    var cp = null;\n    var prop = actor.getProperty();\n\n    if (model.renderable.getResolveCoincidentTopology() || prop.getEdgeVisibility() && prop.getRepresentation() === Representation.SURFACE) {\n      var primType = model.lastBoundBO.getPrimitiveType();\n\n      if (primType === primTypes.Points || prop.getRepresentation() === Representation.POINTS) {\n        cp = model.renderable.getCoincidentTopologyPointOffsetParameter();\n      } else if (primType === primTypes.Lines || prop.getRepresentation() === Representation.WIREFRAME) {\n        cp = model.renderable.getCoincidentTopologyLineOffsetParameters();\n      } else if (primType === primTypes.Tris || primType === primTypes.TriStrips) {\n        cp = model.renderable.getCoincidentTopologyPolygonOffsetParameters();\n      }\n\n      if (primType === primTypes.TrisEdges || primType === primTypes.TriStripsEdges) {\n        cp = model.renderable.getCoincidentTopologyPolygonOffsetParameters();\n        cp.factor /= 2.0;\n        cp.offset /= 2.0;\n      }\n    } // hardware picking always offset due to saved zbuffer\n    // This gets you above the saved surface depth buffer.\n    // vtkHardwareSelector* selector = ren->GetSelector();\n    // if (selector &&\n    //     selector->GetFieldAssociation() == vtkDataObject::FIELD_ASSOCIATION_POINTS)\n    // {\n    //   offset -= 2.0;\n    //   return;\n    // }\n\n\n    return cp;\n  };\n\n  publicAPI.replaceShaderPicking = function (shaders, ren, actor) {\n    var FSSource = shaders.Fragment;\n    FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Picking::Dec', ['uniform vec3 mapperIndex;', 'uniform int picking;']).result;\n    FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::Picking::Impl', '  gl_FragData[0] = picking != 0 ? vec4(mapperIndex,1.0) : gl_FragData[0];').result;\n    shaders.Fragment = FSSource;\n  };\n\n  publicAPI.replaceShaderValues = function (shaders, ren, actor) {\n    publicAPI.replaceShaderColor(shaders, ren, actor);\n    publicAPI.replaceShaderNormal(shaders, ren, actor);\n    publicAPI.replaceShaderLight(shaders, ren, actor);\n    publicAPI.replaceShaderTCoord(shaders, ren, actor);\n    publicAPI.replaceShaderPicking(shaders, ren, actor);\n    publicAPI.replaceShaderClip(shaders, ren, actor);\n    publicAPI.replaceShaderCoincidentOffset(shaders, ren, actor);\n    publicAPI.replaceShaderPositionVC(shaders, ren, actor);\n\n    if (model.haveSeenDepthRequest) {\n      var FSSource = shaders.Fragment;\n      FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::ZBuffer::Dec', 'uniform int depthRequest;').result;\n      FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_10__.default.substitute(FSSource, '//VTK::ZBuffer::Impl', ['if (depthRequest == 1) {', 'float iz = floor(gl_FragCoord.z*65535.0 + 0.1);', 'float rf = floor(iz/256.0)/255.0;', 'float gf = mod(iz,256.0)/255.0;', 'gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }']).result;\n      shaders.Fragment = FSSource;\n    }\n  };\n\n  publicAPI.getNeedToRebuildShaders = function (cellBO, ren, actor) {\n    var lightComplexity = 0;\n    var numberOfLights = 0;\n    var primType = cellBO.getPrimitiveType();\n    var poly = model.currentInput; // different algo from C++ as of 5/2019\n\n    var needLighting = false;\n    var pointNormals = poly.getPointData().getNormals();\n    var cellNormals = poly.getCellData().getNormals();\n    var flat = actor.getProperty().getInterpolation() === Shading.FLAT;\n    var representation = actor.getProperty().getRepresentation();\n    var mode = publicAPI.getOpenGLMode(representation, primType); // 1) all surfaces need lighting\n\n    if (mode === model.context.TRIANGLES) {\n      needLighting = true; // 2) all cell normals without point normals need lighting\n    } else if (cellNormals && !pointNormals) {\n      needLighting = true; // 3) Phong + pointNormals need lighting\n    } else if (!flat && pointNormals) {\n      needLighting = true; // 4) Phong Lines need lighting\n    } else if (!flat && mode === model.context.LINES) {\n      needLighting = true;\n    } // 5) everything else is unlit\n    // do we need lighting?\n\n\n    if (actor.getProperty().getLighting() && needLighting) {\n      // consider the lighting complexity to determine which case applies\n      // simple headlight, Light Kit, the whole feature set of VTK\n      lightComplexity = 0;\n      var lights = ren.getLightsByReference();\n\n      for (var index = 0; index < lights.length; ++index) {\n        var light = lights[index];\n        var status = light.getSwitch();\n\n        if (status > 0) {\n          numberOfLights++;\n\n          if (lightComplexity === 0) {\n            lightComplexity = 1;\n          }\n        }\n\n        if (lightComplexity === 1 && (numberOfLights > 1 || light.getIntensity() !== 1.0 || !light.lightTypeIsHeadLight())) {\n          lightComplexity = 2;\n        }\n\n        if (lightComplexity < 3 && light.getPositional()) {\n          lightComplexity = 3;\n        }\n      }\n    }\n\n    var needRebuild = false;\n    var lastLightComplexity = model.lastBoundBO.getReferenceByName('lastLightComplexity');\n    var lastLightCount = model.lastBoundBO.getReferenceByName('lastLightCount');\n\n    if (lastLightComplexity !== lightComplexity || lastLightCount !== numberOfLights) {\n      model.lastBoundBO.set({\n        lastLightComplexity: lightComplexity\n      }, true);\n      model.lastBoundBO.set({\n        lastLightCount: numberOfLights\n      }, true);\n      needRebuild = true;\n    } // has something changed that would require us to recreate the shader?\n    // candidates are\n    // property modified (representation interpolation and lighting)\n    // input modified\n    // light complexity changed\n\n\n    if (model.lastHaveSeenDepthRequest !== model.haveSeenDepthRequest || cellBO.getProgram() === 0 || cellBO.getShaderSourceTime().getMTime() < publicAPI.getMTime() || cellBO.getShaderSourceTime().getMTime() < actor.getMTime() || cellBO.getShaderSourceTime().getMTime() < model.renderable.getMTime() || cellBO.getShaderSourceTime().getMTime() < model.currentInput.getMTime() || needRebuild) {\n      model.lastHaveSeenDepthRequest = model.haveSeenDepthRequest;\n      return true;\n    }\n\n    return false;\n  };\n\n  publicAPI.updateShaders = function (cellBO, ren, actor) {\n    model.lastBoundBO = cellBO; // has something changed that would require us to recreate the shader?\n\n    if (publicAPI.getNeedToRebuildShaders(cellBO, ren, actor)) {\n      var shaders = {\n        Vertex: null,\n        Fragment: null,\n        Geometry: null\n      };\n      publicAPI.buildShaders(shaders, ren, actor); // compile and bind the program if needed\n\n      var newShader = model.openGLRenderWindow.getShaderCache().readyShaderProgramArray(shaders.Vertex, shaders.Fragment, shaders.Geometry); // if the shader changed reinitialize the VAO\n\n      if (newShader !== cellBO.getProgram()) {\n        cellBO.setProgram(newShader); // reset the VAO as the shader has changed\n\n        cellBO.getVAO().releaseGraphicsResources();\n      }\n\n      cellBO.getShaderSourceTime().modified();\n    } else {\n      model.openGLRenderWindow.getShaderCache().readyShaderProgram(cellBO.getProgram());\n    }\n\n    cellBO.getVAO().bind();\n    publicAPI.setMapperShaderParameters(cellBO, ren, actor);\n    publicAPI.setPropertyShaderParameters(cellBO, ren, actor);\n    publicAPI.setCameraShaderParameters(cellBO, ren, actor);\n    publicAPI.setLightingShaderParameters(cellBO, ren, actor);\n    var listCallbacks = model.renderable.getViewSpecificProperties().ShadersCallbacks;\n\n    if (listCallbacks) {\n      listCallbacks.forEach(function (object) {\n        object.callback(object.userData, cellBO, ren, actor);\n      });\n    }\n  };\n\n  publicAPI.setMapperShaderParameters = function (cellBO, ren, actor) {\n    // Now to update the VAO too, if necessary.\n    if (cellBO.getProgram().isUniformUsed('PrimitiveIDOffset')) {\n      cellBO.getProgram().setUniformi('PrimitiveIDOffset', model.primitiveIDOffset);\n    }\n\n    if (cellBO.getCABO().getElementCount() && (model.VBOBuildTime.getMTime() > cellBO.getAttributeUpdateTime().getMTime() || cellBO.getShaderSourceTime().getMTime() > cellBO.getAttributeUpdateTime().getMTime())) {\n      var lastLightComplexity = model.lastBoundBO.getReferenceByName('lastLightComplexity');\n\n      if (cellBO.getProgram().isAttributeUsed('vertexMC')) {\n        if (!cellBO.getVAO().addAttributeArray(cellBO.getProgram(), cellBO.getCABO(), 'vertexMC', cellBO.getCABO().getVertexOffset(), cellBO.getCABO().getStride(), model.context.FLOAT, 3, false)) {\n          vtkErrorMacro('Error setting vertexMC in shader VAO.');\n        }\n      }\n\n      if (cellBO.getProgram().isAttributeUsed('normalMC') && cellBO.getCABO().getNormalOffset() && lastLightComplexity > 0) {\n        if (!cellBO.getVAO().addAttributeArray(cellBO.getProgram(), cellBO.getCABO(), 'normalMC', cellBO.getCABO().getNormalOffset(), cellBO.getCABO().getStride(), model.context.FLOAT, 3, false)) {\n          vtkErrorMacro('Error setting normalMC in shader VAO.');\n        }\n      } else {\n        cellBO.getVAO().removeAttributeArray('normalMC');\n      }\n\n      model.renderable.getCustomShaderAttributes().forEach(function (attrName, idx) {\n        if (cellBO.getProgram().isAttributeUsed(\"\".concat(attrName, \"MC\"))) {\n          if (!cellBO.getVAO().addAttributeArray(cellBO.getProgram(), cellBO.getCABO(), \"\".concat(attrName, \"MC\"), cellBO.getCABO().getCustomData()[idx].offset, cellBO.getCABO().getStride(), model.context.FLOAT, cellBO.getCABO().getCustomData()[idx].components, false)) {\n            vtkErrorMacro(\"Error setting \".concat(attrName, \"MC in shader VAO.\"));\n          }\n        }\n      });\n\n      if (cellBO.getProgram().isAttributeUsed('tcoordMC') && cellBO.getCABO().getTCoordOffset()) {\n        if (!cellBO.getVAO().addAttributeArray(cellBO.getProgram(), cellBO.getCABO(), 'tcoordMC', cellBO.getCABO().getTCoordOffset(), cellBO.getCABO().getStride(), model.context.FLOAT, cellBO.getCABO().getTCoordComponents(), false)) {\n          vtkErrorMacro('Error setting tcoordMC in shader VAO.');\n        }\n      } else {\n        cellBO.getVAO().removeAttributeArray('tcoordMC');\n      }\n\n      if (cellBO.getProgram().isAttributeUsed('scalarColor') && cellBO.getCABO().getColorComponents()) {\n        if (!cellBO.getVAO().addAttributeArray(cellBO.getProgram(), cellBO.getCABO().getColorBO(), 'scalarColor', cellBO.getCABO().getColorOffset(), cellBO.getCABO().getColorBOStride(), model.context.UNSIGNED_BYTE, 4, true)) {\n          vtkErrorMacro('Error setting scalarColor in shader VAO.');\n        }\n      } else {\n        cellBO.getVAO().removeAttributeArray('scalarColor');\n      }\n\n      cellBO.getAttributeUpdateTime().modified();\n    }\n\n    if (model.renderable.getNumberOfClippingPlanes()) {\n      // add all the clipping planes\n      var numClipPlanes = model.renderable.getNumberOfClippingPlanes();\n\n      if (numClipPlanes > 6) {\n        (0,_macro_js__WEBPACK_IMPORTED_MODULE_4__.vtkErrorMacro)('OpenGL has a limit of 6 clipping planes');\n        numClipPlanes = 6;\n      }\n\n      var planeEquations = [];\n\n      for (var i = 0; i < numClipPlanes; i++) {\n        var planeEquation = [];\n        model.renderable.getClippingPlaneInDataCoords(actor.getMatrix(), i, planeEquation);\n\n        for (var j = 0; j < 4; j++) {\n          planeEquations.push(planeEquation[j]);\n        }\n      }\n\n      cellBO.getProgram().setUniformi('numClipPlanes', numClipPlanes);\n      cellBO.getProgram().setUniform4fv('clipPlanes', 6, planeEquations);\n    }\n\n    if (model.internalColorTexture && cellBO.getProgram().isUniformUsed('texture1')) {\n      cellBO.getProgram().setUniformi('texture1', model.internalColorTexture.getTextureUnit());\n    }\n\n    var tus = model.openGLActor.getActiveTextures();\n\n    if (tus) {\n      for (var index = 0; index < tus.length; ++index) {\n        var tex = tus[index];\n        var texUnit = tex.getTextureUnit();\n        var tname = \"texture\".concat(texUnit + 1);\n\n        if (cellBO.getProgram().isUniformUsed(tname)) {\n          cellBO.getProgram().setUniformi(tname, texUnit);\n        }\n      }\n    } // handle depth requests\n\n\n    if (model.haveSeenDepthRequest) {\n      cellBO.getProgram().setUniformi('depthRequest', model.renderDepth ? 1 : 0);\n    } // handle coincident\n\n\n    if (cellBO.getProgram().isUniformUsed('coffset')) {\n      var cp = publicAPI.getCoincidentParameters(ren, actor);\n      cellBO.getProgram().setUniformf('coffset', cp.offset); // cfactor isn't always used when coffset is.\n\n      if (cellBO.getProgram().isUniformUsed('cfactor')) {\n        cellBO.getProgram().setUniformf('cfactor', cp.factor);\n      }\n    }\n\n    var selector = model.openGLRenderer.getSelector();\n    cellBO.getProgram().setUniform3fArray('mapperIndex', selector ? selector.getPropColorValue() : [0.0, 0.0, 0.0]);\n    cellBO.getProgram().setUniformi('picking', selector ? selector.getCurrentPass() + 1 : 0);\n  };\n\n  publicAPI.setLightingShaderParameters = function (cellBO, ren, actor) {\n    // for unlit and headlight there are no lighting parameters\n    var lastLightComplexity = model.lastBoundBO.getReferenceByName('lastLightComplexity');\n\n    if (lastLightComplexity < 2) {\n      return;\n    }\n\n    var program = cellBO.getProgram(); // bind some light settings\n\n    var numberOfLights = 0;\n    var lights = ren.getLightsByReference();\n\n    for (var index = 0; index < lights.length; ++index) {\n      var light = lights[index];\n      var status = light.getSwitch();\n\n      if (status > 0.0) {\n        var dColor = light.getColorByReference();\n        var intensity = light.getIntensity();\n        model.lightColor[0] = dColor[0] * intensity;\n        model.lightColor[1] = dColor[1] * intensity;\n        model.lightColor[2] = dColor[2] * intensity; // get required info from light\n\n        var ld = light.getDirection();\n        var transform = ren.getActiveCamera().getViewMatrix();\n\n        var newLightDirection = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(ld);\n\n        if (light.lightTypeIsSceneLight()) {\n          newLightDirection[0] = transform[0] * ld[0] + transform[1] * ld[1] + transform[2] * ld[2];\n          newLightDirection[1] = transform[4] * ld[0] + transform[5] * ld[1] + transform[6] * ld[2];\n          newLightDirection[2] = transform[8] * ld[0] + transform[9] * ld[1] + transform[10] * ld[2];\n          (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_7__.k)(newLightDirection);\n        }\n\n        model.lightDirection[0] = newLightDirection[0];\n        model.lightDirection[1] = newLightDirection[1];\n        model.lightDirection[2] = newLightDirection[2];\n        model.lightHalfAngle[0] = -model.lightDirection[0];\n        model.lightHalfAngle[1] = -model.lightDirection[1];\n        model.lightHalfAngle[2] = -model.lightDirection[2] + 1.0;\n        (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_7__.k)(model.lightDirection);\n        program.setUniform3fArray(\"lightColor\".concat(numberOfLights), model.lightColor);\n        program.setUniform3fArray(\"lightDirectionVC\".concat(numberOfLights), model.lightDirection);\n        program.setUniform3fArray(\"lightHalfAngleVC\".concat(numberOfLights), model.lightHalfAngle);\n        numberOfLights++;\n      }\n    } // we are done unless we have positional lights\n\n\n    if (lastLightComplexity < 3) {\n      return;\n    } // for lightkit case there are some parameters to set\n\n\n    var cam = ren.getActiveCamera();\n    var viewTF = cam.getViewMatrix();\n    (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_2__.j)(viewTF, viewTF);\n    numberOfLights = 0;\n\n    for (var _index = 0; _index < lights.length; ++_index) {\n      var _light = lights[_index];\n\n      var _status = _light.getSwitch();\n\n      if (_status > 0.0) {\n        var lp = _light.getTransformedPosition();\n\n        var np = new Float64Array(3);\n        (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_3__.t)(np, lp, viewTF);\n        program.setUniform3fArray(\"lightAttenuation\".concat(numberOfLights), _light.getAttenuationValuesByReference());\n        program.setUniformi(\"lightPositional\".concat(numberOfLights), _light.getPositional());\n        program.setUniformf(\"lightExponent\".concat(numberOfLights), _light.getExponent());\n        program.setUniformf(\"lightConeAngle\".concat(numberOfLights), _light.getConeAngle());\n        program.setUniform3fArray(\"lightPositionVC\".concat(numberOfLights), [np[0], np[1], np[2]]);\n        numberOfLights++;\n      }\n    }\n  };\n\n  function safeMatrixMultiply(matrixArray, matrixType, tmpMat) {\n    matrixType.identity(tmpMat);\n    return matrixArray.reduce(function (res, matrix, index) {\n      if (index === 0) {\n        return matrix ? matrixType.copy(res, matrix) : matrixType.identity(res);\n      }\n\n      return matrix ? matrixType.multiply(res, res, matrix) : res;\n    }, tmpMat);\n  }\n\n  publicAPI.setCameraShaderParameters = function (cellBO, ren, actor) {\n    var program = cellBO.getProgram(); // [WMVP]C == {world, model, view, projection} coordinates\n    // E.g., WCPC == world to projection coordinate transformation\n\n    var keyMats = model.openGLCamera.getKeyMatrices(ren);\n    var cam = ren.getActiveCamera();\n    var camm = model.openGLCamera.getKeyMatrixTime().getMTime();\n    var progm = program.getLastCameraMTime();\n    var shiftScaleEnabled = cellBO.getCABO().getCoordShiftAndScaleEnabled();\n    var inverseShiftScaleMatrix = shiftScaleEnabled ? cellBO.getCABO().getInverseShiftAndScaleMatrix() : null;\n    var actorIsIdentity = actor.getIsIdentity();\n    var actMats = actorIsIdentity ? {\n      mcwc: null,\n      normalMatrix: null\n    } : model.openGLActor.getKeyMatrices();\n    program.setUniformMatrix('MCPCMatrix', safeMatrixMultiply([keyMats.wcpc, actMats.mcwc, inverseShiftScaleMatrix], _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_2__.q, model.tmpMat4));\n\n    if (program.isUniformUsed('MCVCMatrix')) {\n      program.setUniformMatrix('MCVCMatrix', safeMatrixMultiply([keyMats.wcvc, actMats.mcwc, inverseShiftScaleMatrix], _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_2__.q, model.tmpMat4));\n    }\n\n    if (program.isUniformUsed('normalMatrix')) {\n      program.setUniformMatrix3x3('normalMatrix', safeMatrixMultiply([keyMats.normalMatrix, actMats.normalMatrix], _vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_1__.b, model.tmpMat3));\n    }\n\n    if (progm !== camm) {\n      if (program.isUniformUsed('cameraParallel')) {\n        program.setUniformi('cameraParallel', cam.getParallelProjection());\n      }\n\n      program.setLastCameraMTime(camm);\n    }\n\n    if (!actorIsIdentity) {\n      // reset the cam mtime as actor modified the shader values\n      program.setLastCameraMTime(0);\n    }\n  };\n\n  publicAPI.setPropertyShaderParameters = function (cellBO, ren, actor) {\n    var program = cellBO.getProgram();\n    var ppty = actor.getProperty();\n    var opacity = ppty.getOpacity();\n    var aColor = model.drawingEdges ? ppty.getEdgeColorByReference() : ppty.getAmbientColorByReference();\n    var dColor = model.drawingEdges ? ppty.getEdgeColorByReference() : ppty.getDiffuseColorByReference();\n    var aIntensity = model.drawingEdges ? 1.0 : ppty.getAmbient();\n    var dIntensity = model.drawingEdges ? 0.0 : ppty.getDiffuse();\n    var sIntensity = model.drawingEdges ? 0.0 : ppty.getSpecular();\n    var specularPower = ppty.getSpecularPower();\n    program.setUniformf('opacityUniform', opacity);\n    program.setUniform3fArray('ambientColorUniform', aColor);\n    program.setUniform3fArray('diffuseColorUniform', dColor);\n    program.setUniformf('ambient', aIntensity);\n    program.setUniformf('diffuse', dIntensity); // we are done unless we have lighting\n\n    var lastLightComplexity = model.lastBoundBO.getReferenceByName('lastLightComplexity');\n\n    if (lastLightComplexity < 1) {\n      return;\n    }\n\n    var sColor = ppty.getSpecularColorByReference();\n    program.setUniform3fArray('specularColorUniform', sColor);\n    program.setUniformf('specularPowerUniform', specularPower);\n    program.setUniformf('specular', sIntensity); // now set the backface properties if we have them\n\n    if (program.isUniformUsed('ambientIntensityBF')) {\n      ppty = actor.getBackfaceProperty();\n      opacity = ppty.getOpacity();\n      aColor = ppty.getAmbientColor();\n      aIntensity = ppty.getAmbient();\n      dColor = ppty.getDiffuseColor();\n      dIntensity = ppty.getDiffuse();\n      sColor = ppty.getSpecularColor();\n      sIntensity = ppty.getSpecular();\n      program.setUniformf('ambientIntensityBF', aIntensity);\n      program.setUniformf('diffuseIntensityBF', dIntensity);\n      program.setUniformf('opacityUniformBF', opacity);\n      program.setUniform3fArray('ambientColorUniformBF', aColor);\n      program.setUniform3fArray('diffuseColorUniformBF', dColor); // we are done unless we have lighting\n\n      if (lastLightComplexity < 1) {\n        return;\n      }\n\n      program.setUniformf('specularIntensityBF', sIntensity);\n      program.setUniform3fArray('specularColorUniformBF', sColor);\n      program.setUniformf('specularPowerUniformBF', specularPower);\n    }\n  };\n\n  publicAPI.renderPieceStart = function (ren, actor) {\n    model.primitiveIDOffset = 0;\n\n    if (model.openGLRenderer.getSelector()) {\n      switch (model.openGLRenderer.getSelector().getCurrentPass()) {\n        default:\n          model.openGLRenderer.getSelector().renderProp(actor);\n      }\n    } // make sure the BOs are up to date\n\n\n    publicAPI.updateBufferObjects(ren, actor); // If we are coloring by texture, then load the texture map.\n    // Use Map as indicator, because texture hangs around.\n\n    if (model.renderable.getColorTextureMap()) {\n      model.internalColorTexture.activate();\n    } // Bind the OpenGL, this is shared between the different primitive/cell types.\n\n\n    model.lastBoundBO = null;\n  };\n\n  publicAPI.renderPieceDraw = function (ren, actor) {\n    var representation = actor.getProperty().getRepresentation();\n    var gl = model.context;\n    var drawSurfaceWithEdges = actor.getProperty().getEdgeVisibility() && representation === Representation.SURFACE;\n    gl.lineWidth(actor.getProperty().getLineWidth()); // for every primitive type\n\n    for (var i = primTypes.Start; i < primTypes.End; i++) {\n      // if there are entries\n      var cabo = model.primitives[i].getCABO();\n\n      if (cabo.getElementCount()) {\n        // are we drawing edges\n        model.drawingEdges = drawSurfaceWithEdges && (i === primTypes.TrisEdges || i === primTypes.TriStripsEdges);\n        var mode = publicAPI.getOpenGLMode(representation, i);\n\n        if (!model.drawingEdges || !model.renderDepth) {\n          publicAPI.updateShaders(model.primitives[i], ren, actor);\n          gl.drawArrays(mode, 0, cabo.getElementCount());\n        }\n\n        var stride = (mode === gl.POINTS ? 1 : 0) || (mode === gl.LINES ? 2 : 3);\n        model.primitiveIDOffset += cabo.getElementCount() / stride;\n      }\n    } // reset the line width\n\n\n    gl.lineWidth(1);\n  };\n\n  publicAPI.getOpenGLMode = function (rep, type) {\n    if (rep === Representation.POINTS || type === primTypes.Points) {\n      return model.context.POINTS;\n    }\n\n    if (rep === Representation.WIREFRAME || type === primTypes.Lines || type === primTypes.TrisEdges || type === primTypes.TriStripsEdges) {\n      return model.context.LINES;\n    }\n\n    return model.context.TRIANGLES;\n  };\n\n  publicAPI.renderPieceFinish = function (ren, actor) {\n    if (model.LastBoundBO) {\n      model.LastBoundBO.getVAO().release();\n    }\n\n    if (model.renderable.getColorTextureMap()) {\n      model.internalColorTexture.deactivate();\n    }\n  };\n\n  publicAPI.renderPiece = function (ren, actor) {\n    // Make sure that we have been properly initialized.\n    // if (ren.getRenderWindow().checkAbortStatus()) {\n    //   return;\n    // }\n    publicAPI.invokeEvent(StartEvent);\n\n    if (!model.renderable.getStatic()) {\n      model.renderable.update();\n    }\n\n    model.currentInput = model.renderable.getInputData();\n    publicAPI.invokeEvent(EndEvent);\n\n    if (!model.currentInput) {\n      vtkErrorMacro('No input!');\n      return;\n    } // if there are no points then we are done\n\n\n    if (!model.currentInput.getPoints || !model.currentInput.getPoints().getNumberOfValues()) {\n      return;\n    } // apply faceCulling\n\n\n    var gl = model.context;\n    var backfaceCulling = actor.getProperty().getBackfaceCulling();\n    var frontfaceCulling = actor.getProperty().getFrontfaceCulling();\n\n    if (!backfaceCulling && !frontfaceCulling) {\n      model.openGLRenderWindow.disableCullFace();\n    } else if (frontfaceCulling) {\n      model.openGLRenderWindow.enableCullFace();\n      gl.cullFace(gl.FRONT);\n    } else {\n      model.openGLRenderWindow.enableCullFace();\n      gl.cullFace(gl.BACK);\n    }\n\n    publicAPI.renderPieceStart(ren, actor);\n    publicAPI.renderPieceDraw(ren, actor);\n    publicAPI.renderPieceFinish(ren, actor);\n  };\n\n  publicAPI.computeBounds = function (ren, actor) {\n    if (!publicAPI.getInput()) {\n      (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_7__.u)(model.bounds);\n      return;\n    }\n\n    model.bounds = publicAPI.getInput().getBounds();\n  };\n\n  publicAPI.updateBufferObjects = function (ren, actor) {\n    // Rebuild buffers if needed\n    if (publicAPI.getNeedToRebuildBufferObjects(ren, actor)) {\n      publicAPI.buildBufferObjects(ren, actor);\n    }\n  };\n\n  publicAPI.getNeedToRebuildBufferObjects = function (ren, actor) {\n    // first do a coarse check\n    // Note that the actor's mtime includes it's properties mtime\n    var vmtime = model.VBOBuildTime.getMTime();\n\n    if (vmtime < publicAPI.getMTime() || vmtime < model.renderable.getMTime() || vmtime < actor.getMTime() || vmtime < model.currentInput.getMTime()) {\n      return true;\n    }\n\n    return false;\n  };\n\n  publicAPI.buildBufferObjects = function (ren, actor) {\n    var poly = model.currentInput;\n\n    if (poly === null) {\n      return;\n    }\n\n    model.renderable.mapScalars(poly, 1.0);\n    var c = model.renderable.getColorMapColors();\n    model.haveCellScalars = false;\n    var scalarMode = model.renderable.getScalarMode();\n\n    if (model.renderable.getScalarVisibility()) {\n      // We must figure out how the scalars should be mapped to the polydata.\n      if ((scalarMode === ScalarMode.USE_CELL_DATA || scalarMode === ScalarMode.USE_CELL_FIELD_DATA || scalarMode === ScalarMode.USE_FIELD_DATA || !poly.getPointData().getScalars()) && scalarMode !== ScalarMode.USE_POINT_FIELD_DATA && c) {\n        model.haveCellScalars = true;\n      }\n    } // Do we have normals?\n\n\n    var n = actor.getProperty().getInterpolation() !== Shading.FLAT ? poly.getPointData().getNormals() : null;\n\n    if (n === null && poly.getCellData().getNormals()) {\n      model.haveCellNormals = true;\n      n = poly.getCellData().getNormals();\n    } // rebuild the VBO if the data has changed we create a string for the VBO what\n    // can change the VBO? points normals tcoords colors so what can change those?\n    // the input data is clearly one as it can change all four items tcoords may\n    // haveTextures or not colors may change based on quite a few mapping\n    // parameters in the mapper\n\n\n    var representation = actor.getProperty().getRepresentation();\n    var tcoords = poly.getPointData().getTCoords();\n\n    if (!model.openGLActor.getActiveTextures()) {\n      tcoords = null;\n    } // handle color mapping via texture\n\n\n    if (model.renderable.getColorCoordinates()) {\n      tcoords = model.renderable.getColorCoordinates();\n\n      if (!model.internalColorTexture) {\n        model.internalColorTexture = _Texture_js__WEBPACK_IMPORTED_MODULE_8__.default.newInstance();\n      }\n\n      var tex = model.internalColorTexture; // the following 4 lines allow for NPOT textures\n\n      tex.setMinificationFilter(Filter.NEAREST);\n      tex.setMagnificationFilter(Filter.NEAREST);\n      tex.setWrapS(Wrap.CLAMP_TO_EDGE);\n      tex.setWrapT(Wrap.CLAMP_TO_EDGE);\n      tex.setOpenGLRenderWindow(model.openGLRenderWindow);\n      var input = model.renderable.getColorTextureMap();\n      var ext = input.getExtent();\n      var inScalars = input.getPointData().getScalars();\n      tex.create2DFromRaw(ext[1] - ext[0] + 1, ext[3] - ext[2] + 1, inScalars.getNumberOfComponents(), inScalars.getDataType(), inScalars.getData());\n      tex.activate();\n      tex.sendParameters();\n      tex.deactivate();\n    }\n\n    var toString = \"\".concat(poly.getMTime(), \"A\").concat(representation, \"B\").concat(poly.getMTime()) + \"C\".concat(n ? n.getMTime() : 1, \"D\").concat(c ? c.getMTime() : 1) + \"E\".concat(actor.getProperty().getEdgeVisibility()) + \"F\".concat(tcoords ? tcoords.getMTime() : 1);\n\n    if (model.VBOBuildString !== toString) {\n      // Build the VBOs\n      var points = poly.getPoints();\n      var options = {\n        points: points,\n        normals: n,\n        tcoords: tcoords,\n        colors: c,\n        cellOffset: 0,\n        haveCellScalars: model.haveCellScalars,\n        haveCellNormals: model.haveCellNormals,\n        customAttributes: model.renderable.getCustomShaderAttributes().map(function (arrayName) {\n          return poly.getPointData().getArrayByName(arrayName);\n        })\n      };\n      options.cellOffset += model.primitives[primTypes.Points].getCABO().createVBO(poly.getVerts(), 'verts', representation, options);\n      options.cellOffset += model.primitives[primTypes.Lines].getCABO().createVBO(poly.getLines(), 'lines', representation, options);\n      options.cellOffset += model.primitives[primTypes.Tris].getCABO().createVBO(poly.getPolys(), 'polys', representation, options);\n      options.cellOffset += model.primitives[primTypes.TriStrips].getCABO().createVBO(poly.getStrips(), 'strips', representation, options);\n      var drawSurfaceWithEdges = actor.getProperty().getEdgeVisibility() && representation === Representation.SURFACE; // if we have edge visibility build the edge VBOs\n\n      if (drawSurfaceWithEdges) {\n        model.primitives[primTypes.TrisEdges].getCABO().createVBO(poly.getPolys(), 'polys', Representation.WIREFRAME, {\n          points: points,\n          normals: n,\n          tcoords: null,\n          colors: null,\n          cellOffset: 0,\n          haveCellScalars: false,\n          haveCellNormals: false\n        });\n        model.primitives[primTypes.TriStripsEdges].getCABO().createVBO(poly.getStrips(), 'strips', Representation.WIREFRAME, {\n          points: points,\n          normals: n,\n          tcoords: null,\n          colors: null,\n          cellOffset: 0,\n          haveCellScalars: false,\n          haveCellNormals: false\n        });\n      } else {\n        // otherwise free them\n        model.primitives[primTypes.TrisEdges].releaseGraphicsResources(model.openGLRenderWindow);\n        model.primitives[primTypes.TriStripsEdges].releaseGraphicsResources(model.openGLRenderWindow);\n      }\n\n      model.VBOBuildTime.modified();\n      model.VBOBuildString = toString;\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  context: null,\n  VBOBuildTime: 0,\n  VBOBuildString: null,\n  primitives: null,\n  primTypes: null,\n  shaderRebuildString: null,\n  tmpMat4: null,\n  ambientColor: [],\n  // used internally\n  diffuseColor: [],\n  // used internally\n  specularColor: [],\n  // used internally\n  lightColor: [],\n  // used internally\n  lightHalfAngle: [],\n  // used internally\n  lightDirection: [],\n  // used internally\n  lastHaveSeenDepthRequest: false,\n  haveSeenDepthRequest: false\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_11__.default.extend(publicAPI, model, initialValues);\n  _ReplacementShaderMapper_js__WEBPACK_IMPORTED_MODULE_14__.default.implementReplaceShaderCoincidentOffset(publicAPI, model, initialValues);\n  model.primitives = [];\n  model.primTypes = primTypes;\n  model.tmpMat3 = (0,_vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_1__.i)(new Float64Array(9));\n  model.tmpMat4 = (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_2__.a)(new Float64Array(16));\n\n  for (var i = primTypes.Start; i < primTypes.End; i++) {\n    model.primitives[i] = _Helper_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance();\n    model.primitives[i].setPrimitiveType(i);\n    model.primitives[i].set({\n      lastLightComplexity: 0,\n      lastLightCount: 0,\n      lastSelectionPass: false\n    }, true);\n  } // Build VTK API\n\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_4__.setGet)(publicAPI, model, ['context']);\n  model.VBOBuildTime = {};\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_4__.obj)(model.VBOBuildTime, {\n    mtime: 0\n  }); // Object methods\n\n  vtkOpenGLPolyDataMapper(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_4__.newInstance)(extend, 'vtkOpenGLPolyDataMapper'); // ----------------------------------------------------------------------------\n\nvar vtkOpenGLPolyDataMapper$1 = {\n  newInstance: newInstance,\n  extend: extend\n}; // Register ourself to OpenGL backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_15__.registerOverride)('vtkMapper', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkOpenGLPolyDataMapper$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/PolyDataMapper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/RenderWindow.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/RenderWindow.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance),\n/* harmony export */   \"popMonitorGLContextCount\": () => (/* binding */ popMonitorGLContextCount),\n/* harmony export */   \"pushMonitorGLContextCount\": () => (/* binding */ pushMonitorGLContextCount)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Core_RenderWindow_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Core/RenderWindow.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindow.js\");\n/* harmony import */ var _ForwardPass_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ForwardPass.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ForwardPass.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ViewNodeFactory.js\");\n/* harmony import */ var _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../SceneGraph/RenderPass.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderPass.js\");\n/* harmony import */ var _ShaderCache_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ShaderCache.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ShaderCache.js\");\n/* harmony import */ var _SceneGraph_RenderWindowViewNode_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../SceneGraph/RenderWindowViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderWindowViewNode.js\");\n/* harmony import */ var _TextureUnitManager_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TextureUnitManager.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/TextureUnitManager.js\");\n/* harmony import */ var _HardwareSelector_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./HardwareSelector.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/HardwareSelector.js\");\n/* harmony import */ var _Common_Core_DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Common/Core/DataArray/Constants.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray/Constants.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.vtkDebugMacro,\n    vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.vtkErrorMacro;\nvar IS_CHROME = navigator.userAgent.indexOf('Chrome') !== -1;\nvar SCREENSHOT_PLACEHOLDER = {\n  position: 'absolute',\n  top: 0,\n  left: 0,\n  width: '100%',\n  height: '100%'\n};\n\nfunction checkRenderTargetSupport(gl, format, type) {\n  // create temporary frame buffer and texture\n  var framebuffer = gl.createFramebuffer();\n  var texture = gl.createTexture();\n  gl.bindTexture(gl.TEXTURE_2D, texture);\n  gl.texImage2D(gl.TEXTURE_2D, 0, format, 2, 2, 0, format, type, null);\n  gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\n  gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0); // check frame buffer status\n\n  var status = gl.checkFramebufferStatus(gl.FRAMEBUFFER); // clean up\n\n  gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n  gl.bindTexture(gl.TEXTURE_2D, null);\n  return status === gl.FRAMEBUFFER_COMPLETE;\n} // ----------------------------------------------------------------------------\n// Monitor the usage of GL context across vtkOpenGLRenderWindow instances\n// ----------------------------------------------------------------------------\n\n\nvar GL_CONTEXT_COUNT = 0;\nvar GL_CONTEXT_LISTENERS = [];\n\nfunction createGLContext() {\n  GL_CONTEXT_COUNT++;\n  GL_CONTEXT_LISTENERS.forEach(function (cb) {\n    return cb(GL_CONTEXT_COUNT);\n  });\n}\n\nfunction deleteGLContext() {\n  GL_CONTEXT_COUNT--;\n  GL_CONTEXT_LISTENERS.forEach(function (cb) {\n    return cb(GL_CONTEXT_COUNT);\n  });\n}\n\nfunction pushMonitorGLContextCount(cb) {\n  GL_CONTEXT_LISTENERS.push(cb);\n}\nfunction popMonitorGLContextCount(cb) {\n  return GL_CONTEXT_LISTENERS.pop();\n} // ----------------------------------------------------------------------------\n// vtkOpenGLRenderWindow methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLRenderWindow(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLRenderWindow');\n\n  publicAPI.getViewNodeFactory = function () {\n    return model.myFactory;\n  }; // Auto update style\n\n\n  var previousSize = [0, 0];\n\n  function updateWindow() {\n    // Canvas size\n    if (model.renderable) {\n      if (model.size[0] !== previousSize[0] || model.size[1] !== previousSize[1]) {\n        previousSize[0] = model.size[0];\n        previousSize[1] = model.size[1];\n        model.canvas.setAttribute('width', model.size[0]);\n        model.canvas.setAttribute('height', model.size[1]);\n      }\n    } // ImageStream size\n\n\n    if (model.viewStream) {\n      // If same size that's a NoOp\n      model.viewStream.setSize(model.size[0], model.size[1]);\n    } // Offscreen ?\n\n\n    model.canvas.style.display = model.useOffScreen ? 'none' : 'block'; // Cursor type\n\n    if (model.el) {\n      model.el.style.cursor = model.cursorVisibility ? model.cursor : 'none';\n    } // Invalidate cached DOM container size\n\n\n    model.containerSize = null;\n  }\n\n  publicAPI.onModified(updateWindow); // Builds myself.\n\n  publicAPI.buildPass = function (prepass) {\n    if (prepass) {\n      if (!model.renderable) {\n        return;\n      }\n\n      publicAPI.prepareNodes();\n      publicAPI.addMissingNodes(model.renderable.getRenderersByReference());\n      publicAPI.removeUnusedNodes();\n      publicAPI.initialize();\n      model.children.forEach(function (child) {\n        child.setOpenGLRenderWindow(publicAPI);\n      });\n    }\n  };\n\n  publicAPI.initialize = function () {\n    if (!model.initialized) {\n      model.context = publicAPI.get3DContext();\n      model.textureUnitManager = _TextureUnitManager_js__WEBPACK_IMPORTED_MODULE_9__.default.newInstance();\n      model.textureUnitManager.setContext(model.context);\n      model.shaderCache.setContext(model.context); // initialize blending for transparency\n\n      var gl = model.context;\n      gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n      gl.depthFunc(gl.LEQUAL);\n      gl.enable(gl.BLEND);\n      model.initialized = true;\n    }\n  };\n\n  publicAPI.makeCurrent = function () {\n    model.context.makeCurrent();\n  };\n\n  publicAPI.setContainer = function (el) {\n    if (model.el && model.el !== el) {\n      if (model.canvas.parentNode !== model.el) {\n        vtkErrorMacro('Error: canvas parent node does not match container');\n      } // Remove canvas from previous container\n\n\n      model.el.removeChild(model.canvas); // If the renderer has previously added\n      // a background image, remove it from the DOM.\n\n      if (model.el.contains(model.bgImage)) {\n        model.el.removeChild(model.bgImage);\n      }\n    }\n\n    if (model.el !== el) {\n      model.el = el;\n\n      if (model.el) {\n        model.el.appendChild(model.canvas); // If the renderer is set to use a background\n        // image, attach it to the DOM.\n\n        if (model.useBackgroundImage) {\n          model.el.appendChild(model.bgImage);\n        }\n      } // Trigger modified()\n\n\n      publicAPI.modified();\n    }\n  };\n\n  publicAPI.getContainer = function () {\n    return model.el;\n  };\n\n  publicAPI.getContainerSize = function () {\n    if (!model.containerSize && model.el) {\n      var _model$el$getBounding = model.el.getBoundingClientRect(),\n          width = _model$el$getBounding.width,\n          height = _model$el$getBounding.height;\n\n      model.containerSize = [width, height];\n    }\n\n    return model.containerSize || model.size;\n  };\n\n  publicAPI.getFramebufferSize = function () {\n    if (model.activeFramebuffer) {\n      return model.activeFramebuffer.getSize();\n    }\n\n    return model.size;\n  };\n\n  publicAPI.getPixelData = function (x1, y1, x2, y2) {\n    var pixels = new Uint8Array((x2 - x1 + 1) * (y2 - y1 + 1) * 4);\n    model.context.readPixels(x1, y1, x2 - x1 + 1, y2 - y1 + 1, model.context.RGBA, model.context.UNSIGNED_BYTE, pixels);\n    return pixels;\n  };\n\n  publicAPI.get3DContext = function () {\n    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n      preserveDrawingBuffer: false,\n      depth: true,\n      alpha: true\n    };\n    var result = null;\n    var webgl2Supported = typeof WebGL2RenderingContext !== 'undefined';\n    model.webgl2 = false;\n\n    if (model.defaultToWebgl2 && webgl2Supported) {\n      result = model.canvas.getContext('webgl2', options);\n\n      if (result) {\n        model.webgl2 = true;\n        vtkDebugMacro('using webgl2');\n      }\n    }\n\n    if (!result) {\n      vtkDebugMacro('using webgl1');\n      result = model.canvas.getContext('webgl', options) || model.canvas.getContext('experimental-webgl', options);\n    } // Do we have webvr support\n\n\n    if (navigator.getVRDisplays) {\n      navigator.getVRDisplays().then(function (displays) {\n        if (displays.length > 0) {\n          // take the first display for now\n          model.vrDisplay = displays[0]; // set the clipping ranges\n\n          model.vrDisplay.depthNear = 0.01; // meters\n\n          model.vrDisplay.depthFar = 100.0; // meters\n\n          publicAPI.invokeHaveVRDisplay();\n        }\n      });\n    } // prevent default context lost handler\n\n\n    model.canvas.addEventListener('webglcontextlost', function (event) {\n      event.preventDefault();\n    }, false);\n    model.canvas.addEventListener('webglcontextrestored', publicAPI.restoreContext, false);\n    return result;\n  };\n\n  publicAPI.startVR = function () {\n    model.oldCanvasSize = model.size.slice();\n\n    if (model.vrDisplay.capabilities.canPresent) {\n      model.vrDisplay.requestPresent([{\n        source: model.canvas\n      }]).then(function () {\n        if (model.el && model.vrDisplay.capabilities.hasExternalDisplay && model.hideCanvasInVR) {\n          model.el.style.display = 'none';\n        }\n\n        if (model.queryVRSize) {\n          var leftEye = model.vrDisplay.getEyeParameters('left');\n          var rightEye = model.vrDisplay.getEyeParameters('right');\n          var width = Math.floor(leftEye.renderWidth + rightEye.renderWidth);\n          var height = Math.floor(Math.max(leftEye.renderHeight, rightEye.renderHeight));\n          publicAPI.setSize(width, height);\n        } else {\n          publicAPI.setSize(model.vrResolution);\n        }\n\n        var ren = model.renderable.getRenderers()[0];\n        ren.resetCamera();\n        model.vrFrameData = new VRFrameData();\n        model.renderable.getInteractor().switchToVRAnimation();\n        model.vrSceneFrame = model.vrDisplay.requestAnimationFrame(publicAPI.vrRender); // If Broswer is chrome we need to request animation again to canvas update\n\n        if (IS_CHROME) {\n          model.vrSceneFrame = model.vrDisplay.requestAnimationFrame(publicAPI.vrRender);\n        }\n      }).catch(function () {\n        console.error('failed to requestPresent');\n      });\n    } else {\n      vtkErrorMacro('vrDisplay is not connected');\n    }\n  };\n\n  publicAPI.stopVR = function () {\n    model.renderable.getInteractor().returnFromVRAnimation();\n    model.vrDisplay.exitPresent();\n    model.vrDisplay.cancelAnimationFrame(model.vrSceneFrame);\n    publicAPI.setSize.apply(publicAPI, (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__.default)(model.oldCanvasSize));\n\n    if (model.el && model.vrDisplay.capabilities.hasExternalDisplay) {\n      model.el.style.display = 'block';\n    }\n\n    var ren = model.renderable.getRenderers()[0];\n    ren.getActiveCamera().setProjectionMatrix(null);\n    ren.setViewport(0.0, 0, 1.0, 1.0);\n    publicAPI.traverseAllPasses();\n  };\n\n  publicAPI.vrRender = function () {\n    // If not presenting for any reason, we do not submit frame\n    if (!model.vrDisplay.isPresenting) {\n      return;\n    }\n\n    model.renderable.getInteractor().updateGamepads(model.vrDisplay.displayId);\n    model.vrSceneFrame = model.vrDisplay.requestAnimationFrame(publicAPI.vrRender);\n    model.vrDisplay.getFrameData(model.vrFrameData); // get the first renderer\n\n    var ren = model.renderable.getRenderers()[0]; // do the left eye\n\n    ren.setViewport(0, 0, 0.5, 1.0);\n    ren.getActiveCamera().computeViewParametersFromPhysicalMatrix(model.vrFrameData.leftViewMatrix);\n    ren.getActiveCamera().setProjectionMatrix(model.vrFrameData.leftProjectionMatrix);\n    publicAPI.traverseAllPasses();\n    ren.setViewport(0.5, 0, 1.0, 1.0);\n    ren.getActiveCamera().computeViewParametersFromPhysicalMatrix(model.vrFrameData.rightViewMatrix);\n    ren.getActiveCamera().setProjectionMatrix(model.vrFrameData.rightProjectionMatrix);\n    publicAPI.traverseAllPasses();\n    model.vrDisplay.submitFrame();\n  };\n\n  publicAPI.restoreContext = function () {\n    var rp = _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_6__.default.newInstance();\n    rp.setCurrentOperation('Release');\n    rp.traverse(publicAPI, null);\n  };\n\n  publicAPI.activateTexture = function (texture) {\n    // Only add if it isn't already there\n    var result = model._textureResourceIds.get(texture);\n\n    if (result !== undefined) {\n      model.context.activeTexture(model.context.TEXTURE0 + result);\n      return;\n    }\n\n    var activeUnit = publicAPI.getTextureUnitManager().allocate();\n\n    if (activeUnit < 0) {\n      vtkErrorMacro('Hardware does not support the number of textures defined.');\n      return;\n    }\n\n    model._textureResourceIds.set(texture, activeUnit);\n\n    model.context.activeTexture(model.context.TEXTURE0 + activeUnit);\n  };\n\n  publicAPI.deactivateTexture = function (texture) {\n    // Only deactivate if it isn't already there\n    var result = model._textureResourceIds.get(texture);\n\n    if (result !== undefined) {\n      publicAPI.getTextureUnitManager().free(result);\n      delete model._textureResourceIds.delete(texture);\n    }\n  };\n\n  publicAPI.getTextureUnitForTexture = function (texture) {\n    var result = model._textureResourceIds.get(texture);\n\n    if (result !== undefined) {\n      return result;\n    }\n\n    return -1;\n  };\n\n  publicAPI.getDefaultTextureInternalFormat = function (vtktype, numComps, useFloat) {\n    if (model.webgl2) {\n      switch (vtktype) {\n        case _Common_Core_DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_11__.VtkDataTypes.UNSIGNED_CHAR:\n          switch (numComps) {\n            case 1:\n              return model.context.R8;\n\n            case 2:\n              return model.context.RG8;\n\n            case 3:\n              return model.context.RGB8;\n\n            case 4:\n            default:\n              return model.context.RGBA8;\n          }\n\n        default:\n        case _Common_Core_DataArray_Constants_js__WEBPACK_IMPORTED_MODULE_11__.VtkDataTypes.FLOAT:\n          switch (numComps) {\n            case 1:\n              return model.context.R16F;\n\n            case 2:\n              return model.context.RG16F;\n\n            case 3:\n              return model.context.RGB16F;\n\n            case 4:\n            default:\n              return model.context.RGBA16F;\n          }\n\n      }\n    } // webgl1 only supports four types\n\n\n    switch (numComps) {\n      case 1:\n        return model.context.LUMINANCE;\n\n      case 2:\n        return model.context.LUMINANCE_ALPHA;\n\n      case 3:\n        return model.context.RGB;\n\n      case 4:\n      default:\n        return model.context.RGBA;\n    }\n  };\n\n  publicAPI.setBackgroundImage = function (img) {\n    model.bgImage.src = img.src;\n  };\n\n  publicAPI.setUseBackgroundImage = function (value) {\n    model.useBackgroundImage = value; // Add or remove the background image from the\n    // DOM as specified.\n\n    if (model.useBackgroundImage && !model.el.contains(model.bgImage)) {\n      model.el.appendChild(model.bgImage);\n    } else if (!model.useBackgroundImage && model.el.contains(model.bgImage)) {\n      model.el.removeChild(model.bgImage);\n    }\n  };\n\n  function getCanvasDataURL() {\n    var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : model.imageFormat;\n    // Copy current canvas to not modify the original\n    var temporaryCanvas = document.createElement('canvas');\n    var temporaryContext = temporaryCanvas.getContext('2d');\n    temporaryCanvas.width = model.canvas.width;\n    temporaryCanvas.height = model.canvas.height;\n    temporaryContext.drawImage(model.canvas, 0, 0); // Get current client rect to place canvas\n\n    var mainBoundingClientRect = model.canvas.getBoundingClientRect();\n    var renderWindow = model.renderable;\n    var renderers = renderWindow.getRenderers();\n    renderers.forEach(function (renderer) {\n      var viewProps = renderer.getViewProps();\n      viewProps.forEach(function (viewProp) {\n        // Check if the prop has a container that should have canvas\n        if (viewProp.getContainer) {\n          var container = viewProp.getContainer();\n          var canvasList = container.getElementsByTagName('canvas'); // Go throughout all canvas and copy it into temporary main canvas\n\n          for (var i = 0; i < canvasList.length; i++) {\n            var currentCanvas = canvasList[i];\n            var boundingClientRect = currentCanvas.getBoundingClientRect();\n            var newXPosition = boundingClientRect.x - mainBoundingClientRect.x;\n            var newYPosition = boundingClientRect.y - mainBoundingClientRect.y;\n            temporaryContext.drawImage(currentCanvas, newXPosition, newYPosition);\n          }\n        }\n      });\n    });\n    var screenshot = temporaryCanvas.toDataURL(format);\n    temporaryCanvas.remove();\n    publicAPI.invokeImageReady(screenshot);\n  }\n\n  publicAPI.captureNextImage = function () {\n    var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'image/png';\n\n    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n        _ref$resetCamera = _ref.resetCamera,\n        resetCamera = _ref$resetCamera === void 0 ? false : _ref$resetCamera,\n        _ref$size = _ref.size,\n        size = _ref$size === void 0 ? null : _ref$size,\n        _ref$scale = _ref.scale,\n        scale = _ref$scale === void 0 ? 1 : _ref$scale;\n\n    if (model.deleted) {\n      return null;\n    }\n\n    model.imageFormat = format;\n    var previous = model.notifyStartCaptureImage;\n    model.notifyStartCaptureImage = true;\n    model._screenshot = {\n      size: !!size || scale !== 1 ? size || model.size.map(function (val) {\n        return val * scale;\n      }) : null\n    };\n    return new Promise(function (resolve, reject) {\n      var subscription = publicAPI.onImageReady(function (imageURL) {\n        if (model._screenshot.size === null) {\n          model.notifyStartCaptureImage = previous;\n          subscription.unsubscribe();\n\n          if (model._screenshot.placeHolder) {\n            // resize the main canvas back to its original size and show it\n            model.size = model._screenshot.originalSize; // process the resize\n\n            publicAPI.modified(); // restore the saved camera parameters, if applicable\n\n            if (model._screenshot.cameras) {\n              model._screenshot.cameras.forEach(function (_ref2) {\n                var restoreParamsFn = _ref2.restoreParamsFn,\n                    arg = _ref2.arg;\n                return restoreParamsFn(arg);\n              });\n            } // Trigger a render at the original size\n\n\n            publicAPI.traverseAllPasses(); // Remove and clean up the placeholder, revealing the original\n\n            model.el.removeChild(model._screenshot.placeHolder);\n\n            model._screenshot.placeHolder.remove();\n\n            model._screenshot = null;\n          }\n\n          resolve(imageURL);\n        } else {\n          // Create a placeholder image overlay while we resize and render\n          var tmpImg = document.createElement('img');\n          tmpImg.style = SCREENSHOT_PLACEHOLDER;\n          tmpImg.src = imageURL;\n          model._screenshot.placeHolder = model.el.appendChild(tmpImg); // hide the main canvas\n\n          model.canvas.style.display = 'none'; // remember the main canvas original size, then resize it\n\n          model._screenshot.originalSize = model.size;\n          model.size = model._screenshot.size;\n          model._screenshot.size = null; // process the resize\n\n          publicAPI.modified();\n\n          if (resetCamera) {\n            // If resetCamera was requested, we first save camera parameters\n            // from all the renderers, so we can restore them later\n            model._screenshot.cameras = model.renderable.getRenderers().map(function (renderer) {\n              var camera = renderer.getActiveCamera();\n              var params = camera.get('focalPoint', 'position', 'parallelScale');\n              return {\n                resetCameraFn: renderer.resetCamera,\n                restoreParamsFn: camera.set,\n                // \"clone\" the params so we don't keep refs to properties\n                arg: JSON.parse(JSON.stringify(params))\n              };\n            }); // Perform the resetCamera() on each renderer only after capturing\n            // the params from all active cameras, in case there happen to be\n            // linked cameras among the renderers.\n\n            model._screenshot.cameras.forEach(function (_ref3) {\n              var resetCameraFn = _ref3.resetCameraFn;\n              return resetCameraFn();\n            });\n          } // Trigger a render at the custom size\n\n\n          publicAPI.traverseAllPasses();\n        }\n      });\n    });\n  };\n\n  publicAPI.getGLInformations = function () {\n    var gl = publicAPI.get3DContext();\n    var glTextureFloat = gl.getExtension('OES_texture_float');\n    var glTextureHalfFloat = gl.getExtension('OES_texture_half_float');\n    var glDebugRendererInfo = gl.getExtension('WEBGL_debug_renderer_info');\n    var glDrawBuffers = gl.getExtension('WEBGL_draw_buffers');\n    var glAnisotropic = gl.getExtension('EXT_texture_filter_anisotropic') || gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic');\n    var params = [['Max Vertex Attributes', 'MAX_VERTEX_ATTRIBS', gl.getParameter(gl.MAX_VERTEX_ATTRIBS)], ['Max Varying Vectors', 'MAX_VARYING_VECTORS', gl.getParameter(gl.MAX_VARYING_VECTORS)], ['Max Vertex Uniform Vectors', 'MAX_VERTEX_UNIFORM_VECTORS', gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS)], ['Max Fragment Uniform Vectors', 'MAX_FRAGMENT_UNIFORM_VECTORS', gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS)], ['Max Fragment Texture Image Units', 'MAX_TEXTURE_IMAGE_UNITS', gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS)], ['Max Vertex Texture Image Units', 'MAX_VERTEX_TEXTURE_IMAGE_UNITS', gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS)], ['Max Combined Texture Image Units', 'MAX_COMBINED_TEXTURE_IMAGE_UNITS', gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS)], ['Max 2D Texture Size', 'MAX_TEXTURE_SIZE', gl.getParameter(gl.MAX_TEXTURE_SIZE)], ['Max Cube Texture Size', 'MAX_CUBE_MAP_TEXTURE_SIZE', gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE)], ['Max Texture Anisotropy', 'MAX_TEXTURE_MAX_ANISOTROPY_EXT', glAnisotropic && gl.getParameter(glAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)], ['Point Size Range', 'ALIASED_POINT_SIZE_RANGE', gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE).join(' - ')], ['Line Width Range', 'ALIASED_LINE_WIDTH_RANGE', gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE).join(' - ')], ['Max Viewport Dimensions', 'MAX_VIEWPORT_DIMS', gl.getParameter(gl.MAX_VIEWPORT_DIMS).join(' - ')], ['Max Renderbuffer Size', 'MAX_RENDERBUFFER_SIZE', gl.getParameter(gl.MAX_RENDERBUFFER_SIZE)], ['Framebuffer Red Bits', 'RED_BITS', gl.getParameter(gl.RED_BITS)], ['Framebuffer Green Bits', 'GREEN_BITS', gl.getParameter(gl.GREEN_BITS)], ['Framebuffer Blue Bits', 'BLUE_BITS', gl.getParameter(gl.BLUE_BITS)], ['Framebuffer Alpha Bits', 'ALPHA_BITS', gl.getParameter(gl.ALPHA_BITS)], ['Framebuffer Depth Bits', 'DEPTH_BITS', gl.getParameter(gl.DEPTH_BITS)], ['Framebuffer Stencil Bits', 'STENCIL_BITS', gl.getParameter(gl.STENCIL_BITS)], ['Framebuffer Subpixel Bits', 'SUBPIXEL_BITS', gl.getParameter(gl.SUBPIXEL_BITS)], ['MSAA Samples', 'SAMPLES', gl.getParameter(gl.SAMPLES)], ['MSAA Sample Buffers', 'SAMPLE_BUFFERS', gl.getParameter(gl.SAMPLE_BUFFERS)], ['Supported Formats for UByte Render Targets     ', 'UNSIGNED_BYTE RENDER TARGET FORMATS', [glTextureFloat && checkRenderTargetSupport(gl, gl.RGBA, gl.UNSIGNED_BYTE) ? 'RGBA' : '', glTextureFloat && checkRenderTargetSupport(gl, gl.RGB, gl.UNSIGNED_BYTE) ? 'RGB' : '', glTextureFloat && checkRenderTargetSupport(gl, gl.LUMINANCE, gl.UNSIGNED_BYTE) ? 'LUMINANCE' : '', glTextureFloat && checkRenderTargetSupport(gl, gl.ALPHA, gl.UNSIGNED_BYTE) ? 'ALPHA' : '', glTextureFloat && checkRenderTargetSupport(gl, gl.LUMINANCE_ALPHA, gl.UNSIGNED_BYTE) ? 'LUMINANCE_ALPHA' : ''].join(' ')], ['Supported Formats for Half Float Render Targets', 'HALF FLOAT RENDER TARGET FORMATS', [glTextureHalfFloat && checkRenderTargetSupport(gl, gl.RGBA, glTextureHalfFloat.HALF_FLOAT_OES) ? 'RGBA' : '', glTextureHalfFloat && checkRenderTargetSupport(gl, gl.RGB, glTextureHalfFloat.HALF_FLOAT_OES) ? 'RGB' : '', glTextureHalfFloat && checkRenderTargetSupport(gl, gl.LUMINANCE, glTextureHalfFloat.HALF_FLOAT_OES) ? 'LUMINANCE' : '', glTextureHalfFloat && checkRenderTargetSupport(gl, gl.ALPHA, glTextureHalfFloat.HALF_FLOAT_OES) ? 'ALPHA' : '', glTextureHalfFloat && checkRenderTargetSupport(gl, gl.LUMINANCE_ALPHA, glTextureHalfFloat.HALF_FLOAT_OES) ? 'LUMINANCE_ALPHA' : ''].join(' ')], ['Supported Formats for Full Float Render Targets', 'FLOAT RENDER TARGET FORMATS', [glTextureFloat && checkRenderTargetSupport(gl, gl.RGBA, gl.FLOAT) ? 'RGBA' : '', glTextureFloat && checkRenderTargetSupport(gl, gl.RGB, gl.FLOAT) ? 'RGB' : '', glTextureFloat && checkRenderTargetSupport(gl, gl.LUMINANCE, gl.FLOAT) ? 'LUMINANCE' : '', glTextureFloat && checkRenderTargetSupport(gl, gl.ALPHA, gl.FLOAT) ? 'ALPHA' : '', glTextureFloat && checkRenderTargetSupport(gl, gl.LUMINANCE_ALPHA, gl.FLOAT) ? 'LUMINANCE_ALPHA' : ''].join(' ')], ['Max Multiple Render Targets Buffers', 'MAX_DRAW_BUFFERS_WEBGL', glDrawBuffers ? gl.getParameter(glDrawBuffers.MAX_DRAW_BUFFERS_WEBGL) : 0], ['High Float Precision in Vertex Shader', 'HIGH_FLOAT VERTEX_SHADER', [gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT).precision, ' (-2<sup>', gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT).rangeMin, '</sup> - 2<sup>', gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT).rangeMax, '</sup>)'].join('')], ['Medium Float Precision in Vertex Shader', 'MEDIUM_FLOAT VERTEX_SHADER', [gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).precision, ' (-2<sup>', gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).rangeMin, '</sup> - 2<sup>', gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).rangeMax, '</sup>)'].join('')], ['Low Float Precision in Vertex Shader', 'LOW_FLOAT VERTEX_SHADER', [gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_FLOAT).precision, ' (-2<sup>', gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_FLOAT).rangeMin, '</sup> - 2<sup>', gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_FLOAT).rangeMax, '</sup>)'].join('')], ['High Float Precision in Fragment Shader', 'HIGH_FLOAT FRAGMENT_SHADER', [gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).precision, ' (-2<sup>', gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).rangeMin, '</sup> - 2<sup>', gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).rangeMax, '</sup>)'].join('')], ['Medium Float Precision in Fragment Shader', 'MEDIUM_FLOAT FRAGMENT_SHADER', [gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).precision, ' (-2<sup>', gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).rangeMin, '</sup> - 2<sup>', gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).rangeMax, '</sup>)'].join('')], ['Low Float Precision in Fragment Shader', 'LOW_FLOAT FRAGMENT_SHADER', [gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_FLOAT).precision, ' (-2<sup>', gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_FLOAT).rangeMin, '</sup> - 2<sup>', gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_FLOAT).rangeMax, '</sup>)'].join('')], ['High Int Precision in Vertex Shader', 'HIGH_INT VERTEX_SHADER', [gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_INT).precision, ' (-2<sup>', gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_INT).rangeMin, '</sup> - 2<sup>', gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_INT).rangeMax, '</sup>)'].join('')], ['Medium Int Precision in Vertex Shader', 'MEDIUM_INT VERTEX_SHADER', [gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_INT).precision, ' (-2<sup>', gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_INT).rangeMin, '</sup> - 2<sup>', gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_INT).rangeMax, '</sup>)'].join('')], ['Low Int Precision in Vertex Shader', 'LOW_INT VERTEX_SHADER', [gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_INT).precision, ' (-2<sup>', gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_INT).rangeMin, '</sup> - 2<sup>', gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_INT).rangeMax, '</sup>)'].join('')], ['High Int Precision in Fragment Shader', 'HIGH_INT FRAGMENT_SHADER', [gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_INT).precision, ' (-2<sup>', gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_INT).rangeMin, '</sup> - 2<sup>', gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_INT).rangeMax, '</sup>)'].join('')], ['Medium Int Precision in Fragment Shader', 'MEDIUM_INT FRAGMENT_SHADER', [gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_INT).precision, ' (-2<sup>', gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_INT).rangeMin, '</sup> - 2<sup>', gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_INT).rangeMax, '</sup>)'].join('')], ['Low Int Precision in Fragment Shader', 'LOW_INT FRAGMENT_SHADER', [gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_INT).precision, ' (-2<sup>', gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_INT).rangeMin, '</sup> - 2<sup>', gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_INT).rangeMax, '</sup>)'].join('')], ['Supported Extensions', 'EXTENSIONS', gl.getSupportedExtensions().join('<br/>\\t\\t\\t\\t\\t    ')], ['WebGL Renderer', 'RENDERER', gl.getParameter(gl.RENDERER)], ['WebGL Vendor', 'VENDOR', gl.getParameter(gl.VENDOR)], ['WebGL Version', 'VERSION', gl.getParameter(gl.VERSION)], ['Shading Language Version', 'SHADING_LANGUAGE_VERSION', gl.getParameter(gl.SHADING_LANGUAGE_VERSION)], ['Unmasked Renderer', 'UNMASKED_RENDERER', glDebugRendererInfo && gl.getParameter(glDebugRendererInfo.UNMASKED_RENDERER_WEBGL)], ['Unmasked Vendor', 'UNMASKED_VENDOR', glDebugRendererInfo && gl.getParameter(glDebugRendererInfo.UNMASKED_VENDOR_WEBGL)], ['WebGL Version', 'WEBGL_VERSION', model.webgl2 ? 2 : 1]];\n    var result = {};\n\n    while (params.length) {\n      var _params$pop = params.pop(),\n          _params$pop2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(_params$pop, 3),\n          label = _params$pop2[0],\n          key = _params$pop2[1],\n          value = _params$pop2[2];\n\n      if (key) {\n        result[key] = {\n          label: label,\n          value: value\n        };\n      }\n    }\n\n    return result;\n  };\n\n  publicAPI.traverseAllPasses = function () {\n    if (model.renderPasses) {\n      for (var index = 0; index < model.renderPasses.length; ++index) {\n        model.renderPasses[index].traverse(publicAPI, null);\n      }\n    }\n\n    if (model.notifyStartCaptureImage) {\n      getCanvasDataURL();\n    }\n  };\n\n  publicAPI.disableDepthMask = function () {\n    if (model.depthMaskEnabled) {\n      model.context.depthMask(false);\n      model.depthMaskEnabled = false;\n    }\n  };\n\n  publicAPI.enableDepthMask = function () {\n    if (!model.depthMaskEnabled) {\n      model.context.depthMask(true);\n      model.depthMaskEnabled = true;\n    }\n  };\n\n  publicAPI.disableCullFace = function () {\n    if (model.cullFaceEnabled) {\n      model.context.disable(model.context.CULL_FACE);\n      model.cullFaceEnabled = false;\n    }\n  };\n\n  publicAPI.enableCullFace = function () {\n    if (!model.cullFaceEnabled) {\n      model.context.enable(model.context.CULL_FACE);\n      model.cullFaceEnabled = true;\n    }\n  };\n\n  publicAPI.setViewStream = function (stream) {\n    if (model.viewStream === stream) {\n      return false;\n    }\n\n    if (model.subscription) {\n      model.subscription.unsubscribe();\n      model.subscription = null;\n    }\n\n    model.viewStream = stream;\n\n    if (model.viewStream) {\n      // Force background to be transparent + render\n      var mainRenderer = model.renderable.getRenderers()[0];\n      mainRenderer.getBackgroundByReference()[3] = 0; // Enable display of the background image\n\n      publicAPI.setUseBackgroundImage(true); // Bind to remote stream\n\n      model.subscription = model.viewStream.onImageReady(function (e) {\n        return publicAPI.setBackgroundImage(e.image);\n      });\n      model.viewStream.setSize(model.size[0], model.size[1]);\n      model.viewStream.invalidateCache();\n      model.viewStream.render();\n      publicAPI.modified();\n    }\n\n    return true;\n  };\n\n  publicAPI.delete = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.chain(publicAPI.delete, publicAPI.setViewStream, deleteGLContext);\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  cullFaceEnabled: false,\n  depthMaskEnabled: true,\n  shaderCache: null,\n  initialized: false,\n  context: null,\n  canvas: null,\n  cursorVisibility: true,\n  cursor: 'pointer',\n  textureUnitManager: null,\n  textureResourceIds: null,\n  containerSize: null,\n  renderPasses: [],\n  notifyStartCaptureImage: false,\n  webgl2: false,\n  defaultToWebgl2: true,\n  // attempt webgl2 on by default\n  vrResolution: [2160, 1200],\n  queryVRSize: false,\n  hideCanvasInVR: true,\n  activeFramebuffer: null,\n  vrDisplay: null,\n  imageFormat: 'image/png',\n  useOffScreen: false,\n  useBackgroundImage: false\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_RenderWindowViewNode_js__WEBPACK_IMPORTED_MODULE_8__.default.extend(publicAPI, model, initialValues); // Create internal instances\n\n  model.canvas = document.createElement('canvas');\n  model.canvas.style.width = '100%';\n  createGLContext();\n\n  if (!model.selector) {\n    model.selector = _HardwareSelector_js__WEBPACK_IMPORTED_MODULE_10__.default.newInstance();\n    model.selector.setOpenGLRenderWindow(publicAPI);\n  } // Create internal bgImage\n\n\n  model.bgImage = new Image();\n  model.bgImage.style.position = 'absolute';\n  model.bgImage.style.left = '0';\n  model.bgImage.style.top = '0';\n  model.bgImage.style.width = '100%';\n  model.bgImage.style.height = '100%';\n  model.bgImage.style.zIndex = '-1';\n  model._textureResourceIds = new Map();\n  model.myFactory = _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance();\n  /* eslint-disable no-use-before-define */\n\n  model.myFactory.registerOverride('vtkRenderWindow', newInstance);\n  /* eslint-enable no-use-before-define */\n\n  model.shaderCache = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_7__.default.newInstance();\n  model.shaderCache.setOpenGLRenderWindow(publicAPI); // setup default forward pass rendering\n\n  model.renderPasses[0] = _ForwardPass_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.event(publicAPI, model, 'imageReady');\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.event(publicAPI, model, 'haveVRDisplay'); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.get(publicAPI, model, ['shaderCache', 'textureUnitManager', 'webgl2', 'vrDisplay', 'useBackgroundImage']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.setGet(publicAPI, model, ['initialized', 'context', 'canvas', 'renderPasses', 'notifyStartCaptureImage', 'defaultToWebgl2', 'cursor', 'queryVRSize', 'hideCanvasInVR', 'useOffScreen', // might want to make this not call modified as\n  // we change the active framebuffer a lot. Or maybe\n  // only mark modified if the size or depth\n  // of the buffer has changed\n  'activeFramebuffer']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.setGetArray(publicAPI, model, ['size', 'vrResolution'], 2); // Object methods\n\n  vtkOpenGLRenderWindow(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance(extend, 'vtkOpenGLRenderWindow'); // ----------------------------------------------------------------------------\n// Register API specific RenderWindow implementation\n// ----------------------------------------------------------------------------\n\n(0,_Core_RenderWindow_js__WEBPACK_IMPORTED_MODULE_3__.registerViewConstructor)('WebGL', newInstance); // ----------------------------------------------------------------------------\n\nvar vtkRenderWindow = {\n  newInstance: newInstance,\n  extend: extend,\n  pushMonitorGLContextCount: pushMonitorGLContextCount,\n  popMonitorGLContextCount: popMonitorGLContextCount\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkRenderWindow);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/RenderWindow.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/Renderer.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/Renderer.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ViewNodeFactory.js\");\n\n\n\n\nvar vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkDebugMacro; // ----------------------------------------------------------------------------\n// vtkOpenGLRenderer methods\n// ----------------------------------------------------------------------------\n\n/* eslint-disable no-bitwise */\n\nfunction vtkOpenGLRenderer(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLRenderer'); // Builds myself.\n\n  publicAPI.buildPass = function (prepass) {\n    if (prepass) {\n      if (!model.renderable) {\n        return;\n      } // make sure we have a camera\n\n\n      if (!model.renderable.isActiveCameraCreated()) {\n        model.renderable.resetCamera();\n      }\n\n      publicAPI.updateLights();\n      publicAPI.prepareNodes();\n      publicAPI.addMissingNode(model.renderable.getActiveCamera());\n      publicAPI.addMissingNodes(model.renderable.getViewPropsWithNestedProps());\n      publicAPI.removeUnusedNodes();\n    }\n  };\n\n  publicAPI.updateLights = function () {\n    var count = 0;\n    var lights = model.renderable.getLightsByReference();\n\n    for (var index = 0; index < lights.length; ++index) {\n      if (lights[index].getSwitch() > 0.0) {\n        count++;\n      }\n    }\n\n    if (!count) {\n      vtkDebugMacro('No lights are on, creating one.');\n      model.renderable.createLight();\n    }\n\n    return count;\n  };\n\n  publicAPI.opaqueZBufferPass = function (prepass) {\n    if (prepass) {\n      var clearMask = 0;\n      var gl = model.context;\n\n      if (!model.renderable.getTransparent()) {\n        model.context.clearColor(1.0, 0.0, 0.0, 1.0);\n        clearMask |= gl.COLOR_BUFFER_BIT;\n      }\n\n      if (!model.renderable.getPreserveDepthBuffer()) {\n        gl.clearDepth(1.0);\n        clearMask |= gl.DEPTH_BUFFER_BIT;\n        gl.depthMask(true);\n      }\n\n      var ts = publicAPI.getTiledSizeAndOrigin();\n      gl.enable(gl.SCISSOR_TEST);\n      gl.scissor(ts.lowerLeftU, ts.lowerLeftV, ts.usize, ts.vsize);\n      gl.viewport(ts.lowerLeftU, ts.lowerLeftV, ts.usize, ts.vsize);\n      gl.colorMask(true, true, true, true);\n      gl.clear(clearMask);\n      gl.enable(gl.DEPTH_TEST);\n    }\n  }; // Renders myself\n\n\n  publicAPI.cameraPass = function (prepass) {\n    if (prepass) {\n      publicAPI.clear();\n    }\n  };\n\n  publicAPI.getAspectRatio = function () {\n    var size = model.parent.getSizeByReference();\n    var viewport = model.renderable.getViewportByReference();\n    return size[0] * (viewport[2] - viewport[0]) / ((viewport[3] - viewport[1]) * size[1]);\n  };\n\n  publicAPI.getTiledSizeAndOrigin = function () {\n    var vport = model.renderable.getViewportByReference(); // if there is no window assume 0 1\n\n    var tileViewPort = [0.0, 0.0, 1.0, 1.0]; // find the lower left corner of the viewport, taking into account the\n    // lower left boundary of this tile\n\n    var vpu = vport[0] - tileViewPort[0];\n    var vpv = vport[1] - tileViewPort[1]; // store the result as a pixel value\n\n    var ndvp = model.parent.normalizedDisplayToDisplay(vpu, vpv);\n    var lowerLeftU = Math.round(ndvp[0]);\n    var lowerLeftV = Math.round(ndvp[1]); // find the upper right corner of the viewport, taking into account the\n    // lower left boundary of this tile\n\n    var vpu2 = vport[2] - tileViewPort[0];\n    var vpv2 = vport[3] - tileViewPort[1];\n    var ndvp2 = model.parent.normalizedDisplayToDisplay(vpu2, vpv2); // now compute the size of the intersection of the viewport with the\n    // current tile\n\n    var usize = Math.round(ndvp2[0]) - lowerLeftU;\n    var vsize = Math.round(ndvp2[1]) - lowerLeftV;\n\n    if (usize < 0) {\n      usize = 0;\n    }\n\n    if (vsize < 0) {\n      vsize = 0;\n    }\n\n    return {\n      usize: usize,\n      vsize: vsize,\n      lowerLeftU: lowerLeftU,\n      lowerLeftV: lowerLeftV\n    };\n  };\n\n  publicAPI.clear = function () {\n    var clearMask = 0;\n    var gl = model.context;\n\n    if (!model.renderable.getTransparent()) {\n      var background = model.renderable.getBackgroundByReference(); // renderable ensures that background has 4 entries.\n\n      model.context.clearColor(background[0], background[1], background[2], background[3]);\n      clearMask |= gl.COLOR_BUFFER_BIT;\n    }\n\n    if (!model.renderable.getPreserveDepthBuffer()) {\n      gl.clearDepth(1.0);\n      clearMask |= gl.DEPTH_BUFFER_BIT;\n      gl.depthMask(true);\n    }\n\n    gl.colorMask(true, true, true, true);\n    var ts = publicAPI.getTiledSizeAndOrigin();\n    gl.enable(gl.SCISSOR_TEST);\n    gl.scissor(ts.lowerLeftU, ts.lowerLeftV, ts.usize, ts.vsize);\n    gl.viewport(ts.lowerLeftU, ts.lowerLeftV, ts.usize, ts.vsize);\n    gl.clear(clearMask);\n    gl.enable(gl.DEPTH_TEST);\n    /* eslint-enable no-bitwise */\n  };\n\n  publicAPI.releaseGraphicsResources = function () {\n    if (model.selector !== null) {\n      model.selector.releaseGraphicsResources();\n    }\n  };\n\n  publicAPI.setOpenGLRenderWindow = function (rw) {\n    if (model.openGLRenderWindow === rw) {\n      return;\n    }\n\n    publicAPI.releaseGraphicsResources();\n    model.openGLRenderWindow = rw;\n    model.context = null;\n\n    if (rw) {\n      model.context = model.openGLRenderWindow.getContext();\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  context: null,\n  openGLRenderWindow: null,\n  selector: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues); // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.get)(publicAPI, model, ['shaderCache']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['selector']); // Object methods\n\n  vtkOpenGLRenderer(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend, 'vtkOpenGLRenderer'); // ----------------------------------------------------------------------------\n\nvar vtkRenderer = {\n  newInstance: newInstance,\n  extend: extend\n}; // Register ourself to OpenGL backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__.registerOverride)('vtkRenderer', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkRenderer);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/Renderer.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/ReplacementShaderMapper.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/ReplacementShaderMapper.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ShaderProgram.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ShaderProgram.js\");\n\n\nfunction implementReplaceShaderCoincidentOffset(publicAPI, model) {\n\n  publicAPI.replaceShaderCoincidentOffset = function (shaders, ren, actor) {\n    var cp = publicAPI.getCoincidentParameters(ren, actor); // if we need an offset handle it here\n    // The value of .000016 is suitable for depth buffers\n    // of at least 16 bit depth. We do not query the depth\n    // right now because we would need some mechanism to\n    // cache the result taking into account FBO changes etc.\n\n    if (cp && (cp.factor !== 0.0 || cp.offset !== 0.0)) {\n      var FSSource = shaders.Fragment;\n      FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_0__.default.substitute(FSSource, '//VTK::Coincident::Dec', ['uniform float cfactor;', 'uniform float coffset;']).result;\n\n      if (model.context.getExtension('EXT_frag_depth')) {\n        if (cp.factor !== 0.0) {\n          FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_0__.default.substitute(FSSource, '//VTK::UniformFlow::Impl', ['float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));', '//VTK::UniformFlow::Impl'], false).result;\n          FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_0__.default.substitute(FSSource, '//VTK::Depth::Impl', 'gl_FragDepthEXT = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;').result;\n        } else {\n          FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_0__.default.substitute(FSSource, '//VTK::Depth::Impl', 'gl_FragDepthEXT = gl_FragCoord.z + 0.000016*coffset;').result;\n        }\n      }\n\n      if (model.openGLRenderWindow.getWebgl2()) {\n        if (cp.factor !== 0.0) {\n          FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_0__.default.substitute(FSSource, '//VTK::UniformFlow::Impl', ['float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));', '//VTK::UniformFlow::Impl'], false).result;\n          FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_0__.default.substitute(FSSource, '//VTK::Depth::Impl', 'gl_FragDepth = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;').result;\n        } else {\n          FSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_0__.default.substitute(FSSource, '//VTK::Depth::Impl', 'gl_FragDepth = gl_FragCoord.z + 0.000016*coffset;').result;\n        }\n      }\n\n      shaders.Fragment = FSSource;\n    }\n  };\n}\n\nvar vtkReplacementShaderMapper = {\n  implementReplaceShaderCoincidentOffset: implementReplaceShaderCoincidentOffset\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkReplacementShaderMapper);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/ReplacementShaderMapper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/Shader.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/Shader.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.vtkErrorMacro; // export const SHADER_TYPES = ['Vertex', 'Fragment', 'Geometry', 'Unknown'];\n// ----------------------------------------------------------------------------\n// vtkShader methods\n// ----------------------------------------------------------------------------\n\nfunction vtkShader(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkShader');\n\n  publicAPI.compile = function () {\n    var stype = model.context.VERTEX_SHADER;\n\n    if (!model.source || !model.source.length || model.shaderType === 'Unknown') {\n      return false;\n    } // Ensure we delete the previous shader if necessary.\n\n\n    if (model.handle !== 0) {\n      model.context.deleteShader(model.handle);\n      model.handle = 0;\n    }\n\n    switch (model.shaderType) {\n      // case vtkShader::Geometry:\n      //   type = GL_GEOMETRY_SHADER;\n      //   break;\n      case 'Fragment':\n        stype = model.context.FRAGMENT_SHADER;\n        break;\n\n      case 'Vertex':\n      default:\n        stype = model.context.VERTEX_SHADER;\n        break;\n    }\n\n    model.handle = model.context.createShader(stype);\n    model.context.shaderSource(model.handle, model.source);\n    model.context.compileShader(model.handle);\n    var isCompiled = model.context.getShaderParameter(model.handle, model.context.COMPILE_STATUS);\n\n    if (!isCompiled) {\n      var lastError = model.context.getShaderInfoLog(model.handle);\n      vtkErrorMacro(\"Error compiling shader '\".concat(model.source, \"': \").concat(lastError));\n      model.context.deleteShader(model.handle);\n      model.handle = 0;\n      return false;\n    } // The shader compiled, store its handle and return success.\n\n\n    return true;\n  };\n\n  publicAPI.cleanup = function () {\n    if (model.shaderType === 'Unknown' || model.handle === 0) {\n      return;\n    }\n\n    model.context.deleteShader(model.handle);\n    model.handle = 0;\n    model.dirty = true;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  shaderType: 'Unknown',\n  source: '',\n  error: '',\n  handle: 0,\n  dirty: false,\n  context: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['shaderType', 'source', 'error', 'handle', 'context']); // Object methods\n\n  vtkShader(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkShader'); // ----------------------------------------------------------------------------\n\nvar vtkShader$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkShader$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/Shader.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/ShaderCache.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/ShaderCache.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _vendor_blueimp_md5_js_md5_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../vendor/blueimp-md5/js/md5.js */ \"./node_modules/@kitware/vtk.js/vendor/blueimp-md5/js/md5.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ShaderProgram.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ShaderProgram.js\");\n\n\n\n\nvar SET_GET_FIELDS = ['lastShaderBound', 'context', 'openGLRenderWindow']; // ----------------------------------------------------------------------------\n// vtkShaderCache methods\n// ----------------------------------------------------------------------------\n\nfunction vtkShaderCache(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkShaderCache');\n\n  publicAPI.replaceShaderValues = function (VSSource, FSSource, GSSource) {\n    // first handle renaming any Fragment shader inputs\n    // if we have a geometry shader. By default fragment shaders\n    // assume their inputs come from a Vertex Shader. When we\n    // have a Geometry shader we rename the frament shader inputs\n    // to come from the geometry shader\n    var nFSSource = FSSource;\n\n    if (GSSource.length > 0) {\n      nFSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_2__.default.substitute(nFSSource, 'VSOut', 'GSOut').result;\n    }\n\n    var gl2 = model.openGLRenderWindow.getWebgl2();\n    var fragDepthString = '\\n';\n    var version = '#version 100\\n';\n\n    if (gl2) {\n      version = '#version 300 es\\n' + '#define attribute in\\n' + '#define textureCube texture\\n' + '#define texture2D texture\\n' + '#define textureCubeLod textureLod\\n' + '#define texture2DLod textureLod\\n';\n    } else {\n      model.context.getExtension('OES_standard_derivatives');\n\n      if (model.context.getExtension('EXT_frag_depth')) {\n        fragDepthString = '#extension GL_EXT_frag_depth : enable\\n';\n      }\n\n      if (model.context.getExtension('EXT_shader_texture_lod')) {\n        fragDepthString += '#extension GL_EXT_shader_texture_lod : enable\\n' + '#define textureCubeLod textureCubeLodEXT\\n' + '#define texture2DLod texture2DLodEXT';\n      }\n    }\n\n    nFSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_2__.default.substitute(nFSSource, '//VTK::System::Dec', [\"\".concat(version, \"\\n\"), gl2 ? '' : '#extension GL_OES_standard_derivatives : enable\\n', fragDepthString, '#ifdef GL_FRAGMENT_PRECISION_HIGH', 'precision highp float;', 'precision highp int;', '#else', 'precision mediump float;', 'precision mediump int;', '#endif']).result;\n    var nVSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_2__.default.substitute(VSSource, '//VTK::System::Dec', [\"\".concat(version, \"\\n\"), '#ifdef GL_FRAGMENT_PRECISION_HIGH', 'precision highp float;', 'precision highp int;', '#else', 'precision mediump float;', 'precision mediump int;', '#endif']).result;\n\n    if (gl2) {\n      nVSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_2__.default.substitute(nVSSource, 'varying', 'out').result;\n      nFSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_2__.default.substitute(nFSSource, 'varying', 'in').result;\n      nFSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_2__.default.substitute(nFSSource, 'gl_FragData\\\\[0\\\\]', 'fragOutput0').result;\n      nFSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_2__.default.substitute(nFSSource, '//VTK::Output::Dec', 'layout(location = 0) out vec4 fragOutput0;').result;\n    } // nFSSource = ShaderProgram.substitute(nFSSource, 'gl_FragData\\\\[0\\\\]',\n    //   'gl_FragColor').result;\n\n\n    var nGSSource = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_2__.default.substitute(GSSource, '//VTK::System::Dec', version).result;\n    return {\n      VSSource: nVSSource,\n      FSSource: nFSSource,\n      GSSource: nGSSource\n    };\n  }; // return NULL if there is an issue\n\n\n  publicAPI.readyShaderProgramArray = function (vertexCode, fragmentCode, geometryCode) {\n    var data = publicAPI.replaceShaderValues(vertexCode, fragmentCode, geometryCode);\n    var shader = publicAPI.getShaderProgram(data.VSSource, data.FSSource, data.GSSource);\n    return publicAPI.readyShaderProgram(shader);\n  };\n\n  publicAPI.readyShaderProgram = function (shader) {\n    if (!shader) {\n      return null;\n    } // compile if needed\n\n\n    if (!shader.getCompiled() && !shader.compileShader()) {\n      return null;\n    } // bind if needed\n\n\n    if (!publicAPI.bindShader(shader)) {\n      return null;\n    }\n\n    return shader;\n  };\n\n  publicAPI.getShaderProgram = function (vertexCode, fragmentCode, geometryCode) {\n    // compute the MD5 and the check the map\n    var hashInput = \"\".concat(vertexCode).concat(fragmentCode).concat(geometryCode);\n    var result = (0,_vendor_blueimp_md5_js_md5_js__WEBPACK_IMPORTED_MODULE_0__.m)(hashInput); // does it already exist?\n\n    var loc = Object.keys(model.shaderPrograms).indexOf(result);\n\n    if (loc === -1) {\n      // create one\n      var sps = _ShaderProgram_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n      sps.setContext(model.context);\n      sps.getVertexShader().setSource(vertexCode);\n      sps.getFragmentShader().setSource(fragmentCode);\n\n      if (geometryCode) {\n        sps.getGeometryShader().setSource(geometryCode);\n      }\n\n      sps.setMd5Hash(result);\n      model.shaderPrograms[result] = sps;\n      return sps;\n    }\n\n    return model.shaderPrograms[result];\n  };\n\n  publicAPI.releaseGraphicsResources = function (win) {\n    // NOTE:\n    // In the current implementation as of October 26th, if a shader\n    // program is created by ShaderCache then it should make sure\n    // that it releases the graphics resources used by these programs.\n    // It is not wisely for callers to do that since then they would\n    // have to loop over all the programs were in use and invoke\n    // release graphics resources individually.\n    publicAPI.releaseCurrentShader();\n    Object.keys(model.shaderPrograms).map(function (key) {\n      return model.shaderPrograms[key];\n    }).forEach(function (sp) {\n      return sp.releaseGraphicsResources(win);\n    });\n  };\n\n  publicAPI.releaseGraphicsResources = function () {\n    // release prior shader\n    if (model.astShaderBound) {\n      model.lastShaderBound.release();\n      model.lastShaderBound = null;\n    }\n  };\n\n  publicAPI.bindShader = function (shader) {\n    if (model.lastShaderBound === shader) {\n      return 1;\n    } // release prior shader\n\n\n    if (model.lastShaderBound) {\n      model.lastShaderBound.release();\n    }\n\n    shader.bind();\n    model.lastShaderBound = shader;\n    return 1;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  lastShaderBound: null,\n  shaderPrograms: null,\n  context: null,\n  openGLRenderWindow: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Internal objects\n\n  model.shaderPrograms = {}; // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, SET_GET_FIELDS); // Object methods\n\n  vtkShaderCache(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkShaderCache'); // ----------------------------------------------------------------------------\n\nvar vtkShaderCache$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkShaderCache$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/ShaderCache.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/ShaderProgram.js":
/*!************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/ShaderProgram.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Shader_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Shader.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Shader.js\");\n\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.vtkErrorMacro; // perform in place string substitutions, indicate if a substitution was done\n// this is useful for building up shader strings which typically involve\n// lots of string substitutions. Return true if a substitution was done.\n\nfunction substitute(source, search, replace) {\n  var all = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n  var replaceStr = Array.isArray(replace) ? replace.join('\\n') : replace;\n  var replaced = false;\n\n  if (source.search(search) !== -1) {\n    replaced = true;\n  }\n\n  var gflag = '';\n\n  if (all) {\n    gflag = 'g';\n  }\n\n  var regex = new RegExp(search, gflag);\n  var resultstr = source.replace(regex, replaceStr);\n  return {\n    replace: replaced,\n    result: resultstr\n  };\n} // ----------------------------------------------------------------------------\n// vtkShaderProgram methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkShaderProgram(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkShaderProgram');\n\n  publicAPI.compileShader = function () {\n    if (!model.vertexShader.compile()) {\n      vtkErrorMacro(model.vertexShader.getSource().split('\\n').map(function (line, index) {\n        return \"\".concat(index, \": \").concat(line);\n      }).join('\\n'));\n      vtkErrorMacro(model.vertexShader.getError());\n      return 0;\n    }\n\n    if (!model.fragmentShader.compile()) {\n      vtkErrorMacro(model.fragmentShader.getSource().split('\\n').map(function (line, index) {\n        return \"\".concat(index, \": \").concat(line);\n      }).join('\\n'));\n      vtkErrorMacro(model.fragmentShader.getError());\n      return 0;\n    } // skip geometry for now\n\n\n    if (!publicAPI.attachShader(model.vertexShader)) {\n      vtkErrorMacro(model.error);\n      return 0;\n    }\n\n    if (!publicAPI.attachShader(model.fragmentShader)) {\n      vtkErrorMacro(model.error);\n      return 0;\n    }\n\n    if (!publicAPI.link()) {\n      vtkErrorMacro(\"Links failed: \".concat(model.error));\n      return 0;\n    }\n\n    publicAPI.setCompiled(true);\n    return 1;\n  };\n\n  publicAPI.cleanup = function () {\n    if (model.shaderType === 'Unknown' || model.handle === 0) {\n      return;\n    }\n\n    model.context.deleteShader(model.handle);\n    model.handle = 0;\n  };\n\n  publicAPI.bind = function () {\n    if (!model.linked && !publicAPI.link()) {\n      return false;\n    }\n\n    model.context.useProgram(model.handle);\n    publicAPI.setBound(true);\n    return true;\n  };\n\n  publicAPI.isBound = function () {\n    return !!model.bound;\n  };\n\n  publicAPI.release = function () {\n    model.context.useProgram(null);\n    publicAPI.setBound(false);\n  };\n\n  publicAPI.setContext = function (ctx) {\n    model.vertexShader.setContext(ctx);\n    model.fragmentShader.setContext(ctx);\n    model.geometryShader.setContext(ctx);\n  };\n\n  publicAPI.link = function () {\n    if (model.inked) {\n      return true;\n    }\n\n    if (model.handle === 0) {\n      model.error = 'Program has not been initialized, and/or does not have shaders.';\n      return false;\n    } // clear out the list of uniforms used\n\n\n    model.uniformLocs = {};\n    model.context.linkProgram(model.handle);\n    var isCompiled = model.context.getProgramParameter(model.handle, model.context.LINK_STATUS);\n\n    if (!isCompiled) {\n      var lastError = model.context.getProgramInfoLog(model.handle);\n      vtkErrorMacro(\"Error linking shader \".concat(lastError));\n      model.handle = 0;\n      return false;\n    }\n\n    publicAPI.setLinked(true);\n    model.attributeLocs = {};\n    return true;\n  };\n\n  publicAPI.setUniformMatrix = function (name, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    var f32 = new Float32Array(v);\n    model.context.uniformMatrix4fv(location, false, f32);\n    return true;\n  };\n\n  publicAPI.setUniformMatrix3x3 = function (name, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    var f32 = new Float32Array(v);\n    model.context.uniformMatrix3fv(location, false, f32);\n    return true;\n  };\n\n  publicAPI.setUniformf = function (name, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    model.context.uniform1f(location, v);\n    return true;\n  };\n\n  publicAPI.setUniformfv = function (name, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    model.context.uniform1fv(location, v);\n    return true;\n  };\n\n  publicAPI.setUniformi = function (name, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    model.context.uniform1i(location, v);\n    return true;\n  };\n\n  publicAPI.setUniformiv = function (name, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    model.context.uniform1iv(location, v);\n    return true;\n  };\n\n  publicAPI.setUniform2f = function (name, v1, v2) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    if (v2 === undefined) {\n      throw new RangeError('Invalid number of values for array');\n    }\n\n    model.context.uniform2f(location, v1, v2);\n    return true;\n  };\n\n  publicAPI.setUniform2fv = function (name, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    model.context.uniform2fv(location, v);\n    return true;\n  };\n\n  publicAPI.setUniform2i = function (name, v1, v2) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    if (v2 === undefined) {\n      throw new RangeError('Invalid number of values for array');\n    }\n\n    model.context.uniform2i(location, v1, v2);\n    return true;\n  };\n\n  publicAPI.setUniform2iv = function (name, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    model.context.uniform2iv(location, v);\n    return true;\n  };\n\n  publicAPI.setUniform3f = function (name, a1, a2, a3) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    if (a3 === undefined) {\n      throw new RangeError('Invalid number of values for array');\n    }\n\n    model.context.uniform3f(location, a1, a2, a3);\n    return true;\n  };\n\n  publicAPI.setUniform3fArray = function (name, a) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    if (!Array.isArray(a) || a.length !== 3) {\n      throw new RangeError('Invalid number of values for array');\n    }\n\n    model.context.uniform3f(location, a[0], a[1], a[2]);\n    return true;\n  };\n\n  publicAPI.setUniform3fv = function (name, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    model.context.uniform3fv(location, v);\n    return true;\n  };\n\n  publicAPI.setUniform3i = function (name) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    var array = args; // allow an array passed as a single argument\n\n    if (array.length === 1 && Array.isArray(array[0])) {\n      array = array[0];\n    }\n\n    if (array.length !== 3) {\n      throw new RangeError('Invalid number of values for array');\n    }\n\n    model.context.uniform3i(location, array[0], array[1], array[2]);\n    return true;\n  };\n\n  publicAPI.setUniform3iv = function (name, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    model.context.uniform3iv(location, v);\n    return true;\n  };\n\n  publicAPI.setUniform4f = function (name) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n      args[_key2 - 1] = arguments[_key2];\n    }\n\n    var array = args; // allow an array passed as a single argument\n\n    if (array.length === 1 && Array.isArray(array[0])) {\n      array = array[0];\n    }\n\n    if (array.length !== 4) {\n      throw new RangeError('Invalid number of values for array');\n    }\n\n    model.context.uniform4f(location, array[0], array[1], array[2], array[3]);\n    return true;\n  };\n\n  publicAPI.setUniform4fv = function (name, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    model.context.uniform4fv(location, v);\n    return true;\n  };\n\n  publicAPI.setUniform4i = function (name) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n      args[_key3 - 1] = arguments[_key3];\n    }\n\n    var array = args; // allow an array passed as a single argument\n\n    if (array.length === 1 && Array.isArray(array[0])) {\n      array = array[0];\n    }\n\n    if (array.length !== 4) {\n      throw new RangeError('Invalid number of values for array');\n    }\n\n    model.context.uniform4i(location, array[0], array[1], array[2], array[3]);\n    return true;\n  };\n\n  publicAPI.setUniform4iv = function (name, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    model.context.uniform4iv(location, v);\n    return true;\n  };\n\n  publicAPI.setUniform4fv = function (name, count, v) {\n    var location = publicAPI.findUniform(name);\n\n    if (location === -1) {\n      model.error = \"Could not set uniform \".concat(name, \" . No such uniform.\");\n      return false;\n    }\n\n    model.context.uniform4fv(location, v);\n    return true;\n  };\n\n  publicAPI.findUniform = function (name) {\n    if (!name || !model.linked) {\n      return -1;\n    } // see if we have cached the result\n\n\n    var loc = model.uniformLocs[name];\n\n    if (loc !== undefined) {\n      return loc;\n    }\n\n    loc = model.context.getUniformLocation(model.handle, name);\n\n    if (loc === null) {\n      model.error = \"Uniform \".concat(name, \" not found in current shader program.\");\n      model.uniformLocs[name] = -1;\n      return -1;\n    }\n\n    model.uniformLocs[name] = loc;\n    return loc;\n  };\n\n  publicAPI.isUniformUsed = function (name) {\n    if (!name) {\n      return false;\n    } // see if we have cached the result\n\n\n    var loc = model.uniformLocs[name];\n\n    if (loc !== undefined) {\n      return loc !== null;\n    }\n\n    if (!model.linked) {\n      vtkErrorMacro('attempt to find uniform when the shader program is not linked');\n      return false;\n    }\n\n    loc = model.context.getUniformLocation(model.handle, name);\n    model.uniformLocs[name] = loc;\n\n    if (loc === null) {\n      return false;\n    }\n\n    return true;\n  };\n\n  publicAPI.isAttributeUsed = function (name) {\n    if (!name) {\n      return false;\n    } // see if we have cached the result\n\n\n    var loc = Object.keys(model.attributeLocs).indexOf(name);\n\n    if (loc !== -1) {\n      return true;\n    }\n\n    if (!model.linked) {\n      vtkErrorMacro('attempt to find uniform when the shader program is not linked');\n      return false;\n    }\n\n    loc = model.context.getAttribLocation(model.handle, name);\n\n    if (loc === -1) {\n      return false;\n    }\n\n    model.attributeLocs[name] = loc;\n    return true;\n  };\n\n  publicAPI.attachShader = function (shader) {\n    if (shader.getHandle() === 0) {\n      model.error = 'Shader object was not initialized, cannot attach it.';\n      return false;\n    }\n\n    if (shader.getShaderType() === 'Unknown') {\n      model.error = 'Shader object is of type Unknown and cannot be used.';\n      return false;\n    }\n\n    if (model.handle === 0) {\n      var thandle = model.context.createProgram();\n\n      if (thandle === 0) {\n        model.error = 'Could not create shader program.';\n        return false;\n      }\n\n      model.handle = thandle;\n      model.linked = false;\n    }\n\n    if (shader.getShaderType() === 'Vertex') {\n      if (model.vertexShaderHandle !== 0) {\n        model.comntext.detachShader(model.handle, model.vertexShaderHandle);\n      }\n\n      model.vertexShaderHandle = shader.getHandle();\n    }\n\n    if (shader.getShaderType() === 'Fragment') {\n      if (model.fragmentShaderHandle !== 0) {\n        model.context.detachShader(model.handle, model.fragmentShaderHandle);\n      }\n\n      model.fragmentShaderHandle = shader.getHandle();\n    }\n\n    model.context.attachShader(model.handle, shader.getHandle());\n    publicAPI.setLinked(false);\n    return true;\n  };\n\n  publicAPI.detachShader = function (shader) {\n    if (shader.getHandle() === 0) {\n      model.error = 'shader object was not initialized, cannot attach it.';\n      return false;\n    }\n\n    if (shader.getShaderType() === 'Unknown') {\n      model.error = 'Shader object is of type Unknown and cannot be used.';\n      return false;\n    }\n\n    if (model.handle === 0) {\n      model.error = 'This shader program has not been initialized yet.';\n    }\n\n    switch (shader.getShaderType()) {\n      case 'Vertex':\n        if (model.vertexShaderHandle !== shader.getHandle()) {\n          model.error = 'The supplied shader was not attached to this program.';\n          return false;\n        }\n\n        model.context.detachShader(model.handle, shader.getHandle());\n        model.vertexShaderHandle = 0;\n        model.linked = false;\n        return true;\n\n      case 'Fragment':\n        if (model.fragmentShaderHandle !== shader.getHandle()) {\n          model.error = 'The supplied shader was not attached to this program.';\n          return false;\n        }\n\n        model.context.detachShader(model.handle, shader.getHandle());\n        model.fragmentShaderHandle = 0;\n        model.linked = false;\n        return true;\n\n      default:\n        return false;\n    }\n  };\n\n  publicAPI.setContext = function (ctx) {\n    model.context = ctx;\n    model.vertexShader.setContext(ctx);\n    model.fragmentShader.setContext(ctx);\n    model.geometryShader.setContext(ctx);\n  };\n\n  publicAPI.setLastCameraMTime = function (mtime) {\n    model.lastCameraMTime = mtime;\n  }; // publicAPI.enableAttributeArray = (name) => {\n  //   const location = publicAPI.findAttributeArray(name);\n  //   if (location === -1) {\n  //     model.error = `Could not enable attribute ${name} No such attribute.`;\n  //     return false;\n  //   }\n  //   model.context.enableVertexAttribArray(location);\n  //   return true;\n  // };\n  // publicAPI.disableAttributeArray = (name) => {\n  //   const location = publicAPI.findAttributeArray(name);\n  //   if (location === -1) {\n  //     model.error = `Could not enable attribute ${name} No such attribute.`;\n  //     return false;\n  //   }\n  //   model.context.disableVertexAttribArray(location);\n  //   return true;\n  // };\n\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  vertexShaderHandle: 0,\n  fragmentShaderHandle: 0,\n  geometryShaderHandle: 0,\n  vertexShader: null,\n  fragmentShader: null,\n  geometryShader: null,\n  linked: false,\n  bound: false,\n  compiled: false,\n  error: '',\n  handle: 0,\n  numberOfOutputs: 0,\n  attributesLocs: null,\n  uniformLocs: null,\n  md5Hash: 0,\n  context: null,\n  lastCameraMTime: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Instantiate internal objects\n\n  model.attributesLocs = {};\n  model.uniformLocs = {};\n  model.vertexShader = _Shader_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n  model.vertexShader.setShaderType('Vertex');\n  model.fragmentShader = _Shader_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n  model.fragmentShader.setShaderType('Fragment');\n  model.geometryShader = _Shader_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n  model.geometryShader.setShaderType('Geometry'); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['lastCameraMTime']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['error', 'handle', 'compiled', 'bound', 'md5Hash', 'vertexShader', 'fragmentShader', 'geometryShader', 'linked']); // Object methods\n\n  vtkShaderProgram(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkShaderProgram'); // ----------------------------------------------------------------------------\n\nvar vtkShaderProgram$1 = {\n  newInstance: newInstance,\n  extend: extend,\n  substitute: substitute\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkShaderProgram$1);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/ShaderProgram.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/Skybox.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/Skybox.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Core/DataArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n/* harmony import */ var _Helper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Helper.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Helper.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _Texture_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Texture.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Texture.js\");\n/* harmony import */ var _Core_Property_Constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Core/Property/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Property/Constants.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ViewNodeFactory.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat3.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n\n\n\n\n\n\n\n\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkErrorMacro; // ----------------------------------------------------------------------------\n// vtkOpenGLSkybox methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLSkybox(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLSkybox'); // Builds myself.\n\n  publicAPI.buildPass = function (prepass) {\n    if (prepass) {\n      model.openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');\n      model.openGLRenderWindow = model.openGLRenderer.getParent();\n      model.context = model.openGLRenderWindow.getContext();\n      model.tris.setOpenGLRenderWindow(model.openGLRenderWindow);\n      model.openGLTexture.setOpenGLRenderWindow(model.openGLRenderWindow);\n      var ren = model.openGLRenderer.getRenderable();\n      model.openGLCamera = model.openGLRenderer.getViewNodeFor(ren.getActiveCamera());\n    }\n  };\n\n  publicAPI.queryPass = function (prepass, renderPass) {\n    if (prepass) {\n      if (!model.renderable || !model.renderable.getVisibility()) {\n        return;\n      }\n\n      renderPass.incrementOpaqueActorCount();\n    }\n  };\n\n  publicAPI.opaquePass = function (prepass, renderPass) {\n    if (prepass && !model.openGLRenderer.getSelector()) {\n      publicAPI.updateBufferObjects();\n      model.openGLRenderWindow.enableDepthMask();\n      model.openGLRenderWindow.getShaderCache().readyShaderProgram(model.tris.getProgram());\n      model.openGLTexture.render(model.openGLRenderWindow);\n      var texUnit = model.openGLTexture.getTextureUnit();\n      model.tris.getProgram().setUniformi('sbtexture', texUnit);\n      var ren = model.openGLRenderer.getRenderable();\n      var keyMats = model.openGLCamera.getKeyMatrices(ren);\n      var imat = new Float64Array(16);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__.i)(imat, keyMats.wcpc);\n      model.tris.getProgram().setUniformMatrix('IMCPCMatrix', imat);\n\n      if (model.lastFormat === 'box') {\n        var camPos = ren.getActiveCamera().getPosition();\n        model.tris.getProgram().setUniform3f('camPos', camPos[0], camPos[1], camPos[2]);\n      }\n\n      model.tris.getVAO().bind(); // draw polygons\n\n      model.context.drawArrays(model.context.TRIANGLES, 0, model.tris.getCABO().getElementCount());\n      model.tris.getVAO().release();\n      model.openGLTexture.deactivate();\n    }\n  };\n\n  publicAPI.updateBufferObjects = function () {\n    // build the VBO if needed, only happens once\n    if (!model.tris.getCABO().getElementCount()) {\n      var ptsArray = new Float32Array(12);\n\n      for (var i = 0; i < 4; i++) {\n        ptsArray[i * 3] = i % 2 * 2 - 1.0;\n        ptsArray[i * 3 + 1] = i > 1 ? 1.0 : -1.0;\n        ptsArray[i * 3 + 2] = 1.0;\n      }\n\n      var points = _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance({\n        numberOfComponents: 3,\n        values: ptsArray\n      });\n      points.setName('points');\n      var cellArray = new Uint16Array(8);\n      cellArray[0] = 3;\n      cellArray[1] = 0;\n      cellArray[2] = 1;\n      cellArray[3] = 3;\n      cellArray[4] = 3;\n      cellArray[5] = 0;\n      cellArray[6] = 3;\n      cellArray[7] = 2;\n      var cells = _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance({\n        numberOfComponents: 1,\n        values: cellArray\n      });\n      model.tris.getCABO().createVBO(cells, 'polys', _Core_Property_Constants_js__WEBPACK_IMPORTED_MODULE_5__.Representation.SURFACE, {\n        points: points,\n        cellOffset: 0\n      });\n    } // update the program?\n\n\n    if (model.renderable.getFormat() !== model.lastFormat) {\n      model.lastFormat = model.renderable.getFormat();\n\n      if (model.lastFormat === 'box') {\n        // we invert Y below because opengl is messed up!\n        // Cube Maps have been specified to follow the RenderMan\n        // specification (for whatever reason), and RenderMan\n        // assumes the images' origin being in the upper left,\n        // contrary to the usual OpenGL behaviour of having the\n        // image origin in the lower left. That's why things get\n        // swapped in the Y direction. It totally breaks with the usual\n        // OpenGL semantics and doesn't make sense at all.\n        // But now we're stuck with it.  From\n        // https://stackoverflow.com/questions/11685608/convention-of-faces-in-opengl-cubemapping\n        //\n        model.tris.setProgram(model.openGLRenderWindow.getShaderCache().readyShaderProgramArray(\"//VTK::System::Dec\\n             attribute vec3 vertexMC;\\n             uniform mat4 IMCPCMatrix;\\n             varying vec3 TexCoords;\\n             void main () {\\n              gl_Position = vec4(vertexMC.xyz, 1.0);\\n              vec4 wpos = IMCPCMatrix * gl_Position;\\n              TexCoords = wpos.xyz/wpos.w;\\n             }\", \"//VTK::System::Dec\\n             //VTK::Output::Dec\\n             varying vec3 TexCoords;\\n             uniform samplerCube sbtexture;\\n             uniform vec3 camPos;\\n             void main () {\\n               // skybox looks from inside out\\n               // which means we have to adjust\\n               // our tcoords. Otherwise text would\\n               // be flipped\\n               vec3 tc = normalize(TexCoords - camPos);\\n               if (abs(tc.z) < max(abs(tc.x),abs(tc.y)))\\n               {\\n                 tc = vec3(1.0, 1.0, -1.0) * tc;\\n               }\\n               else\\n               {\\n                 tc = vec3(-1.0, 1.0, 1.0) * tc;\\n               }\\n               gl_FragData[0] = textureCube(sbtexture, tc);\\n             }\", ''));\n      }\n\n      if (model.lastFormat === 'background') {\n        // maps the texture to the window\n        model.tris.setProgram(model.openGLRenderWindow.getShaderCache().readyShaderProgramArray(\"//VTK::System::Dec\\n             attribute vec3 vertexMC;\\n             uniform mat4 IMCPCMatrix;\\n             varying vec2 TexCoords;\\n             void main () {\\n              gl_Position = vec4(vertexMC.xyz, 1.0);\\n              vec4 wpos = IMCPCMatrix * gl_Position;\\n              TexCoords = vec2(vertexMC.x, vertexMC.y)*0.5 + 0.5;\\n             }\", \"//VTK::System::Dec\\n             //VTK::Output::Dec\\n             varying vec2 TexCoords;\\n             uniform sampler2D sbtexture;\\n             void main () {\\n               gl_FragData[0] = texture2D(sbtexture, TexCoords);\\n             }\", ''));\n      }\n\n      model.tris.getShaderSourceTime().modified();\n      model.tris.getVAO().bind();\n\n      if (!model.tris.getVAO().addAttributeArray(model.tris.getProgram(), model.tris.getCABO(), 'vertexMC', model.tris.getCABO().getVertexOffset(), model.tris.getCABO().getStride(), model.context.FLOAT, 3, model.context.FALSE)) {\n        vtkErrorMacro('Error setting vertexMC in shader VAO.');\n      }\n    } // set/update the texture map if needed\n\n\n    var tmaps = model.renderable.getTextures();\n\n    if (!tmaps.length) {\n      vtkErrorMacro('vtkSkybox requires a texture map');\n    }\n\n    if (model.openGLTexture.getRenderable() !== tmaps[0]) {\n      model.openGLTexture.releaseGraphicsResources(model.openGLRenderWindow);\n      model.openGLTexture.setRenderable(tmaps[0]);\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  context: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_3__.default.extend(publicAPI, model, initialValues);\n  model.openGLTexture = _Texture_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n  model.tris = _Helper_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n  model.keyMatrixTime = {};\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.obj)(model.keyMatrixTime, {\n    mtime: 0\n  });\n  model.keyMatrices = {\n    normalMatrix: (0,_vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_7__.i)(new Float64Array(9)),\n    mcwc: (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__.a)(new Float64Array(16))\n  }; // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['context']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.get)(publicAPI, model, ['activeTextures']); // Object methods\n\n  vtkOpenGLSkybox(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend); // ----------------------------------------------------------------------------\n\nvar vtkSkybox = {\n  newInstance: newInstance,\n  extend: extend\n}; // Register ourself to OpenGL backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_6__.registerOverride)('vtkSkybox', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkSkybox);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/Skybox.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/Texture.js":
/*!******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/Texture.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _Texture_Constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Texture/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Texture/Constants.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Core/DataArray.js */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/ViewNodeFactory.js\");\n\n\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar Wrap = _Texture_Constants_js__WEBPACK_IMPORTED_MODULE_1__.default.Wrap,\n    Filter = _Texture_Constants_js__WEBPACK_IMPORTED_MODULE_1__.default.Filter;\nvar VtkDataTypes = _Common_Core_DataArray_js__WEBPACK_IMPORTED_MODULE_3__.default.VtkDataTypes;\nvar vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_2__.vtkDebugMacro,\n    vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_2__.vtkErrorMacro,\n    vtkWarningMacro = _macro_js__WEBPACK_IMPORTED_MODULE_2__.vtkWarningMacro; // ----------------------------------------------------------------------------\n// vtkOpenGLTexture methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLTexture(publicAPI, model) {\n  var _this = this;\n\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLTexture'); // Renders myself\n\n  publicAPI.render = function () {\n    var renWin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n    if (renWin) {\n      model.openGLRenderWindow = renWin;\n    } else {\n      model.openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer'); // sync renderable properties\n\n      model.openGLRenderWindow = model.openGLRenderer.getParent();\n    }\n\n    model.context = model.openGLRenderWindow.getContext();\n\n    if (model.renderable.getInterpolate()) {\n      if (model.generateMipmap) {\n        publicAPI.setMinificationFilter(Filter.LINEAR_MIPMAP_LINEAR);\n      } else {\n        publicAPI.setMinificationFilter(Filter.LINEAR);\n      }\n\n      publicAPI.setMagnificationFilter(Filter.LINEAR);\n    } else {\n      publicAPI.setMinificationFilter(Filter.NEAREST);\n      publicAPI.setMagnificationFilter(Filter.NEAREST);\n    }\n\n    if (model.renderable.getRepeat()) {\n      publicAPI.setWrapR(Wrap.REPEAT);\n      publicAPI.setWrapS(Wrap.REPEAT);\n      publicAPI.setWrapT(Wrap.REPEAT);\n    } // clear image if input data is set\n\n\n    if (model.renderable.getInputData()) {\n      model.renderable.setImage(null);\n    } // create the texture if it is not done already\n\n\n    if (!model.handle || model.renderable.getMTime() > model.textureBuildTime.getMTime()) {\n      // if we have an Image\n      if (model.renderable.getImage() !== null) {\n        if (model.renderable.getInterpolate()) {\n          model.generateMipmap = true;\n          publicAPI.setMinificationFilter(Filter.LINEAR_MIPMAP_LINEAR);\n        } // Have an Image which may not be complete\n\n\n        if (model.renderable.getImage() && model.renderable.getImageLoaded()) {\n          publicAPI.create2DFromImage(model.renderable.getImage());\n          publicAPI.activate();\n          publicAPI.sendParameters();\n          model.textureBuildTime.modified();\n        }\n      } // if we have Inputdata\n\n\n      var input = model.renderable.getInputData(0);\n\n      if (input && input.getPointData().getScalars()) {\n        var ext = input.getExtent();\n        var inScalars = input.getPointData().getScalars(); // do we have a cube map? Six inputs\n\n        var data = [];\n\n        for (var i = 0; i < model.renderable.getNumberOfInputPorts(); ++i) {\n          var indata = model.renderable.getInputData(i);\n          var scalars = indata ? indata.getPointData().getScalars().getData() : null;\n\n          if (scalars) {\n            data.push(scalars);\n          }\n        }\n\n        if (model.renderable.getInterpolate() && inScalars.getNumberOfComponents() === 4) {\n          model.generateMipmap = true;\n          publicAPI.setMinificationFilter(Filter.LINEAR_MIPMAP_LINEAR);\n        }\n\n        if (data.length % 6 === 0) {\n          publicAPI.createCubeFromRaw(ext[1] - ext[0] + 1, ext[3] - ext[2] + 1, inScalars.getNumberOfComponents(), inScalars.getDataType(), data);\n        } else {\n          publicAPI.create2DFromRaw(ext[1] - ext[0] + 1, ext[3] - ext[2] + 1, inScalars.getNumberOfComponents(), inScalars.getDataType(), inScalars.getData());\n        }\n\n        publicAPI.activate();\n        publicAPI.sendParameters();\n        model.textureBuildTime.modified();\n      }\n    }\n\n    if (model.handle) {\n      publicAPI.activate();\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.destroyTexture = function () {\n    // deactivate it first\n    publicAPI.deactivate();\n\n    if (model.context && model.handle) {\n      model.context.deleteTexture(model.handle);\n    }\n\n    model.handle = 0;\n    model.numberOfDimensions = 0;\n    model.target = 0;\n    model.components = 0;\n    model.width = 0;\n    model.height = 0;\n    model.depth = 0;\n    publicAPI.resetFormatAndType();\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.createTexture = function () {\n    // reuse the existing handle if we have one\n    if (!model.handle) {\n      model.handle = model.context.createTexture();\n\n      if (model.target) {\n        model.context.bindTexture(model.target, model.handle); // See: http://www.openmodel.context..org/wiki/Common_Mistakes#Creating_a_complete_texture\n        // turn off mip map filter or set the base and max level correctly. here\n        // both are done.\n\n        model.context.texParameteri(model.target, model.context.TEXTURE_MIN_FILTER, publicAPI.getOpenGLFilterMode(model.minificationFilter));\n        model.context.texParameteri(model.target, model.context.TEXTURE_MAG_FILTER, publicAPI.getOpenGLFilterMode(model.magnificationFilter));\n        model.context.texParameteri(model.target, model.context.TEXTURE_WRAP_S, publicAPI.getOpenGLWrapMode(model.wrapS));\n        model.context.texParameteri(model.target, model.context.TEXTURE_WRAP_T, publicAPI.getOpenGLWrapMode(model.wrapT));\n\n        if (model.openGLRenderWindow.getWebgl2()) {\n          model.context.texParameteri(model.target, model.context.TEXTURE_WRAP_R, publicAPI.getOpenGLWrapMode(model.wrapR));\n        }\n\n        model.context.bindTexture(model.target, null);\n      }\n    }\n  }; //---------------------------------------------------------------------------\n\n\n  publicAPI.getTextureUnit = function () {\n    if (model.openGLRenderWindow) {\n      return model.openGLRenderWindow.getTextureUnitForTexture(publicAPI);\n    }\n\n    return -1;\n  }; //---------------------------------------------------------------------------\n\n\n  publicAPI.activate = function () {\n    // activate a free texture unit for this texture\n    model.openGLRenderWindow.activateTexture(publicAPI);\n    publicAPI.bind();\n  }; //---------------------------------------------------------------------------\n\n\n  publicAPI.deactivate = function () {\n    if (model.openGLRenderWindow) {\n      model.openGLRenderWindow.deactivateTexture(publicAPI);\n    }\n  }; //---------------------------------------------------------------------------\n\n\n  publicAPI.releaseGraphicsResources = function (rwin) {\n    if (rwin && model.handle) {\n      rwin.activateTexture(publicAPI);\n      rwin.deactivateTexture(publicAPI);\n      model.context.deleteTexture(model.handle);\n      model.handle = 0;\n      model.numberOfDimensions = 0;\n      model.target = 0;\n      model.internalFormat = 0;\n      model.format = 0;\n      model.openGLDataType = 0;\n      model.components = 0;\n      model.width = 0;\n      model.height = 0;\n      model.depth = 0;\n    }\n\n    if (model.shaderProgram) {\n      model.shaderProgram.releaseGraphicsResources(rwin);\n      model.shaderProgram = null;\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.bind = function () {\n    model.context.bindTexture(model.target, model.handle);\n\n    if (model.autoParameters && publicAPI.getMTime() > model.sendParametersTime.getMTime()) {\n      publicAPI.sendParameters();\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.isBound = function () {\n    var result = false;\n\n    if (model.context && model.handle) {\n      var target = 0;\n\n      switch (model.target) {\n        case model.context.TEXTURE_2D:\n          target = model.context.TEXTURE_BINDING_2D;\n          break;\n\n        default:\n          vtkWarningMacro('impossible case');\n          break;\n      }\n\n      var oid = model.context.getIntegerv(target);\n      result = oid === model.handle;\n    }\n\n    return result;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.sendParameters = function () {\n    model.context.texParameteri(model.target, model.context.TEXTURE_WRAP_S, publicAPI.getOpenGLWrapMode(model.wrapS));\n    model.context.texParameteri(model.target, model.context.TEXTURE_WRAP_T, publicAPI.getOpenGLWrapMode(model.wrapT));\n\n    if (model.openGLRenderWindow.getWebgl2()) {\n      model.context.texParameteri(model.target, model.context.TEXTURE_WRAP_R, publicAPI.getOpenGLWrapMode(model.wrapR));\n    }\n\n    model.context.texParameteri(model.target, model.context.TEXTURE_MIN_FILTER, publicAPI.getOpenGLFilterMode(model.minificationFilter));\n    model.context.texParameteri(model.target, model.context.TEXTURE_MAG_FILTER, publicAPI.getOpenGLFilterMode(model.magnificationFilter));\n\n    if (model.openGLRenderWindow.getWebgl2()) {\n      model.context.texParameteri(model.target, model.context.TEXTURE_BASE_LEVEL, model.baseLevel);\n      model.context.texParameteri(model.target, model.context.TEXTURE_MAX_LEVEL, model.maxLevel);\n    } // model.context.texParameterf(model.target, model.context.TEXTURE_MIN_LOD, model.minLOD);\n    // model.context.texParameterf(model.target, model.context.TEXTURE_MAX_LOD, model.maxLOD);\n\n\n    model.sendParametersTime.modified();\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getInternalFormat = function (vtktype, numComps) {\n    if (!model.internalFormat) {\n      model.internalFormat = publicAPI.getDefaultInternalFormat(vtktype, numComps);\n    }\n\n    if (!model.internalFormat) {\n      vtkDebugMacro(\"Unable to find suitable internal format for T=\".concat(vtktype, \" NC= \").concat(numComps));\n    }\n\n    return model.internalFormat;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getDefaultInternalFormat = function (vtktype, numComps) {\n    var result = 0; // try default next\n\n    result = model.openGLRenderWindow.getDefaultTextureInternalFormat(vtktype, numComps, false);\n\n    if (result) {\n      return result;\n    } // try floating point\n\n\n    result = _this.openGLRenderWindow.getDefaultTextureInternalFormat(vtktype, numComps, true);\n\n    if (!result) {\n      vtkDebugMacro('Unsupported internal texture type!');\n      vtkDebugMacro(\"Unable to find suitable internal format for T=\".concat(vtktype, \" NC= \").concat(numComps));\n    }\n\n    return result;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.setInternalFormat = function (iFormat) {\n    if (iFormat !== model.internalFormat) {\n      model.internalFormat = iFormat;\n      publicAPI.modified();\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getFormat = function (vtktype, numComps) {\n    model.format = publicAPI.getDefaultFormat(vtktype, numComps);\n    return model.format;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getDefaultFormat = function (vtktype, numComps) {\n    if (model.openGLRenderWindow.getWebgl2()) {\n      switch (numComps) {\n        case 1:\n          return model.context.RED;\n\n        case 2:\n          return model.context.RG;\n\n        case 3:\n          return model.context.RGB;\n\n        case 4:\n          return model.context.RGBA;\n\n        default:\n          return model.context.RGB;\n      }\n    } else {\n      // webgl1\n      switch (numComps) {\n        case 1:\n          return model.context.LUMINANCE;\n\n        case 2:\n          return model.context.LUMINANCE_ALPHA;\n\n        case 3:\n          return model.context.RGB;\n\n        case 4:\n          return model.context.RGBA;\n\n        default:\n          return model.context.RGB;\n      }\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.resetFormatAndType = function () {\n    model.format = 0;\n    model.internalFormat = 0;\n    model.openGLDataType = 0;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getDefaultDataType = function (vtkScalarType) {\n    // DON'T DEAL with VTK_CHAR as this is platform dependent.\n    if (model.openGLRenderWindow.getWebgl2()) {\n      switch (vtkScalarType) {\n        // case VtkDataTypes.SIGNED_CHAR:\n        //   return model.context.BYTE;\n        case VtkDataTypes.UNSIGNED_CHAR:\n          return model.context.UNSIGNED_BYTE;\n        // case VtkDataTypes.SHORT:\n        //   return model.context.SHORT;\n        // case VtkDataTypes.UNSIGNED_SHORT:\n        //   return model.context.UNSIGNED_SHORT;\n        // case VtkDataTypes.INT:\n        //   return model.context.INT;\n        // case VtkDataTypes.UNSIGNED_INT:\n        //   return model.context.UNSIGNED_INT;\n\n        case VtkDataTypes.FLOAT:\n        case VtkDataTypes.VOID: // used for depth component textures.\n\n        default:\n          return model.context.FLOAT;\n      }\n    }\n\n    switch (vtkScalarType) {\n      // case VtkDataTypes.SIGNED_CHAR:\n      //   return model.context.BYTE;\n      case VtkDataTypes.UNSIGNED_CHAR:\n        return model.context.UNSIGNED_BYTE;\n      // case VtkDataTypes.SHORT:\n      //   return model.context.SHORT;\n      // case VtkDataTypes.UNSIGNED_SHORT:\n      //   return model.context.UNSIGNED_SHORT;\n      // case VtkDataTypes.INT:\n      //   return model.context.INT;\n      // case VtkDataTypes.UNSIGNED_INT:\n      //   return model.context.UNSIGNED_INT;\n\n      case VtkDataTypes.FLOAT:\n      case VtkDataTypes.VOID: // used for depth component textures.\n\n      default:\n        if (model.context.getExtension('OES_texture_float') && model.context.getExtension('OES_texture_float_linear')) {\n          return model.context.FLOAT;\n        }\n\n        return model.context.UNSIGNED_BYTE;\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getOpenGLDataType = function (vtkScalarType) {\n    model.openGLDataType = publicAPI.getDefaultDataType(vtkScalarType);\n    return model.openGLDataType;\n  };\n\n  publicAPI.getShiftAndScale = function () {\n    var shift = 0.0;\n    var scale = 1.0; // for all float type internal formats\n\n    switch (model.openGLDataType) {\n      case model.context.BYTE:\n        scale = 127.5;\n        shift = scale - 128.0;\n        break;\n\n      case model.context.UNSIGNED_BYTE:\n        scale = 255.0;\n        shift = 0.0;\n        break;\n\n      case model.context.SHORT:\n        scale = 32767.5;\n        shift = scale - 32768.0;\n        break;\n\n      case model.context.UNSIGNED_SHORT:\n        scale = 65536.0;\n        shift = 0.0;\n        break;\n\n      case model.context.INT:\n        scale = 2147483647.5;\n        shift = scale - 2147483648.0;\n        break;\n\n      case model.context.UNSIGNED_INT:\n        scale = 4294967295.0;\n        shift = 0.0;\n        break;\n\n      case model.context.FLOAT:\n    }\n\n    return {\n      shift: shift,\n      scale: scale\n    };\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getOpenGLFilterMode = function (emode) {\n    switch (emode) {\n      case Filter.NEAREST:\n        return model.context.NEAREST;\n\n      case Filter.LINEAR:\n        return model.context.LINEAR;\n\n      case Filter.NEAREST_MIPMAP_NEAREST:\n        return model.context.NEAREST_MIPMAP_NEAREST;\n\n      case Filter.NEAREST_MIPMAP_LINEAR:\n        return model.context.NEAREST_MIPMAP_LINEAR;\n\n      case Filter.LINEAR_MIPMAP_NEAREST:\n        return model.context.LINEAR_MIPMAP_NEAREST;\n\n      case Filter.LINEAR_MIPMAP_LINEAR:\n        return model.context.LINEAR_MIPMAP_LINEAR;\n\n      default:\n        return model.context.NEAREST;\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getOpenGLWrapMode = function (vtktype) {\n    switch (vtktype) {\n      case Wrap.CLAMP_TO_EDGE:\n        return model.context.CLAMP_TO_EDGE;\n\n      case Wrap.REPEAT:\n        return model.context.REPEAT;\n\n      case Wrap.MIRRORED_REPEAT:\n        return model.context.MIRRORED_REPEAT;\n\n      default:\n        return model.context.CLAMP_TO_EDGE;\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  function updateArrayDataType(dataType, data) {\n    var pixData = []; // if the opengl data type is float\n    // then the data array must be float\n\n    if (dataType !== VtkDataTypes.FLOAT && model.openGLDataType === model.context.FLOAT) {\n      var pixCount = model.width * model.height * model.components;\n\n      for (var idx = 0; idx < data.length; idx++) {\n        var newArray = new Float32Array(pixCount);\n\n        for (var i = 0; i < pixCount; i++) {\n          newArray[i] = data[idx][i];\n        }\n\n        pixData.push(newArray);\n      }\n    } // if the opengl data type is ubyte\n    // then the data array must be u8, we currently simply truncate the data\n\n\n    if (dataType !== VtkDataTypes.UNSIGNED_CHAR && model.openGLDataType === model.context.UNSIGNED_BYTE) {\n      var _pixCount = model.width * model.height * model.components;\n\n      for (var _idx = 0; _idx < data.length; _idx++) {\n        var _newArray = new Uint8Array(_pixCount);\n\n        for (var _i = 0; _i < _pixCount; _i++) {\n          _newArray[_i] = data[_idx][_i];\n        }\n\n        pixData.push(_newArray);\n      }\n    } // The output has to be filled\n\n\n    if (pixData.length === 0) {\n      for (var _i2 = 0; _i2 < data.length; _i2++) {\n        pixData.push(data[_i2]);\n      }\n    }\n\n    return pixData;\n  } //----------------------------------------------------------------------------\n\n\n  function scaleTextureToHighestPowerOfTwo(data) {\n    if (model.openGLRenderWindow.getWebgl2()) {\n      // No need if webGL2\n      return data;\n    }\n\n    var pixData = [];\n    var width = model.width;\n    var height = model.height;\n    var numComps = model.components;\n\n    if (data && (!(0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.P)(width) || !(0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.P)(height))) {\n      // Scale up the texture to the next highest power of two dimensions.\n      var newWidth = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.K)(width);\n      var newHeight = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.K)(height);\n      var pixCount = newWidth * newHeight * model.components;\n\n      for (var idx = 0; idx < data.length; idx++) {\n        if (data[idx] !== null) {\n          var newArray = null;\n\n          switch (model.openGLDataType) {\n            case model.context.FLOAT:\n              newArray = new Float32Array(pixCount);\n              break;\n\n            default:\n            case model.context.UNSIGNED_BYTE:\n              newArray = new Uint8Array(pixCount);\n              break;\n          }\n\n          var jFactor = height / newHeight;\n          var iFactor = width / newWidth;\n\n          for (var j = 0; j < newHeight; j++) {\n            var joff = j * newWidth * numComps;\n            var jidx = j * jFactor;\n            var jlow = Math.floor(jidx);\n            var jhi = Math.ceil(jidx);\n\n            if (jhi >= height) {\n              jhi = height - 1;\n            }\n\n            var jmix = jidx - jlow;\n            var jmix1 = 1.0 - jmix;\n            jlow = jlow * width * numComps;\n            jhi = jhi * width * numComps;\n\n            for (var i = 0; i < newWidth; i++) {\n              var ioff = i * numComps;\n              var iidx = i * iFactor;\n              var ilow = Math.floor(iidx);\n              var ihi = Math.ceil(iidx);\n\n              if (ihi >= width) {\n                ihi = width - 1;\n              }\n\n              var imix = iidx - ilow;\n              ilow *= numComps;\n              ihi *= numComps;\n\n              for (var c = 0; c < numComps; c++) {\n                newArray[joff + ioff + c] = data[idx][jlow + ilow + c] * jmix1 * (1.0 - imix) + data[idx][jlow + ihi + c] * jmix1 * imix + data[idx][jhi + ilow + c] * jmix * (1.0 - imix) + data[idx][jhi + ihi + c] * jmix * imix;\n              }\n            }\n          }\n\n          pixData.push(newArray);\n          model.width = newWidth;\n          model.height = newHeight;\n        } else {\n          pixData.push(null);\n        }\n      }\n    } // The output has to be filled\n\n\n    if (pixData.length === 0) {\n      for (var _i3 = 0; _i3 < data.length; _i3++) {\n        pixData.push(data[_i3]);\n      }\n    }\n\n    return pixData;\n  } //----------------------------------------------------------------------------\n\n\n  publicAPI.create2DFromRaw = function (width, height, numComps, dataType, data) {\n    // Now determine the texture parameters using the arguments.\n    publicAPI.getOpenGLDataType(dataType);\n    publicAPI.getInternalFormat(dataType, numComps);\n    publicAPI.getFormat(dataType, numComps);\n\n    if (!model.internalFormat || !model.format || !model.openGLDataType) {\n      vtkErrorMacro('Failed to determine texture parameters.');\n      return false;\n    }\n\n    model.target = model.context.TEXTURE_2D;\n    model.components = numComps;\n    model.width = width;\n    model.height = height;\n    model.depth = 1;\n    model.numberOfDimensions = 2;\n    model.openGLRenderWindow.activateTexture(publicAPI);\n    publicAPI.createTexture();\n    publicAPI.bind(); // Create an array of texture with one texture\n\n    var dataArray = [data];\n    var pixData = updateArrayDataType(dataType, dataArray);\n    var scaledData = scaleTextureToHighestPowerOfTwo(pixData); // Source texture data from the PBO.\n    // model.context.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n\n    model.context.pixelStorei(model.context.UNPACK_ALIGNMENT, 1);\n    model.context.texImage2D(model.target, 0, model.internalFormat, model.width, model.height, 0, model.format, model.openGLDataType, scaledData[0]);\n\n    if (model.generateMipmap) {\n      model.context.generateMipmap(model.target);\n    }\n\n    publicAPI.deactivate();\n    return true;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.createCubeFromRaw = function (width, height, numComps, dataType, data) {\n    // Now determine the texture parameters using the arguments.\n    publicAPI.getOpenGLDataType(dataType);\n    publicAPI.getInternalFormat(dataType, numComps);\n    publicAPI.getFormat(dataType, numComps);\n\n    if (!model.internalFormat || !model.format || !model.openGLDataType) {\n      vtkErrorMacro('Failed to determine texture parameters.');\n      return false;\n    }\n\n    model.target = model.context.TEXTURE_CUBE_MAP;\n    model.components = numComps;\n    model.width = width;\n    model.height = height;\n    model.depth = 1;\n    model.numberOfDimensions = 2;\n    model.openGLRenderWindow.activateTexture(publicAPI);\n    model.maxLevel = data.length / 6 - 1;\n    publicAPI.createTexture();\n    publicAPI.bind();\n    var pixData = updateArrayDataType(dataType, data);\n    var scaledData = scaleTextureToHighestPowerOfTwo(pixData); // invert the data because opengl is messed up with cube maps\n    // and uses the old renderman standard with Y going down\n    // even though it is completely at odds with OpenGL standards\n\n    var invertedData = [];\n    var widthLevel = model.width;\n    var heightLevel = model.height;\n\n    for (var i = 0; i < scaledData.length; i++) {\n      if (i % 6 === 0 && i !== 0) {\n        widthLevel /= 2;\n        heightLevel /= 2;\n      }\n\n      invertedData[i] = (0,_macro_js__WEBPACK_IMPORTED_MODULE_2__.newTypedArray)(dataType, heightLevel * widthLevel * model.components);\n\n      for (var y = 0; y < heightLevel; ++y) {\n        var row1 = y * widthLevel * model.components;\n        var row2 = (heightLevel - y - 1) * widthLevel * model.components;\n        invertedData[i].set(scaledData[i].slice(row2, row2 + widthLevel * model.components), row1);\n      }\n    } // Source texture data from the PBO.\n\n\n    model.context.pixelStorei(model.context.UNPACK_ALIGNMENT, 1); // We get the 6 images\n\n    for (var _i4 = 0; _i4 < 6; _i4++) {\n      // For each mipmap level\n      var j = 0;\n      var w = model.width;\n      var h = model.height;\n\n      while (w >= 1 && h >= 1) {\n        // In webgl 1, all levels need to be defined. So if the latest level size is\n        // 8x8, we have to add 3 more null textures (4x4, 2x2, 1x1)\n        // In webgl 2, the attribute maxLevel will be use.\n        var tempData = null;\n\n        if (j <= model.maxLevel) {\n          tempData = invertedData[6 * j + _i4];\n        }\n\n        model.context.texImage2D(model.context.TEXTURE_CUBE_MAP_POSITIVE_X + _i4, j, model.internalFormat, w, h, 0, model.format, model.openGLDataType, tempData);\n        j++;\n        w /= 2;\n        h /= 2;\n      }\n    } // generateMipmap must not be called here because we manually upload all levels\n    // if it is called, all levels will be overwritten\n\n\n    publicAPI.deactivate();\n    return true;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.createDepthFromRaw = function (width, height, dataType, data) {\n    // Now determine the texture parameters using the arguments.\n    publicAPI.getOpenGLDataType(dataType);\n    model.format = model.context.DEPTH_COMPONENT;\n\n    if (model.openGLRenderWindow.getWebgl2()) {\n      if (dataType === VtkDataTypes.FLOAT) {\n        model.internalFormat = model.context.DEPTH_COMPONENT32F;\n      } else {\n        model.internalFormat = model.context.DEPTH_COMPONENT16;\n      }\n    } else {\n      model.internalFormat = model.context.DEPTH_COMPONENT;\n    }\n\n    if (!model.internalFormat || !model.format || !model.openGLDataType) {\n      vtkErrorMacro('Failed to determine texture parameters.');\n      return false;\n    }\n\n    model.target = model.context.TEXTURE_2D;\n    model.components = 1;\n    model.width = width;\n    model.height = height;\n    model.depth = 1;\n    model.numberOfDimensions = 2;\n    model.openGLRenderWindow.activateTexture(publicAPI);\n    publicAPI.createTexture();\n    publicAPI.bind(); // Source texture data from the PBO.\n    // model.context.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n\n    model.context.pixelStorei(model.context.UNPACK_ALIGNMENT, 1);\n    model.context.texImage2D(model.target, 0, model.internalFormat, model.width, model.height, 0, model.format, model.openGLDataType, data);\n\n    if (model.generateMipmap) {\n      model.context.generateMipmap(model.target);\n    }\n\n    publicAPI.deactivate();\n    return true;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.create2DFromImage = function (image) {\n    // Now determine the texture parameters using the arguments.\n    publicAPI.getOpenGLDataType(VtkDataTypes.UNSIGNED_CHAR);\n    publicAPI.getInternalFormat(VtkDataTypes.UNSIGNED_CHAR, 4);\n    publicAPI.getFormat(VtkDataTypes.UNSIGNED_CHAR, 4);\n\n    if (!model.internalFormat || !model.format || !model.openGLDataType) {\n      vtkErrorMacro('Failed to determine texture parameters.');\n      return false;\n    }\n\n    model.target = model.context.TEXTURE_2D;\n    model.components = 4;\n    model.width = image.width;\n    model.height = image.height;\n    model.depth = 1;\n    model.numberOfDimensions = 2;\n    model.openGLRenderWindow.activateTexture(publicAPI);\n    publicAPI.createTexture();\n    publicAPI.bind(); // Source texture data from the PBO.\n    // model.context.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n\n    model.context.pixelStorei(model.context.UNPACK_ALIGNMENT, 1); // Scale up the texture to the next highest power of two dimensions (if needed) and flip y.\n\n    var needNearestPowerOfTwo = !(0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.P)(image.width) || !(0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.P)(image.height);\n    var canvas = document.createElement('canvas');\n    canvas.width = needNearestPowerOfTwo ? (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.K)(image.width) : image.width;\n    canvas.height = needNearestPowerOfTwo ? (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.K)(image.height) : image.height;\n    var ctx = canvas.getContext('2d');\n    ctx.translate(0, canvas.height);\n    ctx.scale(1, -1);\n    ctx.drawImage(image, 0, 0, image.width, image.height, 0, 0, canvas.width, canvas.height); // In Chrome 69 on Windows and Ubuntu, there is a bug that prevents some\n    // canvases from working properly with webGL textures.  By getting any\n    // image data from the canvas, this works around the bug.  See\n    // https://bugs.chromium.org/p/chromium/issues/detail?id=896307\n\n    if (navigator.userAgent.indexOf('Chrome/69') >= 0) {\n      ctx.getImageData(0, 0, 1, 1);\n    }\n\n    var safeImage = canvas;\n    model.context.texImage2D(model.target, 0, model.internalFormat, model.format, model.openGLDataType, safeImage);\n\n    if (model.generateMipmap) {\n      model.context.generateMipmap(model.target);\n    }\n\n    publicAPI.deactivate();\n    return true;\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.create3DFromRaw = function (width, height, depth, numComps, dataType, data) {\n    // Now determine the texture parameters using the arguments.\n    publicAPI.getOpenGLDataType(dataType);\n    publicAPI.getInternalFormat(dataType, numComps);\n    publicAPI.getFormat(dataType, numComps);\n\n    if (!model.internalFormat || !model.format || !model.openGLDataType) {\n      vtkErrorMacro('Failed to determine texture parameters.');\n      return false;\n    }\n\n    model.target = model.context.TEXTURE_3D;\n    model.components = numComps;\n    model.width = width;\n    model.height = height;\n    model.depth = depth;\n    model.numberOfDimensions = 3;\n    model.openGLRenderWindow.activateTexture(publicAPI);\n    publicAPI.createTexture();\n    publicAPI.bind(); // Source texture data from the PBO.\n    // model.context.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n    // model.context.pixelStorei(model.context.UNPACK_ALIGNMENT, 1);\n\n    model.context.texImage3D(model.target, 0, model.internalFormat, model.width, model.height, model.depth, 0, model.format, model.openGLDataType, data);\n\n    if (model.generateMipmap) {\n      model.context.generateMipmap(model.target);\n    }\n\n    publicAPI.deactivate();\n    return true;\n  };\n\n  function computeScaleOffsets(numComps, numPixelsIn, data) {\n    // compute min and max values per component\n    var min = [];\n    var max = [];\n\n    for (var c = 0; c < numComps; ++c) {\n      min[c] = data[c];\n      max[c] = data[c];\n    }\n\n    var count = 0;\n\n    for (var i = 0; i < numPixelsIn; ++i) {\n      for (var _c = 0; _c < numComps; ++_c) {\n        if (data[count] < min[_c]) {\n          min[_c] = data[count];\n        }\n\n        if (data[count] > max[_c]) {\n          max[_c] = data[count];\n        }\n\n        count++;\n      }\n    }\n\n    var offset = [];\n    var scale = [];\n\n    for (var _c2 = 0; _c2 < numComps; ++_c2) {\n      if (min[_c2] === max[_c2]) {\n        max[_c2] = min[_c2] + 1.0;\n      }\n\n      offset[_c2] = min[_c2];\n      scale[_c2] = max[_c2] - min[_c2];\n    }\n\n    return {\n      scale: scale,\n      offset: offset\n    };\n  } //----------------------------------------------------------------------------\n  // This method simulates a 3D texture using 2D\n\n\n  publicAPI.create3DFilterableFromRaw = function (width, height, depth, numComps, dataType, data) {\n    var numPixelsIn = width * height * depth; // initialize offset/scale\n\n    var offset = [];\n    var scale = [];\n\n    for (var c = 0; c < numComps; ++c) {\n      offset[c] = 0.0;\n      scale[c] = 1.0;\n    } // store the information, we will need it later\n    // offset and scale are the offset and scale required to get\n    // the texture value back to data values ala\n    // data = texture * scale + offset\n    // and texture = (data - offset)/scale\n\n\n    model.volumeInfo = {\n      scale: scale,\n      offset: offset,\n      width: width,\n      height: height,\n      depth: depth\n    }; // WebGL2 path, we have 3d textures etc\n\n    if (model.openGLRenderWindow.getWebgl2()) {\n      if (dataType === VtkDataTypes.FLOAT) {\n        return publicAPI.create3DFromRaw(width, height, depth, numComps, dataType, data);\n      }\n\n      if (dataType === VtkDataTypes.UNSIGNED_CHAR) {\n        for (var _c3 = 0; _c3 < numComps; ++_c3) {\n          model.volumeInfo.scale[_c3] = 255.0;\n        }\n\n        return publicAPI.create3DFromRaw(width, height, depth, numComps, dataType, data);\n      } // otherwise convert to float\n\n\n      var _newArray2 = new Float32Array(numPixelsIn * numComps); // compute min and max values\n\n\n      var _computeScaleOffsets = computeScaleOffsets(numComps, numPixelsIn, data),\n          computedOffset = _computeScaleOffsets.offset,\n          computedScale = _computeScaleOffsets.scale;\n\n      model.volumeInfo.offset = computedOffset;\n      model.volumeInfo.scale = computedScale;\n      var count = 0;\n      var scaleInverse = computedScale.map(function (s) {\n        return 1 / s;\n      });\n\n      for (var i = 0; i < numPixelsIn; i++) {\n        for (var nc = 0; nc < numComps; nc++) {\n          _newArray2[count] = (data[count] - computedOffset[nc]) * scaleInverse[nc];\n          count++;\n        }\n      }\n\n      return publicAPI.create3DFromRaw(width, height, depth, numComps, VtkDataTypes.FLOAT, _newArray2);\n    } // not webgl2, deal with webgl1, no 3d textures\n    // and maybe no float textures\n    // compute min and max values\n\n\n    var res = computeScaleOffsets(numComps, numPixelsIn, data);\n\n    var volCopyData = function volCopyData(outArray, outIdx, inValue, smin, smax) {\n      outArray[outIdx] = inValue;\n    };\n\n    var dataTypeToUse = VtkDataTypes.UNSIGNED_CHAR; // unsigned char gets used as is\n\n    if (dataType === VtkDataTypes.UNSIGNED_CHAR) {\n      for (var _c4 = 0; _c4 < numComps; ++_c4) {\n        res.offset[_c4] = 0.0;\n        res.scale[_c4] = 255.0;\n      }\n    } else if (model.context.getExtension('OES_texture_float') && model.context.getExtension('OES_texture_float_linear')) {\n      // use float textures scaled to 0.0 to 1.0\n      dataTypeToUse = VtkDataTypes.FLOAT;\n\n      volCopyData = function volCopyData(outArray, outIdx, inValue, soffset, sscale) {\n        outArray[outIdx] = (inValue - soffset) / sscale;\n      };\n    } else {\n      // worst case, scale data to uchar\n      dataTypeToUse = VtkDataTypes.UNSIGNED_CHAR;\n\n      volCopyData = function volCopyData(outArray, outIdx, inValue, soffset, sscale) {\n        outArray[outIdx] = 255.0 * (inValue - soffset) / sscale;\n      };\n    } // Now determine the texture parameters using the arguments.\n\n\n    publicAPI.getOpenGLDataType(dataTypeToUse);\n    publicAPI.getInternalFormat(dataTypeToUse, numComps);\n    publicAPI.getFormat(dataTypeToUse, numComps);\n\n    if (!model.internalFormat || !model.format || !model.openGLDataType) {\n      vtkErrorMacro('Failed to determine texture parameters.');\n      return false;\n    } // have to pack this 3D texture into pot 2D texture\n\n\n    model.target = model.context.TEXTURE_2D;\n    model.components = numComps;\n    model.depth = 1;\n    model.numberOfDimensions = 2; // MAX_TEXTURE_SIZE gives the max dimensions that can be supported by the GPU,\n    // but it doesn't mean it will fit in memory. If we have to use a float data type\n    // or 4 components, there are good chances that the texture size will blow up\n    // and could not fit in the GPU memory. Use a smaller texture size in that case,\n    // which will force a downsampling of the dataset.\n    // That problem does not occur when using webGL2 since we can pack the data in\n    // denser textures based on our data type.\n    // TODO: try to fit in the biggest supported texture, catch the gl error if it\n    // does not fix (OUT_OF_MEMORY), then attempt with smaller texture\n\n    var maxTexDim = model.context.getParameter(model.context.MAX_TEXTURE_SIZE);\n\n    if (maxTexDim > 4096 && (dataTypeToUse === VtkDataTypes.FLOAT || numComps >= 3)) {\n      maxTexDim = 4096;\n    } // compute estimate for XY subsample\n\n\n    var xstride = 1;\n    var ystride = 1;\n\n    if (numPixelsIn > maxTexDim * maxTexDim) {\n      xstride = Math.ceil(Math.sqrt(numPixelsIn / (maxTexDim * maxTexDim)));\n      ystride = xstride;\n    }\n\n    var targetWidth = Math.sqrt(numPixelsIn) / xstride;\n    targetWidth = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.K)(targetWidth); // determine X reps\n\n    var xreps = Math.floor(targetWidth * xstride / width);\n    var yreps = Math.ceil(depth / xreps);\n    var targetHeight = (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_4__.K)(height * yreps / ystride);\n    model.width = targetWidth;\n    model.height = targetHeight;\n    model.openGLRenderWindow.activateTexture(publicAPI);\n    publicAPI.createTexture();\n    publicAPI.bind(); // store the information, we will need it later\n\n    model.volumeInfo.xreps = xreps;\n    model.volumeInfo.yreps = yreps;\n    model.volumeInfo.xstride = xstride;\n    model.volumeInfo.ystride = ystride;\n    model.volumeInfo.offset = res.offset;\n    model.volumeInfo.scale = res.scale; // OK stuff the data into the 2d TEXTURE\n    // first allocate the new texture\n\n    var newArray;\n    var pixCount = targetWidth * targetHeight * numComps;\n\n    if (dataTypeToUse === VtkDataTypes.FLOAT) {\n      newArray = new Float32Array(pixCount);\n    } else {\n      newArray = new Uint8Array(pixCount);\n    } // then stuff the data into it, nothing fancy right now\n    // for stride\n\n\n    var outIdx = 0;\n    var tileWidth = Math.floor(width / xstride);\n    var tileHeight = Math.floor(height / ystride);\n\n    for (var yRep = 0; yRep < yreps; yRep++) {\n      var xrepsThisRow = Math.min(xreps, depth - yRep * xreps);\n      var outXContIncr = numComps * (model.width - xrepsThisRow * Math.floor(width / xstride));\n\n      for (var tileY = 0; tileY < tileHeight; tileY++) {\n        for (var xRep = 0; xRep < xrepsThisRow; xRep++) {\n          var inOffset = numComps * ((yRep * xreps + xRep) * width * height + ystride * tileY * width);\n\n          for (var tileX = 0; tileX < tileWidth; tileX++) {\n            // copy value\n            for (var _nc = 0; _nc < numComps; _nc++) {\n              volCopyData(newArray, outIdx, data[inOffset + xstride * tileX * numComps + _nc], res.offset[_nc], res.scale[_nc]);\n              outIdx++;\n            }\n          }\n        }\n\n        outIdx += outXContIncr;\n      }\n    } // Source texture data from the PBO.\n    // model.context.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n\n\n    model.context.pixelStorei(model.context.UNPACK_ALIGNMENT, 1);\n    model.context.texImage2D(model.target, 0, model.internalFormat, model.width, model.height, 0, model.format, model.openGLDataType, newArray);\n    publicAPI.deactivate();\n    return true;\n  };\n\n  publicAPI.setOpenGLRenderWindow = function (rw) {\n    if (model.openGLRenderWindow === rw) {\n      return;\n    }\n\n    publicAPI.releaseGraphicsResources();\n    model.openGLRenderWindow = rw;\n    model.context = null;\n\n    if (rw) {\n      model.context = model.openGLRenderWindow.getContext();\n    }\n  }; //----------------------------------------------------------------------------\n\n\n  publicAPI.getMaximumTextureSize = function (ctx) {\n    if (ctx && ctx.isCurrent()) {\n      return ctx.getIntegerv(ctx.MAX_TEXTURE_SIZE);\n    }\n\n    return -1;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  openGLRenderWindow: null,\n  context: null,\n  handle: 0,\n  sendParametersTime: null,\n  textureBuildTime: null,\n  numberOfDimensions: 0,\n  target: 0,\n  format: 0,\n  openGLDataType: 0,\n  components: 0,\n  width: 0,\n  height: 0,\n  depth: 0,\n  autoParameters: true,\n  wrapS: Wrap.CLAMP_TO_EDGE,\n  wrapT: Wrap.CLAMP_TO_EDGE,\n  wrapR: Wrap.CLAMP_TO_EDGE,\n  minificationFilter: Filter.NEAREST,\n  magnificationFilter: Filter.NEAREST,\n  minLOD: -1000.0,\n  maxLOD: 1000.0,\n  baseLevel: 0,\n  maxLevel: 1000,\n  generateMipmap: false\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_5__.default.extend(publicAPI, model, initialValues);\n  model.sendParametersTime = {};\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_2__.obj)(model.sendParametersTime, {\n    mtime: 0\n  });\n  model.textureBuildTime = {};\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_2__.obj)(model.textureBuildTime, {\n    mtime: 0\n  }); // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_2__.set)(publicAPI, model, ['format', 'openGLDataType']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_2__.setGet)(publicAPI, model, ['keyMatrixTime', 'minificationFilter', 'magnificationFilter', 'wrapS', 'wrapT', 'wrapR', 'generateMipmap']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_2__.get)(publicAPI, model, ['width', 'height', 'volumeInfo', 'components', 'handle', 'target']); // Object methods\n\n  vtkOpenGLTexture(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_2__.newInstance)(extend, 'vtkOpenGLTexture'); // ----------------------------------------------------------------------------\n\nvar vtkOpenGLTexture$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, _Texture_Constants_js__WEBPACK_IMPORTED_MODULE_1__.default); // Register ourself to OpenGL backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_6__.registerOverride)('vtkTexture', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkOpenGLTexture$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/Texture.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/Texture/Constants.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/Texture/Constants.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"Filter\": () => (/* binding */ Filter),\n/* harmony export */   \"Wrap\": () => (/* binding */ Wrap)\n/* harmony export */ });\nvar Wrap = {\n  CLAMP_TO_EDGE: 0,\n  REPEAT: 1,\n  MIRRORED_REPEAT: 2\n};\nvar Filter = {\n  NEAREST: 0,\n  LINEAR: 1,\n  NEAREST_MIPMAP_NEAREST: 2,\n  NEAREST_MIPMAP_LINEAR: 3,\n  LINEAR_MIPMAP_NEAREST: 4,\n  LINEAR_MIPMAP_LINEAR: 5\n};\nvar Constants = {\n  Wrap: Wrap,\n  Filter: Filter\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/Texture/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/TextureUnitManager.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/TextureUnitManager.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.vtkErrorMacro; // ----------------------------------------------------------------------------\n// vtkOpenGLTextureUnitManager methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLTextureUnitManager(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLTextureUnitManager'); // ----------------------------------------------------------------------------\n  // Description:\n  // Delete the allocation table and check if it is not called before\n  // all the texture units have been released.\n\n  publicAPI.deleteTable = function () {\n    for (var i = 0; i < model.numberOfTextureUnits; ++i) {\n      if (model.textureUnits[i] === true) {\n        vtkErrorMacro('some texture units  were not properly released');\n      }\n    }\n\n    model.textureUnits = [];\n    model.numberOfTextureUnits = 0;\n  }; // ----------------------------------------------------------------------------\n\n\n  publicAPI.setContext = function (ctx) {\n    if (model.context !== ctx) {\n      if (model.context !== 0) {\n        publicAPI.deleteTable();\n      }\n\n      model.context = ctx;\n\n      if (model.context) {\n        model.numberOfTextureUnits = ctx.getParameter(ctx.MAX_TEXTURE_IMAGE_UNITS);\n\n        for (var i = 0; i < model.numberOfTextureUnits; ++i) {\n          model.textureUnits[i] = false;\n        }\n      }\n\n      publicAPI.modified();\n    }\n  }; // ----------------------------------------------------------------------------\n  // Description:\n  // Reserve a texture unit. It returns its number.\n  // It returns -1 if the allocation failed (because there are no more\n  // texture units left).\n  // \\post valid_result: result==-1 || result>=0 && result<this->GetNumberOfTextureUnits())\n  // \\post allocated: result==-1 || this->IsAllocated(result)\n\n\n  publicAPI.allocate = function () {\n    for (var i = 0; i < model.numberOfTextureUnits; i++) {\n      if (!publicAPI.isAllocated(i)) {\n        model.textureUnits[i] = true;\n        return i;\n      }\n    }\n\n    return -1;\n  };\n\n  publicAPI.allocateUnit = function (unit) {\n    if (publicAPI.isAllocated(unit)) {\n      return -1;\n    }\n\n    model.textureUnits[unit] = true;\n    return unit;\n  }; // ----------------------------------------------------------------------------\n  // Description:\n  // Tell if texture unit `textureUnitId' is already allocated.\n  // \\pre valid_id_range : textureUnitId>=0 && textureUnitId<this->GetNumberOfTextureUnits()\n\n\n  publicAPI.isAllocated = function (textureUnitId) {\n    return model.textureUnits[textureUnitId];\n  }; // ----------------------------------------------------------------------------\n  // Description:\n  // Release a texture unit.\n  // \\pre valid_id: textureUnitId>=0 && textureUnitId<this->GetNumberOfTextureUnits()\n  // \\pre allocated_id: this->IsAllocated(textureUnitId)\n\n\n  publicAPI.free = function (val) {\n    model.textureUnits[val] = false;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  context: null,\n  numberOfTextureUnits: 0,\n  textureUnits: 0\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  model.textureUnits = []; // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['numberOfTextureUnits']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['context']); // Object methods\n\n  vtkOpenGLTextureUnitManager(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkOpenGLTextureUnitManager'); // ----------------------------------------------------------------------------\n\nvar vtkTextureUnitManager = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkTextureUnitManager);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/TextureUnitManager.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/VertexArrayObject.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/VertexArrayObject.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _BufferObject_Constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BufferObject/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/BufferObject/Constants.js\");\n\n\n\n// vtkOpenGLVertexArrayObject methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLVertexArrayObject(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLVertexArrayObject'); // Public API methods\n\n  publicAPI.exposedMethod = function () {// This is a publicly exposed method of this object\n  };\n\n  publicAPI.initialize = function () {\n    model.instancingExtension = null;\n\n    if (!model.openGLRenderWindow.getWebgl2()) {\n      model.instancingExtension = model.context.getExtension('ANGLE_instanced_arrays');\n    }\n\n    if (!model.forceEmulation && model.openGLRenderWindow && model.openGLRenderWindow.getWebgl2()) {\n      model.extension = null;\n      model.supported = true;\n      model.handleVAO = model.context.createVertexArray();\n    } else {\n      model.extension = model.context.getExtension('OES_vertex_array_object'); // Start setting up VAO\n\n      if (!model.forceEmulation && model.extension) {\n        model.supported = true;\n        model.handleVAO = model.extension.createVertexArrayOES();\n      } else {\n        model.supported = false;\n      }\n    }\n  };\n\n  publicAPI.isReady = function () {\n    return (// We either probed and allocated a VAO, or are falling back as the current\n      // hardware does not support VAOs.\n      model.handleVAO !== 0 || model.supported === false\n    );\n  };\n\n  publicAPI.bind = function () {\n    // Either simply bind the VAO, or emulate behavior by binding all attributes.\n    if (!publicAPI.isReady()) {\n      publicAPI.initialize();\n    }\n\n    if (publicAPI.isReady() && model.supported) {\n      if (model.extension) {\n        model.extension.bindVertexArrayOES(model.handleVAO);\n      } else {\n        model.context.bindVertexArray(model.handleVAO);\n      }\n    } else if (publicAPI.isReady()) {\n      var gl = model.context;\n\n      for (var ibuff = 0; ibuff < model.buffers.length; ++ibuff) {\n        var buff = model.buffers[ibuff];\n        model.context.bindBuffer(gl.ARRAY_BUFFER, buff.buffer);\n\n        for (var iatt = 0; iatt < buff.attributes.length; ++iatt) {\n          var attrIt = buff.attributes[iatt];\n          var matrixCount = attrIt.isMatrix ? attrIt.size : 1;\n\n          for (var i = 0; i < matrixCount; ++i) {\n            gl.enableVertexAttribArray(attrIt.index + i);\n            gl.vertexAttribPointer(attrIt.index + i, attrIt.size, attrIt.type, attrIt.normalize, attrIt.stride, attrIt.offset + attrIt.stride * i / attrIt.size);\n\n            if (attrIt.divisor > 0) {\n              if (model.instancingExtension) {\n                model.instancingExtension.vertexAttribDivisorANGLE(attrIt.index + i, 1);\n              } else {\n                gl.vertexAttribDivisor(attrIt.index + i, 1);\n              }\n            }\n          }\n        }\n      }\n    }\n  };\n\n  publicAPI.release = function () {\n    // Either simply release the VAO, or emulate behavior by releasing all attributes.\n    if (publicAPI.isReady() && model.supported) {\n      if (model.extension) {\n        model.extension.bindVertexArrayOES(null);\n      } else {\n        model.context.bindVertexArray(null);\n      }\n    } else if (publicAPI.isReady()) {\n      var gl = model.context;\n\n      for (var ibuff = 0; ibuff < model.buffers.length; ++ibuff) {\n        var buff = model.buffers[ibuff];\n        model.context.bindBuffer(gl.ARRAY_BUFFER, buff.buffer);\n\n        for (var iatt = 0; iatt < buff.attributes.length; ++iatt) {\n          var attrIt = buff.attributes[iatt];\n          var matrixCount = attrIt.isMatrix ? attrIt.size : 1;\n\n          for (var i = 0; i < matrixCount; ++i) {\n            gl.enableVertexAttribArray(attrIt.index + i);\n            gl.vertexAttribPointer(attrIt.index + i, attrIt.size, attrIt.type, attrIt.normalize, attrIt.stride, attrIt.offset + attrIt.stride * i / attrIt.size);\n\n            if (attrIt.divisor > 0) {\n              if (model.instancingExtension) {\n                model.instancingExtension.vertexAttribDivisorANGLE(attrIt.index + i, 0);\n              } else {\n                gl.vertexAttribDivisor(attrIt.index + i, 0);\n              }\n            }\n\n            gl.disableVertexAttribArray(attrIt.index + i);\n          }\n        }\n      }\n    }\n  };\n\n  publicAPI.shaderProgramChanged = function () {\n    publicAPI.release();\n\n    if (model.handleVAO) {\n      if (model.extension) {\n        model.extension.deleteVertexArrayOES(model.handleVAO);\n      } else {\n        model.context.deleteVertexArray(model.handleVAO);\n      }\n    }\n\n    model.handleVAO = 0;\n    model.handleProgram = 0;\n  };\n\n  publicAPI.releaseGraphicsResources = function () {\n    publicAPI.shaderProgramChanged();\n\n    if (model.handleVAO) {\n      if (model.extension) {\n        model.extension.deleteVertexArrayOES(model.handleVAO);\n      } else {\n        model.context.deleteVertexArray(model.handleVAO);\n      }\n    }\n\n    model.handleVAO = 0;\n    model.supported = true;\n    model.handleProgram = 0;\n  };\n\n  publicAPI.addAttributeArray = function (program, buffer, name, offset, stride, elementType, elementTupleSize, normalize) {\n    return publicAPI.addAttributeArrayWithDivisor(program, buffer, name, offset, stride, elementType, elementTupleSize, normalize, 0, false);\n  };\n\n  publicAPI.addAttributeArrayWithDivisor = function (program, buffer, name, offset, stride, elementType, elementTupleSize, normalize, divisor, isMatrix) {\n    if (!program) {\n      return false;\n    } // Check the program is bound, and the buffer is valid.\n\n\n    if (!program.isBound() || buffer.getHandle() === 0 || buffer.getType() !== _BufferObject_Constants_js__WEBPACK_IMPORTED_MODULE_1__.ObjectType.ARRAY_BUFFER) {\n      return false;\n    } // Perform initialization if necessary, ensure program matches VAOs.\n\n\n    if (model.handleProgram === 0) {\n      model.handleProgram = program.getHandle();\n    }\n\n    if (!publicAPI.isReady()) {\n      publicAPI.initialize();\n    }\n\n    if (!publicAPI.isReady() || model.handleProgram !== program.getHandle()) {\n      return false;\n    }\n\n    var gl = model.context;\n    var attribs = {};\n    attribs.name = name;\n    attribs.index = gl.getAttribLocation(model.handleProgram, name);\n    attribs.offset = offset;\n    attribs.stride = stride;\n    attribs.type = elementType;\n    attribs.size = elementTupleSize;\n    attribs.normalize = normalize;\n    attribs.isMatrix = isMatrix;\n    attribs.divisor = divisor;\n\n    if (attribs.Index === -1) {\n      return false;\n    } // Always make the call as even the first use wants the attrib pointer setting\n    // up when we are emulating.\n\n\n    buffer.bind();\n    gl.enableVertexAttribArray(attribs.index);\n    gl.vertexAttribPointer(attribs.index, attribs.size, attribs.type, attribs.normalize, attribs.stride, attribs.offset);\n\n    if (divisor > 0) {\n      if (model.instancingExtension) {\n        model.instancingExtension.vertexAttribDivisorANGLE(attribs.index, 1);\n      } else {\n        gl.vertexAttribDivisor(attribs.index, 1);\n      }\n    }\n\n    attribs.buffer = buffer.getHandle(); // If vertex array objects are not supported then build up our list.\n\n    if (!model.supported) {\n      // find the buffer\n      var buffFound = false;\n\n      for (var ibuff = 0; ibuff < model.buffers.length; ++ibuff) {\n        var buff = model.buffers[ibuff];\n\n        if (buff.buffer === attribs.buffer) {\n          buffFound = true;\n          var found = false;\n\n          for (var iatt = 0; iatt < buff.attributes.length; ++iatt) {\n            var attrIt = buff.attributes[iatt];\n\n            if (attrIt.name === name) {\n              found = true;\n              buff.attributes[iatt] = attribs;\n            }\n          }\n\n          if (!found) {\n            buff.attributes.push(attribs);\n          }\n        }\n      }\n\n      if (!buffFound) {\n        model.buffers.push({\n          buffer: attribs.buffer,\n          attributes: [attribs]\n        });\n      }\n    }\n\n    return true;\n  };\n\n  publicAPI.addAttributeMatrixWithDivisor = function (program, buffer, name, offset, stride, elementType, elementTupleSize, normalize, divisor) {\n    // bind the first row of values\n    var result = publicAPI.addAttributeArrayWithDivisor(program, buffer, name, offset, stride, elementType, elementTupleSize, normalize, divisor, true);\n\n    if (!result) {\n      return result;\n    }\n\n    var gl = model.context;\n    var index = gl.getAttribLocation(model.handleProgram, name);\n\n    for (var i = 1; i < elementTupleSize; i++) {\n      gl.enableVertexAttribArray(index + i);\n      gl.vertexAttribPointer(index + i, elementTupleSize, elementType, normalize, stride, offset + stride * i / elementTupleSize);\n\n      if (divisor > 0) {\n        if (model.instancingExtension) {\n          model.instancingExtension.vertexAttribDivisorANGLE(index + i, 1);\n        } else {\n          gl.vertexAttribDivisor(index + i, 1);\n        }\n      }\n    }\n\n    return true;\n  };\n\n  publicAPI.removeAttributeArray = function (name) {\n    if (!publicAPI.isReady() || model.handleProgram === 0) {\n      return false;\n    } // If we don't have real VAOs find the entry and remove it too.\n\n\n    if (!model.supported) {\n      for (var ibuff = 0; ibuff < model.buffers.length; ++ibuff) {\n        var buff = model.buffers[ibuff];\n\n        for (var iatt = 0; iatt < buff.attributes.length; ++iatt) {\n          var attrIt = buff.attributes[iatt];\n\n          if (attrIt.name === name) {\n            buff.attributes.splice(iatt, 1);\n\n            if (!buff.attributes.length) {\n              model.buffers.splice(ibuff, 1);\n            }\n\n            return true;\n          }\n        }\n      }\n    }\n\n    return true;\n  };\n\n  publicAPI.setOpenGLRenderWindow = function (rw) {\n    if (model.openGLRenderWindow === rw) {\n      return;\n    }\n\n    publicAPI.releaseGraphicsResources();\n    model.openGLRenderWindow = rw;\n    model.context = null;\n\n    if (rw) {\n      model.context = model.openGLRenderWindow.getContext();\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  forceEmulation: false,\n  handleVAO: 0,\n  handleProgram: 0,\n  supported: true,\n  buffers: null,\n  context: null,\n  openGLRenderWindow: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Internal objects initialization\n\n  model.buffers = []; // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model); // Create get-only macros\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['supported']); // Create get-set macros\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['forceEmulation']); // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkOpenGLVertexArrayObject(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkOpenGLVertexArrayObject'); // ----------------------------------------------------------------------------\n\nvar vtkVertexArrayObject = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkVertexArrayObject);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/VertexArrayObject.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/ViewNodeFactory.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/ViewNodeFactory.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance),\n/* harmony export */   \"registerOverride\": () => (/* binding */ registerOverride)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _SceneGraph_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SceneGraph/ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNodeFactory.js\");\n\n\n\nvar CLASS_MAPPING = Object.create(null);\nfunction registerOverride(className, fn) {\n  CLASS_MAPPING[className] = fn;\n} // ----------------------------------------------------------------------------\n// vtkOpenGLViewNodeFactory methods\n// ----------------------------------------------------------------------------\n\nfunction vtkOpenGLViewNodeFactory(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkOpenGLViewNodeFactory');\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Static class mapping shared across instances\n\n  model.overrides = CLASS_MAPPING; // Inheritance\n\n  _SceneGraph_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues); // Object methods\n\n  vtkOpenGLViewNodeFactory(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkOpenGLViewNodeFactory'); // ----------------------------------------------------------------------------\n\nvar vtkViewNodeFactory = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkViewNodeFactory);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/ViewNodeFactory.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/glsl/vtkPolyDataFS.glsl.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/glsl/vtkPolyDataFS.glsl.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"v\": () => (/* binding */ vtkPolyDataFS)\n/* harmony export */ });\nvar vtkPolyDataFS = \"//VTK::System::Dec\\n\\n/*=========================================================================\\n\\n  Program:   Visualization Toolkit\\n  Module:    vtkPolyDataFS.glsl\\n\\n  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\\n  All rights reserved.\\n  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\\n\\n     This software is distributed WITHOUT ANY WARRANTY; without even\\n     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\\n     PURPOSE.  See the above copyright notice for more information.\\n\\n=========================================================================*/\\n// Template for the polydata mappers fragment shader\\n\\nuniform int PrimitiveIDOffset;\\n\\n// VC position of this fragment\\n//VTK::PositionVC::Dec\\n\\n// optional color passed in from the vertex shader, vertexColor\\n//VTK::Color::Dec\\n\\n// optional surface normal declaration\\n//VTK::Normal::Dec\\n\\n// extra lighting parameters\\n//VTK::Light::Dec\\n\\n// Texture coordinates\\n//VTK::TCoord::Dec\\n\\n// picking support\\n//VTK::Picking::Dec\\n\\n// Depth Peeling Support\\n//VTK::DepthPeeling::Dec\\n\\n// clipping plane vars\\n//VTK::Clip::Dec\\n\\n// the output of this shader\\n//VTK::Output::Dec\\n\\n// Apple Bug\\n//VTK::PrimID::Dec\\n\\n// handle coincident offsets\\n//VTK::Coincident::Dec\\n\\n//VTK::ZBuffer::Dec\\n\\nvoid main()\\n{\\n  // VC position of this fragment. This should not branch/return/discard.\\n  //VTK::PositionVC::Impl\\n\\n  // Place any calls that require uniform flow (e.g. dFdx) here.\\n  //VTK::UniformFlow::Impl\\n\\n  // Set gl_FragDepth here (gl_FragCoord.z by default)\\n  //VTK::Depth::Impl\\n\\n  // Early depth peeling abort:\\n  //VTK::DepthPeeling::PreColor\\n\\n  // Apple Bug\\n  //VTK::PrimID::Impl\\n\\n  //VTK::Clip::Impl\\n\\n  //VTK::Color::Impl\\n\\n  // Generate the normal if we are not passed in one\\n  //VTK::Normal::Impl\\n\\n  //VTK::Light::Impl\\n\\n  //VTK::TCoord::Impl\\n\\n  if (gl_FragData[0].a <= 0.0)\\n    {\\n    discard;\\n    }\\n\\n  //VTK::DepthPeeling::Impl\\n\\n  //VTK::Picking::Impl\\n\\n  // handle coincident offsets\\n  //VTK::Coincident::Impl\\n\\n  //VTK::ZBuffer::Impl\\n}\\n\";\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/glsl/vtkPolyDataFS.glsl.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/OpenGL/glsl/vtkPolyDataVS.glsl.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/OpenGL/glsl/vtkPolyDataVS.glsl.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"v\": () => (/* binding */ vtkPolyDataVS)\n/* harmony export */ });\nvar vtkPolyDataVS = \"//VTK::System::Dec\\n\\n/*=========================================================================\\n\\n  Program:   Visualization Toolkit\\n  Module:    vtkPolyDataVS.glsl\\n\\n  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\\n  All rights reserved.\\n  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\\n\\n     This software is distributed WITHOUT ANY WARRANTY; without even\\n     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\\n     PURPOSE.  See the above copyright notice for more information.\\n\\n=========================================================================*/\\n\\nattribute vec4 vertexMC;\\n\\n// frag position in VC\\n//VTK::PositionVC::Dec\\n\\n// optional normal declaration\\n//VTK::Normal::Dec\\n\\n// extra lighting parameters\\n//VTK::Light::Dec\\n\\n// Texture coordinates\\n//VTK::TCoord::Dec\\n\\n// material property values\\n//VTK::Color::Dec\\n\\n// clipping plane vars\\n//VTK::Clip::Dec\\n\\n// camera and actor matrix values\\n//VTK::Camera::Dec\\n\\n// Apple Bug\\n//VTK::PrimID::Dec\\n\\n// picking support\\n//VTK::Picking::Dec\\n\\nvoid main()\\n{\\n  //VTK::Color::Impl\\n\\n  //VTK::Normal::Impl\\n\\n  //VTK::TCoord::Impl\\n\\n  //VTK::Clip::Impl\\n\\n  //VTK::PrimID::Impl\\n\\n  //VTK::PositionVC::Impl\\n\\n  //VTK::Light::Impl\\n\\n  //VTK::Picking::Impl\\n}\\n\";\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/OpenGL/glsl/vtkPolyDataVS.glsl.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/Profiles/Geometry.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/Profiles/Geometry.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _OpenGL_Camera_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../OpenGL/Camera.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Camera.js\");\n/* harmony import */ var _OpenGL_Renderer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OpenGL/Renderer.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Renderer.js\");\n/* harmony import */ var _OpenGL_Actor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OpenGL/Actor.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Actor.js\");\n/* harmony import */ var _OpenGL_Actor2D_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OpenGL/Actor2D.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Actor2D.js\");\n/* harmony import */ var _OpenGL_PolyDataMapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OpenGL/PolyDataMapper.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/PolyDataMapper.js\");\n/* harmony import */ var _OpenGL_Skybox_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../OpenGL/Skybox.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Skybox.js\");\n/* harmony import */ var _OpenGL_Texture_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../OpenGL/Texture.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/Texture.js\");\n/* harmony import */ var _OpenGL_PixelSpaceCallbackMapper_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../OpenGL/PixelSpaceCallbackMapper.js */ \"./node_modules/@kitware/vtk.js/Rendering/OpenGL/PixelSpaceCallbackMapper.js\");\n/* harmony import */ var _WebGPU_Camera_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../WebGPU/Camera.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Camera.js\");\n/* harmony import */ var _WebGPU_Renderer_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../WebGPU/Renderer.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Renderer.js\");\n/* harmony import */ var _WebGPU_Actor_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../WebGPU/Actor.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Actor.js\");\n/* harmony import */ var _WebGPU_PolyDataMapper_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../WebGPU/PolyDataMapper.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/PolyDataMapper.js\");\n/* harmony import */ var _WebGPU_Texture_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../WebGPU/Texture.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Texture.js\");\n/* harmony import */ var _WebGPU_PixelSpaceCallbackMapper_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../WebGPU/PixelSpaceCallbackMapper.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/PixelSpaceCallbackMapper.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/Profiles/Geometry.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderPass.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderPass.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\nfunction vtkRenderPass(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkRenderPass');\n\n  publicAPI.getOperation = function () {\n    return model.currentOperation;\n  };\n\n  publicAPI.setCurrentOperation = function (val) {\n    model.currentOperation = val;\n    model.currentTraverseOperation = \"traverse\".concat(_macro_js__WEBPACK_IMPORTED_MODULE_0__.default.capitalize(model.currentOperation));\n  };\n\n  publicAPI.getTraverseOperation = function () {\n    return model.currentTraverseOperation;\n  }; // by default this class will traverse all of its\n  // preDelegateOperations, then call its delegate render passes\n  // the traverse all of its postDelegateOperations\n  // any of those three arrays can be empty\n\n\n  publicAPI.traverse = function (viewNode) {\n    var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n    if (model.deleted) {\n      return;\n    } // we just render our delegates in order\n\n\n    model.currentParent = parent;\n    model.preDelegateOperations.forEach(function (val) {\n      publicAPI.setCurrentOperation(val);\n      viewNode.traverse(publicAPI);\n    });\n    model.delegates.forEach(function (val) {\n      val.traverse(viewNode, publicAPI);\n    });\n    model.postDelegateOperations.forEach(function (val) {\n      publicAPI.setCurrentOperation(val);\n      viewNode.traverse(publicAPI);\n    });\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  delegates: [],\n  currentOperation: null,\n  preDelegateOperations: [],\n  postDelegateOperations: [],\n  currentParent: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['currentOperation']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['delegates', 'currentParent', 'preDelegateOperations', 'postDelegateOperations']); // Object methods\n\n  vtkRenderPass(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkRenderPass'); // ----------------------------------------------------------------------------\n\nvar vtkRenderPass$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkRenderPass$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderPass.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderWindowViewNode.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderWindowViewNode.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _ViewNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n\n\n\n// vtkRenderWindowViewNode is intended to be a superclass for all api specific\n// RenderWindows. It is intended to define a common API that can be invoked\n// upon an api specific render window and provide some common method\n// implementations. If your application requires communicating with an api specific\n// view try to limit such interactions to methods defined in this class.\n// ----------------------------------------------------------------------------\n// ----------------------------------------------------------------------------\n// vtkRenderWindowViewNode methods\n// ----------------------------------------------------------------------------\n\nfunction vtkRenderWindowViewNode(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkRenderWindowViewNode');\n\n  publicAPI.getViewNodeFactory = function () {\n    return null;\n  };\n\n  publicAPI.getAspectRatio = function () {\n    return model.size[0] / model.size[1];\n  };\n\n  publicAPI.getAspectRatioForRenderer = function (renderer) {\n    var viewport = renderer.getViewportByReference();\n    return model.size[0] * (viewport[2] - viewport[0]) / ((viewport[3] - viewport[1]) * model.size[1]);\n  };\n\n  publicAPI.isInViewport = function (x, y, viewport) {\n    var vCoords = viewport.getViewportByReference();\n    var size = publicAPI.getFramebufferSize();\n\n    if (vCoords[0] * size[0] <= x && vCoords[2] * size[0] >= x && vCoords[1] * size[1] <= y && vCoords[3] * size[1] >= y) {\n      return true;\n    }\n\n    return false;\n  };\n\n  publicAPI.getViewportSize = function (viewport) {\n    var vCoords = viewport.getViewportByReference();\n    var size = publicAPI.getFramebufferSize();\n    return [(vCoords[2] - vCoords[0]) * size[0], (vCoords[3] - vCoords[1]) * size[1]];\n  };\n\n  publicAPI.getViewportCenter = function (viewport) {\n    var size = publicAPI.getViewportSize(viewport);\n    return [size[0] * 0.5, size[1] * 0.5];\n  };\n\n  publicAPI.displayToNormalizedDisplay = function (x, y, z) {\n    var size = publicAPI.getFramebufferSize();\n    return [x / size[0], y / size[1], z];\n  };\n\n  publicAPI.normalizedDisplayToDisplay = function (x, y, z) {\n    var size = publicAPI.getFramebufferSize();\n    return [x * size[0], y * size[1], z];\n  };\n\n  publicAPI.worldToView = function (x, y, z, renderer) {\n    return renderer.worldToView(x, y, z);\n  };\n\n  publicAPI.viewToWorld = function (x, y, z, renderer) {\n    return renderer.viewToWorld(x, y, z);\n  };\n\n  publicAPI.worldToDisplay = function (x, y, z, renderer) {\n    var val = renderer.worldToView(x, y, z);\n    var dims = publicAPI.getViewportSize(renderer);\n    var val2 = renderer.viewToProjection(val[0], val[1], val[2], dims[0] / dims[1]);\n    var val3 = renderer.projectionToNormalizedDisplay(val2[0], val2[1], val2[2]);\n    return publicAPI.normalizedDisplayToDisplay(val3[0], val3[1], val3[2]);\n  };\n\n  publicAPI.displayToWorld = function (x, y, z, renderer) {\n    var val = publicAPI.displayToNormalizedDisplay(x, y, z);\n    var val2 = renderer.normalizedDisplayToProjection(val[0], val[1], val[2]);\n    var dims = publicAPI.getViewportSize(renderer);\n    var val3 = renderer.projectionToView(val2[0], val2[1], val2[2], dims[0] / dims[1]);\n    return renderer.viewToWorld(val3[0], val3[1], val3[2]);\n  };\n\n  publicAPI.normalizedDisplayToViewport = function (x, y, z, renderer) {\n    var vCoords = renderer.getViewportByReference();\n    vCoords = publicAPI.normalizedDisplayToDisplay(vCoords[0], vCoords[1], 0.0);\n    var coords = publicAPI.normalizedDisplayToDisplay(x, y, z);\n    return [coords[0] - vCoords[0] - 0.5, coords[1] - vCoords[1] - 0.5, z];\n  };\n\n  publicAPI.viewportToNormalizedViewport = function (x, y, z, renderer) {\n    var size = publicAPI.getViewportSize(renderer);\n\n    if (size && size[0] !== 0 && size[1] !== 0) {\n      return [x / (size[0] - 1.0), y / (size[1] - 1.0), z];\n    }\n\n    return [x, y, z];\n  };\n\n  publicAPI.normalizedViewportToViewport = function (x, y, z) {\n    var size = publicAPI.getFramebufferSize();\n    return [x * (size[0] - 1.0), y * (size[1] - 1.0), z];\n  };\n\n  publicAPI.displayToLocalDisplay = function (x, y, z) {\n    var size = publicAPI.getFramebufferSize();\n    return [x, size[1] - y - 1, z];\n  };\n\n  publicAPI.viewportToNormalizedDisplay = function (x, y, z, renderer) {\n    var vCoords = renderer.getViewportByReference();\n    vCoords = publicAPI.normalizedDisplayToDisplay(vCoords[0], vCoords[1], 0.0);\n    var x2 = x + vCoords[0] + 0.5;\n    var y2 = y + vCoords[1] + 0.5;\n    return publicAPI.displayToNormalizedDisplay(x2, y2, z);\n  };\n\n  publicAPI.getPixelData = function (x1, y1, x2, y2) {\n    _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.vtkErrorMacro('not implemented');\n    return undefined;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  size: undefined,\n  selector: undefined\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues);\n\n  if (!model.size) {\n    model.size = [300, 300];\n  }\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.getArray(publicAPI, model, ['size'], 2);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['selector']); // Inheritance\n\n  _ViewNode_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues); // Object methods\n\n  vtkRenderWindowViewNode(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkRenderWindowViewNode'); // ----------------------------------------------------------------------------\n\nvar vtkRenderWindowViewNode$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkRenderWindowViewNode$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderWindowViewNode.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.vtkErrorMacro;\nvar PASS_TYPES = ['Build', 'Render']; // ----------------------------------------------------------------------------\n// vtkViewNode methods\n// ----------------------------------------------------------------------------\n\nfunction vtkViewNode(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkViewNode'); // Builds myself.\n\n  publicAPI.build = function (prepass) {}; // Renders myself\n\n\n  publicAPI.render = function (prepass) {};\n\n  publicAPI.traverse = function (renderPass) {\n    // we can choose to do special\n    // traversal here based on pass\n    var passTraversal = renderPass.getTraverseOperation();\n    var fn = publicAPI[passTraversal];\n\n    if (fn) {\n      fn(renderPass);\n      return;\n    } // default traversal\n\n\n    publicAPI.apply(renderPass, true);\n\n    for (var index = 0; index < model.children.length; index++) {\n      model.children[index].traverse(renderPass);\n    }\n\n    publicAPI.apply(renderPass, false);\n  };\n\n  publicAPI.apply = function (renderPass, prepass) {\n    var customRenderPass = publicAPI[renderPass.getOperation()];\n\n    if (customRenderPass) {\n      customRenderPass(prepass, renderPass);\n    }\n  };\n\n  publicAPI.getViewNodeFor = function (dataObject) {\n    if (model.renderable === dataObject) {\n      return publicAPI;\n    }\n\n    for (var index = 0; index < model.children.length; ++index) {\n      var child = model.children[index];\n      var vn = child.getViewNodeFor(dataObject);\n\n      if (vn) {\n        return vn;\n      }\n    }\n\n    return undefined;\n  };\n\n  publicAPI.getFirstAncestorOfType = function (type) {\n    if (!model.parent) {\n      return null;\n    }\n\n    if (model.parent.isA(type)) {\n      return model.parent;\n    }\n\n    return model.parent.getFirstAncestorOfType(type);\n  };\n\n  publicAPI.addMissingNode = function (dobj) {\n    if (!dobj) {\n      return;\n    }\n\n    var result = model._renderableChildMap.get(dobj); // if found just mark as visited\n\n\n    if (result !== undefined) {\n      result.setVisited(true);\n    } else {\n      // otherwise create a node\n      var newNode = publicAPI.createViewNode(dobj);\n\n      if (newNode) {\n        newNode.setParent(publicAPI);\n        newNode.setVisited(true);\n\n        model._renderableChildMap.set(dobj, newNode);\n\n        model.children.push(newNode);\n      }\n    }\n  };\n\n  publicAPI.addMissingNodes = function (dataObjs) {\n    if (!dataObjs || !dataObjs.length) {\n      return;\n    }\n\n    for (var index = 0; index < dataObjs.length; ++index) {\n      var dobj = dataObjs[index];\n\n      var result = model._renderableChildMap.get(dobj); // if found just mark as visited\n\n\n      if (result !== undefined) {\n        result.setVisited(true);\n      } else {\n        // otherwise create a node\n        var newNode = publicAPI.createViewNode(dobj);\n\n        if (newNode) {\n          newNode.setParent(publicAPI);\n          newNode.setVisited(true);\n\n          model._renderableChildMap.set(dobj, newNode);\n\n          model.children.push(newNode);\n        }\n      }\n    }\n  };\n\n  publicAPI.prepareNodes = function () {\n    for (var index = 0; index < model.children.length; ++index) {\n      model.children[index].setVisited(false);\n    }\n  };\n\n  publicAPI.setVisited = function (val) {\n    model.visited = val;\n  };\n\n  publicAPI.removeUnusedNodes = function () {\n    var deleted = null;\n\n    for (var index = 0; index < model.children.length; ++index) {\n      var child = model.children[index];\n      var visited = child.getVisited();\n\n      if (!visited) {\n        var renderable = child.getRenderable();\n\n        if (renderable) {\n          model._renderableChildMap.delete(renderable);\n        }\n\n        if (!deleted) {\n          deleted = [];\n        }\n\n        deleted.push(child);\n      } else {\n        child.setVisited(false);\n      }\n    }\n\n    if (deleted) {\n      // slow does alloc but not as common\n      model.children = model.children.filter(function (el) {\n        return !deleted.includes(el);\n      });\n    }\n  };\n\n  publicAPI.createViewNode = function (dataObj) {\n    if (!model.myFactory) {\n      vtkErrorMacro('Cannot create view nodes without my own factory');\n      return null;\n    }\n\n    var ret = model.myFactory.createNode(dataObj);\n\n    if (ret) {\n      ret.setRenderable(dataObj);\n    }\n\n    return ret;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  parent: null,\n  renderable: null,\n  myFactory: null,\n  children: [],\n  visited: false\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.event(publicAPI, model, 'event');\n  model._renderableChildMap = new Map();\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['visited']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['parent', 'renderable', 'myFactory']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.getArray(publicAPI, model, ['children']); // Object methods\n\n  vtkViewNode(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkViewNode'); // ----------------------------------------------------------------------------\n\nvar vtkViewNode$1 = {\n  newInstance: newInstance,\n  extend: extend,\n  PASS_TYPES: PASS_TYPES\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkViewNode$1);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNodeFactory.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNodeFactory.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\n// vtkViewNodeFactory methods\n// ----------------------------------------------------------------------------\n\nfunction vtkViewNodeFactory(publicAPI, model) {\n  // Make sure our overrides is just for our instance not shared with everyone...\n  if (!model.overrides) {\n    model.overrides = {};\n  } // Set our className\n\n\n  model.classHierarchy.push('vtkViewNodeFactory');\n\n  publicAPI.createNode = function (dataObject) {\n    if (dataObject.isDeleted()) {\n      return null;\n    }\n\n    var cpt = 0;\n    var className = dataObject.getClassName(cpt++);\n    var isObject = false;\n    var keys = Object.keys(model.overrides);\n\n    while (className && !isObject) {\n      if (keys.indexOf(className) !== -1) {\n        isObject = true;\n      } else {\n        className = dataObject.getClassName(cpt++);\n      }\n    }\n\n    if (!isObject) {\n      return null;\n    }\n\n    var vn = model.overrides[className]();\n    vn.setMyFactory(publicAPI);\n    return vn;\n  };\n\n  publicAPI.registerOverride = function (className, func) {\n    model.overrides[className] = func;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {// overrides: {},\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model); // Object methods\n\n  vtkViewNodeFactory(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkViewNodeFactory'); // ----------------------------------------------------------------------------\n\nvar vtkViewNodeFactory$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkViewNodeFactory$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNodeFactory.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/Actor.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/Actor.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ViewNodeFactory.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n\n\n\n\n\n// vtkWebGPUActor methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUActor(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUActor'); // Builds myself.\n\n  publicAPI.buildPass = function (prepass) {\n    if (prepass) {\n      model.WebGPURenderer = publicAPI.getFirstAncestorOfType('vtkWebGPURenderer');\n      model.WebGPURenderWindow = model.WebGPURenderer.getFirstAncestorOfType('vtkWebGPURenderWindow');\n\n      if (model.propID === undefined) {\n        model.propID = model.WebGPURenderWindow.getUniquePropID();\n      }\n\n      publicAPI.prepareNodes();\n      publicAPI.addMissingNode(model.renderable.getMapper());\n      publicAPI.removeUnusedNodes();\n    }\n  }; // we draw textures, then mapper, then post pass textures\n\n\n  publicAPI.traverseOpaquePass = function (renderPass) {\n    if (!model.renderable || !model.renderable.getVisibility() || !model.renderable.getIsOpaque() || model.WebGPURenderer.getSelector() && !model.renderable.getPickable()) {\n      return;\n    }\n\n    publicAPI.apply(renderPass, true);\n\n    if (model.children[0]) {\n      model.children[0].traverse(renderPass);\n    }\n\n    publicAPI.apply(renderPass, false);\n  }; // we draw textures, then mapper, then post pass textures\n\n\n  publicAPI.traverseTranslucentPass = function (renderPass) {\n    if (!model.renderable || !model.renderable.getVisibility() || model.renderable.getIsOpaque() || model.WebGPURenderer.getSelector() && !model.renderable.getPickable()) {\n      return;\n    }\n\n    publicAPI.apply(renderPass, true);\n\n    if (model.children[0]) {\n      model.children[0].traverse(renderPass);\n    }\n\n    publicAPI.apply(renderPass, false);\n  };\n\n  publicAPI.queryPass = function (prepass, renderPass) {\n    if (prepass) {\n      if (!model.renderable || !model.renderable.getVisibility()) {\n        return;\n      }\n\n      if (model.renderable.getIsOpaque()) {\n        renderPass.incrementOpaqueActorCount();\n      } else {\n        renderPass.incrementTranslucentActorCount();\n      }\n    }\n  };\n\n  publicAPI.getBufferShift = function (wgpuRen) {\n    publicAPI.getKeyMatrices(wgpuRen);\n    return model.bufferShift;\n  };\n\n  publicAPI.getKeyMatrices = function (wgpuRen) {\n    // has the actor or stabilization center changed?\n    if (Math.max(model.renderable.getMTime(), wgpuRen.getStabilizedTime()) > model.keyMatricesTime.getMTime()) {\n      model.renderable.computeMatrix();\n      var mcwc = model.renderable.getMatrix(); // compute the net shift\n\n      var center = wgpuRen.getStabilizedCenterByReference();\n      model.bufferShift[0] = mcwc[3] - center[0];\n      model.bufferShift[1] = mcwc[7] - center[1];\n      model.bufferShift[2] = mcwc[11] - center[2];\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.j)(model.keyMatrices.bcwc, mcwc);\n\n      if (model.renderable.getIsIdentity()) {\n        (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.a)(model.keyMatrices.normalMatrix);\n      } else {\n        // we use bcwc BEFORE the translate below (just to get transposed mcvc)\n        (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.c)(model.keyMatrices.normalMatrix, model.keyMatrices.bcwc); // zero out translation\n\n        model.keyMatrices.normalMatrix[3] = 0.0;\n        model.keyMatrices.normalMatrix[7] = 0.0;\n        model.keyMatrices.normalMatrix[11] = 0.0;\n        (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.i)(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);\n        (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.j)(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);\n      } // only meed the buffer shift to get to world\n\n\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.t)(model.keyMatrices.bcwc, model.keyMatrices.bcwc, [-model.bufferShift[0], -model.bufferShift[1], -model.bufferShift[2]]); // to get to stabilized we also need the center\n\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.t)(model.keyMatrices.bcsc, model.keyMatrices.bcwc, [-center[0], -center[1], -center[2]]);\n      model.keyMatricesTime.modified();\n    }\n\n    return model.keyMatrices;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  keyMatricesTime: null,\n  keyMatrices: null,\n  propID: undefined,\n  bufferShift: undefined\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues);\n  model.keyMatricesTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model.keyMatricesTime, {\n    mtime: 0\n  });\n  model.keyMatrices = {\n    normalMatrix: new Float64Array(16),\n    bcwc: new Float64Array(16),\n    bcsc: new Float64Array(16)\n  };\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['propID', 'keyMatricesTime']);\n  model.bufferShift = [0, 0, 0, 0]; // Object methods\n\n  vtkWebGPUActor(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend); // ----------------------------------------------------------------------------\n\nvar index = {\n  newInstance: newInstance,\n  extend: extend\n}; // Register ourself to WebGPU backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__.registerOverride)('vtkActor', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/Actor.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/BindGroup.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/BindGroup.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\n// vtkWebGPUBindGroup methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUBindGroup(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUBindGroup');\n\n  publicAPI.setBindables = function (bindables) {\n    // is there a difference between the old and new list?\n    if (model.bindables.length === bindables.length) {\n      var allMatch = true;\n\n      for (var i = 0; i < model.bindables.length; i++) {\n        if (model.bindables[i] !== bindables[i]) {\n          allMatch = false;\n        }\n      }\n\n      if (allMatch) {\n        return;\n      }\n    } // there is a difference\n\n\n    model.bindables = bindables;\n    publicAPI.modified();\n  };\n\n  publicAPI.getBindGroupLayout = function (device) {\n    var entries = [];\n\n    for (var i = 0; i < model.bindables.length; i++) {\n      var entry = model.bindables[i].getBindGroupLayoutEntry();\n      entry.binding = i;\n      entries.push(entry);\n    }\n\n    return device.getBindGroupLayout({\n      entries: entries\n    });\n  };\n\n  publicAPI.getBindGroup = function (device) {\n    // check mtime\n    var mtime = publicAPI.getMTime();\n\n    for (var i = 0; i < model.bindables.length; i++) {\n      var tm = model.bindables[i].getBindGroupTime().getMTime();\n      mtime = tm > mtime ? tm : mtime;\n    }\n\n    if (mtime < model.bindGroupTime.getMTime()) {\n      return model.bindGroup;\n    }\n\n    var entries = [];\n\n    for (var _i = 0; _i < model.bindables.length; _i++) {\n      var entry = model.bindables[_i].getBindGroupEntry();\n\n      entry.binding = _i;\n      entries.push(entry);\n    }\n\n    model.bindGroup = device.getHandle().createBindGroup({\n      layout: publicAPI.getBindGroupLayout(device),\n      entries: entries\n    });\n    model.bindGroupTime.modified();\n    return model.bindGroup;\n  };\n\n  publicAPI.getShaderCode = function (pipeline) {\n    var lines = [];\n    var bgroup = pipeline.getBindGroupLayoutCount(model.name);\n\n    for (var i = 0; i < model.bindables.length; i++) {\n      lines.push(model.bindables[i].getShaderCode(i, bgroup));\n    }\n\n    return lines.join('\\n');\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  device: null,\n  handle: null,\n  name: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  model.bindables = [];\n  model.bindGroupTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model.bindGroupTime, {\n    mtime: 0\n  });\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['bindGroupTime', 'handle', 'sizeInBytes', 'usage']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['name', 'device', 'arrayInformation', 'sourceTime']);\n  vtkWebGPUBindGroup(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUBindGroup$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUBindGroup$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/BindGroup.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/Buffer.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/Buffer.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _BufferManager_Constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BufferManager/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager/Constants.js\");\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\n\nvar forwarded = ['getMappedRange', 'mapAsync', 'unmap'];\n\nfunction bufferSubData(device, destBuffer, destOffset, srcArrayBuffer) {\n  var byteCount = srcArrayBuffer.byteLength;\n  var srcBuffer = device.createBuffer({\n    size: byteCount,\n\n    /* eslint-disable no-undef */\n    usage: GPUBufferUsage.COPY_SRC,\n\n    /* eslint-enable no-undef */\n    mappedAtCreation: true\n  });\n  var arrayBuffer = srcBuffer.getMappedRange(0, byteCount);\n  new Uint8Array(arrayBuffer).set(new Uint8Array(srcArrayBuffer)); // memcpy\n\n  srcBuffer.unmap();\n  var encoder = device.createCommandEncoder();\n  encoder.copyBufferToBuffer(srcBuffer, 0, destBuffer, destOffset, byteCount);\n  var commandBuffer = encoder.finish();\n  var queue = device.queue;\n  queue.submit([commandBuffer]);\n  srcBuffer.destroy();\n} // ----------------------------------------------------------------------------\n// vtkWebGPUBufferManager methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkWebGPUBuffer(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUBuffer');\n\n  publicAPI.create = function (sizeInBytes, usage) {\n    model.handle = model.device.getHandle().createBuffer({\n      size: sizeInBytes,\n      usage: usage\n    });\n    model.sizeInBytes = sizeInBytes;\n    model.usage = usage;\n  };\n\n  publicAPI.write = function (data) {\n    bufferSubData(model.device.getHandle(), model.handle, 0, data.buffer);\n  };\n\n  publicAPI.createAndWrite = function (data, usage) {\n    model.handle = model.device.getHandle().createBuffer({\n      size: data.byteLength,\n      usage: usage,\n      mappedAtCreation: true\n    });\n    model.sizeInBytes = data.byteLength;\n    model.usage = usage;\n    new Uint8Array(model.handle.getMappedRange()).set(new Uint8Array(data.buffer)); // memcpy\n\n    model.handle.unmap();\n  }; // simple forwarders\n\n\n  var _loop = function _loop(i) {\n    publicAPI[forwarded[i]] = function () {\n      var _model$handle;\n\n      return (_model$handle = model.handle)[forwarded[i]].apply(_model$handle, arguments);\n    };\n  };\n\n  for (var i = 0; i < forwarded.length; i++) {\n    _loop(i);\n  }\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  device: null,\n  handle: null,\n  sizeInBytes: 0,\n  strideInBytes: 0,\n  arrayInformation: null,\n  usage: null,\n  sourceTime: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['handle', 'sizeInBytes', 'usage']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['strideInBytes', 'device', 'arrayInformation', 'sourceTime']);\n  vtkWebGPUBuffer(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUBuffer$1 = _objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, _BufferManager_Constants_js__WEBPACK_IMPORTED_MODULE_2__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUBuffer$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/Buffer.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager.js":
/*!************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"STATIC\": () => (/* binding */ STATIC),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Core/Math/index.js */ \"./node_modules/@kitware/vtk.js/Common/Core/Math/index.js\");\n/* harmony import */ var _Buffer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Buffer.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Buffer.js\");\n/* harmony import */ var _Types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Types.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Types.js\");\n/* harmony import */ var _Core_Property_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Core/Property.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Property.js\");\n/* harmony import */ var _BufferManager_Constants_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BufferManager/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager/Constants.js\");\n\n\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_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; }\nvar BufferUsage = _BufferManager_Constants_js__WEBPACK_IMPORTED_MODULE_6__.default.BufferUsage,\n    PrimitiveTypes = _BufferManager_Constants_js__WEBPACK_IMPORTED_MODULE_6__.default.PrimitiveTypes;\nvar Representation = _Core_Property_js__WEBPACK_IMPORTED_MODULE_5__.default.Representation;\nvar vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.vtkDebugMacro; // the webgpu constants all show up as undefined\n\n/* eslint-disable no-undef */\n// ----------------------------------------------------------------------------\n// Static API\n// ----------------------------------------------------------------------------\n\nvar STATIC = {};\n\nfunction requestMatches(req1, req2) {\n  if (req1.time !== req2.time) return false;\n  if (req1.format !== req2.format) return false;\n  if (req1.usage !== req2.usage) return false;\n  if (req1.hash !== req2.hash) return false;\n  return true;\n}\n\nvar cellCounters = {\n  // easy, every input point becomes an output point\n  anythingToPoints: function anythingToPoints(numPoints, cellPts) {\n    return numPoints;\n  },\n  linesToWireframe: function linesToWireframe(numPoints, cellPts) {\n    if (numPoints > 1) {\n      return (numPoints - 1) * 2;\n    }\n\n    return 0;\n  },\n  polysToWireframe: function polysToWireframe(numPoints, cellPts) {\n    if (numPoints > 2) {\n      return numPoints * 2;\n    }\n\n    return 0;\n  },\n  stripsToWireframe: function stripsToWireframe(numPoints, cellPts) {\n    if (numPoints > 2) {\n      return numPoints * 4 - 6;\n    }\n\n    return 0;\n  },\n  polysToSurface: function polysToSurface(npts, cellPts) {\n    if (npts > 2) {\n      return (npts - 2) * 3;\n    }\n\n    return 0;\n  },\n  stripsToSurface: function stripsToSurface(npts, cellPts, offset) {\n    if (numPoints > 2) {\n      return (npts - 2) * 3;\n    }\n\n    return 0;\n  }\n};\n\nfunction getPrimitiveName(primType) {\n  switch (primType) {\n    case PrimitiveTypes.Points:\n      return 'points';\n\n    case PrimitiveTypes.Lines:\n      return 'lines';\n\n    case PrimitiveTypes.Triangles:\n      return 'polys';\n\n    case PrimitiveTypes.TriangleStrips:\n      return 'strips';\n\n    default:\n      return '';\n  }\n}\n\nfunction getOutputSize(cellArray, representation, inRepName) {\n  var countFunc = null;\n\n  if (representation === Representation.POINTS || inRepName === 'points') {\n    countFunc = cellCounters.anythingToPoints;\n  } else if (representation === Representation.WIREFRAME || inRepName === 'lines') {\n    countFunc = cellCounters[\"\".concat(inRepName, \"ToWireframe\")];\n  } else {\n    countFunc = cellCounters[\"\".concat(inRepName, \"ToSurface\")];\n  }\n\n  var array = cellArray.getData();\n  var size = array.length;\n  var caboCount = 0;\n\n  for (var index = 0; index < size;) {\n    caboCount += countFunc(array[index], array);\n    index += array[index] + 1;\n  }\n\n  return caboCount;\n}\n\nfunction packArray(cellArray, primType, representation, inArray, outputType, options) {\n  var result = {\n    elementCount: 0,\n    blockSize: 0,\n    stride: 0\n  };\n\n  if (!cellArray.getData() || !cellArray.getData().length) {\n    return result;\n  } // setup shift and scale\n\n\n  var shift = [0.0, 0.0, 0.0, 0.0];\n\n  if (options.shift) {\n    if (options.shift.length) {\n      shift = options.shift;\n    } else {\n      shift.fill(options.shift);\n    }\n  }\n\n  var scale = [1.0, 1.0, 1.0, 1.0];\n\n  if (options.scale) {\n    if (options.scale.length) {\n      scale = options.scale;\n    } else {\n      scale.fill(options.scale);\n    }\n  }\n\n  var packExtra = Object.prototype.hasOwnProperty.call(options, 'packExtra') ? options.packExtra : false;\n  var pointData = inArray.getData();\n  var addAPoint;\n  var cellBuilders = {\n    // easy, every input point becomes an output point\n    anythingToPoints: function anythingToPoints(numPoints, cellPts, offset, cellId) {\n      for (var i = 0; i < numPoints; ++i) {\n        addAPoint(cellPts[offset + i], cellId);\n      }\n    },\n    linesToWireframe: function linesToWireframe(numPoints, cellPts, offset, cellId) {\n      // for lines we add a bunch of segments\n      for (var i = 0; i < numPoints - 1; ++i) {\n        addAPoint(cellPts[offset + i], cellId);\n        addAPoint(cellPts[offset + i + 1], cellId);\n      }\n    },\n    polysToWireframe: function polysToWireframe(numPoints, cellPts, offset, cellId) {\n      // for polys we add a bunch of segments and close it\n      if (numPoints > 2) {\n        for (var i = 0; i < numPoints; ++i) {\n          addAPoint(cellPts[offset + i], cellId);\n          addAPoint(cellPts[offset + (i + 1) % numPoints], cellId);\n        }\n      }\n    },\n    stripsToWireframe: function stripsToWireframe(numPoints, cellPts, offset, cellId) {\n      if (numPoints > 2) {\n        // for strips we add a bunch of segments and close it\n        for (var i = 0; i < numPoints - 1; ++i) {\n          addAPoint(cellPts[offset + i], cellId);\n          addAPoint(cellPts[offset + i + 1], cellId);\n        }\n\n        for (var _i = 0; _i < numPoints - 2; _i++) {\n          addAPoint(cellPts[offset + _i], cellId);\n          addAPoint(cellPts[offset + _i + 2], cellId);\n        }\n      }\n    },\n    polysToSurface: function polysToSurface(npts, cellPts, offset, cellId) {\n      for (var i = 0; i < npts - 2; i++) {\n        addAPoint(cellPts[offset + 0], cellId);\n        addAPoint(cellPts[offset + i + 1], cellId);\n        addAPoint(cellPts[offset + i + 2], cellId);\n      }\n    },\n    stripsToSurface: function stripsToSurface(npts, cellPts, offset, cellId) {\n      for (var i = 0; i < npts - 2; i++) {\n        addAPoint(cellPts[offset + i], cellId);\n        addAPoint(cellPts[offset + i + 1 + i % 2], cellId);\n        addAPoint(cellPts[offset + i + 1 + (i + 1) % 2], cellId);\n      }\n    }\n  };\n  var inRepName = getPrimitiveName(primType);\n  var func = null;\n\n  if (representation === Representation.POINTS || primType === PrimitiveTypes.Points) {\n    func = cellBuilders.anythingToPoints;\n  } else if (representation === Representation.WIREFRAME || primType === PrimitiveTypes.Lines) {\n    func = cellBuilders[\"\".concat(inRepName, \"ToWireframe\")];\n  } else {\n    func = cellBuilders[\"\".concat(inRepName, \"ToSurface\")];\n  }\n\n  var array = cellArray.getData();\n  var size = array.length;\n  var caboCount = getOutputSize(cellArray, representation, inRepName);\n  var vboidx = 0;\n  var numComp = inArray.getNumberOfComponents();\n  var packedVBO = (0,_macro_js__WEBPACK_IMPORTED_MODULE_1__.newTypedArray)(outputType, caboCount * (numComp + (packExtra ? 1 : 0))); // pick the right function based on point versus cell data\n\n  var getData = function getData(ptId, cellId) {\n    return pointData[ptId];\n  };\n\n  if (options.cellData) {\n    getData = function getData(ptId, cellId) {\n      return pointData[cellId];\n    };\n  } // add data based on number of components\n\n\n  if (numComp === 1) {\n    addAPoint = function addAPointFunc(i, cellid) {\n      packedVBO[vboidx++] = scale[0] * getData(i, cellid) + shift[0];\n    };\n  } else if (numComp === 2) {\n    addAPoint = function addAPointFunc(i, cellid) {\n      packedVBO[vboidx++] = scale[0] * getData(i * 2, cellid * 2) + shift[0];\n      packedVBO[vboidx++] = scale[1] * getData(i * 2 + 1, cellid * 2 + 1) + shift[1];\n    };\n  } else if (numComp === 3 && !packExtra) {\n    addAPoint = function addAPointFunc(i, cellid) {\n      packedVBO[vboidx++] = scale[0] * getData(i * 3, cellid * 3) + shift[0];\n      packedVBO[vboidx++] = scale[1] * getData(i * 3 + 1, cellid * 3 + 1) + shift[1];\n      packedVBO[vboidx++] = scale[2] * getData(i * 3 + 2, cellid * 3 + 2) + shift[2];\n    };\n  } else if (numComp === 3 && packExtra) {\n    addAPoint = function addAPointFunc(i, cellid) {\n      packedVBO[vboidx++] = scale[0] * getData(i * 3, cellid * 3) + shift[0];\n      packedVBO[vboidx++] = scale[1] * getData(i * 3 + 1, cellid * 3 + 1) + shift[1];\n      packedVBO[vboidx++] = scale[2] * getData(i * 3 + 2, cellid * 3 + 2) + shift[2];\n      packedVBO[vboidx++] = scale[3] * 1.0 + shift[3];\n    };\n  } else if (numComp === 4) {\n    addAPoint = function addAPointFunc(i, cellid) {\n      packedVBO[vboidx++] = scale[0] * getData(i * 4, cellid * 4) + shift[0];\n      packedVBO[vboidx++] = scale[1] * getData(i * 4 + 1, cellid * 4 + 1) + shift[1];\n      packedVBO[vboidx++] = scale[2] * getData(i * 4 + 2, cellid * 4 + 2) + shift[2];\n      packedVBO[vboidx++] = scale[3] * getData(i * 4 + 3, cellid * 4 + 3) + shift[3];\n    };\n  }\n\n  var cellId = options.cellOffset;\n\n  for (var index = 0; index < size;) {\n    func(array[index], array, index + 1, cellId);\n    index += array[index] + 1;\n    cellId++;\n  }\n\n  result.nativeArray = packedVBO;\n  result.elementCount = caboCount;\n  return result;\n}\n\nfunction getNormal(pointData, i0, i1, i2) {\n  var v1 = [pointData[i2 * 3] - pointData[i1 * 3], pointData[i2 * 3 + 1] - pointData[i1 * 3 + 1], pointData[i2 * 3 + 2] - pointData[i1 * 3 + 2]];\n  var v2 = [pointData[i0 * 3] - pointData[i1 * 3], pointData[i0 * 3 + 1] - pointData[i1 * 3 + 1], pointData[i0 * 3 + 2] - pointData[i1 * 3 + 2]];\n  var result = [];\n  (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.g)(v1, v2, result);\n  (0,_Common_Core_Math_index_js__WEBPACK_IMPORTED_MODULE_2__.k)(result);\n  return result;\n}\n\nfunction generateNormals(cellArray, primType, representation, inArray) {\n  if (!cellArray.getData() || !cellArray.getData().length) {\n    return null;\n  }\n\n  var pointData = inArray.getData();\n  var addAPoint;\n  var cellBuilders = {\n    polysToPoints: function polysToPoints(numPoints, cellPts, offset) {\n      var normal = getNormal(pointData, cellPts[offset], cellPts[offset + 1], cellPts[offset + 2]);\n\n      for (var i = 0; i < numPoints; ++i) {\n        addAPoint(normal);\n      }\n    },\n    polysToWireframe: function polysToWireframe(numPoints, cellPts, offset) {\n      // for polys we add a bunch of segments and close it\n      // compute the normal\n      var normal = getNormal(pointData, cellPts[offset], cellPts[offset + 1], cellPts[offset + 2]);\n\n      for (var i = 0; i < numPoints; ++i) {\n        addAPoint(normal);\n        addAPoint(normal);\n      }\n    },\n    polysToSurface: function polysToSurface(npts, cellPts, offset) {\n      if (npts < 3) {\n        // ignore degenerate triangles\n        vtkDebugMacro('skipping degenerate triangle');\n      } else {\n        // compute the normal\n        var normal = getNormal(pointData, cellPts[offset], cellPts[offset + 1], cellPts[offset + 2]);\n\n        for (var i = 0; i < npts - 2; i++) {\n          addAPoint(normal);\n          addAPoint(normal);\n          addAPoint(normal);\n        }\n      }\n    }\n  };\n  var primName = getPrimitiveName(primType);\n  var func = null;\n\n  if (representation === Representation.POINTS) {\n    func = cellBuilders[\"\".concat(primName, \"ToPoints\")];\n  } else if (representation === Representation.WIREFRAME) {\n    func = cellBuilders[\"\".concat(primName, \"ToWireframe\")];\n  } else {\n    func = cellBuilders[\"\".concat(primName, \"ToSurface\")];\n  }\n\n  var caboCount = getOutputSize(cellArray, representation, primName);\n  var vboidx = 0;\n  var packedVBO = new Int8Array(caboCount * 4);\n\n  addAPoint = function addAPointFunc(normal) {\n    packedVBO[vboidx++] = 127 * normal[0];\n    packedVBO[vboidx++] = 127 * normal[1];\n    packedVBO[vboidx++] = 127 * normal[2];\n    packedVBO[vboidx++] = 127;\n  };\n\n  var array = cellArray.getData();\n  var size = array.length;\n\n  for (var index = 0; index < size;) {\n    func(array[index], array, index + 1);\n    index += array[index] + 1;\n  }\n\n  return packedVBO;\n} // ----------------------------------------------------------------------------\n// vtkWebGPUBufferManager methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkWebGPUBufferManager(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUBufferManager'); // is the buffer already present?\n\n  publicAPI.hasBuffer = function (req) {\n    if (req.source) {\n      // if a matching buffer already exists then return true\n      if (model.buffers.has(req.source)) {\n        var dabuffers = model.buffers.get(req.source);\n\n        for (var i = 0; i < dabuffers.length; i++) {\n          if (requestMatches(dabuffers[i].request, req)) {\n            return true;\n          }\n        }\n      }\n    }\n\n    return false;\n  }; // we cache based on the passed in source, when the source is\n  // garbage collected then the cache entry is removed. If a source\n  // is not provided then the buffer is NOT cached and you are on your own\n  // if you want to share it etc\n\n\n  publicAPI.getBuffer = function (req) {\n    if (req.source) {\n      // if a matching buffer already exists then return it\n      if (model.buffers.has(req.source)) {\n        var dabuffers = model.buffers.get(req.source);\n\n        for (var i = 0; i < dabuffers.length; i++) {\n          if (requestMatches(dabuffers[i].request, req)) {\n            return dabuffers[i].buffer;\n          }\n        }\n      }\n    } // if a dataArray is provided set the nativeArray\n\n\n    if (req.dataArray && !req.nativeArray) {\n      req.nativeArray = req.dataArray.getData();\n    } // create one\n\n\n    var buffer = _Buffer_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n    buffer.setDevice(model.device);\n    var gpuUsage = null; // handle uniform buffers\n\n    if (req.usage === BufferUsage.UniformArray) {\n      /* eslint-disable no-bitwise */\n      gpuUsage = GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST;\n      /* eslint-enable no-bitwise */\n\n      buffer.createAndWrite(req.nativeArray, gpuUsage);\n    } // handle storage buffers\n\n\n    if (req.usage === BufferUsage.Storage) {\n      /* eslint-disable no-bitwise */\n      gpuUsage = GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST;\n      /* eslint-enable no-bitwise */\n\n      buffer.createAndWrite(req.nativeArray, gpuUsage);\n    } // handle textures\n\n\n    if (req.usage === BufferUsage.Texture) {\n      /* eslint-disable no-bitwise */\n      gpuUsage = GPUBufferUsage.COPY_SRC;\n      /* eslint-enable no-bitwise */\n\n      buffer.createAndWrite(req.nativeArray, gpuUsage);\n    } // all of the below types that have gpuUsage = VERTEX require format\n    // to be provided.\n    // handle point data\n\n\n    if (req.usage === BufferUsage.PointArray) {\n      gpuUsage = GPUBufferUsage.VERTEX;\n      var arrayType = _Types_js__WEBPACK_IMPORTED_MODULE_4__.default.getNativeTypeFromBufferFormat(req.format);\n      var result = packArray(req.cells, req.primitiveType, req.representation, req.dataArray, arrayType, {\n        packExtra: req.packExtra,\n        shift: req.shift,\n        scale: req.scale,\n        cellData: req.cellData,\n        cellOffset: req.cellOffset\n      }); // console.log(result);\n\n      buffer.createAndWrite(result.nativeArray, gpuUsage);\n      buffer.setStrideInBytes(_Types_js__WEBPACK_IMPORTED_MODULE_4__.default.getByteStrideFromBufferFormat(req.format));\n      buffer.setArrayInformation([{\n        offset: 0,\n        format: req.format\n      }]);\n    } // handle normals from points, snorm8x4\n\n\n    if (req.usage === BufferUsage.NormalsFromPoints) {\n      gpuUsage = GPUBufferUsage.VERTEX;\n      var normals = generateNormals(req.cells, req.primitiveType, req.representation, req.dataArray);\n      buffer.createAndWrite(normals, gpuUsage);\n      buffer.setStrideInBytes(_Types_js__WEBPACK_IMPORTED_MODULE_4__.default.getByteStrideFromBufferFormat(req.format));\n      buffer.setArrayInformation([{\n        offset: 0,\n        format: req.format\n      }]);\n    }\n\n    if (req.usage === BufferUsage.RawVertex) {\n      gpuUsage = GPUBufferUsage.VERTEX;\n      buffer.createAndWrite(req.nativeArray, gpuUsage);\n      buffer.setStrideInBytes(_Types_js__WEBPACK_IMPORTED_MODULE_4__.default.getByteStrideFromBufferFormat(req.format));\n      buffer.setArrayInformation([{\n        offset: 0,\n        format: req.format\n      }]);\n    }\n\n    buffer.setSourceTime(req.time); // cache the buffer if we have a dataArray.\n    // We create a new req that only has the 4 fields required for\n    // a comparison to avoid GC cycles\n\n    if (req.source) {\n      if (!model.buffers.has(req.source)) {\n        model.buffers.set(req.source, []);\n      }\n\n      var _dabuffers = model.buffers.get(req.source);\n\n      _dabuffers.push({\n        request: {\n          time: req.time,\n          format: req.format,\n          usage: req.usage,\n          hash: req.hash\n        },\n        buffer: buffer\n      });\n    }\n\n    return buffer;\n  };\n\n  publicAPI.getFullScreenQuadBuffer = function () {\n    if (model.fullScreenQuadBuffer) {\n      return model.fullScreenQuadBuffer;\n    }\n\n    model.fullScreenQuadBuffer = _Buffer_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n    model.fullScreenQuadBuffer.setDevice(model.device); // prettier-ignore\n\n    var array = new Float32Array([-1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0]);\n    model.fullScreenQuadBuffer.createAndWrite(array, GPUBufferUsage.VERTEX);\n    model.fullScreenQuadBuffer.setStrideInBytes(12);\n    model.fullScreenQuadBuffer.setArrayInformation([{\n      offset: 0,\n      format: 'float32x3'\n    }]);\n    return model.fullScreenQuadBuffer;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  device: null,\n  fullScreenQuadBuffer: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_1__.obj)(publicAPI, model); // this is a cache, and a cache with GC pretty much means WeakMap\n\n  model.buffers = new WeakMap();\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_1__.setGet)(publicAPI, model, ['device']);\n  vtkWebGPUBufferManager(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_1__.newInstance)(extend); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUBufferManager$1 = _objectSpread(_objectSpread({\n  newInstance: newInstance,\n  extend: extend\n}, STATIC), _BufferManager_Constants_js__WEBPACK_IMPORTED_MODULE_6__.default);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUBufferManager$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager/Constants.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager/Constants.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"BufferUsage\": () => (/* binding */ BufferUsage),\n/* harmony export */   \"PrimitiveTypes\": () => (/* binding */ PrimitiveTypes)\n/* harmony export */ });\nvar BufferUsage = {\n  Verts: 0,\n  Lines: 1,\n  Triangles: 2,\n  Strips: 3,\n  LinesFromStrips: 4,\n  LinesFromTriangles: 5,\n  Points: 6,\n  UniformArray: 7,\n  PointArray: 8,\n  NormalsFromPoints: 9,\n  Texture: 10,\n  RawVertex: 11,\n  Storage: 12\n};\nvar PrimitiveTypes = {\n  Start: 0,\n  Points: 0,\n  Lines: 1,\n  Triangles: 2,\n  TriangleStrips: 3,\n  TriangleEdges: 4,\n  TriangleStripEdges: 5,\n  End: 6\n};\nvar Constants = {\n  BufferUsage: BufferUsage,\n  PrimitiveTypes: PrimitiveTypes\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Constants);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager/Constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/Camera.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/Camera.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ViewNodeFactory.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n\n\n\n\n\n// vtkWebGPUCamera methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUCamera(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUCamera');\n\n  publicAPI.getKeyMatrices = function (webGPURenderer) {\n    // has the camera changed?\n    var ren = webGPURenderer.getRenderable();\n    var webGPURenderWindow = webGPURenderer.getParent();\n\n    if (Math.max(webGPURenderWindow.getMTime(), publicAPI.getMTime(), ren.getMTime(), model.renderable.getMTime(), webGPURenderer.getStabilizedTime()) > model.keyMatrixTime.getMTime()) {\n      var wcvc = model.renderable.getViewMatrix();\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.c)(model.keyMatrices.normalMatrix, wcvc); // zero out translation\n\n      model.keyMatrices.normalMatrix[3] = 0.0;\n      model.keyMatrices.normalMatrix[7] = 0.0;\n      model.keyMatrices.normalMatrix[11] = 0.0;\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.i)(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.j)(model.keyMatrices.wcvc, wcvc);\n      var center = webGPURenderer.getStabilizedCenterByReference();\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.t)(model.keyMatrices.scvc, model.keyMatrices.wcvc, center);\n      var aspectRatio = webGPURenderer.getAspectRatio();\n      var vcpc = model.renderable.getProjectionMatrix(aspectRatio, -1, 1);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.j)(model.keyMatrices.vcpc, vcpc); // adjust due to WebGPU using a different coordinate system in Z\n\n      model.keyMatrices.vcpc[2] = 0.5 * vcpc[8] + 0.5 * vcpc[12];\n      model.keyMatrices.vcpc[6] = 0.5 * vcpc[9] + 0.5 * vcpc[13];\n      model.keyMatrices.vcpc[10] = 0.5 * vcpc[10] + 0.5 * vcpc[14];\n      model.keyMatrices.vcpc[14] = 0.5 * vcpc[11] + 0.5 * vcpc[15];\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.m)(model.keyMatrices.scpc, model.keyMatrices.vcpc, model.keyMatrices.scvc);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_3__.i)(model.keyMatrices.pcsc, model.keyMatrices.scpc);\n      model.keyMatrixTime.modified();\n    }\n\n    return model.keyMatrices;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  keyMatrixTime: null,\n  keyMatrices: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues);\n  model.keyMatrixTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model.keyMatrixTime); // values always get set by the get method\n\n  model.keyMatrices = {\n    normalMatrix: new Float64Array(16),\n    vcpc: new Float64Array(16),\n    pcsc: new Float64Array(16),\n    wcvc: new Float64Array(16),\n    scpc: new Float64Array(16),\n    scvc: new Float64Array(16)\n  }; // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['keyMatrixTime']); // Object methods\n\n  vtkWebGPUCamera(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend); // ----------------------------------------------------------------------------\n\nvar index = {\n  newInstance: newInstance,\n  extend: extend\n}; // Register ourself to WebGPU backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__.registerOverride)('vtkCamera', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/Camera.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/Device.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/Device.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _BufferManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BufferManager.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager.js\");\n/* harmony import */ var _ShaderCache_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ShaderCache.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js\");\n/* harmony import */ var _TextureManager_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./TextureManager.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/TextureManager.js\");\n\n\n\n\n\n// vtkWebGPUDevice methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUDevice(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUDevice');\n\n  publicAPI.initialize = function (handle) {\n    model.handle = handle;\n  };\n\n  publicAPI.createCommandEncoder = function () {\n    return model.handle.createCommandEncoder();\n  };\n\n  publicAPI.submitCommandEncoder = function (commandEncoder) {\n    model.handle.queue.submit([commandEncoder.finish()]);\n  };\n\n  publicAPI.getShaderModule = function (sd) {\n    return model.shaderCache.getShaderModule(sd);\n  };\n  /* eslint-disable no-bitwise */\n\n  /* eslint-disable no-undef */\n\n\n  publicAPI.getBindGroupLayout = function (val) {\n    if (!val.entries) {\n      return null;\n    } // add in basic required values if missing\n\n\n    for (var i = 0; i < val.entries.length; i++) {\n      var ent = val.entries[i];\n      ent.binding = ent.binding || 0;\n      ent.visibility = ent.visibility || GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT;\n    } // do we already have one?\n\n\n    var sval = JSON.stringify(val);\n\n    for (var _i = 0; _i < model.bindGroupLayouts.length; _i++) {\n      if (model.bindGroupLayouts[_i].sval === sval) {\n        return model.bindGroupLayouts[_i].layout;\n      }\n    } // create one and store it\n\n\n    var layout = model.handle.createBindGroupLayout(val); // we actually only store the stringified version\n    // as that is what we always compare against\n\n    model.bindGroupLayouts.push({\n      sval: sval,\n      layout: layout\n    });\n    return layout;\n  };\n\n  publicAPI.getBindGroupLayoutDescription = function (layout) {\n    for (var i = 0; i < model.bindGroupLayouts.length; i++) {\n      if (model.bindGroupLayouts[i].layout === layout) {\n        return model.bindGroupLayouts[i].sval;\n      }\n    }\n\n    vtkErrorMacro('layout not found');\n    console.trace();\n    return null;\n  };\n\n  publicAPI.getPipeline = function (hash) {\n    if (hash in model.pipelines) {\n      return model.pipelines[hash];\n    }\n\n    return null;\n  };\n\n  publicAPI.createPipeline = function (hash, pipeline) {\n    pipeline.initialize(publicAPI);\n    model.pipelines[hash] = pipeline;\n  };\n\n  publicAPI.onSubmittedWorkDone = function () {\n    return model.handle.queue.onSubmittedWorkDone();\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  handle: null,\n  pipelines: null,\n  shaderCache: null,\n  bindGroupLayouts: null,\n  bufferManager: null,\n  textureManager: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.obj)(publicAPI, model);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['handle']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.get)(publicAPI, model, ['bufferManager', 'shaderCache', 'textureManager']);\n  model.shaderCache = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n  model.shaderCache.setDevice(publicAPI);\n  model.bindGroupLayouts = [];\n  model.bufferManager = _BufferManager_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n  model.bufferManager.setDevice(publicAPI);\n  model.textureManager = _TextureManager_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n  model.textureManager.setDevice(publicAPI);\n  model.pipelines = {}; // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkWebGPUDevice(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend, 'vtkWebGPUDevice'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUDevice$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUDevice$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/Device.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/ForwardPass.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/ForwardPass.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _OpaquePass_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OpaquePass.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/OpaquePass.js\");\n/* harmony import */ var _OrderIndependentTranslucentPass_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./OrderIndependentTranslucentPass.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/OrderIndependentTranslucentPass.js\");\n/* harmony import */ var _VolumePass_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VolumePass.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/VolumePass.js\");\n/* harmony import */ var _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../SceneGraph/RenderPass.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderPass.js\");\n\n\n\n\n\n\nfunction vtkForwardPass(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkForwardPass'); // this pass implements a forward rendering pipeline\n  // if both volumes and opaque geometry are present\n  // it will mix the two together by capturing a zbuffer\n  // first\n\n  publicAPI.traverse = function (viewNode) {\n    var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n    if (model.deleted) {\n      return;\n    } // we just render our delegates in order\n\n\n    model.currentParent = parent; // build\n\n    publicAPI.setCurrentOperation('buildPass');\n    viewNode.traverse(publicAPI);\n\n    if (!model.opaquePass) {\n      model.opaquePass = _OpaquePass_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n    }\n\n    var numlayers = viewNode.getRenderable().getNumberOfLayers(); // iterate over renderers\n\n    var renderers = viewNode.getChildren();\n\n    for (var i = 0; i < numlayers; i++) {\n      for (var index = 0; index < renderers.length; index++) {\n        var renNode = renderers[index];\n        var ren = viewNode.getRenderable().getRenderers()[index];\n\n        if (ren.getDraw() && ren.getLayer() === i) {\n          // check for both opaque and volume actors\n          model.opaqueActorCount = 0;\n          model.translucentActorCount = 0;\n          model.volumes = [];\n          publicAPI.setCurrentOperation('queryPass');\n          renNode.traverse(publicAPI);\n          publicAPI.setCurrentOperation('cameraPass');\n          renNode.traverse(publicAPI); // always do opaque pass to get a valid color and zbuffer, even if empty\n\n          model.opaquePass.traverse(renNode, viewNode); // optional translucent pass\n\n          if (model.translucentActorCount > 0) {\n            if (!model.translucentPass) {\n              model.translucentPass = _OrderIndependentTranslucentPass_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n            }\n\n            model.translucentPass.setColorTextureView(model.opaquePass.getColorTextureView());\n            model.translucentPass.setDepthTextureView(model.opaquePass.getDepthTextureView());\n            model.translucentPass.traverse(renNode, viewNode);\n          } // optional volume pass\n\n\n          if (model.volumes.length > 0) {\n            if (!model.volumePass) {\n              model.volumePass = _VolumePass_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n            }\n\n            model.volumePass.setColorTextureView(model.opaquePass.getColorTextureView());\n            model.volumePass.setDepthTextureView(model.opaquePass.getDepthTextureView());\n            model.volumePass.setVolumes(model.volumes);\n            model.volumePass.traverse(renNode, viewNode);\n          }\n        }\n      }\n    } // blit the result into the swap chain\n\n\n    var swapChain = viewNode.getSwapChain();\n    var sctex = swapChain.getCurrentTexture();\n    var optex = model.opaquePass.getColorTexture();\n    var cmdEnc = viewNode.getCommandEncoder();\n    cmdEnc.copyTextureToTexture({\n      texture: optex.getHandle()\n    }, {\n      texture: sctex\n    }, {\n      width: optex.getWidth(),\n      height: optex.getHeight(),\n      depthOrArrayLayers: 1\n    });\n  };\n\n  publicAPI.incrementOpaqueActorCount = function () {\n    return model.opaqueActorCount++;\n  };\n\n  publicAPI.incrementTranslucentActorCount = function () {\n    return model.translucentActorCount++;\n  };\n\n  publicAPI.addVolume = function (volume) {\n    model.volumes.push(volume);\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  opaqueActorCount: 0,\n  translucentActorCount: 0,\n  volumes: null,\n  opaqueRenderEncoder: null,\n  translucentPass: null,\n  volumePass: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_4__.default.extend(publicAPI, model, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['opaquePass', 'translucentPass', 'volumePass']); // Object methods\n\n  vtkForwardPass(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkForwardPass'); // ----------------------------------------------------------------------------\n\nvar vtkForwardPass$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkForwardPass$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/ForwardPass.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/FullScreenQuad.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/FullScreenQuad.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _ShaderCache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ShaderCache.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js\");\n/* harmony import */ var _MapperHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MapperHelper.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/MapperHelper.js\");\n\n\n\n\n// vtkWebGPUFullScreenQuad methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUFullScreenQuad(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUFullScreenQuad');\n\n  publicAPI.replaceShaderPosition = function (hash, pipeline, vertexInput) {\n    var vDesc = pipeline.getShaderDescription('vertex');\n    vDesc.addBuiltinOutput('vec4<f32>', '[[builtin(position)]] Position');\n    var code = vDesc.getCode();\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_1__.default.substitute(code, '//VTK::Position::Impl', ['output.tcoordVS = vec2<f32>(vertexBC.x * 0.5 + 0.5, 1.0 - vertexBC.y * 0.5 - 0.5);', 'output.Position = vec4<f32>(vertexBC, 1.0);']).result;\n    vDesc.setCode(code);\n  };\n\n  model.shaderReplacements.set('replaceShaderPosition', publicAPI.replaceShaderPosition);\n  var superclassBuild = publicAPI.build;\n\n  publicAPI.build = function (renderEncoder, device) {\n    var buff = device.getBufferManager().getFullScreenQuadBuffer();\n    model.vertexInput.addBuffer(buff, ['vertexBC']);\n    model.numberOfVertices = 6;\n    superclassBuild(renderEncoder, device);\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _MapperHelper_js__WEBPACK_IMPORTED_MODULE_2__.default.extend(publicAPI, model, initialValues); // Object methods\n\n  vtkWebGPUFullScreenQuad(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkWebGPUFullScreenQuad'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUFullScreenQuad$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUFullScreenQuad$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/FullScreenQuad.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/HardwareSelectionPass.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/HardwareSelectionPass.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _RenderEncoder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RenderEncoder.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/RenderEncoder.js\");\n/* harmony import */ var _Texture_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Texture.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Texture.js\");\n/* harmony import */ var _ShaderCache_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ShaderCache.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js\");\n/* harmony import */ var _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../SceneGraph/RenderPass.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderPass.js\");\n\n\n\n\n\n\nfunction vtkWebGPUHardwareSelectionPass(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUHardwareSelectionPass'); // this pass implements a forward rendering pipeline\n  // if both volumes and opaque geometry are present\n  // it will mix the two together by capturing a zbuffer\n  // first\n\n  publicAPI.traverse = function (viewNode, renNode) {\n    if (model.deleted) {\n      return;\n    }\n\n    model.currentParent = null; // build\n\n    publicAPI.setCurrentOperation('buildPass');\n    viewNode.traverse(publicAPI);\n    var device = viewNode.getDevice();\n\n    if (!model.selectionRenderEncoder) {\n      publicAPI.createRenderEncoder(); // create color texture\n\n      model.colorTexture = _Texture_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n      model.colorTexture.create(device, {\n        width: viewNode.getCanvas().width,\n        height: viewNode.getCanvas().height,\n        format: 'rgba32uint',\n\n        /* eslint-disable no-undef */\n\n        /* eslint-disable no-bitwise */\n        usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC\n      });\n      var v1 = model.colorTexture.createView();\n      v1.setName('hardwareSelectColorTexture');\n      model.selectionRenderEncoder.setColorTextureView(0, v1); // create depth texture\n\n      model.depthTexture = _Texture_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n      model.depthTexture.create(device, {\n        width: viewNode.getCanvas().width,\n        height: viewNode.getCanvas().height,\n        format: 'depth32float',\n\n        /* eslint-disable no-undef */\n\n        /* eslint-disable no-bitwise */\n        usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC\n      });\n      var v2 = model.depthTexture.createView();\n      v2.setName('hardwareSelectDepthTexture');\n      model.selectionRenderEncoder.setDepthTextureView(v2);\n    } else {\n      model.colorTexture.resize(viewNode.getCanvas().width, viewNode.getCanvas().height);\n      model.depthTexture.resizeToMatch(model.colorTexture);\n    }\n\n    model.selectionRenderEncoder.attachTextureViews();\n    renNode.setRenderEncoder(model.selectionRenderEncoder);\n    publicAPI.setCurrentOperation('cameraPass');\n    renNode.traverse(publicAPI); // opaque pass is used for selection\n\n    publicAPI.setCurrentOperation('opaquePass');\n    renNode.traverse(publicAPI);\n  };\n\n  publicAPI.createRenderEncoder = function () {\n    model.selectionRenderEncoder = _RenderEncoder_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(); // default settings are fine for this\n\n    model.selectionRenderEncoder.setPipelineHash('sel');\n    model.selectionRenderEncoder.setReplaceShaderCodeFunction(function (pipeline) {\n      var fDesc = pipeline.getShaderDescription('fragment');\n      fDesc.addOutput('vec4<u32>', 'outColor');\n      var code = fDesc.getCode();\n      code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_3__.default.substitute(code, '//VTK::RenderEncoder::Impl', ['output.outColor = vec4<u32>(mapperUBO.PropID, compositeID, 0u, 0u);']).result;\n      fDesc.setCode(code);\n    });\n    var renDesc = model.selectionRenderEncoder.getDescription();\n    renDesc.colorAttachments[0].loadValue = [0.0, 0.0, 0.0, 0.0];\n    renDesc.depthStencilAttachment.stencilLoadValue = 'load';\n    model.selectionRenderEncoder.setPipelineSettings({\n      primitive: {\n        cullMode: 'none'\n      },\n      depthStencil: {\n        depthWriteEnabled: true,\n        depthCompare: 'less',\n        format: 'depth32float'\n      },\n      fragment: {\n        targets: [{\n          format: 'rgba32uint',\n          blend: undefined\n        }]\n      }\n    });\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  selectionRenderEncoder: null,\n  colorTexture: null,\n  depthTexture: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_4__.default.extend(publicAPI, model, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['colorTexture', 'depthTexture']); // Object methods\n\n  vtkWebGPUHardwareSelectionPass(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkWebGPUHardwareSelectionPass'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUHardwareSelectionPass$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUHardwareSelectionPass$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/HardwareSelectionPass.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/HardwareSelector.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/HardwareSelector.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Core_HardwareSelector_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Core/HardwareSelector.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/HardwareSelector.js\");\n/* harmony import */ var _Buffer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Buffer.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Buffer.js\");\n/* harmony import */ var _HardwareSelectionPass_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HardwareSelectionPass.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/HardwareSelectionPass.js\");\n/* harmony import */ var _Common_DataModel_SelectionNode_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Common/DataModel/SelectionNode.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/SelectionNode.js\");\n/* harmony import */ var _Common_DataModel_DataSet_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/DataModel/DataSet.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/DataSet.js\");\n\n\n\n\n\n\n\n\n\nvar SelectionContent = _Common_DataModel_SelectionNode_js__WEBPACK_IMPORTED_MODULE_6__.default.SelectionContent,\n    SelectionField = _Common_DataModel_SelectionNode_js__WEBPACK_IMPORTED_MODULE_6__.default.SelectionField;\nvar FieldAssociations = _Common_DataModel_DataSet_js__WEBPACK_IMPORTED_MODULE_7__.default.FieldAssociations;\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.vtkErrorMacro;\n\nfunction getInfoHash(info) {\n  return \"\".concat(info.propID, \" \").concat(info.compositeID);\n}\n\nfunction convert(xx, yy, buffdata, channel) {\n  var offset = ((buffdata.height - yy - 1) * buffdata.colorBufferWidth + xx) * 4 + channel;\n  return buffdata.colorValues[offset];\n}\n\nfunction getPixelInformationWithData(buffdata, inDisplayPosition, maxDistance, outSelectedPosition) {\n  // Base case\n  var maxDist = maxDistance < 0 ? 0 : maxDistance;\n\n  if (maxDist === 0) {\n    outSelectedPosition[0] = inDisplayPosition[0];\n    outSelectedPosition[1] = inDisplayPosition[1];\n\n    if (inDisplayPosition[0] < 0 || inDisplayPosition[0] >= buffdata.width || inDisplayPosition[1] < 0 || inDisplayPosition[1] >= buffdata.height) {\n      return null;\n    }\n\n    var actorid = convert(inDisplayPosition[0], inDisplayPosition[1], buffdata, 0);\n\n    if (actorid <= 0) {\n      // the pixel did not hit any actor.\n      return null;\n    }\n\n    var _info = {};\n    _info.propID = actorid;\n    var compositeID = convert(inDisplayPosition[0], inDisplayPosition[1], buffdata, 1);\n\n    if (compositeID < 0 || compositeID > 0xffffff) {\n      compositeID = 0;\n    }\n\n    _info.compositeID = compositeID;\n\n    if (buffdata.captureZValues) {\n      var offset = (buffdata.height - inDisplayPosition[1] - 1) * buffdata.zbufferBufferWidth + inDisplayPosition[0];\n      _info.zValue = buffdata.depthValues[offset];\n      _info.displayPosition = inDisplayPosition;\n    }\n\n    return _info;\n  } // Iterate over successively growing boxes.\n  // They recursively call the base case to handle single pixels.\n\n\n  var dispPos = [inDisplayPosition[0], inDisplayPosition[1]];\n  var curPos = [0, 0];\n  var info = getPixelInformationWithData(buffdata, inDisplayPosition, 0, outSelectedPosition);\n\n  if (info) {\n    return info;\n  }\n\n  for (var dist = 1; dist < maxDist; ++dist) {\n    // Vertical sides of box.\n    for (var y = dispPos[1] > dist ? dispPos[1] - dist : 0; y <= dispPos[1] + dist; ++y) {\n      curPos[1] = y;\n\n      if (dispPos[0] >= dist) {\n        curPos[0] = dispPos[0] - dist;\n        info = getPixelInformationWithData(buffdata, curPos, 0, outSelectedPosition);\n\n        if (info) {\n          return info;\n        }\n      }\n\n      curPos[0] = dispPos[0] + dist;\n      info = getPixelInformationWithData(buffdata, curPos, 0, outSelectedPosition);\n\n      if (info) {\n        return info;\n      }\n    } // Horizontal sides of box.\n\n\n    for (var x = dispPos[0] >= dist ? dispPos[0] - (dist - 1) : 0; x <= dispPos[0] + (dist - 1); ++x) {\n      curPos[0] = x;\n\n      if (dispPos[1] >= dist) {\n        curPos[1] = dispPos[1] - dist;\n        info = getPixelInformationWithData(buffdata, curPos, 0, outSelectedPosition);\n\n        if (info) {\n          return info;\n        }\n      }\n\n      curPos[1] = dispPos[1] + dist;\n      info = getPixelInformationWithData(buffdata, curPos, 0, outSelectedPosition);\n\n      if (info) {\n        return info;\n      }\n    }\n  } // nothing hit.\n\n\n  outSelectedPosition[0] = inDisplayPosition[0];\n  outSelectedPosition[1] = inDisplayPosition[1];\n  return null;\n} //-----------------------------------------------------------------------------\n\n\nfunction convertSelection(fieldassociation, dataMap, buffdata) {\n  var sel = [];\n  var count = 0;\n  dataMap.forEach(function (value, key) {\n    var child = _Common_DataModel_SelectionNode_js__WEBPACK_IMPORTED_MODULE_6__.default.newInstance();\n    child.setContentType(SelectionContent.INDICES);\n\n    switch (fieldassociation) {\n      case FieldAssociations.FIELD_ASSOCIATION_CELLS:\n        child.setFieldType(SelectionField.CELL);\n        break;\n\n      case FieldAssociations.FIELD_ASSOCIATION_POINTS:\n        child.setFieldType(SelectionField.POINT);\n        break;\n\n      default:\n        vtkErrorMacro('Unknown field association');\n    }\n\n    child.getProperties().propID = value.info.propID;\n    var wprop = buffdata.webGPURenderer.getPropFromID(value.info.propID);\n    child.getProperties().prop = wprop.getRenderable();\n    child.getProperties().compositeID = value.info.compositeID;\n    child.getProperties().pixelCount = value.pixelCount;\n\n    if (buffdata.captureZValues) {\n      child.getProperties().displayPosition = [value.info.displayPosition[0], value.info.displayPosition[1], value.info.zValue];\n      child.getProperties().worldPosition = buffdata.webGPURenderWindow.displayToWorld(value.info.displayPosition[0], value.info.displayPosition[1], value.info.zValue, buffdata.renderer);\n    }\n\n    child.setSelectionList(value.attributeIDs);\n    sel[count] = child;\n    count++;\n  });\n  return sel;\n} //----------------------------------------------------------------------------\n\n\nfunction generateSelectionWithData(buffdata, fx1, fy1, fx2, fy2) {\n  var x1 = Math.floor(fx1);\n  var y1 = Math.floor(fy1);\n  var x2 = Math.floor(fx2);\n  var y2 = Math.floor(fy2);\n  var dataMap = new Map();\n  var outSelectedPosition = [0, 0];\n\n  for (var yy = y1; yy <= y2; yy++) {\n    for (var xx = x1; xx <= x2; xx++) {\n      var pos = [xx, yy];\n      var info = getPixelInformationWithData(buffdata, pos, 0, outSelectedPosition);\n\n      if (info) {\n        var hash = getInfoHash(info);\n\n        if (!dataMap.has(hash)) {\n          dataMap.set(hash, {\n            info: info,\n            pixelCount: 1,\n            attributeIDs: [info.attributeID]\n          });\n        } else {\n          var dmv = dataMap.get(hash);\n          dmv.pixelCount++;\n\n          if (buffdata.captureZValues) {\n            if (info.zValue < dmv.info.zValue) {\n              dmv.info = info;\n            }\n          }\n\n          if (dmv.attributeIDs.indexOf(info.attributeID) === -1) {\n            dmv.attributeIDs.push(info.attributeID);\n          }\n        }\n      }\n    }\n  }\n\n  return convertSelection(buffdata.fieldAssociation, dataMap, buffdata);\n} // ----------------------------------------------------------------------------\n// vtkWebGPUHardwareSelector methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkWebGPUHardwareSelector(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUHardwareSelector'); //----------------------------------------------------------------------------\n\n  publicAPI.endSelection = function () {\n    model.WebGPURenderer.setSelector(null);\n  }; //----------------------------------------------------------------------------\n  // note we ignore the x,y arguments as WebGPU has to do buffer copies\n  // of the entire depth bufer. We could realloc hardware selection textures\n  // based on the passed in size etc but it gets messy so for now we always\n  // render the full size window and copy it to the buffers.\n\n\n  publicAPI.getSourceDataAsync = /*#__PURE__*/function () {\n    var _ref = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(renderer) {\n      var webGPURenderer, originalSuppress, device, texture, depthTexture, result, colorBuffer, cmdEnc, zbuffer, cLoad, zLoad;\n      return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function _callee$(_context) {\n        while (1) {\n          switch (_context.prev = _context.next) {\n            case 0:\n              if (!(!renderer || !model.WebGPURenderWindow)) {\n                _context.next = 3;\n                break;\n              }\n\n              vtkErrorMacro('Renderer and view must be set before calling Select.');\n              return _context.abrupt(\"return\", false);\n\n            case 3:\n              if (model.WebGPURenderWindow.getInitialized()) {\n                _context.next = 7;\n                break;\n              }\n\n              model.WebGPURenderWindow.initialize();\n              _context.next = 7;\n              return new Promise(function (resolve) {\n                return model.WebGPURenderWindow.onInitialized(resolve);\n              });\n\n            case 7:\n              webGPURenderer = model.WebGPURenderWindow.getViewNodeFor(renderer);\n\n              if (webGPURenderer) {\n                _context.next = 10;\n                break;\n              }\n\n              return _context.abrupt(\"return\", false);\n\n            case 10:\n              // Initialize renderer for selection.\n              // change the renderer's background to black, which will indicate a miss\n              originalSuppress = webGPURenderer.getSuppressClear();\n              webGPURenderer.setSuppressClear(true);\n\n              model._selectionPass.traverse(model.WebGPURenderWindow, webGPURenderer); // restore original background\n\n\n              webGPURenderer.setSuppressClear(originalSuppress);\n              device = model.WebGPURenderWindow.getDevice();\n              texture = model._selectionPass.getColorTexture();\n              depthTexture = model._selectionPass.getDepthTexture(); // as this is async we really don't want to store things in\n              // the class as multiple calls may start before resolving\n              // so anything specific to this request gets put into the\n              // result object (by value in most cases)\n\n              result = {\n                captureZValues: model.captureZValues,\n                fieldAssociation: model.fieldAssociation,\n                renderer: renderer,\n                webGPURenderer: webGPURenderer,\n                webGPURenderWindow: model.WebGPURenderWindow,\n                width: texture.getWidth(),\n                height: texture.getHeight()\n              }; // must be a multiple of 256 bytes, so 16 texels with rgba32uint\n\n              result.colorBufferWidth = 16 * Math.floor((result.width + 15) / 16);\n              result.colorBufferSizeInBytes = result.colorBufferWidth * result.height * 4 * 4;\n              colorBuffer = _Buffer_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n              colorBuffer.setDevice(device);\n              /* eslint-disable no-bitwise */\n\n              /* eslint-disable no-undef */\n\n              colorBuffer.create(result.colorBufferSizeInBytes, GPUBufferUsage.MAP_READ | GPUBufferUsage.COPY_DST);\n              /* eslint-enable no-bitwise */\n\n              /* eslint-enable no-undef */\n\n              cmdEnc = model.WebGPURenderWindow.getCommandEncoder();\n              cmdEnc.copyTextureToBuffer({\n                texture: texture.getHandle()\n              }, {\n                buffer: colorBuffer.getHandle(),\n                bytesPerRow: 16 * result.colorBufferWidth,\n                rowsPerImage: result.height\n              }, {\n                width: result.width,\n                height: result.height,\n                depthOrArrayLayers: 1\n              });\n\n              if (model.captureZValues) {\n                result.zbufferBufferWidth = 64 * Math.floor((result.width + 63) / 64);\n                zbuffer = _Buffer_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n                zbuffer.setDevice(device);\n                result.zbufferSizeInBytes = result.height * result.zbufferBufferWidth * 4;\n                /* eslint-disable no-bitwise */\n\n                /* eslint-disable no-undef */\n\n                zbuffer.create(result.zbufferSizeInBytes, GPUBufferUsage.MAP_READ | GPUBufferUsage.COPY_DST);\n                /* eslint-enable no-bitwise */\n\n                /* eslint-enable no-undef */\n\n                cmdEnc.copyTextureToBuffer({\n                  texture: depthTexture.getHandle(),\n                  aspect: 'depth-only'\n                }, {\n                  buffer: zbuffer.getHandle(),\n                  bytesPerRow: 4 * result.zbufferBufferWidth,\n                  rowsPerImage: result.height\n                }, {\n                  width: result.width,\n                  height: result.height,\n                  depthOrArrayLayers: 1\n                });\n              }\n\n              device.submitCommandEncoder(cmdEnc);\n              /* eslint-disable no-undef */\n\n              cLoad = colorBuffer.mapAsync(GPUMapMode.READ);\n\n              if (!model.captureZValues) {\n                _context.next = 36;\n                break;\n              }\n\n              zLoad = zbuffer.mapAsync(GPUMapMode.READ);\n              _context.next = 32;\n              return Promise.all([cLoad, zLoad]);\n\n            case 32:\n              result.depthValues = new Float32Array(zbuffer.getMappedRange().slice());\n              zbuffer.unmap();\n              _context.next = 38;\n              break;\n\n            case 36:\n              _context.next = 38;\n              return cLoad;\n\n            case 38:\n              /* eslint-enable no-undef */\n              result.colorValues = new Uint32Array(colorBuffer.getMappedRange().slice());\n              colorBuffer.unmap();\n\n              result.generateSelection = function (fx1, fy1, fx2, fy2) {\n                return generateSelectionWithData(result, fx1, fy1, fx2, fy2);\n              };\n\n              return _context.abrupt(\"return\", result);\n\n            case 42:\n            case \"end\":\n              return _context.stop();\n          }\n        }\n      }, _callee);\n    }));\n\n    return function (_x) {\n      return _ref.apply(this, arguments);\n    };\n  }();\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  WebGPURenderWindow: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _Core_HardwareSelector_js__WEBPACK_IMPORTED_MODULE_3__.default.extend(publicAPI, model, initialValues);\n  model._selectionPass = _HardwareSelectionPass_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance();\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.setGet(publicAPI, model, ['WebGPURenderWindow']); // Object methods\n\n  vtkWebGPUHardwareSelector(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance(extend, 'vtkWebGPUHardwareSelector'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUHardwareSelector$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUHardwareSelector$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/HardwareSelector.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/MapperHelper.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/MapperHelper.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _BindGroup_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BindGroup.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/BindGroup.js\");\n/* harmony import */ var _Pipeline_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Pipeline.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Pipeline.js\");\n/* harmony import */ var _ShaderCache_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ShaderCache.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js\");\n/* harmony import */ var _ShaderDescription_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ShaderDescription.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderDescription.js\");\n/* harmony import */ var _VertexInput_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./VertexInput.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/VertexInput.js\");\n\n\n\n\n\n\n\nvar vtkWebGPUMapperHelperVS = \"\\n//VTK::Renderer::Dec\\n\\n//VTK::Color::Dec\\n\\n//VTK::Normal::Dec\\n\\n//VTK::TCoord::Dec\\n\\n//VTK::Select::Dec\\n\\n//VTK::Mapper::Dec\\n\\n//VTK::IOStructs::Dec\\n\\n[[stage(vertex)]]\\nfn main(\\n//VTK::IOStructs::Input\\n)\\n//VTK::IOStructs::Output\\n{\\n  var output : vertexOutput;\\n\\n  // var vertex: vec4<f32> = vertexBC;\\n\\n  //VTK::Color::Impl\\n\\n  //VTK::Normal::Impl\\n\\n  //VTK::TCoord::Impl\\n\\n  //VTK::Select::Impl\\n\\n  //VTK::Position::Impl\\n\\n  return output;\\n}\\n\";\nvar vtkWebGPUMapperHelperFS = \"\\n//VTK::Renderer::Dec\\n\\n//VTK::Color::Dec\\n\\n//VTK::Normal::Dec\\n\\n//VTK::TCoord::Dec\\n\\n//VTK::Select::Dec\\n\\n//VTK::RenderEncoder::Dec\\n\\n//VTK::Mapper::Dec\\n\\n//VTK::IOStructs::Dec\\n\\n[[stage(fragment)]]\\nfn main(\\n//VTK::IOStructs::Input\\n)\\n//VTK::IOStructs::Output\\n{\\n  var output : fragmentOutput;\\n\\n  //VTK::Color::Impl\\n\\n  //VTK::Normal::Impl\\n\\n  //VTK::Light::Impl\\n\\n  //VTK::TCoord::Impl\\n\\n  //VTK::Select::Impl\\n\\n  // var computedColor:vec4<f32> = vec4<f32>(1.0,0.5,0.5,1.0);\\n\\n  //VTK::RenderEncoder::Impl\\n  return output;\\n}\\n\"; // ----------------------------------------------------------------------------\n// vtkWebGPUMapperHelper methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUMapperHelper(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUMapperHelper');\n\n  publicAPI.generateShaderDescriptions = function (hash, pipeline, vertexInput) {\n    // create the shader descriptions\n    var vDesc = _ShaderDescription_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance({\n      type: 'vertex',\n      hash: hash,\n      code: model.vertexShaderTemplate\n    });\n    var fDesc = _ShaderDescription_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance({\n      type: 'fragment',\n      hash: hash,\n      code: model.fragmentShaderTemplate\n    }); // add them to the pipeline\n\n    var sdrs = pipeline.getShaderDescriptions();\n    sdrs.push(vDesc);\n    sdrs.push(fDesc); // look for replacements to invoke\n\n    var scode = model.vertexShaderTemplate + model.fragmentShaderTemplate;\n    var re = new RegExp('//VTK::[^:]*::', 'g');\n    var unique = scode.match(re).filter(function (v, i, a) {\n      return a.indexOf(v) === i;\n    });\n    var fnames = unique.map(function (v) {\n      return \"replaceShader\".concat(v.substring(7, v.length - 2));\n    }); // now invoke shader replacement functions\n\n    for (var i = 0; i < fnames.length; i++) {\n      var fname = fnames[i];\n\n      if (fname !== 'replaceShaderIOStructs' && model.shaderReplacements.has(fname)) {\n        model.shaderReplacements.get(fname)(hash, pipeline, vertexInput);\n      }\n    } // always replace the IOStructs last as other replacement funcs may\n    // add inputs or outputs\n\n\n    publicAPI.replaceShaderIOStructs(hash, pipeline, vertexInput); // console.log(vDesc.getCode());\n    // console.log(fDesc.getCode());\n  };\n\n  publicAPI.replaceShaderIOStructs = function (hash, pipeline, vertexInput) {\n    var vDesc = pipeline.getShaderDescription('vertex');\n    vDesc.replaceShaderCode(null, vertexInput);\n    var fDesc = pipeline.getShaderDescription('fragment');\n    fDesc.replaceShaderCode(vDesc);\n  };\n\n  publicAPI.replaceShaderRenderEncoder = function (hash, pipeline, vertexInput) {\n    model.renderEncoder.replaceShaderCode(pipeline);\n  };\n\n  model.shaderReplacements.set('replaceShaderRenderEncoder', publicAPI.replaceShaderRenderEncoder);\n\n  publicAPI.replaceShaderRenderer = function (hash, pipeline, vertexInput) {\n    if (!model.WebGPURenderer) {\n      return;\n    }\n\n    var ubocode = model.WebGPURenderer.getBindGroup().getShaderCode(pipeline);\n    var vDesc = pipeline.getShaderDescription('vertex');\n    var code = vDesc.getCode();\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_3__.default.substitute(code, '//VTK::Renderer::Dec', [ubocode]).result;\n    vDesc.setCode(code);\n    var fDesc = pipeline.getShaderDescription('fragment');\n    code = fDesc.getCode();\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_3__.default.substitute(code, '//VTK::Renderer::Dec', [ubocode]).result;\n    fDesc.setCode(code);\n  };\n\n  model.shaderReplacements.set('replaceShaderRenderer', publicAPI.replaceShaderRenderer);\n\n  publicAPI.replaceShaderMapper = function (hash, pipeline, vertexInput) {\n    var ubocode = model.bindGroup.getShaderCode(pipeline);\n    var vDesc = pipeline.getShaderDescription('vertex');\n    var code = vDesc.getCode();\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_3__.default.substitute(code, '//VTK::Mapper::Dec', [ubocode]).result;\n    vDesc.setCode(code);\n    var fDesc = pipeline.getShaderDescription('fragment');\n    fDesc.addBuiltinInput('bool', '[[builtin(front_facing)]] frontFacing');\n    code = fDesc.getCode();\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_3__.default.substitute(code, '//VTK::Mapper::Dec', [ubocode]).result;\n    fDesc.setCode(code);\n  };\n\n  model.shaderReplacements.set('replaceShaderMapper', publicAPI.replaceShaderMapper);\n\n  publicAPI.replaceShaderPosition = function (hash, pipeline, vertexInput) {\n    var vDesc = pipeline.getShaderDescription('vertex');\n    vDesc.addBuiltinOutput('vec4<f32>', '[[builtin(position)]] Position');\n    var code = vDesc.getCode();\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_3__.default.substitute(code, '//VTK::Position::Impl', ['    output.Position = rendererUBO.SCPCMatrix*vertexBC;']).result;\n    vDesc.setCode(code);\n  };\n\n  model.shaderReplacements.set('replaceShaderPosition', publicAPI.replaceShaderPosition);\n\n  publicAPI.replaceShaderTCoord = function (hash, pipeline, vertexInput) {\n    var vDesc = pipeline.getShaderDescription('vertex');\n    vDesc.addOutput('vec2<f32>', 'tcoordVS');\n  };\n\n  model.shaderReplacements.set('replaceShaderTCoord', publicAPI.replaceShaderTCoord);\n\n  publicAPI.addTextureView = function (view) {\n    // is it already there?\n    if (model.textureViews.includes(view)) {\n      return;\n    }\n\n    model.textureViews.push(view);\n  };\n\n  publicAPI.renderForPipeline = function (renderEncoder) {\n    var pipeline = renderEncoder.getBoundPipeline(); // bind the mapper bind group\n\n    renderEncoder.activateBindGroup(model.bindGroup); // bind the vertex input\n\n    pipeline.bindVertexInput(renderEncoder, model.vertexInput);\n    renderEncoder.draw(model.numberOfVertices, model.numberOfInstances, 0, 0);\n  };\n\n  publicAPI.registerToDraw = function () {\n    if (model.pipeline) {\n      model.WebGPURenderer.registerPipelineCallback(model.pipeline, publicAPI.renderForPipeline);\n    }\n  };\n\n  publicAPI.render = function (renderEncoder, device) {\n    publicAPI.build(renderEncoder, device);\n    renderEncoder.setPipeline(model.pipeline);\n\n    if (model.WebGPURenderer) {\n      model.WebGPURenderer.bindUBO(renderEncoder);\n    }\n\n    publicAPI.renderForPipeline(renderEncoder);\n  };\n\n  publicAPI.getBindables = function () {\n    var bindables = [];\n\n    if (model.UBO) {\n      bindables.push(model.UBO);\n    }\n\n    if (model.SSBO) {\n      bindables.push(model.SSBO);\n    } // add texture BindGroupLayouts\n\n\n    for (var t = 0; t < model.textureViews.length; t++) {\n      bindables.push(model.textureViews[t]);\n      var samp = model.textureViews[t].getSampler();\n\n      if (samp) {\n        bindables.push(samp);\n      }\n    }\n\n    return bindables;\n  };\n\n  publicAPI.build = function (renderEncoder, device) {\n    // handle per primitive type\n    model.renderEncoder = renderEncoder;\n    model.pipeline = device.getPipeline(model.pipelineHash);\n    model.bindGroup.setBindables(publicAPI.getBindables()); // build VBO for this primitive\n    // build the pipeline if needed\n\n    if (!model.pipeline) {\n      model.pipeline = _Pipeline_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n      model.pipeline.setDevice(device);\n\n      if (model.WebGPURenderer) {\n        model.pipeline.addBindGroupLayout(model.WebGPURenderer.getBindGroup());\n      }\n\n      model.pipeline.addBindGroupLayout(model.bindGroup);\n      publicAPI.generateShaderDescriptions(model.pipelineHash, model.pipeline, model.vertexInput);\n      model.pipeline.setTopology(model.topology);\n      model.pipeline.setRenderEncoder(renderEncoder);\n      model.pipeline.setVertexState(model.vertexInput.getVertexInputInformation());\n      device.createPipeline(model.pipelineHash, model.pipeline);\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  bindGroup: null,\n  device: null,\n  fragmentShaderTemplate: null,\n  numberOfInstances: 1,\n  numberOfVertices: 0,\n  pipelineHash: null,\n  shaderReplacements: null,\n  SSBO: null,\n  textureViews: null,\n  topology: 'triangle-list',\n  UBO: null,\n  vertexShaderTemplate: null,\n  WebGPURenderer: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  model.textureViews = [];\n  model.vertexInput = _VertexInput_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance();\n  model.bindGroup = _BindGroup_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n  model.bindGroup.setName('mapperBG');\n  model.fragmentShaderTemplate = model.fragmentShaderTemplate || vtkWebGPUMapperHelperFS;\n  model.vertexShaderTemplate = model.vertexShaderTemplate || vtkWebGPUMapperHelperVS;\n  model.shaderReplacements = new Map(); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['vertexInput']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['device', 'fragmentShaderTemplate', 'interpolate', 'numberOfInstances', 'numberOfVertices', 'pipelineHash', 'shaderReplacements', 'SSBO', 'textureViews', 'topology', 'UBO', 'vertexShaderTemplate', 'WebGPURenderer']); // Object methods\n\n  vtkWebGPUMapperHelper(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkWebGPUMapperHelper'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUMapperHelper$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUMapperHelper$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/MapperHelper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/OpaquePass.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/OpaquePass.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _RenderEncoder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RenderEncoder.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/RenderEncoder.js\");\n/* harmony import */ var _Texture_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Texture.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Texture.js\");\n/* harmony import */ var _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../SceneGraph/RenderPass.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderPass.js\");\n\n\n\n\n\nfunction vtkWebGPUOpaquePass(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUOpaquePass'); // this pass implements a forward rendering pipeline\n  // if both volumes and opaque geometry are present\n  // it will mix the two together by capturing a zbuffer\n  // first\n\n  publicAPI.traverse = function (renNode, viewNode) {\n    if (model.deleted) {\n      return;\n    } // we just render our delegates in order\n\n\n    model.currentParent = viewNode;\n    var device = viewNode.getDevice();\n\n    if (!model.renderEncoder) {\n      publicAPI.createRenderEncoder();\n      model.colorTexture = _Texture_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n      model.colorTexture.create(device, {\n        width: viewNode.getCanvas().width,\n        height: viewNode.getCanvas().height,\n        format: 'bgra8unorm',\n\n        /* eslint-disable no-undef */\n\n        /* eslint-disable no-bitwise */\n        usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.SAMPLED | GPUTextureUsage.COPY_SRC\n      });\n      var ctView = model.colorTexture.createView();\n      ctView.setName('opaquePassColorTexture');\n      model.renderEncoder.setColorTextureView(0, ctView); // model.depthFormat = 'depth24plus-stencil8';\n\n      model.depthFormat = 'depth32float';\n      model.depthTexture = _Texture_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n      model.depthTexture.create(device, {\n        width: viewNode.getCanvas().width,\n        height: viewNode.getCanvas().height,\n        format: model.depthFormat,\n        usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.SAMPLED | GPUTextureUsage.COPY_SRC\n      });\n      var dView = model.depthTexture.createView();\n      dView.setName('opaquePassDepthTexture');\n      model.renderEncoder.setDepthTextureView(dView);\n    } else {\n      model.colorTexture.resize(viewNode.getCanvas().width, viewNode.getCanvas().height);\n      model.depthTexture.resize(viewNode.getCanvas().width, viewNode.getCanvas().height);\n    }\n\n    model.renderEncoder.attachTextureViews();\n    publicAPI.setCurrentOperation('opaquePass');\n    renNode.setRenderEncoder(model.renderEncoder);\n    renNode.traverse(publicAPI);\n  };\n\n  publicAPI.getColorTextureView = function () {\n    return model.renderEncoder.getColorTextureViews()[0];\n  };\n\n  publicAPI.getDepthTextureView = function () {\n    return model.renderEncoder.getDepthTextureView();\n  };\n\n  publicAPI.createRenderEncoder = function () {\n    model.renderEncoder = _RenderEncoder_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(); // default settings are fine for this\n\n    model.renderEncoder.setPipelineHash('op');\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  renderEncoder: null,\n  colorTexture: null,\n  depthTexture: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_3__.default.extend(publicAPI, model, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['colorTexture', 'depthTexture']); // Object methods\n\n  vtkWebGPUOpaquePass(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkWebGPUOpaquePass'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUOpaquePass$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUOpaquePass$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/OpaquePass.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/OrderIndependentTranslucentPass.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/OrderIndependentTranslucentPass.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Texture_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Texture.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Texture.js\");\n/* harmony import */ var _RenderEncoder_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RenderEncoder.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/RenderEncoder.js\");\n/* harmony import */ var _ShaderCache_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ShaderCache.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js\");\n/* harmony import */ var _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../SceneGraph/RenderPass.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderPass.js\");\n/* harmony import */ var _FullScreenQuad_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FullScreenQuad.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/FullScreenQuad.js\");\n\n\n\n\n\n\n\nvar oitpFragTemplate = \"\\n//VTK::Mapper::Dec\\n\\n//VTK::TCoord::Dec\\n\\n//VTK::RenderEncoder::Dec\\n\\n//VTK::IOStructs::Dec\\n\\n[[stage(fragment)]]\\nfn main(\\n//VTK::IOStructs::Input\\n)\\n//VTK::IOStructs::Output\\n{\\n  var output: fragmentOutput;\\n\\n  var tcoord: vec2<i32> = vec2<i32>(i32(input.fragPos.x), i32(input.fragPos.y));\\n  var reveal: f32 = textureLoad(oitpAccumTexture, tcoord, 0).r;\\n  if (reveal == 1.0) { discard; }\\n  var tcolor: vec4<f32> = textureLoad(oitpColorTexture, tcoord, 0);\\n  var total: f32 = max(tcolor.a, 0.01);\\n  var computedColor: vec4<f32> = vec4<f32>(tcolor.r/total, tcolor.g/total, tcolor.b/total, 1.0 - reveal);\\n\\n  //VTK::RenderEncoder::Impl\\n  return output;\\n}\\n\";\n\nfunction vtkWebGPUOrderIndependentTranslucentPass(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUOrderIndependentTranslucentPass'); // this pass implements a forward rendering pipeline\n  // if both volumes and opaque geometry are present\n  // it will mix the two together by capturing a zbuffer\n  // first\n\n  publicAPI.traverse = function (renNode, viewNode) {\n    if (model.deleted) {\n      return;\n    } // we just render our delegates in order\n\n\n    model.currentParent = viewNode;\n    var device = viewNode.getDevice();\n\n    if (!model.translucentRenderEncoder) {\n      publicAPI.createRenderEncoder();\n      publicAPI.createFinalEncoder();\n      model.translucentColorTexture = _Texture_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n      model.translucentColorTexture.create(device, {\n        width: viewNode.getCanvas().width,\n        height: viewNode.getCanvas().height,\n        format: 'rgba16float',\n\n        /* eslint-disable no-undef */\n\n        /* eslint-disable no-bitwise */\n        usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.SAMPLED\n      });\n      var v1 = model.translucentColorTexture.createView();\n      v1.setName('oitpColorTexture');\n      model.translucentRenderEncoder.setColorTextureView(0, v1);\n      model.translucentAccumulateTexture = _Texture_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n      model.translucentAccumulateTexture.create(device, {\n        width: viewNode.getCanvas().width,\n        height: viewNode.getCanvas().height,\n        format: 'r16float',\n\n        /* eslint-disable no-undef */\n\n        /* eslint-disable no-bitwise */\n        usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.SAMPLED\n      });\n      var v2 = model.translucentAccumulateTexture.createView();\n      v2.setName('oitpAccumTexture');\n      model.translucentRenderEncoder.setColorTextureView(1, v2);\n      model.fullScreenQuad = _FullScreenQuad_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance();\n      model.fullScreenQuad.setDevice(viewNode.getDevice());\n      model.fullScreenQuad.setPipelineHash('oitpfsq');\n      model.fullScreenQuad.setTextureViews(model.translucentRenderEncoder.getColorTextureViews());\n      model.fullScreenQuad.setFragmentShaderTemplate(oitpFragTemplate);\n    } else {\n      model.translucentColorTexture.resizeToMatch(model.colorTextureView.getTexture());\n      model.translucentAccumulateTexture.resizeToMatch(model.colorTextureView.getTexture());\n    }\n\n    model.translucentRenderEncoder.setDepthTextureView(model.depthTextureView);\n    model.translucentRenderEncoder.attachTextureViews();\n    publicAPI.setCurrentOperation('translucentPass');\n    renNode.setRenderEncoder(model.translucentRenderEncoder);\n    renNode.traverse(publicAPI);\n    publicAPI.finalPass(viewNode, renNode);\n  };\n\n  publicAPI.finalPass = function (viewNode, renNode) {\n    model.translucentFinalEncoder.setColorTextureView(0, model.colorTextureView);\n    model.translucentFinalEncoder.attachTextureViews();\n    renNode.setRenderEncoder(model.translucentFinalEncoder);\n    model.translucentFinalEncoder.begin(viewNode.getCommandEncoder()); // set viewport\n\n    renNode.scissorAndViewport(model.translucentFinalEncoder);\n    model.fullScreenQuad.render(model.translucentFinalEncoder, viewNode.getDevice());\n    model.translucentFinalEncoder.end();\n  };\n\n  publicAPI.getTextures = function () {\n    return [model.translucentColorTexture, model.translucentAccumulateTexture];\n  };\n\n  publicAPI.createRenderEncoder = function () {\n    model.translucentRenderEncoder = _RenderEncoder_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n    var rDesc = model.translucentRenderEncoder.getDescription();\n    rDesc.colorAttachments = [{\n      view: undefined,\n      loadValue: [0.0, 0.0, 0.0, 0.0],\n      storeOp: 'store'\n    }, {\n      view: undefined,\n      loadValue: [1.0, 0.0, 0.0, 0.0],\n      storeOp: 'store'\n    }];\n    rDesc.depthStencilAttachment = {\n      view: undefined,\n      depthLoadValue: 'load',\n      depthStoreOp: 'store',\n      stencilLoadValue: 'load',\n      stencilStoreOp: 'store'\n    };\n    model.translucentRenderEncoder.setReplaceShaderCodeFunction(function (pipeline) {\n      var fDesc = pipeline.getShaderDescription('fragment');\n      fDesc.addOutput('vec4<f32>', 'outColor');\n      fDesc.addOutput('f32', 'outAccum');\n      fDesc.addBuiltinInput('vec4<f32>', '[[builtin(position)]] fragPos');\n      var code = fDesc.getCode();\n      code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_3__.default.substitute(code, '//VTK::RenderEncoder::Impl', [// very simple depth weighting in w\n      'var w: f32 = 1.0 - input.fragPos.z * 0.9;', 'output.outColor = vec4<f32>(computedColor.rgb*computedColor.a, computedColor.a) * w;', 'output.outAccum = computedColor.a;']).result;\n      fDesc.setCode(code);\n    });\n    model.translucentRenderEncoder.setPipelineHash('oitpr');\n    model.translucentRenderEncoder.setPipelineSettings({\n      primitive: {\n        cullMode: 'none'\n      },\n      depthStencil: {\n        depthWriteEnabled: false,\n        depthCompare: 'less',\n        format: 'depth32float'\n      },\n      fragment: {\n        targets: [{\n          format: 'rgba16float',\n          blend: {\n            color: {\n              srcFactor: 'one',\n              dstFactor: 'one'\n            },\n            alpha: {\n              srcfactor: 'one',\n              dstFactor: 'one'\n            }\n          }\n        }, {\n          format: 'r16float',\n          blend: {\n            color: {\n              srcFactor: 'zero',\n              dstFactor: 'one-minus-src'\n            },\n            alpha: {\n              srcfactor: 'one',\n              dstFactor: 'one-minus-src-alpha'\n            }\n          }\n        }]\n      }\n    });\n  };\n\n  publicAPI.createFinalEncoder = function () {\n    model.translucentFinalEncoder = _RenderEncoder_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n    model.translucentFinalEncoder.setDescription({\n      colorAttachments: [{\n        view: null,\n        loadValue: 'load',\n        storeOp: 'store'\n      }]\n    });\n    model.translucentFinalEncoder.setReplaceShaderCodeFunction(function (pipeline) {\n      var fDesc = pipeline.getShaderDescription('fragment');\n      fDesc.addOutput('vec4<f32>', 'outColor');\n      fDesc.addBuiltinInput('vec4<f32>', '[[builtin(position)]] fragPos');\n      var code = fDesc.getCode();\n      code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_3__.default.substitute(code, '//VTK::RenderEncoder::Impl', ['output.outColor = vec4<f32>(computedColor.rgb*computedColor.a, computedColor.a);']).result;\n      fDesc.setCode(code);\n    });\n    model.translucentFinalEncoder.setPipelineHash('oitpf');\n    model.translucentFinalEncoder.setPipelineSettings({\n      primitive: {\n        cullMode: 'none'\n      },\n      fragment: {\n        targets: [{\n          format: 'bgra8unorm',\n          blend: {\n            color: {\n              srcFactor: 'src-alpha',\n              dstFactor: 'one-minus-src-alpha'\n            },\n            alpha: {\n              srcfactor: 'one',\n              dstFactor: 'one-minus-src-alpha'\n            }\n          }\n        }]\n      }\n    });\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  colorTextureView: null,\n  depthTextureView: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_4__.default.extend(publicAPI, model, initialValues);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['colorTextureView', 'depthTextureView']); // Object methods\n\n  vtkWebGPUOrderIndependentTranslucentPass(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkWebGPUOrderIndependentTranslucentPass'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUOrderIndepenentTranslucentPass = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUOrderIndepenentTranslucentPass);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/OrderIndependentTranslucentPass.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/Pipeline.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/Pipeline.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\n// vtkWebGPUPipeline methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUPipeline(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUPipeline');\n\n  publicAPI.getShaderDescriptions = function () {\n    return model.shaderDescriptions;\n  };\n\n  publicAPI.initialize = function (device) {\n    // start with the renderencoder settings\n    model.pipelineDescription = model.renderEncoder.getPipelineSettings();\n    model.pipelineDescription.primitive.topology = model.topology;\n    model.pipelineDescription.vertex = model.vertexState; // add in bind group layouts\n\n    var bindGroupLayouts = [];\n\n    for (var i = 0; i < model.layouts.length; i++) {\n      bindGroupLayouts.push(model.layouts[i].layout);\n    }\n\n    model.pipelineLayout = device.getHandle().createPipelineLayout({\n      bindGroupLayouts: bindGroupLayouts\n    });\n    model.pipelineDescription.layout = model.pipelineLayout;\n\n    for (var _i = 0; _i < model.shaderDescriptions.length; _i++) {\n      var sd = model.shaderDescriptions[_i];\n      var sm = device.getShaderModule(sd);\n\n      if (sd.getType() === 'vertex') {\n        model.pipelineDescription.vertex.module = sm.getHandle();\n        model.pipelineDescription.vertex.entryPoint = 'main';\n      }\n\n      if (sd.getType() === 'fragment') {\n        model.pipelineDescription.fragment.module = sm.getHandle();\n        model.pipelineDescription.fragment.entryPoint = 'main';\n      }\n    }\n\n    model.handle = device.getHandle().createRenderPipeline(model.pipelineDescription);\n  };\n\n  publicAPI.getShaderDescription = function (stype) {\n    for (var i = 0; i < model.shaderDescriptions.length; i++) {\n      if (model.shaderDescriptions[i].getType() === stype) return model.shaderDescriptions[i];\n    }\n\n    return null;\n  };\n\n  publicAPI.addBindGroupLayout = function (bindGroup) {\n    if (!bindGroup) {\n      return;\n    }\n\n    model.layouts.push({\n      layout: bindGroup.getBindGroupLayout(model.device),\n      name: bindGroup.getName()\n    });\n  };\n\n  publicAPI.getBindGroupLayout = function (idx) {\n    return model.layouts[idx].layout;\n  };\n\n  publicAPI.getBindGroupLayoutCount = function (lname) {\n    for (var i = 0; i < model.layouts.length; i++) {\n      if (model.layouts[i].name === lname) {\n        return i;\n      }\n    }\n\n    return 0;\n  };\n\n  publicAPI.bindVertexInput = function (renderEncoder, vInput) {\n    vInput.bindBuffers(renderEncoder);\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  handle: null,\n  layouts: null,\n  renderEncoder: null,\n  shaderDescriptions: null,\n  vertexState: null,\n  topology: null,\n  pipelineDescription: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.obj)(publicAPI, model);\n  model.layouts = [];\n  model.shaderDescriptions = [];\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.get)(publicAPI, model, ['handle', 'pipelineDescription']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['device', 'renderEncoder', 'topology', 'vertexState']); // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkWebGPUPipeline(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend, 'vtkWebGPUPipeline'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUPipeline$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUPipeline$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/Pipeline.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/PixelSpaceCallbackMapper.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/PixelSpaceCallbackMapper.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ViewNodeFactory.js\");\n\n\n\n\n// vtkWebGPUPixelSpaceCallbackMapper methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUPixelSpaceCallbackMapper(publicAPI, model) {\n  model.classHierarchy.push('vtkWebGPUPixelSpaceCallbackMapper');\n\n  publicAPI.opaquePass = function (prepass, renderPass) {\n    model.WebGPURenderer = publicAPI.getFirstAncestorOfType('vtkWebGPURenderer');\n    model.WebGPURenderWindow = model.WebGPURenderer.getParent();\n    var aspectRatio = model.WebGPURenderer.getAspectRatio();\n    var camera = model.WebGPURenderer ? model.WebGPURenderer.getRenderable().getActiveCamera() : null;\n    var tsize = model.WebGPURenderer.getTiledSizeAndOrigin();\n    var texels = null;\n\n    if (model.renderable.getUseZValues()) ;\n\n    model.renderable.invokeCallback(model.renderable.getInputData(), camera, aspectRatio, tsize, texels);\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues); // Object methods\n\n  vtkWebGPUPixelSpaceCallbackMapper(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkWebGPUPixelSpaceCallbackMapper'); // ----------------------------------------------------------------------------\n\nvar index = {\n  newInstance: newInstance,\n  extend: extend\n}; // Register ourself to WebGPU backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_2__.registerOverride)('vtkPixelSpaceCallbackMapper', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/PixelSpaceCallbackMapper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/PolyDataMapper.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/PolyDataMapper.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Core_Mapper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Core/Mapper.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Mapper.js\");\n/* harmony import */ var _Core_Property_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Core/Property.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Property.js\");\n/* harmony import */ var _Core_Texture_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Core/Texture.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Texture.js\");\n/* harmony import */ var _BufferManager_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BufferManager.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager.js\");\n/* harmony import */ var _ShaderCache_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ShaderCache.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js\");\n/* harmony import */ var _UniformBuffer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./UniformBuffer.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/UniformBuffer.js\");\n/* harmony import */ var _MapperHelper_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./MapperHelper.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/MapperHelper.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ViewNodeFactory.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat3.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar BufferUsage = _BufferManager_js__WEBPACK_IMPORTED_MODULE_4__.default.BufferUsage,\n    PrimitiveTypes = _BufferManager_js__WEBPACK_IMPORTED_MODULE_4__.default.PrimitiveTypes;\nvar Representation = _Core_Property_js__WEBPACK_IMPORTED_MODULE_2__.default.Representation;\nvar ScalarMode = _Core_Mapper_js__WEBPACK_IMPORTED_MODULE_1__.default.ScalarMode;\nvar StartEvent = {\n  type: 'StartEvent'\n};\nvar EndEvent = {\n  type: 'EndEvent'\n};\nvar vtkWebGPUPolyDataVS = \"\\n//VTK::Renderer::Dec\\n\\n//VTK::Color::Dec\\n\\n//VTK::Normal::Dec\\n\\n//VTK::TCoord::Dec\\n\\n//VTK::Select::Dec\\n\\n//VTK::Mapper::Dec\\n\\n//VTK::IOStructs::Dec\\n\\n[[stage(vertex)]]\\nfn main(\\n//VTK::IOStructs::Input\\n)\\n//VTK::IOStructs::Output\\n{\\n  var output : vertexOutput;\\n\\n  var vertex: vec4<f32> = vertexBC;\\n\\n  //VTK::Color::Impl\\n\\n  //VTK::Normal::Impl\\n\\n  //VTK::TCoord::Impl\\n\\n  //VTK::Select::Impl\\n\\n  //VTK::Position::Impl\\n\\n  return output;\\n}\\n\";\nvar vtkWebGPUPolyDataFS = \"\\n//VTK::Renderer::Dec\\n\\n//VTK::Color::Dec\\n\\n// optional surface normal declaration\\n//VTK::Normal::Dec\\n\\n//VTK::TCoord::Dec\\n\\n//VTK::Select::Dec\\n\\n//VTK::RenderEncoder::Dec\\n\\n//VTK::Mapper::Dec\\n\\n//VTK::IOStructs::Dec\\n\\n[[stage(fragment)]]\\nfn main(\\n//VTK::IOStructs::Input\\n)\\n//VTK::IOStructs::Output\\n{\\n  var output : fragmentOutput;\\n\\n  var ambientColor: vec4<f32> = mapperUBO.AmbientColor;\\n  var diffuseColor: vec4<f32> = mapperUBO.DiffuseColor;\\n  var opacity: f32 = mapperUBO.Opacity;\\n\\n  //VTK::Color::Impl\\n\\n  //VTK::Normal::Impl\\n\\n  //VTK::Light::Impl\\n\\n  var computedColor: vec4<f32> = vec4<f32>(ambientColor.rgb * mapperUBO.AmbientIntensity\\n     + diffuse * mapperUBO.DiffuseIntensity\\n     + specular * mapperUBO.SpecularIntensity,\\n     opacity);\\n\\n  //VTK::TCoord::Impl\\n\\n  //VTK::Select::Impl\\n\\n  if (computedColor.a == 0.0) { discard; };\\n\\n  //VTK::RenderEncoder::Impl\\n  return output;\\n}\\n\"; // ----------------------------------------------------------------------------\n// vtkWebGPUPolyDataMapper methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUPolyDataMapper(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUPolyDataMapper');\n\n  publicAPI.buildPass = function (prepass) {\n    if (prepass) {\n      model.WebGPUActor = publicAPI.getFirstAncestorOfType('vtkWebGPUActor');\n      model.WebGPURenderer = model.WebGPUActor.getFirstAncestorOfType('vtkWebGPURenderer');\n      model.WebGPURenderWindow = model.WebGPURenderer.getParent();\n      model.device = model.WebGPURenderWindow.getDevice();\n    }\n  }; // Renders myself\n\n\n  publicAPI.translucentPass = function (prepass) {\n    if (prepass) {\n      publicAPI.render();\n    }\n  };\n\n  publicAPI.opaquePass = function (prepass) {\n    if (prepass) {\n      publicAPI.render();\n    }\n  };\n\n  publicAPI.updateUBO = function () {\n    // make sure the data is up to date\n    var actor = model.WebGPUActor.getRenderable();\n    var ppty = actor.getProperty();\n    var utime = model.UBO.getSendTime();\n\n    if (publicAPI.getMTime() > utime || ppty.getMTime() > utime || model.renderable.getMTime() > utime) {\n      var keyMats = model.WebGPUActor.getKeyMatrices(model.WebGPURenderer);\n      model.UBO.setArray('BCWCMatrix', keyMats.bcwc);\n      model.UBO.setArray('BCSCMatrix', keyMats.bcsc);\n      model.UBO.setArray('MCWCNormals', keyMats.normalMatrix);\n      var aColor = ppty.getAmbientColorByReference();\n      model.UBO.setValue('AmbientIntensity', ppty.getAmbient());\n      model.UBO.setArray('AmbientColor', [aColor[0], aColor[1], aColor[2], 1.0]);\n      model.UBO.setValue('DiffuseIntensity', ppty.getDiffuse());\n      aColor = ppty.getDiffuseColorByReference();\n      model.UBO.setArray('DiffuseColor', [aColor[0], aColor[1], aColor[2], 1.0]);\n      model.UBO.setValue('SpecularIntensity', ppty.getSpecular());\n      model.UBO.setValue('SpecularPower', ppty.getSpecularPower());\n      aColor = ppty.getSpecularColorByReference();\n      model.UBO.setArray('SpecularColor', [aColor[0], aColor[1], aColor[2], 1.0]);\n      model.UBO.setValue('Opacity', ppty.getOpacity());\n      model.UBO.setValue('PropID', model.WebGPUActor.getPropID());\n      var device = model.WebGPURenderWindow.getDevice();\n      model.UBO.sendIfNeeded(device);\n    }\n  };\n\n  publicAPI.render = function () {\n    publicAPI.invokeEvent(StartEvent);\n\n    if (!model.renderable.getStatic()) {\n      model.renderable.update();\n    }\n\n    model.currentInput = model.renderable.getInputData();\n    publicAPI.invokeEvent(EndEvent);\n    model.renderEncoder = model.WebGPURenderer.getRenderEncoder();\n    publicAPI.buildPrimitives(); // update descriptor sets\n\n    publicAPI.updateUBO();\n  };\n\n  publicAPI.replaceShaderPosition = function (hash, pipeline, vertexInput) {\n    var vDesc = pipeline.getShaderDescription('vertex');\n    vDesc.addBuiltinOutput('vec4<f32>', '[[builtin(position)]] Position');\n    var code = vDesc.getCode();\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_5__.default.substitute(code, '//VTK::Position::Impl', ['    output.Position = rendererUBO.SCPCMatrix*mapperUBO.BCSCMatrix*vertexBC;']).result;\n    vDesc.setCode(code);\n  };\n\n  publicAPI.replaceShaderNormal = function (hash, pipeline, vertexInput) {\n    if (vertexInput.hasAttribute('normalMC')) {\n      var vDesc = pipeline.getShaderDescription('vertex');\n      vDesc.addOutput('vec3<f32>', 'normalVC');\n      var code = vDesc.getCode();\n      code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_5__.default.substitute(code, '//VTK::Normal::Impl', ['  output.normalVC = normalize((rendererUBO.WCVCNormals * mapperUBO.MCWCNormals * normalMC).xyz);']).result;\n      vDesc.setCode(code);\n      var fDesc = pipeline.getShaderDescription('fragment');\n      code = fDesc.getCode();\n      code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_5__.default.substitute(code, '//VTK::Normal::Impl', ['  var normal: vec3<f32> = input.normalVC;', '  if (!input.frontFacing) { normal = -normal; }']).result;\n      fDesc.setCode(code);\n    }\n  }; // we only apply lighting when there is a \"var normal\" declaration in the\n  // fragment shader code. That is the lighting trigger.\n\n\n  publicAPI.replaceShaderLight = function (hash, pipeline, vertexInput) {\n    var fDesc = pipeline.getShaderDescription('fragment');\n    var code = fDesc.getCode();\n\n    if (code.includes('var normal')) {\n      code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_5__.default.substitute(code, '//VTK::Light::Impl', ['  var df: f32  = max(0.0, normal.z);', '  var sf: f32 = pow(df, mapperUBO.SpecularPower);', '  var diffuse: vec3<f32> = df * diffuseColor.rgb;', '  var specular: vec3<f32> = sf * mapperUBO.SpecularColor.rgb * mapperUBO.SpecularColor.a;']).result;\n      fDesc.setCode(code);\n    } else {\n      code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_5__.default.substitute(code, '//VTK::Light::Impl', ['  var diffuse: vec3<f32> = diffuseColor.rgb;', '  var specular: vec3<f32> = mapperUBO.SpecularColor.rgb * mapperUBO.SpecularColor.a;']).result;\n      fDesc.setCode(code);\n    }\n  };\n\n  publicAPI.replaceShaderColor = function (hash, pipeline, vertexInput) {\n    if (!vertexInput.hasAttribute('colorVI')) return;\n    var vDesc = pipeline.getShaderDescription('vertex');\n    vDesc.addOutput('vec4<f32>', 'color');\n    var code = vDesc.getCode();\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_5__.default.substitute(code, '//VTK::Color::Impl', ['  output.color = colorVI;']).result;\n    vDesc.setCode(code);\n    var fDesc = pipeline.getShaderDescription('fragment');\n    code = fDesc.getCode();\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_5__.default.substitute(code, '//VTK::Color::Impl', ['ambientColor = input.color;', 'diffuseColor = input.color;', 'opacity = mapperUBO.Opacity * input.color.a;']).result;\n    fDesc.setCode(code);\n  };\n\n  publicAPI.replaceShaderTCoord = function (hash, pipeline, vertexInput) {\n    if (!vertexInput.hasAttribute('tcoord')) return;\n    var vDesc = pipeline.getShaderDescription('vertex');\n    vDesc.addOutput('vec2<f32>', 'tcoordVS');\n    var code = vDesc.getCode();\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_5__.default.substitute(code, '//VTK::TCoord::Impl', ['  output.tcoordVS = tcoord;']).result;\n    vDesc.setCode(code);\n    var fDesc = pipeline.getShaderDescription('fragment');\n    code = fDesc.getCode(); // todo handle multiple textures? Blend multiply ?\n\n    if (model.textures.length) {\n      code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_5__.default.substitute(code, '//VTK::TCoord::Impl', ['var tcolor: vec4<f32> = textureSample(Texture0, Texture0Sampler, input.tcoordVS);', 'computedColor = computedColor*tcolor;']).result;\n    }\n\n    fDesc.setCode(code);\n  };\n\n  publicAPI.replaceShaderSelect = function (hash, pipeline, vertexInput) {\n    if (hash.includes('sel')) {\n      var fDesc = pipeline.getShaderDescription('fragment');\n      var code = fDesc.getCode(); // by default there are no composites, so just 0\n\n      code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_5__.default.substitute(code, '//VTK::Select::Impl', ['  var compositeID: u32 = 0u;']).result;\n      fDesc.setCode(code);\n    }\n  };\n\n  publicAPI.getUsage = function (rep, i) {\n    if (rep === Representation.POINTS || i === 0) {\n      return BufferUsage.Verts;\n    }\n\n    if (i === 1) {\n      return BufferUsage.Lines;\n    }\n\n    if (rep === Representation.WIREFRAME) {\n      if (i === 2) {\n        return BufferUsage.LinesFromTriangles;\n      }\n\n      return BufferUsage.LinesFromStrips;\n    }\n\n    if (i === 2) {\n      return BufferUsage.Triangles;\n    }\n\n    return BufferUsage.Strips;\n  };\n\n  publicAPI.getHashFromUsage = function (usage) {\n    return \"pt\".concat(usage);\n  };\n\n  publicAPI.getTopologyFromUsage = function (usage) {\n    switch (usage) {\n      case BufferUsage.Triangles:\n        return 'triangle-list';\n\n      case BufferUsage.Verts:\n        return 'point-list';\n\n      default:\n      case BufferUsage.Lines:\n        return 'line-list';\n    }\n  };\n\n  publicAPI.buildVertexInput = function (pd, cells, primType) {\n    var actor = model.WebGPUActor.getRenderable();\n    var representation = actor.getProperty().getRepresentation();\n    var device = model.WebGPURenderWindow.getDevice();\n    var vertexInput = model.primitives[primType].getVertexInput(); // hash = all things that can change the values on the buffer\n    // since mtimes are unique we can use\n    // - cells mtime - because cells drive how we pack\n    // - rep (point/wireframe/surface) - again because of packing\n    // - relevant dataArray mtime - the source data\n    // - shift - not currently captured\n    // - scale - not currently captured\n    // - format\n    // - usage\n    // - packExtra - covered by format\n    // - prim type (vert/lines/polys/strips) - covered by cells mtime\n\n    var hash = cells.getMTime() + representation; // points\n\n    var points = pd.getPoints();\n\n    if (points) {\n      var shift = model.WebGPUActor.getBufferShift(model.WebGPURenderer);\n      var buffRequest = {\n        hash: hash + points.getMTime(),\n        dataArray: points,\n        source: points,\n        cells: cells,\n        primitiveType: primType,\n        representation: representation,\n        time: Math.max(points.getMTime(), cells.getMTime(), model.WebGPUActor.getKeyMatricesTime().getMTime()),\n        shift: shift,\n        usage: BufferUsage.PointArray,\n        format: 'float32x4',\n        packExtra: true\n      };\n      var buff = device.getBufferManager().getBuffer(buffRequest);\n      vertexInput.addBuffer(buff, ['vertexBC']);\n    } else {\n      vertexInput.removeBufferIfPresent('vertexBC');\n    } // normals, only used for surface rendering\n\n\n    var usage = publicAPI.getUsage(representation, primType);\n\n    if (usage === BufferUsage.Triangles || usage === BufferUsage.Strips) {\n      var normals = pd.getPointData().getNormals();\n      var _buffRequest = {\n        cells: cells,\n        representation: representation,\n        primitiveType: primType,\n        format: 'snorm8x4',\n        packExtra: true,\n        shift: 0,\n        scale: 127\n      };\n\n      if (normals) {\n        _buffRequest.hash = hash + normals.getMTime();\n        _buffRequest.dataArray = normals;\n        _buffRequest.source = normals;\n        _buffRequest.time = Math.max(normals.getMTime(), cells.getMTime());\n        _buffRequest.usage = BufferUsage.PointArray;\n\n        var _buff = device.getBufferManager().getBuffer(_buffRequest);\n\n        vertexInput.addBuffer(_buff, ['normalMC']);\n      } else if (primType === PrimitiveTypes.Triangles) {\n        _buffRequest.hash = hash + points.getMTime();\n        _buffRequest.dataArray = points;\n        _buffRequest.source = points;\n        _buffRequest.time = Math.max(points.getMTime(), cells.getMTime());\n        _buffRequest.usage = BufferUsage.NormalsFromPoints;\n\n        var _buff2 = device.getBufferManager().getBuffer(_buffRequest);\n\n        vertexInput.addBuffer(_buff2, ['normalMC']);\n      } else {\n        vertexInput.removeBufferIfPresent('normalMC');\n      }\n    } else {\n      vertexInput.removeBufferIfPresent('normalMC');\n    } // deal with colors but only if modified\n\n\n    var haveColors = false;\n\n    if (model.renderable.getScalarVisibility()) {\n      var c = model.renderable.getColorMapColors();\n\n      if (c) {\n        var scalarMode = model.renderable.getScalarMode();\n        var haveCellScalars = false; // We must figure out how the scalars should be mapped to the polydata.\n\n        if ((scalarMode === ScalarMode.USE_CELL_DATA || scalarMode === ScalarMode.USE_CELL_FIELD_DATA || scalarMode === ScalarMode.USE_FIELD_DATA || !pd.getPointData().getScalars()) && scalarMode !== ScalarMode.USE_POINT_FIELD_DATA && c) {\n          haveCellScalars = true;\n        }\n\n        var _buffRequest2 = {\n          hash: hash + points.getMTime(),\n          dataArray: c,\n          source: c,\n          cells: cells,\n          primitiveType: primType,\n          representation: representation,\n          time: Math.max(c.getMTime(), cells.getMTime()),\n          usage: BufferUsage.PointArray,\n          format: 'unorm8x4',\n          cellData: haveCellScalars,\n          cellOffset: 0\n        };\n\n        var _buff3 = device.getBufferManager().getBuffer(_buffRequest2);\n\n        vertexInput.addBuffer(_buff3, ['colorVI']);\n        haveColors = true;\n      }\n    }\n\n    if (!haveColors) {\n      vertexInput.removeBufferIfPresent('colorVI');\n    }\n\n    var tcoords = null;\n\n    if (model.renderable.getInterpolateScalarsBeforeMapping() && model.renderable.getColorCoordinates()) {\n      tcoords = model.renderable.getColorCoordinates();\n    } else {\n      tcoords = pd.getPointData().getTCoords();\n    }\n\n    if (tcoords) {\n      var _buffRequest3 = {\n        hash: hash + tcoords.getMTime(),\n        dataArray: tcoords,\n        source: tcoords,\n        cells: cells,\n        primitiveType: primType,\n        representation: representation,\n        time: Math.max(tcoords.getMTime(), cells.getMTime()),\n        usage: BufferUsage.PointArray,\n        format: 'float32x2'\n      };\n\n      var _buff4 = device.getBufferManager().getBuffer(_buffRequest3);\n\n      vertexInput.addBuffer(_buff4, ['tcoord']);\n    } else {\n      vertexInput.removeBufferIfPresent('tcoord');\n    }\n  };\n\n  publicAPI.updateTextures = function () {\n    // we keep track of new and used textures so\n    // that we can clean up any unused textures so we don't hold onto them\n    var usedTextures = [];\n    var newTextures = []; // do we have a scalar color texture\n\n    var idata = model.renderable.getColorTextureMap(); // returns an imagedata\n\n    if (idata) {\n      if (!model.colorTexture) {\n        model.colorTexture = _Core_Texture_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n      }\n\n      model.colorTexture.setInputData(idata);\n      newTextures.push(model.colorTexture);\n    } // actor textures?\n\n\n    var actor = model.WebGPUActor.getRenderable();\n    var textures = actor.getTextures();\n\n    for (var i = 0; i < textures.length; i++) {\n      if (textures[i].getInputData()) {\n        newTextures.push(textures[i]);\n      }\n\n      if (textures[i].getImage() && textures[i].getImageLoaded()) {\n        newTextures.push(textures[i]);\n      }\n    }\n\n    var usedCount = 0;\n\n    for (var _i = 0; _i < newTextures.length; _i++) {\n      var srcTexture = newTextures[_i];\n      var treq = {};\n\n      if (srcTexture.getInputData()) {\n        treq.imageData = srcTexture.getInputData();\n        treq.source = treq.imageData;\n      } else if (srcTexture.getImage()) {\n        treq.image = srcTexture.getImage();\n        treq.source = treq.image;\n      }\n\n      var newTex = model.device.getTextureManager().getTexture(treq);\n\n      if (newTex.getReady()) {\n        // is this a new texture\n        var found = false;\n\n        for (var t = 0; t < model.textures.length; t++) {\n          if (model.textures[t] === newTex) {\n            usedCount++;\n            found = true;\n            usedTextures[t] = true;\n          }\n        }\n\n        if (!found) {\n          usedTextures[model.textures.length] = true;\n          var tview = newTex.createView();\n          tview.setName(\"Texture\".concat(usedCount++));\n          model.textures.push(newTex);\n          model.textureViews.push(tview);\n          var interpolate = srcTexture.getInterpolate() ? 'linear' : 'nearest';\n          tview.addSampler(model.device, {\n            minFilter: interpolate,\n            maxFilter: interpolate\n          });\n        }\n      }\n    } // remove unused textures\n\n\n    for (var _i2 = model.textures.length - 1; _i2 >= 0; _i2--) {\n      if (!usedTextures[_i2]) {\n        model.textures.splice(_i2, 1);\n        model.textureViews.splice(_i2, 1);\n      }\n    }\n  }; // compute a unique hash for a pipeline, this needs to be unique enough to\n  // capture any pipeline code changes (which includes shader changes)\n  // or vertex input changes/ bind groups/ etc\n\n\n  publicAPI.computePipelineHash = function (vertexInput, usage) {\n    var pipelineHash = 'pd';\n\n    if (vertexInput.hasAttribute(\"normalMC\")) {\n      pipelineHash += \"n\";\n    }\n\n    if (vertexInput.hasAttribute(\"colorVI\")) {\n      pipelineHash += \"c\";\n    }\n\n    if (vertexInput.hasAttribute(\"tcoord\")) {\n      pipelineHash += \"t\";\n    }\n\n    if (model.textures.length) {\n      pipelineHash += \"tx\".concat(model.textures.length);\n    }\n\n    if (model.SSBO) {\n      pipelineHash += \"ssbo\";\n    }\n\n    var uhash = publicAPI.getHashFromUsage(usage);\n    pipelineHash += uhash;\n    pipelineHash += model.renderEncoder.getPipelineHash();\n    return pipelineHash;\n  }; // was originally buildIBOs() but not using IBOs right now\n\n\n  publicAPI.buildPrimitives = function () {\n    var poly = model.currentInput;\n    var prims = [poly.getVerts(), poly.getLines(), poly.getPolys(), poly.getStrips()];\n    var device = model.WebGPURenderWindow.getDevice();\n    model.renderable.mapScalars(poly, 1.0); // handle textures\n\n    publicAPI.updateTextures(); // handle per primitive type\n\n    for (var i = PrimitiveTypes.Points; i <= PrimitiveTypes.Triangles; i++) {\n      if (prims[i].getNumberOfValues() > 0) {\n        var actor = model.WebGPUActor.getRenderable();\n        var rep = actor.getProperty().getRepresentation();\n        var usage = publicAPI.getUsage(rep, i);\n        var primHelper = model.primitives[i];\n        publicAPI.buildVertexInput(model.currentInput, prims[i], i);\n        primHelper.setPipelineHash(publicAPI.computePipelineHash(primHelper.getVertexInput(), usage));\n        primHelper.setTextureViews(model.textureViews);\n        primHelper.setWebGPURenderer(model.WebGPURenderer);\n        primHelper.setNumberOfInstances(1);\n        var vbo = primHelper.getVertexInput().getBuffer('vertexBC');\n        primHelper.setNumberOfVertices(vbo.getSizeInBytes() / vbo.getStrideInBytes());\n        primHelper.setTopology(publicAPI.getTopologyFromUsage(usage));\n        primHelper.build(model.renderEncoder, device);\n        primHelper.registerToDraw();\n      }\n    }\n  };\n\n  publicAPI.setShaderReplacement = function (name, func) {\n    for (var i = PrimitiveTypes.Start; i < PrimitiveTypes.End; i++) {\n      var sr = model.primitives[i].getShaderReplacements();\n      sr.set(name, func);\n    }\n  };\n\n  publicAPI.setFragmentShaderTemplate = function (val) {\n    model.fragmentShaderTemplate = val;\n\n    for (var i = PrimitiveTypes.Start; i < PrimitiveTypes.End; i++) {\n      model.primitives[i].setFragmentShaderTemplate(val);\n    }\n  };\n\n  publicAPI.setVertexShaderTemplate = function (val) {\n    model.fragmentShaderTemplate = val;\n\n    for (var i = PrimitiveTypes.Start; i < PrimitiveTypes.End; i++) {\n      model.primitives[i].setVertexShaderTemplate(val);\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  colorTexture: null,\n  renderEncoder: null,\n  textures: null,\n  textureViews: null,\n  primitives: null,\n  tmpMat4: null,\n  fragmentShaderTemplate: null,\n  vertexShaderTemplate: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_8__.default.extend(publicAPI, model, initialValues);\n  model.tmpMat3 = (0,_vendor_gl_matrix_esm_mat3_js__WEBPACK_IMPORTED_MODULE_10__.i)(new Float64Array(9));\n  model.tmpMat4 = (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_11__.a)(new Float64Array(16));\n  model.fragmentShaderTemplate = model.fragmentShaderTemplate || vtkWebGPUPolyDataFS;\n  model.vertexShaderTemplate = model.vertexShaderTemplate || vtkWebGPUPolyDataVS;\n  model.UBO = _UniformBuffer_js__WEBPACK_IMPORTED_MODULE_6__.default.newInstance();\n  model.UBO.setName('mapperUBO');\n  model.UBO.addEntry('BCWCMatrix', 'mat4x4<f32>');\n  model.UBO.addEntry('BCSCMatrix', 'mat4x4<f32>');\n  model.UBO.addEntry('MCWCNormals', 'mat4x4<f32>');\n  model.UBO.addEntry('AmbientColor', 'vec4<f32>');\n  model.UBO.addEntry('DiffuseColor', 'vec4<f32>');\n  model.UBO.addEntry('AmbientIntensity', 'f32');\n  model.UBO.addEntry('DiffuseIntensity', 'f32');\n  model.UBO.addEntry('SpecularColor', 'vec4<f32>');\n  model.UBO.addEntry('SpecularIntensity', 'f32');\n  model.UBO.addEntry('Opacity', 'f32');\n  model.UBO.addEntry('SpecularPower', 'f32');\n  model.UBO.addEntry('PropID', 'u32'); // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.get)(publicAPI, model, ['fragmentShaderTemplate', 'vertexShaderTemplate', 'UBO']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['renderEncoder']);\n  model.textures = [];\n  model.textureViews = [];\n  model.primitives = []; // Object methods\n\n  vtkWebGPUPolyDataMapper(publicAPI, model);\n\n  for (var i = PrimitiveTypes.Start; i < PrimitiveTypes.End; i++) {\n    model.primitives[i] = _MapperHelper_js__WEBPACK_IMPORTED_MODULE_7__.default.newInstance();\n    model.primitives[i].setUBO(model.UBO);\n    model.primitives[i].setVertexShaderTemplate(publicAPI.getVertexShaderTemplate());\n    model.primitives[i].setFragmentShaderTemplate(publicAPI.getFragmentShaderTemplate());\n  }\n\n  publicAPI.setShaderReplacement('replaceShaderPosition', publicAPI.replaceShaderPosition);\n  publicAPI.setShaderReplacement('replaceShaderLight', publicAPI.replaceShaderLight);\n  publicAPI.setShaderReplacement('replaceShaderTCoord', publicAPI.replaceShaderTCoord);\n  publicAPI.setShaderReplacement('replaceShaderNormal', publicAPI.replaceShaderNormal);\n  publicAPI.setShaderReplacement('replaceShaderSelect', publicAPI.replaceShaderSelect);\n  publicAPI.setShaderReplacement('replaceShaderColor', publicAPI.replaceShaderColor);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend, 'vtkWebGPUPolyDataMapper'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUPolyDataMapper$1 = {\n  newInstance: newInstance,\n  extend: extend\n}; // Register ourself to WebGPU backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_9__.registerOverride)('vtkMapper', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUPolyDataMapper$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/PolyDataMapper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/RenderEncoder.js":
/*!************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/RenderEncoder.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _ShaderCache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ShaderCache.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js\");\n\n\n\nvar forwarded = ['setBindGroup', 'setVertexBuffer', 'draw']; // ----------------------------------------------------------------------------\n// vtkWebGPURenderEncoder methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPURenderEncoder(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPURenderEncoder');\n\n  publicAPI.begin = function (encoder) {\n    model.handle = encoder.beginRenderPass(model.description);\n  };\n\n  publicAPI.end = function () {\n    model.handle.endPass();\n  };\n\n  publicAPI.setPipeline = function (pl) {\n    model.handle.setPipeline(pl.getHandle());\n    var pd = pl.getPipelineDescription(); // check attachment state\n\n    if (model.colorTextureViews.length !== pd.fragment.targets.length) {\n      console.log(\"mismatched attachment counts on pipeline \".concat(pd.fragment.targets.length, \" while encoder has \").concat(model.colorTextureViews.length));\n      console.trace();\n    } else {\n      for (var i = 0; i < model.colorTextureViews.length; i++) {\n        var fmt = model.colorTextureViews[i].getTexture().getFormat();\n\n        if (fmt !== pd.fragment.targets[i].format) {\n          console.log(\"mismatched attachments for attachment \".concat(i, \" on pipeline \").concat(pd.fragment.targets[i].format, \" while encoder has \").concat(fmt));\n          console.trace();\n        }\n      }\n    } // check depth buffer\n\n\n    if (!model.depthTextureView !== !('depthStencil' in pd)) {\n      console.log('mismatched depth attachments');\n      console.trace();\n    } else if (model.depthTextureView) {\n      var dfmt = model.depthTextureView.getTexture().getFormat();\n\n      if (dfmt !== pd.depthStencil.format) {\n        console.log(\"mismatched depth attachments on pipeline \".concat(pd.depthStencil.format, \" while encoder has \").concat(dfmt));\n        console.trace();\n      }\n    }\n\n    model.boundPipeline = pl;\n  };\n\n  publicAPI.replaceShaderCode = function (pipeline) {\n    model.replaceShaderCodeFunction(pipeline);\n  };\n\n  publicAPI.setColorTextureView = function (idx, view) {\n    if (model.colorTextureViews[idx] === view) {\n      return;\n    }\n\n    model.colorTextureViews[idx] = view;\n  };\n\n  publicAPI.activateBindGroup = function (bg) {\n    var device = model.boundPipeline.getDevice();\n    var midx = model.boundPipeline.getBindGroupLayoutCount(bg.getName());\n    model.handle.setBindGroup(midx, bg.getBindGroup(device)); // verify bind group layout matches\n\n    var bgl1 = device.getBindGroupLayoutDescription(bg.getBindGroupLayout(device));\n    var bgl2 = device.getBindGroupLayoutDescription(model.boundPipeline.getBindGroupLayout(midx));\n\n    if (bgl1 !== bgl2) {\n      console.log(\"renderEncoder \".concat(model.pipelineHash, \" mismatched bind group layouts bind group has\\n\").concat(bgl1, \"\\n versus pipeline\\n\").concat(bgl2, \"\\n\"));\n      console.trace();\n    }\n  };\n\n  publicAPI.attachTextureViews = function () {\n    // for each texture create a view if we do not already have one\n    for (var i = 0; i < model.colorTextureViews.length; i++) {\n      if (!model.description.colorAttachments[i]) {\n        model.description.colorAttachments[i] = {\n          view: model.colorTextureViews[i].getHandle()\n        };\n      } else {\n        model.description.colorAttachments[i].view = model.colorTextureViews[i].getHandle();\n      }\n    }\n\n    if (model.depthTextureView) {\n      model.description.depthStencilAttachment.view = model.depthTextureView.getHandle();\n    }\n  }; // simple forwarders\n\n\n  var _loop = function _loop(i) {\n    publicAPI[forwarded[i]] = function () {\n      var _model$handle;\n\n      return (_model$handle = model.handle)[forwarded[i]].apply(_model$handle, arguments);\n    };\n  };\n\n  for (var i = 0; i < forwarded.length; i++) {\n    _loop(i);\n  }\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  description: null,\n  handle: null,\n  boundPipeline: null,\n  pipelineHash: null,\n  pipelineSettings: null,\n  replaceShaderCodeFunction: null,\n  depthTextureView: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.obj)(publicAPI, model);\n  model.description = {\n    colorAttachments: [{\n      view: undefined,\n      loadValue: 'load',\n      storeOp: 'store'\n    }],\n    depthStencilAttachment: {\n      view: undefined,\n      depthLoadValue: 1.0,\n      depthStoreOp: 'store',\n      stencilLoadValue: 0,\n      stencilStoreOp: 'store'\n    }\n  }; // default shader code just writes out the computedColor\n\n  model.replaceShaderCodeFunction = function (pipeline) {\n    var fDesc = pipeline.getShaderDescription('fragment');\n    fDesc.addOutput('vec4<f32>', 'outColor');\n    var code = fDesc.getCode();\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_1__.default.substitute(code, '//VTK::RenderEncoder::Impl', ['output.outColor = computedColor;']).result;\n    fDesc.setCode(code);\n  }; // default pipeline settings\n\n\n  model.pipelineSettings = {\n    primitive: {\n      cullMode: 'none'\n    },\n    depthStencil: {\n      depthWriteEnabled: true,\n      depthCompare: 'less-equal',\n      format: 'depth32float'\n    },\n    fragment: {\n      targets: [{\n        format: 'bgra8unorm',\n        blend: {\n          color: {\n            srcFactor: 'src-alpha',\n            dstFactor: 'one-minus-src-alpha'\n          },\n          alpha: {\n            srcfactor: 'one',\n            dstFactor: 'one-minus-src-alpha'\n          }\n        }\n      }]\n    }\n  };\n  model.colorTextureViews = [];\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.get)(publicAPI, model, ['boundPipeline', 'colorTextureViews']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['depthTextureView', 'description', 'handle', 'pipelineHash', 'pipelineSettings', 'replaceShaderCodeFunction']); // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkWebGPURenderEncoder(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend, 'vtkWebGPURenderEncoder'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPURenderEncoder$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPURenderEncoder$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/RenderEncoder.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/RenderWindow.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/RenderWindow.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Core_RenderWindow_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Core/RenderWindow.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/RenderWindow.js\");\n/* harmony import */ var _ForwardPass_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ForwardPass.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ForwardPass.js\");\n/* harmony import */ var _Buffer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Buffer.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Buffer.js\");\n/* harmony import */ var _Device_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Device.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Device.js\");\n/* harmony import */ var _HardwareSelector_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./HardwareSelector.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/HardwareSelector.js\");\n/* harmony import */ var _SwapChain_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SwapChain.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/SwapChain.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ViewNodeFactory.js\");\n/* harmony import */ var _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../SceneGraph/RenderPass.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderPass.js\");\n/* harmony import */ var _SceneGraph_RenderWindowViewNode_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../SceneGraph/RenderWindowViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderWindowViewNode.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.vtkErrorMacro; // const IS_CHROME = navigator.userAgent.indexOf('Chrome') !== -1;\n\nvar SCREENSHOT_PLACEHOLDER = {\n  position: 'absolute',\n  top: 0,\n  left: 0,\n  width: '100%',\n  height: '100%'\n}; // ----------------------------------------------------------------------------\n// vtkWebGPURenderWindow methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPURenderWindow(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPURenderWindow');\n\n  publicAPI.getViewNodeFactory = function () {\n    return model.myFactory;\n  }; // Auto update style\n\n\n  var previousSize = [0, 0];\n\n  function updateWindow() {\n    // Canvas size\n    if (model.renderable) {\n      if (model.size[0] !== previousSize[0] || model.size[1] !== previousSize[1]) {\n        previousSize[0] = model.size[0];\n        previousSize[1] = model.size[1];\n        model.canvas.setAttribute('width', model.size[0]);\n        model.canvas.setAttribute('height', model.size[1]);\n        publicAPI.recreateSwapChain();\n      }\n    } // ImageStream size\n\n\n    if (model.viewStream) {\n      // If same size that's a NoOp\n      model.viewStream.setSize(model.size[0], model.size[1]);\n    } // Offscreen ?\n\n\n    model.canvas.style.display = model.useOffScreen ? 'none' : 'block'; // Cursor type\n\n    if (model.el) {\n      model.el.style.cursor = model.cursorVisibility ? model.cursor : 'none';\n    } // Invalidate cached DOM container size\n\n\n    model.containerSize = null;\n  }\n\n  publicAPI.onModified(updateWindow);\n\n  publicAPI.recreateSwapChain = function () {\n    model.swapChain.releaseGraphicsResources();\n\n    if (!model.swapChain.getCreated()) {\n      model.swapChain.create(model.device, publicAPI); // model.commandBufferIndexes.clear();\n      // model.commandBufferIndexes.resize(this->Swapchain->GetMaximumFramesInFlight(), -1);\n    }\n  }; // Builds myself.\n\n\n  publicAPI.buildPass = function (prepass) {\n    if (prepass) {\n      if (!model.renderable) {\n        return;\n      }\n\n      publicAPI.prepareNodes();\n      publicAPI.addMissingNodes(model.renderable.getRenderersByReference());\n      publicAPI.removeUnusedNodes();\n      publicAPI.initialize();\n    } else if (model.initialized) {\n      if (!model.swapChain.getCreated()) {\n        model.swapChain.create(model.device, publicAPI);\n      }\n\n      model.commandEncoder = model.device.createCommandEncoder();\n    }\n  }; // publicAPI.traverseRenderers = (renPass) => {\n  //   // iterate over renderers\n  //   const numlayers = publicAPI.getRenderable().getNumberOfLayers();\n  //   const renderers = publicAPI.getChildren();\n  //   for (let i = 0; i < numlayers; i++) {\n  //     for (let index = 0; index < renderers.length; index++) {\n  //       const renNode = renderers[index];\n  //       const ren = publicAPI.getRenderable().getRenderers()[index];\n  //       if (ren.getDraw() && ren.getLayer() === i) {\n  //         renNode.traverse(renPass);\n  //       }\n  //     }\n  //   }\n  // };\n\n\n  publicAPI.initialize = function () {\n    if (!model.initializing) {\n      model.initializing = true;\n\n      if (!navigator.gpu) {\n        vtkErrorMacro('WebGPU is not enabled.');\n        return;\n      }\n\n      publicAPI.create3DContextAsync().then(function () {\n        model.initialized = true;\n        publicAPI.invokeInitialized();\n      });\n    }\n  };\n\n  publicAPI.setContainer = function (el) {\n    if (model.el && model.el !== el) {\n      if (model.canvas.parentNode !== model.el) {\n        vtkErrorMacro('Error: canvas parent node does not match container');\n      } // Remove canvas from previous container\n\n\n      model.el.removeChild(model.canvas); // If the renderer has previously added\n      // a background image, remove it from the DOM.\n\n      if (model.el.contains(model.bgImage)) {\n        model.el.removeChild(model.bgImage);\n      }\n    }\n\n    if (model.el !== el) {\n      model.el = el;\n\n      if (model.el) {\n        model.el.appendChild(model.canvas); // If the renderer is set to use a background\n        // image, attach it to the DOM.\n\n        if (model.useBackgroundImage) {\n          model.el.appendChild(model.bgImage);\n        }\n      } // Trigger modified()\n\n\n      publicAPI.modified();\n    }\n  };\n\n  publicAPI.getContainer = function () {\n    return model.el;\n  };\n\n  publicAPI.getContainerSize = function () {\n    if (!model.containerSize && model.el) {\n      var _model$el$getBounding = model.el.getBoundingClientRect(),\n          width = _model$el$getBounding.width,\n          height = _model$el$getBounding.height;\n\n      model.containerSize = [width, height];\n    }\n\n    return model.containerSize || model.size;\n  };\n\n  publicAPI.getFramebufferSize = function () {\n    return model.size;\n  };\n\n  publicAPI.create3DContextAsync = /*#__PURE__*/(0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee() {\n    return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function _callee$(_context) {\n      while (1) {\n        switch (_context.prev = _context.next) {\n          case 0:\n            _context.next = 2;\n            return navigator.gpu.requestAdapter();\n\n          case 2:\n            model.adapter = _context.sent;\n            // console.log([...model.adapter.features]);\n            model.device = _Device_js__WEBPACK_IMPORTED_MODULE_6__.default.newInstance();\n            _context.t0 = model.device;\n            _context.next = 7;\n            return model.adapter.requestDevice();\n\n          case 7:\n            _context.t1 = _context.sent;\n\n            _context.t0.initialize.call(_context.t0, _context.t1);\n\n            model.context = model.canvas.getContext('gpupresent');\n\n          case 10:\n          case \"end\":\n            return _context.stop();\n        }\n      }\n    }, _callee);\n  }));\n\n  publicAPI.restoreContext = function () {\n    var rp = _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_10__.default.newInstance();\n    rp.setCurrentOperation('Release');\n    rp.traverse(publicAPI, null);\n  };\n\n  publicAPI.setBackgroundImage = function (img) {\n    model.bgImage.src = img.src;\n  };\n\n  publicAPI.setUseBackgroundImage = function (value) {\n    model.useBackgroundImage = value; // Add or remove the background image from the\n    // DOM as specified.\n\n    if (model.useBackgroundImage && !model.el.contains(model.bgImage)) {\n      model.el.appendChild(model.bgImage);\n    } else if (!model.useBackgroundImage && model.el.contains(model.bgImage)) {\n      model.el.removeChild(model.bgImage);\n    }\n  };\n\n  function getCanvasDataURL() {\n    return _getCanvasDataURL.apply(this, arguments);\n  }\n\n  function _getCanvasDataURL() {\n    _getCanvasDataURL = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee3() {\n      var format,\n          temporaryCanvas,\n          temporaryContext,\n          result,\n          imageData,\n          mainBoundingClientRect,\n          renderWindow,\n          renderers,\n          screenshot,\n          _args3 = arguments;\n      return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function _callee3$(_context3) {\n        while (1) {\n          switch (_context3.prev = _context3.next) {\n            case 0:\n              format = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : model.imageFormat;\n              // Copy current canvas to not modify the original\n              temporaryCanvas = document.createElement('canvas');\n              temporaryContext = temporaryCanvas.getContext('2d');\n              temporaryCanvas.width = model.canvas.width;\n              temporaryCanvas.height = model.canvas.height;\n              _context3.next = 7;\n              return publicAPI.getPixelsAsync();\n\n            case 7:\n              result = _context3.sent;\n              imageData = new ImageData(result.colorValues, result.width, result.height); // temporaryCanvas.putImageData(imageData, 0, 0);\n\n              temporaryContext.putImageData(imageData, 0, 0); // Get current client rect to place canvas\n\n              mainBoundingClientRect = model.canvas.getBoundingClientRect();\n              renderWindow = model.renderable;\n              renderers = renderWindow.getRenderers();\n              renderers.forEach(function (renderer) {\n                var viewProps = renderer.getViewProps();\n                viewProps.forEach(function (viewProp) {\n                  // Check if the prop has a container that should have canvas\n                  if (viewProp.getContainer) {\n                    var container = viewProp.getContainer();\n                    var canvasList = container.getElementsByTagName('canvas'); // Go throughout all canvas and copy it into temporary main canvas\n\n                    for (var i = 0; i < canvasList.length; i++) {\n                      var currentCanvas = canvasList[i];\n                      var boundingClientRect = currentCanvas.getBoundingClientRect();\n                      var newXPosition = boundingClientRect.x - mainBoundingClientRect.x;\n                      var newYPosition = boundingClientRect.y - mainBoundingClientRect.y;\n                      temporaryContext.drawImage(currentCanvas, newXPosition, newYPosition);\n                    }\n                  }\n                });\n              });\n              screenshot = temporaryCanvas.toDataURL(format);\n              temporaryCanvas.remove();\n              publicAPI.invokeImageReady(screenshot);\n\n            case 17:\n            case \"end\":\n              return _context3.stop();\n          }\n        }\n      }, _callee3);\n    }));\n    return _getCanvasDataURL.apply(this, arguments);\n  }\n\n  publicAPI.captureNextImage = function () {\n    var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'image/png';\n\n    var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n        _ref2$resetCamera = _ref2.resetCamera,\n        resetCamera = _ref2$resetCamera === void 0 ? false : _ref2$resetCamera,\n        _ref2$size = _ref2.size,\n        size = _ref2$size === void 0 ? null : _ref2$size,\n        _ref2$scale = _ref2.scale,\n        scale = _ref2$scale === void 0 ? 1 : _ref2$scale;\n\n    if (model.deleted) {\n      return null;\n    }\n\n    model.imageFormat = format;\n    var previous = model.notifyStartCaptureImage;\n    model.notifyStartCaptureImage = true;\n    model._screenshot = {\n      size: !!size || scale !== 1 ? size || model.size.map(function (val) {\n        return val * scale;\n      }) : null\n    };\n    return new Promise(function (resolve, reject) {\n      var subscription = publicAPI.onImageReady(function (imageURL) {\n        if (model._screenshot.size === null) {\n          model.notifyStartCaptureImage = previous;\n          subscription.unsubscribe();\n\n          if (model._screenshot.placeHolder) {\n            // resize the main canvas back to its original size and show it\n            model.size = model._screenshot.originalSize; // process the resize\n\n            publicAPI.modified(); // restore the saved camera parameters, if applicable\n\n            if (model._screenshot.cameras) {\n              model._screenshot.cameras.forEach(function (_ref3) {\n                var restoreParamsFn = _ref3.restoreParamsFn,\n                    arg = _ref3.arg;\n                return restoreParamsFn(arg);\n              });\n            } // Trigger a render at the original size\n\n\n            publicAPI.traverseAllPasses(); // Remove and clean up the placeholder, revealing the original\n\n            model.el.removeChild(model._screenshot.placeHolder);\n\n            model._screenshot.placeHolder.remove();\n\n            model._screenshot = null;\n          }\n\n          resolve(imageURL);\n        } else {\n          // Create a placeholder image overlay while we resize and render\n          var tmpImg = document.createElement('img');\n          tmpImg.style = SCREENSHOT_PLACEHOLDER;\n          tmpImg.src = imageURL;\n          model._screenshot.placeHolder = model.el.appendChild(tmpImg); // hide the main canvas\n\n          model.canvas.style.display = 'none'; // remember the main canvas original size, then resize it\n\n          model._screenshot.originalSize = model.size;\n          model.size = model._screenshot.size;\n          model._screenshot.size = null; // process the resize\n\n          publicAPI.modified();\n\n          if (resetCamera) {\n            // If resetCamera was requested, we first save camera parameters\n            // from all the renderers, so we can restore them later\n            model._screenshot.cameras = model.renderable.getRenderers().map(function (renderer) {\n              var camera = renderer.getActiveCamera();\n              var params = camera.get('focalPoint', 'position', 'parallelScale');\n              return {\n                resetCameraFn: renderer.resetCamera,\n                restoreParamsFn: camera.set,\n                // \"clone\" the params so we don't keep refs to properties\n                arg: JSON.parse(JSON.stringify(params))\n              };\n            }); // Perform the resetCamera() on each renderer only after capturing\n            // the params from all active cameras, in case there happen to be\n            // linked cameras among the renderers.\n\n            model._screenshot.cameras.forEach(function (_ref4) {\n              var resetCameraFn = _ref4.resetCameraFn;\n              return resetCameraFn();\n            });\n          } // Trigger a render at the custom size\n\n\n          publicAPI.traverseAllPasses();\n        }\n      });\n    });\n  };\n\n  publicAPI.traverseAllPasses = function () {\n    if (!model.initialized) {\n      publicAPI.initialize();\n      publicAPI.onInitialized(publicAPI.traverseAllPasses);\n    } else {\n      if (model.renderPasses) {\n        for (var index = 0; index < model.renderPasses.length; ++index) {\n          model.renderPasses[index].traverse(publicAPI, null);\n        }\n      }\n\n      if (model.commandEncoder) {\n        model.device.submitCommandEncoder(model.commandEncoder);\n        model.commandEncoder = null;\n\n        if (model.notifyStartCaptureImage) {\n          model.device.onSubmittedWorkDone().then(function () {\n            getCanvasDataURL();\n          });\n        }\n      }\n    }\n  };\n\n  publicAPI.setViewStream = function (stream) {\n    if (model.viewStream === stream) {\n      return false;\n    }\n\n    if (model.subscription) {\n      model.subscription.unsubscribe();\n      model.subscription = null;\n    }\n\n    model.viewStream = stream;\n\n    if (model.viewStream) {\n      // Force background to be transparent + render\n      var mainRenderer = model.renderable.getRenderers()[0];\n      mainRenderer.getBackgroundByReference()[3] = 0; // Enable display of the background image\n\n      publicAPI.setUseBackgroundImage(true); // Bind to remote stream\n\n      model.subscription = model.viewStream.onImageReady(function (e) {\n        return publicAPI.setBackgroundImage(e.image);\n      });\n      model.viewStream.setSize(model.size[0], model.size[1]);\n      model.viewStream.invalidateCache();\n      model.viewStream.render();\n      publicAPI.modified();\n    }\n\n    return true;\n  };\n\n  publicAPI.getUniquePropID = function () {\n    return model.nextPropID++;\n  };\n\n  publicAPI.getPropFromID = function (id) {\n    for (var i = 0; i < model.children.length; i++) {\n      var res = model.children[i].getPropFromID(id);\n\n      if (res !== null) {\n        return res;\n      }\n    }\n\n    return null;\n  };\n\n  publicAPI.getPixelsAsync = /*#__PURE__*/(0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee2() {\n    var device, texture, result, colorBuffer, cmdEnc, cLoad, tmparray, y, x, doffset, soffset;\n    return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function _callee2$(_context2) {\n      while (1) {\n        switch (_context2.prev = _context2.next) {\n          case 0:\n            device = model.device;\n            texture = model.renderPasses[0].getOpaquePass().getColorTexture(); // as this is async we really don't want to store things in\n            // the class as multiple calls may start before resolving\n            // so anything specific to this request gets put into the\n            // result object (by value in most cases)\n\n            result = {\n              width: texture.getWidth(),\n              height: texture.getHeight()\n            }; // must be a multiple of 256 bytes, so 64 texels with rgba8\n\n            result.colorBufferWidth = 64 * Math.floor((result.width + 63) / 64);\n            result.colorBufferSizeInBytes = result.colorBufferWidth * result.height * 4;\n            colorBuffer = _Buffer_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance();\n            colorBuffer.setDevice(device);\n            /* eslint-disable no-bitwise */\n\n            /* eslint-disable no-undef */\n\n            colorBuffer.create(result.colorBufferSizeInBytes, GPUBufferUsage.MAP_READ | GPUBufferUsage.COPY_DST);\n            /* eslint-enable no-bitwise */\n\n            /* eslint-enable no-undef */\n\n            cmdEnc = model.device.createCommandEncoder();\n            cmdEnc.copyTextureToBuffer({\n              texture: texture.getHandle()\n            }, {\n              buffer: colorBuffer.getHandle(),\n              bytesPerRow: 4 * result.colorBufferWidth,\n              rowsPerImage: result.height\n            }, {\n              width: result.width,\n              height: result.height,\n              depthOrArrayLayers: 1\n            });\n            device.submitCommandEncoder(cmdEnc);\n            /* eslint-disable no-undef */\n\n            cLoad = colorBuffer.mapAsync(GPUMapMode.READ);\n            _context2.next = 14;\n            return cLoad;\n\n          case 14:\n            /* eslint-enable no-undef */\n            result.colorValues = new Uint8ClampedArray(colorBuffer.getMappedRange().slice());\n            colorBuffer.unmap(); // repack the array\n\n            tmparray = new Uint8ClampedArray(result.height * result.width * 4);\n\n            for (y = 0; y < result.height; y++) {\n              for (x = 0; x < result.width; x++) {\n                doffset = (y * result.width + x) * 4;\n                soffset = (y * result.colorBufferWidth + x) * 4;\n                tmparray[doffset] = result.colorValues[soffset + 2];\n                tmparray[doffset + 1] = result.colorValues[soffset + 1];\n                tmparray[doffset + 2] = result.colorValues[soffset];\n                tmparray[doffset + 3] = result.colorValues[soffset + 3];\n              }\n            }\n\n            result.colorValues = tmparray;\n            return _context2.abrupt(\"return\", result);\n\n          case 20:\n          case \"end\":\n            return _context2.stop();\n        }\n      }\n    }, _callee2);\n  }));\n  publicAPI.delete = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.chain(publicAPI.delete, publicAPI.setViewStream);\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  initialized: false,\n  context: null,\n  adapter: null,\n  device: null,\n  canvas: null,\n  swapChain: null,\n  cursorVisibility: true,\n  cursor: 'pointer',\n  containerSize: null,\n  renderPasses: [],\n  notifyStartCaptureImage: false,\n  imageFormat: 'image/png',\n  useOffScreen: false,\n  useBackgroundImage: false,\n  nextPropID: 1\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Create internal instances\n\n  model.canvas = document.createElement('canvas');\n  model.canvas.style.width = '100%'; // Create internal bgImage\n\n  model.bgImage = new Image();\n  model.bgImage.style.position = 'absolute';\n  model.bgImage.style.left = '0';\n  model.bgImage.style.top = '0';\n  model.bgImage.style.width = '100%';\n  model.bgImage.style.height = '100%';\n  model.bgImage.style.zIndex = '-1';\n  model.swapChain = _SwapChain_js__WEBPACK_IMPORTED_MODULE_8__.default.newInstance(); // Inheritance\n\n  _SceneGraph_RenderWindowViewNode_js__WEBPACK_IMPORTED_MODULE_11__.default.extend(publicAPI, model, initialValues);\n  model.myFactory = _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_9__.default.newInstance();\n  /* eslint-disable no-use-before-define */\n\n  model.myFactory.registerOverride('vtkRenderWindow', newInstance);\n  /* eslint-enable no-use-before-define */\n  // setup default forward pass rendering\n\n  model.renderPasses[0] = _ForwardPass_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n\n  if (!model.selector) {\n    model.selector = _HardwareSelector_js__WEBPACK_IMPORTED_MODULE_7__.default.newInstance();\n    model.selector.setWebGPURenderWindow(publicAPI);\n  }\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.event(publicAPI, model, 'imageReady');\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.event(publicAPI, model, 'initialized'); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.get(publicAPI, model, ['swapChain', 'commandEncoder', 'device', 'useBackgroundImage']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.setGet(publicAPI, model, ['initialized', 'context', 'canvas', 'device', 'renderPasses', 'notifyStartCaptureImage', 'cursor', 'useOffScreen']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.setGetArray(publicAPI, model, ['size'], 2); // Object methods\n\n  vtkWebGPURenderWindow(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance(extend, 'vtkWebGPURenderWindow'); // ----------------------------------------------------------------------------\n// Register API specific RenderWindow implementation\n// ----------------------------------------------------------------------------\n\n(0,_Core_RenderWindow_js__WEBPACK_IMPORTED_MODULE_3__.registerViewConstructor)('WebGPU', newInstance); // ----------------------------------------------------------------------------\n\nvar vtkRenderWindow = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkRenderWindow);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/RenderWindow.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/Renderer.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/Renderer.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SceneGraph/ViewNode.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNode.js\");\n/* harmony import */ var _BindGroup_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BindGroup.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/BindGroup.js\");\n/* harmony import */ var _FullScreenQuad_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FullScreenQuad.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/FullScreenQuad.js\");\n/* harmony import */ var _UniformBuffer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./UniformBuffer.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/UniformBuffer.js\");\n/* harmony import */ var _ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ViewNodeFactory.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/vec3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js\");\n\n\n\n\n\n\n\n\n\nvar vtkDebugMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkDebugMacro;\nvar clearFragTemplate = \"\\n//VTK::Renderer::Dec\\n\\n//VTK::Mapper::Dec\\n\\n//VTK::TCoord::Dec\\n\\n//VTK::RenderEncoder::Dec\\n\\n//VTK::IOStructs::Dec\\n\\n[[stage(fragment)]]\\nfn main(\\n//VTK::IOStructs::Input\\n)\\n//VTK::IOStructs::Output\\n{\\n  var output: fragmentOutput;\\n\\n  var computedColor: vec4<f32> = mapperUBO.BackgroundColor;\\n\\n  //VTK::RenderEncoder::Impl\\n  return output;\\n}\\n\"; // ----------------------------------------------------------------------------\n// vtkWebGPURenderer methods\n// ----------------------------------------------------------------------------\n\n/* eslint-disable no-bitwise */\n\nfunction vtkWebGPURenderer(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPURenderer'); // Builds myself.\n\n  publicAPI.buildPass = function (prepass) {\n    if (prepass) {\n      if (!model.renderable) {\n        return;\n      } // make sure we have a camera\n\n\n      if (!model.renderable.isActiveCameraCreated()) {\n        model.renderable.resetCamera();\n      }\n\n      publicAPI.updateLights();\n      publicAPI.prepareNodes();\n      publicAPI.addMissingNode(model.renderable.getActiveCamera());\n      publicAPI.addMissingNodes(model.renderable.getViewPropsWithNestedProps());\n      publicAPI.removeUnusedNodes();\n      publicAPI.updateStabilizedMatrix();\n    }\n  };\n\n  publicAPI.updateStabilizedMatrix = function () {\n    // This method is designed to help with floating point\n    // issues when rendering datasets that push the limits of\n    // resolutions on float.\n    //\n    // One of the most common cases is when the dataset is located far\n    // away from the origin relative to the clipping range we are looking\n    // at. For that case we want to perform the floating point sensitive\n    // multiplications on the CPU in double. To this end we want the\n    // vertex rendering ops to look something like\n    //\n    // Compute shifted points and load those into the VBO\n    // pointCoordsSC = WorldToStabilizedMatrix * pointCoords;\n    //\n    // In the vertex shader do the following\n    // positionVC = StabilizedToDeviceMatrix * ModelToStabilizedMatrix*vertexIn;\n    //\n    // We use two matrices because it is expensive to change the\n    // WorldToStabilized matrix as we have to reupload all pointCoords\n    // So that matrix (MCSCMatrix) is fairly static, the Stabilized to\n    // Device matrix is the one that gets updated every time the camera\n    // changes.\n    //\n    // The basic idea is that we should translate the data so that\n    // when the center of the view frustum moves a lot\n    // we recenter it. The center of the view frustum is roughly\n    // camPos + dirOfProj*(far + near)*0.5\n    var cam = model.renderable.getActiveCamera();\n    var clipRange = cam.getClippingRange();\n    var pos = cam.getPositionByReference();\n    var dop = cam.getDirectionOfProjectionByReference();\n    var center = [];\n    var offset = [];\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_7__.b)(offset, dop, 0.5 * (clipRange[0] + clipRange[1]));\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_7__.j)(center, pos, offset);\n    (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_7__.q)(offset, center, model.stabilizedCenter);\n    var length = (0,_vendor_gl_matrix_esm_vec3_js__WEBPACK_IMPORTED_MODULE_7__.r)(offset);\n\n    if (length / (clipRange[1] - clipRange[0]) > model.recenterThreshold) {\n      model.stabilizedCenter = center;\n      model.stabilizedTime.modified();\n    }\n  };\n\n  publicAPI.updateLights = function () {\n    var count = 0;\n    var lights = model.renderable.getLightsByReference();\n\n    for (var index = 0; index < lights.length; ++index) {\n      if (lights[index].getSwitch() > 0.0) {\n        count++;\n      }\n    }\n\n    if (!count) {\n      vtkDebugMacro('No lights are on, creating one.');\n      model.renderable.createLight();\n    }\n\n    return count;\n  }; // register pipeline callbacks from a mapper\n\n\n  publicAPI.registerPipelineCallback = function (pipeline, cb) {\n    // if there is a matching pipeline just add the cb\n    for (var i = 0; i < model.pipelineCallbacks.length; i++) {\n      if (model.pipelineCallbacks[i].pipeline === pipeline) {\n        model.pipelineCallbacks[i].callbacks.push(cb);\n        return;\n      }\n    }\n\n    model.pipelineCallbacks.push({\n      pipeline: pipeline,\n      callbacks: [cb]\n    });\n  };\n\n  publicAPI.updateUBO = function () {\n    // make sure the data is up to date\n    // has the camera changed?\n    var cam = model.renderable.getActiveCamera();\n    var webgpuCamera = publicAPI.getViewNodeFor(cam);\n    var utime = model.UBO.getSendTime();\n\n    if (model.parent.getMTime() > utime || publicAPI.getMTime() > utime || cam.getMTime() > utime || model.renderable.getMTime() > utime) {\n      var keyMats = webgpuCamera.getKeyMatrices(publicAPI);\n      model.UBO.setArray('WCVCMatrix', keyMats.wcvc);\n      model.UBO.setArray('SCPCMatrix', keyMats.scpc);\n      model.UBO.setArray('PCSCMatrix', keyMats.pcsc);\n      model.UBO.setArray('SCVCMatrix', keyMats.scvc);\n      model.UBO.setArray('VCPCMatrix', keyMats.vcpc);\n      model.UBO.setArray('WCVCNormals', keyMats.normalMatrix);\n      model.UBO.setValue('cameraParallel', cam.getParallelProjection());\n      var device = model.parent.getDevice();\n      model.UBO.sendIfNeeded(device);\n    }\n  };\n\n  publicAPI.scissorAndViewport = function (encoder) {\n    var tsize = publicAPI.getYInvertedTiledSizeAndOrigin();\n    encoder.getHandle().setViewport(tsize.lowerLeftU, tsize.lowerLeftV, tsize.usize, tsize.vsize, 0.0, 1.0); // set scissor\n\n    encoder.getHandle().setScissorRect(tsize.lowerLeftU, tsize.lowerLeftV, tsize.usize, tsize.vsize);\n  };\n\n  publicAPI.bindUBO = function (renderEncoder) {\n    renderEncoder.activateBindGroup(model.bindGroup);\n  }; // Renders myself\n\n\n  publicAPI.opaquePass = function (prepass) {\n    if (prepass) {\n      // clear last pipelines\n      model.pipelineCallbacks = [];\n      model.renderEncoder.begin(model.parent.getCommandEncoder());\n      publicAPI.updateUBO();\n    } else {\n      publicAPI.scissorAndViewport(model.renderEncoder);\n      publicAPI.clear(); // loop over registered pipelines\n\n      for (var i = 0; i < model.pipelineCallbacks.length; i++) {\n        var pStruct = model.pipelineCallbacks[i];\n        var pl = pStruct.pipeline;\n        model.renderEncoder.setPipeline(pl);\n        publicAPI.bindUBO(model.renderEncoder);\n\n        for (var cb = 0; cb < pStruct.callbacks.length; cb++) {\n          pStruct.callbacks[cb](model.renderEncoder);\n        }\n      }\n\n      model.renderEncoder.end();\n    }\n  };\n\n  publicAPI.clear = function () {\n    if (model.renderable.getTransparent() || model.suppressClear) {\n      return;\n    }\n\n    var device = model.parent.getDevice();\n\n    if (!model.clearFSQ) {\n      model.clearFSQ = _FullScreenQuad_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n      model.clearFSQ.setDevice(device);\n      model.clearFSQ.setPipelineHash('clearfsq');\n      model.clearFSQ.setFragmentShaderTemplate(clearFragTemplate);\n      var ubo = _UniformBuffer_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n      ubo.setName('mapperUBO');\n      ubo.addEntry('BackgroundColor', 'vec4<f32>');\n      model.clearFSQ.setUBO(ubo);\n    }\n\n    var background = model.renderable.getBackgroundByReference();\n    model.clearFSQ.getUBO().setArray('BackgroundColor', background);\n    model.clearFSQ.getUBO().sendIfNeeded(device);\n    model.clearFSQ.render(model.renderEncoder, device);\n  };\n\n  publicAPI.translucentPass = function (prepass) {\n    if (prepass) {\n      // clear last pipelines\n      model.pipelineCallbacks = [];\n      model.renderEncoder.begin(model.parent.getCommandEncoder());\n    } else {\n      publicAPI.scissorAndViewport(model.renderEncoder); // loop over registered pipelines\n\n      for (var i = 0; i < model.pipelineCallbacks.length; i++) {\n        var pStruct = model.pipelineCallbacks[i];\n        var pl = pStruct.pipeline;\n        model.renderEncoder.setPipeline(pl);\n        publicAPI.bindUBO(model.renderEncoder);\n\n        for (var cb = 0; cb < pStruct.callbacks.length; cb++) {\n          pStruct.callbacks[cb](model.renderEncoder);\n        }\n      }\n\n      model.renderEncoder.end();\n    }\n  };\n\n  publicAPI.volumeDepthRangePass = function (prepass) {\n    if (prepass) {\n      // clear last pipelines\n      model.pipelineCallbacks = [];\n      model.renderEncoder.begin(model.parent.getCommandEncoder());\n    } else {\n      publicAPI.scissorAndViewport(model.renderEncoder); // loop over registered pipelines\n\n      for (var i = 0; i < model.pipelineCallbacks.length; i++) {\n        var pStruct = model.pipelineCallbacks[i];\n        var pl = pStruct.pipeline;\n        model.renderEncoder.setPipeline(pl);\n        publicAPI.bindUBO(model.renderEncoder);\n\n        for (var cb = 0; cb < pStruct.callbacks.length; cb++) {\n          pStruct.callbacks[cb](model.renderEncoder);\n        }\n      }\n\n      model.renderEncoder.end();\n    }\n  };\n\n  publicAPI.getAspectRatio = function () {\n    var size = model.parent.getSizeByReference();\n    var viewport = model.renderable.getViewportByReference();\n    return size[0] * (viewport[2] - viewport[0]) / ((viewport[3] - viewport[1]) * size[1]);\n  };\n\n  publicAPI.getYInvertedTiledSizeAndOrigin = function () {\n    var res = publicAPI.getTiledSizeAndOrigin();\n    var size = model.parent.getSizeByReference();\n    res.lowerLeftV = size[1] - res.vsize - res.lowerLeftV;\n    return res;\n  };\n\n  publicAPI.getTiledSizeAndOrigin = function () {\n    var vport = model.renderable.getViewportByReference(); // if there is no window assume 0 1\n\n    var tileViewPort = [0.0, 0.0, 1.0, 1.0]; // find the lower left corner of the viewport, taking into account the\n    // lower left boundary of this tile\n\n    var vpu = vport[0] - tileViewPort[0];\n    var vpv = vport[1] - tileViewPort[1]; // store the result as a pixel value\n\n    var ndvp = model.parent.normalizedDisplayToDisplay(vpu, vpv);\n    var lowerLeftU = Math.round(ndvp[0]);\n    var lowerLeftV = Math.round(ndvp[1]); // find the upper right corner of the viewport, taking into account the\n    // lower left boundary of this tile\n\n    var vpu2 = vport[2] - tileViewPort[0];\n    var vpv2 = vport[3] - tileViewPort[1];\n    var ndvp2 = model.parent.normalizedDisplayToDisplay(vpu2, vpv2); // now compute the size of the intersection of the viewport with the\n    // current tile\n\n    var usize = Math.round(ndvp2[0]) - lowerLeftU;\n    var vsize = Math.round(ndvp2[1]) - lowerLeftV;\n\n    if (usize < 0) {\n      usize = 0;\n    }\n\n    if (vsize < 0) {\n      vsize = 0;\n    }\n\n    return {\n      usize: usize,\n      vsize: vsize,\n      lowerLeftU: lowerLeftU,\n      lowerLeftV: lowerLeftV\n    };\n  };\n\n  publicAPI.getPropFromID = function (id) {\n    for (var i = 0; i < model.children.length; i++) {\n      var res = model.children[i].getPropID ? model.children[i].getPropID() : -1;\n\n      if (res === id) {\n        return model.children[i];\n      }\n    }\n\n    return null;\n  };\n\n  publicAPI.getStabilizedTime = function () {\n    return model.stabilizedTime.getMTime();\n  };\n\n  publicAPI.releaseGraphicsResources = function () {\n    if (model.selector !== null) {\n      model.selector.releaseGraphicsResources();\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  bindGroup: null,\n  selector: null,\n  renderEncoder: null,\n  recenterThreshold: 20.0,\n  suppressClear: false,\n  stabilizedCenter: [0.0, 0.0, 0.0]\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _SceneGraph_ViewNode_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues);\n  model.UBO = _UniformBuffer_js__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n  model.UBO.setName('rendererUBO');\n  model.UBO.addEntry('WCVCMatrix', 'mat4x4<f32>');\n  model.UBO.addEntry('SCPCMatrix', 'mat4x4<f32>');\n  model.UBO.addEntry('PCSCMatrix', 'mat4x4<f32>');\n  model.UBO.addEntry('SCVCMatrix', 'mat4x4<f32>');\n  model.UBO.addEntry('VCPCMatrix', 'mat4x4<f32>');\n  model.UBO.addEntry('WCVCNormals', 'mat4x4<f32>');\n  model.UBO.addEntry('cameraParallel', 'u32');\n  model.bindGroup = _BindGroup_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n  model.bindGroup.setName('rendererBG');\n  model.bindGroup.setBindables([model.UBO]);\n  model.tmpMat4 = (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_6__.a)(new Float64Array(16));\n  model.stabilizedTime = {};\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.obj)(model.stabilizedTime, {\n    mtime: 0\n  }); // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.get)(publicAPI, model, ['bindGroup', 'stabilizedTime']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.getArray)(publicAPI, model, ['stabilizedCenter']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['renderEncoder', 'selector', 'suppressClear', 'UBO']); // Object methods\n\n  vtkWebGPURenderer(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend, 'vtkWebGPURenderer'); // ----------------------------------------------------------------------------\n\nvar index = {\n  newInstance: newInstance,\n  extend: extend\n}; // Register ourself to WebGPU backend if imported\n\n(0,_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_5__.registerOverride)('vtkRenderer', newInstance);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/Renderer.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/Sampler.js":
/*!******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/Sampler.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\n/* eslint-disable no-bitwise */\n// ----------------------------------------------------------------------------\n// vtkWebGPUSampler methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUSampler(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUSampler');\n\n  publicAPI.create = function (device) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    model.device = device;\n    model.handle = model.device.getHandle().createSampler({\n      magFilter: options.magFilter ? options.magFilter : 'nearest',\n      minFilter: options.minFilter ? options.minFilter : 'nearest'\n    });\n    model.bindGroupTime.modified();\n  };\n\n  publicAPI.getShaderCode = function (binding, group) {\n    var result = \"[[binding(\".concat(binding, \"), group(\").concat(group, \")]] var \").concat(model.name, \": sampler;\");\n    return result;\n  };\n\n  publicAPI.getBindGroupEntry = function () {\n    var foo = {\n      resource: model.handle\n    };\n    return foo;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  device: null,\n  handle: null,\n  name: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  model.bindGroupLayoutEntry = {\n    /* eslint-disable no-undef */\n    visibility: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT,\n\n    /* eslint-enable no-undef */\n    sampler: {// type: 'filtering',\n    }\n  };\n  model.bindGroupTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model.bindGroupTime, {\n    mtime: 0\n  });\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['bindGroupTime', 'handle']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['bindGroupLayoutEntry', 'device', 'name']);\n  vtkWebGPUSampler(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUSampler$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUSampler$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/Sampler.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _ShaderModule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ShaderModule.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderModule.js\");\n\n\n\n// this is useful for building up shader strings which typically involve\n// lots of string substitutions. Return true if a substitution was done.\n\nfunction substitute(source, search, replace) {\n  var all = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n  var replaceStr = Array.isArray(replace) ? replace.join('\\n') : replace;\n  var replaced = false;\n\n  if (source.search(search) !== -1) {\n    replaced = true;\n  }\n\n  var gflag = '';\n\n  if (all) {\n    gflag = 'g';\n  }\n\n  var regex = new RegExp(search, gflag);\n  var resultstr = source.replace(regex, replaceStr);\n  return {\n    replace: replaced,\n    result: resultstr\n  };\n} // ----------------------------------------------------------------------------\n// vtkWebGPUShaderCache methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkWebGPUShaderCache(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUShaderCache');\n\n  publicAPI.getShaderModule = function (shaderDesc) {\n    // has it already been created?\n    var sType = shaderDesc.getType();\n    var sHash = shaderDesc.getHash();\n\n    var keys = model._shaderModules.keys();\n\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i];\n\n      if (key.getHash() === sHash && key.getType() === sType) {\n        return model._shaderModules.get(key);\n      }\n    } // console.log(JSON.stringify(shaderDesc));\n\n\n    var sm = _ShaderModule_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n    sm.initialize(model.device, shaderDesc);\n\n    model._shaderModules.set(shaderDesc, sm);\n\n    return sm;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  shaderModules: null,\n  device: null,\n  window: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Internal objects\n\n  model._shaderModules = new Map(); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['device', 'window']); // Object methods\n\n  vtkWebGPUShaderCache(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkWebGPUShaderCache'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUShaderCache$1 = {\n  newInstance: newInstance,\n  extend: extend,\n  substitute: substitute\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUShaderCache$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderDescription.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderDescription.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _ShaderCache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ShaderCache.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js\");\n\n\n\n// vtkWebGPUShaderDescription methods\n// ----------------------------------------------------------------------------\n// shader description\n\nfunction vtkWebGPUShaderDescription(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUShaderDescription');\n\n  publicAPI.hasOutput = function (name) {\n    return model.outputNames.includes(name);\n  };\n\n  publicAPI.addOutput = function (type, name) {\n    model.outputTypes.push(type);\n    model.outputNames.push(name);\n  };\n\n  publicAPI.addBuiltinOutput = function (type, name) {\n    model.builtinOutputTypes.push(type);\n    model.builtinOutputNames.push(name);\n  };\n\n  publicAPI.addBuiltinInput = function (type, name) {\n    model.builtinInputTypes.push(type);\n    model.builtinInputNames.push(name);\n  }; // perform shader replacements for the input and outputs\n  // of this shader. That includes vertex inputs if specified\n\n\n  publicAPI.replaceShaderCode = function (priorStage, vertexInput) {\n    var inputImpl = [];\n    var iodec = [];\n\n    if (vertexInput) {\n      inputImpl.push(vertexInput.getShaderCode());\n    }\n\n    if (priorStage || model.builtinInputNames.length) {\n      var inputStruct = [];\n      inputStruct.push(\"struct \".concat(model.type, \"Input\\n{\"));\n\n      if (priorStage) {\n        var inputNames = priorStage.getOutputNamesByReference();\n        var inputTypes = priorStage.getOutputTypesByReference();\n\n        for (var i = 0; i < inputNames.length; i++) {\n          inputStruct.push(\"  [[location(\".concat(i, \")]] \").concat(inputNames[i], \" : \").concat(inputTypes[i], \";\"));\n        }\n      }\n\n      for (var _i = 0; _i < model.builtinInputNames.length; _i++) {\n        inputStruct.push(\"  \".concat(model.builtinInputNames[_i], \" : \").concat(model.builtinInputTypes[_i], \";\"));\n      }\n\n      if (inputStruct.length > 1) {\n        inputStruct.push('};');\n        iodec = inputStruct;\n        inputImpl[inputImpl.length - 1] += ',';\n        inputImpl.push(\"input: \".concat(model.type, \"Input\"));\n      }\n    }\n\n    if (inputImpl.length) {\n      model.code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_1__.default.substitute(model.code, '//VTK::IOStructs::Input', inputImpl).result;\n    }\n\n    if (model.outputNames.length + model.builtinOutputNames.length) {\n      var outputStruct = [\"struct \".concat(model.type, \"Output\\n{\")];\n\n      for (var _i2 = 0; _i2 < model.outputNames.length; _i2++) {\n        outputStruct.push(\"  [[location(\".concat(_i2, \")]] \").concat(model.outputNames[_i2], \" : \").concat(model.outputTypes[_i2], \";\"));\n      }\n\n      for (var _i3 = 0; _i3 < model.builtinOutputNames.length; _i3++) {\n        outputStruct.push(\"  \".concat(model.builtinOutputNames[_i3], \" : \").concat(model.builtinOutputTypes[_i3], \";\"));\n      }\n\n      outputStruct.push('};');\n      iodec = iodec.concat(outputStruct);\n      model.code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_1__.default.substitute(model.code, '//VTK::IOStructs::Output', [\"-> \".concat(model.type, \"Output\")]).result;\n    }\n\n    model.code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_1__.default.substitute(model.code, '//VTK::IOStructs::Dec', iodec).result;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  type: null,\n  // 'vertex' or 'fragment'\n  hash: null,\n  code: null,\n  outputNames: null,\n  outputTypes: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues);\n  model.outputNames = [];\n  model.outputTypes = [];\n  model.builtinOutputNames = [];\n  model.builtinOutputTypes = [];\n  model.builtinInputNames = [];\n  model.builtinInputTypes = []; // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['type', 'hash', 'code']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.getArray(publicAPI, model, ['outputTypes', 'outputNames']); // Object methods\n\n  vtkWebGPUShaderDescription(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkWebGPUShaderDescription'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUShaderDescription$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUShaderDescription$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderDescription.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderModule.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderModule.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\n// vtkWebGPUShaderModule methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUShaderModule(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUShaderModule');\n\n  publicAPI.initialize = function (device, shaderDesc) {\n    model.device = device; // console.log(shaderDesc.getCode());\n\n    model.handle = model.device.getHandle().createShaderModule({\n      code: shaderDesc.getCode()\n    });\n  }; // publicAPI.setLastCameraMTime = (mtime) => {\n  //   model.lastCameraMTime = mtime;\n  // };\n\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  device: null,\n  handle: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['lastCameraMTime']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['device', 'handle']); // Object methods\n\n  vtkWebGPUShaderModule(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkWebGPUShaderModule'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUShaderModule$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUShaderModule$1);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderModule.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/StorageBuffer.js":
/*!************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/StorageBuffer.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _BufferManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BufferManager.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager.js\");\n/* harmony import */ var _Types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Types.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Types.js\");\n\n\n\n\nvar BufferUsage = _BufferManager_js__WEBPACK_IMPORTED_MODULE_1__.default.BufferUsage;\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.vtkErrorMacro; // ----------------------------------------------------------------------------\n// vtkWebGPUStorageBuffer - similar to the UniformBuffer class\n// but YOU are responsible for layout issues and alignment.\n// The order you add entries is the order they will be layed out\n// in memory. But you must follow layout rules.\n// ----------------------------------------------------------------------------\n// ----------------------------------------------------------------------------\n// vtkWebGPUStorageBuffer methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUStorageBuffer(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUStorageBuffer');\n\n  publicAPI.addEntry = function (name, type) {\n    if (model._bufferEntryNames.has(name)) {\n      vtkErrorMacro(\"entry named \".concat(name, \" already exists\"));\n      return;\n    }\n\n    model._bufferEntryNames.set(name, model.bufferEntries.length);\n\n    var sizeInBytes = _Types_js__WEBPACK_IMPORTED_MODULE_2__.default.getByteStrideFromShaderFormat(type);\n    model.bufferEntries.push({\n      name: name,\n      type: type,\n      sizeInBytes: sizeInBytes,\n      offset: model.sizeInBytes,\n      nativeType: _Types_js__WEBPACK_IMPORTED_MODULE_2__.default.getNativeTypeFromShaderFormat(type)\n    });\n    model.sizeInBytes += sizeInBytes;\n  };\n\n  publicAPI.send = function (device) {\n    if (!model._buffer) {\n      var req = {\n        nativeArray: model.Float32Array,\n        time: 0,\n        usage: BufferUsage.Storage\n      };\n      model._buffer = device.getBufferManager().getBuffer(req);\n      model.bindGroupTime.modified();\n\n      model._sendTime.modified();\n\n      return;\n    }\n\n    device.getHandle().queue.writeBuffer(model._buffer.getHandle(), 0, model.arrayBuffer, 0, model.sizeInBytes * model.numberOfInstances);\n\n    model._sendTime.modified();\n  };\n\n  publicAPI.createView = function (type) {\n    if (type in model === false) {\n      if (!model.arrayBuffer) {\n        model.arrayBuffer = new ArrayBuffer(model.sizeInBytes * model.numberOfInstances);\n      }\n\n      model[type] = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newTypedArray(type, model.arrayBuffer);\n    }\n  };\n\n  publicAPI.setValue = function (name, instance, val) {\n    var idx = model._bufferEntryNames.get(name);\n\n    if (idx === undefined) {\n      vtkErrorMacro(\"entry named \".concat(name, \" not found in UBO\"));\n      return;\n    }\n\n    var entry = model.bufferEntries[idx];\n    publicAPI.createView(entry.nativeType);\n    var view = model[entry.nativeType];\n    view[(entry.offset + instance * model.sizeInBytes) / view.BYTES_PER_ELEMENT] = val;\n  };\n\n  publicAPI.setArray = function (name, instance, arr) {\n    var idx = model._bufferEntryNames.get(name);\n\n    if (idx === undefined) {\n      vtkErrorMacro(\"entry named \".concat(name, \" not found in UBO\"));\n      return;\n    }\n\n    var entry = model.bufferEntries[idx];\n    publicAPI.createView(entry.nativeType);\n    var view = model[entry.nativeType];\n    var ioffset = (entry.offset + instance * model.sizeInBytes) / view.BYTES_PER_ELEMENT;\n\n    for (var i = 0; i < arr.length; i++) {\n      view[ioffset + i] = arr[i];\n    }\n  };\n\n  publicAPI.setAllInstancesFromArray = function (name, arr) {\n    var idx = model._bufferEntryNames.get(name);\n\n    if (idx === undefined) {\n      vtkErrorMacro(\"entry named \".concat(name, \" not found in UBO\"));\n      return;\n    }\n\n    var entry = model.bufferEntries[idx];\n    publicAPI.createView(entry.nativeType);\n    var view = model[entry.nativeType];\n    var numComponents = arr.length / model.numberOfInstances;\n\n    for (var inst = 0; inst < model.numberOfInstances; inst++) {\n      var ioffset = (entry.offset + inst * model.sizeInBytes) / view.BYTES_PER_ELEMENT;\n\n      for (var i = 0; i < numComponents; i++) {\n        view[ioffset + i] = arr[inst * numComponents + i];\n      }\n    }\n  };\n\n  publicAPI.setAllInstancesFromArrayColorToFloat = function (name, arr) {\n    var idx = model._bufferEntryNames.get(name);\n\n    if (idx === undefined) {\n      vtkErrorMacro(\"entry named \".concat(name, \" not found in UBO\"));\n      return;\n    }\n\n    var entry = model.bufferEntries[idx];\n    publicAPI.createView(entry.nativeType);\n    var view = model[entry.nativeType];\n    var numComponents = arr.length / model.numberOfInstances;\n\n    for (var inst = 0; inst < model.numberOfInstances; inst++) {\n      var ioffset = (entry.offset + inst * model.sizeInBytes) / view.BYTES_PER_ELEMENT;\n\n      for (var i = 0; i < numComponents; i++) {\n        view[ioffset + i] = arr[inst * numComponents + i] / 255.0;\n      }\n    }\n  };\n\n  publicAPI.setAllInstancesFromArray3x3To4x4 = function (name, arr) {\n    var idx = model._bufferEntryNames.get(name);\n\n    if (idx === undefined) {\n      vtkErrorMacro(\"entry named \".concat(name, \" not found in UBO\"));\n      return;\n    }\n\n    var entry = model.bufferEntries[idx];\n    publicAPI.createView(entry.nativeType);\n    var view = model[entry.nativeType];\n    var numComponents = 9;\n\n    for (var inst = 0; inst < model.numberOfInstances; inst++) {\n      var ioffset = (entry.offset + inst * model.sizeInBytes) / view.BYTES_PER_ELEMENT;\n\n      for (var j = 0; j < 3; j++) {\n        for (var i = 0; i < 3; i++) {\n          view[ioffset + j * 4 + i] = arr[inst * numComponents + j * 3 + i];\n        }\n      }\n    }\n  };\n\n  publicAPI.getSendTime = function () {\n    return model._sendTime.getMTime();\n  };\n\n  publicAPI.getShaderCode = function (binding, group) {\n    var lines = [\"struct \".concat(model.name, \"StructEntry\\n{\")];\n\n    for (var i = 0; i < model.bufferEntries.length; i++) {\n      var entry = model.bufferEntries[i];\n      lines.push(\"  \".concat(entry.name, \": \").concat(entry.type, \";\"));\n    }\n\n    lines.push(\"\\n};\\n[[block]] struct \".concat(model.name, \"Struct\\n{\\n  values: array<\").concat(model.name, \"StructEntry>;\\n};\\n[[binding(\").concat(binding, \"), group(\").concat(group, \")]] var<storage> \").concat(model.name, \": [[access(read)]] \").concat(model.name, \"Struct;\\n\"));\n    return lines.join('\\n');\n  };\n\n  publicAPI.getBindGroupEntry = function () {\n    var foo = {\n      resource: {\n        buffer: model._buffer.getHandle()\n      }\n    };\n    return foo;\n  };\n\n  publicAPI.clearData = function () {\n    model.numberOfInstances = 0;\n    model.sizeInBytes = 0;\n    model.bufferEntries = [];\n    model._bufferEntryNames = new Map();\n    model._buffer = null;\n    delete model.arrayBuffer;\n    delete model.Float32Array;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  bufferEntries: null,\n  bufferEntryNames: null,\n  sizeInBytes: 0,\n  name: null,\n  numberOfInstances: 1\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model); // Internal objects\n\n  model._bufferEntryNames = new Map();\n  model.bufferEntries = [];\n  model._sendTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model._sendTime, {\n    mtime: 0\n  });\n  model.bindGroupTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model.bindGroupTime, {\n    mtime: 0\n  }); // default SSBO desc\n\n  model.bindGroupLayoutEntry = model.bindGroupLayoutEntry || {\n    buffer: {\n      type: 'read-only-storage'\n    }\n  };\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['bindGroupTime']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['device', 'bindGroupLayoutEntry', 'name', 'numberOfInstances', 'sizeInBytes']); // Object methods\n\n  vtkWebGPUStorageBuffer(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkWebGPUStorageBuffer'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUStorageBuffer$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUStorageBuffer$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/StorageBuffer.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/SwapChain.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/SwapChain.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\n// vtkWebGPUSwapChain methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUSwapChain(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUSwapChain');\n  /* eslint-disable no-undef */\n\n  /* eslint-disable no-bitwise */\n\n  publicAPI.create = function (device, window) {\n    model.device = device;\n    model.window = window;\n\n    if (window.getContext()) {\n      model.colorFormat = 'bgra8unorm';\n      model.handle = window.getContext().configureSwapChain({\n        device: device.getHandle(),\n        format: model.colorFormat,\n        usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_DST\n      });\n      model.created = true;\n    }\n  };\n\n  publicAPI.getCurrentTexture = function () {\n    return model.handle.getCurrentTexture();\n  };\n\n  publicAPI.releaseGraphicsResources = function () {\n    if (model.created) {\n      model.handle = null;\n      model.created = false;\n      model.depthTexture = null;\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  device: null,\n  created: false,\n  handle: null,\n  colorFormat: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.obj)(publicAPI, model);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.get)(publicAPI, model, ['colorFormat']);\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['created', 'device', 'handle']); // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkWebGPUSwapChain(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend, 'vtkWebGPUSwapChain'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUSwapChain$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUSwapChain$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/SwapChain.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/Texture.js":
/*!******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/Texture.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _BufferManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BufferManager.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager.js\");\n/* harmony import */ var _TextureView_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TextureView.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/TextureView.js\");\n/* harmony import */ var _Types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Types.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Types.js\");\n\n\n\n\n\nvar BufferUsage = _BufferManager_js__WEBPACK_IMPORTED_MODULE_1__.default.BufferUsage; // ----------------------------------------------------------------------------\n// Global methods\n// ----------------------------------------------------------------------------\n// ----------------------------------------------------------------------------\n// vtkWebGPUTexture methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUTexture(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUTexture');\n\n  publicAPI.create = function (device, options) {\n    model.device = device;\n    model.width = options.width;\n    model.height = options.height;\n    model.depth = options.depth ? options.depth : 1;\n    var dimension = model.depth === 1 ? '2d' : '3d';\n    model.format = options.format ? options.format : 'rgbaunorm';\n    /* eslint-disable no-undef */\n\n    /* eslint-disable no-bitwise */\n\n    model.usage = options.usage ? options.usage : GPUTextureUsage.SAMPLED | GPUTextureUsage.COPY_DST;\n    /* eslint-enable no-undef */\n\n    /* eslint-enable no-bitwise */\n\n    model.handle = model.device.getHandle().createTexture({\n      size: [model.width, model.height, model.depth],\n      format: model.format,\n      // 'rgba8unorm',\n      usage: model.usage,\n      dimension: dimension\n    });\n  };\n\n  publicAPI.assignFromHandle = function (device, handle, options) {\n    model.device = device;\n    model.handle = handle;\n    model.width = options.width;\n    model.height = options.height;\n    model.depth = options.depth ? options.depth : 1;\n    model.format = options.format ? options.format : 'rgbaunorm';\n    /* eslint-disable no-undef */\n\n    /* eslint-disable no-bitwise */\n\n    model.usage = options.usage ? options.usage : GPUTextureUsage.SAMPLED | GPUTextureUsage.COPY_DST;\n    /* eslint-enable no-undef */\n\n    /* eslint-enable no-bitwise */\n  }; // set the data\n\n\n  publicAPI.writeImageData = function (req) {\n    var tDetails = _Types_js__WEBPACK_IMPORTED_MODULE_3__.default.getDetailsFromTextureFormat(model.format);\n    var bufferBytesPerRow = model.width * tDetails.stride;\n\n    if (req.nativeArray) {\n      // create and write the buffer\n      var buffRequest = {\n        /* eslint-disable no-undef */\n        usage: BufferUsage.Texture\n        /* eslint-enable no-undef */\n\n      };\n\n      if (req.dataArray) {\n        buffRequest.dataArray = req.dataArray;\n        buffRequest.time = req.dataArray.getMTime();\n      }\n\n      buffRequest.nativeArray = req.nativeArray; // bytesPerRow must be a multiple of 256 so we might need to rebuild\n      // the data here before passing to the buffer. e.g. if it is unorm8x4 then\n      // we need to have width be a multiple of 64\n\n      var currWidthInBytes = model.width * tDetails.stride;\n\n      if (currWidthInBytes % 256) {\n        var oArray = req.dataArray.getData();\n        var bufferWidthInBytes = 256 * Math.floor((currWidthInBytes + 255) / 256);\n        var bufferWidth = bufferWidthInBytes / oArray.BYTES_PER_ELEMENT;\n        var oWidth = currWidthInBytes / oArray.BYTES_PER_ELEMENT;\n        var nArray = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newTypedArray(oArray.name, bufferWidth * model.height * model.depth);\n\n        for (var v = 0; v < model.height * model.depth; v++) {\n          nArray.set(oArray.subarray(v * oWidth, (v + 1) * oWidth), v * bufferWidth);\n        }\n\n        buffRequest.nativeArray = nArray;\n        bufferBytesPerRow = bufferWidthInBytes;\n      }\n\n      var buff = model.device.getBufferManager().getBuffer(buffRequest);\n      model.buffer = buff;\n    }\n\n    if (req.image) {\n      var canvas = document.createElement('canvas');\n      canvas.width = req.image.width;\n      canvas.height = req.image.height;\n      var ctx = canvas.getContext('2d');\n      ctx.translate(0, canvas.height);\n      ctx.scale(1, -1);\n      ctx.drawImage(req.image, 0, 0, req.image.width, req.image.height, 0, 0, canvas.width, canvas.height);\n      var imageData = ctx.getImageData(0, 0, req.image.width, req.image.height); // create and write the buffer\n\n      var _buffRequest = {\n        nativeArray: imageData.data,\n        time: 0,\n\n        /* eslint-disable no-undef */\n        usage: BufferUsage.Texture,\n\n        /* eslint-enable no-undef */\n        format: 'unorm8x4'\n      };\n\n      var _buff = model.device.getBufferManager().getBuffer(_buffRequest);\n\n      model.buffer = _buff;\n    } // get a buffer for the image\n\n\n    var cmdEnc = model.device.createCommandEncoder();\n    cmdEnc.copyBufferToTexture({\n      buffer: model.buffer.getHandle(),\n      offset: 0,\n      bytesPerRow: bufferBytesPerRow,\n      rowsPerImage: model.height\n    }, {\n      texture: model.handle\n    }, [model.width, model.height, model.depth]);\n    model.device.submitCommandEncoder(cmdEnc);\n    model.ready = true;\n  };\n\n  publicAPI.resizeToMatch = function (tex) {\n    if (tex.getWidth() !== model.width || tex.getHeight() !== model.height || tex.getDepth() !== model.depth) {\n      model.width = tex.getWidth();\n      model.height = tex.getHeight();\n      model.depth = tex.getDepth();\n      model.handle = model.device.getHandle().createTexture({\n        size: [model.width, model.height, model.depth],\n        format: model.format,\n        usage: model.usage\n      });\n    }\n  };\n\n  publicAPI.resize = function (width, height) {\n    var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n    if (width !== model.width || height !== model.height || depth !== model.depth) {\n      model.width = width;\n      model.height = height;\n      model.depth = depth;\n      model.handle = model.device.getHandle().createTexture({\n        size: [model.width, model.height, model.depth],\n        format: model.format,\n        usage: model.usage\n      });\n    }\n  };\n\n  publicAPI.createView = function () {\n    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    // if options is missing values try to add them in\n    if (!options.dimension) {\n      options.dimension = model.depth === 1 ? '2d' : '3d';\n    }\n\n    var view = _TextureView_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n    view.create(publicAPI, options);\n    return view;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  device: null,\n  handle: null,\n  buffer: null,\n  ready: false\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['handle', 'ready', 'width', 'height', 'depth', 'format', 'usage']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['device']);\n  vtkWebGPUTexture(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUTexture$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUTexture$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/Texture.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/TextureManager.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/TextureManager.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Texture_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Texture.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Texture.js\");\n\n\n\n// Global methods\n// ----------------------------------------------------------------------------\n\nfunction requestMatches(req1, req2) {\n  if (req1.time !== req2.time) return false;\n  if (req1.nativeArray !== req2.nativeArray) return false;\n  if (req1.format !== req2.format) return false;\n  return true;\n} // ----------------------------------------------------------------------------\n// vtkWebGPUTextureManager methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkWebGPUTextureManager(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUTextureManager'); // The keys fields of a request are\n  // - source, this is what owns the data and when it does away\n  //   the data should be freed\n  // - imageData - when provided use as the source of the data\n  //\n\n  publicAPI.getTexture = function (req) {\n    // fill in values based on imageData if the request has it\n    if (req.imageData) {\n      req.dataArray = req.imageData.getPointData().getScalars();\n      req.time = req.dataArray.getMTime();\n      req.nativeArray = req.dataArray.getData();\n      var dims = req.imageData.getDimensions();\n      req.width = dims[0];\n      req.height = dims[1];\n      req.depth = dims[2];\n      var numComp = req.dataArray.getNumberOfComponents(); // todo pick format based on native type\n      // todo fix handling of 3 component\n\n      switch (numComp) {\n        case 1:\n          req.format = 'r8unorm';\n          break;\n\n        case 2:\n          req.format = 'rg8unorm';\n          break;\n\n        default:\n        case 3:\n        case 4:\n          req.format = 'rgba8unorm';\n          break;\n      }\n    } // fill in values based on image if the request has it\n\n\n    if (req.image) {\n      req.time = 0;\n      req.width = req.image.width;\n      req.height = req.image.height;\n      req.depth = 1;\n      req.format = 'rgba8unorm';\n    }\n\n    if (req.source) {\n      // if a matching texture already exists then return it\n      if (model.textures.has(req.source)) {\n        var dabuffers = model.textures.get(req.source);\n\n        for (var i = 0; i < dabuffers.length; i++) {\n          if (requestMatches(dabuffers[i].request, req)) {\n            return dabuffers[i].texture;\n          }\n        }\n      }\n    }\n\n    var newTex = _Texture_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n    newTex.create(model.device, {\n      width: req.width,\n      height: req.height,\n      depth: req.depth,\n      format: req.format\n    }); // fill the texture if we have data\n\n    if (req.nativeArray || req.image) {\n      newTex.writeImageData(req);\n    } // cache the texture if we have a source\n    // We create a new req that only has the fields required for\n    // a comparison to avoid GC cycles\n\n\n    if (req.source) {\n      if (!model.textures.has(req.source)) {\n        model.textures.set(req.source, []);\n      }\n\n      var _dabuffers = model.textures.get(req.source);\n\n      _dabuffers.push({\n        request: {\n          time: req.time,\n          nativeArray: req.nativeArray,\n          format: req.format\n        },\n        texture: newTex\n      });\n    }\n\n    return newTex;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  textures: null,\n  handle: null,\n  device: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model); // this is a cache, and a cache with GC pretty much means WeakMap\n\n  model.textures = new WeakMap();\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['device']);\n  vtkWebGPUTextureManager(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUTextureManager$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUTextureManager$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/TextureManager.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/TextureView.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/TextureView.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Sampler_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Sampler.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Sampler.js\");\n\n\n\n// vtkWebGPUTextureView methods\n// ----------------------------------------------------------------------------\n\n/* eslint-disable no-bitwise */\n\nfunction vtkWebGPUTextureView(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUTextureView');\n\n  publicAPI.create = function (texture, options) {\n    model.texture = texture;\n    model.options = options;\n    model.options.dimension = model.options.dimension || '2d';\n    model.textureHandle = texture.getHandle();\n    model.handle = model.textureHandle.createView(model.options);\n    model.bindGroupLayoutEntry.texture.viewDimension = model.options.dimension;\n  };\n\n  publicAPI.getBindGroupEntry = function () {\n    var foo = {\n      resource: publicAPI.getHandle()\n    };\n    return foo;\n  };\n\n  publicAPI.getShaderCode = function (binding, group) {\n    var result = \"[[binding(\".concat(binding, \"), group(\").concat(group, \")]] var \").concat(model.name, \": texture_\").concat(model.options.dimension, \"<f32>;\");\n    return result;\n  };\n\n  publicAPI.addSampler = function (device, options) {\n    var newSamp = _Sampler_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance();\n    newSamp.create(device, options);\n    publicAPI.setSampler(newSamp);\n    model.sampler.setName(\"\".concat(model.name, \"Sampler\"));\n  };\n\n  publicAPI.setName = function (val) {\n    if (model.sampler) {\n      model.sampler.setName(\"\".concat(val, \"Sampler\"));\n    }\n\n    if (model.name === val) {\n      return;\n    }\n\n    model.name = val;\n    publicAPI.modified();\n  };\n\n  publicAPI.getBindGroupTime = function () {\n    // check if the handle changed\n    if (model.texture.getHandle() !== model.textureHandle) {\n      model.textureHandle = model.texture.getHandle();\n      model.handle = model.textureHandle.createView(model.options);\n      model.bindGroupTime.modified();\n    }\n\n    return model.bindGroupTime;\n  }; // if the texture has changed then get a new view\n\n\n  publicAPI.getHandle = function () {\n    if (model.texture.getHandle() !== model.textureHandle) {\n      model.textureHandle = model.texture.getHandle();\n      model.handle = model.textureHandle.createView(model.options);\n      model.bindGroupTime.modified();\n    }\n\n    return model.handle;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  texture: null,\n  handle: null,\n  name: null,\n  sampler: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(publicAPI, model);\n  model.bindGroupLayoutEntry = {\n    /* eslint-disable no-undef */\n    visibility: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT,\n\n    /* eslint-enable no-undef */\n    texture: {\n      // sampleType: 'float',\n      viewDimension: '2d' // multisampled: false,\n\n    }\n  };\n  model.bindGroupTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.obj(model.bindGroupTime, {\n    mtime: 0\n  });\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.get(publicAPI, model, ['bindGroupTime', 'name', 'texture']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.setGet(publicAPI, model, ['bindGroupLayoutEntry', 'sampler']);\n  vtkWebGPUTextureView(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUTextureView$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUTextureView$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/TextureView.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/Types.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/Types.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n\n\n// vtkWebGPUDevice static functions\n//\n// WebGPU uses types in a many places and calls, and often those types\n// need to be associated with byte sizes, alignments, native arrays etc.\n// The folowing methods are designed to help vtk.js introspect those types.\n// WebGPU currently tends to use multiple type formats:\n//  - buffer types such as float32x4\n//  - shader types suchs as vec4<f32>\n//  - texture types such as rgba32float\n// ----------------------------------------------------------------------------\n// see https://gpuweb.github.io/gpuweb/#texture-formats\n// for possible formats, there are a lot of them\n\nvar textureDetails = {\n  // 8-bit formats\n  r8unorm: {\n    numComponents: 1,\n    nativeType: Uint8Array,\n    stride: 1,\n    elementSize: 1\n  },\n  r8snorm: {\n    numComponents: 1,\n    nativeType: Int8Array,\n    stride: 1,\n    elementSize: 1\n  },\n  r8uint: {\n    numComponents: 1,\n    nativeType: Uint8Array,\n    stride: 1,\n    elementSize: 1\n  },\n  r8sint: {\n    numComponents: 1,\n    nativeType: Int8Array,\n    stride: 1,\n    elementSize: 1\n  },\n  // 16-bit formats\n  r16uint: {\n    numComponents: 1,\n    nativeType: Uint16Array,\n    stride: 2,\n    elementSize: 2\n  },\n  r16sint: {\n    numComponents: 1,\n    nativeType: Int16Array,\n    stride: 2,\n    elementSize: 2\n  },\n  r16float: {\n    numComponents: 1,\n    nativeType: Float32Array,\n    stride: 2,\n    elementSize: 2\n  },\n  rg8unorm: {\n    numComponents: 2,\n    nativeType: Uint8Array,\n    stride: 2,\n    elementSize: 1\n  },\n  rg8snorm: {\n    numComponents: 2,\n    nativeType: Int8Array,\n    stride: 2,\n    elementSize: 1\n  },\n  rg8uint: {\n    numComponents: 2,\n    nativeType: Uint8Array,\n    stride: 2,\n    elementSize: 1\n  },\n  rg8sint: {\n    numComponents: 2,\n    nativeType: Int8Array,\n    stride: 2,\n    elementSize: 1\n  },\n  // 32-bit formats\n  r32uint: {\n    numComponents: 1,\n    nativeType: Uint32Array,\n    stride: 4,\n    elementSize: 4\n  },\n  r32sint: {\n    numComponents: 1,\n    nativeType: Int32Array,\n    stride: 4,\n    elementSize: 4\n  },\n  r32float: {\n    numComponents: 1,\n    nativeType: Float32Array,\n    stride: 4,\n    elementSize: 4\n  },\n  rg16uint: {\n    numComponents: 2,\n    nativeType: Uint16Array,\n    stride: 4,\n    elementSize: 2\n  },\n  rg16sint: {\n    numComponents: 2,\n    nativeType: Int16Array,\n    stride: 4,\n    elementSize: 2\n  },\n  rg16float: {\n    numComponents: 2,\n    nativeType: Float32Array,\n    stride: 4,\n    elementSize: 2\n  },\n  rgba8unorm: {\n    numComponents: 4,\n    nativeType: Uint8Array,\n    stride: 4,\n    elementSize: 1\n  },\n  'rgba8unorm-srgb': {\n    numComponents: 4,\n    nativeType: Uint8Array,\n    stride: 4,\n    elementSize: 1\n  },\n  rgba8snorm: {\n    numComponents: 4,\n    nativeType: Int8Array,\n    stride: 4,\n    elementSize: 1\n  },\n  rgba8uint: {\n    numComponents: 4,\n    nativeType: Uint8Array,\n    stride: 4,\n    elementSize: 1\n  },\n  rgba8sint: {\n    numComponents: 4,\n    nativeType: Int8Array,\n    stride: 4,\n    elementSize: 1\n  },\n  bgra8unorm: {\n    numComponents: 4,\n    nativeType: Uint8Array,\n    stride: 4,\n    elementSize: 1\n  },\n  'bgra8unorm-srgb': {\n    numComponents: 4,\n    nativeType: Uint8Array,\n    stride: 4,\n    elementSize: 1\n  },\n  // Packed 32-bit formats\n  rgb9e5ufloat: {\n    numComponents: 4,\n    nativeType: Uint32Array,\n    stride: 4\n  },\n  rgb10a2unorm: {\n    numComponents: 4,\n    nativeType: Uint32Array,\n    stride: 4\n  },\n  rg11b10ufloat: {\n    numComponents: 4,\n    nativeType: Float32Array,\n    stride: 4\n  },\n  // 64-bit formats\n  rg32uint: {\n    numComponents: 2,\n    nativeType: Uint32Array,\n    stride: 8,\n    elementSize: 4\n  },\n  rg32sint: {\n    numComponents: 2,\n    nativeType: Int32Array,\n    stride: 8,\n    elementSize: 4\n  },\n  rg32float: {\n    numComponents: 2,\n    nativeType: Float32Array,\n    stride: 8,\n    elementSize: 4\n  },\n  rgba16uint: {\n    numComponents: 4,\n    nativeType: Uint16Array,\n    stride: 8,\n    elementSize: 2\n  },\n  rgba16sint: {\n    numComponents: 4,\n    nativeType: Int16Array,\n    stride: 8,\n    elementSize: 2\n  },\n  rgba16float: {\n    numComponents: 4,\n    nativeType: Float32Array,\n    stride: 8,\n    elementSize: 2\n  },\n  // 128-bit formats\n  rgba32uint: {\n    numComponents: 4,\n    nativeType: Uint32Array,\n    stride: 16,\n    elementSize: 4\n  },\n  rgba32sint: {\n    numComponents: 4,\n    nativeType: Int32Array,\n    stride: 16,\n    elementSize: 4\n  },\n  rgba32float: {\n    numComponents: 4,\n    nativeType: Float32Array,\n    stride: 16,\n    elementSize: 4\n  },\n  // Depth and stencil formats\n  stencil8: {\n    numComponents: 1,\n    nativeType: Uint8Array,\n    stride: 1,\n    elementSize: 1\n  },\n  depth16unorm: {\n    numComponents: 1,\n    nativeType: Uint16Array,\n    stride: 2,\n    elementSize: 2\n  },\n  depth24plus: {\n    numComponents: 1,\n    nativeType: Uint32Array,\n    stride: 4,\n    elementSize: 3\n  },\n  'depth24plus-stencil8': {\n    numComponents: 2,\n    nativeType: Uint32Array,\n    stride: 4\n  },\n  depth32float: {\n    numComponents: 1,\n    nativeType: Float32Array,\n    stride: 4,\n    elementSize: 4\n  }\n};\n\nfunction getDetailsFromTextureFormat(format) {\n  if (!format || format.length < 6) return 0;\n\n  if (format in textureDetails === true) {\n    return textureDetails[format];\n  }\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkErrorMacro)(\"unknown format \".concat(format));\n  return null;\n} // see https://gpuweb.github.io/gpuweb/#enumdef-gpuvertexformat\n// for possible formats\n\n\nfunction getByteStrideFromBufferFormat(format) {\n  if (!format || format.length < 5) return 0; // options are x2, x3, x4 or nothing\n\n  var numComp = 1;\n\n  if (format[format.length - 2] === 'x') {\n    numComp = format[format.length - 1];\n  }\n\n  var sizeStart = numComp === 1 ? format.length - 1 : format.length - 3; // options are 8, 16, 32 resulting in 8, 6, 2 as the last char\n  // plugged into the formula below gives 1, 2, 4 respectively\n\n  var num = Number(format[sizeStart]);\n\n  if (Number.isNaN(num)) {\n    (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkErrorMacro)(\"unknown format \".concat(format));\n    return 0;\n  }\n\n  var typeSize = 5 - num / 2;\n  return numComp * typeSize;\n} // see https://gpuweb.github.io/gpuweb/#enumdef-gpuvertexformat\n// for possible formats\n\n\nfunction getNumberOfComponentsFromBufferFormat(format) {\n  if (!format || format.length < 5) return 0; // options are x2, x3, x4 or nothing\n\n  var numComp = 1;\n\n  if (format[format.length - 2] === 'x') {\n    numComp = format[format.length - 1];\n  }\n\n  return numComp;\n} // see https://gpuweb.github.io/gpuweb/#enumdef-gpuvertexformat\n// for possible formats\n\n\nfunction getNativeTypeFromBufferFormat(format) {\n  if (!format || format.length < 5) return 0; // raw types are Uint Int or Float as follows\n\n  var result;\n\n  if (format[0] === 'f') {\n    result = 'Float';\n  } else if (format[0] === 's') {\n    result = 'Int';\n  } else if (format[0] === 'u') {\n    result = 'Uint';\n  } else {\n    (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkErrorMacro)(\"unknown format \".concat(format));\n    return undefined;\n  } // options are 8, 16, 32 resulting in 8, 6, 2 as the last char\n  // plugged into the formula below gives 1, 2, 4 respectively\n\n\n  var base = format.split('x')[0];\n  var num = Number(base[base.length - 1]);\n\n  if (Number.isNaN(num)) {\n    (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkErrorMacro)(\"unknown format \".concat(format));\n    return undefined;\n  }\n\n  result += 8 * (5 - num / 2);\n  result += 'Array';\n  return result;\n}\n\nfunction getShaderTypeFromBufferFormat(format) {\n  var dataType;\n\n  if (format[0] === 'f' || format[1] === 'n') {\n    dataType = 'f32';\n  } else if (format[0] === 's' && format[1] === 'i') {\n    dataType = 'i32';\n  } else if (format[0] === 'u' && format[1] === 'i') {\n    dataType = 'u32';\n  } else {\n    (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkErrorMacro)(\"unknown format \".concat(format));\n    return undefined;\n  } // options are x2, x3, x4 or nothing\n\n\n  var numComp = 1;\n\n  if (format[format.length - 2] === 'x') {\n    numComp = Number(format[format.length - 1]);\n  }\n\n  if (numComp === 4) return \"vec4<\".concat(dataType, \">\");\n  if (numComp === 3) return \"vec3<\".concat(dataType, \">\");\n  if (numComp === 2) return \"vec2<\".concat(dataType, \">\");\n  return dataType;\n}\n\nfunction getByteStrideFromShaderFormat(format) {\n  if (!format) return 0;\n  var numComp = 1;\n\n  if (format.substring(0, 3) === 'vec') {\n    numComp = format[3];\n  } else if (format.substring(0, 3) === 'mat') {\n    numComp = format[3] * format[5];\n  }\n\n  var typeSize = 4;\n  return numComp * typeSize;\n}\n\nfunction getNativeTypeFromShaderFormat(format) {\n  if (!format) return undefined;\n  if (format.includes('f32')) return 'Float32Array';\n  if (format.includes('i32')) return 'Int32Array';\n  if (format.includes('u32')) return 'Uint32Array';\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.vtkErrorMacro)(\"unknown format \".concat(format));\n  return undefined;\n}\n\nvar vtkWebGPUTypes = {\n  getDetailsFromTextureFormat: getDetailsFromTextureFormat,\n  getByteStrideFromBufferFormat: getByteStrideFromBufferFormat,\n  getNumberOfComponentsFromBufferFormat: getNumberOfComponentsFromBufferFormat,\n  getNativeTypeFromBufferFormat: getNativeTypeFromBufferFormat,\n  getShaderTypeFromBufferFormat: getShaderTypeFromBufferFormat,\n  getByteStrideFromShaderFormat: getByteStrideFromShaderFormat,\n  getNativeTypeFromShaderFormat: getNativeTypeFromShaderFormat\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUTypes);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/Types.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/UniformBuffer.js":
/*!************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/UniformBuffer.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _BufferManager_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BufferManager.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager.js\");\n/* harmony import */ var _Types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Types.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Types.js\");\n\n\n\n\n\nvar BufferUsage = _BufferManager_js__WEBPACK_IMPORTED_MODULE_2__.default.BufferUsage;\nvar vtkErrorMacro = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.vtkErrorMacro; // ----------------------------------------------------------------------------\n// vtkWebGPUUniformBuffer methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUUniformBuffer(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUUniformBuffer');\n\n  publicAPI.addEntry = function (name, type) {\n    if (model._bufferEntryNames.has(name)) {\n      vtkErrorMacro(\"entry named \".concat(name, \" already exists\"));\n      return;\n    }\n\n    model.sortDirty = true;\n\n    model._bufferEntryNames.set(name, model.bufferEntries.length);\n\n    model.bufferEntries.push({\n      name: name,\n      type: type,\n      sizeInBytes: _Types_js__WEBPACK_IMPORTED_MODULE_3__.default.getByteStrideFromShaderFormat(type),\n      offset: -1,\n      nativeType: _Types_js__WEBPACK_IMPORTED_MODULE_3__.default.getNativeTypeFromShaderFormat(type),\n      packed: false\n    });\n  }; // UBOs have layout rules in terms of how memory is aligned so we\n  // have to be careful how we order the entries. For example a vec4<f32>\n  // must be aligned on a 16 byte offset, etc. See\n  // https://gpuweb.github.io/gpuweb/wgsl/#memory-layouts\n  // for more details. Right now you can create a situation that would fail\n  // in the future we could add dummy spacer entries where needed to\n  // handle alignment issues\n\n\n  publicAPI.sortBufferEntries = function () {\n    if (!model.sortDirty) {\n      return;\n    }\n\n    var currOffset = 0;\n    var newEntries = []; // pack anything whose size is a multiple of 16 bytes first\n    // this includes a couple types that don't require 16 byte alignment\n    // such as mat2x2<f32> but that is OK\n\n    for (var i = 0; i < model.bufferEntries.length; i++) {\n      var entry = model.bufferEntries[i];\n\n      if (entry.packed === false && entry.sizeInBytes % 16 === 0) {\n        entry.packed = true;\n        entry.offset = currOffset;\n        newEntries.push(entry);\n        currOffset += entry.sizeInBytes;\n      }\n    } // now it gets tough, we have the following common types (f32, i32, u32)\n    // - vec2<f32> 8 byte size, 8 byte alignment\n    // - vec3<f32> 12 byte size, 16 byte alignment\n    // - f32 4 byte size, 4 byte alignment\n    // try adding 12 byte, 4 byte pairs\n\n\n    for (var _i = 0; _i < model.bufferEntries.length; _i++) {\n      var _entry = model.bufferEntries[_i];\n\n      if (_entry.packed === false && _entry.sizeInBytes === 12) {\n        for (var i2 = 0; i2 < model.bufferEntries.length; i2++) {\n          var entry2 = model.bufferEntries[i2];\n\n          if (entry2.packed === false && entry2.sizeInBytes === 4) {\n            _entry.packed = true;\n            _entry.offset = currOffset;\n            newEntries.push(_entry);\n            currOffset += _entry.sizeInBytes;\n            entry2.packed = true;\n            entry2.offset = currOffset;\n            newEntries.push(entry2);\n            currOffset += entry2.sizeInBytes;\n            break;\n          }\n        }\n      }\n    } // try adding 8 byte, 8 byte pairs\n\n\n    for (var _i2 = 0; _i2 < model.bufferEntries.length; _i2++) {\n      var _entry2 = model.bufferEntries[_i2];\n\n      if (!_entry2.packed && _entry2.sizeInBytes % 8 === 0) {\n        for (var _i3 = _i2 + 1; _i3 < model.bufferEntries.length; _i3++) {\n          var _entry3 = model.bufferEntries[_i3];\n\n          if (!_entry3.packed && _entry3.sizeInBytes % 8 === 0) {\n            _entry2.packed = true;\n            _entry2.offset = currOffset;\n            newEntries.push(_entry2);\n            currOffset += _entry2.sizeInBytes;\n            _entry3.packed = true;\n            _entry3.offset = currOffset;\n            newEntries.push(_entry3);\n            currOffset += _entry3.sizeInBytes;\n            break;\n          }\n        }\n      }\n    } // try adding 8 byte, 4 byte 4 byte triplets\n\n\n    for (var _i4 = 0; _i4 < model.bufferEntries.length; _i4++) {\n      var _entry4 = model.bufferEntries[_i4];\n\n      if (!_entry4.packed && _entry4.sizeInBytes % 8 === 0) {\n        var found = false;\n\n        for (var _i5 = 0; !found && _i5 < model.bufferEntries.length; _i5++) {\n          var _entry5 = model.bufferEntries[_i5];\n\n          if (!_entry5.packed && _entry5.sizeInBytes === 4) {\n            for (var i3 = _i5 + 1; i3 < model.bufferEntries.length; i3++) {\n              var entry3 = model.bufferEntries[i3];\n\n              if (!entry3.packed && entry3.sizeInBytes === 4) {\n                _entry4.packed = true;\n                _entry4.offset = currOffset;\n                newEntries.push(_entry4);\n                currOffset += _entry4.sizeInBytes;\n                _entry5.packed = true;\n                _entry5.offset = currOffset;\n                newEntries.push(_entry5);\n                currOffset += _entry5.sizeInBytes;\n                entry3.packed = true;\n                entry3.offset = currOffset;\n                newEntries.push(entry3);\n                currOffset += entry3.sizeInBytes;\n                found = true;\n                break;\n              }\n            }\n          }\n        }\n      }\n    } // Add anything remaining that is larger than 4 bytes and hope we get lucky.\n    // Likely if there is more than one item added here it will result\n    // in a failed UBO\n\n\n    for (var _i6 = 0; _i6 < model.bufferEntries.length; _i6++) {\n      var _entry6 = model.bufferEntries[_i6];\n\n      if (!_entry6.packed && _entry6.sizeInBytes > 4) {\n        _entry6.packed = true;\n        _entry6.offset = currOffset;\n        newEntries.push(_entry6);\n        currOffset += _entry6.sizeInBytes;\n      }\n    } // finally add remaining 4 byte items\n\n\n    for (var _i7 = 0; _i7 < model.bufferEntries.length; _i7++) {\n      var _entry7 = model.bufferEntries[_i7];\n\n      if (!_entry7.packed) {\n        _entry7.packed = true;\n        _entry7.offset = currOffset;\n        newEntries.push(_entry7);\n        currOffset += _entry7.sizeInBytes;\n      }\n    } // update entries and entryNames\n\n\n    model.bufferEntries = newEntries;\n\n    model._bufferEntryNames.clear();\n\n    for (var _i8 = 0; _i8 < model.bufferEntries.length; _i8++) {\n      model._bufferEntryNames.set(model.bufferEntries[_i8].name, _i8);\n    }\n\n    model.sizeInBytes = currOffset;\n    model.sortDirty = false;\n  };\n\n  publicAPI.sendIfNeeded = function (device) {\n    if (!model.UBO) {\n      var req = {\n        nativeArray: model.Float32Array,\n        time: 0,\n        usage: BufferUsage.UniformArray\n      };\n      model.UBO = device.getBufferManager().getBuffer(req);\n      model.bindGroupTime.modified();\n      model.sendDirty = false;\n    } // send data down if needed\n\n\n    if (model.sendDirty) {\n      device.getHandle().queue.writeBuffer(model.UBO.getHandle(), 0, model.arrayBuffer, 0, model.sizeInBytes);\n      model.sendDirty = false;\n    } // always updated as mappers depend on this time\n    // it is more of a sentIfNeededTime\n\n\n    model.sendTime.modified();\n  };\n\n  publicAPI.createView = function (type) {\n    if (type in model === false) {\n      if (!model.arrayBuffer) {\n        model.arrayBuffer = new ArrayBuffer(model.sizeInBytes);\n      }\n\n      model[type] = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newTypedArray(type, model.arrayBuffer);\n    }\n  };\n\n  publicAPI.setValue = function (name, val) {\n    publicAPI.sortBufferEntries();\n\n    var idx = model._bufferEntryNames.get(name);\n\n    if (idx === undefined) {\n      vtkErrorMacro(\"entry named \".concat(name, \" not found in UBO\"));\n      return;\n    }\n\n    var entry = model.bufferEntries[idx];\n    publicAPI.createView(entry.nativeType);\n    var view = model[entry.nativeType];\n\n    if (entry.lastValue !== val) {\n      view[entry.offset / view.BYTES_PER_ELEMENT] = val;\n      model.sendDirty = true;\n    }\n\n    entry.lastValue = val;\n  };\n\n  publicAPI.setArray = function (name, arr) {\n    publicAPI.sortBufferEntries();\n\n    var idx = model._bufferEntryNames.get(name);\n\n    if (idx === undefined) {\n      vtkErrorMacro(\"entry named \".concat(name, \" not found in UBO\"));\n      return;\n    }\n\n    var entry = model.bufferEntries[idx];\n    publicAPI.createView(entry.nativeType);\n    var view = model[entry.nativeType];\n    var changed = false;\n\n    for (var i = 0; i < arr.length; i++) {\n      if (!entry.lastValue || entry.lastValue[i] !== arr[i]) {\n        view[entry.offset / view.BYTES_PER_ELEMENT + i] = arr[i];\n        changed = true;\n      }\n    }\n\n    if (changed) {\n      model.sendDirty = true;\n      entry.lastValue = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(arr);\n    }\n  };\n\n  publicAPI.getBindGroupEntry = function () {\n    var foo = {\n      resource: {\n        buffer: model.UBO.getHandle()\n      }\n    };\n    return foo;\n  };\n\n  publicAPI.getSendTime = function () {\n    return model.sendTime.getMTime();\n  };\n\n  publicAPI.getShaderCode = function (binding, group) {\n    // sort the entries\n    publicAPI.sortBufferEntries();\n    var lines = [\"[[block]] struct \".concat(model.name, \"Struct\\n{\")];\n\n    for (var i = 0; i < model.bufferEntries.length; i++) {\n      var entry = model.bufferEntries[i];\n      lines.push(\"  \".concat(entry.name, \": \").concat(entry.type, \";\"));\n    }\n\n    lines.push(\"};\\n[[binding(\".concat(binding, \"), group(\").concat(group, \")]] var<uniform> \").concat(model.name, \": \").concat(model.name, \"Struct;\"));\n    return lines.join('\\n');\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  bufferEntries: null,\n  bufferEntryNames: null,\n  sizeInBytes: 0,\n  name: null,\n  bindGroupLayoutEntry: null,\n  bindGroupEntry: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(publicAPI, model); // Internal objects\n\n  model._bufferEntryNames = new Map();\n  model.bufferEntries = []; // default UBO desc\n\n  model.bindGroupLayoutEntry = model.bindGroupLayoutEntry || {\n    buffer: {\n      type: 'uniform'\n    }\n  };\n  model.sendTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(model.sendTime, {\n    mtime: 0\n  });\n  model.bindGroupTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(model.bindGroupTime, {\n    mtime: 0\n  });\n  model.sendDirty = true;\n  model.sortDirty = true;\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.get(publicAPI, model, ['binding', 'bindGroupTime']);\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['bindGroupLayoutEntry', 'device', 'name', 'sizeInBytes']); // Object methods\n\n  vtkWebGPUUniformBuffer(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkWebGPUUniformBuffer'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUUniformBuffer$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUUniformBuffer$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/UniformBuffer.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/VertexInput.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/VertexInput.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Types.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Types.js\");\n\n\n\nfunction arraysEqual(a, b) {\n  if (a === b) return true;\n  if (a == null || b == null) return false;\n  if (a.length !== b.length) return false;\n\n  for (var i = 0; i < a.length; ++i) {\n    if (!b.includes(a[i])) return false;\n  }\n\n  return true;\n} // ----------------------------------------------------------------------------\n// vtkWebGPUVertexInput methods\n// ----------------------------------------------------------------------------\n\n\nfunction vtkWebGPUVertexInput(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUVertexInput');\n\n  publicAPI.addBuffer = function (buffer, inames) {\n    var stepMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'vertex';\n    var names = inames;\n\n    if (!Array.isArray(names)) {\n      names = [names];\n    } // only add if it is a new setting\n\n\n    for (var i = 0; i < model.inputs.length; i++) {\n      if (arraysEqual(model.inputs[i].names, names)) {\n        if (model.inputs[i].buffer === buffer) {\n          return;\n        }\n\n        model.inputs[i].buffer = buffer;\n        return;\n      }\n    } // when adding a new entry, make sure we sort the array\n    // as the order is important to the shader and must always\n    // be the same, so alphabetical is an easy option\n\n\n    model.inputs.push({\n      buffer: buffer,\n      stepMode: stepMode,\n      names: names\n    });\n    model.inputs = model.inputs.sort(function (v1, v2) {\n      if (v1.names[0] < v2.names[0]) {\n        return -1;\n      }\n\n      if (v1.names[0] > v2.names[0]) {\n        return 1;\n      }\n\n      return 0;\n    });\n  };\n\n  publicAPI.removeBufferIfPresent = function (name) {\n    for (var i = 0; i < model.inputs.length; i++) {\n      if (model.inputs[i].names.includes(name)) {\n        model.inputs.splice(i, 1);\n      }\n    }\n  };\n\n  publicAPI.getBuffer = function (name) {\n    for (var i = 0; i < model.inputs.length; i++) {\n      if (model.inputs[i].names.includes(name)) {\n        return model.inputs[i].buffer;\n      }\n    }\n\n    return null;\n  };\n\n  publicAPI.hasAttribute = function (name) {\n    for (var i = 0; i < model.inputs.length; i++) {\n      if (model.inputs[i].names.includes(name)) {\n        return true;\n      }\n    }\n\n    return false;\n  };\n\n  publicAPI.getAttributeTime = function (name) {\n    for (var i = 0; i < model.inputs.length; i++) {\n      if (model.inputs[i].names.includes(name)) {\n        return model.inputs[i].buffer.getSourceTime();\n      }\n    }\n\n    return 0;\n  };\n\n  publicAPI.getShaderCode = function () {\n    var result = '';\n    var nameCount = 0;\n\n    for (var i = 0; i < model.inputs.length; i++) {\n      for (var nm = 0; nm < model.inputs[i].names.length; nm++) {\n        var arrayInfo = model.inputs[i].buffer.getArrayInformation()[nm];\n        var type = _Types_js__WEBPACK_IMPORTED_MODULE_1__.default.getShaderTypeFromBufferFormat(arrayInfo.format);\n\n        if (nameCount > 0) {\n          result += ',\\n';\n        }\n\n        result = \"\".concat(result, \"  [[location(\").concat(nameCount, \")]] \").concat(model.inputs[i].names[nm], \" : \").concat(type);\n        nameCount++;\n      }\n    }\n\n    return result;\n  };\n\n  publicAPI.getVertexInputInformation = function () {\n    var info = {};\n\n    if (model.inputs.length) {\n      var vertexBuffers = [];\n      var nameCount = 0;\n\n      for (var i = 0; i < model.inputs.length; i++) {\n        var buf = model.inputs[i].buffer;\n        var buffer = {\n          arrayStride: buf.getStrideInBytes(),\n          stepMode: model.inputs[i].stepMode,\n          attributes: []\n        };\n        var arrayInfo = buf.getArrayInformation();\n\n        for (var nm = 0; nm < model.inputs[i].names.length; nm++) {\n          buffer.attributes.push({\n            shaderLocation: nameCount,\n            offset: arrayInfo[nm].offset,\n            format: arrayInfo[nm].format\n          });\n          nameCount++;\n        }\n\n        vertexBuffers.push(buffer);\n      }\n\n      info.buffers = vertexBuffers;\n    }\n\n    return info;\n  };\n\n  publicAPI.bindBuffers = function (renderEncoder) {\n    for (var i = 0; i < model.inputs.length; i++) {\n      renderEncoder.setVertexBuffer(i, model.inputs[i].buffer.getHandle());\n    }\n  };\n\n  publicAPI.getReady = function () {};\n\n  publicAPI.releaseGraphicsResources = function () {\n    if (model.created) {\n      model.inputs = [];\n      model.bindingDescriptions = [];\n      model.attributeDescriptions = [];\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  inputs: null,\n  bindingDescriptions: false,\n  attributeDescriptions: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.obj)(publicAPI, model);\n  model.bindingDescriptions = [];\n  model.attributeDescriptions = [];\n  model.inputs = [];\n  (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.setGet)(publicAPI, model, ['created', 'device', 'handle']); // For more macro methods, see \"Sources/macro.js\"\n  // Object specific methods\n\n  vtkWebGPUVertexInput(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = (0,_macro_js__WEBPACK_IMPORTED_MODULE_0__.newInstance)(extend, 'vtkWebGPUVertexInput'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUVertexInput$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUVertexInput$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/VertexInput.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/ViewNodeFactory.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/ViewNodeFactory.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance),\n/* harmony export */   \"registerOverride\": () => (/* binding */ registerOverride)\n/* harmony export */ });\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _SceneGraph_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SceneGraph/ViewNodeFactory.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/ViewNodeFactory.js\");\n\n\n\nvar CLASS_MAPPING = Object.create(null);\nfunction registerOverride(className, fn) {\n  CLASS_MAPPING[className] = fn;\n} // ----------------------------------------------------------------------------\n// vtkWebGPUViewNodeFactory methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUViewNodeFactory(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUViewNodeFactory');\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Static class mapping shared across instances\n\n  model.overrides = CLASS_MAPPING; // Inheritance\n\n  _SceneGraph_ViewNodeFactory_js__WEBPACK_IMPORTED_MODULE_1__.default.extend(publicAPI, model, initialValues); // Object methods\n\n  vtkWebGPUViewNodeFactory(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_0__.default.newInstance(extend, 'vtkWebGPUViewNodeFactory'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUViewNodeFactory$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUViewNodeFactory$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/ViewNodeFactory.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/VolumePass.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/VolumePass.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/DataModel/PolyData.js */ \"./node_modules/@kitware/vtk.js/Common/DataModel/PolyData.js\");\n/* harmony import */ var _Core_Property_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Core/Property.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Property.js\");\n/* harmony import */ var _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../SceneGraph/RenderPass.js */ \"./node_modules/@kitware/vtk.js/Rendering/SceneGraph/RenderPass.js\");\n/* harmony import */ var _BufferManager_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BufferManager.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/BufferManager.js\");\n/* harmony import */ var _MapperHelper_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MapperHelper.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/MapperHelper.js\");\n/* harmony import */ var _RenderEncoder_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./RenderEncoder.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/RenderEncoder.js\");\n/* harmony import */ var _ShaderCache_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ShaderCache.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js\");\n/* harmony import */ var _Texture_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Texture.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Texture.js\");\n/* harmony import */ var _VolumePassFSQ_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./VolumePassFSQ.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/VolumePassFSQ.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nvar Representation = _Core_Property_js__WEBPACK_IMPORTED_MODULE_3__.default.Representation;\nvar BufferUsage = _BufferManager_js__WEBPACK_IMPORTED_MODULE_5__.default.BufferUsage,\n    PrimitiveTypes = _BufferManager_js__WEBPACK_IMPORTED_MODULE_5__.default.PrimitiveTypes; // The volume rendering pass consists of two sub passes. The first\n// (depthRange) renders polygonal cubes for the volumes to compute min and\n// max bounds in depth for the image. This is then fed into the second pass\n// (final) which actually does the raycasting between those bounds sampling\n// the volumes along the way. So the first pass tends to be very fast whicle\n// the second is where most of the work is done.\n// given x then y then z ordering\n//\n//     2-----3\n//   / |   / |\n//  6-----7  |\n//  |  |  |  |\n//  |  0-----1\n//  |/    |/\n//  4-----5\n//\n\nvar cubeFaceTriangles = [[0, 4, 6], [0, 6, 2], [1, 3, 7], [1, 7, 5], [0, 5, 4], [0, 1, 5], [2, 6, 7], [2, 7, 3], [0, 3, 1], [0, 2, 3], [4, 5, 7], [4, 7, 6]];\nvar DepthBoundsFS = \"\\n//VTK::Renderer::Dec\\n\\n//VTK::Select::Dec\\n\\n//VTK::VolumePass::Dec\\n\\n//VTK::TCoord::Dec\\n\\n//VTK::RenderEncoder::Dec\\n\\n//VTK::Mapper::Dec\\n\\n//VTK::IOStructs::Dec\\n\\n[[stage(fragment)]]\\nfn main(\\n//VTK::IOStructs::Input\\n)\\n//VTK::IOStructs::Output\\n{\\n  var output : fragmentOutput;\\n\\n  //VTK::Select::Impl\\n\\n  //VTK::TCoord::Impl\\n\\n  //VTK::VolumePass::Impl\\n\\n  // use the minimum (closest) of the current value and the zbuffer\\n  // the blend func will then take the max to find the farthest stop value\\n  var stopval: f32 = min(input.fragPos.z, textureLoad(opaquePassDepthTexture, vec2<i32>(i32(input.fragPos.x), i32(input.fragPos.y)), 0).r);\\n\\n  //VTK::RenderEncoder::Impl\\n  return output;\\n}\\n\";\n/* eslint-disable no-undef */\n\n/* eslint-disable no-bitwise */\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUVolumePass(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUVolumePass');\n\n  publicAPI.traverse = function (renNode, viewNode) {\n    if (model.deleted) {\n      return;\n    } // we just render our delegates in order\n\n\n    model.currentParent = viewNode; // first render the boxes to generate a min max depth\n    // map for all the volumes\n\n    publicAPI.renderDepthBounds(renNode, viewNode); // then perform the ray casting using the depth bounds texture\n\n    if (!model.finalEncoder) {\n      publicAPI.createFinalEncoder(viewNode);\n    }\n\n    publicAPI.finalPass(viewNode, renNode);\n  };\n\n  publicAPI.finalPass = function (viewNode, renNode) {\n    model.finalEncoder.setColorTextureView(0, model.colorTextureView);\n    model.finalEncoder.attachTextureViews();\n    renNode.setRenderEncoder(model.finalEncoder);\n    model.finalEncoder.begin(viewNode.getCommandEncoder());\n    renNode.scissorAndViewport(model.finalEncoder);\n    model.fullScreenQuad.setWebGPURenderer(renNode);\n    model.fullScreenQuad.setVolumes(model.volumes);\n    model.fullScreenQuad.render(model.finalEncoder, viewNode.getDevice());\n    model.finalEncoder.end();\n  };\n\n  publicAPI.renderDepthBounds = function (renNode, viewNode) {\n    publicAPI.updateDepthPolyData(renNode);\n    var pd = model._boundsPoly;\n    var cells = pd.getPolys();\n    var hash = cells.getMTime(); // points\n\n    var points = pd.getPoints();\n    var buffRequest = {\n      hash: hash + points.getMTime(),\n      dataArray: points,\n      source: points,\n      cells: cells,\n      primitiveType: PrimitiveTypes.Triangles,\n      representation: Representation.SURFACE,\n      time: Math.max(points.getMTime(), cells.getMTime()),\n      usage: BufferUsage.PointArray,\n      format: 'float32x4',\n      packExtra: true\n    };\n    var buff = viewNode.getDevice().getBufferManager().getBuffer(buffRequest);\n\n    model._mapper.getVertexInput().addBuffer(buff, ['vertexBC']);\n\n    model._mapper.setNumberOfVertices(buff.getSizeInBytes() / buff.getStrideInBytes());\n\n    publicAPI.drawDepthRange(renNode, viewNode);\n  };\n\n  publicAPI.updateDepthPolyData = function (renNode) {\n    // check mtimes first\n    var update = false;\n\n    for (var i = 0; i < model.volumes.length; i++) {\n      var mtime = model.volumes[i].getMTime();\n\n      if (!model._lastMTimes[i] || mtime !== model._lastMTimes[i]) {\n        update = true;\n        model._lastMTimes[i] = mtime;\n      }\n    } // also check stabilized time\n\n\n    var stime = renNode.getStabilizedTime();\n\n    if (!model._lastMTimes[model.volumes.length] || stime !== model._lastMTimes[model.volumes.length]) {\n      update = true;\n      model._lastMTimes[model.volumes.length] = stime;\n    } // if no need to update then return\n\n\n    if (!update) {\n      return;\n    } // rebuild\n\n\n    var center = renNode.getStabilizedCenterByReference();\n    var numPts = model.volumes.length * 8;\n    var points = new Float64Array(numPts * 3);\n    var numTris = model.volumes.length * 12;\n    var polys = new Uint16Array(numTris * 4); // add points and cells\n\n    for (var _i = 0; _i < model.volumes.length; _i++) {\n      model.volumes[_i].getBoundingCubePoints(points, _i * 24);\n\n      var cellIdx = _i * 12 * 4;\n      var offset = _i * 8;\n\n      for (var t = 0; t < 12; t++) {\n        polys[cellIdx++] = 3;\n        polys[cellIdx++] = offset + cubeFaceTriangles[t][0];\n        polys[cellIdx++] = offset + cubeFaceTriangles[t][1];\n        polys[cellIdx++] = offset + cubeFaceTriangles[t][2];\n      }\n    }\n\n    for (var p = 0; p < points.length; p += 3) {\n      points[p] -= center[0];\n      points[p + 1] -= center[1];\n      points[p + 2] -= center[2];\n    }\n\n    model._boundsPoly.getPoints().setData(points, 3);\n\n    model._boundsPoly.getPoints().modified();\n\n    model._boundsPoly.getPolys().setData(polys, 1);\n\n    model._boundsPoly.getPolys().modified();\n\n    model._boundsPoly.modified();\n  };\n\n  publicAPI.drawDepthRange = function (renNode, viewNode) {\n    var device = viewNode.getDevice(); // copy current depth buffer to\n\n    if (!model.depthRangeEncoder) {\n      publicAPI.createDepthRangeEncoder();\n      model.depthRangeTexture = _Texture_js__WEBPACK_IMPORTED_MODULE_9__.default.newInstance();\n      model.depthRangeTexture.create(device, {\n        width: viewNode.getCanvas().width,\n        height: viewNode.getCanvas().height,\n        format: 'r16float',\n        usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.SAMPLED\n      });\n      var maxView = model.depthRangeTexture.createView();\n      maxView.setName('maxTexture');\n      model.depthRangeEncoder.setColorTextureView(0, maxView);\n      model.depthRangeTexture2 = _Texture_js__WEBPACK_IMPORTED_MODULE_9__.default.newInstance();\n      model.depthRangeTexture2.create(device, {\n        width: viewNode.getCanvas().width,\n        height: viewNode.getCanvas().height,\n        format: 'r16float',\n        usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.SAMPLED\n      });\n      var minView = model.depthRangeTexture2.createView();\n      minView.setName('minTexture');\n      model.depthRangeEncoder.setColorTextureView(1, minView);\n\n      model._mapper.setDevice(viewNode.getDevice());\n\n      model._mapper.setTextureViews([model.depthTextureView]);\n    } else {\n      model.depthRangeTexture.resizeToMatch(model.colorTextureView.getTexture());\n      model.depthRangeTexture2.resizeToMatch(model.colorTextureView.getTexture());\n    }\n\n    model.depthRangeEncoder.attachTextureViews();\n    publicAPI.setCurrentOperation('volumeDepthRangePass');\n    renNode.setRenderEncoder(model.depthRangeEncoder);\n    renNode.volumeDepthRangePass(true);\n\n    model._mapper.setWebGPURenderer(renNode);\n\n    model._mapper.build(model.depthRangeEncoder, device);\n\n    model._mapper.registerToDraw();\n\n    renNode.volumeDepthRangePass(false);\n  };\n\n  publicAPI.createDepthRangeEncoder = function () {\n    model.depthRangeEncoder = _RenderEncoder_js__WEBPACK_IMPORTED_MODULE_7__.default.newInstance();\n    model.depthRangeEncoder.setPipelineHash('volr');\n    model.depthRangeEncoder.setReplaceShaderCodeFunction(function (pipeline) {\n      var fDesc = pipeline.getShaderDescription('fragment');\n      fDesc.addOutput('vec4<f32>', 'outColor1');\n      fDesc.addOutput('vec4<f32>', 'outColor2');\n      var code = fDesc.getCode();\n      code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_8__.default.substitute(code, '//VTK::RenderEncoder::Impl', ['output.outColor1 = vec4<f32>(stopval, 0.0, 0.0, 0.0);', 'output.outColor2 = vec4<f32>(input.fragPos.z, 0.0, 0.0, 0.0);']).result;\n      fDesc.setCode(code);\n    });\n    model.depthRangeEncoder.setDescription({\n      colorAttachments: [{\n        view: null,\n        loadValue: [0.0, 0.0, 0.0, 0.0],\n        storeOp: 'store'\n      }, {\n        view: null,\n        loadValue: [1.0, 1.0, 1.0, 1.0],\n        storeOp: 'store'\n      }]\n    });\n    model.depthRangeEncoder.setPipelineSettings({\n      primitive: {\n        cullMode: 'none'\n      },\n      fragment: {\n        targets: [{\n          format: 'r16float',\n          blend: {\n            color: {\n              srcFactor: 'one',\n              dstFactor: 'one',\n              operation: 'max'\n            },\n            alpha: {\n              srcfactor: 'one',\n              dstFactor: 'one',\n              operation: 'max'\n            }\n          }\n        }, {\n          format: 'r16float',\n          blend: {\n            color: {\n              srcFactor: 'one',\n              dstFactor: 'one',\n              operation: 'min'\n            },\n            alpha: {\n              srcfactor: 'one',\n              dstFactor: 'one',\n              operation: 'min'\n            }\n          }\n        }]\n      }\n    });\n  };\n\n  publicAPI.createFinalEncoder = function (viewNode) {\n    model.fullScreenQuad = _VolumePassFSQ_js__WEBPACK_IMPORTED_MODULE_10__.default.newInstance();\n    model.fullScreenQuad.setDevice(viewNode.getDevice());\n    model.fullScreenQuad.setTextureViews((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(model.depthRangeEncoder.getColorTextureViews()));\n    model.finalEncoder = _RenderEncoder_js__WEBPACK_IMPORTED_MODULE_7__.default.newInstance();\n    model.finalEncoder.setDescription({\n      colorAttachments: [{\n        view: null,\n        loadValue: 'load',\n        storeOp: 'store'\n      }]\n    });\n    model.finalEncoder.setReplaceShaderCodeFunction(function (pipeline) {\n      var fDesc = pipeline.getShaderDescription('fragment');\n      fDesc.addOutput('vec4<f32>', 'outColor');\n      var code = fDesc.getCode();\n      code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_8__.default.substitute(code, '//VTK::RenderEncoder::Impl', ['output.outColor = vec4<f32>(computedColor.rgb*computedColor.a, computedColor.a);']).result;\n      fDesc.setCode(code);\n    });\n    model.finalEncoder.setPipelineHash('volpf');\n    model.finalEncoder.setPipelineSettings({\n      primitive: {\n        cullMode: 'none'\n      },\n      fragment: {\n        targets: [{\n          format: 'bgra8unorm',\n          blend: {\n            color: {\n              srcFactor: 'one',\n              dstFactor: 'one-minus-src-alpha'\n            },\n            alpha: {\n              srcfactor: 'one',\n              dstFactor: 'one-minus-src-alpha'\n            }\n          }\n        }]\n      }\n    });\n  }; // marks modified when needed\n\n\n  publicAPI.setVolumes = function (val) {\n    if (!model.volumes || model.volumes.length !== val.length) {\n      model.volumes = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(val);\n      publicAPI.modified();\n      return;\n    }\n\n    for (var i = 0; i < val.length; i++) {\n      if (val[i] !== model.volumes[i]) {\n        model.volumes = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(val);\n        publicAPI.modified();\n        return;\n      }\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  colorTextureView: null,\n  depthTextureView: null,\n  volumes: null\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API\n\n  _SceneGraph_RenderPass_js__WEBPACK_IMPORTED_MODULE_4__.default.extend(publicAPI, model, initialValues);\n  model._mapper = _MapperHelper_js__WEBPACK_IMPORTED_MODULE_6__.default.newInstance();\n\n  model._mapper.setFragmentShaderTemplate(DepthBoundsFS);\n\n  model._mapper.getShaderReplacements().set('replaceShaderVolumePass', function (hash, pipeline, vertexInput) {\n    var fDesc = pipeline.getShaderDescription('fragment');\n    fDesc.addBuiltinInput('vec4<f32>', '[[builtin(position)]] fragPos');\n  });\n\n  model._boundsPoly = _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n  model._lastMTimes = [];\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.setGet(publicAPI, model, ['colorTextureView', 'depthTextureView']); // Object methods\n\n  vtkWebGPUVolumePass(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkWebGPUVolumePass'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUVolumePass$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUVolumePass$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/VolumePass.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/Rendering/WebGPU/VolumePassFSQ.js":
/*!************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/Rendering/WebGPU/VolumePassFSQ.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"extend\": () => (/* binding */ extend),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _macro_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../macro.js */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _FullScreenQuad_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FullScreenQuad.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/FullScreenQuad.js\");\n/* harmony import */ var _UniformBuffer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./UniformBuffer.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/UniformBuffer.js\");\n/* harmony import */ var _ShaderCache_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ShaderCache.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/ShaderCache.js\");\n/* harmony import */ var _StorageBuffer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./StorageBuffer.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/StorageBuffer.js\");\n/* harmony import */ var _Sampler_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Sampler.js */ \"./node_modules/@kitware/vtk.js/Rendering/WebGPU/Sampler.js\");\n/* harmony import */ var _Core_VolumeMapper_Constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Core/VolumeMapper/Constants.js */ \"./node_modules/@kitware/vtk.js/Rendering/Core/VolumeMapper/Constants.js\");\n/* harmony import */ var _vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../vendor/gl-matrix/esm/mat4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js\");\n\n\n\n\n\n\n\n\n\n\nvar volFragTemplate = \"\\n//VTK::Renderer::Dec\\n\\n//VTK::Mapper::Dec\\n\\n//VTK::TCoord::Dec\\n\\n//VTK::RenderEncoder::Dec\\n\\n//VTK::IOStructs::Dec\\n\\n// dummy for now till they support 3d textures\\nfn getTextureValue(vTex: texture_3d<f32>, tpos: vec4<f32>, vNum: i32) -> f32\\n{\\n  return textureSampleLevel(vTex, clampSampler, tpos.xyz, 0.0).a;\\n  // 512.0 * f32(vNum) + 20.0 * trunc(10.0 * tpos.z);\\n}\\n\\nfn getGradient(vTex: texture_3d<f32>, tpos: vec4<f32>, vNum: i32, scalar: f32) -> vec4<f32>\\n{\\n  var result: vec4<f32>;\\n\\n  var tstep: vec4<f32> = volumeSSBO.values[vNum].tstep;\\n  result.x = getTextureValue(vTex, tpos + vec4<f32>(tstep.x, 0.0, 0.0, 1.0), vNum) - scalar;\\n  result.y = getTextureValue(vTex, tpos + vec4<f32>(0.0, tstep.y, 0.0, 1.0), vNum) - scalar;\\n  result.z = getTextureValue(vTex, tpos + vec4<f32>(0.0, 0.0, tstep.z, 1.0), vNum) - scalar;\\n\\n  // divide by spacing\\n  result = result / volumeSSBO.values[vNum].spacing;\\n\\n  var grad: f32 = length(result.xyz);\\n\\n  // // rotate to View Coords\\n  // result.xyz =\\n  //   result.x * vPlaneNormal0 +\\n  //   result.y * vPlaneNormal2 +\\n  //   result.z * vPlaneNormal4;\\n\\n  if (grad > 0.0)\\n  {\\n    result = result * (1.0 / grad);\\n  }\\n\\n  result.w = grad;\\n\\n  return result;\\n}\\n\\nfn processVolume(vTex: texture_3d<f32>, vNum: i32, cNum: i32, posSC: vec4<f32>, tfunRows: f32) -> vec4<f32>\\n{\\n  var outColor: vec4<f32> = vec4<f32>(0.0, 0.0, 0.0, 0.0);\\n\\n  // convert to tcoords and reject if outside the volume\\n  var tpos: vec4<f32> = volumeSSBO.values[vNum].SCTCMatrix*posSC;\\n  // var tpos: vec4<f32> = posSC*0.003;\\n  if (tpos.x < 0.0 || tpos.y < 0.0 || tpos.z < 0.0 ||\\n      tpos.x > 1.0 || tpos.y > 1.0 || tpos.z > 1.0) { return outColor; }\\n\\n  var scalar: f32 = getTextureValue(vTex, tpos, vNum);\\n\\n  var coord: vec2<f32> =\\n    vec2<f32>(scalar * componentSSBO.values[cNum].cScale + componentSSBO.values[cNum].cShift,\\n      (0.5 + 2.0 * f32(vNum)) / tfunRows);\\n  var color: vec4<f32> = textureSampleLevel(tfunTexture, clampSampler, coord, 0.0);\\n  coord.x = scalar * componentSSBO.values[cNum].oScale + componentSSBO.values[cNum].oShift;\\n\\n  var gofactor: f32 = 1.0;\\n  if (componentSSBO.values[cNum].gomin <  1.0)\\n  {\\n    var normal: vec4<f32> = getGradient(vTex, tpos, vNum, scalar);\\n    gofactor = clamp(normal.a*componentSSBO.values[cNum].goScale + componentSSBO.values[cNum].goShift,\\n      componentSSBO.values[cNum].gomin, componentSSBO.values[cNum].gomax);\\n  }\\n  var opacity: f32 = gofactor*textureSampleLevel(ofunTexture, clampSampler, coord, 0.0).r;\\n  outColor = vec4<f32>(color.rgb, opacity);\\n\\n  //VTK::Volume::Process\\n\\n  return outColor;\\n}\\n\\nfn composite(rayLengthSC: f32, minPosSC: vec4<f32>, rayStepSC: vec4<f32>) -> vec4<f32>\\n{\\n  // initial ray position is at the beginning\\n  var rayPosSC: vec4<f32> = minPosSC;\\n\\n  // how many rows (tfuns) do we have in our tfunTexture\\n  var tfunRows: f32 = f32(textureDimensions(tfunTexture).y);\\n\\n  var curDist: f32 = 0.0;\\n  var computedColor: vec4<f32> = vec4<f32>(0.0, 0.0, 0.0, 0.0);\\n  var sampleColor: vec4<f32>;\\n  loop\\n  {\\n    // for each volume, sample and accumulate color\\n\\n//VTK::Volume::Calls\\n\\n    // increment position\\n    curDist = curDist + mapperUBO.SampleDistance;\\n    rayPosSC = rayPosSC + rayStepSC;\\n\\n    // check if we have reached a terminating condition\\n    if (curDist > rayLengthSC) { break; }\\n    if (computedColor.a > 0.98) { break; }\\n  }\\n  return computedColor;\\n}\\n\\n[[stage(fragment)]]\\nfn main(\\n//VTK::IOStructs::Input\\n)\\n//VTK::IOStructs::Output\\n{\\n  var output: fragmentOutput;\\n\\n  var rayMax: f32 = textureSampleLevel(maxTexture, clampSampler, input.tcoordVS, 0.0).r;\\n  var rayMin: f32 = textureSampleLevel(minTexture, clampSampler, input.tcoordVS, 0.0).r;\\n\\n  // discard empty rays\\n  if (rayMax <= rayMin) { discard; }\\n  else\\n  {\\n    var winDimsI32: vec2<i32> = textureDimensions(minTexture);\\n    var winDims: vec2<f32> = vec2<f32>(f32(winDimsI32.x), f32(winDimsI32.y));\\n\\n    // compute start and end ray positions in view coordinates\\n    var minPosSC: vec4<f32> = rendererUBO.PCSCMatrix*vec4<f32>(2.0*input.fragPos.x/winDims.x - 1.0, 1.0 - 2.0 * input.fragPos.y/winDims.y, rayMin, 1.0);\\n    minPosSC = minPosSC * (1.0 / minPosSC.w);\\n    var maxPosSC: vec4<f32> = rendererUBO.PCSCMatrix*vec4<f32>(2.0*input.fragPos.x/winDims.x - 1.0, 1.0 - 2.0 * input.fragPos.y/winDims.y, rayMax, 1.0);\\n    maxPosSC = maxPosSC * (1.0 / maxPosSC.w);\\n\\n    var rayLengthSC: f32 = distance(minPosSC.xyz, maxPosSC.xyz);\\n    var rayStepSC: vec4<f32> = (maxPosSC - minPosSC)*(mapperUBO.SampleDistance/rayLengthSC);\\n    rayStepSC.w = 0.0;\\n\\n    //VTK::Volume::Loop\\n\\n    // var computedColor: vec4<f32> = vec4<f32>(rayMin, rayMax, 0.0, min(100.0*(rayMax - rayMin), 1.0));\\n    // computedColor = vec4<f32>(rayLengthSC / 500.0, 1.0, 0.0, 1.0);\\n    // computedColor = vec4<f32>(maxPosSC.xyz*0.01, 1.0);\\n\\n    //VTK::RenderEncoder::Impl\\n  }\\n\\n  return output;\\n}\\n\";\nvar tmpMat4 = new Float64Array(16);\nvar tmp2Mat4 = new Float64Array(16); // ----------------------------------------------------------------------------\n// vtkWebGPUVolumePassFSQ methods\n// ----------------------------------------------------------------------------\n\nfunction vtkWebGPUVolumePassFSQ(publicAPI, model) {\n  // Set our className\n  model.classHierarchy.push('vtkWebGPUVolumePassFSQ');\n\n  publicAPI.replaceShaderPosition = function (hash, pipeline, vertexInput) {\n    var vDesc = pipeline.getShaderDescription('vertex');\n    vDesc.addBuiltinOutput('vec4<f32>', '[[builtin(position)]] Position');\n    var code = vDesc.getCode();\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_4__.default.substitute(code, '//VTK::Position::Impl', ['output.tcoordVS = vec2<f32>(vertexBC.x * 0.5 + 0.5, 1.0 - vertexBC.y * 0.5 - 0.5);', 'output.Position = vec4<f32>(vertexBC, 1.0);']).result;\n    vDesc.setCode(code);\n    var fDesc = pipeline.getShaderDescription('fragment');\n    fDesc.addBuiltinInput('vec4<f32>', '[[builtin(position)]] fragPos');\n  };\n\n  model.shaderReplacements.set('replaceShaderPosition', publicAPI.replaceShaderPosition);\n\n  publicAPI.replaceShaderVolume = function (hash, pipeline, vertexInput) {\n    var fDesc = pipeline.getShaderDescription('fragment');\n    var code = fDesc.getCode();\n    var calls = [];\n\n    for (var i = 0; i < model.volumes.length; i++) {\n      // todo pass rowPos\n      calls.push(\"      sampleColor = processVolume(volTexture\".concat(i, \", \").concat(i, \", \").concat(model.rowStarts[i], \", rayPosSC, tfunRows);\"));\n      calls.push(\"      computedColor = vec4<f32>(\\n        sampleColor.a * sampleColor.rgb * (1.0 - computedColor.a) + computedColor.rgb,\\n        (1.0 - computedColor.a)*sampleColor.a + computedColor.a);\");\n    }\n\n    code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_4__.default.substitute(code, '//VTK::Volume::Calls', calls).result;\n\n    if (model.blendMode === _Core_VolumeMapper_Constants_js__WEBPACK_IMPORTED_MODULE_7__.BlendMode.COMPOSITE_BLEND) {\n      code = _ShaderCache_js__WEBPACK_IMPORTED_MODULE_4__.default.substitute(code, '//VTK::Volume::Loop', ['var computedColor: vec4<f32> = composite(rayLengthSC, minPosSC, rayStepSC);']).result;\n    }\n\n    fDesc.setCode(code);\n  };\n\n  model.shaderReplacements.set('replaceShaderVolume', publicAPI.replaceShaderVolume);\n\n  publicAPI.updateLUTImage = function (device) {\n    // depends on\n    // - volumes array (length and values) - mtime\n    // - tfun arrays - renderable/property mtime\n    var mtime = publicAPI.getMTime();\n\n    for (var i = 0; i < model.volumes.length; i++) {\n      var vol = model.volumes[i].getRenderable();\n      var image = vol.getMapper().getInputData();\n      mtime = Math.max(mtime, vol.getMTime(), image.getMTime());\n    }\n\n    if (mtime < model.lutBuildTime.getMTime()) {\n      return;\n    } // first determine how large the image should be\n\n\n    model.numRows = 0;\n    model.rowStarts = [];\n\n    for (var vidx = 0; vidx < model.volumes.length; vidx++) {\n      model.rowStarts.push(model.numRows);\n      var webgpuvol = model.volumes[vidx];\n      var actor = webgpuvol.getRenderable();\n      var volMapr = actor.getMapper();\n      var vprop = actor.getProperty();\n\n      var _image = volMapr.getInputData();\n\n      var scalars = _image.getPointData() && _image.getPointData().getScalars();\n\n      var numComp = scalars.getNumberOfComponents();\n      var iComps = vprop.getIndependentComponents();\n      var numIComps = iComps ? numComp : 1;\n      model.numRows += numIComps;\n    } // allocate the image array\n\n\n    var colorArray = new Uint8Array(model.numRows * 2 * model.rowLength * 4);\n    var opacityArray = new Float32Array(model.numRows * 2 * model.rowLength);\n    var imgRow = 0;\n    var tmpTable = new Float32Array(model.rowLength * 3);\n    var rowLength = model.rowLength;\n\n    for (var _vidx = 0; _vidx < model.volumes.length; _vidx++) {\n      var _webgpuvol = model.volumes[_vidx];\n\n      var _actor = _webgpuvol.getRenderable();\n\n      var _volMapr = _actor.getMapper();\n\n      var _vprop = _actor.getProperty();\n\n      var _image2 = _volMapr.getInputData();\n\n      var _scalars = _image2.getPointData() && _image2.getPointData().getScalars();\n\n      var _numComp = _scalars.getNumberOfComponents();\n\n      var _iComps = _vprop.getIndependentComponents();\n\n      var _numIComps = _iComps ? _numComp : 1;\n\n      for (var c = 0; c < _numIComps; ++c) {\n        var cfun = _vprop.getRGBTransferFunction(c);\n\n        var cRange = cfun.getRange();\n        cfun.getTable(cRange[0], cRange[1], rowLength, tmpTable, 1);\n        var ioffset = imgRow * rowLength * 4;\n\n        for (var _i = 0; _i < rowLength; ++_i) {\n          colorArray[ioffset + _i * 4] = 255.0 * tmpTable[_i * 3];\n          colorArray[ioffset + _i * 4 + 1] = 255.0 * tmpTable[_i * 3 + 1];\n          colorArray[ioffset + _i * 4 + 2] = 255.0 * tmpTable[_i * 3 + 2];\n          colorArray[ioffset + _i * 4 + 3] = 255.0;\n\n          for (var co = 0; co < 4; co++) {\n            colorArray[ioffset + (rowLength + _i) * 4 + co] = colorArray[ioffset + _i * 4 + co];\n          }\n        }\n\n        var ofun = _vprop.getScalarOpacity(c);\n\n        var opacityFactor = model.sampleDist / _vprop.getScalarOpacityUnitDistance(c);\n\n        var oRange = ofun.getRange();\n        ofun.getTable(oRange[0], oRange[1], rowLength, tmpTable, 1); // adjust for sample distance etc\n\n        ioffset = imgRow * rowLength;\n\n        for (var _i2 = 0; _i2 < rowLength; ++_i2) {\n          opacityArray[ioffset + _i2] = 1.0 - Math.pow(1.0 - tmpTable[_i2], opacityFactor);\n          opacityArray[ioffset + _i2 + rowLength] = opacityArray[ioffset + _i2];\n        }\n\n        imgRow += 2;\n      }\n    }\n\n    {\n      var treq = {\n        nativeArray: colorArray,\n        width: model.rowLength,\n        height: model.numRows * 2,\n        depth: 1,\n        format: 'rgba8unorm'\n      };\n      var newTex = device.getTextureManager().getTexture(treq);\n      var tview = newTex.createView();\n      tview.setName('tfunTexture');\n      model.textureViews[2] = tview;\n    }\n    {\n      var _treq = {\n        nativeArray: opacityArray,\n        width: model.rowLength,\n        height: model.numRows * 2,\n        depth: 1,\n        format: 'r32float'\n      };\n\n      var _newTex = device.getTextureManager().getTexture(_treq);\n\n      var _tview = _newTex.createView();\n\n      _tview.setName('ofunTexture');\n\n      model.textureViews[3] = _tview;\n    }\n    model.lutBuildTime.modified();\n  };\n\n  publicAPI.updateSSBO = function (device) {\n    // if any of\n    // - color or opacity tfun ranges changed - volume Mtime\n    // - any volume matrix changed - volume MTime\n    // - stabilized center changed - ren.stabilizedMTime\n    // - any volume's input data worldtoindex or dimensions changed - input's mtime\n    //\n    var mtime = Math.max(publicAPI.getMTime(), model.WebGPURenderer.getStabilizedTime());\n\n    for (var i = 0; i < model.volumes.length; i++) {\n      var vol = model.volumes[i].getRenderable();\n      var image = vol.getMapper().getInputData();\n      mtime = Math.max(mtime, vol.getMTime(), image.getMTime());\n    }\n\n    if (mtime < model.SSBO.getSendTime()) {\n      return;\n    } // create the volumeSBBO\n\n\n    var center = model.WebGPURenderer.getStabilizedCenterByReference();\n    model.SSBO.clearData();\n    model.SSBO.setNumberOfInstances(model.volumes.length); // create SCTC matrices  SC -> world -> model -> index -> tcoord\n    //\n    // when doing coord conversions from A to C recall\n    // the order is mat4.mult(AtoC, BtoC, AtoB);\n    //\n\n    var marray = new Float64Array(model.volumes.length * 16);\n    var tstepArray = new Float64Array(model.volumes.length * 4);\n    var spacingArray = new Float64Array(model.volumes.length * 4);\n\n    for (var vidx = 0; vidx < model.volumes.length; vidx++) {\n      var webgpuvol = model.volumes[vidx];\n      var actor = webgpuvol.getRenderable();\n      var volMapr = actor.getMapper();\n\n      var _image3 = volMapr.getInputData();\n\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__.a)(tmpMat4);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__.t)(tmpMat4, tmpMat4, center); // tmpMat4 is now SC->World\n\n      var _vol = model.volumes[vidx];\n\n      var mcwcmat = _vol.getRenderable().getMatrix();\n\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__.j)(tmp2Mat4, mcwcmat);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__.i)(tmp2Mat4, tmp2Mat4); // tmp2Mat4 is now world to model\n\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__.m)(tmpMat4, tmp2Mat4, tmpMat4); // tmp4Mat is now SC->Model\n      // the method on the data is world to index but the volume is in\n      // model coordinates so really in this context it is model to index\n\n      var modelToIndex = _image3.getWorldToIndex();\n\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__.j)(tmp2Mat4, modelToIndex);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__.m)(tmpMat4, tmp2Mat4, tmpMat4); // tmpMat4 is now SC -> Index\n\n      var dims = _image3.getDimensions();\n\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__.a)(tmp2Mat4);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__.s)(tmp2Mat4, tmp2Mat4, [1.0 / dims[0], 1.0 / dims[1], 1.0 / dims[2]]);\n      (0,_vendor_gl_matrix_esm_mat4_js__WEBPACK_IMPORTED_MODULE_8__.m)(tmpMat4, tmp2Mat4, tmpMat4); // tmpMat4 is now SC -> Tcoord\n\n      for (var j = 0; j < 16; j++) {\n        marray[vidx * 16 + j] = tmpMat4[j];\n      }\n\n      tstepArray[vidx * 4] = 1.0 / dims[0];\n      tstepArray[vidx * 4 + 1] = 1.0 / dims[1];\n      tstepArray[vidx * 4 + 2] = 1.0 / dims[2];\n      tstepArray[vidx * 4 + 3] = 1.0;\n\n      var spacing = _image3.getSpacing();\n\n      spacingArray[vidx * 4] = spacing[0];\n      spacingArray[vidx * 4 + 1] = spacing[1];\n      spacingArray[vidx * 4 + 2] = spacing[2];\n      spacingArray[vidx * 4 + 3] = 1.0;\n    }\n\n    model.SSBO.addEntry('SCTCMatrix', 'mat4x4<f32>');\n    model.SSBO.addEntry('tstep', 'vec4<f32>');\n    model.SSBO.addEntry('spacing', 'vec4<f32>');\n    model.SSBO.setAllInstancesFromArray('SCTCMatrix', marray);\n    model.SSBO.setAllInstancesFromArray('tstep', tstepArray);\n    model.SSBO.setAllInstancesFromArray('spacing', spacingArray);\n    model.SSBO.send(device); // now create the componentSSBO\n\n    model.componentSSBO.clearData();\n    model.componentSSBO.setNumberOfInstances(model.numRows);\n    var cScaleArray = new Float64Array(model.numRows);\n    var cShiftArray = new Float64Array(model.numRows);\n    var oScaleArray = new Float64Array(model.numRows);\n    var oShiftArray = new Float64Array(model.numRows);\n    var gominArray = new Float64Array(model.numRows);\n    var gomaxArray = new Float64Array(model.numRows);\n    var goshiftArray = new Float64Array(model.numRows);\n    var goscaleArray = new Float64Array(model.numRows);\n    var rowIdx = 0;\n\n    for (var _vidx2 = 0; _vidx2 < model.volumes.length; _vidx2++) {\n      var _webgpuvol2 = model.volumes[_vidx2];\n\n      var _actor2 = _webgpuvol2.getRenderable();\n\n      var _volMapr2 = _actor2.getMapper();\n\n      var vprop = _actor2.getProperty();\n\n      var _image4 = _volMapr2.getInputData();\n\n      var scalars = _image4.getPointData() && _image4.getPointData().getScalars();\n\n      var numComp = scalars.getNumberOfComponents();\n      var iComps = vprop.getIndependentComponents(); // const numIComps = iComps ? numComp : 1;\n\n      var volInfo = {\n        scale: [255.0],\n        offset: [0.0]\n      }; // three levels of shift scale combined into one\n      // for performance in the fragment shader\n\n      for (var compIdx = 0; compIdx < numComp; compIdx++) {\n        var target = iComps ? compIdx : 0;\n        var sscale = volInfo.scale[compIdx];\n        var ofun = vprop.getScalarOpacity(target);\n        var oRange = ofun.getRange();\n        var oscale = sscale / (oRange[1] - oRange[0]);\n        var oshift = (volInfo.offset[compIdx] - oRange[0]) / (oRange[1] - oRange[0]);\n        oShiftArray[rowIdx] = oshift;\n        oScaleArray[rowIdx] = oscale;\n        var cfun = vprop.getRGBTransferFunction(target);\n        var cRange = cfun.getRange();\n        cShiftArray[rowIdx] = (volInfo.offset[compIdx] - cRange[0]) / (cRange[1] - cRange[0]);\n        cScaleArray[rowIdx] = sscale / (cRange[1] - cRange[0]); // todo sscale for dependent should be based off of the A channel?\n        // not target (which is 0 in that case)\n\n        var useGO = vprop.getUseGradientOpacity(target);\n\n        if (useGO) {\n          var gomin = vprop.getGradientOpacityMinimumOpacity(target);\n          var gomax = vprop.getGradientOpacityMaximumOpacity(target);\n          gominArray[rowIdx] = gomin;\n          gomaxArray[rowIdx] = gomax;\n          var goRange = [vprop.getGradientOpacityMinimumValue(target), vprop.getGradientOpacityMaximumValue(target)];\n          goscaleArray[rowIdx] = sscale * (gomax - gomin) / (goRange[1] - goRange[0]);\n          goshiftArray[rowIdx] = -goRange[0] * (gomax - gomin) / (goRange[1] - goRange[0]) + gomin;\n        } else {\n          gominArray[rowIdx] = 1.0;\n          gomaxArray[rowIdx] = 1.0;\n          goscaleArray[rowIdx] = 0.0;\n          goshiftArray[rowIdx] = 1.0;\n        }\n\n        rowIdx++;\n      }\n    }\n\n    model.componentSSBO.addEntry('cScale', 'f32');\n    model.componentSSBO.addEntry('cShift', 'f32');\n    model.componentSSBO.addEntry('oScale', 'f32');\n    model.componentSSBO.addEntry('oShift', 'f32');\n    model.componentSSBO.addEntry('goShift', 'f32');\n    model.componentSSBO.addEntry('goScale', 'f32');\n    model.componentSSBO.addEntry('gomin', 'f32');\n    model.componentSSBO.addEntry('gomax', 'f32');\n    model.componentSSBO.setAllInstancesFromArray('cScale', cScaleArray);\n    model.componentSSBO.setAllInstancesFromArray('cShift', cShiftArray);\n    model.componentSSBO.setAllInstancesFromArray('oScale', oScaleArray);\n    model.componentSSBO.setAllInstancesFromArray('oShift', oShiftArray);\n    model.componentSSBO.setAllInstancesFromArray('goScale', goscaleArray);\n    model.componentSSBO.setAllInstancesFromArray('goShift', goshiftArray);\n    model.componentSSBO.setAllInstancesFromArray('gomin', gominArray);\n    model.componentSSBO.setAllInstancesFromArray('gomax', gomaxArray);\n    model.componentSSBO.send(device);\n  };\n\n  publicAPI.updateBuffers = function (device) {\n    // compute the min step size\n    var sampleDist = model.volumes[0].getRenderable().getMapper().getSampleDistance();\n\n    for (var i = 0; i < model.volumes.length; i++) {\n      var vol = model.volumes[i];\n      var volMapr = vol.getRenderable().getMapper();\n      var sd = volMapr.getSampleDistance();\n\n      if (sd < sampleDist) {\n        sampleDist = sd;\n      }\n    }\n\n    if (model.sampleDist !== sampleDist) {\n      model.sampleDist = sampleDist;\n      model.UBO.setValue('SampleDistance', sampleDist);\n      model.UBO.sendIfNeeded(device);\n    }\n\n    publicAPI.updateLUTImage(device);\n    publicAPI.updateSSBO(device); // add in 3d volume textures\n\n    for (var vidx = 0; vidx < model.volumes.length; vidx++) {\n      var webgpuvol = model.volumes[vidx];\n      var actor = webgpuvol.getRenderable();\n\n      var _volMapr3 = actor.getMapper();\n\n      var image = _volMapr3.getInputData();\n\n      var treq = {\n        imageData: image,\n        source: image\n      };\n      var newTex = device.getTextureManager().getTexture(treq);\n\n      if (!model.textureViews[vidx + 4] || model.textureViews[vidx + 4].getTexture() !== newTex) {\n        var tview = newTex.createView();\n        tview.setName(\"volTexture\".concat(vidx));\n        model.textureViews[vidx + 4] = tview;\n      }\n    }\n  };\n\n  publicAPI.computePipelineHash = function () {\n    var blendMode = model.volumes[0].getRenderable().getMapper().getBlendMode();\n    model.blendMode = blendMode;\n    model.pipelineHash = \"volfsq\".concat(model.volumes.length, \"b\").concat(model.blendMode);\n  }; // marks modified when needed\n\n\n  publicAPI.setVolumes = function (val) {\n    if (!model.volumes || model.volumes.length !== val.length) {\n      model.volumes = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(val);\n      publicAPI.modified();\n      return;\n    }\n\n    for (var i = 0; i < val.length; i++) {\n      if (val[i] !== model.volumes[i]) {\n        model.volumes = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__.default)(val);\n        publicAPI.modified();\n        return;\n      }\n    }\n  };\n\n  var superclassBuild = publicAPI.build;\n\n  publicAPI.build = function (renderEncoder, device) {\n    publicAPI.computePipelineHash();\n    publicAPI.updateBuffers(device);\n\n    if (!model.clampSampler) {\n      model.clampSampler = _Sampler_js__WEBPACK_IMPORTED_MODULE_6__.default.newInstance();\n      model.clampSampler.setName('clampSampler');\n      model.clampSampler.create(device, {\n        minFilter: 'linear',\n        maxFilter: 'linear'\n      });\n    }\n\n    superclassBuild(renderEncoder, device);\n  };\n\n  var superclassGetBindables = publicAPI.getBindables;\n\n  publicAPI.getBindables = function () {\n    var bindables = superclassGetBindables();\n    bindables.push(model.componentSSBO);\n    bindables.push(model.clampSampler);\n    return bindables;\n  };\n} // ----------------------------------------------------------------------------\n// Object factory\n// ----------------------------------------------------------------------------\n\n\nvar DEFAULT_VALUES = {\n  volumes: null,\n  rowLength: 1024\n}; // ----------------------------------------------------------------------------\n\nfunction extend(publicAPI, model) {\n  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance\n\n  _FullScreenQuad_js__WEBPACK_IMPORTED_MODULE_2__.default.extend(publicAPI, model, initialValues);\n  model.fragmentShaderTemplate = volFragTemplate;\n  model.UBO = _UniformBuffer_js__WEBPACK_IMPORTED_MODULE_3__.default.newInstance();\n  model.UBO.setName('mapperUBO');\n  model.UBO.addEntry('SampleDistance', 'f32');\n  model.SSBO = _StorageBuffer_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance();\n  model.SSBO.setName('volumeSSBO');\n  model.componentSSBO = _StorageBuffer_js__WEBPACK_IMPORTED_MODULE_5__.default.newInstance();\n  model.componentSSBO.setName('componentSSBO');\n  model.lutBuildTime = {};\n  _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.obj(model.lutBuildTime, {\n    mtime: 0\n  }); // Object methods\n\n  vtkWebGPUVolumePassFSQ(publicAPI, model);\n} // ----------------------------------------------------------------------------\n\nvar newInstance = _macro_js__WEBPACK_IMPORTED_MODULE_1__.default.newInstance(extend, 'vtkWebGPUVolumePassFSQ'); // ----------------------------------------------------------------------------\n\nvar vtkWebGPUVolumePassFSQ$1 = {\n  newInstance: newInstance,\n  extend: extend\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtkWebGPUVolumePassFSQ$1);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/Rendering/WebGPU/VolumePassFSQ.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/_polyfill-node_stream.js_commonjs-proxy.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/_polyfill-node_stream.js_commonjs-proxy.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"r\": () => (/* binding */ require$$0)\n/* harmony export */ });\n/* harmony import */ var _polyfill_node_stream_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfill-node_stream.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node_stream.js\");\n/* harmony import */ var _commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\n\nvar require$$0 = /*@__PURE__*/(0,_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_1__.g)(_polyfill_node_stream_js__WEBPACK_IMPORTED_MODULE_0__._);\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/_polyfill-node_stream.js_commonjs-proxy.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/_rollup_plugin_ignore_empty_module_placeholder_commonjs-proxy.js":
/*!****************************************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/_rollup_plugin_ignore_empty_module_placeholder_commonjs-proxy.js ***!
  \****************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"r\": () => (/* binding */ require$$0)\n/* harmony export */ });\n/* harmony import */ var _rollup_plugin_ignore_empty_module_placeholder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rollup_plugin_ignore_empty_module_placeholder.js */ \"./node_modules/@kitware/vtk.js/_virtual/rollup_plugin_ignore_empty_module_placeholder.js\");\n/* harmony import */ var _commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\n\nvar require$$0 = /*@__PURE__*/(0,_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_1__.g)(_rollup_plugin_ignore_empty_module_placeholder_js__WEBPACK_IMPORTED_MODULE_0__._);\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/_rollup_plugin_ignore_empty_module_placeholder_commonjs-proxy.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js":
/*!******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"a\": () => (/* binding */ commonjsGlobal),\n/* harmony export */   \"c\": () => (/* binding */ createCommonjsModule),\n/* harmony export */   \"g\": () => (/* binding */ getAugmentedNamespace)\n/* harmony export */ });\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};\n\nfunction getAugmentedNamespace(n) {\n\tif (n.__esModule) return n;\n\tvar a = Object.defineProperty({}, '__esModule', {value: true});\n\tObject.keys(n).forEach(function (k) {\n\t\tvar d = Object.getOwnPropertyDescriptor(n, k);\n\t\tObject.defineProperty(a, k, d.get ? d : {\n\t\t\tenumerable: true,\n\t\t\tget: function () {\n\t\t\t\treturn n[k];\n\t\t\t}\n\t\t});\n\t});\n\treturn a;\n}\n\nfunction createCommonjsModule(fn) {\n  var module = { exports: {} };\n\treturn fn(module, module.exports), module.exports;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/polyfill-node__buffer_list.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/polyfill-node__buffer_list.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"B\": () => (/* binding */ BufferList)\n/* harmony export */ });\n/* harmony import */ var _vendor_buffer_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../vendor/buffer/index.js */ \"./node_modules/@kitware/vtk.js/vendor/buffer/index.js\");\n\n\nfunction BufferList() {\n  this.head = null;\n  this.tail = null;\n  this.length = 0;\n}\n\nBufferList.prototype.push = function (v) {\n  var entry = { data: v, next: null };\n  if (this.length > 0) this.tail.next = entry;else this.head = entry;\n  this.tail = entry;\n  ++this.length;\n};\n\nBufferList.prototype.unshift = function (v) {\n  var entry = { data: v, next: this.head };\n  if (this.length === 0) this.tail = entry;\n  this.head = entry;\n  ++this.length;\n};\n\nBufferList.prototype.shift = function () {\n  if (this.length === 0) return;\n  var ret = this.head.data;\n  if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n  --this.length;\n  return ret;\n};\n\nBufferList.prototype.clear = function () {\n  this.head = this.tail = null;\n  this.length = 0;\n};\n\nBufferList.prototype.join = function (s) {\n  if (this.length === 0) return '';\n  var p = this.head;\n  var ret = '' + p.data;\n  while (p = p.next) {\n    ret += s + p.data;\n  }return ret;\n};\n\nBufferList.prototype.concat = function (n) {\n  if (this.length === 0) return _vendor_buffer_index_js__WEBPACK_IMPORTED_MODULE_0__.b.Buffer.alloc(0);\n  if (this.length === 1) return this.head.data;\n  var ret = _vendor_buffer_index_js__WEBPACK_IMPORTED_MODULE_0__.b.Buffer.allocUnsafe(n >>> 0);\n  var p = this.head;\n  var i = 0;\n  while (p) {\n    p.data.copy(ret, i);\n    i += p.data.length;\n    p = p.next;\n  }\n  return ret;\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/polyfill-node__buffer_list.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_duplex.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_duplex.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"D\": () => (/* binding */ Duplex)\n/* harmony export */ });\n/* harmony import */ var _vendor_util_util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../vendor/util/util.js */ \"./node_modules/@kitware/vtk.js/vendor/util/util.js\");\n/* harmony import */ var _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vendor/process/browser.js */ \"./node_modules/@kitware/vtk.js/vendor/process/browser.js\");\n/* harmony import */ var _polyfill_node_stream_readable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./polyfill-node__stream_readable.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_readable.js\");\n/* harmony import */ var _polyfill_node_stream_writable_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./polyfill-node__stream_writable.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_writable.js\");\n\n\n\n\n\n_vendor_util_util_js__WEBPACK_IMPORTED_MODULE_0__.u.inherits(Duplex, _polyfill_node_stream_readable_js__WEBPACK_IMPORTED_MODULE_2__.R);\n\nvar keys = Object.keys(_polyfill_node_stream_writable_js__WEBPACK_IMPORTED_MODULE_3__.W.prototype);\nfor (var v = 0; v < keys.length; v++) {\n  var method = keys[v];\n  if (!Duplex.prototype[method]) Duplex.prototype[method] = _polyfill_node_stream_writable_js__WEBPACK_IMPORTED_MODULE_3__.W.prototype[method];\n}\nfunction Duplex(options) {\n  if (!(this instanceof Duplex)) return new Duplex(options);\n\n  _polyfill_node_stream_readable_js__WEBPACK_IMPORTED_MODULE_2__.R.call(this, options);\n  _polyfill_node_stream_writable_js__WEBPACK_IMPORTED_MODULE_3__.W.call(this, options);\n\n  if (options && options.readable === false) this.readable = false;\n\n  if (options && options.writable === false) this.writable = false;\n\n  this.allowHalfOpen = true;\n  if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n  this.once('end', onend);\n}\n\n// the no-half-open enforcer\nfunction onend() {\n  // if we allow half-open state, or if the writable side ended,\n  // then we're ok.\n  if (this.allowHalfOpen || this._writableState.ended) return;\n\n  // no more data can be written.\n  // But allow more writes to happen in this tick.\n  _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_1__.b.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n  self.end();\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_duplex.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_passthrough.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_passthrough.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"P\": () => (/* binding */ PassThrough)\n/* harmony export */ });\n/* harmony import */ var _polyfill_node_stream_transform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfill-node__stream_transform.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_transform.js\");\n/* harmony import */ var _vendor_util_util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vendor/util/util.js */ \"./node_modules/@kitware/vtk.js/vendor/util/util.js\");\n\n\n\n_vendor_util_util_js__WEBPACK_IMPORTED_MODULE_1__.u.inherits(PassThrough, _polyfill_node_stream_transform_js__WEBPACK_IMPORTED_MODULE_0__.T);\nfunction PassThrough(options) {\n  if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n  _polyfill_node_stream_transform_js__WEBPACK_IMPORTED_MODULE_0__.T.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n  cb(null, chunk);\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_passthrough.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_readable.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_readable.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"R\": () => (/* binding */ Readable)\n/* harmony export */ });\n/* harmony import */ var _polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfill-node_buffer.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node_buffer.js\");\n/* harmony import */ var _vendor_events_events_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vendor/events/events.js */ \"./node_modules/@kitware/vtk.js/vendor/events/events.js\");\n/* harmony import */ var _vendor_util_util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../vendor/util/util.js */ \"./node_modules/@kitware/vtk.js/vendor/util/util.js\");\n/* harmony import */ var _polyfill_node_buffer_list_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./polyfill-node__buffer_list.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node__buffer_list.js\");\n/* harmony import */ var _vendor_string_decoder_lib_string_decoder_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../vendor/string_decoder/lib/string_decoder.js */ \"./node_modules/@kitware/vtk.js/vendor/string_decoder/lib/string_decoder.js\");\n/* harmony import */ var _polyfill_node_stream_duplex_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./polyfill-node__stream_duplex.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_duplex.js\");\n/* harmony import */ var _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../vendor/process/browser.js */ \"./node_modules/@kitware/vtk.js/vendor/process/browser.js\");\n\n\n\n\n\n\n\n\nReadable.ReadableState = ReadableState;\n\nvar debug = _vendor_util_util_js__WEBPACK_IMPORTED_MODULE_2__.u.debuglog('stream');\n_vendor_util_util_js__WEBPACK_IMPORTED_MODULE_2__.u.inherits(Readable, _vendor_events_events_js__WEBPACK_IMPORTED_MODULE_1__.e);\n\nfunction prependListener(emitter, event, fn) {\n  // Sadly this is not cacheable as some libraries bundle their own\n  // event emitter implementation with them.\n  if (typeof emitter.prependListener === 'function') {\n    return emitter.prependListener(event, fn);\n  } else {\n    // This is a hack to make sure that our error handler is attached before any\n    // userland ones.  NEVER DO THIS. This is here only because this code needs\n    // to continue to work with older versions of Node.js that do not include\n    // the prependListener() method. The goal is to eventually remove this hack.\n    if (!emitter._events || !emitter._events[event])\n      emitter.on(event, fn);\n    else if (Array.isArray(emitter._events[event]))\n      emitter._events[event].unshift(fn);\n    else\n      emitter._events[event] = [fn, emitter._events[event]];\n  }\n}\nfunction listenerCount (emitter, type) {\n  return emitter.listeners(type).length;\n}\nfunction ReadableState(options, stream) {\n\n  options = options || {};\n\n  // object stream flag. Used to make read(n) ignore n and to\n  // make all the buffer merging and length checks go away\n  this.objectMode = !!options.objectMode;\n\n  if (stream instanceof _polyfill_node_stream_duplex_js__WEBPACK_IMPORTED_MODULE_5__.D) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n  // the point at which it stops calling _read() to fill the buffer\n  // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n  var hwm = options.highWaterMark;\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n  this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n  // cast to ints.\n  this.highWaterMark = ~ ~this.highWaterMark;\n\n  // A linked list is used to store data chunks instead of an array because the\n  // linked list can remove elements from the beginning faster than\n  // array.shift()\n  this.buffer = new _polyfill_node_buffer_list_js__WEBPACK_IMPORTED_MODULE_3__.B();\n  this.length = 0;\n  this.pipes = null;\n  this.pipesCount = 0;\n  this.flowing = null;\n  this.ended = false;\n  this.endEmitted = false;\n  this.reading = false;\n\n  // a flag to be able to tell if the onwrite cb is called immediately,\n  // or on a later tick.  We set this to true at first, because any\n  // actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first write call.\n  this.sync = true;\n\n  // whenever we return null, then we set a flag to say\n  // that we're awaiting a 'readable' event emission.\n  this.needReadable = false;\n  this.emittedReadable = false;\n  this.readableListening = false;\n  this.resumeScheduled = false;\n\n  // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n  // when piping, we only care about 'readable' events that happen\n  // after read()ing all the bytes and not getting any pushback.\n  this.ranOut = false;\n\n  // the number of writers that are awaiting a drain event in .pipe()s\n  this.awaitDrain = 0;\n\n  // if true, a maybeReadMore has been scheduled\n  this.readingMore = false;\n\n  this.decoder = null;\n  this.encoding = null;\n  if (options.encoding) {\n    this.decoder = new _vendor_string_decoder_lib_string_decoder_js__WEBPACK_IMPORTED_MODULE_4__.S(options.encoding);\n    this.encoding = options.encoding;\n  }\n}\nfunction Readable(options) {\n\n  if (!(this instanceof Readable)) return new Readable(options);\n\n  this._readableState = new ReadableState(options, this);\n\n  // legacy\n  this.readable = true;\n\n  if (options && typeof options.read === 'function') this._read = options.read;\n\n  _vendor_events_events_js__WEBPACK_IMPORTED_MODULE_1__.e.call(this);\n}\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n  var state = this._readableState;\n\n  if (!state.objectMode && typeof chunk === 'string') {\n    encoding = encoding || state.defaultEncoding;\n    if (encoding !== state.encoding) {\n      chunk = _polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B.from(chunk, encoding);\n      encoding = '';\n    }\n  }\n\n  return readableAddChunk(this, state, chunk, encoding, false);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n  var state = this._readableState;\n  return readableAddChunk(this, state, chunk, '', true);\n};\n\nReadable.prototype.isPaused = function () {\n  return this._readableState.flowing === false;\n};\n\nfunction readableAddChunk(stream, state, chunk, encoding, addToFront) {\n  var er = chunkInvalid(state, chunk);\n  if (er) {\n    stream.emit('error', er);\n  } else if (chunk === null) {\n    state.reading = false;\n    onEofChunk(stream, state);\n  } else if (state.objectMode || chunk && chunk.length > 0) {\n    if (state.ended && !addToFront) {\n      var e = new Error('stream.push() after EOF');\n      stream.emit('error', e);\n    } else if (state.endEmitted && addToFront) {\n      var _e = new Error('stream.unshift() after end event');\n      stream.emit('error', _e);\n    } else {\n      var skipAdd;\n      if (state.decoder && !addToFront && !encoding) {\n        chunk = state.decoder.write(chunk);\n        skipAdd = !state.objectMode && chunk.length === 0;\n      }\n\n      if (!addToFront) state.reading = false;\n\n      // Don't add to the buffer if we've decoded to an empty string chunk and\n      // we're not in object mode\n      if (!skipAdd) {\n        // if we want the data now, just emit it.\n        if (state.flowing && state.length === 0 && !state.sync) {\n          stream.emit('data', chunk);\n          stream.read(0);\n        } else {\n          // update the buffer info.\n          state.length += state.objectMode ? 1 : chunk.length;\n          if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n          if (state.needReadable) emitReadable(stream);\n        }\n      }\n\n      maybeReadMore(stream, state);\n    }\n  } else if (!addToFront) {\n    state.reading = false;\n  }\n\n  return needMoreData(state);\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes.  This is to work around cases where hwm=0,\n// such as the repl.  Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n  this._readableState.decoder = new _vendor_string_decoder_lib_string_decoder_js__WEBPACK_IMPORTED_MODULE_4__.S(enc);\n  this._readableState.encoding = enc;\n  return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n  if (n >= MAX_HWM) {\n    n = MAX_HWM;\n  } else {\n    // Get the next highest power of 2 to prevent increasing hwm excessively in\n    // tiny amounts\n    n--;\n    n |= n >>> 1;\n    n |= n >>> 2;\n    n |= n >>> 4;\n    n |= n >>> 8;\n    n |= n >>> 16;\n    n++;\n  }\n  return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n  if (n <= 0 || state.length === 0 && state.ended) return 0;\n  if (state.objectMode) return 1;\n  if (n !== n) {\n    // Only flow one buffer at a time\n    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n  }\n  // If we're asking for more than the current hwm, then raise the hwm.\n  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n  if (n <= state.length) return n;\n  // Don't have enough\n  if (!state.ended) {\n    state.needReadable = true;\n    return 0;\n  }\n  return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n  debug('read', n);\n  n = parseInt(n, 10);\n  var state = this._readableState;\n  var nOrig = n;\n\n  if (n !== 0) state.emittedReadable = false;\n\n  // if we're doing read(0) to trigger a readable event, but we\n  // already have a bunch of data in the buffer, then just trigger\n  // the 'readable' event and move on.\n  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n    debug('read: emitReadable', state.length, state.ended);\n    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n    return null;\n  }\n\n  n = howMuchToRead(n, state);\n\n  // if we've ended, and we're now clear, then finish it up.\n  if (n === 0 && state.ended) {\n    if (state.length === 0) endReadable(this);\n    return null;\n  }\n\n  // All the actual chunk generation logic needs to be\n  // *below* the call to _read.  The reason is that in certain\n  // synthetic stream cases, such as passthrough streams, _read\n  // may be a completely synchronous operation which may change\n  // the state of the read buffer, providing enough data when\n  // before there was *not* enough.\n  //\n  // So, the steps are:\n  // 1. Figure out what the state of things will be after we do\n  // a read from the buffer.\n  //\n  // 2. If that resulting state will trigger a _read, then call _read.\n  // Note that this may be asynchronous, or synchronous.  Yes, it is\n  // deeply ugly to write APIs this way, but that still doesn't mean\n  // that the Readable class should behave improperly, as streams are\n  // designed to be sync/async agnostic.\n  // Take note if the _read call is sync or async (ie, if the read call\n  // has returned yet), so that we know whether or not it's safe to emit\n  // 'readable' etc.\n  //\n  // 3. Actually pull the requested chunks out of the buffer and return.\n\n  // if we need a readable event, then we need to do some reading.\n  var doRead = state.needReadable;\n  debug('need readable', doRead);\n\n  // if we currently have less than the highWaterMark, then also read some\n  if (state.length === 0 || state.length - n < state.highWaterMark) {\n    doRead = true;\n    debug('length less than watermark', doRead);\n  }\n\n  // however, if we've ended, then there's no point, and if we're already\n  // reading, then it's unnecessary.\n  if (state.ended || state.reading) {\n    doRead = false;\n    debug('reading or ended', doRead);\n  } else if (doRead) {\n    debug('do read');\n    state.reading = true;\n    state.sync = true;\n    // if the length is currently zero, then we *need* a readable event.\n    if (state.length === 0) state.needReadable = true;\n    // call internal read method\n    this._read(state.highWaterMark);\n    state.sync = false;\n    // If _read pushed data synchronously, then `reading` will be false,\n    // and we need to re-evaluate how much data we can return to the user.\n    if (!state.reading) n = howMuchToRead(nOrig, state);\n  }\n\n  var ret;\n  if (n > 0) ret = fromList(n, state);else ret = null;\n\n  if (ret === null) {\n    state.needReadable = true;\n    n = 0;\n  } else {\n    state.length -= n;\n  }\n\n  if (state.length === 0) {\n    // If we have nothing in the buffer, then we want to know\n    // as soon as we *do* get something into the buffer.\n    if (!state.ended) state.needReadable = true;\n\n    // If we tried to read() past the EOF, then emit end on the next tick.\n    if (nOrig !== n && state.ended) endReadable(this);\n  }\n\n  if (ret !== null) this.emit('data', ret);\n\n  return ret;\n};\n\nfunction chunkInvalid(state, chunk) {\n  var er = null;\n  if (!_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n    er = new TypeError('Invalid non-string/buffer chunk');\n  }\n  return er;\n}\n\nfunction onEofChunk(stream, state) {\n  if (state.ended) return;\n  if (state.decoder) {\n    var chunk = state.decoder.end();\n    if (chunk && chunk.length) {\n      state.buffer.push(chunk);\n      state.length += state.objectMode ? 1 : chunk.length;\n    }\n  }\n  state.ended = true;\n\n  // emit 'readable' now to make sure it gets picked up.\n  emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow.  This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n  var state = stream._readableState;\n  state.needReadable = false;\n  if (!state.emittedReadable) {\n    debug('emitReadable', state.flowing);\n    state.emittedReadable = true;\n    if (state.sync) _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_6__.b.nextTick(emitReadable_, stream);else emitReadable_(stream);\n  }\n}\n\nfunction emitReadable_(stream) {\n  debug('emit readable');\n  stream.emit('readable');\n  flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data.  that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n  if (!state.readingMore) {\n    state.readingMore = true;\n    _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_6__.b.nextTick(maybeReadMore_, stream, state);\n  }\n}\n\nfunction maybeReadMore_(stream, state) {\n  var len = state.length;\n  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n    debug('maybeReadMore read 0');\n    stream.read(0);\n    if (len === state.length)\n      // didn't get any data, stop spinning.\n      break;else len = state.length;\n  }\n  state.readingMore = false;\n}\n\n// abstract method.  to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n  this.emit('error', new Error('not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n  var src = this;\n  var state = this._readableState;\n\n  switch (state.pipesCount) {\n    case 0:\n      state.pipes = dest;\n      break;\n    case 1:\n      state.pipes = [state.pipes, dest];\n      break;\n    default:\n      state.pipes.push(dest);\n      break;\n  }\n  state.pipesCount += 1;\n  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n  var doEnd = (!pipeOpts || pipeOpts.end !== false);\n\n  var endFn = doEnd ? onend : cleanup;\n  if (state.endEmitted) _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_6__.b.nextTick(endFn);else src.once('end', endFn);\n\n  dest.on('unpipe', onunpipe);\n  function onunpipe(readable) {\n    debug('onunpipe');\n    if (readable === src) {\n      cleanup();\n    }\n  }\n\n  function onend() {\n    debug('onend');\n    dest.end();\n  }\n\n  // when the dest drains, it reduces the awaitDrain counter\n  // on the source.  This would be more elegant with a .once()\n  // handler in flow(), but adding and removing repeatedly is\n  // too slow.\n  var ondrain = pipeOnDrain(src);\n  dest.on('drain', ondrain);\n\n  var cleanedUp = false;\n  function cleanup() {\n    debug('cleanup');\n    // cleanup event handlers once the pipe is broken\n    dest.removeListener('close', onclose);\n    dest.removeListener('finish', onfinish);\n    dest.removeListener('drain', ondrain);\n    dest.removeListener('error', onerror);\n    dest.removeListener('unpipe', onunpipe);\n    src.removeListener('end', onend);\n    src.removeListener('end', cleanup);\n    src.removeListener('data', ondata);\n\n    cleanedUp = true;\n\n    // if the reader is waiting for a drain event from this\n    // specific writer, then it would cause it to never start\n    // flowing again.\n    // So, if this is awaiting a drain, then we just call it now.\n    // If we don't know, then assume that we are waiting for one.\n    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n  }\n\n  // If the user pushes more data while we're writing to dest then we'll end up\n  // in ondata again. However, we only want to increase awaitDrain once because\n  // dest will only emit one 'drain' event for the multiple writes.\n  // => Introduce a guard on increasing awaitDrain.\n  var increasedAwaitDrain = false;\n  src.on('data', ondata);\n  function ondata(chunk) {\n    debug('ondata');\n    increasedAwaitDrain = false;\n    var ret = dest.write(chunk);\n    if (false === ret && !increasedAwaitDrain) {\n      // If the user unpiped during `dest.write()`, it is possible\n      // to get stuck in a permanently paused state if that write\n      // also returned false.\n      // => Check whether `dest` is still a piping destination.\n      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n        debug('false write response, pause', src._readableState.awaitDrain);\n        src._readableState.awaitDrain++;\n        increasedAwaitDrain = true;\n      }\n      src.pause();\n    }\n  }\n\n  // if the dest has an error, then stop piping into it.\n  // however, don't suppress the throwing behavior for this.\n  function onerror(er) {\n    debug('onerror', er);\n    unpipe();\n    dest.removeListener('error', onerror);\n    if (listenerCount(dest, 'error') === 0) dest.emit('error', er);\n  }\n\n  // Make sure our error handler is attached before userland ones.\n  prependListener(dest, 'error', onerror);\n\n  // Both close and finish should trigger unpipe, but only once.\n  function onclose() {\n    dest.removeListener('finish', onfinish);\n    unpipe();\n  }\n  dest.once('close', onclose);\n  function onfinish() {\n    debug('onfinish');\n    dest.removeListener('close', onclose);\n    unpipe();\n  }\n  dest.once('finish', onfinish);\n\n  function unpipe() {\n    debug('unpipe');\n    src.unpipe(dest);\n  }\n\n  // tell the dest that it's being piped to\n  dest.emit('pipe', src);\n\n  // start the flow if it hasn't been started already.\n  if (!state.flowing) {\n    debug('pipe resume');\n    src.resume();\n  }\n\n  return dest;\n};\n\nfunction pipeOnDrain(src) {\n  return function () {\n    var state = src._readableState;\n    debug('pipeOnDrain', state.awaitDrain);\n    if (state.awaitDrain) state.awaitDrain--;\n    if (state.awaitDrain === 0 && src.listeners('data').length) {\n      state.flowing = true;\n      flow(src);\n    }\n  };\n}\n\nReadable.prototype.unpipe = function (dest) {\n  var state = this._readableState;\n\n  // if we're not piping anywhere, then do nothing.\n  if (state.pipesCount === 0) return this;\n\n  // just one destination.  most common case.\n  if (state.pipesCount === 1) {\n    // passed in one, but it's not the right one.\n    if (dest && dest !== state.pipes) return this;\n\n    if (!dest) dest = state.pipes;\n\n    // got a match.\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n    if (dest) dest.emit('unpipe', this);\n    return this;\n  }\n\n  // slow case. multiple pipe destinations.\n\n  if (!dest) {\n    // remove all.\n    var dests = state.pipes;\n    var len = state.pipesCount;\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n\n    for (var _i = 0; _i < len; _i++) {\n      dests[_i].emit('unpipe', this);\n    }return this;\n  }\n\n  // try to find the right one.\n  var i = indexOf(state.pipes, dest);\n  if (i === -1) return this;\n\n  state.pipes.splice(i, 1);\n  state.pipesCount -= 1;\n  if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n  dest.emit('unpipe', this);\n\n  return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n  var res = _vendor_events_events_js__WEBPACK_IMPORTED_MODULE_1__.e.prototype.on.call(this, ev, fn);\n\n  if (ev === 'data') {\n    // Start flowing on next tick if stream isn't explicitly paused\n    if (this._readableState.flowing !== false) this.resume();\n  } else if (ev === 'readable') {\n    var state = this._readableState;\n    if (!state.endEmitted && !state.readableListening) {\n      state.readableListening = state.needReadable = true;\n      state.emittedReadable = false;\n      if (!state.reading) {\n        _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_6__.b.nextTick(nReadingNextTick, this);\n      } else if (state.length) {\n        emitReadable(this);\n      }\n    }\n  }\n\n  return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n  debug('readable nexttick read 0');\n  self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n  var state = this._readableState;\n  if (!state.flowing) {\n    debug('resume');\n    state.flowing = true;\n    resume(this, state);\n  }\n  return this;\n};\n\nfunction resume(stream, state) {\n  if (!state.resumeScheduled) {\n    state.resumeScheduled = true;\n    _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_6__.b.nextTick(resume_, stream, state);\n  }\n}\n\nfunction resume_(stream, state) {\n  if (!state.reading) {\n    debug('resume read 0');\n    stream.read(0);\n  }\n\n  state.resumeScheduled = false;\n  state.awaitDrain = 0;\n  stream.emit('resume');\n  flow(stream);\n  if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n  debug('call pause flowing=%j', this._readableState.flowing);\n  if (false !== this._readableState.flowing) {\n    debug('pause');\n    this._readableState.flowing = false;\n    this.emit('pause');\n  }\n  return this;\n};\n\nfunction flow(stream) {\n  var state = stream._readableState;\n  debug('flow', state.flowing);\n  while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n  var state = this._readableState;\n  var paused = false;\n\n  var self = this;\n  stream.on('end', function () {\n    debug('wrapped end');\n    if (state.decoder && !state.ended) {\n      var chunk = state.decoder.end();\n      if (chunk && chunk.length) self.push(chunk);\n    }\n\n    self.push(null);\n  });\n\n  stream.on('data', function (chunk) {\n    debug('wrapped data');\n    if (state.decoder) chunk = state.decoder.write(chunk);\n\n    // don't skip over falsy values in objectMode\n    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n    var ret = self.push(chunk);\n    if (!ret) {\n      paused = true;\n      stream.pause();\n    }\n  });\n\n  // proxy all the other methods.\n  // important when wrapping filters and duplexes.\n  for (var i in stream) {\n    if (this[i] === undefined && typeof stream[i] === 'function') {\n      this[i] = function (method) {\n        return function () {\n          return stream[method].apply(stream, arguments);\n        };\n      }(i);\n    }\n  }\n\n  // proxy certain important events.\n  var events = ['error', 'close', 'destroy', 'pause', 'resume'];\n  forEach(events, function (ev) {\n    stream.on(ev, self.emit.bind(self, ev));\n  });\n\n  // when we try to consume some more bytes, simply unpause the\n  // underlying stream.\n  self._read = function (n) {\n    debug('wrapped _read', n);\n    if (paused) {\n      paused = false;\n      stream.resume();\n    }\n  };\n\n  return self;\n};\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n  // nothing buffered\n  if (state.length === 0) return null;\n\n  var ret;\n  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n    // read it all, truncate the list\n    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n    state.buffer.clear();\n  } else {\n    // read part of list\n    ret = fromListPartial(n, state.buffer, state.decoder);\n  }\n\n  return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n  var ret;\n  if (n < list.head.data.length) {\n    // slice is the same for buffers and strings\n    ret = list.head.data.slice(0, n);\n    list.head.data = list.head.data.slice(n);\n  } else if (n === list.head.data.length) {\n    // first chunk is a perfect match\n    ret = list.shift();\n  } else {\n    // result spans more than one buffer\n    ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n  }\n  return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n  var p = list.head;\n  var c = 1;\n  var ret = p.data;\n  n -= ret.length;\n  while (p = p.next) {\n    var str = p.data;\n    var nb = n > str.length ? str.length : n;\n    if (nb === str.length) ret += str;else ret += str.slice(0, n);\n    n -= nb;\n    if (n === 0) {\n      if (nb === str.length) {\n        ++c;\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\n      } else {\n        list.head = p;\n        p.data = str.slice(nb);\n      }\n      break;\n    }\n    ++c;\n  }\n  list.length -= c;\n  return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n  var ret = _polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B.allocUnsafe(n);\n  var p = list.head;\n  var c = 1;\n  p.data.copy(ret);\n  n -= p.data.length;\n  while (p = p.next) {\n    var buf = p.data;\n    var nb = n > buf.length ? buf.length : n;\n    buf.copy(ret, ret.length - n, 0, nb);\n    n -= nb;\n    if (n === 0) {\n      if (nb === buf.length) {\n        ++c;\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\n      } else {\n        list.head = p;\n        p.data = buf.slice(nb);\n      }\n      break;\n    }\n    ++c;\n  }\n  list.length -= c;\n  return ret;\n}\n\nfunction endReadable(stream) {\n  var state = stream._readableState;\n\n  // If we get here before consuming all the bytes, then that is a\n  // bug in node.  Should never happen.\n  if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n  if (!state.endEmitted) {\n    state.ended = true;\n    _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_6__.b.nextTick(endReadableNT, state, stream);\n  }\n}\n\nfunction endReadableNT(state, stream) {\n  // Check that we didn't get one last unshift.\n  if (!state.endEmitted && state.length === 0) {\n    state.endEmitted = true;\n    stream.readable = false;\n    stream.emit('end');\n  }\n}\n\nfunction forEach(xs, f) {\n  for (var i = 0, l = xs.length; i < l; i++) {\n    f(xs[i], i);\n  }\n}\n\nfunction indexOf(xs, x) {\n  for (var i = 0, l = xs.length; i < l; i++) {\n    if (xs[i] === x) return i;\n  }\n  return -1;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_readable.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_transform.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_transform.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"T\": () => (/* binding */ Transform)\n/* harmony export */ });\n/* harmony import */ var _polyfill_node_stream_duplex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfill-node__stream_duplex.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_duplex.js\");\n/* harmony import */ var _vendor_util_util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vendor/util/util.js */ \"./node_modules/@kitware/vtk.js/vendor/util/util.js\");\n\n\n\n// a transform stream is a readable/writable stream where you do\n_vendor_util_util_js__WEBPACK_IMPORTED_MODULE_1__.u.inherits(Transform, _polyfill_node_stream_duplex_js__WEBPACK_IMPORTED_MODULE_0__.D);\n\nfunction TransformState(stream) {\n  this.afterTransform = function (er, data) {\n    return afterTransform(stream, er, data);\n  };\n\n  this.needTransform = false;\n  this.transforming = false;\n  this.writecb = null;\n  this.writechunk = null;\n  this.writeencoding = null;\n}\n\nfunction afterTransform(stream, er, data) {\n  var ts = stream._transformState;\n  ts.transforming = false;\n\n  var cb = ts.writecb;\n\n  if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));\n\n  ts.writechunk = null;\n  ts.writecb = null;\n\n  if (data !== null && data !== undefined) stream.push(data);\n\n  cb(er);\n\n  var rs = stream._readableState;\n  rs.reading = false;\n  if (rs.needReadable || rs.length < rs.highWaterMark) {\n    stream._read(rs.highWaterMark);\n  }\n}\nfunction Transform(options) {\n  if (!(this instanceof Transform)) return new Transform(options);\n\n  _polyfill_node_stream_duplex_js__WEBPACK_IMPORTED_MODULE_0__.D.call(this, options);\n\n  this._transformState = new TransformState(this);\n\n  // when the writable side finishes, then flush out anything remaining.\n  var stream = this;\n\n  // start out asking for a readable event once data is transformed.\n  this._readableState.needReadable = true;\n\n  // we have implemented the _read method, and done the other things\n  // that Readable wants before the first _read call, so unset the\n  // sync guard flag.\n  this._readableState.sync = false;\n\n  if (options) {\n    if (typeof options.transform === 'function') this._transform = options.transform;\n\n    if (typeof options.flush === 'function') this._flush = options.flush;\n  }\n\n  this.once('prefinish', function () {\n    if (typeof this._flush === 'function') this._flush(function (er) {\n      done(stream, er);\n    });else done(stream);\n  });\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n  this._transformState.needTransform = false;\n  return _polyfill_node_stream_duplex_js__WEBPACK_IMPORTED_MODULE_0__.D.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side.  You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk.  If you pass\n// an error, then that'll put the hurt on the whole operation.  If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n  throw new Error('Not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n  var ts = this._transformState;\n  ts.writecb = cb;\n  ts.writechunk = chunk;\n  ts.writeencoding = encoding;\n  if (!ts.transforming) {\n    var rs = this._readableState;\n    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n  }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n  var ts = this._transformState;\n\n  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n    ts.transforming = true;\n    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n  } else {\n    // mark that we need a transform, so that any data that comes in\n    // will get processed, now that we've asked for it.\n    ts.needTransform = true;\n  }\n};\n\nfunction done(stream, er) {\n  if (er) return stream.emit('error', er);\n\n  // if there's nothing in the write buffer, then that means\n  // that nothing more will ever be provided\n  var ws = stream._writableState;\n  var ts = stream._transformState;\n\n  if (ws.length) throw new Error('Calling transform done when ws.length != 0');\n\n  if (ts.transforming) throw new Error('Calling transform done when still transforming');\n\n  return stream.push(null);\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_transform.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_writable.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_writable.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"W\": () => (/* binding */ Writable)\n/* harmony export */ });\n/* harmony import */ var _vendor_util_util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../vendor/util/util.js */ \"./node_modules/@kitware/vtk.js/vendor/util/util.js\");\n/* harmony import */ var _vendor_buffer_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vendor/buffer/index.js */ \"./node_modules/@kitware/vtk.js/vendor/buffer/index.js\");\n/* harmony import */ var _vendor_events_events_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../vendor/events/events.js */ \"./node_modules/@kitware/vtk.js/vendor/events/events.js\");\n/* harmony import */ var _polyfill_node_stream_duplex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./polyfill-node__stream_duplex.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_duplex.js\");\n/* harmony import */ var _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../vendor/process/browser.js */ \"./node_modules/@kitware/vtk.js/vendor/process/browser.js\");\n\n\n\n\n\n\n// A bit simpler than readable streams.\nWritable.WritableState = WritableState;\n_vendor_util_util_js__WEBPACK_IMPORTED_MODULE_0__.u.inherits(Writable, _vendor_events_events_js__WEBPACK_IMPORTED_MODULE_2__.e.EventEmitter);\n\nfunction nop() {}\n\nfunction WriteReq(chunk, encoding, cb) {\n  this.chunk = chunk;\n  this.encoding = encoding;\n  this.callback = cb;\n  this.next = null;\n}\n\nfunction WritableState(options, stream) {\n  Object.defineProperty(this, 'buffer', {\n    get: _vendor_util_util_js__WEBPACK_IMPORTED_MODULE_0__.u.deprecate(function () {\n      return this.getBuffer();\n    }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')\n  });\n  options = options || {};\n\n  // object stream flag to indicate whether or not this stream\n  // contains buffers or objects.\n  this.objectMode = !!options.objectMode;\n\n  if (stream instanceof _polyfill_node_stream_duplex_js__WEBPACK_IMPORTED_MODULE_3__.D) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n  // the point at which write() starts returning false\n  // Note: 0 is a valid value, means that we always return false if\n  // the entire buffer is not flushed immediately on write()\n  var hwm = options.highWaterMark;\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n  this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n  // cast to ints.\n  this.highWaterMark = ~ ~this.highWaterMark;\n\n  this.needDrain = false;\n  // at the start of calling end()\n  this.ending = false;\n  // when end() has been called, and returned\n  this.ended = false;\n  // when 'finish' is emitted\n  this.finished = false;\n\n  // should we decode strings into buffers before passing to _write?\n  // this is here so that some node-core streams can optimize string\n  // handling at a lower level.\n  var noDecode = options.decodeStrings === false;\n  this.decodeStrings = !noDecode;\n\n  // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n  // not an actual buffer we keep track of, but a measurement\n  // of how much we're waiting to get pushed to some underlying\n  // socket or file.\n  this.length = 0;\n\n  // a flag to see when we're in the middle of a write.\n  this.writing = false;\n\n  // when true all writes will be buffered until .uncork() call\n  this.corked = 0;\n\n  // a flag to be able to tell if the onwrite cb is called immediately,\n  // or on a later tick.  We set this to true at first, because any\n  // actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first write call.\n  this.sync = true;\n\n  // a flag to know if we're processing previously buffered items, which\n  // may call the _write() callback in the same tick, so that we don't\n  // end up in an overlapped onwrite situation.\n  this.bufferProcessing = false;\n\n  // the callback that's passed to _write(chunk,cb)\n  this.onwrite = function (er) {\n    onwrite(stream, er);\n  };\n\n  // the callback that the user supplies to write(chunk,encoding,cb)\n  this.writecb = null;\n\n  // the amount that is being written when _write is called.\n  this.writelen = 0;\n\n  this.bufferedRequest = null;\n  this.lastBufferedRequest = null;\n\n  // number of pending user-supplied write callbacks\n  // this must be 0 before 'finish' can be emitted\n  this.pendingcb = 0;\n\n  // emit prefinish if the only thing we're waiting for is _write cbs\n  // This is relevant for synchronous Transform streams\n  this.prefinished = false;\n\n  // True if the error was already emitted and should not be thrown again\n  this.errorEmitted = false;\n\n  // count buffered requests\n  this.bufferedRequestCount = 0;\n\n  // allocate the first CorkedRequest, there is always\n  // one allocated and free to use, and we maintain at most two\n  this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function writableStateGetBuffer() {\n  var current = this.bufferedRequest;\n  var out = [];\n  while (current) {\n    out.push(current);\n    current = current.next;\n  }\n  return out;\n};\nfunction Writable(options) {\n\n  // Writable ctor is applied to Duplexes, though they're not\n  // instanceof Writable, they're instanceof Readable.\n  if (!(this instanceof Writable) && !(this instanceof _polyfill_node_stream_duplex_js__WEBPACK_IMPORTED_MODULE_3__.D)) return new Writable(options);\n\n  this._writableState = new WritableState(options, this);\n\n  // legacy.\n  this.writable = true;\n\n  if (options) {\n    if (typeof options.write === 'function') this._write = options.write;\n\n    if (typeof options.writev === 'function') this._writev = options.writev;\n  }\n\n  _vendor_events_events_js__WEBPACK_IMPORTED_MODULE_2__.e.EventEmitter.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n  this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n  var er = new Error('write after end');\n  // TODO: defer error events consistently everywhere, not just the cb\n  stream.emit('error', er);\n  _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_4__.b.nextTick(cb, er);\n}\n\n// If we get something that is not a buffer, string, null, or undefined,\n// and we're not in objectMode, then that's an error.\n// Otherwise stream chunks are all considered to be of length=1, and the\n// watermarks determine how many objects to keep in the buffer, rather than\n// how many bytes or characters.\nfunction validChunk(stream, state, chunk, cb) {\n  var valid = true;\n  var er = false;\n  // Always throw error if a null is written\n  // if we are not in object mode then throw\n  // if it is not a buffer, string, or undefined.\n  if (chunk === null) {\n    er = new TypeError('May not write null values to stream');\n  } else if (!_vendor_buffer_index_js__WEBPACK_IMPORTED_MODULE_1__.b.Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n    er = new TypeError('Invalid non-string/buffer chunk');\n  }\n  if (er) {\n    stream.emit('error', er);\n    _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_4__.b.nextTick(cb, er);\n    valid = false;\n  }\n  return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n  var state = this._writableState;\n  var ret = false;\n\n  if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (_vendor_buffer_index_js__WEBPACK_IMPORTED_MODULE_1__.b.Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n  if (typeof cb !== 'function') cb = nop;\n\n  if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {\n    state.pendingcb++;\n    ret = writeOrBuffer(this, state, chunk, encoding, cb);\n  }\n\n  return ret;\n};\n\nWritable.prototype.cork = function () {\n  var state = this._writableState;\n\n  state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n  var state = this._writableState;\n\n  if (state.corked) {\n    state.corked--;\n\n    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n  }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n  // node::ParseEncoding() requires lower case.\n  if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n  this._writableState.defaultEncoding = encoding;\n  return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n    chunk = _vendor_buffer_index_js__WEBPACK_IMPORTED_MODULE_1__.b.Buffer.from(chunk, encoding);\n  }\n  return chunk;\n}\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn.  Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, chunk, encoding, cb) {\n  chunk = decodeChunk(state, chunk, encoding);\n\n  if (_vendor_buffer_index_js__WEBPACK_IMPORTED_MODULE_1__.b.Buffer.isBuffer(chunk)) encoding = 'buffer';\n  var len = state.objectMode ? 1 : chunk.length;\n\n  state.length += len;\n\n  var ret = state.length < state.highWaterMark;\n  // we must ensure that previous needDrain will not be reset to false.\n  if (!ret) state.needDrain = true;\n\n  if (state.writing || state.corked) {\n    var last = state.lastBufferedRequest;\n    state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);\n    if (last) {\n      last.next = state.lastBufferedRequest;\n    } else {\n      state.bufferedRequest = state.lastBufferedRequest;\n    }\n    state.bufferedRequestCount += 1;\n  } else {\n    doWrite(stream, state, false, len, chunk, encoding, cb);\n  }\n\n  return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n  state.writelen = len;\n  state.writecb = cb;\n  state.writing = true;\n  state.sync = true;\n  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n  state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n  --state.pendingcb;\n  if (sync) _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_4__.b.nextTick(cb, er);else cb(er);\n\n  stream._writableState.errorEmitted = true;\n  stream.emit('error', er);\n}\n\nfunction onwriteStateUpdate(state) {\n  state.writing = false;\n  state.writecb = null;\n  state.length -= state.writelen;\n  state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n  var state = stream._writableState;\n  var sync = state.sync;\n  var cb = state.writecb;\n\n  onwriteStateUpdate(state);\n\n  if (er) onwriteError(stream, state, sync, er, cb);else {\n    // Check if we're actually ready to finish, but don't emit yet\n    var finished = needFinish(state);\n\n    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n      clearBuffer(stream, state);\n    }\n\n    if (sync) {\n      /*<replacement>*/\n        _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_4__.b.nextTick(afterWrite, stream, state, finished, cb);\n      /*</replacement>*/\n    } else {\n        afterWrite(stream, state, finished, cb);\n      }\n  }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n  if (!finished) onwriteDrain(stream, state);\n  state.pendingcb--;\n  cb();\n  finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n  if (state.length === 0 && state.needDrain) {\n    state.needDrain = false;\n    stream.emit('drain');\n  }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n  state.bufferProcessing = true;\n  var entry = state.bufferedRequest;\n\n  if (stream._writev && entry && entry.next) {\n    // Fast case, write everything using _writev()\n    var l = state.bufferedRequestCount;\n    var buffer = new Array(l);\n    var holder = state.corkedRequestsFree;\n    holder.entry = entry;\n\n    var count = 0;\n    while (entry) {\n      buffer[count] = entry;\n      entry = entry.next;\n      count += 1;\n    }\n\n    doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n    // doWrite is almost always async, defer these to save a bit of time\n    // as the hot path ends with doWrite\n    state.pendingcb++;\n    state.lastBufferedRequest = null;\n    if (holder.next) {\n      state.corkedRequestsFree = holder.next;\n      holder.next = null;\n    } else {\n      state.corkedRequestsFree = new CorkedRequest(state);\n    }\n  } else {\n    // Slow case, write chunks one-by-one\n    while (entry) {\n      var chunk = entry.chunk;\n      var encoding = entry.encoding;\n      var cb = entry.callback;\n      var len = state.objectMode ? 1 : chunk.length;\n\n      doWrite(stream, state, false, len, chunk, encoding, cb);\n      entry = entry.next;\n      // if we didn't call the onwrite immediately, then\n      // it means that we need to wait until it does.\n      // also, that means that the chunk and cb are currently\n      // being processed, so move the buffer counter past them.\n      if (state.writing) {\n        break;\n      }\n    }\n\n    if (entry === null) state.lastBufferedRequest = null;\n  }\n\n  state.bufferedRequestCount = 0;\n  state.bufferedRequest = entry;\n  state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n  cb(new Error('not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n  var state = this._writableState;\n\n  if (typeof chunk === 'function') {\n    cb = chunk;\n    chunk = null;\n    encoding = null;\n  } else if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n  // .end() fully uncorks\n  if (state.corked) {\n    state.corked = 1;\n    this.uncork();\n  }\n\n  // ignore unnecessary end() calls.\n  if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction prefinish(stream, state) {\n  if (!state.prefinished) {\n    state.prefinished = true;\n    stream.emit('prefinish');\n  }\n}\n\nfunction finishMaybe(stream, state) {\n  var need = needFinish(state);\n  if (need) {\n    if (state.pendingcb === 0) {\n      prefinish(stream, state);\n      state.finished = true;\n      stream.emit('finish');\n    } else {\n      prefinish(stream, state);\n    }\n  }\n  return need;\n}\n\nfunction endWritable(stream, state, cb) {\n  state.ending = true;\n  finishMaybe(stream, state);\n  if (cb) {\n    if (state.finished) _vendor_process_browser_js__WEBPACK_IMPORTED_MODULE_4__.b.nextTick(cb);else stream.once('finish', cb);\n  }\n  state.ended = true;\n  stream.writable = false;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n  var _this = this;\n\n  this.next = null;\n  this.entry = null;\n\n  this.finish = function (err) {\n    var entry = _this.entry;\n    _this.entry = null;\n    while (entry) {\n      var cb = entry.callback;\n      state.pendingcb--;\n      cb(err);\n      entry = entry.next;\n    }\n    if (state.corkedRequestsFree) {\n      state.corkedRequestsFree.next = _this;\n    } else {\n      state.corkedRequestsFree = _this;\n    }\n  };\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_writable.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/polyfill-node_buffer.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/polyfill-node_buffer.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/polyfill-node_global.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/polyfill-node_global.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"g\": () => (/* binding */ global)\n/* harmony export */ });\nvar global = (typeof global !== \"undefined\" ? global :\n  typeof self !== \"undefined\" ? self :\n  typeof window !== \"undefined\" ? window : {});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/polyfill-node_global.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/polyfill-node_process.js":
/*!************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/polyfill-node_process.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"b\": () => (/* binding */ browser$1)\n/* harmony export */ });\n/* harmony import */ var _polyfill_node_global_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfill-node_global.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node_global.js\");\n\n\n// shim for using process in browser\n// based off https://github.com/defunctzombie/node-process/blob/master/browser.js\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\nvar cachedSetTimeout = defaultSetTimout;\nvar cachedClearTimeout = defaultClearTimeout;\nif (typeof _polyfill_node_global_js__WEBPACK_IMPORTED_MODULE_0__.g.setTimeout === 'function') {\n    cachedSetTimeout = setTimeout;\n}\nif (typeof _polyfill_node_global_js__WEBPACK_IMPORTED_MODULE_0__.g.clearTimeout === 'function') {\n    cachedClearTimeout = clearTimeout;\n}\n\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\nfunction nextTick(fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n}\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nvar title = 'browser';\nvar platform = 'browser';\nvar browser = true;\nvar env = {};\nvar argv = [];\nvar version = ''; // empty string to avoid regexp issues\nvar versions = {};\nvar release = {};\nvar config = {};\n\nfunction noop() {}\n\nvar on = noop;\nvar addListener = noop;\nvar once = noop;\nvar off = noop;\nvar removeListener = noop;\nvar removeAllListeners = noop;\nvar emit = noop;\n\nfunction binding(name) {\n    throw new Error('process.binding is not supported');\n}\n\nfunction cwd () { return '/' }\nfunction chdir (dir) {\n    throw new Error('process.chdir is not supported');\n}function umask() { return 0; }\n\n// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js\nvar performance = _polyfill_node_global_js__WEBPACK_IMPORTED_MODULE_0__.g.performance || {};\nvar performanceNow =\n  performance.now        ||\n  performance.mozNow     ||\n  performance.msNow      ||\n  performance.oNow       ||\n  performance.webkitNow  ||\n  function(){ return (new Date()).getTime() };\n\n// generate timestamp or delta\n// see http://nodejs.org/api/process.html#process_process_hrtime\nfunction hrtime(previousTimestamp){\n  var clocktime = performanceNow.call(performance)*1e-3;\n  var seconds = Math.floor(clocktime);\n  var nanoseconds = Math.floor((clocktime%1)*1e9);\n  if (previousTimestamp) {\n    seconds = seconds - previousTimestamp[0];\n    nanoseconds = nanoseconds - previousTimestamp[1];\n    if (nanoseconds<0) {\n      seconds--;\n      nanoseconds += 1e9;\n    }\n  }\n  return [seconds,nanoseconds]\n}\n\nvar startTime = new Date();\nfunction uptime() {\n  var currentTime = new Date();\n  var dif = currentTime - startTime;\n  return dif / 1000;\n}\n\nvar browser$1 = {\n  nextTick: nextTick,\n  title: title,\n  browser: browser,\n  env: env,\n  argv: argv,\n  version: version,\n  versions: versions,\n  on: on,\n  addListener: addListener,\n  once: once,\n  off: off,\n  removeListener: removeListener,\n  removeAllListeners: removeAllListeners,\n  emit: emit,\n  binding: binding,\n  cwd: cwd,\n  chdir: chdir,\n  umask: umask,\n  hrtime: hrtime,\n  platform: platform,\n  release: release,\n  config: config,\n  uptime: uptime\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/polyfill-node_process.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/polyfill-node_stream.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/polyfill-node_stream.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"_\": () => (/* binding */ _polyfillNode_stream)\n/* harmony export */ });\n/* harmony import */ var _vendor_events_events_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../vendor/events/events.js */ \"./node_modules/@kitware/vtk.js/vendor/events/events.js\");\n/* harmony import */ var _vendor_util_util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vendor/util/util.js */ \"./node_modules/@kitware/vtk.js/vendor/util/util.js\");\n/* harmony import */ var _polyfill_node_stream_duplex_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./polyfill-node__stream_duplex.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_duplex.js\");\n/* harmony import */ var _polyfill_node_stream_readable_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./polyfill-node__stream_readable.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_readable.js\");\n/* harmony import */ var _polyfill_node_stream_writable_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./polyfill-node__stream_writable.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_writable.js\");\n/* harmony import */ var _polyfill_node_stream_transform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./polyfill-node__stream_transform.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_transform.js\");\n/* harmony import */ var _polyfill_node_stream_passthrough_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./polyfill-node__stream_passthrough.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node__stream_passthrough.js\");\n\n\n\n\n\n\n\n\n_vendor_util_util_js__WEBPACK_IMPORTED_MODULE_1__.u.inherits(Stream, _vendor_events_events_js__WEBPACK_IMPORTED_MODULE_0__.e);\nStream.Readable = _polyfill_node_stream_readable_js__WEBPACK_IMPORTED_MODULE_3__.R;\nStream.Writable = _polyfill_node_stream_writable_js__WEBPACK_IMPORTED_MODULE_4__.W;\nStream.Duplex = _polyfill_node_stream_duplex_js__WEBPACK_IMPORTED_MODULE_2__.D;\nStream.Transform = _polyfill_node_stream_transform_js__WEBPACK_IMPORTED_MODULE_5__.T;\nStream.PassThrough = _polyfill_node_stream_passthrough_js__WEBPACK_IMPORTED_MODULE_6__.P;\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n// old-style streams.  Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n  _vendor_events_events_js__WEBPACK_IMPORTED_MODULE_0__.e.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n  var source = this;\n\n  function ondata(chunk) {\n    if (dest.writable) {\n      if (false === dest.write(chunk) && source.pause) {\n        source.pause();\n      }\n    }\n  }\n\n  source.on('data', ondata);\n\n  function ondrain() {\n    if (source.readable && source.resume) {\n      source.resume();\n    }\n  }\n\n  dest.on('drain', ondrain);\n\n  // If the 'end' option is not supplied, dest.end() will be called when\n  // source gets the 'end' or 'close' events.  Only dest.end() once.\n  if (!dest._isStdio && (!options || options.end !== false)) {\n    source.on('end', onend);\n    source.on('close', onclose);\n  }\n\n  var didOnEnd = false;\n  function onend() {\n    if (didOnEnd) return;\n    didOnEnd = true;\n\n    dest.end();\n  }\n\n\n  function onclose() {\n    if (didOnEnd) return;\n    didOnEnd = true;\n\n    if (typeof dest.destroy === 'function') dest.destroy();\n  }\n\n  // don't leave dangling pipes when there are errors.\n  function onerror(er) {\n    cleanup();\n    if (_vendor_events_events_js__WEBPACK_IMPORTED_MODULE_0__.e.listenerCount(this, 'error') === 0) {\n      throw er; // Unhandled stream error in pipe.\n    }\n  }\n\n  source.on('error', onerror);\n  dest.on('error', onerror);\n\n  // remove all the event listeners that were added.\n  function cleanup() {\n    source.removeListener('data', ondata);\n    dest.removeListener('drain', ondrain);\n\n    source.removeListener('end', onend);\n    source.removeListener('close', onclose);\n\n    source.removeListener('error', onerror);\n    dest.removeListener('error', onerror);\n\n    source.removeListener('end', cleanup);\n    source.removeListener('close', cleanup);\n\n    dest.removeListener('close', cleanup);\n  }\n\n  source.on('end', cleanup);\n  source.on('close', cleanup);\n\n  dest.on('close', cleanup);\n\n  dest.emit('pipe', source);\n\n  // Allow for unix-like usage: A.pipe(B).pipe(C)\n  return dest;\n};\n\nvar _polyfillNode_stream = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  'default': Stream,\n  Readable: _polyfill_node_stream_readable_js__WEBPACK_IMPORTED_MODULE_3__.R,\n  Writable: _polyfill_node_stream_writable_js__WEBPACK_IMPORTED_MODULE_4__.W,\n  Duplex: _polyfill_node_stream_duplex_js__WEBPACK_IMPORTED_MODULE_2__.D,\n  Transform: _polyfill_node_stream_transform_js__WEBPACK_IMPORTED_MODULE_5__.T,\n  PassThrough: _polyfill_node_stream_passthrough_js__WEBPACK_IMPORTED_MODULE_6__.P,\n  Stream: Stream\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/polyfill-node_stream.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/_virtual/rollup_plugin_ignore_empty_module_placeholder.js":
/*!************************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/_virtual/rollup_plugin_ignore_empty_module_placeholder.js ***!
  \************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"_\": () => (/* binding */ _rollup_plugin_ignore_empty_module_placeholder$1)\n/* harmony export */ });\nvar _rollup_plugin_ignore_empty_module_placeholder = {};\n\nvar _rollup_plugin_ignore_empty_module_placeholder$1 = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\t'default': _rollup_plugin_ignore_empty_module_placeholder\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/_virtual/rollup_plugin_ignore_empty_module_placeholder.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/macro.js":
/*!***********************************************!*\
  !*** ./node_modules/@kitware/vtk.js/macro.js ***!
  \***********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   \"EVENT_ABORT\": () => (/* binding */ EVENT_ABORT),\n/* harmony export */   \"TYPED_ARRAYS\": () => (/* binding */ TYPED_ARRAYS),\n/* harmony export */   \"VOID\": () => (/* binding */ VOID),\n/* harmony export */   \"algo\": () => (/* binding */ algo),\n/* harmony export */   \"capitalize\": () => (/* binding */ capitalize),\n/* harmony export */   \"chain\": () => (/* binding */ chain),\n/* harmony export */   \"debounce\": () => (/* binding */ debounce),\n/* harmony export */   \"event\": () => (/* binding */ event),\n/* harmony export */   \"formatBytesToProperUnit\": () => (/* binding */ formatBytesToProperUnit),\n/* harmony export */   \"formatNumbersWithThousandSeparator\": () => (/* binding */ formatNumbersWithThousandSeparator),\n/* harmony export */   \"get\": () => (/* binding */ get),\n/* harmony export */   \"getArray\": () => (/* binding */ getArray),\n/* harmony export */   \"isVtkObject\": () => (/* binding */ isVtkObject),\n/* harmony export */   \"keystore\": () => (/* binding */ keystore),\n/* harmony export */   \"newInstance\": () => (/* binding */ newInstance),\n/* harmony export */   \"newTypedArray\": () => (/* binding */ newTypedArray),\n/* harmony export */   \"newTypedArrayFrom\": () => (/* binding */ newTypedArrayFrom),\n/* harmony export */   \"normalizeWheel\": () => (/* binding */ normalizeWheel),\n/* harmony export */   \"obj\": () => (/* binding */ obj),\n/* harmony export */   \"proxy\": () => (/* binding */ proxy),\n/* harmony export */   \"proxyPropertyMapping\": () => (/* binding */ proxyPropertyMapping),\n/* harmony export */   \"proxyPropertyState\": () => (/* binding */ proxyPropertyState),\n/* harmony export */   \"set\": () => (/* binding */ set),\n/* harmony export */   \"setArray\": () => (/* binding */ setArray),\n/* harmony export */   \"setGet\": () => (/* binding */ setGet),\n/* harmony export */   \"setGetArray\": () => (/* binding */ setGetArray),\n/* harmony export */   \"setImmediateVTK\": () => (/* binding */ setImmediateVTK),\n/* harmony export */   \"setLoggerFunction\": () => (/* binding */ setLoggerFunction),\n/* harmony export */   \"throttle\": () => (/* binding */ throttle),\n/* harmony export */   \"traverseInstanceTree\": () => (/* binding */ traverseInstanceTree),\n/* harmony export */   \"uncapitalize\": () => (/* binding */ uncapitalize),\n/* harmony export */   \"vtkDebugMacro\": () => (/* binding */ vtkDebugMacro),\n/* harmony export */   \"vtkErrorMacro\": () => (/* binding */ vtkErrorMacro),\n/* harmony export */   \"vtkInfoMacro\": () => (/* binding */ vtkInfoMacro),\n/* harmony export */   \"vtkLogMacro\": () => (/* binding */ vtkLogMacro),\n/* harmony export */   \"vtkOnceErrorMacro\": () => (/* binding */ vtkOnceErrorMacro),\n/* harmony export */   \"vtkWarningMacro\": () => (/* binding */ vtkWarningMacro)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/construct */ \"./node_modules/@babel/runtime/helpers/esm/construct.js\");\n/* harmony import */ var _vtk_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./vtk.js */ \"./node_modules/@kitware/vtk.js/vtk.js\");\n/* harmony import */ var _Common_Core_ClassHierarchy_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Common/Core/ClassHierarchy.js */ \"./node_modules/@kitware/vtk.js/Common/Core/ClassHierarchy.js\");\n\n\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__.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; }\nvar globalMTime = 0;\nvar VOID = Symbol('void');\n\nfunction getCurrentGlobalMTime() {\n  return globalMTime;\n} // ----------------------------------------------------------------------------\n// Logging function calls\n// ----------------------------------------------------------------------------\n\n/* eslint-disable no-prototype-builtins                                      */\n\n\nvar fakeConsole = {};\n\nfunction noOp() {}\n\nvar consoleMethods = ['log', 'debug', 'info', 'warn', 'error', 'time', 'timeEnd', 'group', 'groupEnd'];\nconsoleMethods.forEach(function (methodName) {\n  fakeConsole[methodName] = noOp;\n});\n__webpack_require__.g.console = console.hasOwnProperty('log') ? console : fakeConsole;\nvar loggerFunctions = {\n  debug: noOp,\n  // Don't print debug by default\n  error: __webpack_require__.g.console.error || noOp,\n  info: __webpack_require__.g.console.info || noOp,\n  log: __webpack_require__.g.console.log || noOp,\n  warn: __webpack_require__.g.console.warn || noOp\n};\nfunction setLoggerFunction(name, fn) {\n  if (loggerFunctions[name]) {\n    loggerFunctions[name] = fn || noOp;\n  }\n}\nfunction vtkLogMacro() {\n  loggerFunctions.log.apply(loggerFunctions, arguments);\n}\nfunction vtkInfoMacro() {\n  loggerFunctions.info.apply(loggerFunctions, arguments);\n}\nfunction vtkDebugMacro() {\n  loggerFunctions.debug.apply(loggerFunctions, arguments);\n}\nfunction vtkErrorMacro() {\n  loggerFunctions.error.apply(loggerFunctions, arguments);\n}\nfunction vtkWarningMacro() {\n  loggerFunctions.warn.apply(loggerFunctions, arguments);\n}\nvar ERROR_ONCE_MAP = {};\nfunction vtkOnceErrorMacro(str) {\n  if (!ERROR_ONCE_MAP[str]) {\n    loggerFunctions.error(str);\n    ERROR_ONCE_MAP[str] = true;\n  }\n} // ----------------------------------------------------------------------------\n// TypedArray\n// ----------------------------------------------------------------------------\n\nvar TYPED_ARRAYS = Object.create(null);\nTYPED_ARRAYS.Float32Array = Float32Array;\nTYPED_ARRAYS.Float64Array = Float64Array;\nTYPED_ARRAYS.Uint8Array = Uint8Array;\nTYPED_ARRAYS.Int8Array = Int8Array;\nTYPED_ARRAYS.Uint16Array = Uint16Array;\nTYPED_ARRAYS.Int16Array = Int16Array;\nTYPED_ARRAYS.Uint32Array = Uint32Array;\nTYPED_ARRAYS.Int32Array = Int32Array;\nTYPED_ARRAYS.Uint8ClampedArray = Uint8ClampedArray; // TYPED_ARRAYS.BigInt64Array = BigInt64Array;\n// TYPED_ARRAYS.BigUint64Array = BigUint64Array;\n\nfunction newTypedArray(type) {\n  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    args[_key - 1] = arguments[_key];\n  }\n\n  return (0,_babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_4__.default)(TYPED_ARRAYS[type] || Float64Array, args);\n}\nfunction newTypedArrayFrom(type) {\n  var _ref;\n\n  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n    args[_key2 - 1] = arguments[_key2];\n  }\n\n  return (_ref = TYPED_ARRAYS[type] || Float64Array).from.apply(_ref, args);\n} // ----------------------------------------------------------------------------\n// capitilze provided string\n// ----------------------------------------------------------------------------\n\nfunction capitalize(str) {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n}\nfunction uncapitalize(str) {\n  return str.charAt(0).toLowerCase() + str.slice(1);\n} // ----------------------------------------------------------------------------\n// Convert byte size into a well formatted string\n// ----------------------------------------------------------------------------\n\nfunction formatBytesToProperUnit(size) {\n  var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n  var chunkSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1000;\n  var units = ['TB', 'GB', 'MB', 'KB'];\n  var value = Number(size);\n  var currentUnit = 'B';\n\n  while (value > chunkSize) {\n    value /= chunkSize;\n    currentUnit = units.pop();\n  }\n\n  return \"\".concat(value.toFixed(precision), \" \").concat(currentUnit);\n} // ----------------------------------------------------------------------------\n// Convert thousand number with proper separator\n// ----------------------------------------------------------------------------\n\nfunction formatNumbersWithThousandSeparator(n) {\n  var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';\n  var sections = [];\n  var size = n;\n\n  while (size > 1000) {\n    sections.push(\"000\".concat(size % 1000).slice(-3));\n    size = Math.floor(size / 1000);\n  }\n\n  if (size > 0) {\n    sections.push(size);\n  }\n\n  sections.reverse();\n  return sections.join(separator);\n} // ----------------------------------------------------------------------------\n// Array helper\n// ----------------------------------------------------------------------------\n\nfunction safeArrays(model) {\n  Object.keys(model).forEach(function (key) {\n    if (Array.isArray(model[key])) {\n      model[key] = [].concat(model[key]);\n    }\n  });\n} // ----------------------------------------------------------------------------\n// shallow equals\n// ----------------------------------------------------------------------------\n\n\nfunction shallowEquals(a, b) {\n  if (a === b) {\n    return true;\n  }\n\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) {\n      return false;\n    }\n\n    for (var i = 0; i < a.length; i++) {\n      if (a[i] !== b[i]) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  return false;\n} // ----------------------------------------------------------------------------\n\n\nfunction enumToString(e, value) {\n  return Object.keys(e).find(function (key) {\n    return e[key] === value;\n  });\n}\n\nfunction getStateArrayMapFunc(item) {\n  if (item.isA) {\n    return item.getState();\n  }\n\n  return item;\n} // ----------------------------------------------------------------------------\n// setImmediate\n// ----------------------------------------------------------------------------\n\n\nfunction setImmediateVTK(fn) {\n  setTimeout(fn, 0);\n} // ----------------------------------------------------------------------------\n// vtkObject: modified(), onModified(callback), delete()\n// ----------------------------------------------------------------------------\n\nfunction obj() {\n  var publicAPI = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var model = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  // Ensure each instance as a unique ref of array\n  safeArrays(model);\n  var callbacks = [];\n\n  if (!Number.isInteger(model.mtime)) {\n    model.mtime = ++globalMTime;\n  }\n\n  if (!('classHierarchy' in model)) {\n    model.classHierarchy = new _Common_Core_ClassHierarchy_js__WEBPACK_IMPORTED_MODULE_6__.default('vtkObject');\n  } else if (!(model.classHierarchy instanceof _Common_Core_ClassHierarchy_js__WEBPACK_IMPORTED_MODULE_6__.default)) {\n    model.classHierarchy = _Common_Core_ClassHierarchy_js__WEBPACK_IMPORTED_MODULE_6__.default.from(model.classHierarchy);\n  }\n\n  function off(index) {\n    callbacks[index] = null;\n  }\n\n  function on(index) {\n    function unsubscribe() {\n      off(index);\n    }\n\n    return Object.freeze({\n      unsubscribe: unsubscribe\n    });\n  }\n\n  publicAPI.isDeleted = function () {\n    return !!model.deleted;\n  };\n\n  publicAPI.modified = function (otherMTime) {\n    if (model.deleted) {\n      vtkErrorMacro('instance deleted - cannot call any method');\n      return;\n    }\n\n    if (otherMTime && otherMTime < publicAPI.getMTime()) {\n      return;\n    }\n\n    model.mtime = ++globalMTime;\n    callbacks.forEach(function (callback) {\n      return callback && callback(publicAPI);\n    });\n  };\n\n  publicAPI.onModified = function (callback) {\n    if (model.deleted) {\n      vtkErrorMacro('instance deleted - cannot call any method');\n      return null;\n    }\n\n    var index = callbacks.length;\n    callbacks.push(callback);\n    return on(index);\n  };\n\n  publicAPI.getMTime = function () {\n    return model.mtime;\n  };\n\n  publicAPI.isA = function (className) {\n    var count = model.classHierarchy.length; // we go backwards as that is more likely for\n    // early termination\n\n    while (count--) {\n      if (model.classHierarchy[count] === className) {\n        return true;\n      }\n    }\n\n    return false;\n  };\n\n  publicAPI.getClassName = function () {\n    var depth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n    return model.classHierarchy[model.classHierarchy.length - 1 - depth];\n  };\n\n  publicAPI.set = function () {\n    var map = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    var noWarning = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    var noFunction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n    var ret = false;\n    Object.keys(map).forEach(function (name) {\n      var fn = noFunction ? null : publicAPI[\"set\".concat(capitalize(name))];\n\n      if (fn && Array.isArray(map[name]) && fn.length > 1) {\n        ret = fn.apply(void 0, (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__.default)(map[name])) || ret;\n      } else if (fn) {\n        ret = fn(map[name]) || ret;\n      } else {\n        // Set data on model directly\n        if (['mtime'].indexOf(name) === -1 && !noWarning) {\n          vtkWarningMacro(\"Warning: Set value to model directly \".concat(name, \", \").concat(map[name]));\n        }\n\n        model[name] = map[name];\n        ret = true;\n      }\n    });\n    return ret;\n  };\n\n  publicAPI.get = function () {\n    for (var _len3 = arguments.length, list = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n      list[_key3] = arguments[_key3];\n    }\n\n    if (!list.length) {\n      return model;\n    }\n\n    var subset = {};\n    list.forEach(function (name) {\n      subset[name] = model[name];\n    });\n    return subset;\n  };\n\n  publicAPI.getReferenceByName = function (val) {\n    return model[val];\n  };\n\n  publicAPI.delete = function () {\n    Object.keys(model).forEach(function (field) {\n      return delete model[field];\n    });\n    callbacks.forEach(function (el, index) {\n      return off(index);\n    }); // Flag the instance being deleted\n\n    model.deleted = true;\n  }; // Add serialization support\n\n\n  publicAPI.getState = function () {\n    var jsonArchive = _objectSpread(_objectSpread({}, model), {}, {\n      vtkClass: publicAPI.getClassName()\n    }); // Convert every vtkObject to its serializable form\n\n\n    Object.keys(jsonArchive).forEach(function (keyName) {\n      if (jsonArchive[keyName] === null || jsonArchive[keyName] === undefined || keyName[0] === '_' // protected members start with _\n      ) {\n          delete jsonArchive[keyName];\n        } else if (jsonArchive[keyName].isA) {\n        jsonArchive[keyName] = jsonArchive[keyName].getState();\n      } else if (Array.isArray(jsonArchive[keyName])) {\n        jsonArchive[keyName] = jsonArchive[keyName].map(getStateArrayMapFunc);\n      }\n    }); // Sort resulting object by key name\n\n    var sortedObj = {};\n    Object.keys(jsonArchive).sort().forEach(function (name) {\n      sortedObj[name] = jsonArchive[name];\n    }); // Remove mtime\n\n    if (sortedObj.mtime) {\n      delete sortedObj.mtime;\n    }\n\n    return sortedObj;\n  }; // Add shallowCopy(otherInstance) support\n\n\n  publicAPI.shallowCopy = function (other) {\n    var debug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n    if (other.getClassName() !== publicAPI.getClassName()) {\n      throw new Error(\"Cannot ShallowCopy \".concat(other.getClassName(), \" into \").concat(publicAPI.getClassName()));\n    }\n\n    var otherModel = other.get();\n    var keyList = Object.keys(model).sort();\n    var otherKeyList = Object.keys(otherModel).sort();\n    otherKeyList.forEach(function (key) {\n      var keyIdx = keyList.indexOf(key);\n\n      if (keyIdx === -1) {\n        if (debug) {\n          vtkDebugMacro(\"add \".concat(key, \" in shallowCopy\"));\n        }\n      } else {\n        keyList.splice(keyIdx, 1);\n      }\n\n      model[key] = otherModel[key];\n    });\n\n    if (keyList.length && debug) {\n      vtkDebugMacro(\"Untouched keys: \".concat(keyList.join(', ')));\n    }\n\n    publicAPI.modified();\n  }; // Allow usage as decorator\n\n\n  return publicAPI;\n} // ----------------------------------------------------------------------------\n// getXXX: add getters\n// ----------------------------------------------------------------------------\n\nfunction get(publicAPI, model, fieldNames) {\n  fieldNames.forEach(function (field) {\n    if ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__.default)(field) === 'object') {\n      publicAPI[\"get\".concat(capitalize(field.name))] = function () {\n        return model[field.name];\n      };\n    } else {\n      publicAPI[\"get\".concat(capitalize(field))] = function () {\n        return model[field];\n      };\n    }\n  });\n} // ----------------------------------------------------------------------------\n// setXXX: add setters\n// ----------------------------------------------------------------------------\n\nvar objectSetterMap = {\n  enum: function _enum(publicAPI, model, field) {\n    return function (value) {\n      if (typeof value === 'string') {\n        if (field.enum[value] !== undefined) {\n          if (model[field.name] !== field.enum[value]) {\n            model[field.name] = field.enum[value];\n            publicAPI.modified();\n            return true;\n          }\n\n          return false;\n        }\n\n        vtkErrorMacro(\"Set Enum with invalid argument \".concat(field, \", \").concat(value));\n        throw new RangeError('Set Enum with invalid string argument');\n      }\n\n      if (typeof value === 'number') {\n        if (model[field.name] !== value) {\n          if (Object.keys(field.enum).map(function (key) {\n            return field.enum[key];\n          }).indexOf(value) !== -1) {\n            model[field.name] = value;\n            publicAPI.modified();\n            return true;\n          }\n\n          vtkErrorMacro(\"Set Enum outside numeric range \".concat(field, \", \").concat(value));\n          throw new RangeError('Set Enum outside numeric range');\n        }\n\n        return false;\n      }\n\n      vtkErrorMacro(\"Set Enum with invalid argument (String/Number) \".concat(field, \", \").concat(value));\n      throw new TypeError('Set Enum with invalid argument (String/Number)');\n    };\n  }\n};\n\nfunction findSetter(field) {\n  if ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__.default)(field) === 'object') {\n    var fn = objectSetterMap[field.type];\n\n    if (fn) {\n      return function (publicAPI, model) {\n        return fn(publicAPI, model, field);\n      };\n    }\n\n    vtkErrorMacro(\"No setter for field \".concat(field));\n    throw new TypeError('No setter for field');\n  }\n\n  return function getSetter(publicAPI, model) {\n    return function setter(value) {\n      if (model.deleted) {\n        vtkErrorMacro('instance deleted - cannot call any method');\n        return false;\n      }\n\n      if (model[field] !== value) {\n        model[field] = value;\n        publicAPI.modified();\n        return true;\n      }\n\n      return false;\n    };\n  };\n}\n\nfunction set(publicAPI, model, fields) {\n  fields.forEach(function (field) {\n    if ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__.default)(field) === 'object') {\n      publicAPI[\"set\".concat(capitalize(field.name))] = findSetter(field)(publicAPI, model);\n    } else {\n      publicAPI[\"set\".concat(capitalize(field))] = findSetter(field)(publicAPI, model);\n    }\n  });\n} // ----------------------------------------------------------------------------\n// set/get XXX: add both setters and getters\n// ----------------------------------------------------------------------------\n\nfunction setGet(publicAPI, model, fieldNames) {\n  get(publicAPI, model, fieldNames);\n  set(publicAPI, model, fieldNames);\n} // ----------------------------------------------------------------------------\n// getXXX: add getters for object of type array with copy to be safe\n// getXXXByReference: add getters for object of type array without copy\n// ----------------------------------------------------------------------------\n\nfunction getArray(publicAPI, model, fieldNames) {\n  fieldNames.forEach(function (field) {\n    publicAPI[\"get\".concat(capitalize(field))] = function () {\n      return [].concat(model[field]);\n    };\n\n    publicAPI[\"get\".concat(capitalize(field), \"ByReference\")] = function () {\n      return model[field];\n    };\n  });\n} // ----------------------------------------------------------------------------\n// setXXX: add setter for object of type array\n// if 'defaultVal' is supplied, shorter arrays will be padded to 'size' with 'defaultVal'\n// set...From: fast path to copy the content of an array to the current one without call to modified.\n// ----------------------------------------------------------------------------\n\nfunction setArray(publicAPI, model, fieldNames, size) {\n  var defaultVal = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined;\n  fieldNames.forEach(function (field) {\n    publicAPI[\"set\".concat(capitalize(field))] = function () {\n      if (model.deleted) {\n        vtkErrorMacro('instance deleted - cannot call any method');\n        return false;\n      }\n\n      for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n        args[_key4] = arguments[_key4];\n      }\n\n      var array = args; // allow an array passed as a single arg.\n\n      if (array.length === 1 && array[0].length) {\n        /* eslint-disable prefer-destructuring */\n        array = array[0];\n        /* eslint-enable prefer-destructuring */\n      }\n\n      if (array.length !== size) {\n        if (array.length < size && defaultVal !== undefined) {\n          array = Array.from(array);\n\n          while (array.length < size) {\n            array.push(defaultVal);\n          }\n        } else {\n          throw new RangeError(\"Invalid number of values for array setter (\".concat(field, \")\"));\n        }\n      }\n\n      var changeDetected = model[field].some(function (item, index) {\n        return item !== array[index];\n      });\n\n      if (changeDetected || model[field].length !== array.length) {\n        model[field] = Array.from(array);\n        publicAPI.modified();\n        return true;\n      }\n\n      return false;\n    };\n\n    publicAPI[\"set\".concat(capitalize(field), \"From\")] = function (otherArray) {\n      var target = model[field];\n      otherArray.forEach(function (v, i) {\n        target[i] = v;\n      });\n    };\n  });\n} // ----------------------------------------------------------------------------\n// set/get XXX: add setter and getter for object of type array\n// ----------------------------------------------------------------------------\n\nfunction setGetArray(publicAPI, model, fieldNames, size) {\n  var defaultVal = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined;\n  getArray(publicAPI, model, fieldNames);\n  setArray(publicAPI, model, fieldNames, size, defaultVal);\n} // ----------------------------------------------------------------------------\n// vtkAlgorithm: setInputData(), setInputConnection(), getOutputData(), getOutputPort()\n// ----------------------------------------------------------------------------\n\nfunction algo(publicAPI, model, numberOfInputs, numberOfOutputs) {\n  if (model.inputData) {\n    model.inputData = model.inputData.map(_vtk_js__WEBPACK_IMPORTED_MODULE_5__.default);\n  } else {\n    model.inputData = [];\n  }\n\n  if (model.inputConnection) {\n    model.inputConnection = model.inputConnection.map(_vtk_js__WEBPACK_IMPORTED_MODULE_5__.default);\n  } else {\n    model.inputConnection = [];\n  }\n\n  if (model.output) {\n    model.output = model.output.map(_vtk_js__WEBPACK_IMPORTED_MODULE_5__.default);\n  } else {\n    model.output = [];\n  }\n\n  if (model.inputArrayToProcess) {\n    model.inputArrayToProcess = model.inputArrayToProcess.map(_vtk_js__WEBPACK_IMPORTED_MODULE_5__.default);\n  } else {\n    model.inputArrayToProcess = [];\n  } // Cache the argument for later manipulation\n\n\n  model.numberOfInputs = numberOfInputs; // Methods\n\n  function setInputData(dataset) {\n    var port = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n    if (model.deleted) {\n      vtkErrorMacro('instance deleted - cannot call any method');\n      return;\n    }\n\n    if (port >= model.numberOfInputs) {\n      vtkErrorMacro(\"algorithm \".concat(publicAPI.getClassName(), \" only has \").concat(model.numberOfInputs, \" input ports. To add more input ports, use addInputData()\"));\n      return;\n    }\n\n    if (model.inputData[port] !== dataset || model.inputConnection[port]) {\n      model.inputData[port] = dataset;\n      model.inputConnection[port] = null;\n\n      if (publicAPI.modified) {\n        publicAPI.modified();\n      }\n    }\n  }\n\n  function getInputData() {\n    var port = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n    if (model.inputConnection[port]) {\n      model.inputData[port] = model.inputConnection[port]();\n    }\n\n    return model.inputData[port];\n  }\n\n  function setInputConnection(outputPort) {\n    var port = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n    if (model.deleted) {\n      vtkErrorMacro('instance deleted - cannot call any method');\n      return;\n    }\n\n    if (port >= model.numberOfInputs) {\n      var msg = \"algorithm \".concat(publicAPI.getClassName(), \" only has \");\n      msg += \"\".concat(model.numberOfInputs);\n      msg += ' input ports. To add more input ports, use addInputConnection()';\n      vtkErrorMacro(msg);\n      return;\n    }\n\n    model.inputData[port] = null;\n    model.inputConnection[port] = outputPort;\n  }\n\n  function getInputConnection() {\n    var port = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n    return model.inputConnection[port];\n  }\n\n  function addInputConnection(outputPort) {\n    if (model.deleted) {\n      vtkErrorMacro('instance deleted - cannot call any method');\n      return;\n    }\n\n    model.numberOfInputs++;\n    setInputConnection(outputPort, model.numberOfInputs - 1);\n  }\n\n  function addInputData(dataset) {\n    if (model.deleted) {\n      vtkErrorMacro('instance deleted - cannot call any method');\n      return;\n    }\n\n    model.numberOfInputs++;\n    setInputData(dataset, model.numberOfInputs - 1);\n  }\n\n  function getOutputData() {\n    var port = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n    if (model.deleted) {\n      vtkErrorMacro('instance deleted - cannot call any method');\n      return null;\n    }\n\n    if (publicAPI.shouldUpdate()) {\n      publicAPI.update();\n    }\n\n    return model.output[port];\n  }\n\n  publicAPI.shouldUpdate = function () {\n    var localMTime = publicAPI.getMTime();\n    var count = numberOfOutputs;\n    var minOutputMTime = Infinity;\n\n    while (count--) {\n      if (!model.output[count]) {\n        return true;\n      }\n\n      var mt = model.output[count].getMTime();\n\n      if (mt < localMTime) {\n        return true;\n      }\n\n      if (mt < minOutputMTime) {\n        minOutputMTime = mt;\n      }\n    }\n\n    count = model.numberOfInputs;\n\n    while (count--) {\n      if (model.inputConnection[count] && model.inputConnection[count].filter.shouldUpdate()) {\n        return true;\n      }\n    }\n\n    count = model.numberOfInputs;\n\n    while (count--) {\n      if (publicAPI.getInputData(count) && publicAPI.getInputData(count).getMTime() > minOutputMTime) {\n        return true;\n      }\n    }\n\n    return false;\n  };\n\n  function getOutputPort() {\n    var port = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n    var outputPortAccess = function outputPortAccess() {\n      return getOutputData(port);\n    }; // Add reference to filter\n\n\n    outputPortAccess.filter = publicAPI;\n    return outputPortAccess;\n  } // Handle input if needed\n\n\n  if (model.numberOfInputs) {\n    // Reserve inputs\n    var count = model.numberOfInputs;\n\n    while (count--) {\n      model.inputData.push(null);\n      model.inputConnection.push(null);\n    } // Expose public methods\n\n\n    publicAPI.setInputData = setInputData;\n    publicAPI.setInputConnection = setInputConnection;\n    publicAPI.addInputData = addInputData;\n    publicAPI.addInputConnection = addInputConnection;\n    publicAPI.getInputData = getInputData;\n    publicAPI.getInputConnection = getInputConnection;\n  }\n\n  if (numberOfOutputs) {\n    publicAPI.getOutputData = getOutputData;\n    publicAPI.getOutputPort = getOutputPort;\n  }\n\n  publicAPI.update = function () {\n    var ins = [];\n\n    if (model.numberOfInputs) {\n      var _count = 0;\n\n      while (_count < model.numberOfInputs) {\n        ins[_count] = publicAPI.getInputData(_count);\n        _count++;\n      }\n    }\n\n    if (publicAPI.shouldUpdate() && publicAPI.requestData) {\n      publicAPI.requestData(ins, model.output);\n    }\n  };\n\n  publicAPI.getNumberOfInputPorts = function () {\n    return model.numberOfInputs;\n  };\n\n  publicAPI.getNumberOfOutputPorts = function () {\n    return numberOfOutputs || model.output.length;\n  };\n\n  publicAPI.getInputArrayToProcess = function (inputPort) {\n    var arrayDesc = model.inputArrayToProcess[inputPort];\n    var ds = model.inputData[inputPort];\n\n    if (arrayDesc && ds) {\n      return ds[\"get\".concat(arrayDesc.fieldAssociation)]().getArray(arrayDesc.arrayName);\n    }\n\n    return null;\n  };\n\n  publicAPI.setInputArrayToProcess = function (inputPort, arrayName, fieldAssociation) {\n    var attributeType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'Scalars';\n\n    while (model.inputArrayToProcess.length < inputPort) {\n      model.inputArrayToProcess.push(null);\n    }\n\n    model.inputArrayToProcess[inputPort] = {\n      arrayName: arrayName,\n      fieldAssociation: fieldAssociation,\n      attributeType: attributeType\n    };\n  };\n} // ----------------------------------------------------------------------------\n// Event handling: onXXX(callback), invokeXXX(args...)\n// ----------------------------------------------------------------------------\n\nvar EVENT_ABORT = Symbol('Event abort');\nfunction event(publicAPI, model, eventName) {\n  var callbacks = [];\n  var previousDelete = publicAPI.delete;\n  var curCallbackID = 1;\n\n  function off(callbackID) {\n    for (var i = 0; i < callbacks.length; ++i) {\n      var _callbacks$i = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(callbacks[i], 1),\n          cbID = _callbacks$i[0];\n\n      if (cbID === callbackID) {\n        callbacks.splice(i, 1);\n        return;\n      }\n    }\n  }\n\n  function on(callbackID) {\n    function unsubscribe() {\n      off(callbackID);\n    }\n\n    return Object.freeze({\n      unsubscribe: unsubscribe\n    });\n  }\n\n  function invoke() {\n    var _arguments = arguments;\n\n    if (model.deleted) {\n      vtkErrorMacro('instance deleted - cannot call any method');\n      return;\n    }\n    /* eslint-disable prefer-rest-params */\n    // Go through a copy of the callbacks array in case new callbacks\n    // get prepended within previous callbacks\n\n\n    var currentCallbacks = callbacks.slice();\n\n    var _loop = function _loop(index) {\n      var _currentCallbacks$ind = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(currentCallbacks[index], 3),\n          cb = _currentCallbacks$ind[1],\n          priority = _currentCallbacks$ind[2];\n\n      if (!cb) {\n        return \"continue\"; // eslint-disable-line\n      }\n\n      if (priority < 0) {\n        setTimeout(function () {\n          return cb.apply(publicAPI, _arguments);\n        }, 1 - priority);\n      } else {\n        // Abort only if the callback explicitly returns false\n        var continueNext = cb.apply(publicAPI, _arguments);\n\n        if (continueNext === EVENT_ABORT) {\n          return \"break\";\n        }\n      }\n    };\n\n    for (var index = 0; index < currentCallbacks.length; ++index) {\n      var _ret = _loop(index);\n\n      if (_ret === \"continue\") continue;\n      if (_ret === \"break\") break;\n    }\n    /* eslint-enable prefer-rest-params */\n\n  }\n\n  publicAPI[\"invoke\".concat(capitalize(eventName))] = invoke;\n\n  publicAPI[\"on\".concat(capitalize(eventName))] = function (callback) {\n    var priority = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.0;\n\n    if (!callback.apply) {\n      console.error(\"Invalid callback for event \".concat(eventName));\n      return null;\n    }\n\n    if (model.deleted) {\n      vtkErrorMacro('instance deleted - cannot call any method');\n      return null;\n    }\n\n    var callbackID = curCallbackID++;\n    callbacks.push([callbackID, callback, priority]);\n    callbacks.sort(function (cb1, cb2) {\n      return cb2[2] - cb1[2];\n    });\n    return on(callbackID);\n  };\n\n  publicAPI.delete = function () {\n    previousDelete();\n    callbacks.forEach(function (_ref2) {\n      var _ref3 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.default)(_ref2, 1),\n          cbID = _ref3[0];\n\n      return off(cbID);\n    });\n  };\n} // ----------------------------------------------------------------------------\n// newInstance\n// ----------------------------------------------------------------------------\n\nfunction newInstance(extend, className) {\n  var constructor = function constructor() {\n    var initialValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    var model = {};\n    var publicAPI = {};\n    extend(publicAPI, model, initialValues);\n    return Object.freeze(publicAPI);\n  }; // Register constructor to factory\n\n\n  if (className) {\n    _vtk_js__WEBPACK_IMPORTED_MODULE_5__.default.register(className, constructor);\n  }\n\n  return constructor;\n} // ----------------------------------------------------------------------------\n// Chain function calls\n// ----------------------------------------------------------------------------\n\nfunction chain() {\n  for (var _len5 = arguments.length, fn = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n    fn[_key5] = arguments[_key5];\n  }\n\n  return function () {\n    for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n      args[_key6] = arguments[_key6];\n    }\n\n    return fn.filter(function (i) {\n      return !!i;\n    }).map(function (i) {\n      return i.apply(void 0, args);\n    });\n  };\n} // ----------------------------------------------------------------------------\n// Some utility methods for vtk objects\n// ----------------------------------------------------------------------------\n\nfunction isVtkObject(instance) {\n  return instance && instance.isA && instance.isA('vtkObject');\n}\nfunction traverseInstanceTree(instance, extractFunction) {\n  var accumulator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n  var visitedInstances = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n\n  if (isVtkObject(instance)) {\n    if (visitedInstances.indexOf(instance) >= 0) {\n      // avoid cycles\n      return accumulator;\n    }\n\n    visitedInstances.push(instance);\n    var result = extractFunction(instance);\n\n    if (result !== undefined) {\n      accumulator.push(result);\n    } // Now go through this instance's model\n\n\n    var model = instance.get();\n    Object.keys(model).forEach(function (key) {\n      var modelObj = model[key];\n\n      if (Array.isArray(modelObj)) {\n        modelObj.forEach(function (subObj) {\n          traverseInstanceTree(subObj, extractFunction, accumulator, visitedInstances);\n        });\n      } else {\n        traverseInstanceTree(modelObj, extractFunction, accumulator, visitedInstances);\n      }\n    });\n  }\n\n  return accumulator;\n} // ----------------------------------------------------------------------------\n// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immediate` is passed, trigger the function on the\n// leading edge, instead of the trailing.\n\nfunction debounce(func, wait, immediate) {\n  var _this = this;\n\n  var timeout;\n  return function () {\n    for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n      args[_key7] = arguments[_key7];\n    }\n\n    var context = _this;\n\n    var later = function later() {\n      timeout = null;\n\n      if (!immediate) {\n        func.apply(context, args);\n      }\n    };\n\n    var callNow = immediate && !timeout;\n    clearTimeout(timeout);\n    timeout = setTimeout(later, wait);\n\n    if (callNow) {\n      func.apply(context, args);\n    }\n  };\n} // ----------------------------------------------------------------------------\n// Creates a throttled function that only invokes `func` at most once per\n// every `wait` milliseconds.\n\nfunction throttle(callback, delay) {\n  var isThrottled = false;\n  var argsToUse = null;\n\n  function next() {\n    isThrottled = false;\n\n    if (argsToUse !== null) {\n      wrapper.apply(void 0, (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__.default)(argsToUse)); // eslint-disable-line\n\n      argsToUse = null;\n    }\n  }\n\n  function wrapper() {\n    for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n      args[_key8] = arguments[_key8];\n    }\n\n    if (isThrottled) {\n      argsToUse = args;\n      return;\n    }\n\n    isThrottled = true;\n    callback.apply(void 0, args);\n    setTimeout(next, delay);\n  }\n\n  return wrapper;\n} // ----------------------------------------------------------------------------\n// keystore(publicAPI, model, initialKeystore)\n//\n//    - initialKeystore: Initial keystore. This can be either a Map or an\n//      object.\n//\n// Generated API\n//  setKey(key, value) : mixed (returns value)\n//  getKey(key) : mixed\n//  getAllKeys() : [mixed]\n//  deleteKey(key) : Boolean\n// ----------------------------------------------------------------------------\n\nfunction keystore(publicAPI, model) {\n  var initialKeystore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  model.keystore = Object.assign(model.keystore || {}, initialKeystore);\n\n  publicAPI.setKey = function (key, value) {\n    model.keystore[key] = value;\n  };\n\n  publicAPI.getKey = function (key) {\n    return model.keystore[key];\n  };\n\n  publicAPI.getAllKeys = function () {\n    return Object.keys(model.keystore);\n  };\n\n  publicAPI.deleteKey = function (key) {\n    return delete model.keystore[key];\n  };\n\n  publicAPI.clearKeystore = function () {\n    return publicAPI.getAllKeys().forEach(function (key) {\n      return delete model.keystore[key];\n    });\n  };\n} // ----------------------------------------------------------------------------\n// proxy(publicAPI, model, sectionName, propertyUI)\n//\n//    - sectionName: Name of the section for UI\n//    - propertyUI: List of props with their UI description\n//\n// Generated API\n//  getProxyId() : String\n//  listProxyProperties() : [string]\n//  updateProxyProperty(name, prop)\n//  getProxySection() => List of properties for UI generation\n// ----------------------------------------------------------------------------\n\nvar nextProxyId = 1;\nvar ROOT_GROUP_NAME = '__root__';\nfunction proxy(publicAPI, model) {\n  // Proxies are keystores\n  keystore(publicAPI, model);\n  var parentDelete = publicAPI.delete; // getProxyId\n\n  model.proxyId = \"\".concat(nextProxyId++); // ui handling\n\n  model.ui = JSON.parse(JSON.stringify(model.ui || [])); // deep copy\n\n  get(publicAPI, model, ['proxyId', 'proxyGroup', 'proxyName']);\n  setGet(publicAPI, model, ['proxyManager']); // group properties\n\n  var propertyMap = {};\n  var groupChildrenNames = {};\n\n  function registerProperties(descriptionList, currentGroupName) {\n    if (!groupChildrenNames[currentGroupName]) {\n      groupChildrenNames[currentGroupName] = [];\n    }\n\n    var childrenNames = groupChildrenNames[currentGroupName];\n\n    for (var i = 0; i < descriptionList.length; i++) {\n      childrenNames.push(descriptionList[i].name);\n      propertyMap[descriptionList[i].name] = descriptionList[i];\n\n      if (descriptionList[i].children && descriptionList[i].children.length) {\n        registerProperties(descriptionList[i].children, descriptionList[i].name);\n      }\n    }\n  }\n\n  registerProperties(model.ui, ROOT_GROUP_NAME);\n\n  publicAPI.updateUI = function (ui) {\n    model.ui = JSON.parse(JSON.stringify(ui || [])); // deep copy\n\n    Object.keys(propertyMap).forEach(function (k) {\n      return delete propertyMap[k];\n    });\n    Object.keys(groupChildrenNames).forEach(function (k) {\n      return delete groupChildrenNames[k];\n    });\n    registerProperties(model.ui, ROOT_GROUP_NAME);\n    publicAPI.modified();\n  };\n\n  function listProxyProperties() {\n    var gName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ROOT_GROUP_NAME;\n    return groupChildrenNames[gName];\n  }\n\n  publicAPI.updateProxyProperty = function (propertyName, propUI) {\n    var prop = propertyMap[propertyName];\n\n    if (prop) {\n      Object.assign(prop, propUI);\n    } else {\n      propertyMap[propertyName] = _objectSpread({}, propUI);\n    }\n  };\n\n  publicAPI.activate = function () {\n    if (model.proxyManager) {\n      var setActiveMethod = \"setActive\".concat(capitalize(publicAPI.getProxyGroup().slice(0, -1)));\n\n      if (model.proxyManager[setActiveMethod]) {\n        model.proxyManager[setActiveMethod](publicAPI);\n      }\n    }\n  }; // property link\n\n\n  model.propertyLinkSubscribers = {};\n\n  publicAPI.registerPropertyLinkForGC = function (otherLink, type) {\n    if (!(type in model.propertyLinkSubscribers)) {\n      model.propertyLinkSubscribers[type] = [];\n    }\n\n    model.propertyLinkSubscribers[type].push(otherLink);\n  };\n\n  publicAPI.gcPropertyLinks = function (type) {\n    var subscribers = model.propertyLinkSubscribers[type] || [];\n\n    while (subscribers.length) {\n      subscribers.pop().unbind(publicAPI);\n    }\n  };\n\n  model.propertyLinkMap = {};\n\n  publicAPI.getPropertyLink = function (id) {\n    var persistent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n    if (model.propertyLinkMap[id]) {\n      return model.propertyLinkMap[id];\n    }\n\n    var value = null;\n    var links = [];\n    var count = 0;\n    var updateInProgress = false;\n\n    function update(source) {\n      var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n      if (updateInProgress) {\n        return null;\n      }\n\n      var needUpdate = [];\n      var sourceLink = null;\n      count = links.length;\n\n      while (count--) {\n        var link = links[count];\n\n        if (link.instance === source) {\n          sourceLink = link;\n        } else {\n          needUpdate.push(link);\n        }\n      }\n\n      if (!sourceLink) {\n        return null;\n      }\n\n      var newValue = sourceLink.instance[\"get\".concat(capitalize(sourceLink.propertyName))]();\n\n      if (!shallowEquals(newValue, value) || force) {\n        value = newValue;\n        updateInProgress = true;\n\n        while (needUpdate.length) {\n          var linkToUpdate = needUpdate.pop();\n          linkToUpdate.instance.set((0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__.default)({}, linkToUpdate.propertyName, value));\n        }\n\n        updateInProgress = false;\n      }\n\n      if (model.propertyLinkMap[id].persistent) {\n        model.propertyLinkMap[id].value = newValue;\n      }\n\n      return newValue;\n    }\n\n    function unbind(instance, propertyName) {\n      var indexToDelete = [];\n      count = links.length;\n\n      while (count--) {\n        var link = links[count];\n\n        if (link.instance === instance && (link.propertyName === propertyName || propertyName === undefined)) {\n          link.subscription.unsubscribe();\n          indexToDelete.push(count);\n        }\n      }\n\n      while (indexToDelete.length) {\n        links.splice(indexToDelete.pop(), 1);\n      }\n    }\n\n    function bind(instance, propertyName) {\n      var updateMe = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var subscription = instance.onModified(update);\n      var other = links[0];\n      links.push({\n        instance: instance,\n        propertyName: propertyName,\n        subscription: subscription\n      });\n\n      if (updateMe) {\n        if (model.propertyLinkMap[id].persistent && model.propertyLinkMap[id].value !== undefined) {\n          instance.set((0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__.default)({}, propertyName, model.propertyLinkMap[id].value));\n        } else if (other) {\n          update(other.instance, true);\n        }\n      }\n\n      return {\n        unsubscribe: function unsubscribe() {\n          return unbind(instance, propertyName);\n        }\n      };\n    }\n\n    function unsubscribe() {\n      while (links.length) {\n        links.pop().subscription.unsubscribe();\n      }\n    }\n\n    var linkHandler = {\n      bind: bind,\n      unbind: unbind,\n      unsubscribe: unsubscribe,\n      persistent: persistent\n    };\n    model.propertyLinkMap[id] = linkHandler;\n    return linkHandler;\n  }; // extract values\n\n\n  function getProperties() {\n    var groupName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ROOT_GROUP_NAME;\n    var values = [];\n    var id = model.proxyId;\n    var propertyNames = listProxyProperties(groupName) || [];\n\n    for (var i = 0; i < propertyNames.length; i++) {\n      var name = propertyNames[i];\n      var method = publicAPI[\"get\".concat(capitalize(name))];\n      var value = method ? method() : undefined;\n      var prop = {\n        id: id,\n        name: name,\n        value: value\n      };\n      var children = getProperties(name);\n\n      if (children.length) {\n        prop.children = children;\n      }\n\n      values.push(prop);\n    }\n\n    return values;\n  }\n\n  publicAPI.listPropertyNames = function () {\n    return getProperties().map(function (p) {\n      return p.name;\n    });\n  };\n\n  publicAPI.getPropertyByName = function (name) {\n    return getProperties().find(function (p) {\n      return p.name === name;\n    });\n  };\n\n  publicAPI.getPropertyDomainByName = function (name) {\n    return (propertyMap[name] || {}).domain;\n  }; // ui section\n\n\n  publicAPI.getProxySection = function () {\n    return {\n      id: model.proxyId,\n      name: model.proxyGroup,\n      ui: model.ui,\n      properties: getProperties()\n    };\n  }; // free resources\n\n\n  publicAPI.delete = function () {\n    var list = Object.keys(model.propertyLinkMap);\n    var count = list.length;\n\n    while (count--) {\n      model.propertyLinkMap[list[count]].unsubscribe();\n    }\n\n    Object.keys(model.propertyLinkSubscribers).forEach(publicAPI.gcPropertyLinks);\n    parentDelete();\n  };\n\n  function registerLinks() {\n    // Allow dynamic registration of links at the application level\n    if (model.links) {\n      for (var i = 0; i < model.links.length; i++) {\n        var _model$links$i = model.links[i],\n            link = _model$links$i.link,\n            property = _model$links$i.property,\n            persistent = _model$links$i.persistent,\n            updateOnBind = _model$links$i.updateOnBind,\n            type = _model$links$i.type;\n\n        if (type === 'application') {\n          var sLink = model.proxyManager.getPropertyLink(link, persistent);\n          publicAPI.registerPropertyLinkForGC(sLink, 'application');\n          sLink.bind(publicAPI, property, updateOnBind);\n        }\n      }\n    }\n  }\n\n  setImmediateVTK(registerLinks);\n} // ----------------------------------------------------------------------------\n// proxyPropertyMapping(publicAPI, model, map)\n//\n//   map = {\n//      opacity: { modelKey: 'property', property: 'opacity' },\n//   }\n//\n// Generated API:\n//  Elevate set/get methods from internal object stored in the model to current one\n// ----------------------------------------------------------------------------\n\nfunction proxyPropertyMapping(publicAPI, model, map) {\n  var parentDelete = publicAPI.delete;\n  var subscriptions = [];\n  var propertyNames = Object.keys(map);\n  var count = propertyNames.length;\n\n  while (count--) {\n    var propertyName = propertyNames[count];\n    var _map$propertyName = map[propertyName],\n        modelKey = _map$propertyName.modelKey,\n        property = _map$propertyName.property,\n        _map$propertyName$mod = _map$propertyName.modified,\n        modified = _map$propertyName$mod === void 0 ? true : _map$propertyName$mod;\n    var methodSrc = capitalize(property);\n    var methodDst = capitalize(propertyName);\n    publicAPI[\"get\".concat(methodDst)] = model[modelKey][\"get\".concat(methodSrc)];\n    publicAPI[\"set\".concat(methodDst)] = model[modelKey][\"set\".concat(methodSrc)];\n\n    if (modified) {\n      subscriptions.push(model[modelKey].onModified(publicAPI.modified));\n    }\n  }\n\n  publicAPI.delete = function () {\n    while (subscriptions.length) {\n      subscriptions.pop().unsubscribe();\n    }\n\n    parentDelete();\n  };\n} // ----------------------------------------------------------------------------\n// proxyPropertyState(publicAPI, model, state, defaults)\n//\n//   state = {\n//     representation: {\n//       'Surface with edges': { property: { edgeVisibility: true, representation: 2 } },\n//       Surface: { property: { edgeVisibility: false, representation: 2 } },\n//       Wireframe: { property: { edgeVisibility: false, representation: 1 } },\n//       Points: { property: { edgeVisibility: false, representation: 0 } },\n//     },\n//   }\n//\n//   defaults = {\n//      representation: 'Surface',\n//   }\n//\n// Generated API\n//   get / set Representation ( string ) => push state to various internal objects\n// ----------------------------------------------------------------------------\n\nfunction proxyPropertyState(publicAPI, model) {\n  var state = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var defaults = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  model.this = publicAPI;\n\n  function applyState(map) {\n    var modelKeys = Object.keys(map);\n    var count = modelKeys.length;\n\n    while (count--) {\n      var modelKey = modelKeys[count];\n      model[modelKey].set(map[modelKey]);\n    }\n  }\n\n  var modelKeys = Object.keys(defaults);\n  var count = modelKeys.length;\n\n  var _loop2 = function _loop2() {\n    // Add default\n    var key = modelKeys[count];\n    model[key] = defaults[key]; // Add set method\n\n    var mapping = state[key];\n\n    publicAPI[\"set\".concat(capitalize(key))] = function (value) {\n      if (value !== model[key]) {\n        model[key] = value;\n        var propValues = mapping[value];\n        applyState(propValues);\n        publicAPI.modified();\n      }\n    };\n  };\n\n  while (count--) {\n    _loop2();\n  } // Add getter\n\n\n  if (modelKeys.length) {\n    get(publicAPI, model, modelKeys);\n  }\n} // ----------------------------------------------------------------------------\n// From : https://github.com/facebookarchive/fixed-data-table/blob/master/src/vendor_upstream/dom/normalizeWheel.js\n//\n//\n// Copyright (c) 2015, Facebook, Inc.\n// All rights reserved.\n//\n// This source code is licensed under the BSD-style license found in the\n// LICENSE file in the root directory of this source tree. An additional grant\n// of patent rights can be found in the PATENTS file in the same directory.\n//\n//\n// Mouse wheel (and 2-finger trackpad) support on the web sucks.  It is\n// complicated, thus this doc is long and (hopefully) detailed enough to answer\n// your questions.\n//\n// If you need to react to the mouse wheel in a predictable way, this code is\n// like your bestest friend.// hugs//\n//\n// As of today, there are 4 DOM event types you can listen to:\n//\n//   'wheel'                -- Chrome(31+), FF(17+), IE(9+)\n//   'mousewheel'           -- Chrome, IE(6+), Opera, Safari\n//   'MozMousePixelScroll'  -- FF(3.5 only!) (2010-2013) -- don't bother!\n//   'DOMMouseScroll'       -- FF(0.9.7+) since 2003\n//\n// So what to do?  The is the best:\n//\n//   normalizeWheel.getEventType();\n//\n// In your event callback, use this code to get sane interpretation of the\n// deltas.  This code will return an object with properties:\n//\n//   spinX   -- normalized spin speed (use for zoom) - x plane\n//   spinY   -- \" - y plane\n//   pixelX  -- normalized distance (to pixels) - x plane\n//   pixelY  -- \" - y plane\n//\n// Wheel values are provided by the browser assuming you are using the wheel to\n// scroll a web page by a number of lines or pixels (or pages).  Values can vary\n// significantly on different platforms and browsers, forgetting that you can\n// scroll at different speeds.  Some devices (like trackpads) emit more events\n// at smaller increments with fine granularity, and some emit massive jumps with\n// linear speed or acceleration.\n//\n// This code does its best to normalize the deltas for you:\n//\n//   - spin is trying to normalize how far the wheel was spun (or trackpad\n//     dragged).  This is super useful for zoom support where you want to\n//     throw away the chunky scroll steps on the PC and make those equal to\n//     the slow and smooth tiny steps on the Mac. Key data: This code tries to\n//     resolve a single slow step on a wheel to 1.\n//\n//   - pixel is normalizing the desired scroll delta in pixel units.  You'll\n//     get the crazy differences between browsers, but at least it'll be in\n//     pixels!\n//\n//   - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT.  This\n//     should translate to positive value zooming IN, negative zooming OUT.\n//     This matches the newer 'wheel' event.\n//\n// Why are there spinX, spinY (or pixels)?\n//\n//   - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn\n//     with a mouse.  It results in side-scrolling in the browser by default.\n//\n//   - spinY is what you expect -- it's the classic axis of a mouse wheel.\n//\n//   - I dropped spinZ/pixelZ.  It is supported by the DOM 3 'wheel' event and\n//     probably is by browsers in conjunction with fancy 3D controllers .. but\n//     you know.\n//\n// Implementation info:\n//\n// Examples of 'wheel' event if you scroll slowly (down) by one step with an\n// average mouse:\n//\n//   OS X + Chrome  (mouse)     -    4   pixel delta  (wheelDelta -120)\n//   OS X + Safari  (mouse)     -  N/A   pixel delta  (wheelDelta  -12)\n//   OS X + Firefox (mouse)     -    0.1 line  delta  (wheelDelta  N/A)\n//   Win8 + Chrome  (mouse)     -  100   pixel delta  (wheelDelta -120)\n//   Win8 + Firefox (mouse)     -    3   line  delta  (wheelDelta -120)\n//\n// On the trackpad:\n//\n//   OS X + Chrome  (trackpad)  -    2   pixel delta  (wheelDelta   -6)\n//   OS X + Firefox (trackpad)  -    1   pixel delta  (wheelDelta  N/A)\n//\n// On other/older browsers.. it's more complicated as there can be multiple and\n// also missing delta values.\n//\n// The 'wheel' event is more standard:\n//\n// http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents\n//\n// The basics is that it includes a unit, deltaMode (pixels, lines, pages), and\n// deltaX, deltaY and deltaZ.  Some browsers provide other values to maintain\n// backward compatibility with older events.  Those other values help us\n// better normalize spin speed.  Example of what the browsers provide:\n//\n//                          | event.wheelDelta | event.detail\n//        ------------------+------------------+--------------\n//          Safari v5/OS X  |       -120       |       0\n//          Safari v5/Win7  |       -120       |       0\n//         Chrome v17/OS X  |       -120       |       0\n//         Chrome v17/Win7  |       -120       |       0\n//                IE9/Win7  |       -120       |   undefined\n//         Firefox v4/OS X  |     undefined    |       1\n//         Firefox v4/Win7  |     undefined    |       3\n//\n// ----------------------------------------------------------------------------\n// Reasonable defaults\n\nvar PIXEL_STEP = 10;\nvar LINE_HEIGHT = 40;\nvar PAGE_HEIGHT = 800;\nfunction normalizeWheel(wheelEvent) {\n  var sX = 0; // spinX\n\n  var sY = 0; // spinY\n\n  var pX = 0; // pixelX\n\n  var pY = 0; // pixelY\n  // Legacy\n\n  if ('detail' in wheelEvent) {\n    sY = wheelEvent.detail;\n  }\n\n  if ('wheelDelta' in wheelEvent) {\n    sY = -wheelEvent.wheelDelta / 120;\n  }\n\n  if ('wheelDeltaY' in wheelEvent) {\n    sY = -wheelEvent.wheelDeltaY / 120;\n  }\n\n  if ('wheelDeltaX' in wheelEvent) {\n    sX = -wheelEvent.wheelDeltaX / 120;\n  } // side scrolling on FF with DOMMouseScroll\n\n\n  if ('axis' in wheelEvent && wheelEvent.axis === wheelEvent.HORIZONTAL_AXIS) {\n    sX = sY;\n    sY = 0;\n  }\n\n  pX = sX * PIXEL_STEP;\n  pY = sY * PIXEL_STEP;\n\n  if ('deltaY' in wheelEvent) {\n    pY = wheelEvent.deltaY;\n  }\n\n  if ('deltaX' in wheelEvent) {\n    pX = wheelEvent.deltaX;\n  }\n\n  if ((pX || pY) && wheelEvent.deltaMode) {\n    if (wheelEvent.deltaMode === 1) {\n      // delta in LINE units\n      pX *= LINE_HEIGHT;\n      pY *= LINE_HEIGHT;\n    } else {\n      // delta in PAGE units\n      pX *= PAGE_HEIGHT;\n      pY *= PAGE_HEIGHT;\n    }\n  } // Fall-back if spin cannot be determined\n\n\n  if (pX && !sX) {\n    sX = pX < 1 ? -1 : 1;\n  }\n\n  if (pY && !sY) {\n    sY = pY < 1 ? -1 : 1;\n  }\n\n  return {\n    spinX: sX,\n    spinY: sY,\n    pixelX: pX,\n    pixelY: pY\n  };\n} // ----------------------------------------------------------------------------\n// Default export\n// ----------------------------------------------------------------------------\n\nvar macro = {\n  algo: algo,\n  capitalize: capitalize,\n  chain: chain,\n  debounce: debounce,\n  enumToString: enumToString,\n  event: event,\n  EVENT_ABORT: EVENT_ABORT,\n  formatBytesToProperUnit: formatBytesToProperUnit,\n  formatNumbersWithThousandSeparator: formatNumbersWithThousandSeparator,\n  get: get,\n  getArray: getArray,\n  getCurrentGlobalMTime: getCurrentGlobalMTime,\n  getStateArrayMapFunc: getStateArrayMapFunc,\n  isVtkObject: isVtkObject,\n  keystore: keystore,\n  newInstance: newInstance,\n  newTypedArray: newTypedArray,\n  newTypedArrayFrom: newTypedArrayFrom,\n  normalizeWheel: normalizeWheel,\n  obj: obj,\n  proxy: proxy,\n  proxyPropertyMapping: proxyPropertyMapping,\n  proxyPropertyState: proxyPropertyState,\n  safeArrays: safeArrays,\n  set: set,\n  setArray: setArray,\n  setGet: setGet,\n  setGetArray: setGetArray,\n  setImmediate: setImmediateVTK,\n  setLoggerFunction: setLoggerFunction,\n  throttle: throttle,\n  traverseInstanceTree: traverseInstanceTree,\n  TYPED_ARRAYS: TYPED_ARRAYS,\n  // deprecated todo remove on breaking API revision\n  uncapitalize: uncapitalize,\n  VOID: VOID,\n  vtkDebugMacro: vtkDebugMacro,\n  vtkErrorMacro: vtkErrorMacro,\n  vtkInfoMacro: vtkInfoMacro,\n  vtkLogMacro: vtkLogMacro,\n  vtkOnceErrorMacro: vtkOnceErrorMacro,\n  vtkWarningMacro: vtkWarningMacro\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (macro);\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/macro.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/base64-js/index.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/base64-js/index.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/blueimp-md5/js/md5.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/blueimp-md5/js/md5.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"m\": () => (/* binding */ md5)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\n/*\n * JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\n\nvar md5 = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module) {\n(function ($) {\n\n  /**\n   * Add integers, wrapping at 2^32.\n   * This uses 16-bit operations internally to work around bugs in interpreters.\n   *\n   * @param {number} x First integer\n   * @param {number} y Second integer\n   * @returns {number} Sum\n   */\n  function safeAdd(x, y) {\n    var lsw = (x & 0xffff) + (y & 0xffff);\n    var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n    return (msw << 16) | (lsw & 0xffff)\n  }\n\n  /**\n   * Bitwise rotate a 32-bit number to the left.\n   *\n   * @param {number} num 32-bit number\n   * @param {number} cnt Rotation count\n   * @returns {number} Rotated number\n   */\n  function bitRotateLeft(num, cnt) {\n    return (num << cnt) | (num >>> (32 - cnt))\n  }\n\n  /**\n   * Basic operation the algorithm uses.\n   *\n   * @param {number} q q\n   * @param {number} a a\n   * @param {number} b b\n   * @param {number} x x\n   * @param {number} s s\n   * @param {number} t t\n   * @returns {number} Result\n   */\n  function md5cmn(q, a, b, x, s, t) {\n    return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b)\n  }\n  /**\n   * Basic operation the algorithm uses.\n   *\n   * @param {number} a a\n   * @param {number} b b\n   * @param {number} c c\n   * @param {number} d d\n   * @param {number} x x\n   * @param {number} s s\n   * @param {number} t t\n   * @returns {number} Result\n   */\n  function md5ff(a, b, c, d, x, s, t) {\n    return md5cmn((b & c) | (~b & d), a, b, x, s, t)\n  }\n  /**\n   * Basic operation the algorithm uses.\n   *\n   * @param {number} a a\n   * @param {number} b b\n   * @param {number} c c\n   * @param {number} d d\n   * @param {number} x x\n   * @param {number} s s\n   * @param {number} t t\n   * @returns {number} Result\n   */\n  function md5gg(a, b, c, d, x, s, t) {\n    return md5cmn((b & d) | (c & ~d), a, b, x, s, t)\n  }\n  /**\n   * Basic operation the algorithm uses.\n   *\n   * @param {number} a a\n   * @param {number} b b\n   * @param {number} c c\n   * @param {number} d d\n   * @param {number} x x\n   * @param {number} s s\n   * @param {number} t t\n   * @returns {number} Result\n   */\n  function md5hh(a, b, c, d, x, s, t) {\n    return md5cmn(b ^ c ^ d, a, b, x, s, t)\n  }\n  /**\n   * Basic operation the algorithm uses.\n   *\n   * @param {number} a a\n   * @param {number} b b\n   * @param {number} c c\n   * @param {number} d d\n   * @param {number} x x\n   * @param {number} s s\n   * @param {number} t t\n   * @returns {number} Result\n   */\n  function md5ii(a, b, c, d, x, s, t) {\n    return md5cmn(c ^ (b | ~d), a, b, x, s, t)\n  }\n\n  /**\n   * Calculate the MD5 of an array of little-endian words, and a bit length.\n   *\n   * @param {Array} x Array of little-endian words\n   * @param {number} len Bit length\n   * @returns {Array<number>} MD5 Array\n   */\n  function binlMD5(x, len) {\n    /* append padding */\n    x[len >> 5] |= 0x80 << len % 32;\n    x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n    var i;\n    var olda;\n    var oldb;\n    var oldc;\n    var oldd;\n    var a = 1732584193;\n    var b = -271733879;\n    var c = -1732584194;\n    var d = 271733878;\n\n    for (i = 0; i < x.length; i += 16) {\n      olda = a;\n      oldb = b;\n      oldc = c;\n      oldd = d;\n\n      a = md5ff(a, b, c, d, x[i], 7, -680876936);\n      d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n      c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n      b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n      a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n      d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n      c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n      b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n      a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n      d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n      c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n      b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n      a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n      d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n      c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n      b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n      a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n      d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n      c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n      b = md5gg(b, c, d, a, x[i], 20, -373897302);\n      a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n      d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n      c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n      b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n      a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n      d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n      c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n      b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n      a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n      d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n      c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n      b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n      a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n      d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n      c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n      b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n      a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n      d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n      c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n      b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n      a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n      d = md5hh(d, a, b, c, x[i], 11, -358537222);\n      c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n      b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n      a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n      d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n      c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n      b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n      a = md5ii(a, b, c, d, x[i], 6, -198630844);\n      d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n      c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n      b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n      a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n      d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n      c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n      b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n      a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n      d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n      c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n      b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n      a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n      d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n      c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n      b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n      a = safeAdd(a, olda);\n      b = safeAdd(b, oldb);\n      c = safeAdd(c, oldc);\n      d = safeAdd(d, oldd);\n    }\n    return [a, b, c, d]\n  }\n\n  /**\n   * Convert an array of little-endian words to a string\n   *\n   * @param {Array<number>} input MD5 Array\n   * @returns {string} MD5 string\n   */\n  function binl2rstr(input) {\n    var i;\n    var output = '';\n    var length32 = input.length * 32;\n    for (i = 0; i < length32; i += 8) {\n      output += String.fromCharCode((input[i >> 5] >>> i % 32) & 0xff);\n    }\n    return output\n  }\n\n  /**\n   * Convert a raw string to an array of little-endian words\n   * Characters >255 have their high-byte silently ignored.\n   *\n   * @param {string} input Raw input string\n   * @returns {Array<number>} Array of little-endian words\n   */\n  function rstr2binl(input) {\n    var i;\n    var output = [];\n    output[(input.length >> 2) - 1] = undefined;\n    for (i = 0; i < output.length; i += 1) {\n      output[i] = 0;\n    }\n    var length8 = input.length * 8;\n    for (i = 0; i < length8; i += 8) {\n      output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << i % 32;\n    }\n    return output\n  }\n\n  /**\n   * Calculate the MD5 of a raw string\n   *\n   * @param {string} s Input string\n   * @returns {string} Raw MD5 string\n   */\n  function rstrMD5(s) {\n    return binl2rstr(binlMD5(rstr2binl(s), s.length * 8))\n  }\n\n  /**\n   * Calculates the HMAC-MD5 of a key and some data (raw strings)\n   *\n   * @param {string} key HMAC key\n   * @param {string} data Raw input string\n   * @returns {string} Raw MD5 string\n   */\n  function rstrHMACMD5(key, data) {\n    var i;\n    var bkey = rstr2binl(key);\n    var ipad = [];\n    var opad = [];\n    var hash;\n    ipad[15] = opad[15] = undefined;\n    if (bkey.length > 16) {\n      bkey = binlMD5(bkey, key.length * 8);\n    }\n    for (i = 0; i < 16; i += 1) {\n      ipad[i] = bkey[i] ^ 0x36363636;\n      opad[i] = bkey[i] ^ 0x5c5c5c5c;\n    }\n    hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);\n    return binl2rstr(binlMD5(opad.concat(hash), 512 + 128))\n  }\n\n  /**\n   * Convert a raw string to a hex string\n   *\n   * @param {string} input Raw input string\n   * @returns {string} Hex encoded string\n   */\n  function rstr2hex(input) {\n    var hexTab = '0123456789abcdef';\n    var output = '';\n    var x;\n    var i;\n    for (i = 0; i < input.length; i += 1) {\n      x = input.charCodeAt(i);\n      output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f);\n    }\n    return output\n  }\n\n  /**\n   * Encode a string as UTF-8\n   *\n   * @param {string} input Input string\n   * @returns {string} UTF8 string\n   */\n  function str2rstrUTF8(input) {\n    return unescape(encodeURIComponent(input))\n  }\n\n  /**\n   * Encodes input string as raw MD5 string\n   *\n   * @param {string} s Input string\n   * @returns {string} Raw MD5 string\n   */\n  function rawMD5(s) {\n    return rstrMD5(str2rstrUTF8(s))\n  }\n  /**\n   * Encodes input string as Hex encoded string\n   *\n   * @param {string} s Input string\n   * @returns {string} Hex encoded string\n   */\n  function hexMD5(s) {\n    return rstr2hex(rawMD5(s))\n  }\n  /**\n   * Calculates the raw HMAC-MD5 for the given key and data\n   *\n   * @param {string} k HMAC key\n   * @param {string} d Input string\n   * @returns {string} Raw MD5 string\n   */\n  function rawHMACMD5(k, d) {\n    return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d))\n  }\n  /**\n   * Calculates the Hex encoded HMAC-MD5 for the given key and data\n   *\n   * @param {string} k HMAC key\n   * @param {string} d Input string\n   * @returns {string} Raw MD5 string\n   */\n  function hexHMACMD5(k, d) {\n    return rstr2hex(rawHMACMD5(k, d))\n  }\n\n  /**\n   * Calculates MD5 value for a given string.\n   * If a key is provided, calculates the HMAC-MD5 value.\n   * Returns a Hex encoded string unless the raw argument is given.\n   *\n   * @param {string} string Input string\n   * @param {string} [key] HMAC key\n   * @param {boolean} [raw] Raw output switch\n   * @returns {string} MD5 output\n   */\n  function md5(string, key, raw) {\n    if (!key) {\n      if (!raw) {\n        return hexMD5(string)\n      }\n      return rawMD5(string)\n    }\n    if (!raw) {\n      return hexHMACMD5(key, string)\n    }\n    return rawHMACMD5(key, string)\n  }\n\n  if (module.exports) {\n    module.exports = md5;\n  } else {\n    $.md5 = md5;\n  }\n})(_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a);\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/blueimp-md5/js/md5.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/buffer/index.js":
/*!*************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/buffer/index.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"b\": () => (/* binding */ buffer)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n/* harmony import */ var _base64_js_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base64-js/index.js */ \"./node_modules/@kitware/vtk.js/vendor/base64-js/index.js\");\n/* harmony import */ var _ieee754_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ieee754/index.js */ \"./node_modules/@kitware/vtk.js/vendor/ieee754/index.js\");\n\n\n\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */\n\nvar buffer = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module, exports) {\n\n\n\nconst customInspectSymbol =\n  (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n    ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n    : null;\n\nexports.Buffer = Buffer;\nexports.SlowBuffer = SlowBuffer;\nexports.INSPECT_MAX_BYTES = 50;\n\nconst K_MAX_LENGTH = 0x7fffffff;\nexports.kMaxLength = K_MAX_LENGTH;\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Print warning and recommend using `buffer` v4.x which has an Object\n *               implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport();\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n    typeof console.error === 'function') {\n  console.error(\n    'This browser lacks typed array (Uint8Array) support which is required by ' +\n    '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n  );\n}\n\nfunction typedArraySupport () {\n  // Can typed array instances can be augmented?\n  try {\n    const arr = new Uint8Array(1);\n    const proto = { foo: function () { return 42 } };\n    Object.setPrototypeOf(proto, Uint8Array.prototype);\n    Object.setPrototypeOf(arr, proto);\n    return arr.foo() === 42\n  } catch (e) {\n    return false\n  }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.buffer\n  }\n});\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.byteOffset\n  }\n});\n\nfunction createBuffer (length) {\n  if (length > K_MAX_LENGTH) {\n    throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n  }\n  // Return an augmented `Uint8Array` instance\n  const buf = new Uint8Array(length);\n  Object.setPrototypeOf(buf, Buffer.prototype);\n  return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new TypeError(\n        'The \"string\" argument must be of type string. Received type number'\n      )\n    }\n    return allocUnsafe(arg)\n  }\n  return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192; // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n  if (typeof value === 'string') {\n    return fromString(value, encodingOrOffset)\n  }\n\n  if (ArrayBuffer.isView(value)) {\n    return fromArrayView(value)\n  }\n\n  if (value == null) {\n    throw new TypeError(\n      'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n      'or Array-like Object. Received type ' + (typeof value)\n    )\n  }\n\n  if (isInstance(value, ArrayBuffer) ||\n      (value && isInstance(value.buffer, ArrayBuffer))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof SharedArrayBuffer !== 'undefined' &&\n      (isInstance(value, SharedArrayBuffer) ||\n      (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'number') {\n    throw new TypeError(\n      'The \"value\" argument must not be of type number. Received type number'\n    )\n  }\n\n  const valueOf = value.valueOf && value.valueOf();\n  if (valueOf != null && valueOf !== value) {\n    return Buffer.from(valueOf, encodingOrOffset, length)\n  }\n\n  const b = fromObject(value);\n  if (b) return b\n\n  if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n      typeof value[Symbol.toPrimitive] === 'function') {\n    return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n  }\n\n  throw new TypeError(\n    'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n    'or Array-like Object. Received type ' + (typeof value)\n  )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(value, encodingOrOffset, length)\n};\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);\nObject.setPrototypeOf(Buffer, Uint8Array);\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be of type number')\n  } else if (size < 0) {\n    throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n  }\n}\n\nfunction alloc (size, fill, encoding) {\n  assertSize(size);\n  if (size <= 0) {\n    return createBuffer(size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpreted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(size).fill(fill, encoding)\n      : createBuffer(size).fill(fill)\n  }\n  return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(size, fill, encoding)\n};\n\nfunction allocUnsafe (size) {\n  assertSize(size);\n  return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(size)\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(size)\n};\n\nfunction fromString (string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8';\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('Unknown encoding: ' + encoding)\n  }\n\n  const length = byteLength(string, encoding) | 0;\n  let buf = createBuffer(length);\n\n  const actual = buf.write(string, encoding);\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    buf = buf.slice(0, actual);\n  }\n\n  return buf\n}\n\nfunction fromArrayLike (array) {\n  const length = array.length < 0 ? 0 : checked(array.length) | 0;\n  const buf = createBuffer(length);\n  for (let i = 0; i < length; i += 1) {\n    buf[i] = array[i] & 255;\n  }\n  return buf\n}\n\nfunction fromArrayView (arrayView) {\n  if (isInstance(arrayView, Uint8Array)) {\n    const copy = new Uint8Array(arrayView);\n    return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n  }\n  return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\"offset\" is outside of buffer bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\"length\" is outside of buffer bounds')\n  }\n\n  let buf;\n  if (byteOffset === undefined && length === undefined) {\n    buf = new Uint8Array(array);\n  } else if (length === undefined) {\n    buf = new Uint8Array(array, byteOffset);\n  } else {\n    buf = new Uint8Array(array, byteOffset, length);\n  }\n\n  // Return an augmented `Uint8Array` instance\n  Object.setPrototypeOf(buf, Buffer.prototype);\n\n  return buf\n}\n\nfunction fromObject (obj) {\n  if (Buffer.isBuffer(obj)) {\n    const len = checked(obj.length) | 0;\n    const buf = createBuffer(len);\n\n    if (buf.length === 0) {\n      return buf\n    }\n\n    obj.copy(buf, 0, 0, len);\n    return buf\n  }\n\n  if (obj.length !== undefined) {\n    if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n      return createBuffer(0)\n    }\n    return fromArrayLike(obj)\n  }\n\n  if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n    return fromArrayLike(obj.data)\n  }\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= K_MAX_LENGTH) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0;\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return b != null && b._isBuffer === true &&\n    b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n};\n\nBuffer.compare = function compare (a, b) {\n  if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);\n  if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError(\n      'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n    )\n  }\n\n  if (a === b) return 0\n\n  let x = a.length;\n  let y = b.length;\n\n  for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i];\n      y = b[i];\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n};\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n};\n\nBuffer.concat = function concat (list, length) {\n  if (!Array.isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  let i;\n  if (length === undefined) {\n    length = 0;\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length;\n    }\n  }\n\n  const buffer = Buffer.allocUnsafe(length);\n  let pos = 0;\n  for (i = 0; i < list.length; ++i) {\n    let buf = list[i];\n    if (isInstance(buf, Uint8Array)) {\n      if (pos + buf.length > buffer.length) {\n        if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);\n        buf.copy(buffer, pos);\n      } else {\n        Uint8Array.prototype.set.call(\n          buffer,\n          buf,\n          pos\n        );\n      }\n    } else if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    } else {\n      buf.copy(buffer, pos);\n    }\n    pos += buf.length;\n  }\n  return buffer\n};\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    throw new TypeError(\n      'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n      'Received type ' + typeof string\n    )\n  }\n\n  const len = string.length;\n  const mustMatch = (arguments.length > 2 && arguments[2] === true);\n  if (!mustMatch && len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  let loweredCase = false;\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) {\n          return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n        }\n        encoding = ('' + encoding).toLowerCase();\n        loweredCase = true;\n    }\n  }\n}\nBuffer.byteLength = byteLength;\n\nfunction slowToString (encoding, start, end) {\n  let loweredCase = false;\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0;\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length;\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0;\n  start >>>= 0;\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8';\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase();\n        loweredCase = true;\n    }\n  }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true;\n\nfunction swap (b, n, m) {\n  const i = b[n];\n  b[n] = b[m];\n  b[m] = i;\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  const len = this.length;\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (let i = 0; i < len; i += 2) {\n    swap(this, i, i + 1);\n  }\n  return this\n};\n\nBuffer.prototype.swap32 = function swap32 () {\n  const len = this.length;\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (let i = 0; i < len; i += 4) {\n    swap(this, i, i + 3);\n    swap(this, i + 1, i + 2);\n  }\n  return this\n};\n\nBuffer.prototype.swap64 = function swap64 () {\n  const len = this.length;\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (let i = 0; i < len; i += 8) {\n    swap(this, i, i + 7);\n    swap(this, i + 1, i + 6);\n    swap(this, i + 2, i + 5);\n    swap(this, i + 3, i + 4);\n  }\n  return this\n};\n\nBuffer.prototype.toString = function toString () {\n  const length = this.length;\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n};\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString;\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n};\n\nBuffer.prototype.inspect = function inspect () {\n  let str = '';\n  const max = exports.INSPECT_MAX_BYTES;\n  str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();\n  if (this.length > max) str += ' ... ';\n  return '<Buffer ' + str + '>'\n};\nif (customInspectSymbol) {\n  Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (isInstance(target, Uint8Array)) {\n    target = Buffer.from(target, target.offset, target.byteLength);\n  }\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError(\n      'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n      'Received type ' + (typeof target)\n    )\n  }\n\n  if (start === undefined) {\n    start = 0;\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0;\n  }\n  if (thisStart === undefined) {\n    thisStart = 0;\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length;\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0;\n  end >>>= 0;\n  thisStart >>>= 0;\n  thisEnd >>>= 0;\n\n  if (this === target) return 0\n\n  let x = thisEnd - thisStart;\n  let y = end - start;\n  const len = Math.min(x, y);\n\n  const thisCopy = this.slice(thisStart, thisEnd);\n  const targetCopy = target.slice(start, end);\n\n  for (let i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i];\n      y = targetCopy[i];\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n};\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset;\n    byteOffset = 0;\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff;\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000;\n  }\n  byteOffset = +byteOffset; // Coerce to Number.\n  if (numberIsNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1);\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1;\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0;\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding);\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF; // Search for a byte value [0-255]\n    if (typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  let indexSize = 1;\n  let arrLength = arr.length;\n  let valLength = val.length;\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase();\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2;\n      arrLength /= 2;\n      valLength /= 2;\n      byteOffset /= 2;\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  let i;\n  if (dir) {\n    let foundIndex = -1;\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i;\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex;\n        foundIndex = -1;\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n    for (i = byteOffset; i >= 0; i--) {\n      let found = true;\n      for (let j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false;\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n};\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n};\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n};\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0;\n  const remaining = buf.length - offset;\n  if (!length) {\n    length = remaining;\n  } else {\n    length = Number(length);\n    if (length > remaining) {\n      length = remaining;\n    }\n  }\n\n  const strLen = string.length;\n\n  if (length > strLen / 2) {\n    length = strLen / 2;\n  }\n  let i;\n  for (i = 0; i < length; ++i) {\n    const parsed = parseInt(string.substr(i * 2, 2), 16);\n    if (numberIsNaN(parsed)) return i\n    buf[offset + i] = parsed;\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8';\n    length = this.length;\n    offset = 0;\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset;\n    length = this.length;\n    offset = 0;\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset >>> 0;\n    if (isFinite(length)) {\n      length = length >>> 0;\n      if (encoding === undefined) encoding = 'utf8';\n    } else {\n      encoding = length;\n      length = undefined;\n    }\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  const remaining = this.length - offset;\n  if (length === undefined || length > remaining) length = remaining;\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8';\n\n  let loweredCase = false;\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return asciiWrite(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase();\n        loweredCase = true;\n    }\n  }\n};\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n};\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return _base64_js_index_js__WEBPACK_IMPORTED_MODULE_1__.b.fromByteArray(buf)\n  } else {\n    return _base64_js_index_js__WEBPACK_IMPORTED_MODULE_1__.b.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end);\n  const res = [];\n\n  let i = start;\n  while (i < end) {\n    const firstByte = buf[i];\n    let codePoint = null;\n    let bytesPerSequence = (firstByte > 0xEF)\n      ? 4\n      : (firstByte > 0xDF)\n          ? 3\n          : (firstByte > 0xBF)\n              ? 2\n              : 1;\n\n    if (i + bytesPerSequence <= end) {\n      let secondByte, thirdByte, fourthByte, tempCodePoint;\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte;\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1];\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint;\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1];\n          thirdByte = buf[i + 2];\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint;\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1];\n          thirdByte = buf[i + 2];\n          fourthByte = buf[i + 3];\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint;\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD;\n      bytesPerSequence = 1;\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000;\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n      codePoint = 0xDC00 | codePoint & 0x3FF;\n    }\n\n    res.push(codePoint);\n    i += bytesPerSequence;\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000;\n\nfunction decodeCodePointsArray (codePoints) {\n  const len = codePoints.length;\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  let res = '';\n  let i = 0;\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    );\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  let ret = '';\n  end = Math.min(buf.length, end);\n\n  for (let i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F);\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  let ret = '';\n  end = Math.min(buf.length, end);\n\n  for (let i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i]);\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  const len = buf.length;\n\n  if (!start || start < 0) start = 0;\n  if (!end || end < 0 || end > len) end = len;\n\n  let out = '';\n  for (let i = start; i < end; ++i) {\n    out += hexSliceLookupTable[buf[i]];\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  const bytes = buf.slice(start, end);\n  let res = '';\n  // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n  for (let i = 0; i < bytes.length - 1; i += 2) {\n    res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256));\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  const len = this.length;\n  start = ~~start;\n  end = end === undefined ? len : ~~end;\n\n  if (start < 0) {\n    start += len;\n    if (start < 0) start = 0;\n  } else if (start > len) {\n    start = len;\n  }\n\n  if (end < 0) {\n    end += len;\n    if (end < 0) end = 0;\n  } else if (end > len) {\n    end = len;\n  }\n\n  if (end < start) end = start;\n\n  const newBuf = this.subarray(start, end);\n  // Return an augmented `Uint8Array` instance\n  Object.setPrototypeOf(newBuf, Buffer.prototype);\n\n  return newBuf\n};\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0;\n  byteLength = byteLength >>> 0;\n  if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n  let val = this[offset];\n  let mul = 1;\n  let i = 0;\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul;\n  }\n\n  return val\n};\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0;\n  byteLength = byteLength >>> 0;\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length);\n  }\n\n  let val = this[offset + --byteLength];\n  let mul = 1;\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul;\n  }\n\n  return val\n};\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 1, this.length);\n  return this[offset]\n};\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 2, this.length);\n  return this[offset] | (this[offset + 1] << 8)\n};\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 2, this.length);\n  return (this[offset] << 8) | this[offset + 1]\n};\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 4, this.length);\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n};\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 4, this.length);\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n};\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n  offset = offset >>> 0;\n  validateNumber(offset, 'offset');\n  const first = this[offset];\n  const last = this[offset + 7];\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8);\n  }\n\n  const lo = first +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 24;\n\n  const hi = this[++offset] +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    last * 2 ** 24;\n\n  return BigInt(lo) + (BigInt(hi) << BigInt(32))\n});\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n  offset = offset >>> 0;\n  validateNumber(offset, 'offset');\n  const first = this[offset];\n  const last = this[offset + 7];\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8);\n  }\n\n  const hi = first * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    this[++offset];\n\n  const lo = this[++offset] * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    last;\n\n  return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n});\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0;\n  byteLength = byteLength >>> 0;\n  if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n  let val = this[offset];\n  let mul = 1;\n  let i = 0;\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul;\n  }\n  mul *= 0x80;\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n  return val\n};\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0;\n  byteLength = byteLength >>> 0;\n  if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n  let i = byteLength;\n  let mul = 1;\n  let val = this[offset + --i];\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul;\n  }\n  mul *= 0x80;\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n  return val\n};\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 1, this.length);\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n};\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 2, this.length);\n  const val = this[offset] | (this[offset + 1] << 8);\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 2, this.length);\n  const val = this[offset + 1] | (this[offset] << 8);\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 4, this.length);\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n};\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 4, this.length);\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n};\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n  offset = offset >>> 0;\n  validateNumber(offset, 'offset');\n  const first = this[offset];\n  const last = this[offset + 7];\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8);\n  }\n\n  const val = this[offset + 4] +\n    this[offset + 5] * 2 ** 8 +\n    this[offset + 6] * 2 ** 16 +\n    (last << 24); // Overflow\n\n  return (BigInt(val) << BigInt(32)) +\n    BigInt(first +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 24)\n});\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n  offset = offset >>> 0;\n  validateNumber(offset, 'offset');\n  const first = this[offset];\n  const last = this[offset + 7];\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8);\n  }\n\n  const val = (first << 24) + // Overflow\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    this[++offset];\n\n  return (BigInt(val) << BigInt(32)) +\n    BigInt(this[++offset] * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    last)\n});\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 4, this.length);\n  return _ieee754_index_js__WEBPACK_IMPORTED_MODULE_2__.i.read(this, offset, true, 23, 4)\n};\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 4, this.length);\n  return _ieee754_index_js__WEBPACK_IMPORTED_MODULE_2__.i.read(this, offset, false, 23, 4)\n};\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 8, this.length);\n  return _ieee754_index_js__WEBPACK_IMPORTED_MODULE_2__.i.read(this, offset, true, 52, 8)\n};\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  offset = offset >>> 0;\n  if (!noAssert) checkOffset(offset, 8, this.length);\n  return _ieee754_index_js__WEBPACK_IMPORTED_MODULE_2__.i.read(this, offset, false, 52, 8)\n};\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  byteLength = byteLength >>> 0;\n  if (!noAssert) {\n    const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n    checkInt(this, value, offset, byteLength, maxBytes, 0);\n  }\n\n  let mul = 1;\n  let i = 0;\n  this[offset] = value & 0xFF;\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF;\n  }\n\n  return offset + byteLength\n};\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  byteLength = byteLength >>> 0;\n  if (!noAssert) {\n    const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n    checkInt(this, value, offset, byteLength, maxBytes, 0);\n  }\n\n  let i = byteLength - 1;\n  let mul = 1;\n  this[offset + i] = value & 0xFF;\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF;\n  }\n\n  return offset + byteLength\n};\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n  this[offset] = (value & 0xff);\n  return offset + 1\n};\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n  this[offset] = (value & 0xff);\n  this[offset + 1] = (value >>> 8);\n  return offset + 2\n};\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n  this[offset] = (value >>> 8);\n  this[offset + 1] = (value & 0xff);\n  return offset + 2\n};\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n  this[offset + 3] = (value >>> 24);\n  this[offset + 2] = (value >>> 16);\n  this[offset + 1] = (value >>> 8);\n  this[offset] = (value & 0xff);\n  return offset + 4\n};\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n  this[offset] = (value >>> 24);\n  this[offset + 1] = (value >>> 16);\n  this[offset + 2] = (value >>> 8);\n  this[offset + 3] = (value & 0xff);\n  return offset + 4\n};\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n  checkIntBI(value, min, max, buf, offset, 7);\n\n  let lo = Number(value & BigInt(0xffffffff));\n  buf[offset++] = lo;\n  lo = lo >> 8;\n  buf[offset++] = lo;\n  lo = lo >> 8;\n  buf[offset++] = lo;\n  lo = lo >> 8;\n  buf[offset++] = lo;\n  let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n  buf[offset++] = hi;\n  hi = hi >> 8;\n  buf[offset++] = hi;\n  hi = hi >> 8;\n  buf[offset++] = hi;\n  hi = hi >> 8;\n  buf[offset++] = hi;\n  return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n  checkIntBI(value, min, max, buf, offset, 7);\n\n  let lo = Number(value & BigInt(0xffffffff));\n  buf[offset + 7] = lo;\n  lo = lo >> 8;\n  buf[offset + 6] = lo;\n  lo = lo >> 8;\n  buf[offset + 5] = lo;\n  lo = lo >> 8;\n  buf[offset + 4] = lo;\n  let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n  buf[offset + 3] = hi;\n  hi = hi >> 8;\n  buf[offset + 2] = hi;\n  hi = hi >> 8;\n  buf[offset + 1] = hi;\n  hi = hi >> 8;\n  buf[offset] = hi;\n  return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n  return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n});\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n  return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n});\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) {\n    const limit = Math.pow(2, (8 * byteLength) - 1);\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit);\n  }\n\n  let i = 0;\n  let mul = 1;\n  let sub = 0;\n  this[offset] = value & 0xFF;\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1;\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n  }\n\n  return offset + byteLength\n};\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) {\n    const limit = Math.pow(2, (8 * byteLength) - 1);\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit);\n  }\n\n  let i = byteLength - 1;\n  let mul = 1;\n  let sub = 0;\n  this[offset + i] = value & 0xFF;\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1;\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n  }\n\n  return offset + byteLength\n};\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n  if (value < 0) value = 0xff + value + 1;\n  this[offset] = (value & 0xff);\n  return offset + 1\n};\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n  this[offset] = (value & 0xff);\n  this[offset + 1] = (value >>> 8);\n  return offset + 2\n};\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n  this[offset] = (value >>> 8);\n  this[offset + 1] = (value & 0xff);\n  return offset + 2\n};\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n  this[offset] = (value & 0xff);\n  this[offset + 1] = (value >>> 8);\n  this[offset + 2] = (value >>> 16);\n  this[offset + 3] = (value >>> 24);\n  return offset + 4\n};\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n  if (value < 0) value = 0xffffffff + value + 1;\n  this[offset] = (value >>> 24);\n  this[offset + 1] = (value >>> 16);\n  this[offset + 2] = (value >>> 8);\n  this[offset + 3] = (value & 0xff);\n  return offset + 4\n};\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n  return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n});\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n  return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n});\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4);\n  }\n  _ieee754_index_js__WEBPACK_IMPORTED_MODULE_2__.i.write(buf, value, offset, littleEndian, 23, 4);\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n};\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  value = +value;\n  offset = offset >>> 0;\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8);\n  }\n  _ieee754_index_js__WEBPACK_IMPORTED_MODULE_2__.i.write(buf, value, offset, littleEndian, 52, 8);\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n};\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n  if (!start) start = 0;\n  if (!end && end !== 0) end = this.length;\n  if (targetStart >= target.length) targetStart = target.length;\n  if (!targetStart) targetStart = 0;\n  if (end > 0 && end < start) end = start;\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length;\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start;\n  }\n\n  const len = end - start;\n\n  if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n    // Use built-in when available, missing from IE11\n    this.copyWithin(targetStart, start, end);\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, end),\n      targetStart\n    );\n  }\n\n  return len\n};\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start;\n      start = 0;\n      end = this.length;\n    } else if (typeof end === 'string') {\n      encoding = end;\n      end = this.length;\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n    if (val.length === 1) {\n      const code = val.charCodeAt(0);\n      if ((encoding === 'utf8' && code < 128) ||\n          encoding === 'latin1') {\n        // Fast path: If `val` fits into a single byte, use that numeric value.\n        val = code;\n      }\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255;\n  } else if (typeof val === 'boolean') {\n    val = Number(val);\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0;\n  end = end === undefined ? this.length : end >>> 0;\n\n  if (!val) val = 0;\n\n  let i;\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val;\n    }\n  } else {\n    const bytes = Buffer.isBuffer(val)\n      ? val\n      : Buffer.from(val, encoding);\n    const len = bytes.length;\n    if (len === 0) {\n      throw new TypeError('The value \"' + val +\n        '\" is invalid for argument \"value\"')\n    }\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len];\n    }\n  }\n\n  return this\n};\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {};\nfunction E (sym, getMessage, Base) {\n  errors[sym] = class NodeError extends Base {\n    constructor () {\n      super();\n\n      Object.defineProperty(this, 'message', {\n        value: getMessage.apply(this, arguments),\n        writable: true,\n        configurable: true\n      });\n\n      // Add the error code to the name to include it in the stack trace.\n      this.name = `${this.name} [${sym}]`;\n      // Access the stack to generate the error message including the error code\n      // from the name.\n      this.stack; // eslint-disable-line no-unused-expressions\n      // Reset the name to the actual name.\n      delete this.name;\n    }\n\n    get code () {\n      return sym\n    }\n\n    set code (value) {\n      Object.defineProperty(this, 'code', {\n        configurable: true,\n        enumerable: true,\n        value,\n        writable: true\n      });\n    }\n\n    toString () {\n      return `${this.name} [${sym}]: ${this.message}`\n    }\n  };\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n  function (name) {\n    if (name) {\n      return `${name} is outside of buffer bounds`\n    }\n\n    return 'Attempt to access memory outside buffer bounds'\n  }, RangeError);\nE('ERR_INVALID_ARG_TYPE',\n  function (name, actual) {\n    return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n  }, TypeError);\nE('ERR_OUT_OF_RANGE',\n  function (str, range, input) {\n    let msg = `The value of \"${str}\" is out of range.`;\n    let received = input;\n    if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n      received = addNumericalSeparator(String(input));\n    } else if (typeof input === 'bigint') {\n      received = String(input);\n      if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n        received = addNumericalSeparator(received);\n      }\n      received += 'n';\n    }\n    msg += ` It must be ${range}. Received ${received}`;\n    return msg\n  }, RangeError);\n\nfunction addNumericalSeparator (val) {\n  let res = '';\n  let i = val.length;\n  const start = val[0] === '-' ? 1 : 0;\n  for (; i >= start + 4; i -= 3) {\n    res = `_${val.slice(i - 3, i)}${res}`;\n  }\n  return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n  validateNumber(offset, 'offset');\n  if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n    boundsError(offset, buf.length - (byteLength + 1));\n  }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n  if (value > max || value < min) {\n    const n = typeof min === 'bigint' ? 'n' : '';\n    let range;\n    if (byteLength > 3) {\n      if (min === 0 || min === BigInt(0)) {\n        range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;\n      } else {\n        range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n                `${(byteLength + 1) * 8 - 1}${n}`;\n      }\n    } else {\n      range = `>= ${min}${n} and <= ${max}${n}`;\n    }\n    throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n  }\n  checkBounds(buf, offset, byteLength);\n}\n\nfunction validateNumber (value, name) {\n  if (typeof value !== 'number') {\n    throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n  }\n}\n\nfunction boundsError (value, length, type) {\n  if (Math.floor(value) !== value) {\n    validateNumber(value, type);\n    throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n  }\n\n  if (length < 0) {\n    throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n  }\n\n  throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n                                    `>= ${type ? 1 : 0} and <= ${length}`,\n                                    value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n\nfunction base64clean (str) {\n  // Node takes equal signs as end of the Base64 encoding\n  str = str.split('=')[0];\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = str.trim().replace(INVALID_BASE64_RE, '');\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '=';\n  }\n  return str\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity;\n  let codePoint;\n  const length = string.length;\n  let leadSurrogate = null;\n  const bytes = [];\n\n  for (let i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i);\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint;\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n        leadSurrogate = codePoint;\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n    }\n\n    leadSurrogate = null;\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint);\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      );\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      );\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      );\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  const byteArray = [];\n  for (let i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF);\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  let c, hi, lo;\n  const byteArray = [];\n  for (let i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i);\n    hi = c >> 8;\n    lo = c % 256;\n    byteArray.push(lo);\n    byteArray.push(hi);\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return _base64_js_index_js__WEBPACK_IMPORTED_MODULE_1__.b.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  let i;\n  for (i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i];\n  }\n  return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n  return obj instanceof type ||\n    (obj != null && obj.constructor != null && obj.constructor.name != null &&\n      obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n  // For IE11 support\n  return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n  const alphabet = '0123456789abcdef';\n  const table = new Array(256);\n  for (let i = 0; i < 16; ++i) {\n    const i16 = i * 16;\n    for (let j = 0; j < 16; ++j) {\n      table[i16 + j] = alphabet[i] + alphabet[j];\n    }\n  }\n  return table\n})();\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n  return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n  throw new Error('BigInt not supported')\n}\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/buffer/index.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-array/src/ascending.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-array/src/ascending.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"a\": () => (/* binding */ ascending)\n/* harmony export */ });\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-array/src/ascending.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-array/src/bisect.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-array/src/bisect.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"b\": () => (/* binding */ bisectRight)\n/* harmony export */ });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-array/src/ascending.js\");\n/* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisector.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-array/src/bisector.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-array/src/number.js\");\n\n\n\n\nconst ascendingBisect = (0,_bisector_js__WEBPACK_IMPORTED_MODULE_1__.b)(_ascending_js__WEBPACK_IMPORTED_MODULE_0__.a);\nconst bisectRight = ascendingBisect.right;\n(0,_bisector_js__WEBPACK_IMPORTED_MODULE_1__.b)(_number_js__WEBPACK_IMPORTED_MODULE_2__.n).center;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-array/src/bisect.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-array/src/bisector.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-array/src/bisector.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"b\": () => (/* binding */ bisector)\n/* harmony export */ });\n/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-array/src/ascending.js\");\n\n\nfunction bisector(f) {\n  let delta = f;\n  let compare = f;\n\n  if (f.length === 1) {\n    delta = (d, x) => f(d) - x;\n    compare = ascendingComparator(f);\n  }\n\n  function left(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    while (lo < hi) {\n      const mid = (lo + hi) >>> 1;\n      if (compare(a[mid], x) < 0) lo = mid + 1;\n      else hi = mid;\n    }\n    return lo;\n  }\n\n  function right(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    while (lo < hi) {\n      const mid = (lo + hi) >>> 1;\n      if (compare(a[mid], x) > 0) hi = mid;\n      else lo = mid + 1;\n    }\n    return lo;\n  }\n\n  function center(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    const i = left(a, x, lo, hi - 1);\n    return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n  }\n\n  return {left, center, right};\n}\n\nfunction ascendingComparator(f) {\n  return (d, x) => (0,_ascending_js__WEBPACK_IMPORTED_MODULE_0__.a)(f(d), x);\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-array/src/bisector.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-array/src/number.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-array/src/number.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"n\": () => (/* binding */ number)\n/* harmony export */ });\nfunction number(x) {\n  return x === null ? NaN : +x;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-array/src/number.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-array/src/ticks.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-array/src/ticks.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"a\": () => (/* binding */ tickIncrement),\n/* harmony export */   \"b\": () => (/* binding */ tickStep),\n/* harmony export */   \"t\": () => (/* binding */ ticks)\n/* harmony export */ });\nvar e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\nfunction ticks(start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n    if (r0 * step < start) ++r0;\n    if (r1 * step > stop) --r1;\n    ticks = new Array(n = r1 - r0 + 1);\n    while (++i < n) ticks[i] = (r0 + i) * step;\n  } else {\n    step = -step;\n    let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n    if (r0 / step < start) ++r0;\n    if (r1 / step > stop) --r1;\n    ticks = new Array(n = r1 - r0 + 1);\n    while (++i < n) ticks[i] = (r0 + i) / step;\n  }\n\n  if (reverse) ticks.reverse();\n\n  return ticks;\n}\n\nfunction tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0\n      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nfunction tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;\n  else if (error >= e5) step1 *= 5;\n  else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-array/src/ticks.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-color/src/color.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-color/src/color.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"c\": () => (/* binding */ color),\n/* harmony export */   \"r\": () => (/* binding */ rgb)\n/* harmony export */ });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-color/src/define.js\");\n\n\nfunction Color() {}\n\nvar darker = 0.7;\nvar brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\n(0,_define_js__WEBPACK_IMPORTED_MODULE_0__.d)(Color, color, {\n  copy: function(channels) {\n    return Object.assign(new this.constructor, this, channels);\n  },\n  displayable: function() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nfunction color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n      : null) // invalid hex\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nfunction rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nfunction rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nfunction Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\n(0,_define_js__WEBPACK_IMPORTED_MODULE_0__.d)(Rgb, rgb, (0,_define_js__WEBPACK_IMPORTED_MODULE_0__.e)(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function() {\n    return this;\n  },\n  displayable: function() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n  var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n  return (a === 1 ? \"rgb(\" : \"rgba(\")\n      + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n      + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n      + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n  value = Math.max(0, Math.min(255, Math.round(value) || 0));\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nfunction hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nfunction hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\n(0,_define_js__WEBPACK_IMPORTED_MODULE_0__.d)(Hsl, hsl, (0,_define_js__WEBPACK_IMPORTED_MODULE_0__.e)(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  displayable: function() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  formatHsl: function() {\n    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"hsl(\" : \"hsla(\")\n        + (this.h || 0) + \", \"\n        + (this.s || 0) * 100 + \"%, \"\n        + (this.l || 0) * 100 + \"%\"\n        + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-color/src/color.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-color/src/define.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-color/src/define.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"d\": () => (/* binding */ define),\n/* harmony export */   \"e\": () => (/* binding */ extend)\n/* harmony export */ });\nfunction define(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n}\n\nfunction extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-color/src/define.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/defaultLocale.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/defaultLocale.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"a\": () => (/* binding */ format),\n/* harmony export */   \"f\": () => (/* binding */ formatPrefix)\n/* harmony export */ });\n/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/locale.js\");\n\n\nvar locale;\nvar format;\nvar formatPrefix;\n\ndefaultLocale({\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"]\n});\n\nfunction defaultLocale(definition) {\n  locale = (0,_locale_js__WEBPACK_IMPORTED_MODULE_0__.f)(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/defaultLocale.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/exponent.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/exponent.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"e\": () => (/* binding */ exponent)\n/* harmony export */ });\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatDecimal.js\");\n\n\nfunction exponent(x) {\n  return x = (0,_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__.f)(Math.abs(x)), x ? x[1] : NaN;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/exponent.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatDecimal.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatDecimal.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"a\": () => (/* binding */ formatDecimal),\n/* harmony export */   \"f\": () => (/* binding */ formatDecimalParts)\n/* harmony export */ });\nfunction formatDecimal(x) {\n  return Math.abs(x = Math.round(x)) >= 1e21\n      ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n      : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nfunction formatDecimalParts(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatDecimal.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatGroup.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatGroup.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"f\": () => (/* binding */ formatGroup)\n/* harmony export */ });\nfunction formatGroup(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatGroup.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatNumerals.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatNumerals.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"f\": () => (/* binding */ formatNumerals)\n/* harmony export */ });\nfunction formatNumerals(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatNumerals.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatPrefixAuto.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatPrefixAuto.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"f\": () => (/* binding */ formatPrefixAuto),\n/* harmony export */   \"p\": () => (/* binding */ prefixExponent)\n/* harmony export */ });\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatDecimal.js\");\n\n\nvar prefixExponent;\n\nfunction formatPrefixAuto(x, p) {\n  var d = (0,_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__.f)(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + (0,_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__.f)(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatPrefixAuto.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatRounded.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatRounded.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"f\": () => (/* binding */ formatRounded)\n/* harmony export */ });\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatDecimal.js\");\n\n\nfunction formatRounded(x, p) {\n  var d = (0,_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__.f)(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatRounded.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatSpecifier.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatSpecifier.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"f\": () => (/* binding */ formatSpecifier)\n/* harmony export */ });\n// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nfunction formatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n  var match;\n  return new FormatSpecifier({\n    fill: match[1],\n    align: match[2],\n    sign: match[3],\n    symbol: match[4],\n    zero: match[5],\n    width: match[6],\n    comma: match[7],\n    precision: match[8] && match[8].slice(1),\n    trim: match[9],\n    type: match[10]\n  });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nfunction FormatSpecifier(specifier) {\n  this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n  this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n  this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n  this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n  this.zero = !!specifier.zero;\n  this.width = specifier.width === undefined ? undefined : +specifier.width;\n  this.comma = !!specifier.comma;\n  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n  this.trim = !!specifier.trim;\n  this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + (this.trim ? \"~\" : \"\")\n      + this.type;\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatSpecifier.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatTrim.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatTrim.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"f\": () => (/* binding */ formatTrim)\n/* harmony export */ });\n// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nfunction formatTrim(s) {\n  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (s[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n    }\n  }\n  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatTrim.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatTypes.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatTypes.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"f\": () => (/* binding */ formatTypes)\n/* harmony export */ });\n/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatDecimal.js\");\n/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatPrefixAuto.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatPrefixAuto.js\");\n/* harmony import */ var _formatRounded_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatRounded.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatRounded.js\");\n\n\n\n\nvar formatTypes = {\n  \"%\": (x, p) => (x * 100).toFixed(p),\n  \"b\": (x) => Math.round(x).toString(2),\n  \"c\": (x) => x + \"\",\n  \"d\": _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__.a,\n  \"e\": (x, p) => x.toExponential(p),\n  \"f\": (x, p) => x.toFixed(p),\n  \"g\": (x, p) => x.toPrecision(p),\n  \"o\": (x) => Math.round(x).toString(8),\n  \"p\": (x, p) => (0,_formatRounded_js__WEBPACK_IMPORTED_MODULE_2__.f)(x * 100, p),\n  \"r\": _formatRounded_js__WEBPACK_IMPORTED_MODULE_2__.f,\n  \"s\": _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_1__.f,\n  \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n  \"x\": (x) => Math.round(x).toString(16)\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatTypes.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/identity.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/identity.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"i\": () => (/* binding */ identity)\n/* harmony export */ });\nfunction identity(x) {\n  return x;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/identity.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/locale.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/locale.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"f\": () => (/* binding */ formatLocale)\n/* harmony export */ });\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/exponent.js\");\n/* harmony import */ var _formatGroup_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatGroup.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatGroup.js\");\n/* harmony import */ var _formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatNumerals.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatNumerals.js\");\n/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formatSpecifier.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatSpecifier.js\");\n/* harmony import */ var _formatTrim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formatTrim.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatTrim.js\");\n/* harmony import */ var _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./formatTypes.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatTypes.js\");\n/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./formatPrefixAuto.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatPrefixAuto.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/identity.js\");\n\n\n\n\n\n\n\n\n\nvar map = Array.prototype.map,\n    prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nfunction formatLocale(locale) {\n  var group = locale.grouping === undefined || locale.thousands === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__.i : (0,_formatGroup_js__WEBPACK_IMPORTED_MODULE_1__.f)(map.call(locale.grouping, Number), locale.thousands + \"\"),\n      currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n      currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n      decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n      numerals = locale.numerals === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__.i : (0,_formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__.f)(map.call(locale.numerals, String)),\n      percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n      minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n      nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n  function newFormat(specifier) {\n    specifier = (0,_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__.f)(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        trim = specifier.trim,\n        type = specifier.type;\n\n    // The \"n\" type is an alias for \",g\".\n    if (type === \"n\") comma = true, type = \"g\";\n\n    // The \"\" type, and any invalid type, is an alias for \".12~g\".\n    else if (!_formatTypes_js__WEBPACK_IMPORTED_MODULE_5__.f[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n    // If zero fill is specified, padding goes after sign and before digits.\n    if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__.f[type],\n        maybeSuffix = /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision === undefined ? 6\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n        var valueNegative = value < 0 || 1 / value < 0;\n\n        // Perform the initial formatting.\n        value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n        // Trim insignificant zeros.\n        if (trim) value = (0,_formatTrim_js__WEBPACK_IMPORTED_MODULE_4__.f)(value);\n\n        // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n        if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__.p / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer “value” part that can be\n        // grouped, and fractional or exponential “suffix” part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = (0,_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__.f)(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor((0,_exponent_js__WEBPACK_IMPORTED_MODULE_0__.e)(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/locale.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/precisionFixed.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/precisionFixed.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"p\": () => (/* binding */ precisionFixed)\n/* harmony export */ });\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/exponent.js\");\n\n\nfunction precisionFixed(step) {\n  return Math.max(0, -(0,_exponent_js__WEBPACK_IMPORTED_MODULE_0__.e)(Math.abs(step)));\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/precisionFixed.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/precisionPrefix.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/precisionPrefix.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"p\": () => (/* binding */ precisionPrefix)\n/* harmony export */ });\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/exponent.js\");\n\n\nfunction precisionPrefix(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor((0,_exponent_js__WEBPACK_IMPORTED_MODULE_0__.e)(value) / 3))) * 3 - (0,_exponent_js__WEBPACK_IMPORTED_MODULE_0__.e)(Math.abs(step)));\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/precisionPrefix.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-format/src/precisionRound.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-format/src/precisionRound.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"p\": () => (/* binding */ precisionRound)\n/* harmony export */ });\n/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/exponent.js\");\n\n\nfunction precisionRound(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, (0,_exponent_js__WEBPACK_IMPORTED_MODULE_0__.e)(max) - (0,_exponent_js__WEBPACK_IMPORTED_MODULE_0__.e)(step)) + 1;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-format/src/precisionRound.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/array.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/array.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"g\": () => (/* binding */ genericArray)\n/* harmony export */ });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/value.js\");\n\n\nfunction genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = (0,_value_js__WEBPACK_IMPORTED_MODULE_0__.i)(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/array.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/color.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/color.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"g\": () => (/* binding */ gamma),\n/* harmony export */   \"n\": () => (/* binding */ nogamma)\n/* harmony export */ });\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/constant.js\");\n\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nfunction gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : (0,_constant_js__WEBPACK_IMPORTED_MODULE_0__.c)(isNaN(a) ? b : a);\n  };\n}\n\nfunction nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : (0,_constant_js__WEBPACK_IMPORTED_MODULE_0__.c)(isNaN(a) ? b : a);\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/color.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/constant.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/constant.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"c\": () => (/* binding */ constant)\n/* harmony export */ });\nvar constant = x => () => x;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/constant.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/date.js":
/*!************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/date.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"d\": () => (/* binding */ date)\n/* harmony export */ });\nfunction date(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/date.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/number.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/number.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"i\": () => (/* binding */ interpolateNumber)\n/* harmony export */ });\nfunction interpolateNumber(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/number.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/numberArray.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/numberArray.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"i\": () => (/* binding */ isNumberArray),\n/* harmony export */   \"n\": () => (/* binding */ numberArray)\n/* harmony export */ });\nfunction numberArray(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n}\n\nfunction isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/numberArray.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/object.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/object.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"o\": () => (/* binding */ object)\n/* harmony export */ });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/value.js\");\n\n\nfunction object(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = (0,_value_js__WEBPACK_IMPORTED_MODULE_0__.i)(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/object.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/rgb.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/rgb.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"r\": () => (/* binding */ rgb)\n/* harmony export */ });\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/color.js\");\n/* harmony import */ var _d3_color_src_color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../d3-color/src/color.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-color/src/color.js\");\n\n\n\nvar rgb = (function rgbGamma(y) {\n  var color = (0,_color_js__WEBPACK_IMPORTED_MODULE_0__.g)(y);\n\n  function rgb(start, end) {\n    var r = color((start = (0,_d3_color_src_color_js__WEBPACK_IMPORTED_MODULE_1__.r)(start)).r, (end = (0,_d3_color_src_color_js__WEBPACK_IMPORTED_MODULE_1__.r)(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = (0,_color_js__WEBPACK_IMPORTED_MODULE_0__.n)(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1);\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/rgb.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/round.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/round.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"i\": () => (/* binding */ interpolateRound)\n/* harmony export */ });\nfunction interpolateRound(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/round.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/string.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/string.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"s\": () => (/* binding */ string)\n/* harmony export */ });\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/number.js\");\n\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\nfunction string(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: (0,_number_js__WEBPACK_IMPORTED_MODULE_0__.i)(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/string.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/value.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/value.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"i\": () => (/* binding */ interpolate)\n/* harmony export */ });\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/rgb.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/array.js\");\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./date.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/date.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/number.js\");\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./object.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/object.js\");\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./string.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/string.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/constant.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/numberArray.js\");\n/* harmony import */ var _d3_color_src_color_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../d3-color/src/color.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-color/src/color.js\");\n\n\n\n\n\n\n\n\n\n\nfunction interpolate(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? (0,_constant_js__WEBPACK_IMPORTED_MODULE_6__.c)(b)\n      : (t === \"number\" ? _number_js__WEBPACK_IMPORTED_MODULE_3__.i\n      : t === \"string\" ? ((c = (0,_d3_color_src_color_js__WEBPACK_IMPORTED_MODULE_8__.c)(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_0__.r) : _string_js__WEBPACK_IMPORTED_MODULE_5__.s)\n      : b instanceof _d3_color_src_color_js__WEBPACK_IMPORTED_MODULE_8__.c ? _rgb_js__WEBPACK_IMPORTED_MODULE_0__.r\n      : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_2__.d\n      : (0,_numberArray_js__WEBPACK_IMPORTED_MODULE_7__.i)(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_7__.n\n      : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_1__.g\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_4__.o\n      : _number_js__WEBPACK_IMPORTED_MODULE_3__.i)(a, b);\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/value.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-scale/src/constant.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-scale/src/constant.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"c\": () => (/* binding */ constants)\n/* harmony export */ });\nfunction constants(x) {\n  return function() {\n    return x;\n  };\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-scale/src/constant.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-scale/src/continuous.js":
/*!************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-scale/src/continuous.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"a\": () => (/* binding */ copy),\n/* harmony export */   \"c\": () => (/* binding */ continuous)\n/* harmony export */ });\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-scale/src/constant.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./number.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-scale/src/number.js\");\n/* harmony import */ var _d3_interpolate_src_number_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../d3-interpolate/src/number.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/number.js\");\n/* harmony import */ var _d3_interpolate_src_round_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../d3-interpolate/src/round.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/round.js\");\n/* harmony import */ var _d3_interpolate_src_value_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../d3-interpolate/src/value.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-interpolate/src/value.js\");\n/* harmony import */ var _d3_array_src_bisect_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../d3-array/src/bisect.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-array/src/bisect.js\");\n\n\n\n\n\n\n\nvar unit = [0, 1];\n\nfunction identity(x) {\n  return x;\n}\n\nfunction normalize(a, b) {\n  return (b -= (a = +a))\n      ? function(x) { return (x - a) / b; }\n      : (0,_constant_js__WEBPACK_IMPORTED_MODULE_0__.c)(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n  var t;\n  if (a > b) t = a, a = b, b = t;\n  return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n  if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n  else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n  return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1;\n\n  // Reverse descending domains.\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = normalize(domain[i], domain[i + 1]);\n    r[i] = interpolate(range[i], range[i + 1]);\n  }\n\n  return function(x) {\n    var i = (0,_d3_array_src_bisect_js__WEBPACK_IMPORTED_MODULE_5__.b)(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nfunction copy(source, target) {\n  return target\n      .domain(source.domain())\n      .range(source.range())\n      .interpolate(source.interpolate())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nfunction transformer() {\n  var domain = unit,\n      range = unit,\n      interpolate$1 = _d3_interpolate_src_value_js__WEBPACK_IMPORTED_MODULE_4__.i,\n      transform,\n      untransform,\n      unknown,\n      clamp = identity,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    var n = Math.min(domain.length, range.length);\n    if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n    piecewise = n > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate$1)))(transform(clamp(x)));\n  }\n\n  scale.invert = function(y) {\n    return clamp(untransform((input || (input = piecewise(range, domain.map(transform), _d3_interpolate_src_number_js__WEBPACK_IMPORTED_MODULE_2__.i)))(y)));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_, _number_js__WEBPACK_IMPORTED_MODULE_1__.n), rescale()) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = Array.from(_), interpolate$1 = _d3_interpolate_src_round_js__WEBPACK_IMPORTED_MODULE_3__.i, rescale();\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n  };\n\n  scale.interpolate = function(_) {\n    return arguments.length ? (interpolate$1 = _, rescale()) : interpolate$1;\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t, u) {\n    transform = t, untransform = u;\n    return rescale();\n  };\n}\n\nfunction continuous() {\n  return transformer()(identity, identity);\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-scale/src/continuous.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-scale/src/init.js":
/*!******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-scale/src/init.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"i\": () => (/* binding */ initRange)\n/* harmony export */ });\nfunction initRange(domain, range) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: this.range(domain); break;\n    default: this.range(range).domain(domain); break;\n  }\n  return this;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-scale/src/init.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-scale/src/linear.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-scale/src/linear.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"l\": () => (/* binding */ linear)\n/* harmony export */ });\n/* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./continuous.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-scale/src/continuous.js\");\n/* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-scale/src/init.js\");\n/* harmony import */ var _tickFormat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tickFormat.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-scale/src/tickFormat.js\");\n/* harmony import */ var _d3_array_src_ticks_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../d3-array/src/ticks.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-array/src/ticks.js\");\n\n\n\n\n\nfunction linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function(count) {\n    var d = domain();\n    return (0,_d3_array_src_ticks_js__WEBPACK_IMPORTED_MODULE_3__.t)(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    var d = domain();\n    return (0,_tickFormat_js__WEBPACK_IMPORTED_MODULE_2__.t)(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n  };\n\n  scale.nice = function(count) {\n    if (count == null) count = 10;\n\n    var d = domain();\n    var i0 = 0;\n    var i1 = d.length - 1;\n    var start = d[i0];\n    var stop = d[i1];\n    var prestep;\n    var step;\n    var maxIter = 10;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n    \n    while (maxIter-- > 0) {\n      step = (0,_d3_array_src_ticks_js__WEBPACK_IMPORTED_MODULE_3__.a)(start, stop, count);\n      if (step === prestep) {\n        d[i0] = start;\n        d[i1] = stop;\n        return domain(d);\n      } else if (step > 0) {\n        start = Math.floor(start / step) * step;\n        stop = Math.ceil(stop / step) * step;\n      } else if (step < 0) {\n        start = Math.ceil(start * step) / step;\n        stop = Math.floor(stop * step) / step;\n      } else {\n        break;\n      }\n      prestep = step;\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\n\nfunction linear() {\n  var scale = (0,_continuous_js__WEBPACK_IMPORTED_MODULE_0__.c)();\n\n  scale.copy = function() {\n    return (0,_continuous_js__WEBPACK_IMPORTED_MODULE_0__.a)(scale, linear());\n  };\n\n  _init_js__WEBPACK_IMPORTED_MODULE_1__.i.apply(scale, arguments);\n\n  return linearish(scale);\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-scale/src/linear.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-scale/src/number.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-scale/src/number.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"n\": () => (/* binding */ number)\n/* harmony export */ });\nfunction number(x) {\n  return +x;\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-scale/src/number.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/d3-scale/src/tickFormat.js":
/*!************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/d3-scale/src/tickFormat.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"t\": () => (/* binding */ tickFormat)\n/* harmony export */ });\n/* harmony import */ var _d3_format_src_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../d3-format/src/formatSpecifier.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/formatSpecifier.js\");\n/* harmony import */ var _d3_format_src_precisionFixed_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../d3-format/src/precisionFixed.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/precisionFixed.js\");\n/* harmony import */ var _d3_format_src_precisionRound_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../d3-format/src/precisionRound.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/precisionRound.js\");\n/* harmony import */ var _d3_format_src_precisionPrefix_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../d3-format/src/precisionPrefix.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/precisionPrefix.js\");\n/* harmony import */ var _d3_format_src_defaultLocale_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../d3-format/src/defaultLocale.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-format/src/defaultLocale.js\");\n/* harmony import */ var _d3_array_src_ticks_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../d3-array/src/ticks.js */ \"./node_modules/@kitware/vtk.js/vendor/d3-array/src/ticks.js\");\n\n\n\n\n\n\n\nfunction tickFormat(start, stop, count, specifier) {\n  var step = (0,_d3_array_src_ticks_js__WEBPACK_IMPORTED_MODULE_5__.b)(start, stop, count),\n      precision;\n  specifier = (0,_d3_format_src_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_0__.f)(specifier == null ? \",f\" : specifier);\n  switch (specifier.type) {\n    case \"s\": {\n      var value = Math.max(Math.abs(start), Math.abs(stop));\n      if (specifier.precision == null && !isNaN(precision = (0,_d3_format_src_precisionPrefix_js__WEBPACK_IMPORTED_MODULE_3__.p)(step, value))) specifier.precision = precision;\n      return (0,_d3_format_src_defaultLocale_js__WEBPACK_IMPORTED_MODULE_4__.f)(specifier, value);\n    }\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\": {\n      if (specifier.precision == null && !isNaN(precision = (0,_d3_format_src_precisionRound_js__WEBPACK_IMPORTED_MODULE_2__.p)(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n      break;\n    }\n    case \"f\":\n    case \"%\": {\n      if (specifier.precision == null && !isNaN(precision = (0,_d3_format_src_precisionFixed_js__WEBPACK_IMPORTED_MODULE_1__.p)(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n      break;\n    }\n  }\n  return (0,_d3_format_src_defaultLocale_js__WEBPACK_IMPORTED_MODULE_4__.a)(specifier);\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/d3-scale/src/tickFormat.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/events/events.js":
/*!**************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/events/events.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"e\": () => (/* binding */ events)\n/* harmony export */ });\n// Copyright Joyent, Inc. and other Node contributors.\n\nvar R = typeof Reflect === 'object' ? Reflect : null;\nvar ReflectApply = R && typeof R.apply === 'function'\n  ? R.apply\n  : function ReflectApply(target, receiver, args) {\n    return Function.prototype.apply.call(target, receiver, args);\n  };\n\nvar ReflectOwnKeys;\nif (R && typeof R.ownKeys === 'function') {\n  ReflectOwnKeys = R.ownKeys;\n} else if (Object.getOwnPropertySymbols) {\n  ReflectOwnKeys = function ReflectOwnKeys(target) {\n    return Object.getOwnPropertyNames(target)\n      .concat(Object.getOwnPropertySymbols(target));\n  };\n} else {\n  ReflectOwnKeys = function ReflectOwnKeys(target) {\n    return Object.getOwnPropertyNames(target);\n  };\n}\n\nfunction ProcessEmitWarning(warning) {\n  if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n  return value !== value;\n};\n\nfunction EventEmitter() {\n  EventEmitter.init.call(this);\n}\nvar events = EventEmitter;\nvar once_1 = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n  if (typeof listener !== 'function') {\n    throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n  }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n  enumerable: true,\n  get: function() {\n    return defaultMaxListeners;\n  },\n  set: function(arg) {\n    if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n      throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n    }\n    defaultMaxListeners = arg;\n  }\n});\n\nEventEmitter.init = function() {\n\n  if (this._events === undefined ||\n      this._events === Object.getPrototypeOf(this)._events) {\n    this._events = Object.create(null);\n    this._eventsCount = 0;\n  }\n\n  this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n  if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n    throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n  }\n  this._maxListeners = n;\n  return this;\n};\n\nfunction _getMaxListeners(that) {\n  if (that._maxListeners === undefined)\n    return EventEmitter.defaultMaxListeners;\n  return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n  return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n  var args = [];\n  for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n  var doError = (type === 'error');\n\n  var events = this._events;\n  if (events !== undefined)\n    doError = (doError && events.error === undefined);\n  else if (!doError)\n    return false;\n\n  // If there is no 'error' event listener then throw.\n  if (doError) {\n    var er;\n    if (args.length > 0)\n      er = args[0];\n    if (er instanceof Error) {\n      // Note: The comments on the `throw` lines are intentional, they show\n      // up in Node's output if this results in an unhandled exception.\n      throw er; // Unhandled 'error' event\n    }\n    // At least give some kind of context to the user\n    var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n    err.context = er;\n    throw err; // Unhandled 'error' event\n  }\n\n  var handler = events[type];\n\n  if (handler === undefined)\n    return false;\n\n  if (typeof handler === 'function') {\n    ReflectApply(handler, this, args);\n  } else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      ReflectApply(listeners[i], this, args);\n  }\n\n  return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n  var m;\n  var events;\n  var existing;\n\n  checkListener(listener);\n\n  events = target._events;\n  if (events === undefined) {\n    events = target._events = Object.create(null);\n    target._eventsCount = 0;\n  } else {\n    // To avoid recursion in the case that type === \"newListener\"! Before\n    // adding it to the listeners, first emit \"newListener\".\n    if (events.newListener !== undefined) {\n      target.emit('newListener', type,\n                  listener.listener ? listener.listener : listener);\n\n      // Re-assign `events` because a newListener handler could have caused the\n      // this._events to be assigned to a new object\n      events = target._events;\n    }\n    existing = events[type];\n  }\n\n  if (existing === undefined) {\n    // Optimize the case of one listener. Don't need the extra array object.\n    existing = events[type] = listener;\n    ++target._eventsCount;\n  } else {\n    if (typeof existing === 'function') {\n      // Adding the second element, need to change to array.\n      existing = events[type] =\n        prepend ? [listener, existing] : [existing, listener];\n      // If we've already got an array, just append.\n    } else if (prepend) {\n      existing.unshift(listener);\n    } else {\n      existing.push(listener);\n    }\n\n    // Check for listener leak\n    m = _getMaxListeners(target);\n    if (m > 0 && existing.length > m && !existing.warned) {\n      existing.warned = true;\n      // No error code for this since it is a Warning\n      // eslint-disable-next-line no-restricted-syntax\n      var w = new Error('Possible EventEmitter memory leak detected. ' +\n                          existing.length + ' ' + String(type) + ' listeners ' +\n                          'added. Use emitter.setMaxListeners() to ' +\n                          'increase limit');\n      w.name = 'MaxListenersExceededWarning';\n      w.emitter = target;\n      w.type = type;\n      w.count = existing.length;\n      ProcessEmitWarning(w);\n    }\n  }\n\n  return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n  return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n    function prependListener(type, listener) {\n      return _addListener(this, type, listener, true);\n    };\n\nfunction onceWrapper() {\n  if (!this.fired) {\n    this.target.removeListener(this.type, this.wrapFn);\n    this.fired = true;\n    if (arguments.length === 0)\n      return this.listener.call(this.target);\n    return this.listener.apply(this.target, arguments);\n  }\n}\n\nfunction _onceWrap(target, type, listener) {\n  var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n  var wrapped = onceWrapper.bind(state);\n  wrapped.listener = listener;\n  state.wrapFn = wrapped;\n  return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n  checkListener(listener);\n  this.on(type, _onceWrap(this, type, listener));\n  return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n    function prependOnceListener(type, listener) {\n      checkListener(listener);\n      this.prependListener(type, _onceWrap(this, type, listener));\n      return this;\n    };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n    function removeListener(type, listener) {\n      var list, events, position, i, originalListener;\n\n      checkListener(listener);\n\n      events = this._events;\n      if (events === undefined)\n        return this;\n\n      list = events[type];\n      if (list === undefined)\n        return this;\n\n      if (list === listener || list.listener === listener) {\n        if (--this._eventsCount === 0)\n          this._events = Object.create(null);\n        else {\n          delete events[type];\n          if (events.removeListener)\n            this.emit('removeListener', type, list.listener || listener);\n        }\n      } else if (typeof list !== 'function') {\n        position = -1;\n\n        for (i = list.length - 1; i >= 0; i--) {\n          if (list[i] === listener || list[i].listener === listener) {\n            originalListener = list[i].listener;\n            position = i;\n            break;\n          }\n        }\n\n        if (position < 0)\n          return this;\n\n        if (position === 0)\n          list.shift();\n        else {\n          spliceOne(list, position);\n        }\n\n        if (list.length === 1)\n          events[type] = list[0];\n\n        if (events.removeListener !== undefined)\n          this.emit('removeListener', type, originalListener || listener);\n      }\n\n      return this;\n    };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n    function removeAllListeners(type) {\n      var listeners, events, i;\n\n      events = this._events;\n      if (events === undefined)\n        return this;\n\n      // not listening for removeListener, no need to emit\n      if (events.removeListener === undefined) {\n        if (arguments.length === 0) {\n          this._events = Object.create(null);\n          this._eventsCount = 0;\n        } else if (events[type] !== undefined) {\n          if (--this._eventsCount === 0)\n            this._events = Object.create(null);\n          else\n            delete events[type];\n        }\n        return this;\n      }\n\n      // emit removeListener for all listeners on all events\n      if (arguments.length === 0) {\n        var keys = Object.keys(events);\n        var key;\n        for (i = 0; i < keys.length; ++i) {\n          key = keys[i];\n          if (key === 'removeListener') continue;\n          this.removeAllListeners(key);\n        }\n        this.removeAllListeners('removeListener');\n        this._events = Object.create(null);\n        this._eventsCount = 0;\n        return this;\n      }\n\n      listeners = events[type];\n\n      if (typeof listeners === 'function') {\n        this.removeListener(type, listeners);\n      } else if (listeners !== undefined) {\n        // LIFO order\n        for (i = listeners.length - 1; i >= 0; i--) {\n          this.removeListener(type, listeners[i]);\n        }\n      }\n\n      return this;\n    };\n\nfunction _listeners(target, type, unwrap) {\n  var events = target._events;\n\n  if (events === undefined)\n    return [];\n\n  var evlistener = events[type];\n  if (evlistener === undefined)\n    return [];\n\n  if (typeof evlistener === 'function')\n    return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n  return unwrap ?\n    unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n  return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n  return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  if (typeof emitter.listenerCount === 'function') {\n    return emitter.listenerCount(type);\n  } else {\n    return listenerCount.call(emitter, type);\n  }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n  var events = this._events;\n\n  if (events !== undefined) {\n    var evlistener = events[type];\n\n    if (typeof evlistener === 'function') {\n      return 1;\n    } else if (evlistener !== undefined) {\n      return evlistener.length;\n    }\n  }\n\n  return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n  return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n  var copy = new Array(n);\n  for (var i = 0; i < n; ++i)\n    copy[i] = arr[i];\n  return copy;\n}\n\nfunction spliceOne(list, index) {\n  for (; index + 1 < list.length; index++)\n    list[index] = list[index + 1];\n  list.pop();\n}\n\nfunction unwrapListeners(arr) {\n  var ret = new Array(arr.length);\n  for (var i = 0; i < ret.length; ++i) {\n    ret[i] = arr[i].listener || arr[i];\n  }\n  return ret;\n}\n\nfunction once(emitter, name) {\n  return new Promise(function (resolve, reject) {\n    function eventListener() {\n      if (errorListener !== undefined) {\n        emitter.removeListener('error', errorListener);\n      }\n      resolve([].slice.call(arguments));\n    }    var errorListener;\n\n    // Adding an error listener is not optional because\n    // if an error is thrown on an event emitter we cannot\n    // guarantee that the actual event we are waiting will\n    // be fired. The result could be a silent way to create\n    // memory or file descriptor leaks, which is something\n    // we should avoid.\n    if (name !== 'error') {\n      errorListener = function errorListener(err) {\n        emitter.removeListener(name, eventListener);\n        reject(err);\n      };\n\n      emitter.once('error', errorListener);\n    }\n\n    emitter.once(name, eventListener);\n  });\n}\nevents.once = once_1;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/events/events.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/common.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/common.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"A\": () => (/* binding */ ARRAY_TYPE),\n/* harmony export */   \"E\": () => (/* binding */ EPSILON),\n/* harmony export */   \"R\": () => (/* binding */ RANDOM),\n/* harmony export */   \"t\": () => (/* binding */ toRadian)\n/* harmony export */ });\n/**\r\n * Common utilities\r\n * @module glMatrix\r\n */\n// Configuration Constants\nvar EPSILON = 0.000001;\nvar ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nvar RANDOM = Math.random;\nvar degree = Math.PI / 180;\n/**\r\n * Convert Degree To Radian\r\n *\r\n * @param {Number} a Angle in Degrees\r\n */\n\nfunction toRadian(a) {\n  return a * degree;\n}\nif (!Math.hypot) Math.hypot = function () {\n  var y = 0,\n      i = arguments.length;\n\n  while (i--) {\n    y += arguments[i] * arguments[i];\n  }\n\n  return Math.sqrt(y);\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/common.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat3.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat3.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"a\": () => (/* binding */ invert),\n/* harmony export */   \"b\": () => (/* binding */ mat3),\n/* harmony export */   \"c\": () => (/* binding */ create),\n/* harmony export */   \"f\": () => (/* binding */ fromMat4),\n/* harmony export */   \"i\": () => (/* binding */ identity),\n/* harmony export */   \"m\": () => (/* binding */ multiply),\n/* harmony export */   \"t\": () => (/* binding */ transpose)\n/* harmony export */ });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/common.js\");\n\n\n/**\r\n * 3x3 Matrix\r\n * @module mat3\r\n */\n\n/**\r\n * Creates a new identity mat3\r\n *\r\n * @returns {mat3} a new 3x3 matrix\r\n */\n\nfunction create() {\n  var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(9);\n\n  if (_common_js__WEBPACK_IMPORTED_MODULE_0__.A != Float32Array) {\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[5] = 0;\n    out[6] = 0;\n    out[7] = 0;\n  }\n\n  out[0] = 1;\n  out[4] = 1;\n  out[8] = 1;\n  return out;\n}\n/**\r\n * Copies the upper-left 3x3 values into the given mat3.\r\n *\r\n * @param {mat3} out the receiving 3x3 matrix\r\n * @param {ReadonlyMat4} a   the source 4x4 matrix\r\n * @returns {mat3} out\r\n */\n\nfunction fromMat4(out, a) {\n  out[0] = a[0];\n  out[1] = a[1];\n  out[2] = a[2];\n  out[3] = a[4];\n  out[4] = a[5];\n  out[5] = a[6];\n  out[6] = a[8];\n  out[7] = a[9];\n  out[8] = a[10];\n  return out;\n}\n/**\r\n * Creates a new mat3 initialized with values from an existing matrix\r\n *\r\n * @param {ReadonlyMat3} a matrix to clone\r\n * @returns {mat3} a new 3x3 matrix\r\n */\n\nfunction clone(a) {\n  var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(9);\n  out[0] = a[0];\n  out[1] = a[1];\n  out[2] = a[2];\n  out[3] = a[3];\n  out[4] = a[4];\n  out[5] = a[5];\n  out[6] = a[6];\n  out[7] = a[7];\n  out[8] = a[8];\n  return out;\n}\n/**\r\n * Copy the values from one mat3 to another\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nfunction copy(out, a) {\n  out[0] = a[0];\n  out[1] = a[1];\n  out[2] = a[2];\n  out[3] = a[3];\n  out[4] = a[4];\n  out[5] = a[5];\n  out[6] = a[6];\n  out[7] = a[7];\n  out[8] = a[8];\n  return out;\n}\n/**\r\n * Create a new mat3 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\r\n * @returns {mat3} A new mat3\r\n */\n\nfunction fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n  var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(9);\n  out[0] = m00;\n  out[1] = m01;\n  out[2] = m02;\n  out[3] = m10;\n  out[4] = m11;\n  out[5] = m12;\n  out[6] = m20;\n  out[7] = m21;\n  out[8] = m22;\n  return out;\n}\n/**\r\n * Set the components of a mat3 to the given values\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\r\n * @returns {mat3} out\r\n */\n\nfunction set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n  out[0] = m00;\n  out[1] = m01;\n  out[2] = m02;\n  out[3] = m10;\n  out[4] = m11;\n  out[5] = m12;\n  out[6] = m20;\n  out[7] = m21;\n  out[8] = m22;\n  return out;\n}\n/**\r\n * Set a mat3 to the identity matrix\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @returns {mat3} out\r\n */\n\nfunction identity(out) {\n  out[0] = 1;\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = 1;\n  out[5] = 0;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = 1;\n  return out;\n}\n/**\r\n * Transpose the values of a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nfunction transpose(out, a) {\n  // If we are transposing ourselves we can skip a few steps but have to cache some values\n  if (out === a) {\n    var a01 = a[1],\n        a02 = a[2],\n        a12 = a[5];\n    out[1] = a[3];\n    out[2] = a[6];\n    out[3] = a01;\n    out[5] = a[7];\n    out[6] = a02;\n    out[7] = a12;\n  } else {\n    out[0] = a[0];\n    out[1] = a[3];\n    out[2] = a[6];\n    out[3] = a[1];\n    out[4] = a[4];\n    out[5] = a[7];\n    out[6] = a[2];\n    out[7] = a[5];\n    out[8] = a[8];\n  }\n\n  return out;\n}\n/**\r\n * Inverts a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nfunction invert(out, a) {\n  var a00 = a[0],\n      a01 = a[1],\n      a02 = a[2];\n  var a10 = a[3],\n      a11 = a[4],\n      a12 = a[5];\n  var a20 = a[6],\n      a21 = a[7],\n      a22 = a[8];\n  var b01 = a22 * a11 - a12 * a21;\n  var b11 = -a22 * a10 + a12 * a20;\n  var b21 = a21 * a10 - a11 * a20; // Calculate the determinant\n\n  var det = a00 * b01 + a01 * b11 + a02 * b21;\n\n  if (!det) {\n    return null;\n  }\n\n  det = 1.0 / det;\n  out[0] = b01 * det;\n  out[1] = (-a22 * a01 + a02 * a21) * det;\n  out[2] = (a12 * a01 - a02 * a11) * det;\n  out[3] = b11 * det;\n  out[4] = (a22 * a00 - a02 * a20) * det;\n  out[5] = (-a12 * a00 + a02 * a10) * det;\n  out[6] = b21 * det;\n  out[7] = (-a21 * a00 + a01 * a20) * det;\n  out[8] = (a11 * a00 - a01 * a10) * det;\n  return out;\n}\n/**\r\n * Calculates the adjugate of a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nfunction adjoint(out, a) {\n  var a00 = a[0],\n      a01 = a[1],\n      a02 = a[2];\n  var a10 = a[3],\n      a11 = a[4],\n      a12 = a[5];\n  var a20 = a[6],\n      a21 = a[7],\n      a22 = a[8];\n  out[0] = a11 * a22 - a12 * a21;\n  out[1] = a02 * a21 - a01 * a22;\n  out[2] = a01 * a12 - a02 * a11;\n  out[3] = a12 * a20 - a10 * a22;\n  out[4] = a00 * a22 - a02 * a20;\n  out[5] = a02 * a10 - a00 * a12;\n  out[6] = a10 * a21 - a11 * a20;\n  out[7] = a01 * a20 - a00 * a21;\n  out[8] = a00 * a11 - a01 * a10;\n  return out;\n}\n/**\r\n * Calculates the determinant of a mat3\r\n *\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nfunction determinant(a) {\n  var a00 = a[0],\n      a01 = a[1],\n      a02 = a[2];\n  var a10 = a[3],\n      a11 = a[4],\n      a12 = a[5];\n  var a20 = a[6],\n      a21 = a[7],\n      a22 = a[8];\n  return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n}\n/**\r\n * Multiplies two mat3's\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nfunction multiply(out, a, b) {\n  var a00 = a[0],\n      a01 = a[1],\n      a02 = a[2];\n  var a10 = a[3],\n      a11 = a[4],\n      a12 = a[5];\n  var a20 = a[6],\n      a21 = a[7],\n      a22 = a[8];\n  var b00 = b[0],\n      b01 = b[1],\n      b02 = b[2];\n  var b10 = b[3],\n      b11 = b[4],\n      b12 = b[5];\n  var b20 = b[6],\n      b21 = b[7],\n      b22 = b[8];\n  out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n  out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n  out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n  out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n  out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n  out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n  out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n  out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n  out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n  return out;\n}\n/**\r\n * Translate a mat3 by the given vector\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to translate\r\n * @param {ReadonlyVec2} v vector to translate by\r\n * @returns {mat3} out\r\n */\n\nfunction translate(out, a, v) {\n  var a00 = a[0],\n      a01 = a[1],\n      a02 = a[2],\n      a10 = a[3],\n      a11 = a[4],\n      a12 = a[5],\n      a20 = a[6],\n      a21 = a[7],\n      a22 = a[8],\n      x = v[0],\n      y = v[1];\n  out[0] = a00;\n  out[1] = a01;\n  out[2] = a02;\n  out[3] = a10;\n  out[4] = a11;\n  out[5] = a12;\n  out[6] = x * a00 + y * a10 + a20;\n  out[7] = x * a01 + y * a11 + a21;\n  out[8] = x * a02 + y * a12 + a22;\n  return out;\n}\n/**\r\n * Rotates a mat3 by the given angle\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat3} out\r\n */\n\nfunction rotate(out, a, rad) {\n  var a00 = a[0],\n      a01 = a[1],\n      a02 = a[2],\n      a10 = a[3],\n      a11 = a[4],\n      a12 = a[5],\n      a20 = a[6],\n      a21 = a[7],\n      a22 = a[8],\n      s = Math.sin(rad),\n      c = Math.cos(rad);\n  out[0] = c * a00 + s * a10;\n  out[1] = c * a01 + s * a11;\n  out[2] = c * a02 + s * a12;\n  out[3] = c * a10 - s * a00;\n  out[4] = c * a11 - s * a01;\n  out[5] = c * a12 - s * a02;\n  out[6] = a20;\n  out[7] = a21;\n  out[8] = a22;\n  return out;\n}\n/**\r\n * Scales the mat3 by the dimensions in the given vec2\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to rotate\r\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\r\n * @returns {mat3} out\r\n **/\n\nfunction scale(out, a, v) {\n  var x = v[0],\n      y = v[1];\n  out[0] = x * a[0];\n  out[1] = x * a[1];\n  out[2] = x * a[2];\n  out[3] = y * a[3];\n  out[4] = y * a[4];\n  out[5] = y * a[5];\n  out[6] = a[6];\n  out[7] = a[7];\n  out[8] = a[8];\n  return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n *     mat3.identity(dest);\r\n *     mat3.translate(dest, dest, vec);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyVec2} v Translation vector\r\n * @returns {mat3} out\r\n */\n\nfunction fromTranslation(out, v) {\n  out[0] = 1;\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = 1;\n  out[5] = 0;\n  out[6] = v[0];\n  out[7] = v[1];\n  out[8] = 1;\n  return out;\n}\n/**\r\n * Creates a matrix from a given angle\r\n * This is equivalent to (but much faster than):\r\n *\r\n *     mat3.identity(dest);\r\n *     mat3.rotate(dest, dest, rad);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat3} out\r\n */\n\nfunction fromRotation(out, rad) {\n  var s = Math.sin(rad),\n      c = Math.cos(rad);\n  out[0] = c;\n  out[1] = s;\n  out[2] = 0;\n  out[3] = -s;\n  out[4] = c;\n  out[5] = 0;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = 1;\n  return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n *     mat3.identity(dest);\r\n *     mat3.scale(dest, dest, vec);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyVec2} v Scaling vector\r\n * @returns {mat3} out\r\n */\n\nfunction fromScaling(out, v) {\n  out[0] = v[0];\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = v[1];\n  out[5] = 0;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = 1;\n  return out;\n}\n/**\r\n * Copies the values from a mat2d into a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the matrix to copy\r\n * @returns {mat3} out\r\n **/\n\nfunction fromMat2d(out, a) {\n  out[0] = a[0];\n  out[1] = a[1];\n  out[2] = 0;\n  out[3] = a[2];\n  out[4] = a[3];\n  out[5] = 0;\n  out[6] = a[4];\n  out[7] = a[5];\n  out[8] = 1;\n  return out;\n}\n/**\r\n * Calculates a 3x3 matrix from the given quaternion\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyQuat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat3} out\r\n */\n\nfunction fromQuat(out, q) {\n  var x = q[0],\n      y = q[1],\n      z = q[2],\n      w = q[3];\n  var x2 = x + x;\n  var y2 = y + y;\n  var z2 = z + z;\n  var xx = x * x2;\n  var yx = y * x2;\n  var yy = y * y2;\n  var zx = z * x2;\n  var zy = z * y2;\n  var zz = z * z2;\n  var wx = w * x2;\n  var wy = w * y2;\n  var wz = w * z2;\n  out[0] = 1 - yy - zz;\n  out[3] = yx - wz;\n  out[6] = zx + wy;\n  out[1] = yx + wz;\n  out[4] = 1 - xx - zz;\n  out[7] = zy - wx;\n  out[2] = zx - wy;\n  out[5] = zy + wx;\n  out[8] = 1 - xx - yy;\n  return out;\n}\n/**\r\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from\r\n *\r\n * @returns {mat3} out\r\n */\n\nfunction normalFromMat4(out, a) {\n  var a00 = a[0],\n      a01 = a[1],\n      a02 = a[2],\n      a03 = a[3];\n  var a10 = a[4],\n      a11 = a[5],\n      a12 = a[6],\n      a13 = a[7];\n  var a20 = a[8],\n      a21 = a[9],\n      a22 = a[10],\n      a23 = a[11];\n  var a30 = a[12],\n      a31 = a[13],\n      a32 = a[14],\n      a33 = a[15];\n  var b00 = a00 * a11 - a01 * a10;\n  var b01 = a00 * a12 - a02 * a10;\n  var b02 = a00 * a13 - a03 * a10;\n  var b03 = a01 * a12 - a02 * a11;\n  var b04 = a01 * a13 - a03 * a11;\n  var b05 = a02 * a13 - a03 * a12;\n  var b06 = a20 * a31 - a21 * a30;\n  var b07 = a20 * a32 - a22 * a30;\n  var b08 = a20 * a33 - a23 * a30;\n  var b09 = a21 * a32 - a22 * a31;\n  var b10 = a21 * a33 - a23 * a31;\n  var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n  var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  if (!det) {\n    return null;\n  }\n\n  det = 1.0 / det;\n  out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n  out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n  out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n  out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n  out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n  out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n  out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n  out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n  out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n  return out;\n}\n/**\r\n * Generates a 2D projection matrix with the given bounds\r\n *\r\n * @param {mat3} out mat3 frustum matrix will be written into\r\n * @param {number} width Width of your gl context\r\n * @param {number} height Height of gl context\r\n * @returns {mat3} out\r\n */\n\nfunction projection(out, width, height) {\n  out[0] = 2 / width;\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = -2 / height;\n  out[5] = 0;\n  out[6] = -1;\n  out[7] = 1;\n  out[8] = 1;\n  return out;\n}\n/**\r\n * Returns a string representation of a mat3\r\n *\r\n * @param {ReadonlyMat3} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nfunction str(a) {\n  return \"mat3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \")\";\n}\n/**\r\n * Returns Frobenius norm of a mat3\r\n *\r\n * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nfunction frob(a) {\n  return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);\n}\n/**\r\n * Adds two mat3's\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nfunction add(out, a, b) {\n  out[0] = a[0] + b[0];\n  out[1] = a[1] + b[1];\n  out[2] = a[2] + b[2];\n  out[3] = a[3] + b[3];\n  out[4] = a[4] + b[4];\n  out[5] = a[5] + b[5];\n  out[6] = a[6] + b[6];\n  out[7] = a[7] + b[7];\n  out[8] = a[8] + b[8];\n  return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nfunction subtract(out, a, b) {\n  out[0] = a[0] - b[0];\n  out[1] = a[1] - b[1];\n  out[2] = a[2] - b[2];\n  out[3] = a[3] - b[3];\n  out[4] = a[4] - b[4];\n  out[5] = a[5] - b[5];\n  out[6] = a[6] - b[6];\n  out[7] = a[7] - b[7];\n  out[8] = a[8] - b[8];\n  return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat3} out\r\n */\n\nfunction multiplyScalar(out, a, b) {\n  out[0] = a[0] * b;\n  out[1] = a[1] * b;\n  out[2] = a[2] * b;\n  out[3] = a[3] * b;\n  out[4] = a[4] * b;\n  out[5] = a[5] * b;\n  out[6] = a[6] * b;\n  out[7] = a[7] * b;\n  out[8] = a[8] * b;\n  return out;\n}\n/**\r\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat3} out the receiving vector\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat3} out\r\n */\n\nfunction multiplyScalarAndAdd(out, a, b, scale) {\n  out[0] = a[0] + b[0] * scale;\n  out[1] = a[1] + b[1] * scale;\n  out[2] = a[2] + b[2] * scale;\n  out[3] = a[3] + b[3] * scale;\n  out[4] = a[4] + b[4] * scale;\n  out[5] = a[5] + b[5] * scale;\n  out[6] = a[6] + b[6] * scale;\n  out[7] = a[7] + b[7] * scale;\n  out[8] = a[8] + b[8] * scale;\n  return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyMat3} a The first matrix.\r\n * @param {ReadonlyMat3} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nfunction exactEquals(a, b) {\n  return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyMat3} a The first matrix.\r\n * @param {ReadonlyMat3} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nfunction equals(a, b) {\n  var a0 = a[0],\n      a1 = a[1],\n      a2 = a[2],\n      a3 = a[3],\n      a4 = a[4],\n      a5 = a[5],\n      a6 = a[6],\n      a7 = a[7],\n      a8 = a[8];\n  var b0 = b[0],\n      b1 = b[1],\n      b2 = b[2],\n      b3 = b[3],\n      b4 = b[4],\n      b5 = b[5],\n      b6 = b[6],\n      b7 = b[7],\n      b8 = b[8];\n  return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n}\n/**\r\n * Alias for {@link mat3.multiply}\r\n * @function\r\n */\n\nvar mul = multiply;\n/**\r\n * Alias for {@link mat3.subtract}\r\n * @function\r\n */\n\nvar sub = subtract;\n\nvar mat3 = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  create: create,\n  fromMat4: fromMat4,\n  clone: clone,\n  copy: copy,\n  fromValues: fromValues,\n  set: set,\n  identity: identity,\n  transpose: transpose,\n  invert: invert,\n  adjoint: adjoint,\n  determinant: determinant,\n  multiply: multiply,\n  translate: translate,\n  rotate: rotate,\n  scale: scale,\n  fromTranslation: fromTranslation,\n  fromRotation: fromRotation,\n  fromScaling: fromScaling,\n  fromMat2d: fromMat2d,\n  fromQuat: fromQuat,\n  normalFromMat4: normalFromMat4,\n  projection: projection,\n  str: str,\n  frob: frob,\n  add: add,\n  subtract: subtract,\n  multiplyScalar: multiplyScalar,\n  multiplyScalarAndAdd: multiplyScalarAndAdd,\n  exactEquals: exactEquals,\n  equals: equals,\n  mul: mul,\n  sub: sub\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat3.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"a\": () => (/* binding */ identity),\n/* harmony export */   \"b\": () => (/* binding */ fromRotation),\n/* harmony export */   \"c\": () => (/* binding */ copy),\n/* harmony export */   \"d\": () => (/* binding */ rotateX),\n/* harmony export */   \"e\": () => (/* binding */ exactEquals),\n/* harmony export */   \"f\": () => (/* binding */ fromTranslation),\n/* harmony export */   \"g\": () => (/* binding */ rotateY),\n/* harmony export */   \"h\": () => (/* binding */ rotateZ),\n/* harmony export */   \"i\": () => (/* binding */ invert),\n/* harmony export */   \"j\": () => (/* binding */ transpose),\n/* harmony export */   \"k\": () => (/* binding */ fromQuat),\n/* harmony export */   \"l\": () => (/* binding */ lookAt),\n/* harmony export */   \"m\": () => (/* binding */ multiply),\n/* harmony export */   \"n\": () => (/* binding */ getRotation),\n/* harmony export */   \"o\": () => (/* binding */ ortho),\n/* harmony export */   \"p\": () => (/* binding */ fromRotationTranslationScale),\n/* harmony export */   \"q\": () => (/* binding */ mat4),\n/* harmony export */   \"r\": () => (/* binding */ rotate),\n/* harmony export */   \"s\": () => (/* binding */ scale),\n/* harmony export */   \"t\": () => (/* binding */ translate)\n/* harmony export */ });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/common.js\");\n\n\n/**\r\n * 4x4 Matrix<br>Format: column-major, when typed out it looks like row-major<br>The matrices are being post multiplied.\r\n * @module mat4\r\n */\n\n/**\r\n * Creates a new identity mat4\r\n *\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nfunction create() {\n  var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(16);\n\n  if (_common_js__WEBPACK_IMPORTED_MODULE_0__.A != Float32Array) {\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 0;\n    out[9] = 0;\n    out[11] = 0;\n    out[12] = 0;\n    out[13] = 0;\n    out[14] = 0;\n  }\n\n  out[0] = 1;\n  out[5] = 1;\n  out[10] = 1;\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Creates a new mat4 initialized with values from an existing matrix\r\n *\r\n * @param {ReadonlyMat4} a matrix to clone\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nfunction clone(a) {\n  var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(16);\n  out[0] = a[0];\n  out[1] = a[1];\n  out[2] = a[2];\n  out[3] = a[3];\n  out[4] = a[4];\n  out[5] = a[5];\n  out[6] = a[6];\n  out[7] = a[7];\n  out[8] = a[8];\n  out[9] = a[9];\n  out[10] = a[10];\n  out[11] = a[11];\n  out[12] = a[12];\n  out[13] = a[13];\n  out[14] = a[14];\n  out[15] = a[15];\n  return out;\n}\n/**\r\n * Copy the values from one mat4 to another\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nfunction copy(out, a) {\n  out[0] = a[0];\n  out[1] = a[1];\n  out[2] = a[2];\n  out[3] = a[3];\n  out[4] = a[4];\n  out[5] = a[5];\n  out[6] = a[6];\n  out[7] = a[7];\n  out[8] = a[8];\n  out[9] = a[9];\n  out[10] = a[10];\n  out[11] = a[11];\n  out[12] = a[12];\n  out[13] = a[13];\n  out[14] = a[14];\n  out[15] = a[15];\n  return out;\n}\n/**\r\n * Create a new mat4 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} A new mat4\r\n */\n\nfunction fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n  var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(16);\n  out[0] = m00;\n  out[1] = m01;\n  out[2] = m02;\n  out[3] = m03;\n  out[4] = m10;\n  out[5] = m11;\n  out[6] = m12;\n  out[7] = m13;\n  out[8] = m20;\n  out[9] = m21;\n  out[10] = m22;\n  out[11] = m23;\n  out[12] = m30;\n  out[13] = m31;\n  out[14] = m32;\n  out[15] = m33;\n  return out;\n}\n/**\r\n * Set the components of a mat4 to the given values\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} out\r\n */\n\nfunction set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n  out[0] = m00;\n  out[1] = m01;\n  out[2] = m02;\n  out[3] = m03;\n  out[4] = m10;\n  out[5] = m11;\n  out[6] = m12;\n  out[7] = m13;\n  out[8] = m20;\n  out[9] = m21;\n  out[10] = m22;\n  out[11] = m23;\n  out[12] = m30;\n  out[13] = m31;\n  out[14] = m32;\n  out[15] = m33;\n  return out;\n}\n/**\r\n * Set a mat4 to the identity matrix\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @returns {mat4} out\r\n */\n\nfunction identity(out) {\n  out[0] = 1;\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = 0;\n  out[5] = 1;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = 0;\n  out[9] = 0;\n  out[10] = 1;\n  out[11] = 0;\n  out[12] = 0;\n  out[13] = 0;\n  out[14] = 0;\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Transpose the values of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nfunction transpose(out, a) {\n  // If we are transposing ourselves we can skip a few steps but have to cache some values\n  if (out === a) {\n    var a01 = a[1],\n        a02 = a[2],\n        a03 = a[3];\n    var a12 = a[6],\n        a13 = a[7];\n    var a23 = a[11];\n    out[1] = a[4];\n    out[2] = a[8];\n    out[3] = a[12];\n    out[4] = a01;\n    out[6] = a[9];\n    out[7] = a[13];\n    out[8] = a02;\n    out[9] = a12;\n    out[11] = a[14];\n    out[12] = a03;\n    out[13] = a13;\n    out[14] = a23;\n  } else {\n    out[0] = a[0];\n    out[1] = a[4];\n    out[2] = a[8];\n    out[3] = a[12];\n    out[4] = a[1];\n    out[5] = a[5];\n    out[6] = a[9];\n    out[7] = a[13];\n    out[8] = a[2];\n    out[9] = a[6];\n    out[10] = a[10];\n    out[11] = a[14];\n    out[12] = a[3];\n    out[13] = a[7];\n    out[14] = a[11];\n    out[15] = a[15];\n  }\n\n  return out;\n}\n/**\r\n * Inverts a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nfunction invert(out, a) {\n  var a00 = a[0],\n      a01 = a[1],\n      a02 = a[2],\n      a03 = a[3];\n  var a10 = a[4],\n      a11 = a[5],\n      a12 = a[6],\n      a13 = a[7];\n  var a20 = a[8],\n      a21 = a[9],\n      a22 = a[10],\n      a23 = a[11];\n  var a30 = a[12],\n      a31 = a[13],\n      a32 = a[14],\n      a33 = a[15];\n  var b00 = a00 * a11 - a01 * a10;\n  var b01 = a00 * a12 - a02 * a10;\n  var b02 = a00 * a13 - a03 * a10;\n  var b03 = a01 * a12 - a02 * a11;\n  var b04 = a01 * a13 - a03 * a11;\n  var b05 = a02 * a13 - a03 * a12;\n  var b06 = a20 * a31 - a21 * a30;\n  var b07 = a20 * a32 - a22 * a30;\n  var b08 = a20 * a33 - a23 * a30;\n  var b09 = a21 * a32 - a22 * a31;\n  var b10 = a21 * a33 - a23 * a31;\n  var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n  var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  if (!det) {\n    return null;\n  }\n\n  det = 1.0 / det;\n  out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n  out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n  out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n  out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n  out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n  out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n  out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n  out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n  out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n  out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n  out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n  out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n  out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n  out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n  out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n  out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n  return out;\n}\n/**\r\n * Calculates the adjugate of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nfunction adjoint(out, a) {\n  var a00 = a[0],\n      a01 = a[1],\n      a02 = a[2],\n      a03 = a[3];\n  var a10 = a[4],\n      a11 = a[5],\n      a12 = a[6],\n      a13 = a[7];\n  var a20 = a[8],\n      a21 = a[9],\n      a22 = a[10],\n      a23 = a[11];\n  var a30 = a[12],\n      a31 = a[13],\n      a32 = a[14],\n      a33 = a[15];\n  out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n  out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n  out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n  out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n  out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n  out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n  out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n  out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n  out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n  out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n  out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n  out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n  out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n  out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n  out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n  out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n  return out;\n}\n/**\r\n * Calculates the determinant of a mat4\r\n *\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nfunction determinant(a) {\n  var a00 = a[0],\n      a01 = a[1],\n      a02 = a[2],\n      a03 = a[3];\n  var a10 = a[4],\n      a11 = a[5],\n      a12 = a[6],\n      a13 = a[7];\n  var a20 = a[8],\n      a21 = a[9],\n      a22 = a[10],\n      a23 = a[11];\n  var a30 = a[12],\n      a31 = a[13],\n      a32 = a[14],\n      a33 = a[15];\n  var b00 = a00 * a11 - a01 * a10;\n  var b01 = a00 * a12 - a02 * a10;\n  var b02 = a00 * a13 - a03 * a10;\n  var b03 = a01 * a12 - a02 * a11;\n  var b04 = a01 * a13 - a03 * a11;\n  var b05 = a02 * a13 - a03 * a12;\n  var b06 = a20 * a31 - a21 * a30;\n  var b07 = a20 * a32 - a22 * a30;\n  var b08 = a20 * a33 - a23 * a30;\n  var b09 = a21 * a32 - a22 * a31;\n  var b10 = a21 * a33 - a23 * a31;\n  var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n  return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n}\n/**\r\n * Multiplies two mat4s\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nfunction multiply(out, a, b) {\n  var a00 = a[0],\n      a01 = a[1],\n      a02 = a[2],\n      a03 = a[3];\n  var a10 = a[4],\n      a11 = a[5],\n      a12 = a[6],\n      a13 = a[7];\n  var a20 = a[8],\n      a21 = a[9],\n      a22 = a[10],\n      a23 = a[11];\n  var a30 = a[12],\n      a31 = a[13],\n      a32 = a[14],\n      a33 = a[15]; // Cache only the current line of the second matrix\n\n  var b0 = b[0],\n      b1 = b[1],\n      b2 = b[2],\n      b3 = b[3];\n  out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n  out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n  out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n  out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n  b0 = b[4];\n  b1 = b[5];\n  b2 = b[6];\n  b3 = b[7];\n  out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n  out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n  out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n  out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n  b0 = b[8];\n  b1 = b[9];\n  b2 = b[10];\n  b3 = b[11];\n  out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n  out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n  out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n  out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n  b0 = b[12];\n  b1 = b[13];\n  b2 = b[14];\n  b3 = b[15];\n  out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n  out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n  out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n  out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n  return out;\n}\n/**\r\n * Translate a mat4 by the given vector\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to translate\r\n * @param {ReadonlyVec3} v vector to translate by\r\n * @returns {mat4} out\r\n */\n\nfunction translate(out, a, v) {\n  var x = v[0],\n      y = v[1],\n      z = v[2];\n  var a00, a01, a02, a03;\n  var a10, a11, a12, a13;\n  var a20, a21, a22, a23;\n\n  if (a === out) {\n    out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n    out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n    out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n    out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n  } else {\n    a00 = a[0];\n    a01 = a[1];\n    a02 = a[2];\n    a03 = a[3];\n    a10 = a[4];\n    a11 = a[5];\n    a12 = a[6];\n    a13 = a[7];\n    a20 = a[8];\n    a21 = a[9];\n    a22 = a[10];\n    a23 = a[11];\n    out[0] = a00;\n    out[1] = a01;\n    out[2] = a02;\n    out[3] = a03;\n    out[4] = a10;\n    out[5] = a11;\n    out[6] = a12;\n    out[7] = a13;\n    out[8] = a20;\n    out[9] = a21;\n    out[10] = a22;\n    out[11] = a23;\n    out[12] = a00 * x + a10 * y + a20 * z + a[12];\n    out[13] = a01 * x + a11 * y + a21 * z + a[13];\n    out[14] = a02 * x + a12 * y + a22 * z + a[14];\n    out[15] = a03 * x + a13 * y + a23 * z + a[15];\n  }\n\n  return out;\n}\n/**\r\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to scale\r\n * @param {ReadonlyVec3} v the vec3 to scale the matrix by\r\n * @returns {mat4} out\r\n **/\n\nfunction scale(out, a, v) {\n  var x = v[0],\n      y = v[1],\n      z = v[2];\n  out[0] = a[0] * x;\n  out[1] = a[1] * x;\n  out[2] = a[2] * x;\n  out[3] = a[3] * x;\n  out[4] = a[4] * y;\n  out[5] = a[5] * y;\n  out[6] = a[6] * y;\n  out[7] = a[7] * y;\n  out[8] = a[8] * z;\n  out[9] = a[9] * z;\n  out[10] = a[10] * z;\n  out[11] = a[11] * z;\n  out[12] = a[12];\n  out[13] = a[13];\n  out[14] = a[14];\n  out[15] = a[15];\n  return out;\n}\n/**\r\n * Rotates a mat4 by the given angle around the given axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {ReadonlyVec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nfunction rotate(out, a, rad, axis) {\n  var x = axis[0],\n      y = axis[1],\n      z = axis[2];\n  var len = Math.hypot(x, y, z);\n  var s, c, t;\n  var a00, a01, a02, a03;\n  var a10, a11, a12, a13;\n  var a20, a21, a22, a23;\n  var b00, b01, b02;\n  var b10, b11, b12;\n  var b20, b21, b22;\n\n  if (len < _common_js__WEBPACK_IMPORTED_MODULE_0__.E) {\n    return null;\n  }\n\n  len = 1 / len;\n  x *= len;\n  y *= len;\n  z *= len;\n  s = Math.sin(rad);\n  c = Math.cos(rad);\n  t = 1 - c;\n  a00 = a[0];\n  a01 = a[1];\n  a02 = a[2];\n  a03 = a[3];\n  a10 = a[4];\n  a11 = a[5];\n  a12 = a[6];\n  a13 = a[7];\n  a20 = a[8];\n  a21 = a[9];\n  a22 = a[10];\n  a23 = a[11]; // Construct the elements of the rotation matrix\n\n  b00 = x * x * t + c;\n  b01 = y * x * t + z * s;\n  b02 = z * x * t - y * s;\n  b10 = x * y * t - z * s;\n  b11 = y * y * t + c;\n  b12 = z * y * t + x * s;\n  b20 = x * z * t + y * s;\n  b21 = y * z * t - x * s;\n  b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n\n  out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n  out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n  out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n  out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n  out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n  out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n  out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n  out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n  out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n  out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n  out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n  out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n  if (a !== out) {\n    // If the source and destination differ, copy the unchanged last row\n    out[12] = a[12];\n    out[13] = a[13];\n    out[14] = a[14];\n    out[15] = a[15];\n  }\n\n  return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the X axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nfunction rotateX(out, a, rad) {\n  var s = Math.sin(rad);\n  var c = Math.cos(rad);\n  var a10 = a[4];\n  var a11 = a[5];\n  var a12 = a[6];\n  var a13 = a[7];\n  var a20 = a[8];\n  var a21 = a[9];\n  var a22 = a[10];\n  var a23 = a[11];\n\n  if (a !== out) {\n    // If the source and destination differ, copy the unchanged rows\n    out[0] = a[0];\n    out[1] = a[1];\n    out[2] = a[2];\n    out[3] = a[3];\n    out[12] = a[12];\n    out[13] = a[13];\n    out[14] = a[14];\n    out[15] = a[15];\n  } // Perform axis-specific matrix multiplication\n\n\n  out[4] = a10 * c + a20 * s;\n  out[5] = a11 * c + a21 * s;\n  out[6] = a12 * c + a22 * s;\n  out[7] = a13 * c + a23 * s;\n  out[8] = a20 * c - a10 * s;\n  out[9] = a21 * c - a11 * s;\n  out[10] = a22 * c - a12 * s;\n  out[11] = a23 * c - a13 * s;\n  return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Y axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nfunction rotateY(out, a, rad) {\n  var s = Math.sin(rad);\n  var c = Math.cos(rad);\n  var a00 = a[0];\n  var a01 = a[1];\n  var a02 = a[2];\n  var a03 = a[3];\n  var a20 = a[8];\n  var a21 = a[9];\n  var a22 = a[10];\n  var a23 = a[11];\n\n  if (a !== out) {\n    // If the source and destination differ, copy the unchanged rows\n    out[4] = a[4];\n    out[5] = a[5];\n    out[6] = a[6];\n    out[7] = a[7];\n    out[12] = a[12];\n    out[13] = a[13];\n    out[14] = a[14];\n    out[15] = a[15];\n  } // Perform axis-specific matrix multiplication\n\n\n  out[0] = a00 * c - a20 * s;\n  out[1] = a01 * c - a21 * s;\n  out[2] = a02 * c - a22 * s;\n  out[3] = a03 * c - a23 * s;\n  out[8] = a00 * s + a20 * c;\n  out[9] = a01 * s + a21 * c;\n  out[10] = a02 * s + a22 * c;\n  out[11] = a03 * s + a23 * c;\n  return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Z axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nfunction rotateZ(out, a, rad) {\n  var s = Math.sin(rad);\n  var c = Math.cos(rad);\n  var a00 = a[0];\n  var a01 = a[1];\n  var a02 = a[2];\n  var a03 = a[3];\n  var a10 = a[4];\n  var a11 = a[5];\n  var a12 = a[6];\n  var a13 = a[7];\n\n  if (a !== out) {\n    // If the source and destination differ, copy the unchanged last row\n    out[8] = a[8];\n    out[9] = a[9];\n    out[10] = a[10];\n    out[11] = a[11];\n    out[12] = a[12];\n    out[13] = a[13];\n    out[14] = a[14];\n    out[15] = a[15];\n  } // Perform axis-specific matrix multiplication\n\n\n  out[0] = a00 * c + a10 * s;\n  out[1] = a01 * c + a11 * s;\n  out[2] = a02 * c + a12 * s;\n  out[3] = a03 * c + a13 * s;\n  out[4] = a10 * c - a00 * s;\n  out[5] = a11 * c - a01 * s;\n  out[6] = a12 * c - a02 * s;\n  out[7] = a13 * c - a03 * s;\n  return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n *     mat4.identity(dest);\r\n *     mat4.translate(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nfunction fromTranslation(out, v) {\n  out[0] = 1;\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = 0;\n  out[5] = 1;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = 0;\n  out[9] = 0;\n  out[10] = 1;\n  out[11] = 0;\n  out[12] = v[0];\n  out[13] = v[1];\n  out[14] = v[2];\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n *     mat4.identity(dest);\r\n *     mat4.scale(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyVec3} v Scaling vector\r\n * @returns {mat4} out\r\n */\n\nfunction fromScaling(out, v) {\n  out[0] = v[0];\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = 0;\n  out[5] = v[1];\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = 0;\n  out[9] = 0;\n  out[10] = v[2];\n  out[11] = 0;\n  out[12] = 0;\n  out[13] = 0;\n  out[14] = 0;\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Creates a matrix from a given angle around a given axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n *     mat4.identity(dest);\r\n *     mat4.rotate(dest, dest, rad, axis);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {ReadonlyVec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nfunction fromRotation(out, rad, axis) {\n  var x = axis[0],\n      y = axis[1],\n      z = axis[2];\n  var len = Math.hypot(x, y, z);\n  var s, c, t;\n\n  if (len < _common_js__WEBPACK_IMPORTED_MODULE_0__.E) {\n    return null;\n  }\n\n  len = 1 / len;\n  x *= len;\n  y *= len;\n  z *= len;\n  s = Math.sin(rad);\n  c = Math.cos(rad);\n  t = 1 - c; // Perform rotation-specific matrix multiplication\n\n  out[0] = x * x * t + c;\n  out[1] = y * x * t + z * s;\n  out[2] = z * x * t - y * s;\n  out[3] = 0;\n  out[4] = x * y * t - z * s;\n  out[5] = y * y * t + c;\n  out[6] = z * y * t + x * s;\n  out[7] = 0;\n  out[8] = x * z * t + y * s;\n  out[9] = y * z * t - x * s;\n  out[10] = z * z * t + c;\n  out[11] = 0;\n  out[12] = 0;\n  out[13] = 0;\n  out[14] = 0;\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Creates a matrix from the given angle around the X axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n *     mat4.identity(dest);\r\n *     mat4.rotateX(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nfunction fromXRotation(out, rad) {\n  var s = Math.sin(rad);\n  var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n  out[0] = 1;\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = 0;\n  out[5] = c;\n  out[6] = s;\n  out[7] = 0;\n  out[8] = 0;\n  out[9] = -s;\n  out[10] = c;\n  out[11] = 0;\n  out[12] = 0;\n  out[13] = 0;\n  out[14] = 0;\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Y axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n *     mat4.identity(dest);\r\n *     mat4.rotateY(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nfunction fromYRotation(out, rad) {\n  var s = Math.sin(rad);\n  var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n  out[0] = c;\n  out[1] = 0;\n  out[2] = -s;\n  out[3] = 0;\n  out[4] = 0;\n  out[5] = 1;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = s;\n  out[9] = 0;\n  out[10] = c;\n  out[11] = 0;\n  out[12] = 0;\n  out[13] = 0;\n  out[14] = 0;\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Z axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n *     mat4.identity(dest);\r\n *     mat4.rotateZ(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nfunction fromZRotation(out, rad) {\n  var s = Math.sin(rad);\n  var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n  out[0] = c;\n  out[1] = s;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = -s;\n  out[5] = c;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = 0;\n  out[9] = 0;\n  out[10] = 1;\n  out[11] = 0;\n  out[12] = 0;\n  out[13] = 0;\n  out[14] = 0;\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation and vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n *     mat4.identity(dest);\r\n *     mat4.translate(dest, vec);\r\n *     let quatMat = mat4.create();\r\n *     quat4.toMat4(quat, quatMat);\r\n *     mat4.multiply(dest, quatMat);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nfunction fromRotationTranslation(out, q, v) {\n  // Quaternion math\n  var x = q[0],\n      y = q[1],\n      z = q[2],\n      w = q[3];\n  var x2 = x + x;\n  var y2 = y + y;\n  var z2 = z + z;\n  var xx = x * x2;\n  var xy = x * y2;\n  var xz = x * z2;\n  var yy = y * y2;\n  var yz = y * z2;\n  var zz = z * z2;\n  var wx = w * x2;\n  var wy = w * y2;\n  var wz = w * z2;\n  out[0] = 1 - (yy + zz);\n  out[1] = xy + wz;\n  out[2] = xz - wy;\n  out[3] = 0;\n  out[4] = xy - wz;\n  out[5] = 1 - (xx + zz);\n  out[6] = yz + wx;\n  out[7] = 0;\n  out[8] = xz + wy;\n  out[9] = yz - wx;\n  out[10] = 1 - (xx + yy);\n  out[11] = 0;\n  out[12] = v[0];\n  out[13] = v[1];\n  out[14] = v[2];\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Creates a new mat4 from a dual quat.\r\n *\r\n * @param {mat4} out Matrix\r\n * @param {ReadonlyQuat2} a Dual Quaternion\r\n * @returns {mat4} mat4 receiving operation result\r\n */\n\nfunction fromQuat2(out, a) {\n  var translation = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(3);\n  var bx = -a[0],\n      by = -a[1],\n      bz = -a[2],\n      bw = a[3],\n      ax = a[4],\n      ay = a[5],\n      az = a[6],\n      aw = a[7];\n  var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n\n  if (magnitude > 0) {\n    translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n    translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n    translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n  } else {\n    translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n    translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n    translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n  }\n\n  fromRotationTranslation(out, a, translation);\n  return out;\n}\n/**\r\n * Returns the translation vector component of a transformation\r\n *  matrix. If a matrix is built with fromRotationTranslation,\r\n *  the returned vector will be the same as the translation vector\r\n *  originally supplied.\r\n * @param  {vec3} out Vector to receive translation component\r\n * @param  {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nfunction getTranslation(out, mat) {\n  out[0] = mat[12];\n  out[1] = mat[13];\n  out[2] = mat[14];\n  return out;\n}\n/**\r\n * Returns the scaling factor component of a transformation\r\n *  matrix. If a matrix is built with fromRotationTranslationScale\r\n *  with a normalized Quaternion paramter, the returned vector will be\r\n *  the same as the scaling vector\r\n *  originally supplied.\r\n * @param  {vec3} out Vector to receive scaling factor component\r\n * @param  {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nfunction getScaling(out, mat) {\n  var m11 = mat[0];\n  var m12 = mat[1];\n  var m13 = mat[2];\n  var m21 = mat[4];\n  var m22 = mat[5];\n  var m23 = mat[6];\n  var m31 = mat[8];\n  var m32 = mat[9];\n  var m33 = mat[10];\n  out[0] = Math.hypot(m11, m12, m13);\n  out[1] = Math.hypot(m21, m22, m23);\n  out[2] = Math.hypot(m31, m32, m33);\n  return out;\n}\n/**\r\n * Returns a quaternion representing the rotational component\r\n *  of a transformation matrix. If a matrix is built with\r\n *  fromRotationTranslation, the returned quaternion will be the\r\n *  same as the quaternion originally supplied.\r\n * @param {quat} out Quaternion to receive the rotation component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {quat} out\r\n */\n\nfunction getRotation(out, mat) {\n  var scaling = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(3);\n  getScaling(scaling, mat);\n  var is1 = 1 / scaling[0];\n  var is2 = 1 / scaling[1];\n  var is3 = 1 / scaling[2];\n  var sm11 = mat[0] * is1;\n  var sm12 = mat[1] * is2;\n  var sm13 = mat[2] * is3;\n  var sm21 = mat[4] * is1;\n  var sm22 = mat[5] * is2;\n  var sm23 = mat[6] * is3;\n  var sm31 = mat[8] * is1;\n  var sm32 = mat[9] * is2;\n  var sm33 = mat[10] * is3;\n  var trace = sm11 + sm22 + sm33;\n  var S = 0;\n\n  if (trace > 0) {\n    S = Math.sqrt(trace + 1.0) * 2;\n    out[3] = 0.25 * S;\n    out[0] = (sm23 - sm32) / S;\n    out[1] = (sm31 - sm13) / S;\n    out[2] = (sm12 - sm21) / S;\n  } else if (sm11 > sm22 && sm11 > sm33) {\n    S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n    out[3] = (sm23 - sm32) / S;\n    out[0] = 0.25 * S;\n    out[1] = (sm12 + sm21) / S;\n    out[2] = (sm31 + sm13) / S;\n  } else if (sm22 > sm33) {\n    S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n    out[3] = (sm31 - sm13) / S;\n    out[0] = (sm12 + sm21) / S;\n    out[1] = 0.25 * S;\n    out[2] = (sm23 + sm32) / S;\n  } else {\n    S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n    out[3] = (sm12 - sm21) / S;\n    out[0] = (sm31 + sm13) / S;\n    out[1] = (sm23 + sm32) / S;\n    out[2] = 0.25 * S;\n  }\n\n  return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\r\n * This is equivalent to (but much faster than):\r\n *\r\n *     mat4.identity(dest);\r\n *     mat4.translate(dest, vec);\r\n *     let quatMat = mat4.create();\r\n *     quat4.toMat4(quat, quatMat);\r\n *     mat4.multiply(dest, quatMat);\r\n *     mat4.scale(dest, scale)\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @param {ReadonlyVec3} s Scaling vector\r\n * @returns {mat4} out\r\n */\n\nfunction fromRotationTranslationScale(out, q, v, s) {\n  // Quaternion math\n  var x = q[0],\n      y = q[1],\n      z = q[2],\n      w = q[3];\n  var x2 = x + x;\n  var y2 = y + y;\n  var z2 = z + z;\n  var xx = x * x2;\n  var xy = x * y2;\n  var xz = x * z2;\n  var yy = y * y2;\n  var yz = y * z2;\n  var zz = z * z2;\n  var wx = w * x2;\n  var wy = w * y2;\n  var wz = w * z2;\n  var sx = s[0];\n  var sy = s[1];\n  var sz = s[2];\n  out[0] = (1 - (yy + zz)) * sx;\n  out[1] = (xy + wz) * sx;\n  out[2] = (xz - wy) * sx;\n  out[3] = 0;\n  out[4] = (xy - wz) * sy;\n  out[5] = (1 - (xx + zz)) * sy;\n  out[6] = (yz + wx) * sy;\n  out[7] = 0;\n  out[8] = (xz + wy) * sz;\n  out[9] = (yz - wx) * sz;\n  out[10] = (1 - (xx + yy)) * sz;\n  out[11] = 0;\n  out[12] = v[0];\n  out[13] = v[1];\n  out[14] = v[2];\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\r\n * This is equivalent to (but much faster than):\r\n *\r\n *     mat4.identity(dest);\r\n *     mat4.translate(dest, vec);\r\n *     mat4.translate(dest, origin);\r\n *     let quatMat = mat4.create();\r\n *     quat4.toMat4(quat, quatMat);\r\n *     mat4.multiply(dest, quatMat);\r\n *     mat4.scale(dest, scale)\r\n *     mat4.translate(dest, negativeOrigin);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @param {ReadonlyVec3} s Scaling vector\r\n * @param {ReadonlyVec3} o The origin vector around which to scale and rotate\r\n * @returns {mat4} out\r\n */\n\nfunction fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n  // Quaternion math\n  var x = q[0],\n      y = q[1],\n      z = q[2],\n      w = q[3];\n  var x2 = x + x;\n  var y2 = y + y;\n  var z2 = z + z;\n  var xx = x * x2;\n  var xy = x * y2;\n  var xz = x * z2;\n  var yy = y * y2;\n  var yz = y * z2;\n  var zz = z * z2;\n  var wx = w * x2;\n  var wy = w * y2;\n  var wz = w * z2;\n  var sx = s[0];\n  var sy = s[1];\n  var sz = s[2];\n  var ox = o[0];\n  var oy = o[1];\n  var oz = o[2];\n  var out0 = (1 - (yy + zz)) * sx;\n  var out1 = (xy + wz) * sx;\n  var out2 = (xz - wy) * sx;\n  var out4 = (xy - wz) * sy;\n  var out5 = (1 - (xx + zz)) * sy;\n  var out6 = (yz + wx) * sy;\n  var out8 = (xz + wy) * sz;\n  var out9 = (yz - wx) * sz;\n  var out10 = (1 - (xx + yy)) * sz;\n  out[0] = out0;\n  out[1] = out1;\n  out[2] = out2;\n  out[3] = 0;\n  out[4] = out4;\n  out[5] = out5;\n  out[6] = out6;\n  out[7] = 0;\n  out[8] = out8;\n  out[9] = out9;\n  out[10] = out10;\n  out[11] = 0;\n  out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n  out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n  out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Calculates a 4x4 matrix from the given quaternion\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyQuat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat4} out\r\n */\n\nfunction fromQuat(out, q) {\n  var x = q[0],\n      y = q[1],\n      z = q[2],\n      w = q[3];\n  var x2 = x + x;\n  var y2 = y + y;\n  var z2 = z + z;\n  var xx = x * x2;\n  var yx = y * x2;\n  var yy = y * y2;\n  var zx = z * x2;\n  var zy = z * y2;\n  var zz = z * z2;\n  var wx = w * x2;\n  var wy = w * y2;\n  var wz = w * z2;\n  out[0] = 1 - yy - zz;\n  out[1] = yx + wz;\n  out[2] = zx - wy;\n  out[3] = 0;\n  out[4] = yx - wz;\n  out[5] = 1 - xx - zz;\n  out[6] = zy + wx;\n  out[7] = 0;\n  out[8] = zx + wy;\n  out[9] = zy - wx;\n  out[10] = 1 - xx - yy;\n  out[11] = 0;\n  out[12] = 0;\n  out[13] = 0;\n  out[14] = 0;\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Generates a frustum matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Number} left Left bound of the frustum\r\n * @param {Number} right Right bound of the frustum\r\n * @param {Number} bottom Bottom bound of the frustum\r\n * @param {Number} top Top bound of the frustum\r\n * @param {Number} near Near bound of the frustum\r\n * @param {Number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nfunction frustum(out, left, right, bottom, top, near, far) {\n  var rl = 1 / (right - left);\n  var tb = 1 / (top - bottom);\n  var nf = 1 / (near - far);\n  out[0] = near * 2 * rl;\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = 0;\n  out[5] = near * 2 * tb;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = (right + left) * rl;\n  out[9] = (top + bottom) * tb;\n  out[10] = (far + near) * nf;\n  out[11] = -1;\n  out[12] = 0;\n  out[13] = 0;\n  out[14] = far * near * 2 * nf;\n  out[15] = 0;\n  return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given bounds.\r\n * Passing null/undefined/no value for far will generate infinite projection matrix.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} fovy Vertical field of view in radians\r\n * @param {number} aspect Aspect ratio. typically viewport width/height\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum, can be null or Infinity\r\n * @returns {mat4} out\r\n */\n\nfunction perspective(out, fovy, aspect, near, far) {\n  var f = 1.0 / Math.tan(fovy / 2),\n      nf;\n  out[0] = f / aspect;\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = 0;\n  out[5] = f;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = 0;\n  out[9] = 0;\n  out[11] = -1;\n  out[12] = 0;\n  out[13] = 0;\n  out[15] = 0;\n\n  if (far != null && far !== Infinity) {\n    nf = 1 / (near - far);\n    out[10] = (far + near) * nf;\n    out[14] = 2 * far * near * nf;\n  } else {\n    out[10] = -1;\n    out[14] = -2 * near;\n  }\n\n  return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given field of view.\r\n * This is primarily useful for generating projection matrices to be used\r\n * with the still experiemental WebVR API.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nfunction perspectiveFromFieldOfView(out, fov, near, far) {\n  var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n  var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n  var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n  var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n  var xScale = 2.0 / (leftTan + rightTan);\n  var yScale = 2.0 / (upTan + downTan);\n  out[0] = xScale;\n  out[1] = 0.0;\n  out[2] = 0.0;\n  out[3] = 0.0;\n  out[4] = 0.0;\n  out[5] = yScale;\n  out[6] = 0.0;\n  out[7] = 0.0;\n  out[8] = -((leftTan - rightTan) * xScale * 0.5);\n  out[9] = (upTan - downTan) * yScale * 0.5;\n  out[10] = far / (near - far);\n  out[11] = -1.0;\n  out[12] = 0.0;\n  out[13] = 0.0;\n  out[14] = far * near / (near - far);\n  out[15] = 0.0;\n  return out;\n}\n/**\r\n * Generates a orthogonal projection matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} left Left bound of the frustum\r\n * @param {number} right Right bound of the frustum\r\n * @param {number} bottom Bottom bound of the frustum\r\n * @param {number} top Top bound of the frustum\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nfunction ortho(out, left, right, bottom, top, near, far) {\n  var lr = 1 / (left - right);\n  var bt = 1 / (bottom - top);\n  var nf = 1 / (near - far);\n  out[0] = -2 * lr;\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = 0;\n  out[5] = -2 * bt;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = 0;\n  out[9] = 0;\n  out[10] = 2 * nf;\n  out[11] = 0;\n  out[12] = (left + right) * lr;\n  out[13] = (top + bottom) * bt;\n  out[14] = (far + near) * nf;\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\r\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {ReadonlyVec3} eye Position of the viewer\r\n * @param {ReadonlyVec3} center Point the viewer is looking at\r\n * @param {ReadonlyVec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nfunction lookAt(out, eye, center, up) {\n  var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n  var eyex = eye[0];\n  var eyey = eye[1];\n  var eyez = eye[2];\n  var upx = up[0];\n  var upy = up[1];\n  var upz = up[2];\n  var centerx = center[0];\n  var centery = center[1];\n  var centerz = center[2];\n\n  if (Math.abs(eyex - centerx) < _common_js__WEBPACK_IMPORTED_MODULE_0__.E && Math.abs(eyey - centery) < _common_js__WEBPACK_IMPORTED_MODULE_0__.E && Math.abs(eyez - centerz) < _common_js__WEBPACK_IMPORTED_MODULE_0__.E) {\n    return identity(out);\n  }\n\n  z0 = eyex - centerx;\n  z1 = eyey - centery;\n  z2 = eyez - centerz;\n  len = 1 / Math.hypot(z0, z1, z2);\n  z0 *= len;\n  z1 *= len;\n  z2 *= len;\n  x0 = upy * z2 - upz * z1;\n  x1 = upz * z0 - upx * z2;\n  x2 = upx * z1 - upy * z0;\n  len = Math.hypot(x0, x1, x2);\n\n  if (!len) {\n    x0 = 0;\n    x1 = 0;\n    x2 = 0;\n  } else {\n    len = 1 / len;\n    x0 *= len;\n    x1 *= len;\n    x2 *= len;\n  }\n\n  y0 = z1 * x2 - z2 * x1;\n  y1 = z2 * x0 - z0 * x2;\n  y2 = z0 * x1 - z1 * x0;\n  len = Math.hypot(y0, y1, y2);\n\n  if (!len) {\n    y0 = 0;\n    y1 = 0;\n    y2 = 0;\n  } else {\n    len = 1 / len;\n    y0 *= len;\n    y1 *= len;\n    y2 *= len;\n  }\n\n  out[0] = x0;\n  out[1] = y0;\n  out[2] = z0;\n  out[3] = 0;\n  out[4] = x1;\n  out[5] = y1;\n  out[6] = z1;\n  out[7] = 0;\n  out[8] = x2;\n  out[9] = y2;\n  out[10] = z2;\n  out[11] = 0;\n  out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n  out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n  out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Generates a matrix that makes something look at something else.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {ReadonlyVec3} eye Position of the viewer\r\n * @param {ReadonlyVec3} center Point the viewer is looking at\r\n * @param {ReadonlyVec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nfunction targetTo(out, eye, target, up) {\n  var eyex = eye[0],\n      eyey = eye[1],\n      eyez = eye[2],\n      upx = up[0],\n      upy = up[1],\n      upz = up[2];\n  var z0 = eyex - target[0],\n      z1 = eyey - target[1],\n      z2 = eyez - target[2];\n  var len = z0 * z0 + z1 * z1 + z2 * z2;\n\n  if (len > 0) {\n    len = 1 / Math.sqrt(len);\n    z0 *= len;\n    z1 *= len;\n    z2 *= len;\n  }\n\n  var x0 = upy * z2 - upz * z1,\n      x1 = upz * z0 - upx * z2,\n      x2 = upx * z1 - upy * z0;\n  len = x0 * x0 + x1 * x1 + x2 * x2;\n\n  if (len > 0) {\n    len = 1 / Math.sqrt(len);\n    x0 *= len;\n    x1 *= len;\n    x2 *= len;\n  }\n\n  out[0] = x0;\n  out[1] = x1;\n  out[2] = x2;\n  out[3] = 0;\n  out[4] = z1 * x2 - z2 * x1;\n  out[5] = z2 * x0 - z0 * x2;\n  out[6] = z0 * x1 - z1 * x0;\n  out[7] = 0;\n  out[8] = z0;\n  out[9] = z1;\n  out[10] = z2;\n  out[11] = 0;\n  out[12] = eyex;\n  out[13] = eyey;\n  out[14] = eyez;\n  out[15] = 1;\n  return out;\n}\n/**\r\n * Returns a string representation of a mat4\r\n *\r\n * @param {ReadonlyMat4} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nfunction str(a) {\n  return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n}\n/**\r\n * Returns Frobenius norm of a mat4\r\n *\r\n * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nfunction frob(a) {\n  return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n}\n/**\r\n * Adds two mat4's\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nfunction add(out, a, b) {\n  out[0] = a[0] + b[0];\n  out[1] = a[1] + b[1];\n  out[2] = a[2] + b[2];\n  out[3] = a[3] + b[3];\n  out[4] = a[4] + b[4];\n  out[5] = a[5] + b[5];\n  out[6] = a[6] + b[6];\n  out[7] = a[7] + b[7];\n  out[8] = a[8] + b[8];\n  out[9] = a[9] + b[9];\n  out[10] = a[10] + b[10];\n  out[11] = a[11] + b[11];\n  out[12] = a[12] + b[12];\n  out[13] = a[13] + b[13];\n  out[14] = a[14] + b[14];\n  out[15] = a[15] + b[15];\n  return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nfunction subtract(out, a, b) {\n  out[0] = a[0] - b[0];\n  out[1] = a[1] - b[1];\n  out[2] = a[2] - b[2];\n  out[3] = a[3] - b[3];\n  out[4] = a[4] - b[4];\n  out[5] = a[5] - b[5];\n  out[6] = a[6] - b[6];\n  out[7] = a[7] - b[7];\n  out[8] = a[8] - b[8];\n  out[9] = a[9] - b[9];\n  out[10] = a[10] - b[10];\n  out[11] = a[11] - b[11];\n  out[12] = a[12] - b[12];\n  out[13] = a[13] - b[13];\n  out[14] = a[14] - b[14];\n  out[15] = a[15] - b[15];\n  return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat4} out\r\n */\n\nfunction multiplyScalar(out, a, b) {\n  out[0] = a[0] * b;\n  out[1] = a[1] * b;\n  out[2] = a[2] * b;\n  out[3] = a[3] * b;\n  out[4] = a[4] * b;\n  out[5] = a[5] * b;\n  out[6] = a[6] * b;\n  out[7] = a[7] * b;\n  out[8] = a[8] * b;\n  out[9] = a[9] * b;\n  out[10] = a[10] * b;\n  out[11] = a[11] * b;\n  out[12] = a[12] * b;\n  out[13] = a[13] * b;\n  out[14] = a[14] * b;\n  out[15] = a[15] * b;\n  return out;\n}\n/**\r\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat4} out the receiving vector\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat4} out\r\n */\n\nfunction multiplyScalarAndAdd(out, a, b, scale) {\n  out[0] = a[0] + b[0] * scale;\n  out[1] = a[1] + b[1] * scale;\n  out[2] = a[2] + b[2] * scale;\n  out[3] = a[3] + b[3] * scale;\n  out[4] = a[4] + b[4] * scale;\n  out[5] = a[5] + b[5] * scale;\n  out[6] = a[6] + b[6] * scale;\n  out[7] = a[7] + b[7] * scale;\n  out[8] = a[8] + b[8] * scale;\n  out[9] = a[9] + b[9] * scale;\n  out[10] = a[10] + b[10] * scale;\n  out[11] = a[11] + b[11] * scale;\n  out[12] = a[12] + b[12] * scale;\n  out[13] = a[13] + b[13] * scale;\n  out[14] = a[14] + b[14] * scale;\n  out[15] = a[15] + b[15] * scale;\n  return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyMat4} a The first matrix.\r\n * @param {ReadonlyMat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nfunction exactEquals(a, b) {\n  return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyMat4} a The first matrix.\r\n * @param {ReadonlyMat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nfunction equals(a, b) {\n  var a0 = a[0],\n      a1 = a[1],\n      a2 = a[2],\n      a3 = a[3];\n  var a4 = a[4],\n      a5 = a[5],\n      a6 = a[6],\n      a7 = a[7];\n  var a8 = a[8],\n      a9 = a[9],\n      a10 = a[10],\n      a11 = a[11];\n  var a12 = a[12],\n      a13 = a[13],\n      a14 = a[14],\n      a15 = a[15];\n  var b0 = b[0],\n      b1 = b[1],\n      b2 = b[2],\n      b3 = b[3];\n  var b4 = b[4],\n      b5 = b[5],\n      b6 = b[6],\n      b7 = b[7];\n  var b8 = b[8],\n      b9 = b[9],\n      b10 = b[10],\n      b11 = b[11];\n  var b12 = b[12],\n      b13 = b[13],\n      b14 = b[14],\n      b15 = b[15];\n  return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\n/**\r\n * Alias for {@link mat4.multiply}\r\n * @function\r\n */\n\nvar mul = multiply;\n/**\r\n * Alias for {@link mat4.subtract}\r\n * @function\r\n */\n\nvar sub = subtract;\n\nvar mat4 = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  create: create,\n  clone: clone,\n  copy: copy,\n  fromValues: fromValues,\n  set: set,\n  identity: identity,\n  transpose: transpose,\n  invert: invert,\n  adjoint: adjoint,\n  determinant: determinant,\n  multiply: multiply,\n  translate: translate,\n  scale: scale,\n  rotate: rotate,\n  rotateX: rotateX,\n  rotateY: rotateY,\n  rotateZ: rotateZ,\n  fromTranslation: fromTranslation,\n  fromScaling: fromScaling,\n  fromRotation: fromRotation,\n  fromXRotation: fromXRotation,\n  fromYRotation: fromYRotation,\n  fromZRotation: fromZRotation,\n  fromRotationTranslation: fromRotationTranslation,\n  fromQuat2: fromQuat2,\n  getTranslation: getTranslation,\n  getScaling: getScaling,\n  getRotation: getRotation,\n  fromRotationTranslationScale: fromRotationTranslationScale,\n  fromRotationTranslationScaleOrigin: fromRotationTranslationScaleOrigin,\n  fromQuat: fromQuat,\n  frustum: frustum,\n  perspective: perspective,\n  perspectiveFromFieldOfView: perspectiveFromFieldOfView,\n  ortho: ortho,\n  lookAt: lookAt,\n  targetTo: targetTo,\n  str: str,\n  frob: frob,\n  add: add,\n  subtract: subtract,\n  multiplyScalar: multiplyScalar,\n  multiplyScalarAndAdd: multiplyScalarAndAdd,\n  exactEquals: exactEquals,\n  equals: equals,\n  mul: mul,\n  sub: sub\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat4.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/quat.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/quat.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"a\": () => (/* binding */ conjugate),\n/* harmony export */   \"c\": () => (/* binding */ create),\n/* harmony export */   \"f\": () => (/* binding */ fromValues),\n/* harmony export */   \"g\": () => (/* binding */ getAxisAngle),\n/* harmony export */   \"m\": () => (/* binding */ multiply),\n/* harmony export */   \"s\": () => (/* binding */ setAxisAngle)\n/* harmony export */ });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/common.js\");\n/* harmony import */ var _mat3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mat3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/mat3.js\");\n/* harmony import */ var _vec3_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./vec3.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js\");\n/* harmony import */ var _vec4_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./vec4.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec4.js\");\n\n\n\n\n\n/**\r\n * Quaternion\r\n * @module quat\r\n */\n\n/**\r\n * Creates a new identity quat\r\n *\r\n * @returns {quat} a new quaternion\r\n */\n\nfunction create() {\n  var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(4);\n\n  if (_common_js__WEBPACK_IMPORTED_MODULE_0__.A != Float32Array) {\n    out[0] = 0;\n    out[1] = 0;\n    out[2] = 0;\n  }\n\n  out[3] = 1;\n  return out;\n}\n/**\r\n * Sets a quat from the given angle and rotation axis,\r\n * then returns it.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyVec3} axis the axis around which to rotate\r\n * @param {Number} rad the angle in radians\r\n * @returns {quat} out\r\n **/\n\nfunction setAxisAngle(out, axis, rad) {\n  rad = rad * 0.5;\n  var s = Math.sin(rad);\n  out[0] = s * axis[0];\n  out[1] = s * axis[1];\n  out[2] = s * axis[2];\n  out[3] = Math.cos(rad);\n  return out;\n}\n/**\r\n * Gets the rotation axis and angle for a given\r\n *  quaternion. If a quaternion is created with\r\n *  setAxisAngle, this method will return the same\r\n *  values as providied in the original parameter list\r\n *  OR functionally equivalent values.\r\n * Example: The quaternion formed by axis [0, 0, 1] and\r\n *  angle -90 is the same as the quaternion formed by\r\n *  [0, 0, 1] and 270. This method favors the latter.\r\n * @param  {vec3} out_axis  Vector receiving the axis of rotation\r\n * @param  {ReadonlyQuat} q     Quaternion to be decomposed\r\n * @return {Number}     Angle, in radians, of the rotation\r\n */\n\nfunction getAxisAngle(out_axis, q) {\n  var rad = Math.acos(q[3]) * 2.0;\n  var s = Math.sin(rad / 2.0);\n\n  if (s > _common_js__WEBPACK_IMPORTED_MODULE_0__.E) {\n    out_axis[0] = q[0] / s;\n    out_axis[1] = q[1] / s;\n    out_axis[2] = q[2] / s;\n  } else {\n    // If s is zero, return any axis (no rotation - axis does not matter)\n    out_axis[0] = 1;\n    out_axis[1] = 0;\n    out_axis[2] = 0;\n  }\n\n  return rad;\n}\n/**\r\n * Multiplies two quat's\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a the first operand\r\n * @param {ReadonlyQuat} b the second operand\r\n * @returns {quat} out\r\n */\n\nfunction multiply(out, a, b) {\n  var ax = a[0],\n      ay = a[1],\n      az = a[2],\n      aw = a[3];\n  var bx = b[0],\n      by = b[1],\n      bz = b[2],\n      bw = b[3];\n  out[0] = ax * bw + aw * bx + ay * bz - az * by;\n  out[1] = ay * bw + aw * by + az * bx - ax * bz;\n  out[2] = az * bw + aw * bz + ax * by - ay * bx;\n  out[3] = aw * bw - ax * bx - ay * by - az * bz;\n  return out;\n}\n/**\r\n * Performs a spherical linear interpolation between two quat\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a the first operand\r\n * @param {ReadonlyQuat} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {quat} out\r\n */\n\nfunction slerp(out, a, b, t) {\n  // benchmarks:\n  //    http://jsperf.com/quaternion-slerp-implementations\n  var ax = a[0],\n      ay = a[1],\n      az = a[2],\n      aw = a[3];\n  var bx = b[0],\n      by = b[1],\n      bz = b[2],\n      bw = b[3];\n  var omega, cosom, sinom, scale0, scale1; // calc cosine\n\n  cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary)\n\n  if (cosom < 0.0) {\n    cosom = -cosom;\n    bx = -bx;\n    by = -by;\n    bz = -bz;\n    bw = -bw;\n  } // calculate coefficients\n\n\n  if (1.0 - cosom > _common_js__WEBPACK_IMPORTED_MODULE_0__.E) {\n    // standard case (slerp)\n    omega = Math.acos(cosom);\n    sinom = Math.sin(omega);\n    scale0 = Math.sin((1.0 - t) * omega) / sinom;\n    scale1 = Math.sin(t * omega) / sinom;\n  } else {\n    // \"from\" and \"to\" quaternions are very close\n    //  ... so we can do a linear interpolation\n    scale0 = 1.0 - t;\n    scale1 = t;\n  } // calculate final values\n\n\n  out[0] = scale0 * ax + scale1 * bx;\n  out[1] = scale0 * ay + scale1 * by;\n  out[2] = scale0 * az + scale1 * bz;\n  out[3] = scale0 * aw + scale1 * bw;\n  return out;\n}\n/**\r\n * Calculates the conjugate of a quat\r\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a quat to calculate conjugate of\r\n * @returns {quat} out\r\n */\n\nfunction conjugate(out, a) {\n  out[0] = -a[0];\n  out[1] = -a[1];\n  out[2] = -a[2];\n  out[3] = a[3];\n  return out;\n}\n/**\r\n * Creates a quaternion from the given 3x3 rotation matrix.\r\n *\r\n * NOTE: The resultant quaternion is not normalized, so you should be sure\r\n * to renormalize the quaternion yourself where necessary.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyMat3} m rotation matrix\r\n * @returns {quat} out\r\n * @function\r\n */\n\nfunction fromMat3(out, m) {\n  // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n  // article \"Quaternion Calculus and Fast Animation\".\n  var fTrace = m[0] + m[4] + m[8];\n  var fRoot;\n\n  if (fTrace > 0.0) {\n    // |w| > 1/2, may as well choose w > 1/2\n    fRoot = Math.sqrt(fTrace + 1.0); // 2w\n\n    out[3] = 0.5 * fRoot;\n    fRoot = 0.5 / fRoot; // 1/(4w)\n\n    out[0] = (m[5] - m[7]) * fRoot;\n    out[1] = (m[6] - m[2]) * fRoot;\n    out[2] = (m[1] - m[3]) * fRoot;\n  } else {\n    // |w| <= 1/2\n    var i = 0;\n    if (m[4] > m[0]) i = 1;\n    if (m[8] > m[i * 3 + i]) i = 2;\n    var j = (i + 1) % 3;\n    var k = (i + 2) % 3;\n    fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);\n    out[i] = 0.5 * fRoot;\n    fRoot = 0.5 / fRoot;\n    out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;\n    out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n    out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n  }\n\n  return out;\n}\n/**\r\n * Creates a new quat initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {quat} a new quaternion\r\n * @function\r\n */\n\nvar fromValues = _vec4_js__WEBPACK_IMPORTED_MODULE_3__.f;\n/**\r\n * Normalize a quat\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a quaternion to normalize\r\n * @returns {quat} out\r\n * @function\r\n */\n\nvar normalize = _vec4_js__WEBPACK_IMPORTED_MODULE_3__.n;\n/**\r\n * Sets a quaternion to represent the shortest rotation from one\r\n * vector to another.\r\n *\r\n * Both vectors are assumed to be unit length.\r\n *\r\n * @param {quat} out the receiving quaternion.\r\n * @param {ReadonlyVec3} a the initial vector\r\n * @param {ReadonlyVec3} b the destination vector\r\n * @returns {quat} out\r\n */\n\n(function () {\n  var tmpvec3 = (0,_vec3_js__WEBPACK_IMPORTED_MODULE_2__.w)();\n  var xUnitVec3 = (0,_vec3_js__WEBPACK_IMPORTED_MODULE_2__.x)(1, 0, 0);\n  var yUnitVec3 = (0,_vec3_js__WEBPACK_IMPORTED_MODULE_2__.x)(0, 1, 0);\n  return function (out, a, b) {\n    var dot$1 = (0,_vec3_js__WEBPACK_IMPORTED_MODULE_2__.f)(a, b);\n\n    if (dot$1 < -0.999999) {\n      (0,_vec3_js__WEBPACK_IMPORTED_MODULE_2__.h)(tmpvec3, xUnitVec3, a);\n      if ((0,_vec3_js__WEBPACK_IMPORTED_MODULE_2__.r)(tmpvec3) < 0.000001) (0,_vec3_js__WEBPACK_IMPORTED_MODULE_2__.h)(tmpvec3, yUnitVec3, a);\n      (0,_vec3_js__WEBPACK_IMPORTED_MODULE_2__.d)(tmpvec3, tmpvec3);\n      setAxisAngle(out, tmpvec3, Math.PI);\n      return out;\n    } else if (dot$1 > 0.999999) {\n      out[0] = 0;\n      out[1] = 0;\n      out[2] = 0;\n      out[3] = 1;\n      return out;\n    } else {\n      (0,_vec3_js__WEBPACK_IMPORTED_MODULE_2__.h)(tmpvec3, a, b);\n      out[0] = tmpvec3[0];\n      out[1] = tmpvec3[1];\n      out[2] = tmpvec3[2];\n      out[3] = 1 + dot$1;\n      return normalize(out, out);\n    }\n  };\n})();\n/**\r\n * Performs a spherical linear interpolation with two control points\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a the first operand\r\n * @param {ReadonlyQuat} b the second operand\r\n * @param {ReadonlyQuat} c the third operand\r\n * @param {ReadonlyQuat} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {quat} out\r\n */\n\n(function () {\n  var temp1 = create();\n  var temp2 = create();\n  return function (out, a, b, c, d, t) {\n    slerp(temp1, a, d, t);\n    slerp(temp2, b, c, t);\n    slerp(out, temp1, temp2, 2 * t * (1 - t));\n    return out;\n  };\n})();\n/**\r\n * Sets the specified quaternion with values corresponding to the given\r\n * axes. Each axis is a vec3 and is expected to be unit length and\r\n * perpendicular to all other specified axes.\r\n *\r\n * @param {ReadonlyVec3} view  the vector representing the viewing direction\r\n * @param {ReadonlyVec3} right the vector representing the local \"right\" direction\r\n * @param {ReadonlyVec3} up    the vector representing the local \"up\" direction\r\n * @returns {quat} out\r\n */\n\n(function () {\n  var matr = (0,_mat3_js__WEBPACK_IMPORTED_MODULE_1__.c)();\n  return function (out, view, right, up) {\n    matr[0] = right[0];\n    matr[3] = right[1];\n    matr[6] = right[2];\n    matr[1] = up[0];\n    matr[4] = up[1];\n    matr[7] = up[2];\n    matr[2] = -view[0];\n    matr[5] = -view[1];\n    matr[8] = -view[2];\n    return normalize(out, fromMat3(out, matr));\n  };\n})();\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/quat.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"a\": () => (/* binding */ subtract),\n/* harmony export */   \"b\": () => (/* binding */ scale),\n/* harmony export */   \"c\": () => (/* binding */ scaleAndAdd),\n/* harmony export */   \"d\": () => (/* binding */ normalize),\n/* harmony export */   \"e\": () => (/* binding */ exactEquals),\n/* harmony export */   \"f\": () => (/* binding */ dot),\n/* harmony export */   \"g\": () => (/* binding */ distance),\n/* harmony export */   \"h\": () => (/* binding */ cross),\n/* harmony export */   \"i\": () => (/* binding */ copy),\n/* harmony export */   \"j\": () => (/* binding */ add),\n/* harmony export */   \"k\": () => (/* binding */ equals),\n/* harmony export */   \"l\": () => (/* binding */ length),\n/* harmony export */   \"m\": () => (/* binding */ inverse),\n/* harmony export */   \"n\": () => (/* binding */ negate),\n/* harmony export */   \"o\": () => (/* binding */ divide),\n/* harmony export */   \"p\": () => (/* binding */ transformMat3),\n/* harmony export */   \"q\": () => (/* binding */ sub),\n/* harmony export */   \"r\": () => (/* binding */ len),\n/* harmony export */   \"s\": () => (/* binding */ set),\n/* harmony export */   \"t\": () => (/* binding */ transformMat4),\n/* harmony export */   \"u\": () => (/* binding */ squaredDistance),\n/* harmony export */   \"v\": () => (/* binding */ vec3),\n/* harmony export */   \"w\": () => (/* binding */ create),\n/* harmony export */   \"x\": () => (/* binding */ fromValues)\n/* harmony export */ });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/common.js\");\n\n\n/**\r\n * 3 Dimensional Vector\r\n * @module vec3\r\n */\n\n/**\r\n * Creates a new, empty vec3\r\n *\r\n * @returns {vec3} a new 3D vector\r\n */\n\nfunction create() {\n  var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(3);\n\n  if (_common_js__WEBPACK_IMPORTED_MODULE_0__.A != Float32Array) {\n    out[0] = 0;\n    out[1] = 0;\n    out[2] = 0;\n  }\n\n  return out;\n}\n/**\r\n * Creates a new vec3 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec3} a vector to clone\r\n * @returns {vec3} a new 3D vector\r\n */\n\nfunction clone(a) {\n  var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(3);\n  out[0] = a[0];\n  out[1] = a[1];\n  out[2] = a[2];\n  return out;\n}\n/**\r\n * Calculates the length of a vec3\r\n *\r\n * @param {ReadonlyVec3} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nfunction length(a) {\n  var x = a[0];\n  var y = a[1];\n  var z = a[2];\n  return Math.hypot(x, y, z);\n}\n/**\r\n * Creates a new vec3 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} a new 3D vector\r\n */\n\nfunction fromValues(x, y, z) {\n  var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(3);\n  out[0] = x;\n  out[1] = y;\n  out[2] = z;\n  return out;\n}\n/**\r\n * Copy the values from one vec3 to another\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the source vector\r\n * @returns {vec3} out\r\n */\n\nfunction copy(out, a) {\n  out[0] = a[0];\n  out[1] = a[1];\n  out[2] = a[2];\n  return out;\n}\n/**\r\n * Set the components of a vec3 to the given values\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} out\r\n */\n\nfunction set(out, x, y, z) {\n  out[0] = x;\n  out[1] = y;\n  out[2] = z;\n  return out;\n}\n/**\r\n * Adds two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nfunction add(out, a, b) {\n  out[0] = a[0] + b[0];\n  out[1] = a[1] + b[1];\n  out[2] = a[2] + b[2];\n  return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nfunction subtract(out, a, b) {\n  out[0] = a[0] - b[0];\n  out[1] = a[1] - b[1];\n  out[2] = a[2] - b[2];\n  return out;\n}\n/**\r\n * Multiplies two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nfunction multiply(out, a, b) {\n  out[0] = a[0] * b[0];\n  out[1] = a[1] * b[1];\n  out[2] = a[2] * b[2];\n  return out;\n}\n/**\r\n * Divides two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nfunction divide(out, a, b) {\n  out[0] = a[0] / b[0];\n  out[1] = a[1] / b[1];\n  out[2] = a[2] / b[2];\n  return out;\n}\n/**\r\n * Math.ceil the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to ceil\r\n * @returns {vec3} out\r\n */\n\nfunction ceil(out, a) {\n  out[0] = Math.ceil(a[0]);\n  out[1] = Math.ceil(a[1]);\n  out[2] = Math.ceil(a[2]);\n  return out;\n}\n/**\r\n * Math.floor the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to floor\r\n * @returns {vec3} out\r\n */\n\nfunction floor(out, a) {\n  out[0] = Math.floor(a[0]);\n  out[1] = Math.floor(a[1]);\n  out[2] = Math.floor(a[2]);\n  return out;\n}\n/**\r\n * Returns the minimum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nfunction min(out, a, b) {\n  out[0] = Math.min(a[0], b[0]);\n  out[1] = Math.min(a[1], b[1]);\n  out[2] = Math.min(a[2], b[2]);\n  return out;\n}\n/**\r\n * Returns the maximum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nfunction max(out, a, b) {\n  out[0] = Math.max(a[0], b[0]);\n  out[1] = Math.max(a[1], b[1]);\n  out[2] = Math.max(a[2], b[2]);\n  return out;\n}\n/**\r\n * Math.round the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to round\r\n * @returns {vec3} out\r\n */\n\nfunction round(out, a) {\n  out[0] = Math.round(a[0]);\n  out[1] = Math.round(a[1]);\n  out[2] = Math.round(a[2]);\n  return out;\n}\n/**\r\n * Scales a vec3 by a scalar number\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec3} out\r\n */\n\nfunction scale(out, a, b) {\n  out[0] = a[0] * b;\n  out[1] = a[1] * b;\n  out[2] = a[2] * b;\n  return out;\n}\n/**\r\n * Adds two vec3's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec3} out\r\n */\n\nfunction scaleAndAdd(out, a, b, scale) {\n  out[0] = a[0] + b[0] * scale;\n  out[1] = a[1] + b[1] * scale;\n  out[2] = a[2] + b[2] * scale;\n  return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nfunction distance(a, b) {\n  var x = b[0] - a[0];\n  var y = b[1] - a[1];\n  var z = b[2] - a[2];\n  return Math.hypot(x, y, z);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nfunction squaredDistance(a, b) {\n  var x = b[0] - a[0];\n  var y = b[1] - a[1];\n  var z = b[2] - a[2];\n  return x * x + y * y + z * z;\n}\n/**\r\n * Calculates the squared length of a vec3\r\n *\r\n * @param {ReadonlyVec3} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nfunction squaredLength(a) {\n  var x = a[0];\n  var y = a[1];\n  var z = a[2];\n  return x * x + y * y + z * z;\n}\n/**\r\n * Negates the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to negate\r\n * @returns {vec3} out\r\n */\n\nfunction negate(out, a) {\n  out[0] = -a[0];\n  out[1] = -a[1];\n  out[2] = -a[2];\n  return out;\n}\n/**\r\n * Returns the inverse of the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to invert\r\n * @returns {vec3} out\r\n */\n\nfunction inverse(out, a) {\n  out[0] = 1.0 / a[0];\n  out[1] = 1.0 / a[1];\n  out[2] = 1.0 / a[2];\n  return out;\n}\n/**\r\n * Normalize a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to normalize\r\n * @returns {vec3} out\r\n */\n\nfunction normalize(out, a) {\n  var x = a[0];\n  var y = a[1];\n  var z = a[2];\n  var len = x * x + y * y + z * z;\n\n  if (len > 0) {\n    //TODO: evaluate use of glm_invsqrt here?\n    len = 1 / Math.sqrt(len);\n  }\n\n  out[0] = a[0] * len;\n  out[1] = a[1] * len;\n  out[2] = a[2] * len;\n  return out;\n}\n/**\r\n * Calculates the dot product of two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nfunction dot(a, b) {\n  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n/**\r\n * Computes the cross product of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nfunction cross(out, a, b) {\n  var ax = a[0],\n      ay = a[1],\n      az = a[2];\n  var bx = b[0],\n      by = b[1],\n      bz = b[2];\n  out[0] = ay * bz - az * by;\n  out[1] = az * bx - ax * bz;\n  out[2] = ax * by - ay * bx;\n  return out;\n}\n/**\r\n * Performs a linear interpolation between two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nfunction lerp(out, a, b, t) {\n  var ax = a[0];\n  var ay = a[1];\n  var az = a[2];\n  out[0] = ax + t * (b[0] - ax);\n  out[1] = ay + t * (b[1] - ay);\n  out[2] = az + t * (b[2] - az);\n  return out;\n}\n/**\r\n * Performs a hermite interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {ReadonlyVec3} c the third operand\r\n * @param {ReadonlyVec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nfunction hermite(out, a, b, c, d, t) {\n  var factorTimes2 = t * t;\n  var factor1 = factorTimes2 * (2 * t - 3) + 1;\n  var factor2 = factorTimes2 * (t - 2) + t;\n  var factor3 = factorTimes2 * (t - 1);\n  var factor4 = factorTimes2 * (3 - 2 * t);\n  out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n  out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n  out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n  return out;\n}\n/**\r\n * Performs a bezier interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {ReadonlyVec3} c the third operand\r\n * @param {ReadonlyVec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nfunction bezier(out, a, b, c, d, t) {\n  var inverseFactor = 1 - t;\n  var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n  var factorTimes2 = t * t;\n  var factor1 = inverseFactorTimesTwo * inverseFactor;\n  var factor2 = 3 * t * inverseFactorTimesTwo;\n  var factor3 = 3 * factorTimes2 * inverseFactor;\n  var factor4 = factorTimes2 * t;\n  out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n  out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n  out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n  return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec3} out\r\n */\n\nfunction random(out, scale) {\n  scale = scale || 1.0;\n  var r = (0,_common_js__WEBPACK_IMPORTED_MODULE_0__.R)() * 2.0 * Math.PI;\n  var z = (0,_common_js__WEBPACK_IMPORTED_MODULE_0__.R)() * 2.0 - 1.0;\n  var zScale = Math.sqrt(1.0 - z * z) * scale;\n  out[0] = Math.cos(r) * zScale;\n  out[1] = Math.sin(r) * zScale;\n  out[2] = z * scale;\n  return out;\n}\n/**\r\n * Transforms the vec3 with a mat4.\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nfunction transformMat4(out, a, m) {\n  var x = a[0],\n      y = a[1],\n      z = a[2];\n  var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n  w = w || 1.0;\n  out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n  out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n  out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n  return out;\n}\n/**\r\n * Transforms the vec3 with a mat3.\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyMat3} m the 3x3 matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nfunction transformMat3(out, a, m) {\n  var x = a[0],\n      y = a[1],\n      z = a[2];\n  out[0] = x * m[0] + y * m[3] + z * m[6];\n  out[1] = x * m[1] + y * m[4] + z * m[7];\n  out[2] = x * m[2] + y * m[5] + z * m[8];\n  return out;\n}\n/**\r\n * Transforms the vec3 with a quat\r\n * Can also be used for dual quaternions. (Multiply it with the real part)\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyQuat} q quaternion to transform with\r\n * @returns {vec3} out\r\n */\n\nfunction transformQuat(out, a, q) {\n  // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n  var qx = q[0],\n      qy = q[1],\n      qz = q[2],\n      qw = q[3];\n  var x = a[0],\n      y = a[1],\n      z = a[2]; // var qvec = [qx, qy, qz];\n  // var uv = vec3.cross([], qvec, a);\n\n  var uvx = qy * z - qz * y,\n      uvy = qz * x - qx * z,\n      uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n\n  var uuvx = qy * uvz - qz * uvy,\n      uuvy = qz * uvx - qx * uvz,\n      uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n\n  var w2 = qw * 2;\n  uvx *= w2;\n  uvy *= w2;\n  uvz *= w2; // vec3.scale(uuv, uuv, 2);\n\n  uuvx *= 2;\n  uuvy *= 2;\n  uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n\n  out[0] = x + uvx + uuvx;\n  out[1] = y + uvy + uuvy;\n  out[2] = z + uvz + uuvz;\n  return out;\n}\n/**\r\n * Rotate a 3D vector around the x-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nfunction rotateX(out, a, b, rad) {\n  var p = [],\n      r = []; //Translate point to the origin\n\n  p[0] = a[0] - b[0];\n  p[1] = a[1] - b[1];\n  p[2] = a[2] - b[2]; //perform rotation\n\n  r[0] = p[0];\n  r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n  r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position\n\n  out[0] = r[0] + b[0];\n  out[1] = r[1] + b[1];\n  out[2] = r[2] + b[2];\n  return out;\n}\n/**\r\n * Rotate a 3D vector around the y-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nfunction rotateY(out, a, b, rad) {\n  var p = [],\n      r = []; //Translate point to the origin\n\n  p[0] = a[0] - b[0];\n  p[1] = a[1] - b[1];\n  p[2] = a[2] - b[2]; //perform rotation\n\n  r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n  r[1] = p[1];\n  r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position\n\n  out[0] = r[0] + b[0];\n  out[1] = r[1] + b[1];\n  out[2] = r[2] + b[2];\n  return out;\n}\n/**\r\n * Rotate a 3D vector around the z-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nfunction rotateZ(out, a, b, rad) {\n  var p = [],\n      r = []; //Translate point to the origin\n\n  p[0] = a[0] - b[0];\n  p[1] = a[1] - b[1];\n  p[2] = a[2] - b[2]; //perform rotation\n\n  r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n  r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n  r[2] = p[2]; //translate to correct position\n\n  out[0] = r[0] + b[0];\n  out[1] = r[1] + b[1];\n  out[2] = r[2] + b[2];\n  return out;\n}\n/**\r\n * Get the angle between two 3D vectors\r\n * @param {ReadonlyVec3} a The first operand\r\n * @param {ReadonlyVec3} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nfunction angle(a, b) {\n  var ax = a[0],\n      ay = a[1],\n      az = a[2],\n      bx = b[0],\n      by = b[1],\n      bz = b[2],\n      mag1 = Math.sqrt(ax * ax + ay * ay + az * az),\n      mag2 = Math.sqrt(bx * bx + by * by + bz * bz),\n      mag = mag1 * mag2,\n      cosine = mag && dot(a, b) / mag;\n  return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec3 to zero\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @returns {vec3} out\r\n */\n\nfunction zero(out) {\n  out[0] = 0.0;\n  out[1] = 0.0;\n  out[2] = 0.0;\n  return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec3} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nfunction str(a) {\n  return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n}\n/**\r\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec3} a The first vector.\r\n * @param {ReadonlyVec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nfunction exactEquals(a, b) {\n  return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec3} a The first vector.\r\n * @param {ReadonlyVec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nfunction equals(a, b) {\n  var a0 = a[0],\n      a1 = a[1],\n      a2 = a[2];\n  var b0 = b[0],\n      b1 = b[1],\n      b2 = b[2];\n  return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__.E * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\n/**\r\n * Alias for {@link vec3.subtract}\r\n * @function\r\n */\n\nvar sub = subtract;\n/**\r\n * Alias for {@link vec3.multiply}\r\n * @function\r\n */\n\nvar mul = multiply;\n/**\r\n * Alias for {@link vec3.divide}\r\n * @function\r\n */\n\nvar div = divide;\n/**\r\n * Alias for {@link vec3.distance}\r\n * @function\r\n */\n\nvar dist = distance;\n/**\r\n * Alias for {@link vec3.squaredDistance}\r\n * @function\r\n */\n\nvar sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec3.length}\r\n * @function\r\n */\n\nvar len = length;\n/**\r\n * Alias for {@link vec3.squaredLength}\r\n * @function\r\n */\n\nvar sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec3s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nvar forEach = function () {\n  var vec = create();\n  return function (a, stride, offset, count, fn, arg) {\n    var i, l;\n\n    if (!stride) {\n      stride = 3;\n    }\n\n    if (!offset) {\n      offset = 0;\n    }\n\n    if (count) {\n      l = Math.min(count * stride + offset, a.length);\n    } else {\n      l = a.length;\n    }\n\n    for (i = offset; i < l; i += stride) {\n      vec[0] = a[i];\n      vec[1] = a[i + 1];\n      vec[2] = a[i + 2];\n      fn(vec, vec, arg);\n      a[i] = vec[0];\n      a[i + 1] = vec[1];\n      a[i + 2] = vec[2];\n    }\n\n    return a;\n  };\n}();\n\nvar vec3 = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  create: create,\n  clone: clone,\n  length: length,\n  fromValues: fromValues,\n  copy: copy,\n  set: set,\n  add: add,\n  subtract: subtract,\n  multiply: multiply,\n  divide: divide,\n  ceil: ceil,\n  floor: floor,\n  min: min,\n  max: max,\n  round: round,\n  scale: scale,\n  scaleAndAdd: scaleAndAdd,\n  distance: distance,\n  squaredDistance: squaredDistance,\n  squaredLength: squaredLength,\n  negate: negate,\n  inverse: inverse,\n  normalize: normalize,\n  dot: dot,\n  cross: cross,\n  lerp: lerp,\n  hermite: hermite,\n  bezier: bezier,\n  random: random,\n  transformMat4: transformMat4,\n  transformMat3: transformMat3,\n  transformQuat: transformQuat,\n  rotateX: rotateX,\n  rotateY: rotateY,\n  rotateZ: rotateZ,\n  angle: angle,\n  zero: zero,\n  str: str,\n  exactEquals: exactEquals,\n  equals: equals,\n  sub: sub,\n  mul: mul,\n  div: div,\n  dist: dist,\n  sqrDist: sqrDist,\n  len: len,\n  sqrLen: sqrLen,\n  forEach: forEach\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec3.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec4.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec4.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"f\": () => (/* binding */ fromValues),\n/* harmony export */   \"n\": () => (/* binding */ normalize),\n/* harmony export */   \"t\": () => (/* binding */ transformMat4)\n/* harmony export */ });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/common.js\");\n\n\n/**\r\n * 4 Dimensional Vector\r\n * @module vec4\r\n */\n\n/**\r\n * Creates a new, empty vec4\r\n *\r\n * @returns {vec4} a new 4D vector\r\n */\n\nfunction create() {\n  var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(4);\n\n  if (_common_js__WEBPACK_IMPORTED_MODULE_0__.A != Float32Array) {\n    out[0] = 0;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n  }\n\n  return out;\n}\n/**\r\n * Creates a new vec4 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {vec4} a new 4D vector\r\n */\n\nfunction fromValues(x, y, z, w) {\n  var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.A(4);\n  out[0] = x;\n  out[1] = y;\n  out[2] = z;\n  out[3] = w;\n  return out;\n}\n/**\r\n * Normalize a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to normalize\r\n * @returns {vec4} out\r\n */\n\nfunction normalize(out, a) {\n  var x = a[0];\n  var y = a[1];\n  var z = a[2];\n  var w = a[3];\n  var len = x * x + y * y + z * z + w * w;\n\n  if (len > 0) {\n    len = 1 / Math.sqrt(len);\n  }\n\n  out[0] = x * len;\n  out[1] = y * len;\n  out[2] = z * len;\n  out[3] = w * len;\n  return out;\n}\n/**\r\n * Transforms the vec4 with a mat4.\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec4} out\r\n */\n\nfunction transformMat4(out, a, m) {\n  var x = a[0],\n      y = a[1],\n      z = a[2],\n      w = a[3];\n  out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n  out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n  out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n  out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n  return out;\n}\n/**\r\n * Perform some operation over an array of vec4s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\n(function () {\n  var vec = create();\n  return function (a, stride, offset, count, fn, arg) {\n    var i, l;\n\n    if (!stride) {\n      stride = 4;\n    }\n\n    if (!offset) {\n      offset = 0;\n    }\n\n    if (count) {\n      l = Math.min(count * stride + offset, a.length);\n    } else {\n      l = a.length;\n    }\n\n    for (i = offset; i < l; i += stride) {\n      vec[0] = a[i];\n      vec[1] = a[i + 1];\n      vec[2] = a[i + 2];\n      vec[3] = a[i + 3];\n      fn(vec, vec, arg);\n      a[i] = vec[0];\n      a[i + 1] = vec[1];\n      a[i + 2] = vec[2];\n      a[i + 3] = vec[3];\n    }\n\n    return a;\n  };\n})();\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/gl-matrix/esm/vec4.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/ieee754/index.js":
/*!**************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/ieee754/index.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/immediate/lib/browser.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/immediate/lib/browser.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"b\": () => (/* binding */ browser)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\nvar Mutation = _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a.MutationObserver || _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a.WebKitMutationObserver;\n\nvar scheduleDrain;\n\n{\n  if (Mutation) {\n    var called = 0;\n    var observer = new Mutation(nextTick);\n    var element = _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a.document.createTextNode('');\n    observer.observe(element, {\n      characterData: true\n    });\n    scheduleDrain = function () {\n      element.data = (called = ++called % 2);\n    };\n  } else if (!_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a.setImmediate && typeof _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a.MessageChannel !== 'undefined') {\n    var channel = new _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a.MessageChannel();\n    channel.port1.onmessage = nextTick;\n    scheduleDrain = function () {\n      channel.port2.postMessage(0);\n    };\n  } else if ('document' in _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a && 'onreadystatechange' in _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a.document.createElement('script')) {\n    scheduleDrain = function () {\n\n      // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n      // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n      var scriptEl = _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a.document.createElement('script');\n      scriptEl.onreadystatechange = function () {\n        nextTick();\n\n        scriptEl.onreadystatechange = null;\n        scriptEl.parentNode.removeChild(scriptEl);\n        scriptEl = null;\n      };\n      _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a.document.documentElement.appendChild(scriptEl);\n    };\n  } else {\n    scheduleDrain = function () {\n      setTimeout(nextTick, 0);\n    };\n  }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n  draining = true;\n  var i, oldQueue;\n  var len = queue.length;\n  while (len) {\n    oldQueue = queue;\n    queue = [];\n    i = -1;\n    while (++i < len) {\n      oldQueue[i]();\n    }\n    len = queue.length;\n  }\n  draining = false;\n}\n\nvar browser = immediate;\nfunction immediate(task) {\n  if (queue.push(task) === 1 && !draining) {\n    scheduleDrain();\n  }\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/immediate/lib/browser.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/inherits/inherits_browser.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/inherits/inherits_browser.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"i\": () => (/* binding */ inherits_browser)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\nvar inherits_browser = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module) {\nif (typeof Object.create === 'function') {\n  // implementation from standard node.js 'util' module\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor;\n    ctor.prototype = Object.create(superCtor.prototype, {\n      constructor: {\n        value: ctor,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n  };\n} else {\n  // old school shim for old browsers\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor;\n    var TempCtor = function () {};\n    TempCtor.prototype = superCtor.prototype;\n    ctor.prototype = new TempCtor();\n    ctor.prototype.constructor = ctor;\n  };\n}\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/inherits/inherits_browser.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/base64.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/base64.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"b\": () => (/* binding */ base64)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _support_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./support.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/support.js\");\n\n\n\n// private property\nvar _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n\n// public method for encoding\nvar encode = function(input) {\n    var output = [];\n    var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n    var i = 0, len = input.length, remainingBytes = len;\n\n    var isArray = _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.getTypeOf(input) !== \"string\";\n    while (i < input.length) {\n        remainingBytes = len - i;\n\n        if (!isArray) {\n            chr1 = input.charCodeAt(i++);\n            chr2 = i < len ? input.charCodeAt(i++) : 0;\n            chr3 = i < len ? input.charCodeAt(i++) : 0;\n        } else {\n            chr1 = input[i++];\n            chr2 = i < len ? input[i++] : 0;\n            chr3 = i < len ? input[i++] : 0;\n        }\n\n        enc1 = chr1 >> 2;\n        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n        enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64;\n        enc4 = remainingBytes > 2 ? (chr3 & 63) : 64;\n\n        output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4));\n\n    }\n\n    return output.join(\"\");\n};\n\n// public method for decoding\nvar decode = function(input) {\n    var chr1, chr2, chr3;\n    var enc1, enc2, enc3, enc4;\n    var i = 0, resultIndex = 0;\n\n    var dataUrlPrefix = \"data:\";\n\n    if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) {\n        // This is a common error: people give a data url\n        // (data:image/png;base64,iVBOR...) with a {base64: true} and\n        // wonders why things don't work.\n        // We can detect that the string input looks like a data url but we\n        // *can't* be sure it is one: removing everything up to the comma would\n        // be too dangerous.\n        throw new Error(\"Invalid base64 input, it looks like a data url.\");\n    }\n\n    input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\n    var totalLength = input.length * 3 / 4;\n    if(input.charAt(input.length - 1) === _keyStr.charAt(64)) {\n        totalLength--;\n    }\n    if(input.charAt(input.length - 2) === _keyStr.charAt(64)) {\n        totalLength--;\n    }\n    if (totalLength % 1 !== 0) {\n        // totalLength is not an integer, the length does not match a valid\n        // base64 content. That can happen if:\n        // - the input is not a base64 content\n        // - the input is *almost* a base64 content, with a extra chars at the\n        //   beginning or at the end\n        // - the input uses a base64 variant (base64url for example)\n        throw new Error(\"Invalid base64 input, bad content length.\");\n    }\n    var output;\n    if (_support_js__WEBPACK_IMPORTED_MODULE_1__.s.uint8array) {\n        output = new Uint8Array(totalLength|0);\n    } else {\n        output = new Array(totalLength|0);\n    }\n\n    while (i < input.length) {\n\n        enc1 = _keyStr.indexOf(input.charAt(i++));\n        enc2 = _keyStr.indexOf(input.charAt(i++));\n        enc3 = _keyStr.indexOf(input.charAt(i++));\n        enc4 = _keyStr.indexOf(input.charAt(i++));\n\n        chr1 = (enc1 << 2) | (enc2 >> 4);\n        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n        chr3 = ((enc3 & 3) << 6) | enc4;\n\n        output[resultIndex++] = chr1;\n\n        if (enc3 !== 64) {\n            output[resultIndex++] = chr2;\n        }\n        if (enc4 !== 64) {\n            output[resultIndex++] = chr3;\n        }\n\n    }\n\n    return output;\n};\n\nvar base64 = {\n\tencode: encode,\n\tdecode: decode\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/base64.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/compressedObject.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/compressedObject.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"c\": () => (/* binding */ compressedObject)\n/* harmony export */ });\n/* harmony import */ var _external_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./external.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/external.js\");\n/* harmony import */ var _stream_DataWorker_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./stream/DataWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/DataWorker.js\");\n/* harmony import */ var _stream_DataLengthProbe_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stream/DataLengthProbe.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/DataLengthProbe.js\");\n/* harmony import */ var _stream_Crc32Probe_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream/Crc32Probe.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/Crc32Probe.js\");\n\n\n\n\n\n/**\n * Represent a compressed object, with everything needed to decompress it.\n * @constructor\n * @param {number} compressedSize the size of the data compressed.\n * @param {number} uncompressedSize the size of the data after decompression.\n * @param {number} crc32 the crc32 of the decompressed file.\n * @param {object} compression the type of compression, see lib/compressions.js.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data.\n */\nfunction CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) {\n    this.compressedSize = compressedSize;\n    this.uncompressedSize = uncompressedSize;\n    this.crc32 = crc32;\n    this.compression = compression;\n    this.compressedContent = data;\n}\n\nCompressedObject.prototype = {\n    /**\n     * Create a worker to get the uncompressed content.\n     * @return {GenericWorker} the worker.\n     */\n    getContentWorker : function () {\n        var worker = new _stream_DataWorker_js__WEBPACK_IMPORTED_MODULE_1__.D(_external_js__WEBPACK_IMPORTED_MODULE_0__.e.Promise.resolve(this.compressedContent))\n        .pipe(this.compression.uncompressWorker())\n        .pipe(new _stream_DataLengthProbe_js__WEBPACK_IMPORTED_MODULE_2__.D(\"data_length\"));\n\n        var that = this;\n        worker.on(\"end\", function () {\n            if(this.streamInfo['data_length'] !== that.uncompressedSize) {\n                throw new Error(\"Bug : uncompressed data size mismatch\");\n            }\n        });\n        return worker;\n    },\n    /**\n     * Create a worker to get the compressed content.\n     * @return {GenericWorker} the worker.\n     */\n    getCompressedWorker : function () {\n        return new _stream_DataWorker_js__WEBPACK_IMPORTED_MODULE_1__.D(_external_js__WEBPACK_IMPORTED_MODULE_0__.e.Promise.resolve(this.compressedContent))\n        .withStreamInfo(\"compressedSize\", this.compressedSize)\n        .withStreamInfo(\"uncompressedSize\", this.uncompressedSize)\n        .withStreamInfo(\"crc32\", this.crc32)\n        .withStreamInfo(\"compression\", this.compression)\n        ;\n    }\n};\n\n/**\n * Chain the given worker with other workers to compress the content with the\n * given compresion.\n * @param {GenericWorker} uncompressedWorker the worker to pipe.\n * @param {Object} compression the compression object.\n * @param {Object} compressionOptions the options to use when compressing.\n * @return {GenericWorker} the new worker compressing the content.\n */\nCompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) {\n    return uncompressedWorker\n    .pipe(new _stream_Crc32Probe_js__WEBPACK_IMPORTED_MODULE_3__.C())\n    .pipe(new _stream_DataLengthProbe_js__WEBPACK_IMPORTED_MODULE_2__.D(\"uncompressedSize\"))\n    .pipe(compression.compressWorker(compressionOptions))\n    .pipe(new _stream_DataLengthProbe_js__WEBPACK_IMPORTED_MODULE_2__.D(\"compressedSize\"))\n    .withStreamInfo(\"compression\", compression);\n};\n\nvar compressedObject = CompressedObject;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/compressedObject.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/compressions.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/compressions.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"c\": () => (/* binding */ compressions)\n/* harmony export */ });\n/* harmony import */ var _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./stream/GenericWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js\");\n/* harmony import */ var _flate_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./flate.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/flate.js\");\n\n\n\nvar STORE = {\n    magic: \"\\x00\\x00\",\n    compressWorker : function (compressionOptions) {\n        return new _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_0__.G(\"STORE compression\");\n    },\n    uncompressWorker : function () {\n        return new _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_0__.G(\"STORE decompression\");\n    }\n};\nvar DEFLATE = _flate_js__WEBPACK_IMPORTED_MODULE_1__.f;\n\nvar compressions = {\n\tSTORE: STORE,\n\tDEFLATE: DEFLATE\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/compressions.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/crc32.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/crc32.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"c\": () => (/* binding */ crc32_1)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n\n\n/**\n * The following functions come from pako, from pako/lib/zlib/crc32.js\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n    var c, table = [];\n\n    for(var n =0; n < 256; n++){\n        c = n;\n        for(var k =0; k < 8; k++){\n            c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n        }\n        table[n] = c;\n    }\n\n    return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n    var t = crcTable, end = pos + len;\n\n    crc = crc ^ (-1);\n\n    for (var i = pos; i < end; i++ ) {\n        crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n    }\n\n    return (crc ^ (-1)); // >>> 0;\n}\n\n// That's all for the pako functions.\n\n/**\n * Compute the crc32 of a string.\n * This is almost the same as the function crc32, but for strings. Using the\n * same function for the two use cases leads to horrible performances.\n * @param {Number} crc the starting value of the crc.\n * @param {String} str the string to use.\n * @param {Number} len the length of the string.\n * @param {Number} pos the starting position for the crc32 computation.\n * @return {Number} the computed crc32.\n */\nfunction crc32str(crc, str, len, pos) {\n    var t = crcTable, end = pos + len;\n\n    crc = crc ^ (-1);\n\n    for (var i = pos; i < end; i++ ) {\n        crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF];\n    }\n\n    return (crc ^ (-1)); // >>> 0;\n}\n\nvar crc32_1 = function crc32wrapper(input, crc) {\n    if (typeof input === \"undefined\" || !input.length) {\n        return 0;\n    }\n\n    var isArray = _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.getTypeOf(input) !== \"string\";\n\n    if(isArray) {\n        return crc32(crc|0, input, input.length, 0);\n    } else {\n        return crc32str(crc|0, input, input.length, 0);\n    }\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/crc32.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/defaults.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/defaults.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"d\": () => (/* binding */ defaults)\n/* harmony export */ });\nvar base64 = false;\nvar binary = false;\nvar dir = false;\nvar createFolders = true;\nvar date = null;\nvar compression = null;\nvar compressionOptions = null;\nvar comment = null;\nvar unixPermissions = null;\nvar dosPermissions = null;\n\nvar defaults = {\n\tbase64: base64,\n\tbinary: binary,\n\tdir: dir,\n\tcreateFolders: createFolders,\n\tdate: date,\n\tcompression: compression,\n\tcompressionOptions: compressionOptions,\n\tcomment: comment,\n\tunixPermissions: unixPermissions,\n\tdosPermissions: dosPermissions\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/defaults.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/external.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/external.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"e\": () => (/* binding */ external)\n/* harmony export */ });\n/* harmony import */ var _lie_lib_browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../lie/lib/browser.js */ \"./node_modules/@kitware/vtk.js/vendor/lie/lib/browser.js\");\n\n\n/* global Promise */\n\n// load the global object first:\n// - it should be better integrated in the system (unhandledRejection in node)\n// - the environment may have a custom Promise implementation (see zone.js)\nvar ES6Promise = null;\nif (typeof Promise !== \"undefined\") {\n    ES6Promise = Promise;\n} else {\n    ES6Promise = _lie_lib_browser_js__WEBPACK_IMPORTED_MODULE_0__.b;\n}\n\n/**\n * Let the user use/change some implementations.\n */\nvar external = {\n    Promise: ES6Promise\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/external.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/flate.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/flate.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"f\": () => (/* binding */ flate)\n/* harmony export */ });\n/* harmony import */ var _node_modules_pako_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/pako/index.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/index.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stream/GenericWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js\");\n\n\n\n\nvar USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');\n\n\n\n\n\nvar ARRAY_TYPE = USE_TYPEDARRAY ? \"uint8array\" : \"array\";\n\nvar magic = \"\\x08\\x00\";\n\n/**\n * Create a worker that uses pako to inflate/deflate.\n * @constructor\n * @param {String} action the name of the pako function to call : either \"Deflate\" or \"Inflate\".\n * @param {Object} options the options to use when (de)compressing.\n */\nfunction FlateWorker(action, options) {\n    _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_2__.G.call(this, \"FlateWorker/\" + action);\n\n    this._pako = null;\n    this._pakoAction = action;\n    this._pakoOptions = options;\n    // the `meta` object from the last chunk received\n    // this allow this worker to pass around metadata\n    this.meta = {};\n}\n\n_utils_js__WEBPACK_IMPORTED_MODULE_1__.u.inherits(FlateWorker, _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_2__.G);\n\n/**\n * @see GenericWorker.processChunk\n */\nFlateWorker.prototype.processChunk = function (chunk) {\n    this.meta = chunk.meta;\n    if (this._pako === null) {\n        this._createPako();\n    }\n    this._pako.push(_utils_js__WEBPACK_IMPORTED_MODULE_1__.u.transformTo(ARRAY_TYPE, chunk.data), false);\n};\n\n/**\n * @see GenericWorker.flush\n */\nFlateWorker.prototype.flush = function () {\n    _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_2__.G.prototype.flush.call(this);\n    if (this._pako === null) {\n        this._createPako();\n    }\n    this._pako.push([], true);\n};\n/**\n * @see GenericWorker.cleanUp\n */\nFlateWorker.prototype.cleanUp = function () {\n    _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_2__.G.prototype.cleanUp.call(this);\n    this._pako = null;\n};\n\n/**\n * Create the _pako object.\n * TODO: lazy-loading this object isn't the best solution but it's the\n * quickest. The best solution is to lazy-load the worker list. See also the\n * issue #446.\n */\nFlateWorker.prototype._createPako = function () {\n    this._pako = new _node_modules_pako_index_js__WEBPACK_IMPORTED_MODULE_0__.p[this._pakoAction]({\n        raw: true,\n        level: this._pakoOptions.level || -1 // default compression\n    });\n    var self = this;\n    this._pako.onData = function(data) {\n        self.push({\n            data : data,\n            meta : self.meta\n        });\n    };\n};\n\nvar compressWorker = function (compressionOptions) {\n    return new FlateWorker(\"Deflate\", compressionOptions);\n};\nvar uncompressWorker = function () {\n    return new FlateWorker(\"Inflate\", {});\n};\n\nvar flate = {\n\tmagic: magic,\n\tcompressWorker: compressWorker,\n\tuncompressWorker: uncompressWorker\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/flate.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/generate/ZipFileWorker.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/generate/ZipFileWorker.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"Z\": () => (/* binding */ ZipFileWorker_1)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stream/GenericWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js\");\n/* harmony import */ var _utf8_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utf8.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utf8.js\");\n/* harmony import */ var _crc32_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../crc32.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/crc32.js\");\n/* harmony import */ var _signature_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../signature.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/signature.js\");\n\n\n\n\n\n\n/**\n * Transform an integer into a string in hexadecimal.\n * @private\n * @param {number} dec the number to convert.\n * @param {number} bytes the number of bytes to generate.\n * @returns {string} the result.\n */\nvar decToHex = function(dec, bytes) {\n    var hex = \"\", i;\n    for (i = 0; i < bytes; i++) {\n        hex += String.fromCharCode(dec & 0xff);\n        dec = dec >>> 8;\n    }\n    return hex;\n};\n\n/**\n * Generate the UNIX part of the external file attributes.\n * @param {Object} unixPermissions the unix permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute :\n *\n * TTTTsstrwxrwxrwx0000000000ADVSHR\n * ^^^^____________________________ file type, see zipinfo.c (UNX_*)\n *     ^^^_________________________ setuid, setgid, sticky\n *        ^^^^^^^^^________________ permissions\n *                 ^^^^^^^^^^______ not used ?\n *                           ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only\n */\nvar generateUnixExternalFileAttr = function (unixPermissions, isDir) {\n\n    var result = unixPermissions;\n    if (!unixPermissions) {\n        // I can't use octal values in strict mode, hence the hexa.\n        //  040775 => 0x41fd\n        // 0100664 => 0x81b4\n        result = isDir ? 0x41fd : 0x81b4;\n    }\n    return (result & 0xFFFF) << 16;\n};\n\n/**\n * Generate the DOS part of the external file attributes.\n * @param {Object} dosPermissions the dos permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * Bit 0     Read-Only\n * Bit 1     Hidden\n * Bit 2     System\n * Bit 3     Volume Label\n * Bit 4     Directory\n * Bit 5     Archive\n */\nvar generateDosExternalFileAttr = function (dosPermissions, isDir) {\n\n    // the dir flag is already set for compatibility\n    return (dosPermissions || 0)  & 0x3F;\n};\n\n/**\n * Generate the various parts used in the construction of the final zip file.\n * @param {Object} streamInfo the hash with informations about the compressed file.\n * @param {Boolean} streamedContent is the content streamed ?\n * @param {Boolean} streamingEnded is the stream finished ?\n * @param {number} offset the current offset from the start of the zip file.\n * @param {String} platform let's pretend we are this platform (change platform dependents fields)\n * @param {Function} encodeFileName the function to encode the file name / comment.\n * @return {Object} the zip parts.\n */\nvar generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) {\n    var file = streamInfo['file'],\n    compression = streamInfo['compression'],\n    useCustomEncoding = encodeFileName !== _utf8_js__WEBPACK_IMPORTED_MODULE_2__.u.utf8encode,\n    encodedFileName = _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.transformTo(\"string\", encodeFileName(file.name)),\n    utfEncodedFileName = _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.transformTo(\"string\", _utf8_js__WEBPACK_IMPORTED_MODULE_2__.u.utf8encode(file.name)),\n    comment = file.comment,\n    encodedComment = _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.transformTo(\"string\", encodeFileName(comment)),\n    utfEncodedComment = _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.transformTo(\"string\", _utf8_js__WEBPACK_IMPORTED_MODULE_2__.u.utf8encode(comment)),\n    useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,\n    useUTF8ForComment = utfEncodedComment.length !== comment.length,\n    dosTime,\n    dosDate,\n    extraFields = \"\",\n    unicodePathExtraField = \"\",\n    unicodeCommentExtraField = \"\",\n    dir = file.dir,\n    date = file.date;\n\n\n    var dataInfo = {\n        crc32 : 0,\n        compressedSize : 0,\n        uncompressedSize : 0\n    };\n\n    // if the content is streamed, the sizes/crc32 are only available AFTER\n    // the end of the stream.\n    if (!streamedContent || streamingEnded) {\n        dataInfo.crc32 = streamInfo['crc32'];\n        dataInfo.compressedSize = streamInfo['compressedSize'];\n        dataInfo.uncompressedSize = streamInfo['uncompressedSize'];\n    }\n\n    var bitflag = 0;\n    if (streamedContent) {\n        // Bit 3: the sizes/crc32 are set to zero in the local header.\n        // The correct values are put in the data descriptor immediately\n        // following the compressed data.\n        bitflag |= 0x0008;\n    }\n    if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) {\n        // Bit 11: Language encoding flag (EFS).\n        bitflag |= 0x0800;\n    }\n\n\n    var extFileAttr = 0;\n    var versionMadeBy = 0;\n    if (dir) {\n        // dos or unix, we set the dos dir flag\n        extFileAttr |= 0x00010;\n    }\n    if(platform === \"UNIX\") {\n        versionMadeBy = 0x031E; // UNIX, version 3.0\n        extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir);\n    } else { // DOS or other, fallback to DOS\n        versionMadeBy = 0x0014; // DOS, version 2.0\n        extFileAttr |= generateDosExternalFileAttr(file.dosPermissions);\n    }\n\n    // date\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html\n\n    dosTime = date.getUTCHours();\n    dosTime = dosTime << 6;\n    dosTime = dosTime | date.getUTCMinutes();\n    dosTime = dosTime << 5;\n    dosTime = dosTime | date.getUTCSeconds() / 2;\n\n    dosDate = date.getUTCFullYear() - 1980;\n    dosDate = dosDate << 4;\n    dosDate = dosDate | (date.getUTCMonth() + 1);\n    dosDate = dosDate << 5;\n    dosDate = dosDate | date.getUTCDate();\n\n    if (useUTF8ForFileName) {\n        // set the unicode path extra field. unzip needs at least one extra\n        // field to correctly handle unicode path, so using the path is as good\n        // as any other information. This could improve the situation with\n        // other archive managers too.\n        // This field is usually used without the utf8 flag, with a non\n        // unicode path in the header (winrar, winzip). This helps (a bit)\n        // with the messy Windows' default compressed folders feature but\n        // breaks on p7zip which doesn't seek the unicode path extra field.\n        // So for now, UTF-8 everywhere !\n        unicodePathExtraField =\n            // Version\n            decToHex(1, 1) +\n            // NameCRC32\n            decToHex((0,_crc32_js__WEBPACK_IMPORTED_MODULE_3__.c)(encodedFileName), 4) +\n            // UnicodeName\n            utfEncodedFileName;\n\n        extraFields +=\n            // Info-ZIP Unicode Path Extra Field\n            \"\\x75\\x70\" +\n            // size\n            decToHex(unicodePathExtraField.length, 2) +\n            // content\n            unicodePathExtraField;\n    }\n\n    if(useUTF8ForComment) {\n\n        unicodeCommentExtraField =\n            // Version\n            decToHex(1, 1) +\n            // CommentCRC32\n            decToHex((0,_crc32_js__WEBPACK_IMPORTED_MODULE_3__.c)(encodedComment), 4) +\n            // UnicodeName\n            utfEncodedComment;\n\n        extraFields +=\n            // Info-ZIP Unicode Path Extra Field\n            \"\\x75\\x63\" +\n            // size\n            decToHex(unicodeCommentExtraField.length, 2) +\n            // content\n            unicodeCommentExtraField;\n    }\n\n    var header = \"\";\n\n    // version needed to extract\n    header += \"\\x0A\\x00\";\n    // general purpose bit flag\n    header += decToHex(bitflag, 2);\n    // compression method\n    header += compression.magic;\n    // last mod file time\n    header += decToHex(dosTime, 2);\n    // last mod file date\n    header += decToHex(dosDate, 2);\n    // crc-32\n    header += decToHex(dataInfo.crc32, 4);\n    // compressed size\n    header += decToHex(dataInfo.compressedSize, 4);\n    // uncompressed size\n    header += decToHex(dataInfo.uncompressedSize, 4);\n    // file name length\n    header += decToHex(encodedFileName.length, 2);\n    // extra field length\n    header += decToHex(extraFields.length, 2);\n\n\n    var fileRecord = _signature_js__WEBPACK_IMPORTED_MODULE_4__.s.LOCAL_FILE_HEADER + header + encodedFileName + extraFields;\n\n    var dirRecord = _signature_js__WEBPACK_IMPORTED_MODULE_4__.s.CENTRAL_FILE_HEADER +\n        // version made by (00: DOS)\n        decToHex(versionMadeBy, 2) +\n        // file header (common to file and central directory)\n        header +\n        // file comment length\n        decToHex(encodedComment.length, 2) +\n        // disk number start\n        \"\\x00\\x00\" +\n        // internal file attributes TODO\n        \"\\x00\\x00\" +\n        // external file attributes\n        decToHex(extFileAttr, 4) +\n        // relative offset of local header\n        decToHex(offset, 4) +\n        // file name\n        encodedFileName +\n        // extra field\n        extraFields +\n        // file comment\n        encodedComment;\n\n    return {\n        fileRecord: fileRecord,\n        dirRecord: dirRecord\n    };\n};\n\n/**\n * Generate the EOCD record.\n * @param {Number} entriesCount the number of entries in the zip file.\n * @param {Number} centralDirLength the length (in bytes) of the central dir.\n * @param {Number} localDirLength the length (in bytes) of the local dir.\n * @param {String} comment the zip file comment as a binary string.\n * @param {Function} encodeFileName the function to encode the comment.\n * @return {String} the EOCD record.\n */\nvar generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) {\n    var dirEnd = \"\";\n    var encodedComment = _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.transformTo(\"string\", encodeFileName(comment));\n\n    // end of central dir signature\n    dirEnd = _signature_js__WEBPACK_IMPORTED_MODULE_4__.s.CENTRAL_DIRECTORY_END +\n        // number of this disk\n        \"\\x00\\x00\" +\n        // number of the disk with the start of the central directory\n        \"\\x00\\x00\" +\n        // total number of entries in the central directory on this disk\n        decToHex(entriesCount, 2) +\n        // total number of entries in the central directory\n        decToHex(entriesCount, 2) +\n        // size of the central directory   4 bytes\n        decToHex(centralDirLength, 4) +\n        // offset of start of central directory with respect to the starting disk number\n        decToHex(localDirLength, 4) +\n        // .ZIP file comment length\n        decToHex(encodedComment.length, 2) +\n        // .ZIP file comment\n        encodedComment;\n\n    return dirEnd;\n};\n\n/**\n * Generate data descriptors for a file entry.\n * @param {Object} streamInfo the hash generated by a worker, containing informations\n * on the file entry.\n * @return {String} the data descriptors.\n */\nvar generateDataDescriptors = function (streamInfo) {\n    var descriptor = \"\";\n    descriptor = _signature_js__WEBPACK_IMPORTED_MODULE_4__.s.DATA_DESCRIPTOR +\n        // crc-32                          4 bytes\n        decToHex(streamInfo['crc32'], 4) +\n        // compressed size                 4 bytes\n        decToHex(streamInfo['compressedSize'], 4) +\n        // uncompressed size               4 bytes\n        decToHex(streamInfo['uncompressedSize'], 4);\n\n    return descriptor;\n};\n\n\n/**\n * A worker to concatenate other workers to create a zip file.\n * @param {Boolean} streamFiles `true` to stream the content of the files,\n * `false` to accumulate it.\n * @param {String} comment the comment to use.\n * @param {String} platform the platform to use, \"UNIX\" or \"DOS\".\n * @param {Function} encodeFileName the function to encode file names and comments.\n */\nfunction ZipFileWorker(streamFiles, comment, platform, encodeFileName) {\n    _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.call(this, \"ZipFileWorker\");\n    // The number of bytes written so far. This doesn't count accumulated chunks.\n    this.bytesWritten = 0;\n    // The comment of the zip file\n    this.zipComment = comment;\n    // The platform \"generating\" the zip file.\n    this.zipPlatform = platform;\n    // the function to encode file names and comments.\n    this.encodeFileName = encodeFileName;\n    // Should we stream the content of the files ?\n    this.streamFiles = streamFiles;\n    // If `streamFiles` is false, we will need to accumulate the content of the\n    // files to calculate sizes / crc32 (and write them *before* the content).\n    // This boolean indicates if we are accumulating chunks (it will change a lot\n    // during the lifetime of this worker).\n    this.accumulate = false;\n    // The buffer receiving chunks when accumulating content.\n    this.contentBuffer = [];\n    // The list of generated directory records.\n    this.dirRecords = [];\n    // The offset (in bytes) from the beginning of the zip file for the current source.\n    this.currentSourceOffset = 0;\n    // The total number of entries in this zip file.\n    this.entriesCount = 0;\n    // the name of the file currently being added, null when handling the end of the zip file.\n    // Used for the emited metadata.\n    this.currentFile = null;\n\n\n\n    this._sources = [];\n}\n_utils_js__WEBPACK_IMPORTED_MODULE_0__.u.inherits(ZipFileWorker, _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G);\n\n/**\n * @see GenericWorker.push\n */\nZipFileWorker.prototype.push = function (chunk) {\n\n    var currentFilePercent = chunk.meta.percent || 0;\n    var entriesCount = this.entriesCount;\n    var remainingFiles = this._sources.length;\n\n    if(this.accumulate) {\n        this.contentBuffer.push(chunk);\n    } else {\n        this.bytesWritten += chunk.data.length;\n\n        _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.prototype.push.call(this, {\n            data : chunk.data,\n            meta : {\n                currentFile : this.currentFile,\n                percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100\n            }\n        });\n    }\n};\n\n/**\n * The worker started a new source (an other worker).\n * @param {Object} streamInfo the streamInfo object from the new source.\n */\nZipFileWorker.prototype.openedSource = function (streamInfo) {\n    this.currentSourceOffset = this.bytesWritten;\n    this.currentFile = streamInfo['file'].name;\n\n    var streamedContent = this.streamFiles && !streamInfo['file'].dir;\n\n    // don't stream folders (because they don't have any content)\n    if(streamedContent) {\n        var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);\n        this.push({\n            data : record.fileRecord,\n            meta : {percent:0}\n        });\n    } else {\n        // we need to wait for the whole file before pushing anything\n        this.accumulate = true;\n    }\n};\n\n/**\n * The worker finished a source (an other worker).\n * @param {Object} streamInfo the streamInfo object from the finished source.\n */\nZipFileWorker.prototype.closedSource = function (streamInfo) {\n    this.accumulate = false;\n    var streamedContent = this.streamFiles && !streamInfo['file'].dir;\n    var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);\n\n    this.dirRecords.push(record.dirRecord);\n    if(streamedContent) {\n        // after the streamed file, we put data descriptors\n        this.push({\n            data : generateDataDescriptors(streamInfo),\n            meta : {percent:100}\n        });\n    } else {\n        // the content wasn't streamed, we need to push everything now\n        // first the file record, then the content\n        this.push({\n            data : record.fileRecord,\n            meta : {percent:0}\n        });\n        while(this.contentBuffer.length) {\n            this.push(this.contentBuffer.shift());\n        }\n    }\n    this.currentFile = null;\n};\n\n/**\n * @see GenericWorker.flush\n */\nZipFileWorker.prototype.flush = function () {\n\n    var localDirLength = this.bytesWritten;\n    for(var i = 0; i < this.dirRecords.length; i++) {\n        this.push({\n            data : this.dirRecords[i],\n            meta : {percent:100}\n        });\n    }\n    var centralDirLength = this.bytesWritten - localDirLength;\n\n    var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName);\n\n    this.push({\n        data : dirEnd,\n        meta : {percent:100}\n    });\n};\n\n/**\n * Prepare the next source to be read.\n */\nZipFileWorker.prototype.prepareNextSource = function () {\n    this.previous = this._sources.shift();\n    this.openedSource(this.previous.streamInfo);\n    if (this.isPaused) {\n        this.previous.pause();\n    } else {\n        this.previous.resume();\n    }\n};\n\n/**\n * @see GenericWorker.registerPrevious\n */\nZipFileWorker.prototype.registerPrevious = function (previous) {\n    this._sources.push(previous);\n    var self = this;\n\n    previous.on('data', function (chunk) {\n        self.processChunk(chunk);\n    });\n    previous.on('end', function () {\n        self.closedSource(self.previous.streamInfo);\n        if(self._sources.length) {\n            self.prepareNextSource();\n        } else {\n            self.end();\n        }\n    });\n    previous.on('error', function (e) {\n        self.error(e);\n    });\n    return this;\n};\n\n/**\n * @see GenericWorker.resume\n */\nZipFileWorker.prototype.resume = function () {\n    if(!_stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.prototype.resume.call(this)) {\n        return false;\n    }\n\n    if (!this.previous && this._sources.length) {\n        this.prepareNextSource();\n        return true;\n    }\n    if (!this.previous && !this._sources.length && !this.generatedError) {\n        this.end();\n        return true;\n    }\n};\n\n/**\n * @see GenericWorker.error\n */\nZipFileWorker.prototype.error = function (e) {\n    var sources = this._sources;\n    if(!_stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.prototype.error.call(this, e)) {\n        return false;\n    }\n    for(var i = 0; i < sources.length; i++) {\n        try {\n            sources[i].error(e);\n        } catch(e) {\n            // the `error` exploded, nothing to do\n        }\n    }\n    return true;\n};\n\n/**\n * @see GenericWorker.lock\n */\nZipFileWorker.prototype.lock = function () {\n    _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.prototype.lock.call(this);\n    var sources = this._sources;\n    for(var i = 0; i < sources.length; i++) {\n        sources[i].lock();\n    }\n};\n\nvar ZipFileWorker_1 = ZipFileWorker;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/generate/ZipFileWorker.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/generate/index.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/generate/index.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"g\": () => (/* binding */ generate)\n/* harmony export */ });\n/* harmony import */ var _compressions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../compressions.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/compressions.js\");\n/* harmony import */ var _ZipFileWorker_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ZipFileWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/generate/ZipFileWorker.js\");\n\n\n\n/**\n * Find the compression to use.\n * @param {String} fileCompression the compression defined at the file level, if any.\n * @param {String} zipCompression the compression defined at the load() level.\n * @return {Object} the compression object to use.\n */\nvar getCompression = function (fileCompression, zipCompression) {\n\n    var compressionName = fileCompression || zipCompression;\n    var compression = _compressions_js__WEBPACK_IMPORTED_MODULE_0__.c[compressionName];\n    if (!compression) {\n        throw new Error(compressionName + \" is not a valid compression method !\");\n    }\n    return compression;\n};\n\n/**\n * Create a worker to generate a zip file.\n * @param {JSZip} zip the JSZip instance at the right root level.\n * @param {Object} options to generate the zip file.\n * @param {String} comment the comment to use.\n */\nvar generateWorker = function (zip, options, comment) {\n\n    var zipFileWorker = new _ZipFileWorker_js__WEBPACK_IMPORTED_MODULE_1__.Z(options.streamFiles, comment, options.platform, options.encodeFileName);\n    var entriesCount = 0;\n    try {\n\n        zip.forEach(function (relativePath, file) {\n            entriesCount++;\n            var compression = getCompression(file.options.compression, options.compression);\n            var compressionOptions = file.options.compressionOptions || options.compressionOptions || {};\n            var dir = file.dir, date = file.date;\n\n            file._compressWorker(compression, compressionOptions)\n            .withStreamInfo(\"file\", {\n                name : relativePath,\n                dir : dir,\n                date : date,\n                comment : file.comment || \"\",\n                unixPermissions : file.unixPermissions,\n                dosPermissions : file.dosPermissions\n            })\n            .pipe(zipFileWorker);\n        });\n        zipFileWorker.entriesCount = entriesCount;\n    } catch (e) {\n        zipFileWorker.error(e);\n    }\n\n    return zipFileWorker;\n};\n\nvar generate = {\n\tgenerateWorker: generateWorker\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/generate/index.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/index.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/index.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"l\": () => (/* binding */ lib)\n/* harmony export */ });\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./object.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/object.js\");\n/* harmony import */ var _load_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./load.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/load.js\");\n/* harmony import */ var _support_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./support.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/support.js\");\n/* harmony import */ var _defaults_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaults.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/defaults.js\");\n/* harmony import */ var _external_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./external.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/external.js\");\n\n\n\n\n\n\n/**\n * Representation a of zip file in js\n * @constructor\n */\nfunction JSZip() {\n    // if this constructor is used without `new`, it adds `new` before itself:\n    if(!(this instanceof JSZip)) {\n        return new JSZip();\n    }\n\n    if(arguments.length) {\n        throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n    }\n\n    // object containing the files :\n    // {\n    //   \"folder/\" : {...},\n    //   \"folder/data.txt\" : {...}\n    // }\n    this.files = {};\n\n    this.comment = null;\n\n    // Where we are in the hierarchy\n    this.root = \"\";\n    this.clone = function() {\n        var newObj = new JSZip();\n        for (var i in this) {\n            if (typeof this[i] !== \"function\") {\n                newObj[i] = this[i];\n            }\n        }\n        return newObj;\n    };\n}\nJSZip.prototype = _object_js__WEBPACK_IMPORTED_MODULE_0__.o;\nJSZip.prototype.loadAsync = _load_js__WEBPACK_IMPORTED_MODULE_1__.l;\nJSZip.support = _support_js__WEBPACK_IMPORTED_MODULE_2__.s;\nJSZip.defaults = _defaults_js__WEBPACK_IMPORTED_MODULE_3__.d;\n\n// TODO find a better way to handle this version,\n// a require('package.json').version doesn't work with webpack, see #327\nJSZip.version = \"3.2.0\";\n\nJSZip.loadAsync = function (content, options) {\n    return new JSZip().loadAsync(content, options);\n};\n\nJSZip.external = _external_js__WEBPACK_IMPORTED_MODULE_4__.e;\nvar lib = JSZip;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/index.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/load.js":
/*!***************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/load.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"l\": () => (/* binding */ load)\n/* harmony export */ });\n/* harmony import */ var _external_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./external.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/external.js\");\n/* harmony import */ var _utf8_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utf8.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utf8.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _zipEntries_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./zipEntries.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/zipEntries.js\");\n/* harmony import */ var _stream_Crc32Probe_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stream/Crc32Probe.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/Crc32Probe.js\");\n/* harmony import */ var _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nodejsUtils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejsUtils.js\");\n\n\n\n\n\n\n\n/**\n * Check the CRC32 of an entry.\n * @param {ZipEntry} zipEntry the zip entry to check.\n * @return {Promise} the result.\n */\nfunction checkEntryCRC32(zipEntry) {\n    return new _external_js__WEBPACK_IMPORTED_MODULE_0__.e.Promise(function (resolve, reject) {\n        var worker = zipEntry.decompressed.getContentWorker().pipe(new _stream_Crc32Probe_js__WEBPACK_IMPORTED_MODULE_4__.C());\n        worker.on(\"error\", function (e) {\n            reject(e);\n        })\n        .on(\"end\", function () {\n            if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) {\n                reject(new Error(\"Corrupted zip : CRC32 mismatch\"));\n            } else {\n                resolve();\n            }\n        })\n        .resume();\n    });\n}\n\nvar load = function(data, options) {\n    var zip = this;\n    options = _utils_js__WEBPACK_IMPORTED_MODULE_2__.u.extend(options || {}, {\n        base64: false,\n        checkCRC32: false,\n        optimizedBinaryString: false,\n        createFolders: false,\n        decodeFileName: _utf8_js__WEBPACK_IMPORTED_MODULE_1__.u.utf8decode\n    });\n\n    if (_nodejsUtils_js__WEBPACK_IMPORTED_MODULE_5__.n.isNode && _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_5__.n.isStream(data)) {\n        return _external_js__WEBPACK_IMPORTED_MODULE_0__.e.Promise.reject(new Error(\"JSZip can't accept a stream when loading a zip file.\"));\n    }\n\n    return _utils_js__WEBPACK_IMPORTED_MODULE_2__.u.prepareContent(\"the loaded zip file\", data, true, options.optimizedBinaryString, options.base64)\n    .then(function(data) {\n        var zipEntries$1 = new _zipEntries_js__WEBPACK_IMPORTED_MODULE_3__.z(options);\n        zipEntries$1.load(data);\n        return zipEntries$1;\n    }).then(function checkCRC32(zipEntries) {\n        var promises = [_external_js__WEBPACK_IMPORTED_MODULE_0__.e.Promise.resolve(zipEntries)];\n        var files = zipEntries.files;\n        if (options.checkCRC32) {\n            for (var i = 0; i < files.length; i++) {\n                promises.push(checkEntryCRC32(files[i]));\n            }\n        }\n        return _external_js__WEBPACK_IMPORTED_MODULE_0__.e.Promise.all(promises);\n    }).then(function addFiles(results) {\n        var zipEntries = results.shift();\n        var files = zipEntries.files;\n        for (var i = 0; i < files.length; i++) {\n            var input = files[i];\n            zip.file(input.fileNameStr, input.decompressed, {\n                binary: true,\n                optimizedBinaryString: true,\n                date: input.date,\n                dir: input.dir,\n                comment : input.fileCommentStr.length ? input.fileCommentStr : null,\n                unixPermissions : input.unixPermissions,\n                dosPermissions : input.dosPermissions,\n                createFolders: options.createFolders\n            });\n        }\n        if (zipEntries.zipComment.length) {\n            zip.comment = zipEntries.zipComment;\n        }\n\n        return zip;\n    });\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/load.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejs/NodejsStreamInputAdapter.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejs/NodejsStreamInputAdapter.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"N\": () => (/* binding */ NodejsStreamInputAdapter_1)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stream/GenericWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js\");\n\n\n\n/**\n * A worker that use a nodejs stream as source.\n * @constructor\n * @param {String} filename the name of the file entry for this stream.\n * @param {Readable} stream the nodejs stream.\n */\nfunction NodejsStreamInputAdapter(filename, stream) {\n    _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.call(this, \"Nodejs stream input adapter for \" + filename);\n    this._upstreamEnded = false;\n    this._bindStream(stream);\n}\n\n_utils_js__WEBPACK_IMPORTED_MODULE_0__.u.inherits(NodejsStreamInputAdapter, _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G);\n\n/**\n * Prepare the stream and bind the callbacks on it.\n * Do this ASAP on node 0.10 ! A lazy binding doesn't always work.\n * @param {Stream} stream the nodejs stream to use.\n */\nNodejsStreamInputAdapter.prototype._bindStream = function (stream) {\n    var self = this;\n    this._stream = stream;\n    stream.pause();\n    stream\n    .on(\"data\", function (chunk) {\n        self.push({\n            data: chunk,\n            meta : {\n                percent : 0\n            }\n        });\n    })\n    .on(\"error\", function (e) {\n        if(self.isPaused) {\n            this.generatedError = e;\n        } else {\n            self.error(e);\n        }\n    })\n    .on(\"end\", function () {\n        if(self.isPaused) {\n            self._upstreamEnded = true;\n        } else {\n            self.end();\n        }\n    });\n};\nNodejsStreamInputAdapter.prototype.pause = function () {\n    if(!_stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.prototype.pause.call(this)) {\n        return false;\n    }\n    this._stream.pause();\n    return true;\n};\nNodejsStreamInputAdapter.prototype.resume = function () {\n    if(!_stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.prototype.resume.call(this)) {\n        return false;\n    }\n\n    if(this._upstreamEnded) {\n        this.end();\n    } else {\n        this._stream.resume();\n    }\n\n    return true;\n};\n\nvar NodejsStreamInputAdapter_1 = NodejsStreamInputAdapter;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejs/NodejsStreamInputAdapter.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejs/NodejsStreamOutputAdapter.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejs/NodejsStreamOutputAdapter.js ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"N\": () => (/* binding */ NodejsStreamOutputAdapter_1)\n/* harmony export */ });\n/* harmony import */ var _readable_stream_browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../readable-stream-browser.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/readable-stream-browser.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n\n\n\nvar Readable = _readable_stream_browser_js__WEBPACK_IMPORTED_MODULE_0__.r.Readable;\n\n\n_utils_js__WEBPACK_IMPORTED_MODULE_1__.u.inherits(NodejsStreamOutputAdapter, Readable);\n\n/**\n* A nodejs stream using a worker as source.\n* @see the SourceWrapper in http://nodejs.org/api/stream.html\n* @constructor\n* @param {StreamHelper} helper the helper wrapping the worker\n* @param {Object} options the nodejs stream options\n* @param {Function} updateCb the update callback.\n*/\nfunction NodejsStreamOutputAdapter(helper, options, updateCb) {\n    Readable.call(this, options);\n    this._helper = helper;\n\n    var self = this;\n    helper.on(\"data\", function (data, meta) {\n        if (!self.push(data)) {\n            self._helper.pause();\n        }\n        if(updateCb) {\n            updateCb(meta);\n        }\n    })\n    .on(\"error\", function(e) {\n        self.emit('error', e);\n    })\n    .on(\"end\", function () {\n        self.push(null);\n    });\n}\n\n\nNodejsStreamOutputAdapter.prototype._read = function() {\n    this._helper.resume();\n};\n\nvar NodejsStreamOutputAdapter_1 = NodejsStreamOutputAdapter;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejs/NodejsStreamOutputAdapter.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejsUtils.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejsUtils.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"n\": () => (/* binding */ nodejsUtils)\n/* harmony export */ });\n/* harmony import */ var _virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/polyfill-node_buffer.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node_buffer.js\");\n\n\nvar nodejsUtils = {\n    /**\n     * True if this is running in Nodejs, will be undefined in a browser.\n     * In a browser, browserify won't include this file and the whole module\n     * will be resolved an empty object.\n     */\n    isNode : typeof _virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B !== \"undefined\",\n    /**\n     * Create a new nodejs Buffer from an existing content.\n     * @param {Object} data the data to pass to the constructor.\n     * @param {String} encoding the encoding to use.\n     * @return {Buffer} a new Buffer.\n     */\n    newBufferFrom: function(data, encoding) {\n        if (_virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B.from && _virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B.from !== Uint8Array.from) {\n            return _virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B.from(data, encoding);\n        } else {\n            if (typeof data === \"number\") {\n                // Safeguard for old Node.js versions. On newer versions,\n                // Buffer.from(number) / Buffer(number, encoding) already throw.\n                throw new Error(\"The \\\"data\\\" argument must not be a number\");\n            }\n            return new _virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B(data, encoding);\n        }\n    },\n    /**\n     * Create a new nodejs Buffer with the specified size.\n     * @param {Integer} size the size of the buffer.\n     * @return {Buffer} a new Buffer.\n     */\n    allocBuffer: function (size) {\n        if (_virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B.alloc) {\n            return _virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B.alloc(size);\n        } else {\n            var buf = new _virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B(size);\n            buf.fill(0);\n            return buf;\n        }\n    },\n    /**\n     * Find out if an object is a Buffer.\n     * @param {Object} b the object to test.\n     * @return {Boolean} true if the object is a Buffer, false otherwise.\n     */\n    isBuffer : function(b){\n        return _virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B.isBuffer(b);\n    },\n\n    isStream : function (obj) {\n        return obj &&\n            typeof obj.on === \"function\" &&\n            typeof obj.pause === \"function\" &&\n            typeof obj.resume === \"function\";\n    }\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejsUtils.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/object.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/object.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"o\": () => (/* binding */ object)\n/* harmony export */ });\n/* harmony import */ var _utf8_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utf8.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utf8.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stream/GenericWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js\");\n/* harmony import */ var _stream_StreamHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream/StreamHelper.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/StreamHelper.js\");\n/* harmony import */ var _defaults_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaults.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/defaults.js\");\n/* harmony import */ var _compressedObject_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./compressedObject.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/compressedObject.js\");\n/* harmony import */ var _zipObject_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./zipObject.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/zipObject.js\");\n/* harmony import */ var _generate_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./generate/index.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/generate/index.js\");\n/* harmony import */ var _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./nodejsUtils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejsUtils.js\");\n/* harmony import */ var _nodejs_NodejsStreamInputAdapter_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./nodejs/NodejsStreamInputAdapter.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejs/NodejsStreamInputAdapter.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Add a file in the current folder.\n * @private\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file\n * @param {Object} originalOptions the options of the file\n * @return {Object} the new file.\n */\nvar fileAdd = function(name, data, originalOptions) {\n    // be sure sub folders exist\n    var dataType = _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.getTypeOf(data),\n        parent;\n\n\n    /*\n     * Correct options.\n     */\n\n    var o = _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.extend(originalOptions || {}, _defaults_js__WEBPACK_IMPORTED_MODULE_4__.d);\n    o.date = o.date || new Date();\n    if (o.compression !== null) {\n        o.compression = o.compression.toUpperCase();\n    }\n\n    if (typeof o.unixPermissions === \"string\") {\n        o.unixPermissions = parseInt(o.unixPermissions, 8);\n    }\n\n    // UNX_IFDIR  0040000 see zipinfo.c\n    if (o.unixPermissions && (o.unixPermissions & 0x4000)) {\n        o.dir = true;\n    }\n    // Bit 4    Directory\n    if (o.dosPermissions && (o.dosPermissions & 0x0010)) {\n        o.dir = true;\n    }\n\n    if (o.dir) {\n        name = forceTrailingSlash(name);\n    }\n    if (o.createFolders && (parent = parentFolder(name))) {\n        folderAdd.call(this, parent, true);\n    }\n\n    var isUnicodeString = dataType === \"string\" && o.binary === false && o.base64 === false;\n    if (!originalOptions || typeof originalOptions.binary === \"undefined\") {\n        o.binary = !isUnicodeString;\n    }\n\n\n    var isCompressedEmpty = (data instanceof _compressedObject_js__WEBPACK_IMPORTED_MODULE_5__.c) && data.uncompressedSize === 0;\n\n    if (isCompressedEmpty || o.dir || !data || data.length === 0) {\n        o.base64 = false;\n        o.binary = true;\n        data = \"\";\n        o.compression = \"STORE\";\n        dataType = \"string\";\n    }\n\n    /*\n     * Convert content to fit.\n     */\n\n    var zipObjectContent = null;\n    if (data instanceof _compressedObject_js__WEBPACK_IMPORTED_MODULE_5__.c || data instanceof _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_2__.G) {\n        zipObjectContent = data;\n    } else if (_nodejsUtils_js__WEBPACK_IMPORTED_MODULE_8__.n.isNode && _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_8__.n.isStream(data)) {\n        zipObjectContent = new _nodejs_NodejsStreamInputAdapter_js__WEBPACK_IMPORTED_MODULE_9__.N(name, data);\n    } else {\n        zipObjectContent = _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);\n    }\n\n    var object = new _zipObject_js__WEBPACK_IMPORTED_MODULE_6__.z(name, zipObjectContent, o);\n    this.files[name] = object;\n    /*\n    TODO: we can't throw an exception because we have async promises\n    (we can have a promise of a Date() for example) but returning a\n    promise is useless because file(name, data) returns the JSZip\n    object for chaining. Should we break that to allow the user\n    to catch the error ?\n\n    return external.Promise.resolve(zipObjectContent)\n    .then(function () {\n        return object;\n    });\n    */\n};\n\n/**\n * Find the parent folder of the path.\n * @private\n * @param {string} path the path to use\n * @return {string} the parent folder, or \"\"\n */\nvar parentFolder = function (path) {\n    if (path.slice(-1) === '/') {\n        path = path.substring(0, path.length - 1);\n    }\n    var lastSlash = path.lastIndexOf('/');\n    return (lastSlash > 0) ? path.substring(0, lastSlash) : \"\";\n};\n\n/**\n * Returns the path with a slash at the end.\n * @private\n * @param {String} path the path to check.\n * @return {String} the path with a trailing slash.\n */\nvar forceTrailingSlash = function(path) {\n    // Check the name ends with a /\n    if (path.slice(-1) !== \"/\") {\n        path += \"/\"; // IE doesn't like substr(-1)\n    }\n    return path;\n};\n\n/**\n * Add a (sub) folder in the current folder.\n * @private\n * @param {string} name the folder's name\n * @param {boolean=} [createFolders] If true, automatically create sub\n *  folders. Defaults to false.\n * @return {Object} the new folder.\n */\nvar folderAdd = function(name, createFolders) {\n    createFolders = (typeof createFolders !== 'undefined') ? createFolders : _defaults_js__WEBPACK_IMPORTED_MODULE_4__.d.createFolders;\n\n    name = forceTrailingSlash(name);\n\n    // Does this folder already exist?\n    if (!this.files[name]) {\n        fileAdd.call(this, name, null, {\n            dir: true,\n            createFolders: createFolders\n        });\n    }\n    return this.files[name];\n};\n\n/**\n* Cross-window, cross-Node-context regular expression detection\n* @param  {Object}  object Anything\n* @return {Boolean}        true if the object is a regular expression,\n* false otherwise\n*/\nfunction isRegExp(object) {\n    return Object.prototype.toString.call(object) === \"[object RegExp]\";\n}\n\n// return the actual prototype of JSZip\nvar out = {\n    /**\n     * @see loadAsync\n     */\n    load: function() {\n        throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n    },\n\n\n    /**\n     * Call a callback function for each entry at this folder level.\n     * @param {Function} cb the callback function:\n     * function (relativePath, file) {...}\n     * It takes 2 arguments : the relative path and the file.\n     */\n    forEach: function(cb) {\n        var filename, relativePath, file;\n        for (filename in this.files) {\n            if (!this.files.hasOwnProperty(filename)) {\n                continue;\n            }\n            file = this.files[filename];\n            relativePath = filename.slice(this.root.length, filename.length);\n            if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root\n                cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...\n            }\n        }\n    },\n\n    /**\n     * Filter nested files/folders with the specified function.\n     * @param {Function} search the predicate to use :\n     * function (relativePath, file) {...}\n     * It takes 2 arguments : the relative path and the file.\n     * @return {Array} An array of matching elements.\n     */\n    filter: function(search) {\n        var result = [];\n        this.forEach(function (relativePath, entry) {\n            if (search(relativePath, entry)) { // the file matches the function\n                result.push(entry);\n            }\n\n        });\n        return result;\n    },\n\n    /**\n     * Add a file to the zip file, or search a file.\n     * @param   {string|RegExp} name The name of the file to add (if data is defined),\n     * the name of the file to find (if no data) or a regex to match files.\n     * @param   {String|ArrayBuffer|Uint8Array|Buffer} data  The file data, either raw or base64 encoded\n     * @param   {Object} o     File options\n     * @return  {JSZip|Object|Array} this JSZip object (when adding a file),\n     * a file (when searching by string) or an array of files (when searching by regex).\n     */\n    file: function(name, data, o) {\n        if (arguments.length === 1) {\n            if (isRegExp(name)) {\n                var regexp = name;\n                return this.filter(function(relativePath, file) {\n                    return !file.dir && regexp.test(relativePath);\n                });\n            }\n            else { // text\n                var obj = this.files[this.root + name];\n                if (obj && !obj.dir) {\n                    return obj;\n                } else {\n                    return null;\n                }\n            }\n        }\n        else { // more than one argument : we have data !\n            name = this.root + name;\n            fileAdd.call(this, name, data, o);\n        }\n        return this;\n    },\n\n    /**\n     * Add a directory to the zip file, or search.\n     * @param   {String|RegExp} arg The name of the directory to add, or a regex to search folders.\n     * @return  {JSZip} an object with the new directory as the root, or an array containing matching folders.\n     */\n    folder: function(arg) {\n        if (!arg) {\n            return this;\n        }\n\n        if (isRegExp(arg)) {\n            return this.filter(function(relativePath, file) {\n                return file.dir && arg.test(relativePath);\n            });\n        }\n\n        // else, name is a new folder\n        var name = this.root + arg;\n        var newFolder = folderAdd.call(this, name);\n\n        // Allow chaining by returning a new object with this folder as the root\n        var ret = this.clone();\n        ret.root = newFolder.name;\n        return ret;\n    },\n\n    /**\n     * Delete a file, or a directory and all sub-files, from the zip\n     * @param {string} name the name of the file to delete\n     * @return {JSZip} this JSZip object\n     */\n    remove: function(name) {\n        name = this.root + name;\n        var file = this.files[name];\n        if (!file) {\n            // Look for any folders\n            if (name.slice(-1) !== \"/\") {\n                name += \"/\";\n            }\n            file = this.files[name];\n        }\n\n        if (file && !file.dir) {\n            // file\n            delete this.files[name];\n        } else {\n            // maybe a folder, delete recursively\n            var kids = this.filter(function(relativePath, file) {\n                return file.name.slice(0, name.length) === name;\n            });\n            for (var i = 0; i < kids.length; i++) {\n                delete this.files[kids[i].name];\n            }\n        }\n\n        return this;\n    },\n\n    /**\n     * Generate the complete zip file\n     * @param {Object} options the options to generate the zip file :\n     * - compression, \"STORE\" by default.\n     * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n     * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file\n     */\n    generate: function(options) {\n        throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n    },\n\n    /**\n     * Generate the complete zip file as an internal stream.\n     * @param {Object} options the options to generate the zip file :\n     * - compression, \"STORE\" by default.\n     * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n     * @return {StreamHelper} the streamed zip file.\n     */\n    generateInternalStream: function(options) {\n      var worker, opts = {};\n      try {\n          opts = _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.extend(options || {}, {\n              streamFiles: false,\n              compression: \"STORE\",\n              compressionOptions : null,\n              type: \"\",\n              platform: \"DOS\",\n              comment: null,\n              mimeType: 'application/zip',\n              encodeFileName: _utf8_js__WEBPACK_IMPORTED_MODULE_0__.u.utf8encode\n          });\n\n          opts.type = opts.type.toLowerCase();\n          opts.compression = opts.compression.toUpperCase();\n\n          // \"binarystring\" is prefered but the internals use \"string\".\n          if(opts.type === \"binarystring\") {\n            opts.type = \"string\";\n          }\n\n          if (!opts.type) {\n            throw new Error(\"No output type specified.\");\n          }\n\n          _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.checkSupport(opts.type);\n\n          // accept nodejs `process.platform`\n          if(\n              opts.platform === 'darwin' ||\n              opts.platform === 'freebsd' ||\n              opts.platform === 'linux' ||\n              opts.platform === 'sunos'\n          ) {\n              opts.platform = \"UNIX\";\n          }\n          if (opts.platform === 'win32') {\n              opts.platform = \"DOS\";\n          }\n\n          var comment = opts.comment || this.comment || \"\";\n          worker = _generate_index_js__WEBPACK_IMPORTED_MODULE_7__.g.generateWorker(this, opts, comment);\n      } catch (e) {\n        worker = new _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_2__.G(\"error\");\n        worker.error(e);\n      }\n      return new _stream_StreamHelper_js__WEBPACK_IMPORTED_MODULE_3__.S(worker, opts.type || \"string\", opts.mimeType);\n    },\n    /**\n     * Generate the complete zip file asynchronously.\n     * @see generateInternalStream\n     */\n    generateAsync: function(options, onUpdate) {\n        return this.generateInternalStream(options).accumulate(onUpdate);\n    },\n    /**\n     * Generate the complete zip file asynchronously.\n     * @see generateInternalStream\n     */\n    generateNodeStream: function(options, onUpdate) {\n        options = options || {};\n        if (!options.type) {\n            options.type = \"nodebuffer\";\n        }\n        return this.generateInternalStream(options).toNodejsStream(onUpdate);\n    }\n};\nvar object = out;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/object.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/readable-stream-browser.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/readable-stream-browser.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"r\": () => (/* binding */ readableStreamBrowser)\n/* harmony export */ });\n/* harmony import */ var _virtual_polyfill_node_stream_js_commonjs_proxy_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/_polyfill-node_stream.js_commonjs-proxy.js */ \"./node_modules/@kitware/vtk.js/_virtual/_polyfill-node_stream.js_commonjs-proxy.js\");\n\n\n/*\n * This file is used by module bundlers (browserify/webpack/etc) when\n * including a stream implementation. We use \"readable-stream\" to get a\n * consistent behavior between nodejs versions but bundlers often have a shim\n * for \"stream\". Using this shim greatly improve the compatibility and greatly\n * reduce the final size of the bundle (only one stream implementation, not\n * two).\n */\n\nvar readableStreamBrowser = _virtual_polyfill_node_stream_js_commonjs_proxy_js__WEBPACK_IMPORTED_MODULE_0__.r;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/readable-stream-browser.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/ArrayReader.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/ArrayReader.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"A\": () => (/* binding */ ArrayReader_1)\n/* harmony export */ });\n/* harmony import */ var _DataReader_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DataReader.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/DataReader.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n\n\n\nfunction ArrayReader(data) {\n    _DataReader_js__WEBPACK_IMPORTED_MODULE_0__.D.call(this, data);\n\tfor(var i = 0; i < this.data.length; i++) {\n\t\tdata[i] = data[i] & 0xFF;\n\t}\n}\n_utils_js__WEBPACK_IMPORTED_MODULE_1__.u.inherits(ArrayReader, _DataReader_js__WEBPACK_IMPORTED_MODULE_0__.D);\n/**\n * @see DataReader.byteAt\n */\nArrayReader.prototype.byteAt = function(i) {\n    return this.data[this.zero + i];\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nArrayReader.prototype.lastIndexOfSignature = function(sig) {\n    var sig0 = sig.charCodeAt(0),\n        sig1 = sig.charCodeAt(1),\n        sig2 = sig.charCodeAt(2),\n        sig3 = sig.charCodeAt(3);\n    for (var i = this.length - 4; i >= 0; --i) {\n        if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {\n            return i - this.zero;\n        }\n    }\n\n    return -1;\n};\n/**\n * @see DataReader.readAndCheckSignature\n */\nArrayReader.prototype.readAndCheckSignature = function (sig) {\n    var sig0 = sig.charCodeAt(0),\n        sig1 = sig.charCodeAt(1),\n        sig2 = sig.charCodeAt(2),\n        sig3 = sig.charCodeAt(3),\n        data = this.readData(4);\n    return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3];\n};\n/**\n * @see DataReader.readData\n */\nArrayReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    if(size === 0) {\n        return [];\n    }\n    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nvar ArrayReader_1 = ArrayReader;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/ArrayReader.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/DataReader.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/DataReader.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"D\": () => (/* binding */ DataReader_1)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n\n\nfunction DataReader(data) {\n    this.data = data; // type : see implementation\n    this.length = data.length;\n    this.index = 0;\n    this.zero = 0;\n}\nDataReader.prototype = {\n    /**\n     * Check that the offset will not go too far.\n     * @param {string} offset the additional offset to check.\n     * @throws {Error} an Error if the offset is out of bounds.\n     */\n    checkOffset: function(offset) {\n        this.checkIndex(this.index + offset);\n    },\n    /**\n     * Check that the specified index will not be too far.\n     * @param {string} newIndex the index to check.\n     * @throws {Error} an Error if the index is out of bounds.\n     */\n    checkIndex: function(newIndex) {\n        if (this.length < this.zero + newIndex || newIndex < 0) {\n            throw new Error(\"End of data reached (data length = \" + this.length + \", asked index = \" + (newIndex) + \"). Corrupted zip ?\");\n        }\n    },\n    /**\n     * Change the index.\n     * @param {number} newIndex The new index.\n     * @throws {Error} if the new index is out of the data.\n     */\n    setIndex: function(newIndex) {\n        this.checkIndex(newIndex);\n        this.index = newIndex;\n    },\n    /**\n     * Skip the next n bytes.\n     * @param {number} n the number of bytes to skip.\n     * @throws {Error} if the new index is out of the data.\n     */\n    skip: function(n) {\n        this.setIndex(this.index + n);\n    },\n    /**\n     * Get the byte at the specified index.\n     * @param {number} i the index to use.\n     * @return {number} a byte.\n     */\n    byteAt: function(i) {\n        // see implementations\n    },\n    /**\n     * Get the next number with a given byte size.\n     * @param {number} size the number of bytes to read.\n     * @return {number} the corresponding number.\n     */\n    readInt: function(size) {\n        var result = 0,\n            i;\n        this.checkOffset(size);\n        for (i = this.index + size - 1; i >= this.index; i--) {\n            result = (result << 8) + this.byteAt(i);\n        }\n        this.index += size;\n        return result;\n    },\n    /**\n     * Get the next string with a given byte size.\n     * @param {number} size the number of bytes to read.\n     * @return {string} the corresponding string.\n     */\n    readString: function(size) {\n        return _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.transformTo(\"string\", this.readData(size));\n    },\n    /**\n     * Get raw data without conversion, <size> bytes.\n     * @param {number} size the number of bytes to read.\n     * @return {Object} the raw data, implementation specific.\n     */\n    readData: function(size) {\n        // see implementations\n    },\n    /**\n     * Find the last occurence of a zip signature (4 bytes).\n     * @param {string} sig the signature to find.\n     * @return {number} the index of the last occurence, -1 if not found.\n     */\n    lastIndexOfSignature: function(sig) {\n        // see implementations\n    },\n    /**\n     * Read the signature (4 bytes) at the current position and compare it with sig.\n     * @param {string} sig the expected signature\n     * @return {boolean} true if the signature matches, false otherwise.\n     */\n    readAndCheckSignature: function(sig) {\n        // see implementations\n    },\n    /**\n     * Get the next date.\n     * @return {Date} the date.\n     */\n    readDate: function() {\n        var dostime = this.readInt(4);\n        return new Date(Date.UTC(\n        ((dostime >> 25) & 0x7f) + 1980, // year\n        ((dostime >> 21) & 0x0f) - 1, // month\n        (dostime >> 16) & 0x1f, // day\n        (dostime >> 11) & 0x1f, // hour\n        (dostime >> 5) & 0x3f, // minute\n        (dostime & 0x1f) << 1)); // second\n    }\n};\nvar DataReader_1 = DataReader;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/DataReader.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/NodeBufferReader.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/NodeBufferReader.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"N\": () => (/* binding */ NodeBufferReader_1)\n/* harmony export */ });\n/* harmony import */ var _Uint8ArrayReader_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Uint8ArrayReader.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/Uint8ArrayReader.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n\n\n\nfunction NodeBufferReader(data) {\n    _Uint8ArrayReader_js__WEBPACK_IMPORTED_MODULE_0__.U.call(this, data);\n}\n_utils_js__WEBPACK_IMPORTED_MODULE_1__.u.inherits(NodeBufferReader, _Uint8ArrayReader_js__WEBPACK_IMPORTED_MODULE_0__.U);\n\n/**\n * @see DataReader.readData\n */\nNodeBufferReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nvar NodeBufferReader_1 = NodeBufferReader;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/NodeBufferReader.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/StringReader.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/StringReader.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"S\": () => (/* binding */ StringReader_1)\n/* harmony export */ });\n/* harmony import */ var _DataReader_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DataReader.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/DataReader.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n\n\n\nfunction StringReader(data) {\n    _DataReader_js__WEBPACK_IMPORTED_MODULE_0__.D.call(this, data);\n}\n_utils_js__WEBPACK_IMPORTED_MODULE_1__.u.inherits(StringReader, _DataReader_js__WEBPACK_IMPORTED_MODULE_0__.D);\n/**\n * @see DataReader.byteAt\n */\nStringReader.prototype.byteAt = function(i) {\n    return this.data.charCodeAt(this.zero + i);\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nStringReader.prototype.lastIndexOfSignature = function(sig) {\n    return this.data.lastIndexOf(sig) - this.zero;\n};\n/**\n * @see DataReader.readAndCheckSignature\n */\nStringReader.prototype.readAndCheckSignature = function (sig) {\n    var data = this.readData(4);\n    return sig === data;\n};\n/**\n * @see DataReader.readData\n */\nStringReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    // this will work because the constructor applied the \"& 0xff\" mask.\n    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nvar StringReader_1 = StringReader;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/StringReader.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/Uint8ArrayReader.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/Uint8ArrayReader.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"U\": () => (/* binding */ Uint8ArrayReader_1)\n/* harmony export */ });\n/* harmony import */ var _ArrayReader_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ArrayReader.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/ArrayReader.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n\n\n\nfunction Uint8ArrayReader(data) {\n    _ArrayReader_js__WEBPACK_IMPORTED_MODULE_0__.A.call(this, data);\n}\n_utils_js__WEBPACK_IMPORTED_MODULE_1__.u.inherits(Uint8ArrayReader, _ArrayReader_js__WEBPACK_IMPORTED_MODULE_0__.A);\n/**\n * @see DataReader.readData\n */\nUint8ArrayReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    if(size === 0) {\n        // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].\n        return new Uint8Array(0);\n    }\n    var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nvar Uint8ArrayReader_1 = Uint8ArrayReader;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/Uint8ArrayReader.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/readerFor.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/readerFor.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"r\": () => (/* binding */ readerFor)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _support_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../support.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/support.js\");\n/* harmony import */ var _ArrayReader_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ArrayReader.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/ArrayReader.js\");\n/* harmony import */ var _StringReader_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./StringReader.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/StringReader.js\");\n/* harmony import */ var _NodeBufferReader_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./NodeBufferReader.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/NodeBufferReader.js\");\n/* harmony import */ var _Uint8ArrayReader_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Uint8ArrayReader.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/Uint8ArrayReader.js\");\n\n\n\n\n\n\n\n/**\n * Create a reader adapted to the data.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read.\n * @return {DataReader} the data reader.\n */\nvar readerFor = function (data) {\n    var type = _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.getTypeOf(data);\n    _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.checkSupport(type);\n    if (type === \"string\" && !_support_js__WEBPACK_IMPORTED_MODULE_1__.s.uint8array) {\n        return new _StringReader_js__WEBPACK_IMPORTED_MODULE_3__.S(data);\n    }\n    if (type === \"nodebuffer\") {\n        return new _NodeBufferReader_js__WEBPACK_IMPORTED_MODULE_4__.N(data);\n    }\n    if (_support_js__WEBPACK_IMPORTED_MODULE_1__.s.uint8array) {\n        return new _Uint8ArrayReader_js__WEBPACK_IMPORTED_MODULE_5__.U(_utils_js__WEBPACK_IMPORTED_MODULE_0__.u.transformTo(\"uint8array\", data));\n    }\n    return new _ArrayReader_js__WEBPACK_IMPORTED_MODULE_2__.A(_utils_js__WEBPACK_IMPORTED_MODULE_0__.u.transformTo(\"array\", data));\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/readerFor.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/signature.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/signature.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"s\": () => (/* binding */ signature)\n/* harmony export */ });\nvar LOCAL_FILE_HEADER = \"PK\\x03\\x04\";\nvar CENTRAL_FILE_HEADER = \"PK\\x01\\x02\";\nvar CENTRAL_DIRECTORY_END = \"PK\\x05\\x06\";\nvar ZIP64_CENTRAL_DIRECTORY_LOCATOR = \"PK\\x06\\x07\";\nvar ZIP64_CENTRAL_DIRECTORY_END = \"PK\\x06\\x06\";\nvar DATA_DESCRIPTOR = \"PK\\x07\\x08\";\n\nvar signature = {\n\tLOCAL_FILE_HEADER: LOCAL_FILE_HEADER,\n\tCENTRAL_FILE_HEADER: CENTRAL_FILE_HEADER,\n\tCENTRAL_DIRECTORY_END: CENTRAL_DIRECTORY_END,\n\tZIP64_CENTRAL_DIRECTORY_LOCATOR: ZIP64_CENTRAL_DIRECTORY_LOCATOR,\n\tZIP64_CENTRAL_DIRECTORY_END: ZIP64_CENTRAL_DIRECTORY_END,\n\tDATA_DESCRIPTOR: DATA_DESCRIPTOR\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/signature.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/ConvertWorker.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/ConvertWorker.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"C\": () => (/* binding */ ConvertWorker_1)\n/* harmony export */ });\n/* harmony import */ var _GenericWorker_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GenericWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n\n\n\n/**\n * A worker which convert chunks to a specified type.\n * @constructor\n * @param {String} destType the destination type.\n */\nfunction ConvertWorker(destType) {\n    _GenericWorker_js__WEBPACK_IMPORTED_MODULE_0__.G.call(this, \"ConvertWorker to \" + destType);\n    this.destType = destType;\n}\n_utils_js__WEBPACK_IMPORTED_MODULE_1__.u.inherits(ConvertWorker, _GenericWorker_js__WEBPACK_IMPORTED_MODULE_0__.G);\n\n/**\n * @see GenericWorker.processChunk\n */\nConvertWorker.prototype.processChunk = function (chunk) {\n    this.push({\n        data : _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.transformTo(this.destType, chunk.data),\n        meta : chunk.meta\n    });\n};\nvar ConvertWorker_1 = ConvertWorker;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/ConvertWorker.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/Crc32Probe.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/Crc32Probe.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"C\": () => (/* binding */ Crc32Probe_1)\n/* harmony export */ });\n/* harmony import */ var _GenericWorker_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GenericWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js\");\n/* harmony import */ var _crc32_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../crc32.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/crc32.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n\n\n\n\n/**\n * A worker which calculate the crc32 of the data flowing through.\n * @constructor\n */\nfunction Crc32Probe() {\n    _GenericWorker_js__WEBPACK_IMPORTED_MODULE_0__.G.call(this, \"Crc32Probe\");\n    this.withStreamInfo(\"crc32\", 0);\n}\n_utils_js__WEBPACK_IMPORTED_MODULE_2__.u.inherits(Crc32Probe, _GenericWorker_js__WEBPACK_IMPORTED_MODULE_0__.G);\n\n/**\n * @see GenericWorker.processChunk\n */\nCrc32Probe.prototype.processChunk = function (chunk) {\n    this.streamInfo.crc32 = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_1__.c)(chunk.data, this.streamInfo.crc32 || 0);\n    this.push(chunk);\n};\nvar Crc32Probe_1 = Crc32Probe;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/Crc32Probe.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/DataLengthProbe.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/DataLengthProbe.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"D\": () => (/* binding */ DataLengthProbe_1)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GenericWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js\");\n\n\n\n/**\n * A worker which calculate the total length of the data flowing through.\n * @constructor\n * @param {String} propName the name used to expose the length\n */\nfunction DataLengthProbe(propName) {\n    _GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.call(this, \"DataLengthProbe for \" + propName);\n    this.propName = propName;\n    this.withStreamInfo(propName, 0);\n}\n_utils_js__WEBPACK_IMPORTED_MODULE_0__.u.inherits(DataLengthProbe, _GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G);\n\n/**\n * @see GenericWorker.processChunk\n */\nDataLengthProbe.prototype.processChunk = function (chunk) {\n    if(chunk) {\n        var length = this.streamInfo[this.propName] || 0;\n        this.streamInfo[this.propName] = length + chunk.data.length;\n    }\n    _GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.prototype.processChunk.call(this, chunk);\n};\nvar DataLengthProbe_1 = DataLengthProbe;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/DataLengthProbe.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/DataWorker.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/DataWorker.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"D\": () => (/* binding */ DataWorker_1)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GenericWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js\");\n\n\n\n// the size of the generated chunks\n// TODO expose this as a public variable\nvar DEFAULT_BLOCK_SIZE = 16 * 1024;\n\n/**\n * A worker that reads a content and emits chunks.\n * @constructor\n * @param {Promise} dataP the promise of the data to split\n */\nfunction DataWorker(dataP) {\n    _GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.call(this, \"DataWorker\");\n    var self = this;\n    this.dataIsReady = false;\n    this.index = 0;\n    this.max = 0;\n    this.data = null;\n    this.type = \"\";\n\n    this._tickScheduled = false;\n\n    dataP.then(function (data) {\n        self.dataIsReady = true;\n        self.data = data;\n        self.max = data && data.length || 0;\n        self.type = _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.getTypeOf(data);\n        if(!self.isPaused) {\n            self._tickAndRepeat();\n        }\n    }, function (e) {\n        self.error(e);\n    });\n}\n\n_utils_js__WEBPACK_IMPORTED_MODULE_0__.u.inherits(DataWorker, _GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G);\n\n/**\n * @see GenericWorker.cleanUp\n */\nDataWorker.prototype.cleanUp = function () {\n    _GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.prototype.cleanUp.call(this);\n    this.data = null;\n};\n\n/**\n * @see GenericWorker.resume\n */\nDataWorker.prototype.resume = function () {\n    if(!_GenericWorker_js__WEBPACK_IMPORTED_MODULE_1__.G.prototype.resume.call(this)) {\n        return false;\n    }\n\n    if (!this._tickScheduled && this.dataIsReady) {\n        this._tickScheduled = true;\n        _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.delay(this._tickAndRepeat, [], this);\n    }\n    return true;\n};\n\n/**\n * Trigger a tick a schedule an other call to this function.\n */\nDataWorker.prototype._tickAndRepeat = function() {\n    this._tickScheduled = false;\n    if(this.isPaused || this.isFinished) {\n        return;\n    }\n    this._tick();\n    if(!this.isFinished) {\n        _utils_js__WEBPACK_IMPORTED_MODULE_0__.u.delay(this._tickAndRepeat, [], this);\n        this._tickScheduled = true;\n    }\n};\n\n/**\n * Read and push a chunk.\n */\nDataWorker.prototype._tick = function() {\n\n    if(this.isPaused || this.isFinished) {\n        return false;\n    }\n\n    var size = DEFAULT_BLOCK_SIZE;\n    var data = null, nextIndex = Math.min(this.max, this.index + size);\n    if (this.index >= this.max) {\n        // EOF\n        return this.end();\n    } else {\n        switch(this.type) {\n            case \"string\":\n                data = this.data.substring(this.index, nextIndex);\n            break;\n            case \"uint8array\":\n                data = this.data.subarray(this.index, nextIndex);\n            break;\n            case \"array\":\n            case \"nodebuffer\":\n                data = this.data.slice(this.index, nextIndex);\n            break;\n        }\n        this.index = nextIndex;\n        return this.push({\n            data : data,\n            meta : {\n                percent : this.max ? this.index / this.max * 100 : 0\n            }\n        });\n    }\n};\n\nvar DataWorker_1 = DataWorker;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/DataWorker.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"G\": () => (/* binding */ GenericWorker_1)\n/* harmony export */ });\n/**\n * A worker that does nothing but passing chunks to the next one. This is like\n * a nodejs stream but with some differences. On the good side :\n * - it works on IE 6-9 without any issue / polyfill\n * - it weights less than the full dependencies bundled with browserify\n * - it forwards errors (no need to declare an error handler EVERYWHERE)\n *\n * A chunk is an object with 2 attributes : `meta` and `data`. The former is an\n * object containing anything (`percent` for example), see each worker for more\n * details. The latter is the real data (String, Uint8Array, etc).\n *\n * @constructor\n * @param {String} name the name of the stream (mainly used for debugging purposes)\n */\nfunction GenericWorker(name) {\n    // the name of the worker\n    this.name = name || \"default\";\n    // an object containing metadata about the workers chain\n    this.streamInfo = {};\n    // an error which happened when the worker was paused\n    this.generatedError = null;\n    // an object containing metadata to be merged by this worker into the general metadata\n    this.extraStreamInfo = {};\n    // true if the stream is paused (and should not do anything), false otherwise\n    this.isPaused = true;\n    // true if the stream is finished (and should not do anything), false otherwise\n    this.isFinished = false;\n    // true if the stream is locked to prevent further structure updates (pipe), false otherwise\n    this.isLocked = false;\n    // the event listeners\n    this._listeners = {\n        'data':[],\n        'end':[],\n        'error':[]\n    };\n    // the previous worker, if any\n    this.previous = null;\n}\n\nGenericWorker.prototype = {\n    /**\n     * Push a chunk to the next workers.\n     * @param {Object} chunk the chunk to push\n     */\n    push : function (chunk) {\n        this.emit(\"data\", chunk);\n    },\n    /**\n     * End the stream.\n     * @return {Boolean} true if this call ended the worker, false otherwise.\n     */\n    end : function () {\n        if (this.isFinished) {\n            return false;\n        }\n\n        this.flush();\n        try {\n            this.emit(\"end\");\n            this.cleanUp();\n            this.isFinished = true;\n        } catch (e) {\n            this.emit(\"error\", e);\n        }\n        return true;\n    },\n    /**\n     * End the stream with an error.\n     * @param {Error} e the error which caused the premature end.\n     * @return {Boolean} true if this call ended the worker with an error, false otherwise.\n     */\n    error : function (e) {\n        if (this.isFinished) {\n            return false;\n        }\n\n        if(this.isPaused) {\n            this.generatedError = e;\n        } else {\n            this.isFinished = true;\n\n            this.emit(\"error\", e);\n\n            // in the workers chain exploded in the middle of the chain,\n            // the error event will go downward but we also need to notify\n            // workers upward that there has been an error.\n            if(this.previous) {\n                this.previous.error(e);\n            }\n\n            this.cleanUp();\n        }\n        return true;\n    },\n    /**\n     * Add a callback on an event.\n     * @param {String} name the name of the event (data, end, error)\n     * @param {Function} listener the function to call when the event is triggered\n     * @return {GenericWorker} the current object for chainability\n     */\n    on : function (name, listener) {\n        this._listeners[name].push(listener);\n        return this;\n    },\n    /**\n     * Clean any references when a worker is ending.\n     */\n    cleanUp : function () {\n        this.streamInfo = this.generatedError = this.extraStreamInfo = null;\n        this._listeners = [];\n    },\n    /**\n     * Trigger an event. This will call registered callback with the provided arg.\n     * @param {String} name the name of the event (data, end, error)\n     * @param {Object} arg the argument to call the callback with.\n     */\n    emit : function (name, arg) {\n        if (this._listeners[name]) {\n            for(var i = 0; i < this._listeners[name].length; i++) {\n                this._listeners[name][i].call(this, arg);\n            }\n        }\n    },\n    /**\n     * Chain a worker with an other.\n     * @param {Worker} next the worker receiving events from the current one.\n     * @return {worker} the next worker for chainability\n     */\n    pipe : function (next) {\n        return next.registerPrevious(this);\n    },\n    /**\n     * Same as `pipe` in the other direction.\n     * Using an API with `pipe(next)` is very easy.\n     * Implementing the API with the point of view of the next one registering\n     * a source is easier, see the ZipFileWorker.\n     * @param {Worker} previous the previous worker, sending events to this one\n     * @return {Worker} the current worker for chainability\n     */\n    registerPrevious : function (previous) {\n        if (this.isLocked) {\n            throw new Error(\"The stream '\" + this + \"' has already been used.\");\n        }\n\n        // sharing the streamInfo...\n        this.streamInfo = previous.streamInfo;\n        // ... and adding our own bits\n        this.mergeStreamInfo();\n        this.previous =  previous;\n        var self = this;\n        previous.on('data', function (chunk) {\n            self.processChunk(chunk);\n        });\n        previous.on('end', function () {\n            self.end();\n        });\n        previous.on('error', function (e) {\n            self.error(e);\n        });\n        return this;\n    },\n    /**\n     * Pause the stream so it doesn't send events anymore.\n     * @return {Boolean} true if this call paused the worker, false otherwise.\n     */\n    pause : function () {\n        if(this.isPaused || this.isFinished) {\n            return false;\n        }\n        this.isPaused = true;\n\n        if(this.previous) {\n            this.previous.pause();\n        }\n        return true;\n    },\n    /**\n     * Resume a paused stream.\n     * @return {Boolean} true if this call resumed the worker, false otherwise.\n     */\n    resume : function () {\n        if(!this.isPaused || this.isFinished) {\n            return false;\n        }\n        this.isPaused = false;\n\n        // if true, the worker tried to resume but failed\n        var withError = false;\n        if(this.generatedError) {\n            this.error(this.generatedError);\n            withError = true;\n        }\n        if(this.previous) {\n            this.previous.resume();\n        }\n\n        return !withError;\n    },\n    /**\n     * Flush any remaining bytes as the stream is ending.\n     */\n    flush : function () {},\n    /**\n     * Process a chunk. This is usually the method overridden.\n     * @param {Object} chunk the chunk to process.\n     */\n    processChunk : function(chunk) {\n        this.push(chunk);\n    },\n    /**\n     * Add a key/value to be added in the workers chain streamInfo once activated.\n     * @param {String} key the key to use\n     * @param {Object} value the associated value\n     * @return {Worker} the current worker for chainability\n     */\n    withStreamInfo : function (key, value) {\n        this.extraStreamInfo[key] = value;\n        this.mergeStreamInfo();\n        return this;\n    },\n    /**\n     * Merge this worker's streamInfo into the chain's streamInfo.\n     */\n    mergeStreamInfo : function () {\n        for(var key in this.extraStreamInfo) {\n            if (!this.extraStreamInfo.hasOwnProperty(key)) {\n                continue;\n            }\n            this.streamInfo[key] = this.extraStreamInfo[key];\n        }\n    },\n\n    /**\n     * Lock the stream to prevent further updates on the workers chain.\n     * After calling this method, all calls to pipe will fail.\n     */\n    lock: function () {\n        if (this.isLocked) {\n            throw new Error(\"The stream '\" + this + \"' has already been used.\");\n        }\n        this.isLocked = true;\n        if (this.previous) {\n            this.previous.lock();\n        }\n    },\n\n    /**\n     *\n     * Pretty print the workers chain.\n     */\n    toString : function () {\n        var me = \"Worker \" + this.name;\n        if (this.previous) {\n            return this.previous + \" -> \" + me;\n        } else {\n            return me;\n        }\n    }\n};\n\nvar GenericWorker_1 = GenericWorker;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/StreamHelper.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/StreamHelper.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"S\": () => (/* binding */ StreamHelper_1)\n/* harmony export */ });\n/* harmony import */ var _virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../_virtual/polyfill-node_buffer.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node_buffer.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _ConvertWorker_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ConvertWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/ConvertWorker.js\");\n/* harmony import */ var _GenericWorker_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GenericWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js\");\n/* harmony import */ var _base64_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base64.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/base64.js\");\n/* harmony import */ var _support_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../support.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/support.js\");\n/* harmony import */ var _external_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../external.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/external.js\");\n/* harmony import */ var _nodejs_NodejsStreamOutputAdapter_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../nodejs/NodejsStreamOutputAdapter.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejs/NodejsStreamOutputAdapter.js\");\n\n\n\n\n\n\n\n\n\nvar NodejsStreamOutputAdapter = null;\nif (_support_js__WEBPACK_IMPORTED_MODULE_5__.s.nodestream) {\n    try {\n        NodejsStreamOutputAdapter = _nodejs_NodejsStreamOutputAdapter_js__WEBPACK_IMPORTED_MODULE_7__.N;\n    } catch(e) {}\n}\n\n/**\n * Apply the final transformation of the data. If the user wants a Blob for\n * example, it's easier to work with an U8intArray and finally do the\n * ArrayBuffer/Blob conversion.\n * @param {String} type the name of the final type\n * @param {String|Uint8Array|Buffer} content the content to transform\n * @param {String} mimeType the mime type of the content, if applicable.\n * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format.\n */\nfunction transformZipOutput(type, content, mimeType) {\n    switch(type) {\n        case \"blob\" :\n            return _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.newBlob(_utils_js__WEBPACK_IMPORTED_MODULE_1__.u.transformTo(\"arraybuffer\", content), mimeType);\n        case \"base64\" :\n            return _base64_js__WEBPACK_IMPORTED_MODULE_4__.b.encode(content);\n        default :\n            return _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.transformTo(type, content);\n    }\n}\n\n/**\n * Concatenate an array of data of the given type.\n * @param {String} type the type of the data in the given array.\n * @param {Array} dataArray the array containing the data chunks to concatenate\n * @return {String|Uint8Array|Buffer} the concatenated data\n * @throws Error if the asked type is unsupported\n */\nfunction concat (type, dataArray) {\n    var i, index = 0, res = null, totalLength = 0;\n    for(i = 0; i < dataArray.length; i++) {\n        totalLength += dataArray[i].length;\n    }\n    switch(type) {\n        case \"string\":\n            return dataArray.join(\"\");\n          case \"array\":\n            return Array.prototype.concat.apply([], dataArray);\n        case \"uint8array\":\n            res = new Uint8Array(totalLength);\n            for(i = 0; i < dataArray.length; i++) {\n                res.set(dataArray[i], index);\n                index += dataArray[i].length;\n            }\n            return res;\n        case \"nodebuffer\":\n            return _virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B.concat(dataArray);\n        default:\n            throw new Error(\"concat : unsupported type '\"  + type + \"'\");\n    }\n}\n\n/**\n * Listen a StreamHelper, accumulate its content and concatenate it into a\n * complete block.\n * @param {StreamHelper} helper the helper to use.\n * @param {Function} updateCallback a callback called on each update. Called\n * with one arg :\n * - the metadata linked to the update received.\n * @return Promise the promise for the accumulation.\n */\nfunction accumulate(helper, updateCallback) {\n    return new _external_js__WEBPACK_IMPORTED_MODULE_6__.e.Promise(function (resolve, reject){\n        var dataArray = [];\n        var chunkType = helper._internalType,\n            resultType = helper._outputType,\n            mimeType = helper._mimeType;\n        helper\n        .on('data', function (data, meta) {\n            dataArray.push(data);\n            if(updateCallback) {\n                updateCallback(meta);\n            }\n        })\n        .on('error', function(err) {\n            dataArray = [];\n            reject(err);\n        })\n        .on('end', function (){\n            try {\n                var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType);\n                resolve(result);\n            } catch (e) {\n                reject(e);\n            }\n            dataArray = [];\n        })\n        .resume();\n    });\n}\n\n/**\n * An helper to easily use workers outside of JSZip.\n * @constructor\n * @param {Worker} worker the worker to wrap\n * @param {String} outputType the type of data expected by the use\n * @param {String} mimeType the mime type of the content, if applicable.\n */\nfunction StreamHelper(worker, outputType, mimeType) {\n    var internalType = outputType;\n    switch(outputType) {\n        case \"blob\":\n        case \"arraybuffer\":\n            internalType = \"uint8array\";\n        break;\n        case \"base64\":\n            internalType = \"string\";\n        break;\n    }\n\n    try {\n        // the type used internally\n        this._internalType = internalType;\n        // the type used to output results\n        this._outputType = outputType;\n        // the mime type\n        this._mimeType = mimeType;\n        _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.checkSupport(internalType);\n        this._worker = worker.pipe(new _ConvertWorker_js__WEBPACK_IMPORTED_MODULE_2__.C(internalType));\n        // the last workers can be rewired without issues but we need to\n        // prevent any updates on previous workers.\n        worker.lock();\n    } catch(e) {\n        this._worker = new _GenericWorker_js__WEBPACK_IMPORTED_MODULE_3__.G(\"error\");\n        this._worker.error(e);\n    }\n}\n\nStreamHelper.prototype = {\n    /**\n     * Listen a StreamHelper, accumulate its content and concatenate it into a\n     * complete block.\n     * @param {Function} updateCb the update callback.\n     * @return Promise the promise for the accumulation.\n     */\n    accumulate : function (updateCb) {\n        return accumulate(this, updateCb);\n    },\n    /**\n     * Add a listener on an event triggered on a stream.\n     * @param {String} evt the name of the event\n     * @param {Function} fn the listener\n     * @return {StreamHelper} the current helper.\n     */\n    on : function (evt, fn) {\n        var self = this;\n\n        if(evt === \"data\") {\n            this._worker.on(evt, function (chunk) {\n                fn.call(self, chunk.data, chunk.meta);\n            });\n        } else {\n            this._worker.on(evt, function () {\n                _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.delay(fn, arguments, self);\n            });\n        }\n        return this;\n    },\n    /**\n     * Resume the flow of chunks.\n     * @return {StreamHelper} the current helper.\n     */\n    resume : function () {\n        _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.delay(this._worker.resume, [], this._worker);\n        return this;\n    },\n    /**\n     * Pause the flow of chunks.\n     * @return {StreamHelper} the current helper.\n     */\n    pause : function () {\n        this._worker.pause();\n        return this;\n    },\n    /**\n     * Return a nodejs stream for this helper.\n     * @param {Function} updateCb the update callback.\n     * @return {NodejsStreamOutputAdapter} the nodejs stream.\n     */\n    toNodejsStream : function (updateCb) {\n        _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.checkSupport(\"nodestream\");\n        if (this._outputType !== \"nodebuffer\") {\n            // an object stream containing blob/arraybuffer/uint8array/string\n            // is strange and I don't know if it would be useful.\n            // I you find this comment and have a good usecase, please open a\n            // bug report !\n            throw new Error(this._outputType + \" is not supported by this method\");\n        }\n\n        return new NodejsStreamOutputAdapter(this, {\n            objectMode : this._outputType !== \"nodebuffer\"\n        }, updateCb);\n    }\n};\n\n\nvar StreamHelper_1 = StreamHelper;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/StreamHelper.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/support.js":
/*!******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/support.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"s\": () => (/* binding */ support)\n/* harmony export */ });\n/* harmony import */ var _virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/polyfill-node_buffer.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node_buffer.js\");\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n/* harmony import */ var _readable_stream_browser_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./readable-stream-browser.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/readable-stream-browser.js\");\n\n\n\n\nvar support = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_1__.c)(function (module, exports) {\n\nexports.base64 = true;\nexports.array = true;\nexports.string = true;\nexports.arraybuffer = typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\";\nexports.nodebuffer = typeof _virtual_polyfill_node_buffer_js__WEBPACK_IMPORTED_MODULE_0__.B !== \"undefined\";\n// contains true if JSZip can read/generate Uint8Array, false otherwise.\nexports.uint8array = typeof Uint8Array !== \"undefined\";\n\nif (typeof ArrayBuffer === \"undefined\") {\n    exports.blob = false;\n}\nelse {\n    var buffer = new ArrayBuffer(0);\n    try {\n        exports.blob = new Blob([buffer], {\n            type: \"application/zip\"\n        }).size === 0;\n    }\n    catch (e) {\n        try {\n            var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;\n            var builder = new Builder();\n            builder.append(buffer);\n            exports.blob = builder.getBlob('application/zip').size === 0;\n        }\n        catch (e) {\n            exports.blob = false;\n        }\n    }\n}\n\ntry {\n    exports.nodestream = !!_readable_stream_browser_js__WEBPACK_IMPORTED_MODULE_2__.r.Readable;\n} catch(e) {\n    exports.nodestream = false;\n}\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/support.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/utf8.js":
/*!***************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/utf8.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"u\": () => (/* binding */ utf8)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _support_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./support.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/support.js\");\n/* harmony import */ var _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nodejsUtils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejsUtils.js\");\n/* harmony import */ var _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stream/GenericWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js\");\n\n\n\n\n\n\nvar utf8 = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module, exports) {\n\n\n\n\n\n\n/**\n * The following functions come from pako, from pako/lib/utils/strings\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new Array(256);\nfor (var i=0; i<256; i++) {\n  _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);\n}\n_utf8len[254]=_utf8len[254]=1; // Invalid sequence start\n\n// convert string to array (typed, when possible)\nvar string2buf = function (str) {\n    var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n    // count binary size\n    for (m_pos = 0; m_pos < str_len; m_pos++) {\n        c = str.charCodeAt(m_pos);\n        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n            c2 = str.charCodeAt(m_pos+1);\n            if ((c2 & 0xfc00) === 0xdc00) {\n                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n                m_pos++;\n            }\n        }\n        buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n    }\n\n    // allocate buffer\n    if (_support_js__WEBPACK_IMPORTED_MODULE_2__.s.uint8array) {\n        buf = new Uint8Array(buf_len);\n    } else {\n        buf = new Array(buf_len);\n    }\n\n    // convert\n    for (i=0, m_pos = 0; i < buf_len; m_pos++) {\n        c = str.charCodeAt(m_pos);\n        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n            c2 = str.charCodeAt(m_pos+1);\n            if ((c2 & 0xfc00) === 0xdc00) {\n                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n                m_pos++;\n            }\n        }\n        if (c < 0x80) {\n            /* one byte */\n            buf[i++] = c;\n        } else if (c < 0x800) {\n            /* two bytes */\n            buf[i++] = 0xC0 | (c >>> 6);\n            buf[i++] = 0x80 | (c & 0x3f);\n        } else if (c < 0x10000) {\n            /* three bytes */\n            buf[i++] = 0xE0 | (c >>> 12);\n            buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n            buf[i++] = 0x80 | (c & 0x3f);\n        } else {\n            /* four bytes */\n            buf[i++] = 0xf0 | (c >>> 18);\n            buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n            buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n            buf[i++] = 0x80 | (c & 0x3f);\n        }\n    }\n\n    return buf;\n};\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max   - length limit (mandatory);\nvar utf8border = function(buf, max) {\n    var pos;\n\n    max = max || buf.length;\n    if (max > buf.length) { max = buf.length; }\n\n    // go back from last position, until start of sequence found\n    pos = max-1;\n    while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n    // Fuckup - very small and broken sequence,\n    // return max, because we should return something anyway.\n    if (pos < 0) { return max; }\n\n    // If we came to start of buffer - that means vuffer is too small,\n    // return max too.\n    if (pos === 0) { return max; }\n\n    return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n// convert array to string\nvar buf2string = function (buf) {\n    var i, out, c, c_len;\n    var len = buf.length;\n\n    // Reserve max possible length (2 words per char)\n    // NB: by unknown reasons, Array is significantly faster for\n    //     String.fromCharCode.apply than Uint16Array.\n    var utf16buf = new Array(len*2);\n\n    for (out=0, i=0; i<len;) {\n        c = buf[i++];\n        // quick process ascii\n        if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n        c_len = _utf8len[c];\n        // skip 5 & 6 byte codes\n        if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }\n\n        // apply mask on first byte\n        c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n        // join the rest\n        while (c_len > 1 && i < len) {\n            c = (c << 6) | (buf[i++] & 0x3f);\n            c_len--;\n        }\n\n        // terminated by end of string?\n        if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n        if (c < 0x10000) {\n            utf16buf[out++] = c;\n        } else {\n            c -= 0x10000;\n            utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n            utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n        }\n    }\n\n    // shrinkBuf(utf16buf, out)\n    if (utf16buf.length !== out) {\n        if(utf16buf.subarray) {\n            utf16buf = utf16buf.subarray(0, out);\n        } else {\n            utf16buf.length = out;\n        }\n    }\n\n    // return String.fromCharCode.apply(null, utf16buf);\n    return _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.applyFromCharCode(utf16buf);\n};\n\n\n// That's all for the pako functions.\n\n\n/**\n * Transform a javascript string into an array (typed if possible) of bytes,\n * UTF-8 encoded.\n * @param {String} str the string to encode\n * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.\n */\nexports.utf8encode = function utf8encode(str) {\n    if (_support_js__WEBPACK_IMPORTED_MODULE_2__.s.nodebuffer) {\n        return _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_3__.n.newBufferFrom(str, \"utf-8\");\n    }\n\n    return string2buf(str);\n};\n\n\n/**\n * Transform a bytes array (or a representation) representing an UTF-8 encoded\n * string into a javascript string.\n * @param {Array|Uint8Array|Buffer} buf the data de decode\n * @return {String} the decoded string.\n */\nexports.utf8decode = function utf8decode(buf) {\n    if (_support_js__WEBPACK_IMPORTED_MODULE_2__.s.nodebuffer) {\n        return _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.transformTo(\"nodebuffer\", buf).toString(\"utf-8\");\n    }\n\n    buf = _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.transformTo(_support_js__WEBPACK_IMPORTED_MODULE_2__.s.uint8array ? \"uint8array\" : \"array\", buf);\n\n    return buf2string(buf);\n};\n\n/**\n * A worker to decode utf8 encoded binary chunks into string chunks.\n * @constructor\n */\nfunction Utf8DecodeWorker() {\n    _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_4__.G.call(this, \"utf-8 decode\");\n    // the last bytes if a chunk didn't end with a complete codepoint.\n    this.leftOver = null;\n}\n_utils_js__WEBPACK_IMPORTED_MODULE_1__.u.inherits(Utf8DecodeWorker, _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_4__.G);\n\n/**\n * @see GenericWorker.processChunk\n */\nUtf8DecodeWorker.prototype.processChunk = function (chunk) {\n\n    var data = _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.transformTo(_support_js__WEBPACK_IMPORTED_MODULE_2__.s.uint8array ? \"uint8array\" : \"array\", chunk.data);\n\n    // 1st step, re-use what's left of the previous chunk\n    if (this.leftOver && this.leftOver.length) {\n        if(_support_js__WEBPACK_IMPORTED_MODULE_2__.s.uint8array) {\n            var previousData = data;\n            data = new Uint8Array(previousData.length + this.leftOver.length);\n            data.set(this.leftOver, 0);\n            data.set(previousData, this.leftOver.length);\n        } else {\n            data = this.leftOver.concat(data);\n        }\n        this.leftOver = null;\n    }\n\n    var nextBoundary = utf8border(data);\n    var usableData = data;\n    if (nextBoundary !== data.length) {\n        if (_support_js__WEBPACK_IMPORTED_MODULE_2__.s.uint8array) {\n            usableData = data.subarray(0, nextBoundary);\n            this.leftOver = data.subarray(nextBoundary, data.length);\n        } else {\n            usableData = data.slice(0, nextBoundary);\n            this.leftOver = data.slice(nextBoundary, data.length);\n        }\n    }\n\n    this.push({\n        data : exports.utf8decode(usableData),\n        meta : chunk.meta\n    });\n};\n\n/**\n * @see GenericWorker.flush\n */\nUtf8DecodeWorker.prototype.flush = function () {\n    if(this.leftOver && this.leftOver.length) {\n        this.push({\n            data : exports.utf8decode(this.leftOver),\n            meta : {}\n        });\n        this.leftOver = null;\n    }\n};\nexports.Utf8DecodeWorker = Utf8DecodeWorker;\n\n/**\n * A worker to endcode string chunks into utf8 encoded binary chunks.\n * @constructor\n */\nfunction Utf8EncodeWorker() {\n    _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_4__.G.call(this, \"utf-8 encode\");\n}\n_utils_js__WEBPACK_IMPORTED_MODULE_1__.u.inherits(Utf8EncodeWorker, _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_4__.G);\n\n/**\n * @see GenericWorker.processChunk\n */\nUtf8EncodeWorker.prototype.processChunk = function (chunk) {\n    this.push({\n        data : exports.utf8encode(chunk.data),\n        meta : chunk.meta\n    });\n};\nexports.Utf8EncodeWorker = Utf8EncodeWorker;\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/utf8.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"u\": () => (/* binding */ utils)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n/* harmony import */ var _support_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./support.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/support.js\");\n/* harmony import */ var _base64_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base64.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/base64.js\");\n/* harmony import */ var _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nodejsUtils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/nodejsUtils.js\");\n/* harmony import */ var _set_immediate_shim_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../set-immediate-shim/index.js */ \"./node_modules/@kitware/vtk.js/vendor/set-immediate-shim/index.js\");\n/* harmony import */ var _external_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./external.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/external.js\");\n\n\n\n\n\n\n\nvar utils = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module, exports) {\n\n\n\n\n\n\n\n\n/**\n * Convert a string that pass as a \"binary string\": it should represent a byte\n * array but may have > 255 char codes. Be sure to take only the first byte\n * and returns the byte array.\n * @param {String} str the string to transform.\n * @return {Array|Uint8Array} the string in a binary format.\n */\nfunction string2binary(str) {\n    var result = null;\n    if (_support_js__WEBPACK_IMPORTED_MODULE_1__.s.uint8array) {\n      result = new Uint8Array(str.length);\n    } else {\n      result = new Array(str.length);\n    }\n    return stringToArrayLike(str, result);\n}\n\n/**\n * Create a new blob with the given content and the given type.\n * @param {String|ArrayBuffer} part the content to put in the blob. DO NOT use\n * an Uint8Array because the stock browser of android 4 won't accept it (it\n * will be silently converted to a string, \"[object Uint8Array]\").\n *\n * Use only ONE part to build the blob to avoid a memory leak in IE11 / Edge:\n * when a large amount of Array is used to create the Blob, the amount of\n * memory consumed is nearly 100 times the original data amount.\n *\n * @param {String} type the mime type of the blob.\n * @return {Blob} the created blob.\n */\nexports.newBlob = function(part, type) {\n    exports.checkSupport(\"blob\");\n\n    try {\n        // Blob constructor\n        return new Blob([part], {\n            type: type\n        });\n    }\n    catch (e) {\n\n        try {\n            // deprecated, browser only, old way\n            var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;\n            var builder = new Builder();\n            builder.append(part);\n            return builder.getBlob(type);\n        }\n        catch (e) {\n\n            // well, fuck ?!\n            throw new Error(\"Bug : can't construct the Blob.\");\n        }\n    }\n\n\n};\n/**\n * The identity function.\n * @param {Object} input the input.\n * @return {Object} the same input.\n */\nfunction identity(input) {\n    return input;\n}\n\n/**\n * Fill in an array with a string.\n * @param {String} str the string to use.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.\n */\nfunction stringToArrayLike(str, array) {\n    for (var i = 0; i < str.length; ++i) {\n        array[i] = str.charCodeAt(i) & 0xFF;\n    }\n    return array;\n}\n\n/**\n * An helper for the function arrayLikeToString.\n * This contains static informations and functions that\n * can be optimized by the browser JIT compiler.\n */\nvar arrayToStringHelper = {\n    /**\n     * Transform an array of int into a string, chunk by chunk.\n     * See the performances notes on arrayLikeToString.\n     * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n     * @param {String} type the type of the array.\n     * @param {Integer} chunk the chunk size.\n     * @return {String} the resulting string.\n     * @throws Error if the chunk is too big for the stack.\n     */\n    stringifyByChunk: function(array, type, chunk) {\n        var result = [], k = 0, len = array.length;\n        // shortcut\n        if (len <= chunk) {\n            return String.fromCharCode.apply(null, array);\n        }\n        while (k < len) {\n            if (type === \"array\" || type === \"nodebuffer\") {\n                result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));\n            }\n            else {\n                result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));\n            }\n            k += chunk;\n        }\n        return result.join(\"\");\n    },\n    /**\n     * Call String.fromCharCode on every item in the array.\n     * This is the naive implementation, which generate A LOT of intermediate string.\n     * This should be used when everything else fail.\n     * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n     * @return {String} the result.\n     */\n    stringifyByChar: function(array){\n        var resultStr = \"\";\n        for(var i = 0; i < array.length; i++) {\n            resultStr += String.fromCharCode(array[i]);\n        }\n        return resultStr;\n    },\n    applyCanBeUsed : {\n        /**\n         * true if the browser accepts to use String.fromCharCode on Uint8Array\n         */\n        uint8array : (function () {\n            try {\n                return _support_js__WEBPACK_IMPORTED_MODULE_1__.s.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;\n            } catch (e) {\n                return false;\n            }\n        })(),\n        /**\n         * true if the browser accepts to use String.fromCharCode on nodejs Buffer.\n         */\n        nodebuffer : (function () {\n            try {\n                return _support_js__WEBPACK_IMPORTED_MODULE_1__.s.nodebuffer && String.fromCharCode.apply(null, _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_3__.n.allocBuffer(1)).length === 1;\n            } catch (e) {\n                return false;\n            }\n        })()\n    }\n};\n\n/**\n * Transform an array-like object to a string.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n * @return {String} the result.\n */\nfunction arrayLikeToString(array) {\n    // Performances notes :\n    // --------------------\n    // String.fromCharCode.apply(null, array) is the fastest, see\n    // see http://jsperf.com/converting-a-uint8array-to-a-string/2\n    // but the stack is limited (and we can get huge arrays !).\n    //\n    // result += String.fromCharCode(array[i]); generate too many strings !\n    //\n    // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2\n    // TODO : we now have workers that split the work. Do we still need that ?\n    var chunk = 65536,\n        type = exports.getTypeOf(array),\n        canUseApply = true;\n    if (type === \"uint8array\") {\n        canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array;\n    } else if (type === \"nodebuffer\") {\n        canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer;\n    }\n\n    if (canUseApply) {\n        while (chunk > 1) {\n            try {\n                return arrayToStringHelper.stringifyByChunk(array, type, chunk);\n            } catch (e) {\n                chunk = Math.floor(chunk / 2);\n            }\n        }\n    }\n\n    // no apply or chunk error : slow and painful algorithm\n    // default browser on android 4.*\n    return arrayToStringHelper.stringifyByChar(array);\n}\n\nexports.applyFromCharCode = arrayLikeToString;\n\n\n/**\n * Copy the data from an array-like to an other array-like.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.\n */\nfunction arrayLikeToArrayLike(arrayFrom, arrayTo) {\n    for (var i = 0; i < arrayFrom.length; i++) {\n        arrayTo[i] = arrayFrom[i];\n    }\n    return arrayTo;\n}\n\n// a matrix containing functions to transform everything into everything.\nvar transform = {};\n\n// string to ?\ntransform[\"string\"] = {\n    \"string\": identity,\n    \"array\": function(input) {\n        return stringToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return transform[\"string\"][\"uint8array\"](input).buffer;\n    },\n    \"uint8array\": function(input) {\n        return stringToArrayLike(input, new Uint8Array(input.length));\n    },\n    \"nodebuffer\": function(input) {\n        return stringToArrayLike(input, _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_3__.n.allocBuffer(input.length));\n    }\n};\n\n// array to ?\ntransform[\"array\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": identity,\n    \"arraybuffer\": function(input) {\n        return (new Uint8Array(input)).buffer;\n    },\n    \"uint8array\": function(input) {\n        return new Uint8Array(input);\n    },\n    \"nodebuffer\": function(input) {\n        return _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_3__.n.newBufferFrom(input);\n    }\n};\n\n// arraybuffer to ?\ntransform[\"arraybuffer\"] = {\n    \"string\": function(input) {\n        return arrayLikeToString(new Uint8Array(input));\n    },\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));\n    },\n    \"arraybuffer\": identity,\n    \"uint8array\": function(input) {\n        return new Uint8Array(input);\n    },\n    \"nodebuffer\": function(input) {\n        return _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_3__.n.newBufferFrom(new Uint8Array(input));\n    }\n};\n\n// uint8array to ?\ntransform[\"uint8array\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return input.buffer;\n    },\n    \"uint8array\": identity,\n    \"nodebuffer\": function(input) {\n        return _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_3__.n.newBufferFrom(input);\n    }\n};\n\n// nodebuffer to ?\ntransform[\"nodebuffer\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return transform[\"nodebuffer\"][\"uint8array\"](input).buffer;\n    },\n    \"uint8array\": function(input) {\n        return arrayLikeToArrayLike(input, new Uint8Array(input.length));\n    },\n    \"nodebuffer\": identity\n};\n\n/**\n * Transform an input into any type.\n * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.\n * If no output type is specified, the unmodified input will be returned.\n * @param {String} outputType the output type.\n * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.\n * @throws {Error} an Error if the browser doesn't support the requested output type.\n */\nexports.transformTo = function(outputType, input) {\n    if (!input) {\n        // undefined, null, etc\n        // an empty string won't harm.\n        input = \"\";\n    }\n    if (!outputType) {\n        return input;\n    }\n    exports.checkSupport(outputType);\n    var inputType = exports.getTypeOf(input);\n    var result = transform[inputType][outputType](input);\n    return result;\n};\n\n/**\n * Return the type of the input.\n * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.\n * @param {Object} input the input to identify.\n * @return {String} the (lowercase) type of the input.\n */\nexports.getTypeOf = function(input) {\n    if (typeof input === \"string\") {\n        return \"string\";\n    }\n    if (Object.prototype.toString.call(input) === \"[object Array]\") {\n        return \"array\";\n    }\n    if (_support_js__WEBPACK_IMPORTED_MODULE_1__.s.nodebuffer && _nodejsUtils_js__WEBPACK_IMPORTED_MODULE_3__.n.isBuffer(input)) {\n        return \"nodebuffer\";\n    }\n    if (_support_js__WEBPACK_IMPORTED_MODULE_1__.s.uint8array && input instanceof Uint8Array) {\n        return \"uint8array\";\n    }\n    if (_support_js__WEBPACK_IMPORTED_MODULE_1__.s.arraybuffer && input instanceof ArrayBuffer) {\n        return \"arraybuffer\";\n    }\n};\n\n/**\n * Throw an exception if the type is not supported.\n * @param {String} type the type to check.\n * @throws {Error} an Error if the browser doesn't support the requested type.\n */\nexports.checkSupport = function(type) {\n    var supported = _support_js__WEBPACK_IMPORTED_MODULE_1__.s[type.toLowerCase()];\n    if (!supported) {\n        throw new Error(type + \" is not supported by this platform\");\n    }\n};\n\nexports.MAX_VALUE_16BITS = 65535;\nexports.MAX_VALUE_32BITS = -1; // well, \"\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\" is parsed as -1\n\n/**\n * Prettify a string read as binary.\n * @param {string} str the string to prettify.\n * @return {string} a pretty string.\n */\nexports.pretty = function(str) {\n    var res = '',\n        code, i;\n    for (i = 0; i < (str || \"\").length; i++) {\n        code = str.charCodeAt(i);\n        res += '\\\\x' + (code < 16 ? \"0\" : \"\") + code.toString(16).toUpperCase();\n    }\n    return res;\n};\n\n/**\n * Defer the call of a function.\n * @param {Function} callback the function to call asynchronously.\n * @param {Array} args the arguments to give to the callback.\n */\nexports.delay = function(callback, args, self) {\n    (0,_set_immediate_shim_index_js__WEBPACK_IMPORTED_MODULE_4__.s)(function () {\n        callback.apply(self || null, args || []);\n    });\n};\n\n/**\n * Extends a prototype with an other, without calling a constructor with\n * side effects. Inspired by nodejs' `utils.inherits`\n * @param {Function} ctor the constructor to augment\n * @param {Function} superCtor the parent constructor to use\n */\nexports.inherits = function (ctor, superCtor) {\n    var Obj = function() {};\n    Obj.prototype = superCtor.prototype;\n    ctor.prototype = new Obj();\n};\n\n/**\n * Merge the objects passed as parameters into a new one.\n * @private\n * @param {...Object} var_args All objects to merge.\n * @return {Object} a new object with the data of the others.\n */\nexports.extend = function() {\n    var result = {}, i, attr;\n    for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers\n        for (attr in arguments[i]) {\n            if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === \"undefined\") {\n                result[attr] = arguments[i][attr];\n            }\n        }\n    }\n    return result;\n};\n\n/**\n * Transform arbitrary content into a Promise.\n * @param {String} name a name for the content being processed.\n * @param {Object} inputData the content to process.\n * @param {Boolean} isBinary true if the content is not an unicode string\n * @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character.\n * @param {Boolean} isBase64 true if the string content is encoded with base64.\n * @return {Promise} a promise in a format usable by JSZip.\n */\nexports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) {\n\n    // if inputData is already a promise, this flatten it.\n    var promise = _external_js__WEBPACK_IMPORTED_MODULE_5__.e.Promise.resolve(inputData).then(function(data) {\n        \n        \n        var isBlob = _support_js__WEBPACK_IMPORTED_MODULE_1__.s.blob && (data instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(data)) !== -1);\n\n        if (isBlob && typeof FileReader !== \"undefined\") {\n            return new _external_js__WEBPACK_IMPORTED_MODULE_5__.e.Promise(function (resolve, reject) {\n                var reader = new FileReader();\n\n                reader.onload = function(e) {\n                    resolve(e.target.result);\n                };\n                reader.onerror = function(e) {\n                    reject(e.target.error);\n                };\n                reader.readAsArrayBuffer(data);\n            });\n        } else {\n            return data;\n        }\n    });\n\n    return promise.then(function(data) {\n        var dataType = exports.getTypeOf(data);\n\n        if (!dataType) {\n            return _external_js__WEBPACK_IMPORTED_MODULE_5__.e.Promise.reject(\n                new Error(\"Can't read the data of '\" + name + \"'. Is it \" +\n                          \"in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?\")\n            );\n        }\n        // special case : it's way easier to work with Uint8Array than with ArrayBuffer\n        if (dataType === \"arraybuffer\") {\n            data = exports.transformTo(\"uint8array\", data);\n        } else if (dataType === \"string\") {\n            if (isBase64) {\n                data = _base64_js__WEBPACK_IMPORTED_MODULE_2__.b.decode(data);\n            }\n            else if (isBinary) {\n                // optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask\n                if (isOptimizedBinaryString !== true) {\n                    // this is a string, not in a base64 format.\n                    // Be sure that this is a correct \"binary string\"\n                    data = string2binary(data);\n                }\n            }\n        }\n        return data;\n    });\n};\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/zipEntries.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/zipEntries.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"z\": () => (/* binding */ zipEntries)\n/* harmony export */ });\n/* harmony import */ var _reader_readerFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reader/readerFor.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/readerFor.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _signature_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./signature.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/signature.js\");\n/* harmony import */ var _zipEntry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./zipEntry.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/zipEntry.js\");\n/* harmony import */ var _utf8_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utf8.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utf8.js\");\n/* harmony import */ var _support_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./support.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/support.js\");\n\n\n\n\n\n\n\n//  class ZipEntries {{{\n/**\n * All the entries in the zip file.\n * @constructor\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntries(loadOptions) {\n    this.files = [];\n    this.loadOptions = loadOptions;\n}\nZipEntries.prototype = {\n    /**\n     * Check that the reader is on the specified signature.\n     * @param {string} expectedSignature the expected signature.\n     * @throws {Error} if it is an other signature.\n     */\n    checkSignature: function(expectedSignature) {\n        if (!this.reader.readAndCheckSignature(expectedSignature)) {\n            this.reader.index -= 4;\n            var signature = this.reader.readString(4);\n            throw new Error(\"Corrupted zip or bug: unexpected signature \" + \"(\" + _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.pretty(signature) + \", expected \" + _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.pretty(expectedSignature) + \")\");\n        }\n    },\n    /**\n     * Check if the given signature is at the given index.\n     * @param {number} askedIndex the index to check.\n     * @param {string} expectedSignature the signature to expect.\n     * @return {boolean} true if the signature is here, false otherwise.\n     */\n    isSignature: function(askedIndex, expectedSignature) {\n        var currentIndex = this.reader.index;\n        this.reader.setIndex(askedIndex);\n        var signature = this.reader.readString(4);\n        var result = signature === expectedSignature;\n        this.reader.setIndex(currentIndex);\n        return result;\n    },\n    /**\n     * Read the end of the central directory.\n     */\n    readBlockEndOfCentral: function() {\n        this.diskNumber = this.reader.readInt(2);\n        this.diskWithCentralDirStart = this.reader.readInt(2);\n        this.centralDirRecordsOnThisDisk = this.reader.readInt(2);\n        this.centralDirRecords = this.reader.readInt(2);\n        this.centralDirSize = this.reader.readInt(4);\n        this.centralDirOffset = this.reader.readInt(4);\n\n        this.zipCommentLength = this.reader.readInt(2);\n        // warning : the encoding depends of the system locale\n        // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.\n        // On a windows machine, this field is encoded with the localized windows code page.\n        var zipComment = this.reader.readData(this.zipCommentLength);\n        var decodeParamType = _support_js__WEBPACK_IMPORTED_MODULE_5__.s.uint8array ? \"uint8array\" : \"array\";\n        // To get consistent behavior with the generation part, we will assume that\n        // this is utf8 encoded unless specified otherwise.\n        var decodeContent = _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.transformTo(decodeParamType, zipComment);\n        this.zipComment = this.loadOptions.decodeFileName(decodeContent);\n    },\n    /**\n     * Read the end of the Zip 64 central directory.\n     * Not merged with the method readEndOfCentral :\n     * The end of central can coexist with its Zip64 brother,\n     * I don't want to read the wrong number of bytes !\n     */\n    readBlockZip64EndOfCentral: function() {\n        this.zip64EndOfCentralSize = this.reader.readInt(8);\n        this.reader.skip(4);\n        // this.versionMadeBy = this.reader.readString(2);\n        // this.versionNeeded = this.reader.readInt(2);\n        this.diskNumber = this.reader.readInt(4);\n        this.diskWithCentralDirStart = this.reader.readInt(4);\n        this.centralDirRecordsOnThisDisk = this.reader.readInt(8);\n        this.centralDirRecords = this.reader.readInt(8);\n        this.centralDirSize = this.reader.readInt(8);\n        this.centralDirOffset = this.reader.readInt(8);\n\n        this.zip64ExtensibleData = {};\n        var extraDataSize = this.zip64EndOfCentralSize - 44,\n            index = 0,\n            extraFieldId,\n            extraFieldLength,\n            extraFieldValue;\n        while (index < extraDataSize) {\n            extraFieldId = this.reader.readInt(2);\n            extraFieldLength = this.reader.readInt(4);\n            extraFieldValue = this.reader.readData(extraFieldLength);\n            this.zip64ExtensibleData[extraFieldId] = {\n                id: extraFieldId,\n                length: extraFieldLength,\n                value: extraFieldValue\n            };\n        }\n    },\n    /**\n     * Read the end of the Zip 64 central directory locator.\n     */\n    readBlockZip64EndOfCentralLocator: function() {\n        this.diskWithZip64CentralDirStart = this.reader.readInt(4);\n        this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);\n        this.disksCount = this.reader.readInt(4);\n        if (this.disksCount > 1) {\n            throw new Error(\"Multi-volumes zip are not supported\");\n        }\n    },\n    /**\n     * Read the local files, based on the offset read in the central part.\n     */\n    readLocalFiles: function() {\n        var i, file;\n        for (i = 0; i < this.files.length; i++) {\n            file = this.files[i];\n            this.reader.setIndex(file.localHeaderOffset);\n            this.checkSignature(_signature_js__WEBPACK_IMPORTED_MODULE_2__.s.LOCAL_FILE_HEADER);\n            file.readLocalPart(this.reader);\n            file.handleUTF8();\n            file.processAttributes();\n        }\n    },\n    /**\n     * Read the central directory.\n     */\n    readCentralDir: function() {\n        var file;\n\n        this.reader.setIndex(this.centralDirOffset);\n        while (this.reader.readAndCheckSignature(_signature_js__WEBPACK_IMPORTED_MODULE_2__.s.CENTRAL_FILE_HEADER)) {\n            file = new _zipEntry_js__WEBPACK_IMPORTED_MODULE_3__.z({\n                zip64: this.zip64\n            }, this.loadOptions);\n            file.readCentralPart(this.reader);\n            this.files.push(file);\n        }\n\n        if (this.centralDirRecords !== this.files.length) {\n            if (this.centralDirRecords !== 0 && this.files.length === 0) {\n                // We expected some records but couldn't find ANY.\n                // This is really suspicious, as if something went wrong.\n                throw new Error(\"Corrupted zip or bug: expected \" + this.centralDirRecords + \" records in central dir, got \" + this.files.length);\n            }\n        }\n    },\n    /**\n     * Read the end of central directory.\n     */\n    readEndOfCentral: function() {\n        var offset = this.reader.lastIndexOfSignature(_signature_js__WEBPACK_IMPORTED_MODULE_2__.s.CENTRAL_DIRECTORY_END);\n        if (offset < 0) {\n            // Check if the content is a truncated zip or complete garbage.\n            // A \"LOCAL_FILE_HEADER\" is not required at the beginning (auto\n            // extractible zip for example) but it can give a good hint.\n            // If an ajax request was used without responseType, we will also\n            // get unreadable data.\n            var isGarbage = !this.isSignature(0, _signature_js__WEBPACK_IMPORTED_MODULE_2__.s.LOCAL_FILE_HEADER);\n\n            if (isGarbage) {\n                throw new Error(\"Can't find end of central directory : is this a zip file ? \" +\n                                \"If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html\");\n            } else {\n                throw new Error(\"Corrupted zip: can't find end of central directory\");\n            }\n\n        }\n        this.reader.setIndex(offset);\n        var endOfCentralDirOffset = offset;\n        this.checkSignature(_signature_js__WEBPACK_IMPORTED_MODULE_2__.s.CENTRAL_DIRECTORY_END);\n        this.readBlockEndOfCentral();\n\n\n        /* extract from the zip spec :\n            4)  If one of the fields in the end of central directory\n                record is too small to hold required data, the field\n                should be set to -1 (0xFFFF or 0xFFFFFFFF) and the\n                ZIP64 format record should be created.\n            5)  The end of central directory record and the\n                Zip64 end of central directory locator record must\n                reside on the same disk when splitting or spanning\n                an archive.\n         */\n        if (this.diskNumber === _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.MAX_VALUE_16BITS || this.diskWithCentralDirStart === _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.MAX_VALUE_16BITS || this.centralDirRecords === _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.MAX_VALUE_16BITS || this.centralDirSize === _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.MAX_VALUE_32BITS || this.centralDirOffset === _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.MAX_VALUE_32BITS) {\n            this.zip64 = true;\n\n            /*\n            Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from\n            the zip file can fit into a 32bits integer. This cannot be solved : JavaScript represents\n            all numbers as 64-bit double precision IEEE 754 floating point numbers.\n            So, we have 53bits for integers and bitwise operations treat everything as 32bits.\n            see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators\n            and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5\n            */\n\n            // should look for a zip64 EOCD locator\n            offset = this.reader.lastIndexOfSignature(_signature_js__WEBPACK_IMPORTED_MODULE_2__.s.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n            if (offset < 0) {\n                throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory locator\");\n            }\n            this.reader.setIndex(offset);\n            this.checkSignature(_signature_js__WEBPACK_IMPORTED_MODULE_2__.s.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n            this.readBlockZip64EndOfCentralLocator();\n\n            // now the zip64 EOCD record\n            if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, _signature_js__WEBPACK_IMPORTED_MODULE_2__.s.ZIP64_CENTRAL_DIRECTORY_END)) {\n                // console.warn(\"ZIP64 end of central directory not where expected.\");\n                this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(_signature_js__WEBPACK_IMPORTED_MODULE_2__.s.ZIP64_CENTRAL_DIRECTORY_END);\n                if (this.relativeOffsetEndOfZip64CentralDir < 0) {\n                    throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory\");\n                }\n            }\n            this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);\n            this.checkSignature(_signature_js__WEBPACK_IMPORTED_MODULE_2__.s.ZIP64_CENTRAL_DIRECTORY_END);\n            this.readBlockZip64EndOfCentral();\n        }\n\n        var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize;\n        if (this.zip64) {\n            expectedEndOfCentralDirOffset += 20; // end of central dir 64 locator\n            expectedEndOfCentralDirOffset += 12 /* should not include the leading 12 bytes */ + this.zip64EndOfCentralSize;\n        }\n\n        var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset;\n\n        if (extraBytes > 0) {\n            // console.warn(extraBytes, \"extra bytes at beginning or within zipfile\");\n            if (this.isSignature(endOfCentralDirOffset, _signature_js__WEBPACK_IMPORTED_MODULE_2__.s.CENTRAL_FILE_HEADER)) ; else {\n                // the offset is wrong, update the \"zero\" of the reader\n                // this happens if data has been prepended (crx files for example)\n                this.reader.zero = extraBytes;\n            }\n        } else if (extraBytes < 0) {\n            throw new Error(\"Corrupted zip: missing \" + Math.abs(extraBytes) + \" bytes.\");\n        }\n    },\n    prepareReader: function(data) {\n        this.reader = (0,_reader_readerFor_js__WEBPACK_IMPORTED_MODULE_0__.r)(data);\n    },\n    /**\n     * Read a zip file and create ZipEntries.\n     * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.\n     */\n    load: function(data) {\n        this.prepareReader(data);\n        this.readEndOfCentral();\n        this.readCentralDir();\n        this.readLocalFiles();\n    }\n};\n// }}} end of ZipEntries\nvar zipEntries = ZipEntries;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/zipEntries.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/zipEntry.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/zipEntry.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"z\": () => (/* binding */ zipEntry)\n/* harmony export */ });\n/* harmony import */ var _reader_readerFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reader/readerFor.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/reader/readerFor.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utils.js\");\n/* harmony import */ var _compressedObject_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./compressedObject.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/compressedObject.js\");\n/* harmony import */ var _crc32_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./crc32.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/crc32.js\");\n/* harmony import */ var _utf8_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utf8.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utf8.js\");\n/* harmony import */ var _compressions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./compressions.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/compressions.js\");\n/* harmony import */ var _support_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./support.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/support.js\");\n\n\n\n\n\n\n\n\nvar MADE_BY_DOS = 0x00;\nvar MADE_BY_UNIX = 0x03;\n\n/**\n * Find a compression registered in JSZip.\n * @param {string} compressionMethod the method magic to find.\n * @return {Object|null} the JSZip compression object, null if none found.\n */\nvar findCompression = function(compressionMethod) {\n    for (var method in _compressions_js__WEBPACK_IMPORTED_MODULE_5__.c) {\n        if (!_compressions_js__WEBPACK_IMPORTED_MODULE_5__.c.hasOwnProperty(method)) {\n            continue;\n        }\n        if (_compressions_js__WEBPACK_IMPORTED_MODULE_5__.c[method].magic === compressionMethod) {\n            return _compressions_js__WEBPACK_IMPORTED_MODULE_5__.c[method];\n        }\n    }\n    return null;\n};\n\n// class ZipEntry {{{\n/**\n * An entry in the zip file.\n * @constructor\n * @param {Object} options Options of the current file.\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntry(options, loadOptions) {\n    this.options = options;\n    this.loadOptions = loadOptions;\n}\nZipEntry.prototype = {\n    /**\n     * say if the file is encrypted.\n     * @return {boolean} true if the file is encrypted, false otherwise.\n     */\n    isEncrypted: function() {\n        // bit 1 is set\n        return (this.bitFlag & 0x0001) === 0x0001;\n    },\n    /**\n     * say if the file has utf-8 filename/comment.\n     * @return {boolean} true if the filename/comment is in utf-8, false otherwise.\n     */\n    useUTF8: function() {\n        // bit 11 is set\n        return (this.bitFlag & 0x0800) === 0x0800;\n    },\n    /**\n     * Read the local part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readLocalPart: function(reader) {\n        var compression, localExtraFieldsLength;\n\n        // we already know everything from the central dir !\n        // If the central dir data are false, we are doomed.\n        // On the bright side, the local part is scary  : zip64, data descriptors, both, etc.\n        // The less data we get here, the more reliable this should be.\n        // Let's skip the whole header and dash to the data !\n        reader.skip(22);\n        // in some zip created on windows, the filename stored in the central dir contains \\ instead of /.\n        // Strangely, the filename here is OK.\n        // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes\n        // or APPNOTE#4.4.17.1, \"All slashes MUST be forward slashes '/'\") but there are a lot of bad zip generators...\n        // Search \"unzip mismatching \"local\" filename continuing with \"central\" filename version\" on\n        // the internet.\n        //\n        // I think I see the logic here : the central directory is used to display\n        // content and the local directory is used to extract the files. Mixing / and \\\n        // may be used to display \\ to windows users and use / when extracting the files.\n        // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394\n        this.fileNameLength = reader.readInt(2);\n        localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir\n        // the fileName is stored as binary data, the handleUTF8 method will take care of the encoding.\n        this.fileName = reader.readData(this.fileNameLength);\n        reader.skip(localExtraFieldsLength);\n\n        if (this.compressedSize === -1 || this.uncompressedSize === -1) {\n            throw new Error(\"Bug or corrupted zip : didn't get enough informations from the central directory \" + \"(compressedSize === -1 || uncompressedSize === -1)\");\n        }\n\n        compression = findCompression(this.compressionMethod);\n        if (compression === null) { // no compression found\n            throw new Error(\"Corrupted zip : compression \" + _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.pretty(this.compressionMethod) + \" unknown (inner file : \" + _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.transformTo(\"string\", this.fileName) + \")\");\n        }\n        this.decompressed = new _compressedObject_js__WEBPACK_IMPORTED_MODULE_2__.c(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize));\n    },\n\n    /**\n     * Read the central part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readCentralPart: function(reader) {\n        this.versionMadeBy = reader.readInt(2);\n        reader.skip(2);\n        // this.versionNeeded = reader.readInt(2);\n        this.bitFlag = reader.readInt(2);\n        this.compressionMethod = reader.readString(2);\n        this.date = reader.readDate();\n        this.crc32 = reader.readInt(4);\n        this.compressedSize = reader.readInt(4);\n        this.uncompressedSize = reader.readInt(4);\n        var fileNameLength = reader.readInt(2);\n        this.extraFieldsLength = reader.readInt(2);\n        this.fileCommentLength = reader.readInt(2);\n        this.diskNumberStart = reader.readInt(2);\n        this.internalFileAttributes = reader.readInt(2);\n        this.externalFileAttributes = reader.readInt(4);\n        this.localHeaderOffset = reader.readInt(4);\n\n        if (this.isEncrypted()) {\n            throw new Error(\"Encrypted zip are not supported\");\n        }\n\n        // will be read in the local part, see the comments there\n        reader.skip(fileNameLength);\n        this.readExtraFields(reader);\n        this.parseZIP64ExtraField(reader);\n        this.fileComment = reader.readData(this.fileCommentLength);\n    },\n\n    /**\n     * Parse the external file attributes and get the unix/dos permissions.\n     */\n    processAttributes: function () {\n        this.unixPermissions = null;\n        this.dosPermissions = null;\n        var madeBy = this.versionMadeBy >> 8;\n\n        // Check if we have the DOS directory flag set.\n        // We look for it in the DOS and UNIX permissions\n        // but some unknown platform could set it as a compatibility flag.\n        this.dir = this.externalFileAttributes & 0x0010 ? true : false;\n\n        if(madeBy === MADE_BY_DOS) {\n            // first 6 bits (0 to 5)\n            this.dosPermissions = this.externalFileAttributes & 0x3F;\n        }\n\n        if(madeBy === MADE_BY_UNIX) {\n            this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF;\n            // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8);\n        }\n\n        // fail safe : if the name ends with a / it probably means a folder\n        if (!this.dir && this.fileNameStr.slice(-1) === '/') {\n            this.dir = true;\n        }\n    },\n\n    /**\n     * Parse the ZIP64 extra field and merge the info in the current ZipEntry.\n     * @param {DataReader} reader the reader to use.\n     */\n    parseZIP64ExtraField: function(reader) {\n\n        if (!this.extraFields[0x0001]) {\n            return;\n        }\n\n        // should be something, preparing the extra reader\n        var extraReader = (0,_reader_readerFor_js__WEBPACK_IMPORTED_MODULE_0__.r)(this.extraFields[0x0001].value);\n\n        // I really hope that these 64bits integer can fit in 32 bits integer, because js\n        // won't let us have more.\n        if (this.uncompressedSize === _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.MAX_VALUE_32BITS) {\n            this.uncompressedSize = extraReader.readInt(8);\n        }\n        if (this.compressedSize === _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.MAX_VALUE_32BITS) {\n            this.compressedSize = extraReader.readInt(8);\n        }\n        if (this.localHeaderOffset === _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.MAX_VALUE_32BITS) {\n            this.localHeaderOffset = extraReader.readInt(8);\n        }\n        if (this.diskNumberStart === _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.MAX_VALUE_32BITS) {\n            this.diskNumberStart = extraReader.readInt(4);\n        }\n    },\n    /**\n     * Read the central part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readExtraFields: function(reader) {\n        var end = reader.index + this.extraFieldsLength,\n            extraFieldId,\n            extraFieldLength,\n            extraFieldValue;\n\n        if (!this.extraFields) {\n            this.extraFields = {};\n        }\n\n        while (reader.index < end) {\n            extraFieldId = reader.readInt(2);\n            extraFieldLength = reader.readInt(2);\n            extraFieldValue = reader.readData(extraFieldLength);\n\n            this.extraFields[extraFieldId] = {\n                id: extraFieldId,\n                length: extraFieldLength,\n                value: extraFieldValue\n            };\n        }\n    },\n    /**\n     * Apply an UTF8 transformation if needed.\n     */\n    handleUTF8: function() {\n        var decodeParamType = _support_js__WEBPACK_IMPORTED_MODULE_6__.s.uint8array ? \"uint8array\" : \"array\";\n        if (this.useUTF8()) {\n            this.fileNameStr = _utf8_js__WEBPACK_IMPORTED_MODULE_4__.u.utf8decode(this.fileName);\n            this.fileCommentStr = _utf8_js__WEBPACK_IMPORTED_MODULE_4__.u.utf8decode(this.fileComment);\n        } else {\n            var upath = this.findExtraFieldUnicodePath();\n            if (upath !== null) {\n                this.fileNameStr = upath;\n            } else {\n                // ASCII text or unsupported code page\n                var fileNameByteArray =  _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.transformTo(decodeParamType, this.fileName);\n                this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray);\n            }\n\n            var ucomment = this.findExtraFieldUnicodeComment();\n            if (ucomment !== null) {\n                this.fileCommentStr = ucomment;\n            } else {\n                // ASCII text or unsupported code page\n                var commentByteArray =  _utils_js__WEBPACK_IMPORTED_MODULE_1__.u.transformTo(decodeParamType, this.fileComment);\n                this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray);\n            }\n        }\n    },\n\n    /**\n     * Find the unicode path declared in the extra field, if any.\n     * @return {String} the unicode path, null otherwise.\n     */\n    findExtraFieldUnicodePath: function() {\n        var upathField = this.extraFields[0x7075];\n        if (upathField) {\n            var extraReader = (0,_reader_readerFor_js__WEBPACK_IMPORTED_MODULE_0__.r)(upathField.value);\n\n            // wrong version\n            if (extraReader.readInt(1) !== 1) {\n                return null;\n            }\n\n            // the crc of the filename changed, this field is out of date.\n            if ((0,_crc32_js__WEBPACK_IMPORTED_MODULE_3__.c)(this.fileName) !== extraReader.readInt(4)) {\n                return null;\n            }\n\n            return _utf8_js__WEBPACK_IMPORTED_MODULE_4__.u.utf8decode(extraReader.readData(upathField.length - 5));\n        }\n        return null;\n    },\n\n    /**\n     * Find the unicode comment declared in the extra field, if any.\n     * @return {String} the unicode comment, null otherwise.\n     */\n    findExtraFieldUnicodeComment: function() {\n        var ucommentField = this.extraFields[0x6375];\n        if (ucommentField) {\n            var extraReader = (0,_reader_readerFor_js__WEBPACK_IMPORTED_MODULE_0__.r)(ucommentField.value);\n\n            // wrong version\n            if (extraReader.readInt(1) !== 1) {\n                return null;\n            }\n\n            // the crc of the comment changed, this field is out of date.\n            if ((0,_crc32_js__WEBPACK_IMPORTED_MODULE_3__.c)(this.fileComment) !== extraReader.readInt(4)) {\n                return null;\n            }\n\n            return _utf8_js__WEBPACK_IMPORTED_MODULE_4__.u.utf8decode(extraReader.readData(ucommentField.length - 5));\n        }\n        return null;\n    }\n};\nvar zipEntry = ZipEntry;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/zipEntry.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/lib/zipObject.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/lib/zipObject.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"z\": () => (/* binding */ zipObject)\n/* harmony export */ });\n/* harmony import */ var _stream_StreamHelper_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./stream/StreamHelper.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/StreamHelper.js\");\n/* harmony import */ var _stream_DataWorker_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./stream/DataWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/DataWorker.js\");\n/* harmony import */ var _utf8_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utf8.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/utf8.js\");\n/* harmony import */ var _compressedObject_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./compressedObject.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/compressedObject.js\");\n/* harmony import */ var _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stream/GenericWorker.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/lib/stream/GenericWorker.js\");\n\n\n\n\n\n\n/**\n * A simple object representing a file in the zip file.\n * @constructor\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data\n * @param {Object} options the options of the file\n */\nvar ZipObject = function(name, data, options) {\n    this.name = name;\n    this.dir = options.dir;\n    this.date = options.date;\n    this.comment = options.comment;\n    this.unixPermissions = options.unixPermissions;\n    this.dosPermissions = options.dosPermissions;\n\n    this._data = data;\n    this._dataBinary = options.binary;\n    // keep only the compression\n    this.options = {\n        compression : options.compression,\n        compressionOptions : options.compressionOptions\n    };\n};\n\nZipObject.prototype = {\n    /**\n     * Create an internal stream for the content of this object.\n     * @param {String} type the type of each chunk.\n     * @return StreamHelper the stream.\n     */\n    internalStream: function (type) {\n        var result = null, outputType = \"string\";\n        try {\n            if (!type) {\n                throw new Error(\"No output type specified.\");\n            }\n            outputType = type.toLowerCase();\n            var askUnicodeString = outputType === \"string\" || outputType === \"text\";\n            if (outputType === \"binarystring\" || outputType === \"text\") {\n                outputType = \"string\";\n            }\n            result = this._decompressWorker();\n\n            var isUnicodeString = !this._dataBinary;\n\n            if (isUnicodeString && !askUnicodeString) {\n                result = result.pipe(new _utf8_js__WEBPACK_IMPORTED_MODULE_2__.u.Utf8EncodeWorker());\n            }\n            if (!isUnicodeString && askUnicodeString) {\n                result = result.pipe(new _utf8_js__WEBPACK_IMPORTED_MODULE_2__.u.Utf8DecodeWorker());\n            }\n        } catch (e) {\n            result = new _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_4__.G(\"error\");\n            result.error(e);\n        }\n\n        return new _stream_StreamHelper_js__WEBPACK_IMPORTED_MODULE_0__.S(result, outputType, \"\");\n    },\n\n    /**\n     * Prepare the content in the asked type.\n     * @param {String} type the type of the result.\n     * @param {Function} onUpdate a function to call on each internal update.\n     * @return Promise the promise of the result.\n     */\n    async: function (type, onUpdate) {\n        return this.internalStream(type).accumulate(onUpdate);\n    },\n\n    /**\n     * Prepare the content as a nodejs stream.\n     * @param {String} type the type of each chunk.\n     * @param {Function} onUpdate a function to call on each internal update.\n     * @return Stream the stream.\n     */\n    nodeStream: function (type, onUpdate) {\n        return this.internalStream(type || \"nodebuffer\").toNodejsStream(onUpdate);\n    },\n\n    /**\n     * Return a worker for the compressed content.\n     * @private\n     * @param {Object} compression the compression object to use.\n     * @param {Object} compressionOptions the options to use when compressing.\n     * @return Worker the worker.\n     */\n    _compressWorker: function (compression, compressionOptions) {\n        if (\n            this._data instanceof _compressedObject_js__WEBPACK_IMPORTED_MODULE_3__.c &&\n            this._data.compression.magic === compression.magic\n        ) {\n            return this._data.getCompressedWorker();\n        } else {\n            var result = this._decompressWorker();\n            if(!this._dataBinary) {\n                result = result.pipe(new _utf8_js__WEBPACK_IMPORTED_MODULE_2__.u.Utf8EncodeWorker());\n            }\n            return _compressedObject_js__WEBPACK_IMPORTED_MODULE_3__.c.createWorkerFrom(result, compression, compressionOptions);\n        }\n    },\n    /**\n     * Return a worker for the decompressed content.\n     * @private\n     * @return Worker the worker.\n     */\n    _decompressWorker : function () {\n        if (this._data instanceof _compressedObject_js__WEBPACK_IMPORTED_MODULE_3__.c) {\n            return this._data.getContentWorker();\n        } else if (this._data instanceof _stream_GenericWorker_js__WEBPACK_IMPORTED_MODULE_4__.G) {\n            return this._data;\n        } else {\n            return new _stream_DataWorker_js__WEBPACK_IMPORTED_MODULE_1__.D(this._data);\n        }\n    }\n};\n\nvar removedMethods = [\"asText\", \"asBinary\", \"asNodeBuffer\", \"asUint8Array\", \"asArrayBuffer\"];\nvar removedFn = function () {\n    throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n};\n\nfor(var i = 0; i < removedMethods.length; i++) {\n    ZipObject.prototype[removedMethods[i]] = removedFn;\n}\nvar zipObject = ZipObject;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/lib/zipObject.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/index.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/index.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"p\": () => (/* binding */ pako_1)\n/* harmony export */ });\n/* harmony import */ var _lib_utils_common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/utils/common.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/common.js\");\n/* harmony import */ var _lib_deflate_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/deflate.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/deflate.js\");\n/* harmony import */ var _lib_inflate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/inflate.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/inflate.js\");\n/* harmony import */ var _lib_zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/zlib/constants.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/constants.js\");\n\n\n\n\n\nvar assign    = _lib_utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.assign;\n\n\n\n\n\nvar pako = {};\n\nassign(pako, _lib_deflate_js__WEBPACK_IMPORTED_MODULE_1__.d, _lib_inflate_js__WEBPACK_IMPORTED_MODULE_2__.i, _lib_zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c);\n\nvar pako_1 = pako;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/index.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/deflate.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/deflate.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"d\": () => (/* binding */ deflate_1)\n/* harmony export */ });\n/* harmony import */ var _zlib_deflate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zlib/deflate.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/deflate.js\");\n/* harmony import */ var _utils_common_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/common.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/common.js\");\n/* harmony import */ var _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/strings.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/strings.js\");\n/* harmony import */ var _zlib_messages_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./zlib/messages.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/messages.js\");\n/* harmony import */ var _zlib_zstream_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./zlib/zstream.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/zstream.js\");\n\n\n\n\n\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH      = 0;\nvar Z_FINISH        = 4;\n\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\nvar Z_SYNC_FLUSH    = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY    = 0;\n\nvar Z_DEFLATED  = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param)  or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n *    (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n *   - `text` (Boolean) - true if compressed data believed to be text\n *   - `time` (Number) - modification time, unix timestamp\n *   - `os` (Number) - operation system code\n *   - `extra` (Array) - array of bytes with extra data (max 65536)\n *   - `name` (String) - file name (binary string)\n *   - `comment` (String) - comment (binary string)\n *   - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true);  // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n  if (!(this instanceof Deflate)) return new Deflate(options);\n\n  this.options = _utils_common_js__WEBPACK_IMPORTED_MODULE_1__.c.assign({\n    level: Z_DEFAULT_COMPRESSION,\n    method: Z_DEFLATED,\n    chunkSize: 16384,\n    windowBits: 15,\n    memLevel: 8,\n    strategy: Z_DEFAULT_STRATEGY,\n    to: ''\n  }, options || {});\n\n  var opt = this.options;\n\n  if (opt.raw && (opt.windowBits > 0)) {\n    opt.windowBits = -opt.windowBits;\n  }\n\n  else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n    opt.windowBits += 16;\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm = new _zlib_zstream_js__WEBPACK_IMPORTED_MODULE_4__.z();\n  this.strm.avail_out = 0;\n\n  var status = _zlib_deflate_js__WEBPACK_IMPORTED_MODULE_0__.d.deflateInit2(\n    this.strm,\n    opt.level,\n    opt.method,\n    opt.windowBits,\n    opt.memLevel,\n    opt.strategy\n  );\n\n  if (status !== Z_OK) {\n    throw new Error(_zlib_messages_js__WEBPACK_IMPORTED_MODULE_3__.m[status]);\n  }\n\n  if (opt.header) {\n    _zlib_deflate_js__WEBPACK_IMPORTED_MODULE_0__.d.deflateSetHeader(this.strm, opt.header);\n  }\n\n  if (opt.dictionary) {\n    var dict;\n    // Convert data if needed\n    if (typeof opt.dictionary === 'string') {\n      // If we need to compress text, change encoding to utf8.\n      dict = _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.s.string2buf(opt.dictionary);\n    } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n      dict = new Uint8Array(opt.dictionary);\n    } else {\n      dict = opt.dictionary;\n    }\n\n    status = _zlib_deflate_js__WEBPACK_IMPORTED_MODULE_0__.d.deflateSetDictionary(this.strm, dict);\n\n    if (status !== Z_OK) {\n      throw new Error(_zlib_messages_js__WEBPACK_IMPORTED_MODULE_3__.m[status]);\n    }\n\n    this._dict_set = true;\n  }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n *   converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n  var strm = this.strm;\n  var chunkSize = this.options.chunkSize;\n  var status, _mode;\n\n  if (this.ended) { return false; }\n\n  _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n  // Convert data if needed\n  if (typeof data === 'string') {\n    // If we need to compress text, change encoding to utf8.\n    strm.input = _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.s.string2buf(data);\n  } else if (toString.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  do {\n    if (strm.avail_out === 0) {\n      strm.output = new _utils_common_js__WEBPACK_IMPORTED_MODULE_1__.c.Buf8(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n    status = _zlib_deflate_js__WEBPACK_IMPORTED_MODULE_0__.d.deflate(strm, _mode);    /* no bad return value */\n\n    if (status !== Z_STREAM_END && status !== Z_OK) {\n      this.onEnd(status);\n      this.ended = true;\n      return false;\n    }\n    if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n      if (this.options.to === 'string') {\n        this.onData(_utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.s.buf2binstring(_utils_common_js__WEBPACK_IMPORTED_MODULE_1__.c.shrinkBuf(strm.output, strm.next_out)));\n      } else {\n        this.onData(_utils_common_js__WEBPACK_IMPORTED_MODULE_1__.c.shrinkBuf(strm.output, strm.next_out));\n      }\n    }\n  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n  // Finalize on the last chunk.\n  if (_mode === Z_FINISH) {\n    status = _zlib_deflate_js__WEBPACK_IMPORTED_MODULE_0__.d.deflateEnd(this.strm);\n    this.onEnd(status);\n    this.ended = true;\n    return status === Z_OK;\n  }\n\n  // callback interim results if Z_SYNC_FLUSH.\n  if (_mode === Z_SYNC_FLUSH) {\n    this.onEnd(Z_OK);\n    strm.avail_out = 0;\n    return true;\n  }\n\n  return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n *   on js engine support. When string output requested, each chunk\n *   will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n  // On success - join\n  if (status === Z_OK) {\n    if (this.options.to === 'string') {\n      this.result = this.chunks.join('');\n    } else {\n      this.result = _utils_common_js__WEBPACK_IMPORTED_MODULE_1__.c.flattenChunks(this.chunks);\n    }\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n *    (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n  var deflator = new Deflate(options);\n\n  deflator.push(input, true);\n\n  // That will never happens, if you don't cheat with options :)\n  if (deflator.err) { throw deflator.msg || _zlib_messages_js__WEBPACK_IMPORTED_MODULE_3__.m[deflator.err]; }\n\n  return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n  options = options || {};\n  options.gzip = true;\n  return deflate(input, options);\n}\n\n\nvar Deflate_1 = Deflate;\nvar deflate_2 = deflate;\nvar deflateRaw_1 = deflateRaw;\nvar gzip_1 = gzip;\n\nvar deflate_1 = {\n\tDeflate: Deflate_1,\n\tdeflate: deflate_2,\n\tdeflateRaw: deflateRaw_1,\n\tgzip: gzip_1\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/deflate.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/inflate.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/inflate.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"i\": () => (/* binding */ inflate_1)\n/* harmony export */ });\n/* harmony import */ var _zlib_inflate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zlib/inflate.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/inflate.js\");\n/* harmony import */ var _utils_common_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/common.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/common.js\");\n/* harmony import */ var _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/strings.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/strings.js\");\n/* harmony import */ var _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./zlib/constants.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/constants.js\");\n/* harmony import */ var _zlib_messages_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./zlib/messages.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/messages.js\");\n/* harmony import */ var _zlib_zstream_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./zlib/zstream.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/zstream.js\");\n/* harmony import */ var _zlib_gzheader_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./zlib/gzheader.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/gzheader.js\");\n\n\n\n\n\n\n\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true);  // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n  if (!(this instanceof Inflate)) return new Inflate(options);\n\n  this.options = _utils_common_js__WEBPACK_IMPORTED_MODULE_1__.c.assign({\n    chunkSize: 16384,\n    windowBits: 0,\n    to: ''\n  }, options || {});\n\n  var opt = this.options;\n\n  // Force window size for `raw` data, if not set directly,\n  // because we have no header for autodetect.\n  if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n    opt.windowBits = -opt.windowBits;\n    if (opt.windowBits === 0) { opt.windowBits = -15; }\n  }\n\n  // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n  if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n      !(options && options.windowBits)) {\n    opt.windowBits += 32;\n  }\n\n  // Gzip header has no info about windows size, we can do autodetect only\n  // for deflate. So, if window size not set, force it to max when gzip possible\n  if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n    // bit 3 (16) -> gzipped data\n    // bit 4 (32) -> autodetect gzip/deflate\n    if ((opt.windowBits & 15) === 0) {\n      opt.windowBits |= 15;\n    }\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm   = new _zlib_zstream_js__WEBPACK_IMPORTED_MODULE_5__.z();\n  this.strm.avail_out = 0;\n\n  var status  = _zlib_inflate_js__WEBPACK_IMPORTED_MODULE_0__.i.inflateInit2(\n    this.strm,\n    opt.windowBits\n  );\n\n  if (status !== _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_OK) {\n    throw new Error(_zlib_messages_js__WEBPACK_IMPORTED_MODULE_4__.m[status]);\n  }\n\n  this.header = new _zlib_gzheader_js__WEBPACK_IMPORTED_MODULE_6__.g();\n\n  _zlib_inflate_js__WEBPACK_IMPORTED_MODULE_0__.i.inflateGetHeader(this.strm, this.header);\n\n  // Setup dictionary\n  if (opt.dictionary) {\n    // Convert data if needed\n    if (typeof opt.dictionary === 'string') {\n      opt.dictionary = _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.s.string2buf(opt.dictionary);\n    } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n      opt.dictionary = new Uint8Array(opt.dictionary);\n    }\n    if (opt.raw) { //In raw mode we need to set the dictionary early\n      status = _zlib_inflate_js__WEBPACK_IMPORTED_MODULE_0__.i.inflateSetDictionary(this.strm, opt.dictionary);\n      if (status !== _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_OK) {\n        throw new Error(_zlib_messages_js__WEBPACK_IMPORTED_MODULE_4__.m[status]);\n      }\n    }\n  }\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n  var strm = this.strm;\n  var chunkSize = this.options.chunkSize;\n  var dictionary = this.options.dictionary;\n  var status, _mode;\n  var next_out_utf8, tail, utf8str;\n\n  // Flag to properly process Z_BUF_ERROR on testing inflate call\n  // when we check that all output data was flushed.\n  var allowBufError = false;\n\n  if (this.ended) { return false; }\n  _mode = (mode === ~~mode) ? mode : ((mode === true) ? _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_FINISH : _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_NO_FLUSH);\n\n  // Convert data if needed\n  if (typeof data === 'string') {\n    // Only binary strings can be decompressed on practice\n    strm.input = _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.s.binstring2buf(data);\n  } else if (toString.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  do {\n    if (strm.avail_out === 0) {\n      strm.output = new _utils_common_js__WEBPACK_IMPORTED_MODULE_1__.c.Buf8(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n\n    status = _zlib_inflate_js__WEBPACK_IMPORTED_MODULE_0__.i.inflate(strm, _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_NO_FLUSH);    /* no bad return value */\n\n    if (status === _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_NEED_DICT && dictionary) {\n      status = _zlib_inflate_js__WEBPACK_IMPORTED_MODULE_0__.i.inflateSetDictionary(this.strm, dictionary);\n    }\n\n    if (status === _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_BUF_ERROR && allowBufError === true) {\n      status = _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_OK;\n      allowBufError = false;\n    }\n\n    if (status !== _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_STREAM_END && status !== _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_OK) {\n      this.onEnd(status);\n      this.ended = true;\n      return false;\n    }\n\n    if (strm.next_out) {\n      if (strm.avail_out === 0 || status === _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_FINISH || _mode === _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_SYNC_FLUSH))) {\n\n        if (this.options.to === 'string') {\n\n          next_out_utf8 = _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.s.utf8border(strm.output, strm.next_out);\n\n          tail = strm.next_out - next_out_utf8;\n          utf8str = _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.s.buf2string(strm.output, next_out_utf8);\n\n          // move tail\n          strm.next_out = tail;\n          strm.avail_out = chunkSize - tail;\n          if (tail) { _utils_common_js__WEBPACK_IMPORTED_MODULE_1__.c.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n          this.onData(utf8str);\n\n        } else {\n          this.onData(_utils_common_js__WEBPACK_IMPORTED_MODULE_1__.c.shrinkBuf(strm.output, strm.next_out));\n        }\n      }\n    }\n\n    // When no more input data, we should check that internal inflate buffers\n    // are flushed. The only way to do it when avail_out = 0 - run one more\n    // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n    // Here we set flag to process this error properly.\n    //\n    // NOTE. Deflate does not return error in this case and does not needs such\n    // logic.\n    if (strm.avail_in === 0 && strm.avail_out === 0) {\n      allowBufError = true;\n    }\n\n  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_STREAM_END);\n\n  if (status === _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_STREAM_END) {\n    _mode = _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_FINISH;\n  }\n\n  // Finalize on the last chunk.\n  if (_mode === _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_FINISH) {\n    status = _zlib_inflate_js__WEBPACK_IMPORTED_MODULE_0__.i.inflateEnd(this.strm);\n    this.onEnd(status);\n    this.ended = true;\n    return status === _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_OK;\n  }\n\n  // callback interim results if Z_SYNC_FLUSH.\n  if (_mode === _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_SYNC_FLUSH) {\n    this.onEnd(_zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_OK);\n    strm.avail_out = 0;\n    return true;\n  }\n\n  return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n *   on js engine support. When string output requested, each chunk\n *   will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n  // On success - join\n  if (status === _zlib_constants_js__WEBPACK_IMPORTED_MODULE_3__.c.Z_OK) {\n    if (this.options.to === 'string') {\n      // Glue & convert here, until we teach pako to send\n      // utf8 aligned strings to onData\n      this.result = this.chunks.join('');\n    } else {\n      this.result = _utils_common_js__WEBPACK_IMPORTED_MODULE_1__.c.flattenChunks(this.chunks);\n    }\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n *   , output;\n *\n * try {\n *   output = pako.inflate(input);\n * } catch (err)\n *   console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n  var inflator = new Inflate(options);\n\n  inflator.push(input, true);\n\n  // That will never happens, if you don't cheat with options :)\n  if (inflator.err) { throw inflator.msg || _zlib_messages_js__WEBPACK_IMPORTED_MODULE_4__.m[inflator.err]; }\n\n  return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nvar Inflate_1 = Inflate;\nvar inflate_2 = inflate;\nvar inflateRaw_1 = inflateRaw;\nvar ungzip  = inflate;\n\nvar inflate_1 = {\n\tInflate: Inflate_1,\n\tinflate: inflate_2,\n\tinflateRaw: inflateRaw_1,\n\tungzip: ungzip\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/inflate.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/common.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/common.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"c\": () => (/* binding */ common)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\nvar common = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module, exports) {\n\n\nvar TYPED_OK =  (typeof Uint8Array !== 'undefined') &&\n                (typeof Uint16Array !== 'undefined') &&\n                (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n  return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n  var sources = Array.prototype.slice.call(arguments, 1);\n  while (sources.length) {\n    var source = sources.shift();\n    if (!source) { continue; }\n\n    if (typeof source !== 'object') {\n      throw new TypeError(source + 'must be non-object');\n    }\n\n    for (var p in source) {\n      if (_has(source, p)) {\n        obj[p] = source[p];\n      }\n    }\n  }\n\n  return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n  if (buf.length === size) { return buf; }\n  if (buf.subarray) { return buf.subarray(0, size); }\n  buf.length = size;\n  return buf;\n};\n\n\nvar fnTyped = {\n  arraySet: function (dest, src, src_offs, len, dest_offs) {\n    if (src.subarray && dest.subarray) {\n      dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n      return;\n    }\n    // Fallback to ordinary array\n    for (var i = 0; i < len; i++) {\n      dest[dest_offs + i] = src[src_offs + i];\n    }\n  },\n  // Join array of chunks to single array.\n  flattenChunks: function (chunks) {\n    var i, l, len, pos, chunk, result;\n\n    // calculate data length\n    len = 0;\n    for (i = 0, l = chunks.length; i < l; i++) {\n      len += chunks[i].length;\n    }\n\n    // join chunks\n    result = new Uint8Array(len);\n    pos = 0;\n    for (i = 0, l = chunks.length; i < l; i++) {\n      chunk = chunks[i];\n      result.set(chunk, pos);\n      pos += chunk.length;\n    }\n\n    return result;\n  }\n};\n\nvar fnUntyped = {\n  arraySet: function (dest, src, src_offs, len, dest_offs) {\n    for (var i = 0; i < len; i++) {\n      dest[dest_offs + i] = src[src_offs + i];\n    }\n  },\n  // Join array of chunks to single array.\n  flattenChunks: function (chunks) {\n    return [].concat.apply([], chunks);\n  }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n  if (on) {\n    exports.Buf8  = Uint8Array;\n    exports.Buf16 = Uint16Array;\n    exports.Buf32 = Int32Array;\n    exports.assign(exports, fnTyped);\n  } else {\n    exports.Buf8  = Array;\n    exports.Buf16 = Array;\n    exports.Buf32 = Array;\n    exports.assign(exports, fnUntyped);\n  }\n};\n\nexports.setTyped(TYPED_OK);\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/common.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/strings.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/strings.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"s\": () => (/* binding */ strings)\n/* harmony export */ });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/common.js\");\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new _common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n  _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nvar string2buf = function (str) {\n  var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n  // count binary size\n  for (m_pos = 0; m_pos < str_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n      c2 = str.charCodeAt(m_pos + 1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n  }\n\n  // allocate buffer\n  buf = new _common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf8(buf_len);\n\n  // convert\n  for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n      c2 = str.charCodeAt(m_pos + 1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    if (c < 0x80) {\n      /* one byte */\n      buf[i++] = c;\n    } else if (c < 0x800) {\n      /* two bytes */\n      buf[i++] = 0xC0 | (c >>> 6);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else if (c < 0x10000) {\n      /* three bytes */\n      buf[i++] = 0xE0 | (c >>> 12);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else {\n      /* four bytes */\n      buf[i++] = 0xf0 | (c >>> 18);\n      buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    }\n  }\n\n  return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n  // On Chrome, the arguments in a function call that are allowed is `65534`.\n  // If the length of the buffer is smaller than that, we can use this optimization,\n  // otherwise we will take a slower path.\n  if (len < 65534) {\n    if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n      return String.fromCharCode.apply(null, _common_js__WEBPACK_IMPORTED_MODULE_0__.c.shrinkBuf(buf, len));\n    }\n  }\n\n  var result = '';\n  for (var i = 0; i < len; i++) {\n    result += String.fromCharCode(buf[i]);\n  }\n  return result;\n}\n\n\n// Convert byte array to binary string\nvar buf2binstring_1 = function (buf) {\n  return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nvar binstring2buf = function (str) {\n  var buf = new _common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf8(str.length);\n  for (var i = 0, len = buf.length; i < len; i++) {\n    buf[i] = str.charCodeAt(i);\n  }\n  return buf;\n};\n\n\n// convert array to string\nvar buf2string = function (buf, max) {\n  var i, out, c, c_len;\n  var len = max || buf.length;\n\n  // Reserve max possible length (2 words per char)\n  // NB: by unknown reasons, Array is significantly faster for\n  //     String.fromCharCode.apply than Uint16Array.\n  var utf16buf = new Array(len * 2);\n\n  for (out = 0, i = 0; i < len;) {\n    c = buf[i++];\n    // quick process ascii\n    if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n    c_len = _utf8len[c];\n    // skip 5 & 6 byte codes\n    if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n    // apply mask on first byte\n    c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n    // join the rest\n    while (c_len > 1 && i < len) {\n      c = (c << 6) | (buf[i++] & 0x3f);\n      c_len--;\n    }\n\n    // terminated by end of string?\n    if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n    if (c < 0x10000) {\n      utf16buf[out++] = c;\n    } else {\n      c -= 0x10000;\n      utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n      utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n    }\n  }\n\n  return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max   - length limit (mandatory);\nvar utf8border = function (buf, max) {\n  var pos;\n\n  max = max || buf.length;\n  if (max > buf.length) { max = buf.length; }\n\n  // go back from last position, until start of sequence found\n  pos = max - 1;\n  while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n  // Very small and broken sequence,\n  // return max, because we should return something anyway.\n  if (pos < 0) { return max; }\n\n  // If we came to start of buffer - that means buffer is too small,\n  // return max too.\n  if (pos === 0) { return max; }\n\n  return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\nvar strings = {\n\tstring2buf: string2buf,\n\tbuf2binstring: buf2binstring_1,\n\tbinstring2buf: binstring2buf,\n\tbuf2string: buf2string,\n\tutf8border: utf8border\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/strings.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/adler32.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/adler32.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"a\": () => (/* binding */ adler32_1)\n/* harmony export */ });\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n  var s1 = (adler & 0xffff) |0,\n      s2 = ((adler >>> 16) & 0xffff) |0,\n      n = 0;\n\n  while (len !== 0) {\n    // Set limit ~ twice less than 5552, to keep\n    // s2 in 31-bits, because we force signed ints.\n    // in other case %= will fail.\n    n = len > 2000 ? 2000 : len;\n    len -= n;\n\n    do {\n      s1 = (s1 + buf[pos++]) |0;\n      s2 = (s2 + s1) |0;\n    } while (--n);\n\n    s1 %= 65521;\n    s2 %= 65521;\n  }\n\n  return (s1 | (s2 << 16)) |0;\n}\n\n\nvar adler32_1 = adler32;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/adler32.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/constants.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/constants.js ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"c\": () => (/* binding */ constants)\n/* harmony export */ });\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar constants = {\n\n  /* Allowed flush values; see deflate() and inflate() below for details */\n  Z_NO_FLUSH:         0,\n  Z_PARTIAL_FLUSH:    1,\n  Z_SYNC_FLUSH:       2,\n  Z_FULL_FLUSH:       3,\n  Z_FINISH:           4,\n  Z_BLOCK:            5,\n  Z_TREES:            6,\n\n  /* Return codes for the compression/decompression functions. Negative values\n  * are errors, positive values are used for special but normal events.\n  */\n  Z_OK:               0,\n  Z_STREAM_END:       1,\n  Z_NEED_DICT:        2,\n  Z_ERRNO:           -1,\n  Z_STREAM_ERROR:    -2,\n  Z_DATA_ERROR:      -3,\n  //Z_MEM_ERROR:     -4,\n  Z_BUF_ERROR:       -5,\n  //Z_VERSION_ERROR: -6,\n\n  /* compression levels */\n  Z_NO_COMPRESSION:         0,\n  Z_BEST_SPEED:             1,\n  Z_BEST_COMPRESSION:       9,\n  Z_DEFAULT_COMPRESSION:   -1,\n\n\n  Z_FILTERED:               1,\n  Z_HUFFMAN_ONLY:           2,\n  Z_RLE:                    3,\n  Z_FIXED:                  4,\n  Z_DEFAULT_STRATEGY:       0,\n\n  /* Possible values of the data_type field (though see inflate()) */\n  Z_BINARY:                 0,\n  Z_TEXT:                   1,\n  //Z_ASCII:                1, // = Z_TEXT (deprecated)\n  Z_UNKNOWN:                2,\n\n  /* The deflate compression method */\n  Z_DEFLATED:               8\n  //Z_NULL:                 null // Use -1 or null inline, depending on var type\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/constants.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/crc32.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/crc32.js ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"c\": () => (/* binding */ crc32_1)\n/* harmony export */ });\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n  var c, table = [];\n\n  for (var n = 0; n < 256; n++) {\n    c = n;\n    for (var k = 0; k < 8; k++) {\n      c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n    }\n    table[n] = c;\n  }\n\n  return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n  var t = crcTable,\n      end = pos + len;\n\n  crc ^= -1;\n\n  for (var i = pos; i < end; i++) {\n    crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n  }\n\n  return (crc ^ (-1)); // >>> 0;\n}\n\n\nvar crc32_1 = crc32;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/crc32.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/deflate.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/deflate.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"d\": () => (/* binding */ deflate_1)\n/* harmony export */ });\n/* harmony import */ var _utils_common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/common.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/common.js\");\n/* harmony import */ var _trees_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./trees.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/trees.js\");\n/* harmony import */ var _adler32_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./adler32.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/adler32.js\");\n/* harmony import */ var _crc32_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./crc32.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/crc32.js\");\n/* harmony import */ var _messages_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./messages.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/messages.js\");\n\n\n\n\n\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n\n\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH      = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH    = 2;\nvar Z_FULL_FLUSH    = 3;\nvar Z_FINISH        = 4;\nvar Z_BLOCK         = 5;\n//var Z_TREES         = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\n//var Z_NEED_DICT     = 2;\n//var Z_ERRNO         = -1;\nvar Z_STREAM_ERROR  = -2;\nvar Z_DATA_ERROR    = -3;\n//var Z_MEM_ERROR     = -4;\nvar Z_BUF_ERROR     = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION      = 0;\n//var Z_BEST_SPEED          = 1;\n//var Z_BEST_COMPRESSION    = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED            = 1;\nvar Z_HUFFMAN_ONLY        = 2;\nvar Z_RLE                 = 3;\nvar Z_FIXED               = 4;\nvar Z_DEFAULT_STRATEGY    = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY              = 0;\n//var Z_TEXT                = 1;\n//var Z_ASCII               = 1; // = Z_TEXT\nvar Z_UNKNOWN             = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED  = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES  = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS      = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES       = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES       = 30;\n/* number of distance codes */\nvar BL_CODES      = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE     = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS  = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE      = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE     = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE    = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n  strm.msg = _messages_js__WEBPACK_IMPORTED_MODULE_4__.m[errorCode];\n  return errorCode;\n}\n\nfunction rank(f) {\n  return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n  var s = strm.state;\n\n  //_tr_flush_bits(s);\n  var len = s.pending;\n  if (len > strm.avail_out) {\n    len = strm.avail_out;\n  }\n  if (len === 0) { return; }\n\n  _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n  strm.next_out += len;\n  s.pending_out += len;\n  strm.total_out += len;\n  strm.avail_out -= len;\n  s.pending -= len;\n  if (s.pending === 0) {\n    s.pending_out = 0;\n  }\n}\n\n\nfunction flush_block_only(s, last) {\n  _trees_js__WEBPACK_IMPORTED_MODULE_1__.t._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n  s.block_start = s.strstart;\n  flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n  s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n//  put_byte(s, (Byte)(b >> 8));\n//  put_byte(s, (Byte)(b & 0xff));\n  s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n  s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read.  All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n  var len = strm.avail_in;\n\n  if (len > size) { len = size; }\n  if (len === 0) { return 0; }\n\n  strm.avail_in -= len;\n\n  // zmemcpy(buf, strm->next_in, len);\n  _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.arraySet(buf, strm.input, strm.next_in, len, start);\n  if (strm.state.wrap === 1) {\n    strm.adler = (0,_adler32_js__WEBPACK_IMPORTED_MODULE_2__.a)(strm.adler, buf, len, start);\n  }\n\n  else if (strm.state.wrap === 2) {\n    strm.adler = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_3__.c)(strm.adler, buf, len, start);\n  }\n\n  strm.next_in += len;\n  strm.total_in += len;\n\n  return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n  var chain_length = s.max_chain_length;      /* max hash chain length */\n  var scan = s.strstart; /* current string */\n  var match;                       /* matched string */\n  var len;                           /* length of current match */\n  var best_len = s.prev_length;              /* best match length so far */\n  var nice_match = s.nice_match;             /* stop if match long enough */\n  var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n      s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n  var _win = s.window; // shortcut\n\n  var wmask = s.w_mask;\n  var prev  = s.prev;\n\n  /* Stop when cur_match becomes <= limit. To simplify the code,\n   * we prevent matches with the string of window index 0.\n   */\n\n  var strend = s.strstart + MAX_MATCH;\n  var scan_end1  = _win[scan + best_len - 1];\n  var scan_end   = _win[scan + best_len];\n\n  /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n   * It is easy to get rid of this optimization if necessary.\n   */\n  // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n  /* Do not waste too much time if we already have a good match: */\n  if (s.prev_length >= s.good_match) {\n    chain_length >>= 2;\n  }\n  /* Do not look for matches beyond the end of the input. This is necessary\n   * to make deflate deterministic.\n   */\n  if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n  // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n  do {\n    // Assert(cur_match < s->strstart, \"no future\");\n    match = cur_match;\n\n    /* Skip to next match if the match length cannot increase\n     * or if the match length is less than 2.  Note that the checks below\n     * for insufficient lookahead only occur occasionally for performance\n     * reasons.  Therefore uninitialized memory will be accessed, and\n     * conditional jumps will be made that depend on those values.\n     * However the length of the match is limited to the lookahead, so\n     * the output of deflate is not affected by the uninitialized values.\n     */\n\n    if (_win[match + best_len]     !== scan_end  ||\n        _win[match + best_len - 1] !== scan_end1 ||\n        _win[match]                !== _win[scan] ||\n        _win[++match]              !== _win[scan + 1]) {\n      continue;\n    }\n\n    /* The check at best_len-1 can be removed because it will be made\n     * again later. (This heuristic is not always a win.)\n     * It is not necessary to compare scan[2] and match[2] since they\n     * are always equal when the other bytes match, given that\n     * the hash keys are equal and that HASH_BITS >= 8.\n     */\n    scan += 2;\n    match++;\n    // Assert(*scan == *match, \"match[2]?\");\n\n    /* We check for insufficient lookahead only every 8th comparison;\n     * the 256th check will be made at strstart+258.\n     */\n    do {\n      /*jshint noempty:false*/\n    } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             scan < strend);\n\n    // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n    len = MAX_MATCH - (strend - scan);\n    scan = strend - MAX_MATCH;\n\n    if (len > best_len) {\n      s.match_start = cur_match;\n      best_len = len;\n      if (len >= nice_match) {\n        break;\n      }\n      scan_end1  = _win[scan + best_len - 1];\n      scan_end   = _win[scan + best_len];\n    }\n  } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n  if (best_len <= s.lookahead) {\n    return best_len;\n  }\n  return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n *    At least one byte has been read, or avail_in == 0; reads are\n *    performed for at least two bytes (required for the zip translate_eol\n *    option -- not supported here).\n */\nfunction fill_window(s) {\n  var _w_size = s.w_size;\n  var p, n, m, more, str;\n\n  //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n  do {\n    more = s.window_size - s.lookahead - s.strstart;\n\n    // JS ints have 32 bit, block below not needed\n    /* Deal with !@#$% 64K limit: */\n    //if (sizeof(int) <= 2) {\n    //    if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n    //        more = wsize;\n    //\n    //  } else if (more == (unsigned)(-1)) {\n    //        /* Very unlikely, but possible on 16 bit machine if\n    //         * strstart == 0 && lookahead == 1 (input done a byte at time)\n    //         */\n    //        more--;\n    //    }\n    //}\n\n\n    /* If the window is almost full and there is insufficient lookahead,\n     * move the upper half to the lower one to make room in the upper half.\n     */\n    if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n      _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.arraySet(s.window, s.window, _w_size, _w_size, 0);\n      s.match_start -= _w_size;\n      s.strstart -= _w_size;\n      /* we now have strstart >= MAX_DIST */\n      s.block_start -= _w_size;\n\n      /* Slide the hash table (could be avoided with 32 bit values\n       at the expense of memory usage). We slide even when level == 0\n       to keep the hash table consistent if we switch back to level > 0\n       later. (Using level 0 permanently is not an optimal usage of\n       zlib, so we don't care about this pathological case.)\n       */\n\n      n = s.hash_size;\n      p = n;\n      do {\n        m = s.head[--p];\n        s.head[p] = (m >= _w_size ? m - _w_size : 0);\n      } while (--n);\n\n      n = _w_size;\n      p = n;\n      do {\n        m = s.prev[--p];\n        s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n        /* If n is not on any hash chain, prev[n] is garbage but\n         * its value will never be used.\n         */\n      } while (--n);\n\n      more += _w_size;\n    }\n    if (s.strm.avail_in === 0) {\n      break;\n    }\n\n    /* If there was no sliding:\n     *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n     *    more == window_size - lookahead - strstart\n     * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n     * => more >= window_size - 2*WSIZE + 2\n     * In the BIG_MEM or MMAP case (not yet supported),\n     *   window_size == input_size + MIN_LOOKAHEAD  &&\n     *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n     * Otherwise, window_size == 2*WSIZE so more >= 2.\n     * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n     */\n    //Assert(more >= 2, \"more < 2\");\n    n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n    s.lookahead += n;\n\n    /* Initialize the hash value now that we have some input: */\n    if (s.lookahead + s.insert >= MIN_MATCH) {\n      str = s.strstart - s.insert;\n      s.ins_h = s.window[str];\n\n      /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n//        Call update_hash() MIN_MATCH-3 more times\n//#endif\n      while (s.insert) {\n        /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n        s.prev[str & s.w_mask] = s.head[s.ins_h];\n        s.head[s.ins_h] = str;\n        str++;\n        s.insert--;\n        if (s.lookahead + s.insert < MIN_MATCH) {\n          break;\n        }\n      }\n    }\n    /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n     * but this is not important since only literal bytes will be emitted.\n     */\n\n  } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n  /* If the WIN_INIT bytes after the end of the current data have never been\n   * written, then zero those bytes in order to avoid memory check reports of\n   * the use of uninitialized (or uninitialised as Julian writes) bytes by\n   * the longest match routines.  Update the high water mark for the next\n   * time through here.  WIN_INIT is set to MAX_MATCH since the longest match\n   * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n   */\n//  if (s.high_water < s.window_size) {\n//    var curr = s.strstart + s.lookahead;\n//    var init = 0;\n//\n//    if (s.high_water < curr) {\n//      /* Previous high water mark below current data -- zero WIN_INIT\n//       * bytes or up to end of window, whichever is less.\n//       */\n//      init = s.window_size - curr;\n//      if (init > WIN_INIT)\n//        init = WIN_INIT;\n//      zmemzero(s->window + curr, (unsigned)init);\n//      s->high_water = curr + init;\n//    }\n//    else if (s->high_water < (ulg)curr + WIN_INIT) {\n//      /* High water mark at or above current data, but below current data\n//       * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n//       * to end of window, whichever is less.\n//       */\n//      init = (ulg)curr + WIN_INIT - s->high_water;\n//      if (init > s->window_size - s->high_water)\n//        init = s->window_size - s->high_water;\n//      zmemzero(s->window + s->high_water, (unsigned)init);\n//      s->high_water += init;\n//    }\n//  }\n//\n//  Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n//    \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n  /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n   * to pending_buf_size, and each stored block has a 5 byte header:\n   */\n  var max_block_size = 0xffff;\n\n  if (max_block_size > s.pending_buf_size - 5) {\n    max_block_size = s.pending_buf_size - 5;\n  }\n\n  /* Copy as much as possible from input to output: */\n  for (;;) {\n    /* Fill the window as much as possible: */\n    if (s.lookahead <= 1) {\n\n      //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n      //  s->block_start >= (long)s->w_size, \"slide too late\");\n//      if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n//        s.block_start >= s.w_size)) {\n//        throw  new Error(\"slide too late\");\n//      }\n\n      fill_window(s);\n      if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n\n      if (s.lookahead === 0) {\n        break;\n      }\n      /* flush the current block */\n    }\n    //Assert(s->block_start >= 0L, \"block gone\");\n//    if (s.block_start < 0) throw new Error(\"block gone\");\n\n    s.strstart += s.lookahead;\n    s.lookahead = 0;\n\n    /* Emit a stored block if pending_buf will be full: */\n    var max_start = s.block_start + max_block_size;\n\n    if (s.strstart === 0 || s.strstart >= max_start) {\n      /* strstart == 0 is possible when wraparound on 16-bit machine */\n      s.lookahead = s.strstart - max_start;\n      s.strstart = max_start;\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n\n\n    }\n    /* Flush if we may have to slide, otherwise block_start may become\n     * negative and the data will be gone:\n     */\n    if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n\n  s.insert = 0;\n\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n\n  if (s.strstart > s.block_start) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n\n  return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n  var hash_head;        /* head of the hash chain */\n  var bflush;           /* set if current block must be flushed */\n\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the next match, plus MIN_MATCH bytes to insert the\n     * string following the next match.\n     */\n    if (s.lookahead < MIN_LOOKAHEAD) {\n      fill_window(s);\n      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) {\n        break; /* flush the current block */\n      }\n    }\n\n    /* Insert the string window[strstart .. strstart+2] in the\n     * dictionary, and set hash_head to the head of the hash chain:\n     */\n    hash_head = 0/*NIL*/;\n    if (s.lookahead >= MIN_MATCH) {\n      /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n      s.head[s.ins_h] = s.strstart;\n      /***/\n    }\n\n    /* Find the longest match, discarding those <= prev_length.\n     * At this point we have always match_length < MIN_MATCH\n     */\n    if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n      /* To simplify the code, we prevent matches with the string\n       * of window index 0 (in particular we have to avoid a match\n       * of the string with itself at the start of the input file).\n       */\n      s.match_length = longest_match(s, hash_head);\n      /* longest_match() sets match_start */\n    }\n    if (s.match_length >= MIN_MATCH) {\n      // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n      /*** _tr_tally_dist(s, s.strstart - s.match_start,\n                     s.match_length - MIN_MATCH, bflush); ***/\n      bflush = _trees_js__WEBPACK_IMPORTED_MODULE_1__.t._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n      s.lookahead -= s.match_length;\n\n      /* Insert new strings in the hash table only if the match length\n       * is not too large. This saves time but degrades compression.\n       */\n      if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n        s.match_length--; /* string at strstart already in table */\n        do {\n          s.strstart++;\n          /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n          s.head[s.ins_h] = s.strstart;\n          /***/\n          /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n           * always MIN_MATCH bytes ahead.\n           */\n        } while (--s.match_length !== 0);\n        s.strstart++;\n      } else\n      {\n        s.strstart += s.match_length;\n        s.match_length = 0;\n        s.ins_h = s.window[s.strstart];\n        /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n//                Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n        /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n         * matter since it will be recomputed at next deflate call.\n         */\n      }\n    } else {\n      /* No match, output a literal byte */\n      //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n      bflush = _trees_js__WEBPACK_IMPORTED_MODULE_1__.t._tr_tally(s, 0, s.window[s.strstart]);\n\n      s.lookahead--;\n      s.strstart++;\n    }\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n  var hash_head;          /* head of hash chain */\n  var bflush;              /* set if current block must be flushed */\n\n  var max_insert;\n\n  /* Process the input block. */\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the next match, plus MIN_MATCH bytes to insert the\n     * string following the next match.\n     */\n    if (s.lookahead < MIN_LOOKAHEAD) {\n      fill_window(s);\n      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) { break; } /* flush the current block */\n    }\n\n    /* Insert the string window[strstart .. strstart+2] in the\n     * dictionary, and set hash_head to the head of the hash chain:\n     */\n    hash_head = 0/*NIL*/;\n    if (s.lookahead >= MIN_MATCH) {\n      /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n      s.head[s.ins_h] = s.strstart;\n      /***/\n    }\n\n    /* Find the longest match, discarding those <= prev_length.\n     */\n    s.prev_length = s.match_length;\n    s.prev_match = s.match_start;\n    s.match_length = MIN_MATCH - 1;\n\n    if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n        s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n      /* To simplify the code, we prevent matches with the string\n       * of window index 0 (in particular we have to avoid a match\n       * of the string with itself at the start of the input file).\n       */\n      s.match_length = longest_match(s, hash_head);\n      /* longest_match() sets match_start */\n\n      if (s.match_length <= 5 &&\n         (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n        /* If prev_match is also MIN_MATCH, match_start is garbage\n         * but we will ignore the current match anyway.\n         */\n        s.match_length = MIN_MATCH - 1;\n      }\n    }\n    /* If there was a match at the previous step and the current\n     * match is not better, output the previous match:\n     */\n    if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n      max_insert = s.strstart + s.lookahead - MIN_MATCH;\n      /* Do not insert strings in hash table beyond this. */\n\n      //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n      /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n                     s.prev_length - MIN_MATCH, bflush);***/\n      bflush = _trees_js__WEBPACK_IMPORTED_MODULE_1__.t._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n      /* Insert in hash table all strings up to the end of the match.\n       * strstart-1 and strstart are already inserted. If there is not\n       * enough lookahead, the last two strings are not inserted in\n       * the hash table.\n       */\n      s.lookahead -= s.prev_length - 1;\n      s.prev_length -= 2;\n      do {\n        if (++s.strstart <= max_insert) {\n          /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n          s.head[s.ins_h] = s.strstart;\n          /***/\n        }\n      } while (--s.prev_length !== 0);\n      s.match_available = 0;\n      s.match_length = MIN_MATCH - 1;\n      s.strstart++;\n\n      if (bflush) {\n        /*** FLUSH_BLOCK(s, 0); ***/\n        flush_block_only(s, false);\n        if (s.strm.avail_out === 0) {\n          return BS_NEED_MORE;\n        }\n        /***/\n      }\n\n    } else if (s.match_available) {\n      /* If there was no match at the previous position, output a\n       * single literal. If there was a match but the current match\n       * is longer, truncate the previous match to a single literal.\n       */\n      //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n      /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n      bflush = _trees_js__WEBPACK_IMPORTED_MODULE_1__.t._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n      if (bflush) {\n        /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n        flush_block_only(s, false);\n        /***/\n      }\n      s.strstart++;\n      s.lookahead--;\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n    } else {\n      /* There is no previous match to compare with, wait for\n       * the next step to decide.\n       */\n      s.match_available = 1;\n      s.strstart++;\n      s.lookahead--;\n    }\n  }\n  //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n  if (s.match_available) {\n    //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n    /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n    bflush = _trees_js__WEBPACK_IMPORTED_MODULE_1__.t._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n    s.match_available = 0;\n  }\n  s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n\n  return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one.  Do not maintain a hash table.  (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n  var bflush;            /* set if current block must be flushed */\n  var prev;              /* byte at distance one to match */\n  var scan, strend;      /* scan goes up to strend for length of run */\n\n  var _win = s.window;\n\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the longest run, plus one for the unrolled loop.\n     */\n    if (s.lookahead <= MAX_MATCH) {\n      fill_window(s);\n      if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) { break; } /* flush the current block */\n    }\n\n    /* See how many times the previous byte repeats */\n    s.match_length = 0;\n    if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n      scan = s.strstart - 1;\n      prev = _win[scan];\n      if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n        strend = s.strstart + MAX_MATCH;\n        do {\n          /*jshint noempty:false*/\n        } while (prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 scan < strend);\n        s.match_length = MAX_MATCH - (strend - scan);\n        if (s.match_length > s.lookahead) {\n          s.match_length = s.lookahead;\n        }\n      }\n      //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n    }\n\n    /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n    if (s.match_length >= MIN_MATCH) {\n      //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n      /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n      bflush = _trees_js__WEBPACK_IMPORTED_MODULE_1__.t._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n      s.lookahead -= s.match_length;\n      s.strstart += s.match_length;\n      s.match_length = 0;\n    } else {\n      /* No match, output a literal byte */\n      //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n      bflush = _trees_js__WEBPACK_IMPORTED_MODULE_1__.t._tr_tally(s, 0, s.window[s.strstart]);\n\n      s.lookahead--;\n      s.strstart++;\n    }\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = 0;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n  var bflush;             /* set if current block must be flushed */\n\n  for (;;) {\n    /* Make sure that we have a literal to write. */\n    if (s.lookahead === 0) {\n      fill_window(s);\n      if (s.lookahead === 0) {\n        if (flush === Z_NO_FLUSH) {\n          return BS_NEED_MORE;\n        }\n        break;      /* flush the current block */\n      }\n    }\n\n    /* Output a literal byte */\n    s.match_length = 0;\n    //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n    /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n    bflush = _trees_js__WEBPACK_IMPORTED_MODULE_1__.t._tr_tally(s, 0, s.window[s.strstart]);\n    s.lookahead--;\n    s.strstart++;\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = 0;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n  this.good_length = good_length;\n  this.max_lazy = max_lazy;\n  this.nice_length = nice_length;\n  this.max_chain = max_chain;\n  this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n  /*      good lazy nice chain */\n  new Config(0, 0, 0, 0, deflate_stored),          /* 0 store only */\n  new Config(4, 4, 8, 4, deflate_fast),            /* 1 max speed, no lazy matches */\n  new Config(4, 5, 16, 8, deflate_fast),           /* 2 */\n  new Config(4, 6, 32, 32, deflate_fast),          /* 3 */\n\n  new Config(4, 4, 16, 16, deflate_slow),          /* 4 lazy matches */\n  new Config(8, 16, 32, 32, deflate_slow),         /* 5 */\n  new Config(8, 16, 128, 128, deflate_slow),       /* 6 */\n  new Config(8, 32, 128, 256, deflate_slow),       /* 7 */\n  new Config(32, 128, 258, 1024, deflate_slow),    /* 8 */\n  new Config(32, 258, 258, 4096, deflate_slow)     /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n  s.window_size = 2 * s.w_size;\n\n  /*** CLEAR_HASH(s); ***/\n  zero(s.head); // Fill with NIL (= 0);\n\n  /* Set the default configuration parameters:\n   */\n  s.max_lazy_match = configuration_table[s.level].max_lazy;\n  s.good_match = configuration_table[s.level].good_length;\n  s.nice_match = configuration_table[s.level].nice_length;\n  s.max_chain_length = configuration_table[s.level].max_chain;\n\n  s.strstart = 0;\n  s.block_start = 0;\n  s.lookahead = 0;\n  s.insert = 0;\n  s.match_length = s.prev_length = MIN_MATCH - 1;\n  s.match_available = 0;\n  s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n  this.strm = null;            /* pointer back to this zlib stream */\n  this.status = 0;            /* as the name implies */\n  this.pending_buf = null;      /* output still pending */\n  this.pending_buf_size = 0;  /* size of pending_buf */\n  this.pending_out = 0;       /* next pending byte to output to the stream */\n  this.pending = 0;           /* nb of bytes in the pending buffer */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.gzhead = null;         /* gzip header information to write */\n  this.gzindex = 0;           /* where in extra, name, or comment */\n  this.method = Z_DEFLATED; /* can only be DEFLATED */\n  this.last_flush = -1;   /* value of flush param for previous deflate call */\n\n  this.w_size = 0;  /* LZ77 window size (32K by default) */\n  this.w_bits = 0;  /* log2(w_size)  (8..16) */\n  this.w_mask = 0;  /* w_size - 1 */\n\n  this.window = null;\n  /* Sliding window. Input bytes are read into the second half of the window,\n   * and move to the first half later to keep a dictionary of at least wSize\n   * bytes. With this organization, matches are limited to a distance of\n   * wSize-MAX_MATCH bytes, but this ensures that IO is always\n   * performed with a length multiple of the block size.\n   */\n\n  this.window_size = 0;\n  /* Actual size of window: 2*wSize, except when the user input buffer\n   * is directly used as sliding window.\n   */\n\n  this.prev = null;\n  /* Link to older string with same hash index. To limit the size of this\n   * array to 64K, this link is maintained only for the last 32K strings.\n   * An index in this array is thus a window index modulo 32K.\n   */\n\n  this.head = null;   /* Heads of the hash chains or NIL. */\n\n  this.ins_h = 0;       /* hash index of string to be inserted */\n  this.hash_size = 0;   /* number of elements in hash table */\n  this.hash_bits = 0;   /* log2(hash_size) */\n  this.hash_mask = 0;   /* hash_size-1 */\n\n  this.hash_shift = 0;\n  /* Number of bits by which ins_h must be shifted at each input\n   * step. It must be such that after MIN_MATCH steps, the oldest\n   * byte no longer takes part in the hash key, that is:\n   *   hash_shift * MIN_MATCH >= hash_bits\n   */\n\n  this.block_start = 0;\n  /* Window position at the beginning of the current output block. Gets\n   * negative when the window is moved backwards.\n   */\n\n  this.match_length = 0;      /* length of best match */\n  this.prev_match = 0;        /* previous match */\n  this.match_available = 0;   /* set if previous match exists */\n  this.strstart = 0;          /* start of string to insert */\n  this.match_start = 0;       /* start of matching string */\n  this.lookahead = 0;         /* number of valid bytes ahead in window */\n\n  this.prev_length = 0;\n  /* Length of the best match at previous step. Matches not greater than this\n   * are discarded. This is used in the lazy match evaluation.\n   */\n\n  this.max_chain_length = 0;\n  /* To speed up deflation, hash chains are never searched beyond this\n   * length.  A higher limit improves compression ratio but degrades the\n   * speed.\n   */\n\n  this.max_lazy_match = 0;\n  /* Attempt to find a better match only when the current match is strictly\n   * smaller than this value. This mechanism is used only for compression\n   * levels >= 4.\n   */\n  // That's alias to max_lazy_match, don't use directly\n  //this.max_insert_length = 0;\n  /* Insert new strings in the hash table only if the match length is not\n   * greater than this length. This saves time but degrades compression.\n   * max_insert_length is used only for compression levels <= 3.\n   */\n\n  this.level = 0;     /* compression level (1..9) */\n  this.strategy = 0;  /* favor or force Huffman coding*/\n\n  this.good_match = 0;\n  /* Use a faster search when the previous match is longer than this */\n\n  this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n              /* used by trees.c: */\n\n  /* Didn't use ct_data typedef below to suppress compiler warning */\n\n  // struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */\n  // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n  // struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */\n\n  // Use flat array of DOUBLE size, with interleaved fata,\n  // because JS does not support effective\n  this.dyn_ltree  = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf16(HEAP_SIZE * 2);\n  this.dyn_dtree  = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf16((2 * D_CODES + 1) * 2);\n  this.bl_tree    = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf16((2 * BL_CODES + 1) * 2);\n  zero(this.dyn_ltree);\n  zero(this.dyn_dtree);\n  zero(this.bl_tree);\n\n  this.l_desc   = null;         /* desc. for literal tree */\n  this.d_desc   = null;         /* desc. for distance tree */\n  this.bl_desc  = null;         /* desc. for bit length tree */\n\n  //ush bl_count[MAX_BITS+1];\n  this.bl_count = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf16(MAX_BITS + 1);\n  /* number of codes at each bit length for an optimal tree */\n\n  //int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */\n  this.heap = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf16(2 * L_CODES + 1);  /* heap used to build the Huffman trees */\n  zero(this.heap);\n\n  this.heap_len = 0;               /* number of elements in the heap */\n  this.heap_max = 0;               /* element of largest frequency */\n  /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n   * The same heap array is used to build all trees.\n   */\n\n  this.depth = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n  zero(this.depth);\n  /* Depth of each subtree used as tie breaker for trees of equal frequency\n   */\n\n  this.l_buf = 0;          /* buffer index for literals or lengths */\n\n  this.lit_bufsize = 0;\n  /* Size of match buffer for literals/lengths.  There are 4 reasons for\n   * limiting lit_bufsize to 64K:\n   *   - frequencies can be kept in 16 bit counters\n   *   - if compression is not successful for the first block, all input\n   *     data is still in the window so we can still emit a stored block even\n   *     when input comes from standard input.  (This can also be done for\n   *     all blocks if lit_bufsize is not greater than 32K.)\n   *   - if compression is not successful for a file smaller than 64K, we can\n   *     even emit a stored file instead of a stored block (saving 5 bytes).\n   *     This is applicable only for zip (not gzip or zlib).\n   *   - creating new Huffman trees less frequently may not provide fast\n   *     adaptation to changes in the input data statistics. (Take for\n   *     example a binary file with poorly compressible code followed by\n   *     a highly compressible string table.) Smaller buffer sizes give\n   *     fast adaptation but have of course the overhead of transmitting\n   *     trees more frequently.\n   *   - I can't count above 4\n   */\n\n  this.last_lit = 0;      /* running index in l_buf */\n\n  this.d_buf = 0;\n  /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n   * the same number of elements. To use different lengths, an extra flag\n   * array would be necessary.\n   */\n\n  this.opt_len = 0;       /* bit length of current block with optimal trees */\n  this.static_len = 0;    /* bit length of current block with static trees */\n  this.matches = 0;       /* number of string matches in current block */\n  this.insert = 0;        /* bytes at end of window left to insert */\n\n\n  this.bi_buf = 0;\n  /* Output buffer. bits are inserted starting at the bottom (least\n   * significant bits).\n   */\n  this.bi_valid = 0;\n  /* Number of valid bits in bi_buf.  All bits above the last valid bit\n   * are always zero.\n   */\n\n  // Used for window memory init. We safely ignore it for JS. That makes\n  // sense only for pointers and memory check tools.\n  //this.high_water = 0;\n  /* High water mark offset in window for initialized bytes -- bytes above\n   * this are set to zero in order to avoid memory check warnings when\n   * longest match routines access bytes past the input.  This is then\n   * updated to the new high water mark.\n   */\n}\n\n\nfunction deflateResetKeep(strm) {\n  var s;\n\n  if (!strm || !strm.state) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n  strm.total_in = strm.total_out = 0;\n  strm.data_type = Z_UNKNOWN;\n\n  s = strm.state;\n  s.pending = 0;\n  s.pending_out = 0;\n\n  if (s.wrap < 0) {\n    s.wrap = -s.wrap;\n    /* was made negative by deflate(..., Z_FINISH); */\n  }\n  s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n  strm.adler = (s.wrap === 2) ?\n    0  // crc32(0, Z_NULL, 0)\n  :\n    1; // adler32(0, Z_NULL, 0)\n  s.last_flush = Z_NO_FLUSH;\n  _trees_js__WEBPACK_IMPORTED_MODULE_1__.t._tr_init(s);\n  return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n  var ret = deflateResetKeep(strm);\n  if (ret === Z_OK) {\n    lm_init(strm.state);\n  }\n  return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n  strm.state.gzhead = head;\n  return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n  if (!strm) { // === Z_NULL\n    return Z_STREAM_ERROR;\n  }\n  var wrap = 1;\n\n  if (level === Z_DEFAULT_COMPRESSION) {\n    level = 6;\n  }\n\n  if (windowBits < 0) { /* suppress zlib wrapper */\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n\n  else if (windowBits > 15) {\n    wrap = 2;           /* write gzip wrapper instead */\n    windowBits -= 16;\n  }\n\n\n  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n    windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n    strategy < 0 || strategy > Z_FIXED) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n\n  if (windowBits === 8) {\n    windowBits = 9;\n  }\n  /* until 256-byte window bug fixed */\n\n  var s = new DeflateState();\n\n  strm.state = s;\n  s.strm = strm;\n\n  s.wrap = wrap;\n  s.gzhead = null;\n  s.w_bits = windowBits;\n  s.w_size = 1 << s.w_bits;\n  s.w_mask = s.w_size - 1;\n\n  s.hash_bits = memLevel + 7;\n  s.hash_size = 1 << s.hash_bits;\n  s.hash_mask = s.hash_size - 1;\n  s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n  s.window = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf8(s.w_size * 2);\n  s.head = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf16(s.hash_size);\n  s.prev = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf16(s.w_size);\n\n  // Don't need mem init magic for JS.\n  //s.high_water = 0;  /* nothing written to s->window yet */\n\n  s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n  s.pending_buf_size = s.lit_bufsize * 4;\n\n  //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n  //s->pending_buf = (uchf *) overlay;\n  s.pending_buf = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf8(s.pending_buf_size);\n\n  // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n  //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n  s.d_buf = 1 * s.lit_bufsize;\n\n  //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n  s.l_buf = (1 + 2) * s.lit_bufsize;\n\n  s.level = level;\n  s.strategy = strategy;\n  s.method = method;\n\n  return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n  return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n  var old_flush, s;\n  var beg, val; // for gzip header write only\n\n  if (!strm || !strm.state ||\n    flush > Z_BLOCK || flush < 0) {\n    return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n  }\n\n  s = strm.state;\n\n  if (!strm.output ||\n      (!strm.input && strm.avail_in !== 0) ||\n      (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n    return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n  }\n\n  s.strm = strm; /* just in case */\n  old_flush = s.last_flush;\n  s.last_flush = flush;\n\n  /* Write the header */\n  if (s.status === INIT_STATE) {\n\n    if (s.wrap === 2) { // GZIP header\n      strm.adler = 0;  //crc32(0L, Z_NULL, 0);\n      put_byte(s, 31);\n      put_byte(s, 139);\n      put_byte(s, 8);\n      if (!s.gzhead) { // s->gzhead == Z_NULL\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, s.level === 9 ? 2 :\n                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n                     4 : 0));\n        put_byte(s, OS_CODE);\n        s.status = BUSY_STATE;\n      }\n      else {\n        put_byte(s, (s.gzhead.text ? 1 : 0) +\n                    (s.gzhead.hcrc ? 2 : 0) +\n                    (!s.gzhead.extra ? 0 : 4) +\n                    (!s.gzhead.name ? 0 : 8) +\n                    (!s.gzhead.comment ? 0 : 16)\n        );\n        put_byte(s, s.gzhead.time & 0xff);\n        put_byte(s, (s.gzhead.time >> 8) & 0xff);\n        put_byte(s, (s.gzhead.time >> 16) & 0xff);\n        put_byte(s, (s.gzhead.time >> 24) & 0xff);\n        put_byte(s, s.level === 9 ? 2 :\n                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n                     4 : 0));\n        put_byte(s, s.gzhead.os & 0xff);\n        if (s.gzhead.extra && s.gzhead.extra.length) {\n          put_byte(s, s.gzhead.extra.length & 0xff);\n          put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n        }\n        if (s.gzhead.hcrc) {\n          strm.adler = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_3__.c)(strm.adler, s.pending_buf, s.pending, 0);\n        }\n        s.gzindex = 0;\n        s.status = EXTRA_STATE;\n      }\n    }\n    else // DEFLATE header\n    {\n      var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n      var level_flags = -1;\n\n      if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n        level_flags = 0;\n      } else if (s.level < 6) {\n        level_flags = 1;\n      } else if (s.level === 6) {\n        level_flags = 2;\n      } else {\n        level_flags = 3;\n      }\n      header |= (level_flags << 6);\n      if (s.strstart !== 0) { header |= PRESET_DICT; }\n      header += 31 - (header % 31);\n\n      s.status = BUSY_STATE;\n      putShortMSB(s, header);\n\n      /* Save the adler32 of the preset dictionary: */\n      if (s.strstart !== 0) {\n        putShortMSB(s, strm.adler >>> 16);\n        putShortMSB(s, strm.adler & 0xffff);\n      }\n      strm.adler = 1; // adler32(0L, Z_NULL, 0);\n    }\n  }\n\n//#ifdef GZIP\n  if (s.status === EXTRA_STATE) {\n    if (s.gzhead.extra/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n\n      while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_3__.c)(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            break;\n          }\n        }\n        put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n        s.gzindex++;\n      }\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_3__.c)(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (s.gzindex === s.gzhead.extra.length) {\n        s.gzindex = 0;\n        s.status = NAME_STATE;\n      }\n    }\n    else {\n      s.status = NAME_STATE;\n    }\n  }\n  if (s.status === NAME_STATE) {\n    if (s.gzhead.name/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n      //int val;\n\n      do {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_3__.c)(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            val = 1;\n            break;\n          }\n        }\n        // JS specific: little magic to add zero terminator to end of string\n        if (s.gzindex < s.gzhead.name.length) {\n          val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n        } else {\n          val = 0;\n        }\n        put_byte(s, val);\n      } while (val !== 0);\n\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_3__.c)(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (val === 0) {\n        s.gzindex = 0;\n        s.status = COMMENT_STATE;\n      }\n    }\n    else {\n      s.status = COMMENT_STATE;\n    }\n  }\n  if (s.status === COMMENT_STATE) {\n    if (s.gzhead.comment/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n      //int val;\n\n      do {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_3__.c)(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            val = 1;\n            break;\n          }\n        }\n        // JS specific: little magic to add zero terminator to end of string\n        if (s.gzindex < s.gzhead.comment.length) {\n          val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n        } else {\n          val = 0;\n        }\n        put_byte(s, val);\n      } while (val !== 0);\n\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_3__.c)(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (val === 0) {\n        s.status = HCRC_STATE;\n      }\n    }\n    else {\n      s.status = HCRC_STATE;\n    }\n  }\n  if (s.status === HCRC_STATE) {\n    if (s.gzhead.hcrc) {\n      if (s.pending + 2 > s.pending_buf_size) {\n        flush_pending(strm);\n      }\n      if (s.pending + 2 <= s.pending_buf_size) {\n        put_byte(s, strm.adler & 0xff);\n        put_byte(s, (strm.adler >> 8) & 0xff);\n        strm.adler = 0; //crc32(0L, Z_NULL, 0);\n        s.status = BUSY_STATE;\n      }\n    }\n    else {\n      s.status = BUSY_STATE;\n    }\n  }\n//#endif\n\n  /* Flush as much pending output as possible */\n  if (s.pending !== 0) {\n    flush_pending(strm);\n    if (strm.avail_out === 0) {\n      /* Since avail_out is 0, deflate will be called again with\n       * more output space, but possibly with both pending and\n       * avail_in equal to zero. There won't be anything to do,\n       * but this is not an error situation so make sure we\n       * return OK instead of BUF_ERROR at next call of deflate:\n       */\n      s.last_flush = -1;\n      return Z_OK;\n    }\n\n    /* Make sure there is something to do and avoid duplicate consecutive\n     * flushes. For repeated and useless calls with Z_FINISH, we keep\n     * returning Z_STREAM_END instead of Z_BUF_ERROR.\n     */\n  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n    flush !== Z_FINISH) {\n    return err(strm, Z_BUF_ERROR);\n  }\n\n  /* User must not provide more input after the first FINISH: */\n  if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n    return err(strm, Z_BUF_ERROR);\n  }\n\n  /* Start a new block or continue the current one.\n   */\n  if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n    (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n    var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n      (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n        configuration_table[s.level].func(s, flush));\n\n    if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n      s.status = FINISH_STATE;\n    }\n    if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n      if (strm.avail_out === 0) {\n        s.last_flush = -1;\n        /* avoid BUF_ERROR next call, see above */\n      }\n      return Z_OK;\n      /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n       * of deflate should use the same flush parameter to make sure\n       * that the flush is complete. So we don't have to output an\n       * empty block here, this will be done at next call. This also\n       * ensures that for a very small output buffer, we emit at most\n       * one empty block.\n       */\n    }\n    if (bstate === BS_BLOCK_DONE) {\n      if (flush === Z_PARTIAL_FLUSH) {\n        _trees_js__WEBPACK_IMPORTED_MODULE_1__.t._tr_align(s);\n      }\n      else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n        _trees_js__WEBPACK_IMPORTED_MODULE_1__.t._tr_stored_block(s, 0, 0, false);\n        /* For a full flush, this empty block will be recognized\n         * as a special marker by inflate_sync().\n         */\n        if (flush === Z_FULL_FLUSH) {\n          /*** CLEAR_HASH(s); ***/             /* forget history */\n          zero(s.head); // Fill with NIL (= 0);\n\n          if (s.lookahead === 0) {\n            s.strstart = 0;\n            s.block_start = 0;\n            s.insert = 0;\n          }\n        }\n      }\n      flush_pending(strm);\n      if (strm.avail_out === 0) {\n        s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n        return Z_OK;\n      }\n    }\n  }\n  //Assert(strm->avail_out > 0, \"bug2\");\n  //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n  if (flush !== Z_FINISH) { return Z_OK; }\n  if (s.wrap <= 0) { return Z_STREAM_END; }\n\n  /* Write the trailer */\n  if (s.wrap === 2) {\n    put_byte(s, strm.adler & 0xff);\n    put_byte(s, (strm.adler >> 8) & 0xff);\n    put_byte(s, (strm.adler >> 16) & 0xff);\n    put_byte(s, (strm.adler >> 24) & 0xff);\n    put_byte(s, strm.total_in & 0xff);\n    put_byte(s, (strm.total_in >> 8) & 0xff);\n    put_byte(s, (strm.total_in >> 16) & 0xff);\n    put_byte(s, (strm.total_in >> 24) & 0xff);\n  }\n  else\n  {\n    putShortMSB(s, strm.adler >>> 16);\n    putShortMSB(s, strm.adler & 0xffff);\n  }\n\n  flush_pending(strm);\n  /* If avail_out is zero, the application will call deflate again\n   * to flush the rest.\n   */\n  if (s.wrap > 0) { s.wrap = -s.wrap; }\n  /* write the trailer only once! */\n  return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n  var status;\n\n  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  status = strm.state.status;\n  if (status !== INIT_STATE &&\n    status !== EXTRA_STATE &&\n    status !== NAME_STATE &&\n    status !== COMMENT_STATE &&\n    status !== HCRC_STATE &&\n    status !== BUSY_STATE &&\n    status !== FINISH_STATE\n  ) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n  strm.state = null;\n\n  return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n  var dictLength = dictionary.length;\n\n  var s;\n  var str, n;\n  var wrap;\n  var avail;\n  var next;\n  var input;\n  var tmpDict;\n\n  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  s = strm.state;\n  wrap = s.wrap;\n\n  if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n    return Z_STREAM_ERROR;\n  }\n\n  /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n  if (wrap === 1) {\n    /* adler32(strm->adler, dictionary, dictLength); */\n    strm.adler = (0,_adler32_js__WEBPACK_IMPORTED_MODULE_2__.a)(strm.adler, dictionary, dictLength, 0);\n  }\n\n  s.wrap = 0;   /* avoid computing Adler-32 in read_buf */\n\n  /* if dictionary would fill window, just replace the history */\n  if (dictLength >= s.w_size) {\n    if (wrap === 0) {            /* already empty otherwise */\n      /*** CLEAR_HASH(s); ***/\n      zero(s.head); // Fill with NIL (= 0);\n      s.strstart = 0;\n      s.block_start = 0;\n      s.insert = 0;\n    }\n    /* use the tail */\n    // dictionary = dictionary.slice(dictLength - s.w_size);\n    tmpDict = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf8(s.w_size);\n    _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n    dictionary = tmpDict;\n    dictLength = s.w_size;\n  }\n  /* insert dictionary into window and hash */\n  avail = strm.avail_in;\n  next = strm.next_in;\n  input = strm.input;\n  strm.avail_in = dictLength;\n  strm.next_in = 0;\n  strm.input = dictionary;\n  fill_window(s);\n  while (s.lookahead >= MIN_MATCH) {\n    str = s.strstart;\n    n = s.lookahead - (MIN_MATCH - 1);\n    do {\n      /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n      s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n      s.head[s.ins_h] = str;\n      str++;\n    } while (--n);\n    s.strstart = str;\n    s.lookahead = MIN_MATCH - 1;\n    fill_window(s);\n  }\n  s.strstart += s.lookahead;\n  s.block_start = s.strstart;\n  s.insert = s.lookahead;\n  s.lookahead = 0;\n  s.match_length = s.prev_length = MIN_MATCH - 1;\n  s.match_available = 0;\n  strm.next_in = next;\n  strm.input = input;\n  strm.avail_in = avail;\n  s.wrap = wrap;\n  return Z_OK;\n}\n\n\nvar deflateInit_1 = deflateInit;\nvar deflateInit2_1 = deflateInit2;\nvar deflateReset_1 = deflateReset;\nvar deflateResetKeep_1 = deflateResetKeep;\nvar deflateSetHeader_1 = deflateSetHeader;\nvar deflate_2 = deflate;\nvar deflateEnd_1 = deflateEnd;\nvar deflateSetDictionary_1 = deflateSetDictionary;\nvar deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n\nvar deflate_1 = {\n\tdeflateInit: deflateInit_1,\n\tdeflateInit2: deflateInit2_1,\n\tdeflateReset: deflateReset_1,\n\tdeflateResetKeep: deflateResetKeep_1,\n\tdeflateSetHeader: deflateSetHeader_1,\n\tdeflate: deflate_2,\n\tdeflateEnd: deflateEnd_1,\n\tdeflateSetDictionary: deflateSetDictionary_1,\n\tdeflateInfo: deflateInfo\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/deflate.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/gzheader.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/gzheader.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"g\": () => (/* binding */ gzheader)\n/* harmony export */ });\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n  /* true if compressed data believed to be text */\n  this.text       = 0;\n  /* modification time */\n  this.time       = 0;\n  /* extra flags (not used when writing a gzip file) */\n  this.xflags     = 0;\n  /* operating system */\n  this.os         = 0;\n  /* pointer to extra field or Z_NULL if none */\n  this.extra      = null;\n  /* extra field length (valid if extra != Z_NULL) */\n  this.extra_len  = 0; // Actually, we don't need it in JS,\n                       // but leave for few code modifications\n\n  //\n  // Setup limits is not necessary because in js we should not preallocate memory\n  // for inflate use constant limit in 65536 bytes\n  //\n\n  /* space at extra (only when reading header) */\n  // this.extra_max  = 0;\n  /* pointer to zero-terminated file name or Z_NULL */\n  this.name       = '';\n  /* space at name (only when reading header) */\n  // this.name_max   = 0;\n  /* pointer to zero-terminated comment or Z_NULL */\n  this.comment    = '';\n  /* space at comment (only when reading header) */\n  // this.comm_max   = 0;\n  /* true if there was or will be a header crc */\n  this.hcrc       = 0;\n  /* true when done reading gzip header (not used when writing a gzip file) */\n  this.done       = false;\n}\n\nvar gzheader = GZheader;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/gzheader.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/inffast.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/inffast.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"i\": () => (/* binding */ inffast)\n/* harmony export */ });\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30;       /* got a data error -- remain here until reset */\nvar TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\n\n/*\n   Decode literal, length, and distance codes and write out the resulting\n   literal and match bytes until either not enough input or output is\n   available, an end-of-block is encountered, or a data error is encountered.\n   When large enough input and output buffers are supplied to inflate(), for\n   example, a 16K input buffer and a 64K output buffer, more than 95% of the\n   inflate execution time is spent in this routine.\n\n   Entry assumptions:\n\n        state.mode === LEN\n        strm.avail_in >= 6\n        strm.avail_out >= 258\n        start >= strm.avail_out\n        state.bits < 8\n\n   On return, state.mode is one of:\n\n        LEN -- ran out of enough output space or enough available input\n        TYPE -- reached end of block code, inflate() to interpret next block\n        BAD -- error in block data\n\n   Notes:\n\n    - The maximum input bits used by a length/distance pair is 15 bits for the\n      length code, 5 bits for the length extra, 15 bits for the distance code,\n      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.\n      Therefore if strm.avail_in >= 6, then there is enough input to avoid\n      checking for available input while decoding.\n\n    - The maximum bytes that a single length/distance pair can output is 258\n      bytes, which is the maximum length that can be coded.  inflate_fast()\n      requires strm.avail_out >= 258 for each loop to avoid checking for\n      output space.\n */\nvar inffast = function inflate_fast(strm, start) {\n  var state;\n  var _in;                    /* local strm.input */\n  var last;                   /* have enough input while in < last */\n  var _out;                   /* local strm.output */\n  var beg;                    /* inflate()'s initial strm.output */\n  var end;                    /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n  var dmax;                   /* maximum distance from zlib header */\n//#endif\n  var wsize;                  /* window size or zero if not using window */\n  var whave;                  /* valid bytes in the window */\n  var wnext;                  /* window write index */\n  // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n  var s_window;               /* allocated sliding window, if wsize != 0 */\n  var hold;                   /* local strm.hold */\n  var bits;                   /* local strm.bits */\n  var lcode;                  /* local strm.lencode */\n  var dcode;                  /* local strm.distcode */\n  var lmask;                  /* mask for first level of length codes */\n  var dmask;                  /* mask for first level of distance codes */\n  var here;                   /* retrieved table entry */\n  var op;                     /* code bits, operation, extra bits, or */\n                              /*  window position, window bytes to copy */\n  var len;                    /* match length, unused bytes */\n  var dist;                   /* match distance */\n  var from;                   /* where to copy match from */\n  var from_source;\n\n\n  var input, output; // JS specific, because we have no pointers\n\n  /* copy state to local variables */\n  state = strm.state;\n  //here = state.here;\n  _in = strm.next_in;\n  input = strm.input;\n  last = _in + (strm.avail_in - 5);\n  _out = strm.next_out;\n  output = strm.output;\n  beg = _out - (start - strm.avail_out);\n  end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n  dmax = state.dmax;\n//#endif\n  wsize = state.wsize;\n  whave = state.whave;\n  wnext = state.wnext;\n  s_window = state.window;\n  hold = state.hold;\n  bits = state.bits;\n  lcode = state.lencode;\n  dcode = state.distcode;\n  lmask = (1 << state.lenbits) - 1;\n  dmask = (1 << state.distbits) - 1;\n\n\n  /* decode literals and length/distances until end-of-block or not enough\n     input data or output space */\n\n  top:\n  do {\n    if (bits < 15) {\n      hold += input[_in++] << bits;\n      bits += 8;\n      hold += input[_in++] << bits;\n      bits += 8;\n    }\n\n    here = lcode[hold & lmask];\n\n    dolen:\n    for (;;) { // Goto emulation\n      op = here >>> 24/*here.bits*/;\n      hold >>>= op;\n      bits -= op;\n      op = (here >>> 16) & 0xff/*here.op*/;\n      if (op === 0) {                          /* literal */\n        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n        //        \"inflate:         literal '%c'\\n\" :\n        //        \"inflate:         literal 0x%02x\\n\", here.val));\n        output[_out++] = here & 0xffff/*here.val*/;\n      }\n      else if (op & 16) {                     /* length base */\n        len = here & 0xffff/*here.val*/;\n        op &= 15;                           /* number of extra bits */\n        if (op) {\n          if (bits < op) {\n            hold += input[_in++] << bits;\n            bits += 8;\n          }\n          len += hold & ((1 << op) - 1);\n          hold >>>= op;\n          bits -= op;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", len));\n        if (bits < 15) {\n          hold += input[_in++] << bits;\n          bits += 8;\n          hold += input[_in++] << bits;\n          bits += 8;\n        }\n        here = dcode[hold & dmask];\n\n        dodist:\n        for (;;) { // goto emulation\n          op = here >>> 24/*here.bits*/;\n          hold >>>= op;\n          bits -= op;\n          op = (here >>> 16) & 0xff/*here.op*/;\n\n          if (op & 16) {                      /* distance base */\n            dist = here & 0xffff/*here.val*/;\n            op &= 15;                       /* number of extra bits */\n            if (bits < op) {\n              hold += input[_in++] << bits;\n              bits += 8;\n              if (bits < op) {\n                hold += input[_in++] << bits;\n                bits += 8;\n              }\n            }\n            dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n            if (dist > dmax) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD;\n              break top;\n            }\n//#endif\n            hold >>>= op;\n            bits -= op;\n            //Tracevv((stderr, \"inflate:         distance %u\\n\", dist));\n            op = _out - beg;                /* max distance in output */\n            if (dist > op) {                /* see if copy from window */\n              op = dist - op;               /* distance back in window */\n              if (op > whave) {\n                if (state.sane) {\n                  strm.msg = 'invalid distance too far back';\n                  state.mode = BAD;\n                  break top;\n                }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//                if (len <= op - whave) {\n//                  do {\n//                    output[_out++] = 0;\n//                  } while (--len);\n//                  continue top;\n//                }\n//                len -= op - whave;\n//                do {\n//                  output[_out++] = 0;\n//                } while (--op > whave);\n//                if (op === 0) {\n//                  from = _out - dist;\n//                  do {\n//                    output[_out++] = output[from++];\n//                  } while (--len);\n//                  continue top;\n//                }\n//#endif\n              }\n              from = 0; // window index\n              from_source = s_window;\n              if (wnext === 0) {           /* very common case */\n                from += wsize - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              else if (wnext < op) {      /* wrap around window */\n                from += wsize + wnext - op;\n                op -= wnext;\n                if (op < len) {         /* some from end of window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = 0;\n                  if (wnext < len) {  /* some from start of window */\n                    op = wnext;\n                    len -= op;\n                    do {\n                      output[_out++] = s_window[from++];\n                    } while (--op);\n                    from = _out - dist;      /* rest from output */\n                    from_source = output;\n                  }\n                }\n              }\n              else {                      /* contiguous in window */\n                from += wnext - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              while (len > 2) {\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                len -= 3;\n              }\n              if (len) {\n                output[_out++] = from_source[from++];\n                if (len > 1) {\n                  output[_out++] = from_source[from++];\n                }\n              }\n            }\n            else {\n              from = _out - dist;          /* copy direct from output */\n              do {                        /* minimum length is three */\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                len -= 3;\n              } while (len > 2);\n              if (len) {\n                output[_out++] = output[from++];\n                if (len > 1) {\n                  output[_out++] = output[from++];\n                }\n              }\n            }\n          }\n          else if ((op & 64) === 0) {          /* 2nd level distance code */\n            here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n            continue dodist;\n          }\n          else {\n            strm.msg = 'invalid distance code';\n            state.mode = BAD;\n            break top;\n          }\n\n          break; // need to emulate goto via \"continue\"\n        }\n      }\n      else if ((op & 64) === 0) {              /* 2nd level length code */\n        here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n        continue dolen;\n      }\n      else if (op & 32) {                     /* end-of-block */\n        //Tracevv((stderr, \"inflate:         end of block\\n\"));\n        state.mode = TYPE;\n        break top;\n      }\n      else {\n        strm.msg = 'invalid literal/length code';\n        state.mode = BAD;\n        break top;\n      }\n\n      break; // need to emulate goto via \"continue\"\n    }\n  } while (_in < last && _out < end);\n\n  /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n  len = bits >> 3;\n  _in -= len;\n  bits -= len << 3;\n  hold &= (1 << bits) - 1;\n\n  /* update state and return */\n  strm.next_in = _in;\n  strm.next_out = _out;\n  strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n  strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n  state.hold = hold;\n  state.bits = bits;\n  return;\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/inffast.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/inflate.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/inflate.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"i\": () => (/* binding */ inflate_1)\n/* harmony export */ });\n/* harmony import */ var _utils_common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/common.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/common.js\");\n/* harmony import */ var _adler32_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./adler32.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/adler32.js\");\n/* harmony import */ var _crc32_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./crc32.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/crc32.js\");\n/* harmony import */ var _inffast_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./inffast.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/inffast.js\");\n/* harmony import */ var _inftrees_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./inftrees.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/inftrees.js\");\n\n\n\n\n\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n\n\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH      = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH    = 2;\n//var Z_FULL_FLUSH    = 3;\nvar Z_FINISH        = 4;\nvar Z_BLOCK         = 5;\nvar Z_TREES         = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\nvar Z_NEED_DICT     = 2;\n//var Z_ERRNO         = -1;\nvar Z_STREAM_ERROR  = -2;\nvar Z_DATA_ERROR    = -3;\nvar Z_MEM_ERROR     = -4;\nvar Z_BUF_ERROR     = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED  = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar    HEAD = 1;       /* i: waiting for magic header */\nvar    FLAGS = 2;      /* i: waiting for method and flags (gzip) */\nvar    TIME = 3;       /* i: waiting for modification time (gzip) */\nvar    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */\nvar    EXLEN = 5;      /* i: waiting for extra length (gzip) */\nvar    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */\nvar    NAME = 7;       /* i: waiting for end of file name (gzip) */\nvar    COMMENT = 8;    /* i: waiting for end of comment (gzip) */\nvar    HCRC = 9;       /* i: waiting for header crc (gzip) */\nvar    DICTID = 10;    /* i: waiting for dictionary check value */\nvar    DICT = 11;      /* waiting for inflateSetDictionary() call */\nvar        TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\nvar        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */\nvar        STORED = 14;    /* i: waiting for stored size (length and complement) */\nvar        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */\nvar        COPY = 16;      /* i/o: waiting for input or output to copy stored block */\nvar        TABLE = 17;     /* i: waiting for dynamic block table lengths */\nvar        LENLENS = 18;   /* i: waiting for code length code lengths */\nvar        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */\nvar            LEN_ = 20;      /* i: same as LEN below, but only first time in */\nvar            LEN = 21;       /* i: waiting for length/lit/eob code */\nvar            LENEXT = 22;    /* i: waiting for length extra bits */\nvar            DIST = 23;      /* i: waiting for distance code */\nvar            DISTEXT = 24;   /* i: waiting for distance extra bits */\nvar            MATCH = 25;     /* o: waiting for output space to copy string */\nvar            LIT = 26;       /* o: waiting for output space to write literal */\nvar    CHECK = 27;     /* i: waiting for 32-bit check value */\nvar    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */\nvar    DONE = 29;      /* finished check, done -- remain here until reset */\nvar    BAD = 30;       /* got a data error -- remain here until reset */\nvar    MEM = 31;       /* got an inflate() memory error -- remain here until reset */\nvar    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n  return  (((q >>> 24) & 0xff) +\n          ((q >>> 8) & 0xff00) +\n          ((q & 0xff00) << 8) +\n          ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n  this.mode = 0;             /* current inflate mode */\n  this.last = false;          /* true if processing last block */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.havedict = false;      /* true if dictionary provided */\n  this.flags = 0;             /* gzip header method and flags (0 if zlib) */\n  this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */\n  this.check = 0;             /* protected copy of check value */\n  this.total = 0;             /* protected copy of output count */\n  // TODO: may be {}\n  this.head = null;           /* where to save gzip header information */\n\n  /* sliding window */\n  this.wbits = 0;             /* log base 2 of requested window size */\n  this.wsize = 0;             /* window size or zero if not using window */\n  this.whave = 0;             /* valid bytes in the window */\n  this.wnext = 0;             /* window write index */\n  this.window = null;         /* allocated sliding window, if needed */\n\n  /* bit accumulator */\n  this.hold = 0;              /* input bit accumulator */\n  this.bits = 0;              /* number of bits in \"in\" */\n\n  /* for string and stored block copying */\n  this.length = 0;            /* literal or length of data to copy */\n  this.offset = 0;            /* distance back to copy string from */\n\n  /* for table and code decoding */\n  this.extra = 0;             /* extra bits needed */\n\n  /* fixed and dynamic code tables */\n  this.lencode = null;          /* starting table for length/literal codes */\n  this.distcode = null;         /* starting table for distance codes */\n  this.lenbits = 0;           /* index bits for lencode */\n  this.distbits = 0;          /* index bits for distcode */\n\n  /* dynamic table building */\n  this.ncode = 0;             /* number of code length code lengths */\n  this.nlen = 0;              /* number of length code lengths */\n  this.ndist = 0;             /* number of distance code lengths */\n  this.have = 0;              /* number of code lengths in lens[] */\n  this.next = null;              /* next available space in codes[] */\n\n  this.lens = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf16(320); /* temporary storage for code lengths */\n  this.work = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf16(288); /* work area for code table building */\n\n  /*\n   because we don't have pointers in js, we use lencode and distcode directly\n   as buffers so we don't need codes\n  */\n  //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */\n  this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */\n  this.distdyn = null;             /* dynamic table for distance codes (JS specific) */\n  this.sane = 0;                   /* if false, allow invalid distance too far */\n  this.back = 0;                   /* bits back of last unprocessed length/lit */\n  this.was = 0;                    /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n  var state;\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  strm.total_in = strm.total_out = state.total = 0;\n  strm.msg = ''; /*Z_NULL*/\n  if (state.wrap) {       /* to support ill-conceived Java test suite */\n    strm.adler = state.wrap & 1;\n  }\n  state.mode = HEAD;\n  state.last = 0;\n  state.havedict = 0;\n  state.dmax = 32768;\n  state.head = null/*Z_NULL*/;\n  state.hold = 0;\n  state.bits = 0;\n  //state.lencode = state.distcode = state.next = state.codes;\n  state.lencode = state.lendyn = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf32(ENOUGH_LENS);\n  state.distcode = state.distdyn = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf32(ENOUGH_DISTS);\n\n  state.sane = 1;\n  state.back = -1;\n  //Tracev((stderr, \"inflate: reset\\n\"));\n  return Z_OK;\n}\n\nfunction inflateReset(strm) {\n  var state;\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  state.wsize = 0;\n  state.whave = 0;\n  state.wnext = 0;\n  return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n  var wrap;\n  var state;\n\n  /* get the state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n\n  /* extract wrap request from windowBits parameter */\n  if (windowBits < 0) {\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n  else {\n    wrap = (windowBits >> 4) + 1;\n    if (windowBits < 48) {\n      windowBits &= 15;\n    }\n  }\n\n  /* set number of window bits, free window if different */\n  if (windowBits && (windowBits < 8 || windowBits > 15)) {\n    return Z_STREAM_ERROR;\n  }\n  if (state.window !== null && state.wbits !== windowBits) {\n    state.window = null;\n  }\n\n  /* update state and reset the rest of it */\n  state.wrap = wrap;\n  state.wbits = windowBits;\n  return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n  var ret;\n  var state;\n\n  if (!strm) { return Z_STREAM_ERROR; }\n  //strm.msg = Z_NULL;                 /* in case we return an error */\n\n  state = new InflateState();\n\n  //if (state === Z_NULL) return Z_MEM_ERROR;\n  //Tracev((stderr, \"inflate: allocated\\n\"));\n  strm.state = state;\n  state.window = null/*Z_NULL*/;\n  ret = inflateReset2(strm, windowBits);\n  if (ret !== Z_OK) {\n    strm.state = null/*Z_NULL*/;\n  }\n  return ret;\n}\n\nfunction inflateInit(strm) {\n  return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding.  Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter.  This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time.  However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n  /* build fixed huffman tables if first call (may not be thread safe) */\n  if (virgin) {\n    var sym;\n\n    lenfix = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf32(512);\n    distfix = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf32(32);\n\n    /* literal/length table */\n    sym = 0;\n    while (sym < 144) { state.lens[sym++] = 8; }\n    while (sym < 256) { state.lens[sym++] = 9; }\n    while (sym < 280) { state.lens[sym++] = 7; }\n    while (sym < 288) { state.lens[sym++] = 8; }\n\n    (0,_inftrees_js__WEBPACK_IMPORTED_MODULE_4__.i)(LENS,  state.lens, 0, 288, lenfix,   0, state.work, { bits: 9 });\n\n    /* distance table */\n    sym = 0;\n    while (sym < 32) { state.lens[sym++] = 5; }\n\n    (0,_inftrees_js__WEBPACK_IMPORTED_MODULE_4__.i)(DISTS, state.lens, 0, 32,   distfix, 0, state.work, { bits: 5 });\n\n    /* do this just once */\n    virgin = false;\n  }\n\n  state.lencode = lenfix;\n  state.lenbits = 9;\n  state.distcode = distfix;\n  state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning.  If window does not exist yet, create it.  This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n  var dist;\n  var state = strm.state;\n\n  /* if it hasn't been done already, allocate space for the window */\n  if (state.window === null) {\n    state.wsize = 1 << state.wbits;\n    state.wnext = 0;\n    state.whave = 0;\n\n    state.window = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf8(state.wsize);\n  }\n\n  /* copy state->wsize or less output bytes into the circular window */\n  if (copy >= state.wsize) {\n    _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n    state.wnext = 0;\n    state.whave = state.wsize;\n  }\n  else {\n    dist = state.wsize - state.wnext;\n    if (dist > copy) {\n      dist = copy;\n    }\n    //zmemcpy(state->window + state->wnext, end - copy, dist);\n    _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.arraySet(state.window, src, end - copy, dist, state.wnext);\n    copy -= dist;\n    if (copy) {\n      //zmemcpy(state->window, end - copy, copy);\n      _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.arraySet(state.window, src, end - copy, copy, 0);\n      state.wnext = copy;\n      state.whave = state.wsize;\n    }\n    else {\n      state.wnext += dist;\n      if (state.wnext === state.wsize) { state.wnext = 0; }\n      if (state.whave < state.wsize) { state.whave += dist; }\n    }\n  }\n  return 0;\n}\n\nfunction inflate(strm, flush) {\n  var state;\n  var input, output;          // input/output buffers\n  var next;                   /* next input INDEX */\n  var put;                    /* next output INDEX */\n  var have, left;             /* available input and output */\n  var hold;                   /* bit buffer */\n  var bits;                   /* bits in bit buffer */\n  var _in, _out;              /* save starting available input and output */\n  var copy;                   /* number of stored or match bytes to copy */\n  var from;                   /* where to copy match bytes from */\n  var from_source;\n  var here = 0;               /* current decoding table entry */\n  var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n  //var last;                   /* parent table entry */\n  var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n  var len;                    /* length to copy for repeats, bits to drop */\n  var ret;                    /* return code */\n  var hbuf = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf8(4);    /* buffer for gzip header crc calculation */\n  var opts;\n\n  var n; // temporary var for NEED_BITS\n\n  var order = /* permutation of code lengths */\n    [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n  if (!strm || !strm.state || !strm.output ||\n      (!strm.input && strm.avail_in !== 0)) {\n    return Z_STREAM_ERROR;\n  }\n\n  state = strm.state;\n  if (state.mode === TYPE) { state.mode = TYPEDO; }    /* skip check */\n\n\n  //--- LOAD() ---\n  put = strm.next_out;\n  output = strm.output;\n  left = strm.avail_out;\n  next = strm.next_in;\n  input = strm.input;\n  have = strm.avail_in;\n  hold = state.hold;\n  bits = state.bits;\n  //---\n\n  _in = have;\n  _out = left;\n  ret = Z_OK;\n\n  inf_leave: // goto emulation\n  for (;;) {\n    switch (state.mode) {\n      case HEAD:\n        if (state.wrap === 0) {\n          state.mode = TYPEDO;\n          break;\n        }\n        //=== NEEDBITS(16);\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */\n          state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_2__.c)(state.check, hbuf, 2, 0);\n          //===//\n\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          state.mode = FLAGS;\n          break;\n        }\n        state.flags = 0;           /* expect zlib header */\n        if (state.head) {\n          state.head.done = false;\n        }\n        if (!(state.wrap & 1) ||   /* check if zlib header allowed */\n          (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n          strm.msg = 'incorrect header check';\n          state.mode = BAD;\n          break;\n        }\n        if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n          strm.msg = 'unknown compression method';\n          state.mode = BAD;\n          break;\n        }\n        //--- DROPBITS(4) ---//\n        hold >>>= 4;\n        bits -= 4;\n        //---//\n        len = (hold & 0x0f)/*BITS(4)*/ + 8;\n        if (state.wbits === 0) {\n          state.wbits = len;\n        }\n        else if (len > state.wbits) {\n          strm.msg = 'invalid window size';\n          state.mode = BAD;\n          break;\n        }\n        state.dmax = 1 << len;\n        //Tracev((stderr, \"inflate:   zlib header ok\\n\"));\n        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n        state.mode = hold & 0x200 ? DICTID : TYPE;\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        break;\n      case FLAGS:\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.flags = hold;\n        if ((state.flags & 0xff) !== Z_DEFLATED) {\n          strm.msg = 'unknown compression method';\n          state.mode = BAD;\n          break;\n        }\n        if (state.flags & 0xe000) {\n          strm.msg = 'unknown header flags set';\n          state.mode = BAD;\n          break;\n        }\n        if (state.head) {\n          state.head.text = ((hold >> 8) & 1);\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_2__.c)(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = TIME;\n        /* falls through */\n      case TIME:\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (state.head) {\n          state.head.time = hold;\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC4(state.check, hold)\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          hbuf[2] = (hold >>> 16) & 0xff;\n          hbuf[3] = (hold >>> 24) & 0xff;\n          state.check = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_2__.c)(state.check, hbuf, 4, 0);\n          //===\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = OS;\n        /* falls through */\n      case OS:\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (state.head) {\n          state.head.xflags = (hold & 0xff);\n          state.head.os = (hold >> 8);\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_2__.c)(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = EXLEN;\n        /* falls through */\n      case EXLEN:\n        if (state.flags & 0x0400) {\n          //=== NEEDBITS(16); */\n          while (bits < 16) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.length = hold;\n          if (state.head) {\n            state.head.extra_len = hold;\n          }\n          if (state.flags & 0x0200) {\n            //=== CRC2(state.check, hold);\n            hbuf[0] = hold & 0xff;\n            hbuf[1] = (hold >>> 8) & 0xff;\n            state.check = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_2__.c)(state.check, hbuf, 2, 0);\n            //===//\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n        }\n        else if (state.head) {\n          state.head.extra = null/*Z_NULL*/;\n        }\n        state.mode = EXTRA;\n        /* falls through */\n      case EXTRA:\n        if (state.flags & 0x0400) {\n          copy = state.length;\n          if (copy > have) { copy = have; }\n          if (copy) {\n            if (state.head) {\n              len = state.head.extra_len - state.length;\n              if (!state.head.extra) {\n                // Use untyped array for more convenient processing later\n                state.head.extra = new Array(state.head.extra_len);\n              }\n              _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.arraySet(\n                state.head.extra,\n                input,\n                next,\n                // extra field is limited to 65536 bytes\n                // - no need for additional size check\n                copy,\n                /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n                len\n              );\n              //zmemcpy(state.head.extra + len, next,\n              //        len + copy > state.head.extra_max ?\n              //        state.head.extra_max - len : copy);\n            }\n            if (state.flags & 0x0200) {\n              state.check = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_2__.c)(state.check, input, copy, next);\n            }\n            have -= copy;\n            next += copy;\n            state.length -= copy;\n          }\n          if (state.length) { break inf_leave; }\n        }\n        state.length = 0;\n        state.mode = NAME;\n        /* falls through */\n      case NAME:\n        if (state.flags & 0x0800) {\n          if (have === 0) { break inf_leave; }\n          copy = 0;\n          do {\n            // TODO: 2 or 1 bytes?\n            len = input[next + copy++];\n            /* use constant limit because in js we should not preallocate memory */\n            if (state.head && len &&\n                (state.length < 65536 /*state.head.name_max*/)) {\n              state.head.name += String.fromCharCode(len);\n            }\n          } while (len && copy < have);\n\n          if (state.flags & 0x0200) {\n            state.check = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_2__.c)(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          if (len) { break inf_leave; }\n        }\n        else if (state.head) {\n          state.head.name = null;\n        }\n        state.length = 0;\n        state.mode = COMMENT;\n        /* falls through */\n      case COMMENT:\n        if (state.flags & 0x1000) {\n          if (have === 0) { break inf_leave; }\n          copy = 0;\n          do {\n            len = input[next + copy++];\n            /* use constant limit because in js we should not preallocate memory */\n            if (state.head && len &&\n                (state.length < 65536 /*state.head.comm_max*/)) {\n              state.head.comment += String.fromCharCode(len);\n            }\n          } while (len && copy < have);\n          if (state.flags & 0x0200) {\n            state.check = (0,_crc32_js__WEBPACK_IMPORTED_MODULE_2__.c)(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          if (len) { break inf_leave; }\n        }\n        else if (state.head) {\n          state.head.comment = null;\n        }\n        state.mode = HCRC;\n        /* falls through */\n      case HCRC:\n        if (state.flags & 0x0200) {\n          //=== NEEDBITS(16); */\n          while (bits < 16) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          if (hold !== (state.check & 0xffff)) {\n            strm.msg = 'header crc mismatch';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n        }\n        if (state.head) {\n          state.head.hcrc = ((state.flags >> 9) & 1);\n          state.head.done = true;\n        }\n        strm.adler = state.check = 0;\n        state.mode = TYPE;\n        break;\n      case DICTID:\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        strm.adler = state.check = zswap32(hold);\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = DICT;\n        /* falls through */\n      case DICT:\n        if (state.havedict === 0) {\n          //--- RESTORE() ---\n          strm.next_out = put;\n          strm.avail_out = left;\n          strm.next_in = next;\n          strm.avail_in = have;\n          state.hold = hold;\n          state.bits = bits;\n          //---\n          return Z_NEED_DICT;\n        }\n        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n        state.mode = TYPE;\n        /* falls through */\n      case TYPE:\n        if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case TYPEDO:\n        if (state.last) {\n          //--- BYTEBITS() ---//\n          hold >>>= bits & 7;\n          bits -= bits & 7;\n          //---//\n          state.mode = CHECK;\n          break;\n        }\n        //=== NEEDBITS(3); */\n        while (bits < 3) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.last = (hold & 0x01)/*BITS(1)*/;\n        //--- DROPBITS(1) ---//\n        hold >>>= 1;\n        bits -= 1;\n        //---//\n\n        switch ((hold & 0x03)/*BITS(2)*/) {\n          case 0:                             /* stored block */\n            //Tracev((stderr, \"inflate:     stored block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = STORED;\n            break;\n          case 1:                             /* fixed block */\n            fixedtables(state);\n            //Tracev((stderr, \"inflate:     fixed codes block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = LEN_;             /* decode codes */\n            if (flush === Z_TREES) {\n              //--- DROPBITS(2) ---//\n              hold >>>= 2;\n              bits -= 2;\n              //---//\n              break inf_leave;\n            }\n            break;\n          case 2:                             /* dynamic block */\n            //Tracev((stderr, \"inflate:     dynamic codes block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = TABLE;\n            break;\n          case 3:\n            strm.msg = 'invalid block type';\n            state.mode = BAD;\n        }\n        //--- DROPBITS(2) ---//\n        hold >>>= 2;\n        bits -= 2;\n        //---//\n        break;\n      case STORED:\n        //--- BYTEBITS() ---// /* go to byte boundary */\n        hold >>>= bits & 7;\n        bits -= bits & 7;\n        //---//\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n          strm.msg = 'invalid stored block lengths';\n          state.mode = BAD;\n          break;\n        }\n        state.length = hold & 0xffff;\n        //Tracev((stderr, \"inflate:       stored length %u\\n\",\n        //        state.length));\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = COPY_;\n        if (flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case COPY_:\n        state.mode = COPY;\n        /* falls through */\n      case COPY:\n        copy = state.length;\n        if (copy) {\n          if (copy > have) { copy = have; }\n          if (copy > left) { copy = left; }\n          if (copy === 0) { break inf_leave; }\n          //--- zmemcpy(put, next, copy); ---\n          _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.arraySet(output, input, next, copy, put);\n          //---//\n          have -= copy;\n          next += copy;\n          left -= copy;\n          put += copy;\n          state.length -= copy;\n          break;\n        }\n        //Tracev((stderr, \"inflate:       stored end\\n\"));\n        state.mode = TYPE;\n        break;\n      case TABLE:\n        //=== NEEDBITS(14); */\n        while (bits < 14) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n        //--- DROPBITS(5) ---//\n        hold >>>= 5;\n        bits -= 5;\n        //---//\n        state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n        //--- DROPBITS(5) ---//\n        hold >>>= 5;\n        bits -= 5;\n        //---//\n        state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n        //--- DROPBITS(4) ---//\n        hold >>>= 4;\n        bits -= 4;\n        //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n        if (state.nlen > 286 || state.ndist > 30) {\n          strm.msg = 'too many length or distance symbols';\n          state.mode = BAD;\n          break;\n        }\n//#endif\n        //Tracev((stderr, \"inflate:       table sizes ok\\n\"));\n        state.have = 0;\n        state.mode = LENLENS;\n        /* falls through */\n      case LENLENS:\n        while (state.have < state.ncode) {\n          //=== NEEDBITS(3);\n          while (bits < 3) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n          //--- DROPBITS(3) ---//\n          hold >>>= 3;\n          bits -= 3;\n          //---//\n        }\n        while (state.have < 19) {\n          state.lens[order[state.have++]] = 0;\n        }\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        //state.next = state.codes;\n        //state.lencode = state.next;\n        // Switch to use dynamic table\n        state.lencode = state.lendyn;\n        state.lenbits = 7;\n\n        opts = { bits: state.lenbits };\n        ret = (0,_inftrees_js__WEBPACK_IMPORTED_MODULE_4__.i)(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n        state.lenbits = opts.bits;\n\n        if (ret) {\n          strm.msg = 'invalid code lengths set';\n          state.mode = BAD;\n          break;\n        }\n        //Tracev((stderr, \"inflate:       code lengths ok\\n\"));\n        state.have = 0;\n        state.mode = CODELENS;\n        /* falls through */\n      case CODELENS:\n        while (state.have < state.nlen + state.ndist) {\n          for (;;) {\n            here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          if (here_val < 16) {\n            //--- DROPBITS(here.bits) ---//\n            hold >>>= here_bits;\n            bits -= here_bits;\n            //---//\n            state.lens[state.have++] = here_val;\n          }\n          else {\n            if (here_val === 16) {\n              //=== NEEDBITS(here.bits + 2);\n              n = here_bits + 2;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              if (state.have === 0) {\n                strm.msg = 'invalid bit length repeat';\n                state.mode = BAD;\n                break;\n              }\n              len = state.lens[state.have - 1];\n              copy = 3 + (hold & 0x03);//BITS(2);\n              //--- DROPBITS(2) ---//\n              hold >>>= 2;\n              bits -= 2;\n              //---//\n            }\n            else if (here_val === 17) {\n              //=== NEEDBITS(here.bits + 3);\n              n = here_bits + 3;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              len = 0;\n              copy = 3 + (hold & 0x07);//BITS(3);\n              //--- DROPBITS(3) ---//\n              hold >>>= 3;\n              bits -= 3;\n              //---//\n            }\n            else {\n              //=== NEEDBITS(here.bits + 7);\n              n = here_bits + 7;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              len = 0;\n              copy = 11 + (hold & 0x7f);//BITS(7);\n              //--- DROPBITS(7) ---//\n              hold >>>= 7;\n              bits -= 7;\n              //---//\n            }\n            if (state.have + copy > state.nlen + state.ndist) {\n              strm.msg = 'invalid bit length repeat';\n              state.mode = BAD;\n              break;\n            }\n            while (copy--) {\n              state.lens[state.have++] = len;\n            }\n          }\n        }\n\n        /* handle error breaks in while */\n        if (state.mode === BAD) { break; }\n\n        /* check for end-of-block code (better have one) */\n        if (state.lens[256] === 0) {\n          strm.msg = 'invalid code -- missing end-of-block';\n          state.mode = BAD;\n          break;\n        }\n\n        /* build code tables -- note: do not change the lenbits or distbits\n           values here (9 and 6) without reading the comments in inftrees.h\n           concerning the ENOUGH constants, which depend on those values */\n        state.lenbits = 9;\n\n        opts = { bits: state.lenbits };\n        ret = (0,_inftrees_js__WEBPACK_IMPORTED_MODULE_4__.i)(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        // state.next_index = opts.table_index;\n        state.lenbits = opts.bits;\n        // state.lencode = state.next;\n\n        if (ret) {\n          strm.msg = 'invalid literal/lengths set';\n          state.mode = BAD;\n          break;\n        }\n\n        state.distbits = 6;\n        //state.distcode.copy(state.codes);\n        // Switch to use dynamic table\n        state.distcode = state.distdyn;\n        opts = { bits: state.distbits };\n        ret = (0,_inftrees_js__WEBPACK_IMPORTED_MODULE_4__.i)(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        // state.next_index = opts.table_index;\n        state.distbits = opts.bits;\n        // state.distcode = state.next;\n\n        if (ret) {\n          strm.msg = 'invalid distances set';\n          state.mode = BAD;\n          break;\n        }\n        //Tracev((stderr, 'inflate:       codes ok\\n'));\n        state.mode = LEN_;\n        if (flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case LEN_:\n        state.mode = LEN;\n        /* falls through */\n      case LEN:\n        if (have >= 6 && left >= 258) {\n          //--- RESTORE() ---\n          strm.next_out = put;\n          strm.avail_out = left;\n          strm.next_in = next;\n          strm.avail_in = have;\n          state.hold = hold;\n          state.bits = bits;\n          //---\n          (0,_inffast_js__WEBPACK_IMPORTED_MODULE_3__.i)(strm, _out);\n          //--- LOAD() ---\n          put = strm.next_out;\n          output = strm.output;\n          left = strm.avail_out;\n          next = strm.next_in;\n          input = strm.input;\n          have = strm.avail_in;\n          hold = state.hold;\n          bits = state.bits;\n          //---\n\n          if (state.mode === TYPE) {\n            state.back = -1;\n          }\n          break;\n        }\n        state.back = 0;\n        for (;;) {\n          here = state.lencode[hold & ((1 << state.lenbits) - 1)];  /*BITS(state.lenbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if (here_bits <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if (here_op && (here_op & 0xf0) === 0) {\n          last_bits = here_bits;\n          last_op = here_op;\n          last_val = here_val;\n          for (;;) {\n            here = state.lencode[last_val +\n                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((last_bits + here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          //--- DROPBITS(last.bits) ---//\n          hold >>>= last_bits;\n          bits -= last_bits;\n          //---//\n          state.back += last_bits;\n        }\n        //--- DROPBITS(here.bits) ---//\n        hold >>>= here_bits;\n        bits -= here_bits;\n        //---//\n        state.back += here_bits;\n        state.length = here_val;\n        if (here_op === 0) {\n          //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n          //        \"inflate:         literal '%c'\\n\" :\n          //        \"inflate:         literal 0x%02x\\n\", here.val));\n          state.mode = LIT;\n          break;\n        }\n        if (here_op & 32) {\n          //Tracevv((stderr, \"inflate:         end of block\\n\"));\n          state.back = -1;\n          state.mode = TYPE;\n          break;\n        }\n        if (here_op & 64) {\n          strm.msg = 'invalid literal/length code';\n          state.mode = BAD;\n          break;\n        }\n        state.extra = here_op & 15;\n        state.mode = LENEXT;\n        /* falls through */\n      case LENEXT:\n        if (state.extra) {\n          //=== NEEDBITS(state.extra);\n          n = state.extra;\n          while (bits < n) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n          //--- DROPBITS(state.extra) ---//\n          hold >>>= state.extra;\n          bits -= state.extra;\n          //---//\n          state.back += state.extra;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", state.length));\n        state.was = state.length;\n        state.mode = DIST;\n        /* falls through */\n      case DIST:\n        for (;;) {\n          here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if ((here_bits) <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if ((here_op & 0xf0) === 0) {\n          last_bits = here_bits;\n          last_op = here_op;\n          last_val = here_val;\n          for (;;) {\n            here = state.distcode[last_val +\n                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((last_bits + here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          //--- DROPBITS(last.bits) ---//\n          hold >>>= last_bits;\n          bits -= last_bits;\n          //---//\n          state.back += last_bits;\n        }\n        //--- DROPBITS(here.bits) ---//\n        hold >>>= here_bits;\n        bits -= here_bits;\n        //---//\n        state.back += here_bits;\n        if (here_op & 64) {\n          strm.msg = 'invalid distance code';\n          state.mode = BAD;\n          break;\n        }\n        state.offset = here_val;\n        state.extra = (here_op) & 15;\n        state.mode = DISTEXT;\n        /* falls through */\n      case DISTEXT:\n        if (state.extra) {\n          //=== NEEDBITS(state.extra);\n          n = state.extra;\n          while (bits < n) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n          //--- DROPBITS(state.extra) ---//\n          hold >>>= state.extra;\n          bits -= state.extra;\n          //---//\n          state.back += state.extra;\n        }\n//#ifdef INFLATE_STRICT\n        if (state.offset > state.dmax) {\n          strm.msg = 'invalid distance too far back';\n          state.mode = BAD;\n          break;\n        }\n//#endif\n        //Tracevv((stderr, \"inflate:         distance %u\\n\", state.offset));\n        state.mode = MATCH;\n        /* falls through */\n      case MATCH:\n        if (left === 0) { break inf_leave; }\n        copy = _out - left;\n        if (state.offset > copy) {         /* copy from window */\n          copy = state.offset - copy;\n          if (copy > state.whave) {\n            if (state.sane) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD;\n              break;\n            }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//          Trace((stderr, \"inflate.c too far\\n\"));\n//          copy -= state.whave;\n//          if (copy > state.length) { copy = state.length; }\n//          if (copy > left) { copy = left; }\n//          left -= copy;\n//          state.length -= copy;\n//          do {\n//            output[put++] = 0;\n//          } while (--copy);\n//          if (state.length === 0) { state.mode = LEN; }\n//          break;\n//#endif\n          }\n          if (copy > state.wnext) {\n            copy -= state.wnext;\n            from = state.wsize - copy;\n          }\n          else {\n            from = state.wnext - copy;\n          }\n          if (copy > state.length) { copy = state.length; }\n          from_source = state.window;\n        }\n        else {                              /* copy from output */\n          from_source = output;\n          from = put - state.offset;\n          copy = state.length;\n        }\n        if (copy > left) { copy = left; }\n        left -= copy;\n        state.length -= copy;\n        do {\n          output[put++] = from_source[from++];\n        } while (--copy);\n        if (state.length === 0) { state.mode = LEN; }\n        break;\n      case LIT:\n        if (left === 0) { break inf_leave; }\n        output[put++] = state.length;\n        left--;\n        state.mode = LEN;\n        break;\n      case CHECK:\n        if (state.wrap) {\n          //=== NEEDBITS(32);\n          while (bits < 32) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            // Use '|' instead of '+' to make sure that result is signed\n            hold |= input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          _out -= left;\n          strm.total_out += _out;\n          state.total += _out;\n          if (_out) {\n            strm.adler = state.check =\n                /*UPDATE(state.check, put - _out, _out);*/\n                (state.flags ? (0,_crc32_js__WEBPACK_IMPORTED_MODULE_2__.c)(state.check, output, _out, put - _out) : (0,_adler32_js__WEBPACK_IMPORTED_MODULE_1__.a)(state.check, output, _out, put - _out));\n\n          }\n          _out = left;\n          // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n          if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n            strm.msg = 'incorrect data check';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          //Tracev((stderr, \"inflate:   check matches trailer\\n\"));\n        }\n        state.mode = LENGTH;\n        /* falls through */\n      case LENGTH:\n        if (state.wrap && state.flags) {\n          //=== NEEDBITS(32);\n          while (bits < 32) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          if (hold !== (state.total & 0xffffffff)) {\n            strm.msg = 'incorrect length check';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          //Tracev((stderr, \"inflate:   length matches trailer\\n\"));\n        }\n        state.mode = DONE;\n        /* falls through */\n      case DONE:\n        ret = Z_STREAM_END;\n        break inf_leave;\n      case BAD:\n        ret = Z_DATA_ERROR;\n        break inf_leave;\n      case MEM:\n        return Z_MEM_ERROR;\n      case SYNC:\n        /* falls through */\n      default:\n        return Z_STREAM_ERROR;\n    }\n  }\n\n  // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n  /*\n     Return from inflate(), updating the total counts and the check value.\n     If there was no progress during the inflate() call, return a buffer\n     error.  Call updatewindow() to create and/or update the window state.\n     Note: a memory error from inflate() is non-recoverable.\n   */\n\n  //--- RESTORE() ---\n  strm.next_out = put;\n  strm.avail_out = left;\n  strm.next_in = next;\n  strm.avail_in = have;\n  state.hold = hold;\n  state.bits = bits;\n  //---\n\n  if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n                      (state.mode < CHECK || flush !== Z_FINISH))) {\n    if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;\n  }\n  _in -= strm.avail_in;\n  _out -= strm.avail_out;\n  strm.total_in += _in;\n  strm.total_out += _out;\n  state.total += _out;\n  if (state.wrap && _out) {\n    strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n      (state.flags ? (0,_crc32_js__WEBPACK_IMPORTED_MODULE_2__.c)(state.check, output, _out, strm.next_out - _out) : (0,_adler32_js__WEBPACK_IMPORTED_MODULE_1__.a)(state.check, output, _out, strm.next_out - _out));\n  }\n  strm.data_type = state.bits + (state.last ? 64 : 0) +\n                    (state.mode === TYPE ? 128 : 0) +\n                    (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n  if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n    ret = Z_BUF_ERROR;\n  }\n  return ret;\n}\n\nfunction inflateEnd(strm) {\n\n  if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  var state = strm.state;\n  if (state.window) {\n    state.window = null;\n  }\n  strm.state = null;\n  return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n  var state;\n\n  /* check state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n  /* save header structure */\n  state.head = head;\n  head.done = false;\n  return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n  var dictLength = dictionary.length;\n\n  var state;\n  var dictid;\n  var ret;\n\n  /* check state */\n  if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n  state = strm.state;\n\n  if (state.wrap !== 0 && state.mode !== DICT) {\n    return Z_STREAM_ERROR;\n  }\n\n  /* check for correct dictionary identifier */\n  if (state.mode === DICT) {\n    dictid = 1; /* adler32(0, null, 0)*/\n    /* dictid = adler32(dictid, dictionary, dictLength); */\n    dictid = (0,_adler32_js__WEBPACK_IMPORTED_MODULE_1__.a)(dictid, dictionary, dictLength, 0);\n    if (dictid !== state.check) {\n      return Z_DATA_ERROR;\n    }\n  }\n  /* copy dictionary to window using updatewindow(), which will amend the\n   existing dictionary if appropriate */\n  ret = updatewindow(strm, dictionary, dictLength, dictLength);\n  if (ret) {\n    state.mode = MEM;\n    return Z_MEM_ERROR;\n  }\n  state.havedict = 1;\n  // Tracev((stderr, \"inflate:   dictionary set\\n\"));\n  return Z_OK;\n}\n\nvar inflateReset_1 = inflateReset;\nvar inflateReset2_1 = inflateReset2;\nvar inflateResetKeep_1 = inflateResetKeep;\nvar inflateInit_1 = inflateInit;\nvar inflateInit2_1 = inflateInit2;\nvar inflate_2 = inflate;\nvar inflateEnd_1 = inflateEnd;\nvar inflateGetHeader_1 = inflateGetHeader;\nvar inflateSetDictionary_1 = inflateSetDictionary;\nvar inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n\nvar inflate_1 = {\n\tinflateReset: inflateReset_1,\n\tinflateReset2: inflateReset2_1,\n\tinflateResetKeep: inflateResetKeep_1,\n\tinflateInit: inflateInit_1,\n\tinflateInit2: inflateInit2_1,\n\tinflate: inflate_2,\n\tinflateEnd: inflateEnd_1,\n\tinflateGetHeader: inflateGetHeader_1,\n\tinflateSetDictionary: inflateSetDictionary_1,\n\tinflateInfo: inflateInfo\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/inflate.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/inftrees.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/inftrees.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"i\": () => (/* binding */ inftrees)\n/* harmony export */ });\n/* harmony import */ var _utils_common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/common.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/common.js\");\n\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n  35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n  19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n  257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n  8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n  16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n  23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n  28, 28, 29, 29, 64, 64\n];\n\nvar inftrees = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n  var bits = opts.bits;\n      //here = opts.here; /* table entry for duplication */\n\n  var len = 0;               /* a code's length in bits */\n  var sym = 0;               /* index of code symbols */\n  var min = 0, max = 0;          /* minimum and maximum code lengths */\n  var root = 0;              /* number of index bits for root table */\n  var curr = 0;              /* number of index bits for current table */\n  var drop = 0;              /* code bits to drop for sub-table */\n  var left = 0;                   /* number of prefix codes available */\n  var used = 0;              /* code entries in table used */\n  var huff = 0;              /* Huffman code */\n  var incr;              /* for incrementing code, index */\n  var fill;              /* index for replicating entries */\n  var low;               /* low bits for current root entry */\n  var mask;              /* mask for low root bits */\n  var next;             /* next available space in table */\n  var base = null;     /* base value table to use */\n  var base_index = 0;\n//  var shoextra;    /* extra bits table to use */\n  var end;                    /* use base and extra for symbol > end */\n  var count = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf16(MAXBITS + 1); //[MAXBITS+1];    /* number of codes of each length */\n  var offs = new _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.Buf16(MAXBITS + 1); //[MAXBITS+1];     /* offsets in table for each length */\n  var extra = null;\n  var extra_index = 0;\n\n  var here_bits, here_op, here_val;\n\n  /*\n   Process a set of code lengths to create a canonical Huffman code.  The\n   code lengths are lens[0..codes-1].  Each length corresponds to the\n   symbols 0..codes-1.  The Huffman code is generated by first sorting the\n   symbols by length from short to long, and retaining the symbol order\n   for codes with equal lengths.  Then the code starts with all zero bits\n   for the first code of the shortest length, and the codes are integer\n   increments for the same length, and zeros are appended as the length\n   increases.  For the deflate format, these bits are stored backwards\n   from their more natural integer increment ordering, and so when the\n   decoding tables are built in the large loop below, the integer codes\n   are incremented backwards.\n\n   This routine assumes, but does not check, that all of the entries in\n   lens[] are in the range 0..MAXBITS.  The caller must assure this.\n   1..MAXBITS is interpreted as that code length.  zero means that that\n   symbol does not occur in this code.\n\n   The codes are sorted by computing a count of codes for each length,\n   creating from that a table of starting indices for each length in the\n   sorted table, and then entering the symbols in order in the sorted\n   table.  The sorted table is work[], with that space being provided by\n   the caller.\n\n   The length counts are used for other purposes as well, i.e. finding\n   the minimum and maximum length codes, determining if there are any\n   codes at all, checking for a valid set of lengths, and looking ahead\n   at length counts to determine sub-table sizes when building the\n   decoding tables.\n   */\n\n  /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n  for (len = 0; len <= MAXBITS; len++) {\n    count[len] = 0;\n  }\n  for (sym = 0; sym < codes; sym++) {\n    count[lens[lens_index + sym]]++;\n  }\n\n  /* bound code lengths, force root to be within code lengths */\n  root = bits;\n  for (max = MAXBITS; max >= 1; max--) {\n    if (count[max] !== 0) { break; }\n  }\n  if (root > max) {\n    root = max;\n  }\n  if (max === 0) {                     /* no symbols to code at all */\n    //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */\n    //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;\n    //table.val[opts.table_index++] = 0;   //here.val = (var short)0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n    //table.op[opts.table_index] = 64;\n    //table.bits[opts.table_index] = 1;\n    //table.val[opts.table_index++] = 0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n    opts.bits = 1;\n    return 0;     /* no symbols, but wait for decoding to report error */\n  }\n  for (min = 1; min < max; min++) {\n    if (count[min] !== 0) { break; }\n  }\n  if (root < min) {\n    root = min;\n  }\n\n  /* check for an over-subscribed or incomplete set of lengths */\n  left = 1;\n  for (len = 1; len <= MAXBITS; len++) {\n    left <<= 1;\n    left -= count[len];\n    if (left < 0) {\n      return -1;\n    }        /* over-subscribed */\n  }\n  if (left > 0 && (type === CODES || max !== 1)) {\n    return -1;                      /* incomplete set */\n  }\n\n  /* generate offsets into symbol table for each length for sorting */\n  offs[1] = 0;\n  for (len = 1; len < MAXBITS; len++) {\n    offs[len + 1] = offs[len] + count[len];\n  }\n\n  /* sort symbols by length, by symbol order within each length */\n  for (sym = 0; sym < codes; sym++) {\n    if (lens[lens_index + sym] !== 0) {\n      work[offs[lens[lens_index + sym]]++] = sym;\n    }\n  }\n\n  /*\n   Create and fill in decoding tables.  In this loop, the table being\n   filled is at next and has curr index bits.  The code being used is huff\n   with length len.  That code is converted to an index by dropping drop\n   bits off of the bottom.  For codes where len is less than drop + curr,\n   those top drop + curr - len bits are incremented through all values to\n   fill the table with replicated entries.\n\n   root is the number of index bits for the root table.  When len exceeds\n   root, sub-tables are created pointed to by the root entry with an index\n   of the low root bits of huff.  This is saved in low to check for when a\n   new sub-table should be started.  drop is zero when the root table is\n   being filled, and drop is root when sub-tables are being filled.\n\n   When a new sub-table is needed, it is necessary to look ahead in the\n   code lengths to determine what size sub-table is needed.  The length\n   counts are used for this, and so count[] is decremented as codes are\n   entered in the tables.\n\n   used keeps track of how many table entries have been allocated from the\n   provided *table space.  It is checked for LENS and DIST tables against\n   the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n   the initial root table size constants.  See the comments in inftrees.h\n   for more information.\n\n   sym increments through all symbols, and the loop terminates when\n   all codes of length max, i.e. all codes, have been processed.  This\n   routine permits incomplete codes, so another loop after this one fills\n   in the rest of the decoding tables with invalid code markers.\n   */\n\n  /* set up for code type */\n  // poor man optimization - use if-else instead of switch,\n  // to avoid deopts in old v8\n  if (type === CODES) {\n    base = extra = work;    /* dummy value--not used */\n    end = 19;\n\n  } else if (type === LENS) {\n    base = lbase;\n    base_index -= 257;\n    extra = lext;\n    extra_index -= 257;\n    end = 256;\n\n  } else {                    /* DISTS */\n    base = dbase;\n    extra = dext;\n    end = -1;\n  }\n\n  /* initialize opts for loop */\n  huff = 0;                   /* starting code */\n  sym = 0;                    /* starting code symbol */\n  len = min;                  /* starting code length */\n  next = table_index;              /* current table to fill in */\n  curr = root;                /* current table index bits */\n  drop = 0;                   /* current bits to drop from code for index */\n  low = -1;                   /* trigger new sub-table when len > root */\n  used = 1 << root;          /* use root table entries */\n  mask = used - 1;            /* mask for comparing low */\n\n  /* check available table space */\n  if ((type === LENS && used > ENOUGH_LENS) ||\n    (type === DISTS && used > ENOUGH_DISTS)) {\n    return 1;\n  }\n\n  /* process all codes and make table entries */\n  for (;;) {\n    /* create table entry */\n    here_bits = len - drop;\n    if (work[sym] < end) {\n      here_op = 0;\n      here_val = work[sym];\n    }\n    else if (work[sym] > end) {\n      here_op = extra[extra_index + work[sym]];\n      here_val = base[base_index + work[sym]];\n    }\n    else {\n      here_op = 32 + 64;         /* end of block */\n      here_val = 0;\n    }\n\n    /* replicate for those indices with low len bits equal to huff */\n    incr = 1 << (len - drop);\n    fill = 1 << curr;\n    min = fill;                 /* save offset to next table */\n    do {\n      fill -= incr;\n      table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n    } while (fill !== 0);\n\n    /* backwards increment the len-bit code huff */\n    incr = 1 << (len - 1);\n    while (huff & incr) {\n      incr >>= 1;\n    }\n    if (incr !== 0) {\n      huff &= incr - 1;\n      huff += incr;\n    } else {\n      huff = 0;\n    }\n\n    /* go to next symbol, update count, len */\n    sym++;\n    if (--count[len] === 0) {\n      if (len === max) { break; }\n      len = lens[lens_index + work[sym]];\n    }\n\n    /* create new sub-table if needed */\n    if (len > root && (huff & mask) !== low) {\n      /* if first time, transition to sub-tables */\n      if (drop === 0) {\n        drop = root;\n      }\n\n      /* increment past last table */\n      next += min;            /* here min is 1 << curr */\n\n      /* determine length of next table */\n      curr = len - drop;\n      left = 1 << curr;\n      while (curr + drop < max) {\n        left -= count[curr + drop];\n        if (left <= 0) { break; }\n        curr++;\n        left <<= 1;\n      }\n\n      /* check for enough space */\n      used += 1 << curr;\n      if ((type === LENS && used > ENOUGH_LENS) ||\n        (type === DISTS && used > ENOUGH_DISTS)) {\n        return 1;\n      }\n\n      /* point entry in root table to sub-table */\n      low = huff & mask;\n      /*table.op[low] = curr;\n      table.bits[low] = root;\n      table.val[low] = next - opts.table_index;*/\n      table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n    }\n  }\n\n  /* fill in remaining table entry if code is incomplete (guaranteed to have\n   at most one remaining entry, since if the code is incomplete, the\n   maximum code length that was allowed to get this far is one bit) */\n  if (huff !== 0) {\n    //table.op[next + huff] = 64;            /* invalid code marker */\n    //table.bits[next + huff] = len - drop;\n    //table.val[next + huff] = 0;\n    table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n  }\n\n  /* set return parameters */\n  //opts.table_index += used;\n  opts.bits = root;\n  return 0;\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/inftrees.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/messages.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/messages.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"m\": () => (/* binding */ messages)\n/* harmony export */ });\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar messages = {\n  2:      'need dictionary',     /* Z_NEED_DICT       2  */\n  1:      'stream end',          /* Z_STREAM_END      1  */\n  0:      '',                    /* Z_OK              0  */\n  '-1':   'file error',          /* Z_ERRNO         (-1) */\n  '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */\n  '-3':   'data error',          /* Z_DATA_ERROR    (-3) */\n  '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */\n  '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */\n  '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/messages.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/trees.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/trees.js ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"t\": () => (/* binding */ trees)\n/* harmony export */ });\n/* harmony import */ var _utils_common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/common.js */ \"./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/utils/common.js\");\n\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\n\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED          = 1;\n//var Z_HUFFMAN_ONLY      = 2;\n//var Z_RLE               = 3;\nvar Z_FIXED               = 4;\n//var Z_DEFAULT_STRATEGY  = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY              = 0;\nvar Z_TEXT                = 1;\n//var Z_ASCII             = 1; // = Z_TEXT\nvar Z_UNKNOWN             = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES    = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH    = 3;\nvar MAX_MATCH    = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES  = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS      = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES       = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES       = 30;\n/* number of distance codes */\n\nvar BL_CODES      = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE     = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS      = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size      = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK   = 256;\n/* end of block literal code */\n\nvar REP_3_6     = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10   = 17;\n/* repeat a zero length 3-10 times  (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times  (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits =   /* extra bits for each length code */\n  [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];\n\nvar extra_dbits =   /* extra bits for each distance code */\n  [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];\n\nvar extra_blbits =  /* extra bits for each bit length code */\n  [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n  [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree  = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree  = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code    = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code  = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length   = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist     = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n  this.static_tree  = static_tree;  /* static tree or NULL */\n  this.extra_bits   = extra_bits;   /* extra bits for each code or NULL */\n  this.extra_base   = extra_base;   /* base index for extra_bits */\n  this.elems        = elems;        /* max number of elements in the tree */\n  this.max_length   = max_length;   /* max bit length for the codes */\n\n  // show if `static_tree` has data or dummy - needed for monomorphic objects\n  this.has_stree    = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n  this.dyn_tree = dyn_tree;     /* the dynamic tree */\n  this.max_code = 0;            /* largest code with non zero frequency */\n  this.stat_desc = stat_desc;   /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n  return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n//    put_byte(s, (uch)((w) & 0xff));\n//    put_byte(s, (uch)((ush)(w) >> 8));\n  s.pending_buf[s.pending++] = (w) & 0xff;\n  s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n  if (s.bi_valid > (Buf_size - length)) {\n    s.bi_buf |= (value << s.bi_valid) & 0xffff;\n    put_short(s, s.bi_buf);\n    s.bi_buf = value >> (Buf_size - s.bi_valid);\n    s.bi_valid += length - Buf_size;\n  } else {\n    s.bi_buf |= (value << s.bi_valid) & 0xffff;\n    s.bi_valid += length;\n  }\n}\n\n\nfunction send_code(s, c, tree) {\n  send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n  var res = 0;\n  do {\n    res |= code & 1;\n    code >>>= 1;\n    res <<= 1;\n  } while (--len > 0);\n  return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n  if (s.bi_valid === 16) {\n    put_short(s, s.bi_buf);\n    s.bi_buf = 0;\n    s.bi_valid = 0;\n\n  } else if (s.bi_valid >= 8) {\n    s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n    s.bi_buf >>= 8;\n    s.bi_valid -= 8;\n  }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n *    above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n *     array bl_count contains the frequencies for each bit length.\n *     The length opt_len is updated; static_len is also updated if stree is\n *     not null.\n */\nfunction gen_bitlen(s, desc)\n//    deflate_state *s;\n//    tree_desc *desc;    /* the tree descriptor */\n{\n  var tree            = desc.dyn_tree;\n  var max_code        = desc.max_code;\n  var stree           = desc.stat_desc.static_tree;\n  var has_stree       = desc.stat_desc.has_stree;\n  var extra           = desc.stat_desc.extra_bits;\n  var base            = desc.stat_desc.extra_base;\n  var max_length      = desc.stat_desc.max_length;\n  var h;              /* heap index */\n  var n, m;           /* iterate over the tree elements */\n  var bits;           /* bit length */\n  var xbits;          /* extra bits */\n  var f;              /* frequency */\n  var overflow = 0;   /* number of elements with bit length too large */\n\n  for (bits = 0; bits <= MAX_BITS; bits++) {\n    s.bl_count[bits] = 0;\n  }\n\n  /* In a first pass, compute the optimal bit lengths (which may\n   * overflow in the case of the bit length tree).\n   */\n  tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n  for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n    n = s.heap[h];\n    bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n    if (bits > max_length) {\n      bits = max_length;\n      overflow++;\n    }\n    tree[n * 2 + 1]/*.Len*/ = bits;\n    /* We overwrite tree[n].Dad which is no longer needed */\n\n    if (n > max_code) { continue; } /* not a leaf node */\n\n    s.bl_count[bits]++;\n    xbits = 0;\n    if (n >= base) {\n      xbits = extra[n - base];\n    }\n    f = tree[n * 2]/*.Freq*/;\n    s.opt_len += f * (bits + xbits);\n    if (has_stree) {\n      s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n    }\n  }\n  if (overflow === 0) { return; }\n\n  // Trace((stderr,\"\\nbit length overflow\\n\"));\n  /* This happens for example on obj2 and pic of the Calgary corpus */\n\n  /* Find the first bit length which could increase: */\n  do {\n    bits = max_length - 1;\n    while (s.bl_count[bits] === 0) { bits--; }\n    s.bl_count[bits]--;      /* move one leaf down the tree */\n    s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n    s.bl_count[max_length]--;\n    /* The brother of the overflow item also moves one step up,\n     * but this does not affect bl_count[max_length]\n     */\n    overflow -= 2;\n  } while (overflow > 0);\n\n  /* Now recompute all bit lengths, scanning in increasing frequency.\n   * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n   * lengths instead of fixing only the wrong ones. This idea is taken\n   * from 'ar' written by Haruhiko Okumura.)\n   */\n  for (bits = max_length; bits !== 0; bits--) {\n    n = s.bl_count[bits];\n    while (n !== 0) {\n      m = s.heap[--h];\n      if (m > max_code) { continue; }\n      if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n        // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n        s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n        tree[m * 2 + 1]/*.Len*/ = bits;\n      }\n      n--;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n *     zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n//    ct_data *tree;             /* the tree to decorate */\n//    int max_code;              /* largest code with non zero frequency */\n//    ushf *bl_count;            /* number of codes at each bit length */\n{\n  var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n  var code = 0;              /* running code value */\n  var bits;                  /* bit index */\n  var n;                     /* code index */\n\n  /* The distribution counts are first used to generate the code values\n   * without bit reversal.\n   */\n  for (bits = 1; bits <= MAX_BITS; bits++) {\n    next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n  }\n  /* Check that the bit counts in bl_count are consistent. The last code\n   * must be all ones.\n   */\n  //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n  //        \"inconsistent bit counts\");\n  //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n  for (n = 0;  n <= max_code; n++) {\n    var len = tree[n * 2 + 1]/*.Len*/;\n    if (len === 0) { continue; }\n    /* Now reverse the bits */\n    tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n    //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n    //     n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n  }\n}\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nfunction tr_static_init() {\n  var n;        /* iterates over tree elements */\n  var bits;     /* bit counter */\n  var length;   /* length value */\n  var code;     /* code value */\n  var dist;     /* distance index */\n  var bl_count = new Array(MAX_BITS + 1);\n  /* number of codes at each bit length for an optimal tree */\n\n  // do check in _tr_init()\n  //if (static_init_done) return;\n\n  /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n  static_l_desc.static_tree = static_ltree;\n  static_l_desc.extra_bits = extra_lbits;\n  static_d_desc.static_tree = static_dtree;\n  static_d_desc.extra_bits = extra_dbits;\n  static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n  /* Initialize the mapping length (0..255) -> length code (0..28) */\n  length = 0;\n  for (code = 0; code < LENGTH_CODES - 1; code++) {\n    base_length[code] = length;\n    for (n = 0; n < (1 << extra_lbits[code]); n++) {\n      _length_code[length++] = code;\n    }\n  }\n  //Assert (length == 256, \"tr_static_init: length != 256\");\n  /* Note that the length 255 (match length 258) can be represented\n   * in two different ways: code 284 + 5 bits or code 285, so we\n   * overwrite length_code[255] to use the best encoding:\n   */\n  _length_code[length - 1] = code;\n\n  /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n  dist = 0;\n  for (code = 0; code < 16; code++) {\n    base_dist[code] = dist;\n    for (n = 0; n < (1 << extra_dbits[code]); n++) {\n      _dist_code[dist++] = code;\n    }\n  }\n  //Assert (dist == 256, \"tr_static_init: dist != 256\");\n  dist >>= 7; /* from now on, all distances are divided by 128 */\n  for (; code < D_CODES; code++) {\n    base_dist[code] = dist << 7;\n    for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n      _dist_code[256 + dist++] = code;\n    }\n  }\n  //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n  /* Construct the codes of the static literal tree */\n  for (bits = 0; bits <= MAX_BITS; bits++) {\n    bl_count[bits] = 0;\n  }\n\n  n = 0;\n  while (n <= 143) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 8;\n    n++;\n    bl_count[8]++;\n  }\n  while (n <= 255) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 9;\n    n++;\n    bl_count[9]++;\n  }\n  while (n <= 279) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 7;\n    n++;\n    bl_count[7]++;\n  }\n  while (n <= 287) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 8;\n    n++;\n    bl_count[8]++;\n  }\n  /* Codes 286 and 287 do not exist, but we must include them in the\n   * tree construction to get a canonical Huffman tree (longest code\n   * all ones)\n   */\n  gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n  /* The static distance tree is trivial: */\n  for (n = 0; n < D_CODES; n++) {\n    static_dtree[n * 2 + 1]/*.Len*/ = 5;\n    static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n  }\n\n  // Now data ready and we can init static trees\n  static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n  static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS);\n  static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0,         BL_CODES, MAX_BL_BITS);\n\n  //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n  var n; /* iterates over tree elements */\n\n  /* Initialize the trees. */\n  for (n = 0; n < L_CODES;  n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n  for (n = 0; n < D_CODES;  n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n  for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n  s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n  s.opt_len = s.static_len = 0;\n  s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n  if (s.bi_valid > 8) {\n    put_short(s, s.bi_buf);\n  } else if (s.bi_valid > 0) {\n    //put_byte(s, (Byte)s->bi_buf);\n    s.pending_buf[s.pending++] = s.bi_buf;\n  }\n  s.bi_buf = 0;\n  s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf    *buf;    /* the input data */\n//unsigned len;     /* its length */\n//int      header;  /* true if block header must be written */\n{\n  bi_windup(s);        /* align on byte boundary */\n\n  if (header) {\n    put_short(s, len);\n    put_short(s, ~len);\n  }\n//  while (len--) {\n//    put_byte(s, *buf++);\n//  }\n  _utils_common_js__WEBPACK_IMPORTED_MODULE_0__.c.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n  s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n  var _n2 = n * 2;\n  var _m2 = m * 2;\n  return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n         (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n//    deflate_state *s;\n//    ct_data *tree;  /* the tree to restore */\n//    int k;               /* node to move down */\n{\n  var v = s.heap[k];\n  var j = k << 1;  /* left son of k */\n  while (j <= s.heap_len) {\n    /* Set j to the smallest of the two sons: */\n    if (j < s.heap_len &&\n      smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n      j++;\n    }\n    /* Exit if v is smaller than both sons */\n    if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n    /* Exchange v with the smallest son */\n    s.heap[k] = s.heap[j];\n    k = j;\n\n    /* And continue down the tree, setting j to the left son of k */\n    j <<= 1;\n  }\n  s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n//    deflate_state *s;\n//    const ct_data *ltree; /* literal tree */\n//    const ct_data *dtree; /* distance tree */\n{\n  var dist;           /* distance of matched string */\n  var lc;             /* match length or unmatched char (if dist == 0) */\n  var lx = 0;         /* running index in l_buf */\n  var code;           /* the code to send */\n  var extra;          /* number of extra bits to send */\n\n  if (s.last_lit !== 0) {\n    do {\n      dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n      lc = s.pending_buf[s.l_buf + lx];\n      lx++;\n\n      if (dist === 0) {\n        send_code(s, lc, ltree); /* send a literal byte */\n        //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n      } else {\n        /* Here, lc is the match length - MIN_MATCH */\n        code = _length_code[lc];\n        send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n        extra = extra_lbits[code];\n        if (extra !== 0) {\n          lc -= base_length[code];\n          send_bits(s, lc, extra);       /* send the extra length bits */\n        }\n        dist--; /* dist is now the match distance - 1 */\n        code = d_code(dist);\n        //Assert (code < D_CODES, \"bad d_code\");\n\n        send_code(s, code, dtree);       /* send the distance code */\n        extra = extra_dbits[code];\n        if (extra !== 0) {\n          dist -= base_dist[code];\n          send_bits(s, dist, extra);   /* send the extra distance bits */\n        }\n      } /* literal or match pair ? */\n\n      /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n      //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n      //       \"pendingBuf overflow\");\n\n    } while (lx < s.last_lit);\n  }\n\n  send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n *     and corresponding code. The length opt_len is updated; static_len is\n *     also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n//    deflate_state *s;\n//    tree_desc *desc; /* the tree descriptor */\n{\n  var tree     = desc.dyn_tree;\n  var stree    = desc.stat_desc.static_tree;\n  var has_stree = desc.stat_desc.has_stree;\n  var elems    = desc.stat_desc.elems;\n  var n, m;          /* iterate over heap elements */\n  var max_code = -1; /* largest code with non zero frequency */\n  var node;          /* new node being created */\n\n  /* Construct the initial heap, with least frequent element in\n   * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n   * heap[0] is not used.\n   */\n  s.heap_len = 0;\n  s.heap_max = HEAP_SIZE;\n\n  for (n = 0; n < elems; n++) {\n    if (tree[n * 2]/*.Freq*/ !== 0) {\n      s.heap[++s.heap_len] = max_code = n;\n      s.depth[n] = 0;\n\n    } else {\n      tree[n * 2 + 1]/*.Len*/ = 0;\n    }\n  }\n\n  /* The pkzip format requires that at least one distance code exists,\n   * and that at least one bit should be sent even if there is only one\n   * possible code. So to avoid special checks later on we force at least\n   * two codes of non zero frequency.\n   */\n  while (s.heap_len < 2) {\n    node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n    tree[node * 2]/*.Freq*/ = 1;\n    s.depth[node] = 0;\n    s.opt_len--;\n\n    if (has_stree) {\n      s.static_len -= stree[node * 2 + 1]/*.Len*/;\n    }\n    /* node is 0 or 1 so it does not have extra bits */\n  }\n  desc.max_code = max_code;\n\n  /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n   * establish sub-heaps of increasing lengths:\n   */\n  for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n  /* Construct the Huffman tree by repeatedly combining the least two\n   * frequent nodes.\n   */\n  node = elems;              /* next internal node of the tree */\n  do {\n    //pqremove(s, tree, n);  /* n = node of least frequency */\n    /*** pqremove ***/\n    n = s.heap[1/*SMALLEST*/];\n    s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n    pqdownheap(s, tree, 1/*SMALLEST*/);\n    /***/\n\n    m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n    s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n    s.heap[--s.heap_max] = m;\n\n    /* Create a new node father of n and m */\n    tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n    s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n    tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n    /* and insert the new node in the heap */\n    s.heap[1/*SMALLEST*/] = node++;\n    pqdownheap(s, tree, 1/*SMALLEST*/);\n\n  } while (s.heap_len >= 2);\n\n  s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n  /* At this point, the fields freq and dad are set. We can now\n   * generate the bit lengths.\n   */\n  gen_bitlen(s, desc);\n\n  /* The field len is now set, we can generate the bit codes */\n  gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n//    deflate_state *s;\n//    ct_data *tree;   /* the tree to be scanned */\n//    int max_code;    /* and its largest code of non zero frequency */\n{\n  var n;                     /* iterates over all tree elements */\n  var prevlen = -1;          /* last emitted length */\n  var curlen;                /* length of current code */\n\n  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n  var count = 0;             /* repeat count of the current code */\n  var max_count = 7;         /* max repeat count */\n  var min_count = 4;         /* min repeat count */\n\n  if (nextlen === 0) {\n    max_count = 138;\n    min_count = 3;\n  }\n  tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n  for (n = 0; n <= max_code; n++) {\n    curlen = nextlen;\n    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n    if (++count < max_count && curlen === nextlen) {\n      continue;\n\n    } else if (count < min_count) {\n      s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n    } else if (curlen !== 0) {\n\n      if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n      s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n    } else if (count <= 10) {\n      s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n    } else {\n      s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n    }\n\n    count = 0;\n    prevlen = curlen;\n\n    if (nextlen === 0) {\n      max_count = 138;\n      min_count = 3;\n\n    } else if (curlen === nextlen) {\n      max_count = 6;\n      min_count = 3;\n\n    } else {\n      max_count = 7;\n      min_count = 4;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n//    deflate_state *s;\n//    ct_data *tree; /* the tree to be scanned */\n//    int max_code;       /* and its largest code of non zero frequency */\n{\n  var n;                     /* iterates over all tree elements */\n  var prevlen = -1;          /* last emitted length */\n  var curlen;                /* length of current code */\n\n  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n  var count = 0;             /* repeat count of the current code */\n  var max_count = 7;         /* max repeat count */\n  var min_count = 4;         /* min repeat count */\n\n  /* tree[max_code+1].Len = -1; */  /* guard already set */\n  if (nextlen === 0) {\n    max_count = 138;\n    min_count = 3;\n  }\n\n  for (n = 0; n <= max_code; n++) {\n    curlen = nextlen;\n    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n    if (++count < max_count && curlen === nextlen) {\n      continue;\n\n    } else if (count < min_count) {\n      do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n    } else if (curlen !== 0) {\n      if (curlen !== prevlen) {\n        send_code(s, curlen, s.bl_tree);\n        count--;\n      }\n      //Assert(count >= 3 && count <= 6, \" 3_6?\");\n      send_code(s, REP_3_6, s.bl_tree);\n      send_bits(s, count - 3, 2);\n\n    } else if (count <= 10) {\n      send_code(s, REPZ_3_10, s.bl_tree);\n      send_bits(s, count - 3, 3);\n\n    } else {\n      send_code(s, REPZ_11_138, s.bl_tree);\n      send_bits(s, count - 11, 7);\n    }\n\n    count = 0;\n    prevlen = curlen;\n    if (nextlen === 0) {\n      max_count = 138;\n      min_count = 3;\n\n    } else if (curlen === nextlen) {\n      max_count = 6;\n      min_count = 3;\n\n    } else {\n      max_count = 7;\n      min_count = 4;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n  var max_blindex;  /* index of last bit length code of non zero freq */\n\n  /* Determine the bit length frequencies for literal and distance trees */\n  scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n  scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n  /* Build the bit length tree: */\n  build_tree(s, s.bl_desc);\n  /* opt_len now includes the length of the tree representations, except\n   * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n   */\n\n  /* Determine the number of bit length codes to send. The pkzip format\n   * requires that at least 4 bit length codes be sent. (appnote.txt says\n   * 3 but the actual value used is 4.)\n   */\n  for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n    if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n      break;\n    }\n  }\n  /* Update opt_len to include the bit length tree and counts */\n  s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n  //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n  //        s->opt_len, s->static_len));\n\n  return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n//    deflate_state *s;\n//    int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n  var rank;                    /* index in bl_order */\n\n  //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n  //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n  //        \"too many codes\");\n  //Tracev((stderr, \"\\nbl counts: \"));\n  send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n  send_bits(s, dcodes - 1,   5);\n  send_bits(s, blcodes - 4,  4); /* not -3 as stated in appnote.txt */\n  for (rank = 0; rank < blcodes; rank++) {\n    //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n    send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n  }\n  //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n  send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n  //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n  send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n  //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n *    a) There are no non-portable control characters belonging to the\n *       \"black list\" (0..6, 14..25, 28..31).\n *    b) There is at least one printable character belonging to the\n *       \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n *   \"gray list\" that is ignored in this detection algorithm:\n *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n  /* black_mask is the bit mask of black-listed bytes\n   * set bits 0..6, 14..25, and 28..31\n   * 0xf3ffc07f = binary 11110011111111111100000001111111\n   */\n  var black_mask = 0xf3ffc07f;\n  var n;\n\n  /* Check for non-textual (\"black-listed\") bytes. */\n  for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n    if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n      return Z_BINARY;\n    }\n  }\n\n  /* Check for textual (\"white-listed\") bytes. */\n  if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n      s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n    return Z_TEXT;\n  }\n  for (n = 32; n < LITERALS; n++) {\n    if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n      return Z_TEXT;\n    }\n  }\n\n  /* There are no \"black-listed\" or \"white-listed\" bytes:\n   * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n   */\n  return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n  if (!static_init_done) {\n    tr_static_init();\n    static_init_done = true;\n  }\n\n  s.l_desc  = new TreeDesc(s.dyn_ltree, static_l_desc);\n  s.d_desc  = new TreeDesc(s.dyn_dtree, static_d_desc);\n  s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n  s.bi_buf = 0;\n  s.bi_valid = 0;\n\n  /* Initialize the first block of the first file: */\n  init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf;       /* input block */\n//ulg stored_len;   /* length of input block */\n//int last;         /* one if this is the last block for a file */\n{\n  send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3);    /* send block type */\n  copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n  send_bits(s, STATIC_TREES << 1, 3);\n  send_code(s, END_BLOCK, static_ltree);\n  bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf;       /* input block, or NULL if too old */\n//ulg stored_len;   /* length of input block */\n//int last;         /* one if this is the last block for a file */\n{\n  var opt_lenb, static_lenb;  /* opt_len and static_len in bytes */\n  var max_blindex = 0;        /* index of last bit length code of non zero freq */\n\n  /* Build the Huffman trees unless a stored block is forced */\n  if (s.level > 0) {\n\n    /* Check if the file is binary or text */\n    if (s.strm.data_type === Z_UNKNOWN) {\n      s.strm.data_type = detect_data_type(s);\n    }\n\n    /* Construct the literal and distance trees */\n    build_tree(s, s.l_desc);\n    // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n    //        s->static_len));\n\n    build_tree(s, s.d_desc);\n    // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n    //        s->static_len));\n    /* At this point, opt_len and static_len are the total bit lengths of\n     * the compressed block data, excluding the tree representations.\n     */\n\n    /* Build the bit length tree for the above two trees, and get the index\n     * in bl_order of the last bit length code to send.\n     */\n    max_blindex = build_bl_tree(s);\n\n    /* Determine the best encoding. Compute the block lengths in bytes. */\n    opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n    static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n    // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n    //        opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n    //        s->last_lit));\n\n    if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n  } else {\n    // Assert(buf != (char*)0, \"lost buf\");\n    opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n  }\n\n  if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n    /* 4: two words for the lengths */\n\n    /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n     * Otherwise we can't have processed more than WSIZE input bytes since\n     * the last block flush, because compression would have been\n     * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n     * transform a block into a stored block.\n     */\n    _tr_stored_block(s, buf, stored_len, last);\n\n  } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n    send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n    compress_block(s, static_ltree, static_dtree);\n\n  } else {\n    send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n    send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n    compress_block(s, s.dyn_ltree, s.dyn_dtree);\n  }\n  // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n  /* The above check is made mod 2^32, for files larger than 512 MB\n   * and uLong implemented on 32 bits.\n   */\n  init_block(s);\n\n  if (last) {\n    bi_windup(s);\n  }\n  // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n  //       s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n//    deflate_state *s;\n//    unsigned dist;  /* distance of matched string */\n//    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n  //var out_length, in_length, dcode;\n\n  s.pending_buf[s.d_buf + s.last_lit * 2]     = (dist >>> 8) & 0xff;\n  s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n  s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n  s.last_lit++;\n\n  if (dist === 0) {\n    /* lc is the unmatched char */\n    s.dyn_ltree[lc * 2]/*.Freq*/++;\n  } else {\n    s.matches++;\n    /* Here, lc is the match length - MIN_MATCH */\n    dist--;             /* dist = match distance - 1 */\n    //Assert((ush)dist < (ush)MAX_DIST(s) &&\n    //       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n    //       (ush)d_code(dist) < (ush)D_CODES,  \"_tr_tally: bad match\");\n\n    s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n    s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n  }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n//  /* Try to guess if it is profitable to stop the current block here */\n//  if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n//    /* Compute an upper bound for the compressed length */\n//    out_length = s.last_lit*8;\n//    in_length = s.strstart - s.block_start;\n//\n//    for (dcode = 0; dcode < D_CODES; dcode++) {\n//      out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n//    }\n//    out_length >>>= 3;\n//    //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n//    //       s->last_lit, in_length, out_length,\n//    //       100L - out_length*100L/in_length));\n//    if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n//      return true;\n//    }\n//  }\n//#endif\n\n  return (s.last_lit === s.lit_bufsize - 1);\n  /* We avoid equality with lit_bufsize because of wraparound at 64K\n   * on 16 bit machines and because stored blocks are restricted to\n   * 64K-1 bytes.\n   */\n}\n\nvar _tr_init_1  = _tr_init;\nvar _tr_stored_block_1 = _tr_stored_block;\nvar _tr_flush_block_1  = _tr_flush_block;\nvar _tr_tally_1 = _tr_tally;\nvar _tr_align_1 = _tr_align;\n\nvar trees = {\n\t_tr_init: _tr_init_1,\n\t_tr_stored_block: _tr_stored_block_1,\n\t_tr_flush_block: _tr_flush_block_1,\n\t_tr_tally: _tr_tally_1,\n\t_tr_align: _tr_align_1\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/trees.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/zstream.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/zstream.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"z\": () => (/* binding */ zstream)\n/* harmony export */ });\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n  /* next input byte */\n  this.input = null; // JS specific, because we have no pointers\n  this.next_in = 0;\n  /* number of bytes available at input */\n  this.avail_in = 0;\n  /* total number of input bytes read so far */\n  this.total_in = 0;\n  /* next output byte should be put there */\n  this.output = null; // JS specific, because we have no pointers\n  this.next_out = 0;\n  /* remaining free space at output */\n  this.avail_out = 0;\n  /* total number of bytes output so far */\n  this.total_out = 0;\n  /* last error message, NULL if no error */\n  this.msg = ''/*Z_NULL*/;\n  /* not visible by applications */\n  this.state = null;\n  /* best guess about the data type: binary or text */\n  this.data_type = 2/*Z_UNKNOWN*/;\n  /* adler32 value of the uncompressed data */\n  this.adler = 0;\n}\n\nvar zstream = ZStream;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/jszip/node_modules/pako/lib/zlib/zstream.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/lie/lib/browser.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/lie/lib/browser.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"b\": () => (/* binding */ browser)\n/* harmony export */ });\n/* harmony import */ var _immediate_lib_browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../immediate/lib/browser.js */ \"./node_modules/@kitware/vtk.js/vendor/immediate/lib/browser.js\");\n\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nvar browser = Promise$1;\n\nfunction Promise$1(resolver) {\n  if (typeof resolver !== 'function') {\n    throw new TypeError('resolver must be a function');\n  }\n  this.state = PENDING;\n  this.queue = [];\n  this.outcome = void 0;\n  if (resolver !== INTERNAL) {\n    safelyResolveThenable(this, resolver);\n  }\n}\n\nPromise$1.prototype[\"finally\"] = function (callback) {\n  if (typeof callback !== 'function') {\n    return this;\n  }\n  var p = this.constructor;\n  return this.then(resolve, reject);\n\n  function resolve(value) {\n    function yes () {\n      return value;\n    }\n    return p.resolve(callback()).then(yes);\n  }\n  function reject(reason) {\n    function no () {\n      throw reason;\n    }\n    return p.resolve(callback()).then(no);\n  }\n};\nPromise$1.prototype[\"catch\"] = function (onRejected) {\n  return this.then(null, onRejected);\n};\nPromise$1.prototype.then = function (onFulfilled, onRejected) {\n  if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n    typeof onRejected !== 'function' && this.state === REJECTED) {\n    return this;\n  }\n  var promise = new this.constructor(INTERNAL);\n  if (this.state !== PENDING) {\n    var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n    unwrap(promise, resolver, this.outcome);\n  } else {\n    this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n  }\n\n  return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n  this.promise = promise;\n  if (typeof onFulfilled === 'function') {\n    this.onFulfilled = onFulfilled;\n    this.callFulfilled = this.otherCallFulfilled;\n  }\n  if (typeof onRejected === 'function') {\n    this.onRejected = onRejected;\n    this.callRejected = this.otherCallRejected;\n  }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n  handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n  unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n  handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n  unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n  (0,_immediate_lib_browser_js__WEBPACK_IMPORTED_MODULE_0__.b)(function () {\n    var returnValue;\n    try {\n      returnValue = func(value);\n    } catch (e) {\n      return handlers.reject(promise, e);\n    }\n    if (returnValue === promise) {\n      handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n    } else {\n      handlers.resolve(promise, returnValue);\n    }\n  });\n}\n\nhandlers.resolve = function (self, value) {\n  var result = tryCatch(getThen, value);\n  if (result.status === 'error') {\n    return handlers.reject(self, result.value);\n  }\n  var thenable = result.value;\n\n  if (thenable) {\n    safelyResolveThenable(self, thenable);\n  } else {\n    self.state = FULFILLED;\n    self.outcome = value;\n    var i = -1;\n    var len = self.queue.length;\n    while (++i < len) {\n      self.queue[i].callFulfilled(value);\n    }\n  }\n  return self;\n};\nhandlers.reject = function (self, error) {\n  self.state = REJECTED;\n  self.outcome = error;\n  var i = -1;\n  var len = self.queue.length;\n  while (++i < len) {\n    self.queue[i].callRejected(error);\n  }\n  return self;\n};\n\nfunction getThen(obj) {\n  // Make sure we only access the accessor once as required by the spec\n  var then = obj && obj.then;\n  if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n    return function appyThen() {\n      then.apply(obj, arguments);\n    };\n  }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n  // Either fulfill, reject or reject with error\n  var called = false;\n  function onError(value) {\n    if (called) {\n      return;\n    }\n    called = true;\n    handlers.reject(self, value);\n  }\n\n  function onSuccess(value) {\n    if (called) {\n      return;\n    }\n    called = true;\n    handlers.resolve(self, value);\n  }\n\n  function tryToUnwrap() {\n    thenable(onSuccess, onError);\n  }\n\n  var result = tryCatch(tryToUnwrap);\n  if (result.status === 'error') {\n    onError(result.value);\n  }\n}\n\nfunction tryCatch(func, value) {\n  var out = {};\n  try {\n    out.value = func(value);\n    out.status = 'success';\n  } catch (e) {\n    out.status = 'error';\n    out.value = e;\n  }\n  return out;\n}\n\nPromise$1.resolve = resolve;\nfunction resolve(value) {\n  if (value instanceof this) {\n    return value;\n  }\n  return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise$1.reject = reject;\nfunction reject(reason) {\n  var promise = new this(INTERNAL);\n  return handlers.reject(promise, reason);\n}\n\nPromise$1.all = all;\nfunction all(iterable) {\n  var self = this;\n  if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n    return this.reject(new TypeError('must be an array'));\n  }\n\n  var len = iterable.length;\n  var called = false;\n  if (!len) {\n    return this.resolve([]);\n  }\n\n  var values = new Array(len);\n  var resolved = 0;\n  var i = -1;\n  var promise = new this(INTERNAL);\n\n  while (++i < len) {\n    allResolver(iterable[i], i);\n  }\n  return promise;\n  function allResolver(value, i) {\n    self.resolve(value).then(resolveFromAll, function (error) {\n      if (!called) {\n        called = true;\n        handlers.reject(promise, error);\n      }\n    });\n    function resolveFromAll(outValue) {\n      values[i] = outValue;\n      if (++resolved === len && !called) {\n        called = true;\n        handlers.resolve(promise, values);\n      }\n    }\n  }\n}\n\nPromise$1.race = race;\nfunction race(iterable) {\n  var self = this;\n  if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n    return this.reject(new TypeError('must be an array'));\n  }\n\n  var len = iterable.length;\n  var called = false;\n  if (!len) {\n    return this.resolve([]);\n  }\n\n  var i = -1;\n  var promise = new this(INTERNAL);\n\n  while (++i < len) {\n    resolver(iterable[i]);\n  }\n  return promise;\n  function resolver(value) {\n    self.resolve(value).then(function (response) {\n      if (!called) {\n        called = true;\n        handlers.resolve(promise, response);\n      }\n    }, function (error) {\n      if (!called) {\n        called = true;\n        handlers.reject(promise, error);\n      }\n    });\n  }\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/lie/lib/browser.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/pako/dist/pako.esm.mjs":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/pako/dist/pako.esm.mjs ***!
  \********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"p\": () => (/* binding */ pako)\n/* harmony export */ });\n/*! pako 2.0.3 https://github.com/nodeca/pako @license (MIT AND Zlib) */\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//const Z_FILTERED          = 1;\n//const Z_HUFFMAN_ONLY      = 2;\n//const Z_RLE               = 3;\nconst Z_FIXED               = 4;\n//const Z_DEFAULT_STRATEGY  = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nconst Z_BINARY              = 0;\nconst Z_TEXT                = 1;\n//const Z_ASCII             = 1; // = Z_TEXT\nconst Z_UNKNOWN             = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES    = 2;\n/* The three kinds of block type */\n\nconst MIN_MATCH    = 3;\nconst MAX_MATCH    = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nconst LENGTH_CODES  = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nconst LITERALS      = 256;\n/* number of literal bytes 0..255 */\n\nconst L_CODES       = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nconst D_CODES       = 30;\n/* number of distance codes */\n\nconst BL_CODES      = 19;\n/* number of codes used to transfer the bit lengths */\n\nconst HEAP_SIZE     = 2 * L_CODES + 1;\n/* maximum heap size */\n\nconst MAX_BITS      = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst Buf_size      = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nconst MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nconst END_BLOCK   = 256;\n/* end of block literal code */\n\nconst REP_3_6     = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nconst REPZ_3_10   = 17;\n/* repeat a zero length 3-10 times  (3 bits of repeat count) */\n\nconst REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times  (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nconst extra_lbits =   /* extra bits for each length code */\n  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]);\n\nconst extra_dbits =   /* extra bits for each distance code */\n  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]);\n\nconst extra_blbits =  /* extra bits for each bit length code */\n  new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);\n\nconst bl_order =\n  new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nconst DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nconst static_ltree  = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nconst static_dtree  = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nconst _dist_code    = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nconst _length_code  = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nconst base_length   = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nconst base_dist     = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n  this.static_tree  = static_tree;  /* static tree or NULL */\n  this.extra_bits   = extra_bits;   /* extra bits for each code or NULL */\n  this.extra_base   = extra_base;   /* base index for extra_bits */\n  this.elems        = elems;        /* max number of elements in the tree */\n  this.max_length   = max_length;   /* max bit length for the codes */\n\n  // show if `static_tree` has data or dummy - needed for monomorphic objects\n  this.has_stree    = static_tree && static_tree.length;\n}\n\n\nlet static_l_desc;\nlet static_d_desc;\nlet static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n  this.dyn_tree = dyn_tree;     /* the dynamic tree */\n  this.max_code = 0;            /* largest code with non zero frequency */\n  this.stat_desc = stat_desc;   /* the corresponding static tree */\n}\n\n\n\nconst d_code = (dist) => {\n\n  return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n};\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nconst put_short = (s, w) => {\n//    put_byte(s, (uch)((w) & 0xff));\n//    put_byte(s, (uch)((ush)(w) >> 8));\n  s.pending_buf[s.pending++] = (w) & 0xff;\n  s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n};\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nconst send_bits = (s, value, length) => {\n\n  if (s.bi_valid > (Buf_size - length)) {\n    s.bi_buf |= (value << s.bi_valid) & 0xffff;\n    put_short(s, s.bi_buf);\n    s.bi_buf = value >> (Buf_size - s.bi_valid);\n    s.bi_valid += length - Buf_size;\n  } else {\n    s.bi_buf |= (value << s.bi_valid) & 0xffff;\n    s.bi_valid += length;\n  }\n};\n\n\nconst send_code = (s, c, tree) => {\n\n  send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n};\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nconst bi_reverse = (code, len) => {\n\n  let res = 0;\n  do {\n    res |= code & 1;\n    code >>>= 1;\n    res <<= 1;\n  } while (--len > 0);\n  return res >>> 1;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nconst bi_flush = (s) => {\n\n  if (s.bi_valid === 16) {\n    put_short(s, s.bi_buf);\n    s.bi_buf = 0;\n    s.bi_valid = 0;\n\n  } else if (s.bi_valid >= 8) {\n    s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n    s.bi_buf >>= 8;\n    s.bi_valid -= 8;\n  }\n};\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n *    above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n *     array bl_count contains the frequencies for each bit length.\n *     The length opt_len is updated; static_len is also updated if stree is\n *     not null.\n */\nconst gen_bitlen = (s, desc) =>\n//    deflate_state *s;\n//    tree_desc *desc;    /* the tree descriptor */\n{\n  const tree            = desc.dyn_tree;\n  const max_code        = desc.max_code;\n  const stree           = desc.stat_desc.static_tree;\n  const has_stree       = desc.stat_desc.has_stree;\n  const extra           = desc.stat_desc.extra_bits;\n  const base            = desc.stat_desc.extra_base;\n  const max_length      = desc.stat_desc.max_length;\n  let h;              /* heap index */\n  let n, m;           /* iterate over the tree elements */\n  let bits;           /* bit length */\n  let xbits;          /* extra bits */\n  let f;              /* frequency */\n  let overflow = 0;   /* number of elements with bit length too large */\n\n  for (bits = 0; bits <= MAX_BITS; bits++) {\n    s.bl_count[bits] = 0;\n  }\n\n  /* In a first pass, compute the optimal bit lengths (which may\n   * overflow in the case of the bit length tree).\n   */\n  tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n  for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n    n = s.heap[h];\n    bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n    if (bits > max_length) {\n      bits = max_length;\n      overflow++;\n    }\n    tree[n * 2 + 1]/*.Len*/ = bits;\n    /* We overwrite tree[n].Dad which is no longer needed */\n\n    if (n > max_code) { continue; } /* not a leaf node */\n\n    s.bl_count[bits]++;\n    xbits = 0;\n    if (n >= base) {\n      xbits = extra[n - base];\n    }\n    f = tree[n * 2]/*.Freq*/;\n    s.opt_len += f * (bits + xbits);\n    if (has_stree) {\n      s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n    }\n  }\n  if (overflow === 0) { return; }\n\n  // Trace((stderr,\"\\nbit length overflow\\n\"));\n  /* This happens for example on obj2 and pic of the Calgary corpus */\n\n  /* Find the first bit length which could increase: */\n  do {\n    bits = max_length - 1;\n    while (s.bl_count[bits] === 0) { bits--; }\n    s.bl_count[bits]--;      /* move one leaf down the tree */\n    s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n    s.bl_count[max_length]--;\n    /* The brother of the overflow item also moves one step up,\n     * but this does not affect bl_count[max_length]\n     */\n    overflow -= 2;\n  } while (overflow > 0);\n\n  /* Now recompute all bit lengths, scanning in increasing frequency.\n   * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n   * lengths instead of fixing only the wrong ones. This idea is taken\n   * from 'ar' written by Haruhiko Okumura.)\n   */\n  for (bits = max_length; bits !== 0; bits--) {\n    n = s.bl_count[bits];\n    while (n !== 0) {\n      m = s.heap[--h];\n      if (m > max_code) { continue; }\n      if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n        // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n        s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n        tree[m * 2 + 1]/*.Len*/ = bits;\n      }\n      n--;\n    }\n  }\n};\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n *     zero code length.\n */\nconst gen_codes = (tree, max_code, bl_count) =>\n//    ct_data *tree;             /* the tree to decorate */\n//    int max_code;              /* largest code with non zero frequency */\n//    ushf *bl_count;            /* number of codes at each bit length */\n{\n  const next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n  let code = 0;              /* running code value */\n  let bits;                  /* bit index */\n  let n;                     /* code index */\n\n  /* The distribution counts are first used to generate the code values\n   * without bit reversal.\n   */\n  for (bits = 1; bits <= MAX_BITS; bits++) {\n    next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n  }\n  /* Check that the bit counts in bl_count are consistent. The last code\n   * must be all ones.\n   */\n  //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n  //        \"inconsistent bit counts\");\n  //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n  for (n = 0;  n <= max_code; n++) {\n    let len = tree[n * 2 + 1]/*.Len*/;\n    if (len === 0) { continue; }\n    /* Now reverse the bits */\n    tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n    //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n    //     n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n  }\n};\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nconst tr_static_init = () => {\n\n  let n;        /* iterates over tree elements */\n  let bits;     /* bit counter */\n  let length;   /* length value */\n  let code;     /* code value */\n  let dist;     /* distance index */\n  const bl_count = new Array(MAX_BITS + 1);\n  /* number of codes at each bit length for an optimal tree */\n\n  // do check in _tr_init()\n  //if (static_init_done) return;\n\n  /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n  static_l_desc.static_tree = static_ltree;\n  static_l_desc.extra_bits = extra_lbits;\n  static_d_desc.static_tree = static_dtree;\n  static_d_desc.extra_bits = extra_dbits;\n  static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n  /* Initialize the mapping length (0..255) -> length code (0..28) */\n  length = 0;\n  for (code = 0; code < LENGTH_CODES - 1; code++) {\n    base_length[code] = length;\n    for (n = 0; n < (1 << extra_lbits[code]); n++) {\n      _length_code[length++] = code;\n    }\n  }\n  //Assert (length == 256, \"tr_static_init: length != 256\");\n  /* Note that the length 255 (match length 258) can be represented\n   * in two different ways: code 284 + 5 bits or code 285, so we\n   * overwrite length_code[255] to use the best encoding:\n   */\n  _length_code[length - 1] = code;\n\n  /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n  dist = 0;\n  for (code = 0; code < 16; code++) {\n    base_dist[code] = dist;\n    for (n = 0; n < (1 << extra_dbits[code]); n++) {\n      _dist_code[dist++] = code;\n    }\n  }\n  //Assert (dist == 256, \"tr_static_init: dist != 256\");\n  dist >>= 7; /* from now on, all distances are divided by 128 */\n  for (; code < D_CODES; code++) {\n    base_dist[code] = dist << 7;\n    for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n      _dist_code[256 + dist++] = code;\n    }\n  }\n  //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n  /* Construct the codes of the static literal tree */\n  for (bits = 0; bits <= MAX_BITS; bits++) {\n    bl_count[bits] = 0;\n  }\n\n  n = 0;\n  while (n <= 143) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 8;\n    n++;\n    bl_count[8]++;\n  }\n  while (n <= 255) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 9;\n    n++;\n    bl_count[9]++;\n  }\n  while (n <= 279) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 7;\n    n++;\n    bl_count[7]++;\n  }\n  while (n <= 287) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 8;\n    n++;\n    bl_count[8]++;\n  }\n  /* Codes 286 and 287 do not exist, but we must include them in the\n   * tree construction to get a canonical Huffman tree (longest code\n   * all ones)\n   */\n  gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n  /* The static distance tree is trivial: */\n  for (n = 0; n < D_CODES; n++) {\n    static_dtree[n * 2 + 1]/*.Len*/ = 5;\n    static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n  }\n\n  // Now data ready and we can init static trees\n  static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n  static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS);\n  static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0,         BL_CODES, MAX_BL_BITS);\n\n  //static_init_done = true;\n};\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nconst init_block = (s) => {\n\n  let n; /* iterates over tree elements */\n\n  /* Initialize the trees. */\n  for (n = 0; n < L_CODES;  n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n  for (n = 0; n < D_CODES;  n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n  for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n  s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n  s.opt_len = s.static_len = 0;\n  s.last_lit = s.matches = 0;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nconst bi_windup = (s) =>\n{\n  if (s.bi_valid > 8) {\n    put_short(s, s.bi_buf);\n  } else if (s.bi_valid > 0) {\n    //put_byte(s, (Byte)s->bi_buf);\n    s.pending_buf[s.pending++] = s.bi_buf;\n  }\n  s.bi_buf = 0;\n  s.bi_valid = 0;\n};\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nconst copy_block = (s, buf, len, header) =>\n//DeflateState *s;\n//charf    *buf;    /* the input data */\n//unsigned len;     /* its length */\n//int      header;  /* true if block header must be written */\n{\n  bi_windup(s);        /* align on byte boundary */\n\n  if (header) {\n    put_short(s, len);\n    put_short(s, ~len);\n  }\n//  while (len--) {\n//    put_byte(s, *buf++);\n//  }\n  s.pending_buf.set(s.window.subarray(buf, buf + len), s.pending);\n  s.pending += len;\n};\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nconst smaller = (tree, n, m, depth) => {\n\n  const _n2 = n * 2;\n  const _m2 = m * 2;\n  return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n         (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n};\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nconst pqdownheap = (s, tree, k) =>\n//    deflate_state *s;\n//    ct_data *tree;  /* the tree to restore */\n//    int k;               /* node to move down */\n{\n  const v = s.heap[k];\n  let j = k << 1;  /* left son of k */\n  while (j <= s.heap_len) {\n    /* Set j to the smallest of the two sons: */\n    if (j < s.heap_len &&\n      smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n      j++;\n    }\n    /* Exit if v is smaller than both sons */\n    if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n    /* Exchange v with the smallest son */\n    s.heap[k] = s.heap[j];\n    k = j;\n\n    /* And continue down the tree, setting j to the left son of k */\n    j <<= 1;\n  }\n  s.heap[k] = v;\n};\n\n\n// inlined manually\n// const SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nconst compress_block = (s, ltree, dtree) =>\n//    deflate_state *s;\n//    const ct_data *ltree; /* literal tree */\n//    const ct_data *dtree; /* distance tree */\n{\n  let dist;           /* distance of matched string */\n  let lc;             /* match length or unmatched char (if dist == 0) */\n  let lx = 0;         /* running index in l_buf */\n  let code;           /* the code to send */\n  let extra;          /* number of extra bits to send */\n\n  if (s.last_lit !== 0) {\n    do {\n      dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n      lc = s.pending_buf[s.l_buf + lx];\n      lx++;\n\n      if (dist === 0) {\n        send_code(s, lc, ltree); /* send a literal byte */\n        //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n      } else {\n        /* Here, lc is the match length - MIN_MATCH */\n        code = _length_code[lc];\n        send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n        extra = extra_lbits[code];\n        if (extra !== 0) {\n          lc -= base_length[code];\n          send_bits(s, lc, extra);       /* send the extra length bits */\n        }\n        dist--; /* dist is now the match distance - 1 */\n        code = d_code(dist);\n        //Assert (code < D_CODES, \"bad d_code\");\n\n        send_code(s, code, dtree);       /* send the distance code */\n        extra = extra_dbits[code];\n        if (extra !== 0) {\n          dist -= base_dist[code];\n          send_bits(s, dist, extra);   /* send the extra distance bits */\n        }\n      } /* literal or match pair ? */\n\n      /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n      //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n      //       \"pendingBuf overflow\");\n\n    } while (lx < s.last_lit);\n  }\n\n  send_code(s, END_BLOCK, ltree);\n};\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n *     and corresponding code. The length opt_len is updated; static_len is\n *     also updated if stree is not null. The field max_code is set.\n */\nconst build_tree = (s, desc) =>\n//    deflate_state *s;\n//    tree_desc *desc; /* the tree descriptor */\n{\n  const tree     = desc.dyn_tree;\n  const stree    = desc.stat_desc.static_tree;\n  const has_stree = desc.stat_desc.has_stree;\n  const elems    = desc.stat_desc.elems;\n  let n, m;          /* iterate over heap elements */\n  let max_code = -1; /* largest code with non zero frequency */\n  let node;          /* new node being created */\n\n  /* Construct the initial heap, with least frequent element in\n   * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n   * heap[0] is not used.\n   */\n  s.heap_len = 0;\n  s.heap_max = HEAP_SIZE;\n\n  for (n = 0; n < elems; n++) {\n    if (tree[n * 2]/*.Freq*/ !== 0) {\n      s.heap[++s.heap_len] = max_code = n;\n      s.depth[n] = 0;\n\n    } else {\n      tree[n * 2 + 1]/*.Len*/ = 0;\n    }\n  }\n\n  /* The pkzip format requires that at least one distance code exists,\n   * and that at least one bit should be sent even if there is only one\n   * possible code. So to avoid special checks later on we force at least\n   * two codes of non zero frequency.\n   */\n  while (s.heap_len < 2) {\n    node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n    tree[node * 2]/*.Freq*/ = 1;\n    s.depth[node] = 0;\n    s.opt_len--;\n\n    if (has_stree) {\n      s.static_len -= stree[node * 2 + 1]/*.Len*/;\n    }\n    /* node is 0 or 1 so it does not have extra bits */\n  }\n  desc.max_code = max_code;\n\n  /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n   * establish sub-heaps of increasing lengths:\n   */\n  for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n  /* Construct the Huffman tree by repeatedly combining the least two\n   * frequent nodes.\n   */\n  node = elems;              /* next internal node of the tree */\n  do {\n    //pqremove(s, tree, n);  /* n = node of least frequency */\n    /*** pqremove ***/\n    n = s.heap[1/*SMALLEST*/];\n    s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n    pqdownheap(s, tree, 1/*SMALLEST*/);\n    /***/\n\n    m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n    s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n    s.heap[--s.heap_max] = m;\n\n    /* Create a new node father of n and m */\n    tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n    s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n    tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n    /* and insert the new node in the heap */\n    s.heap[1/*SMALLEST*/] = node++;\n    pqdownheap(s, tree, 1/*SMALLEST*/);\n\n  } while (s.heap_len >= 2);\n\n  s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n  /* At this point, the fields freq and dad are set. We can now\n   * generate the bit lengths.\n   */\n  gen_bitlen(s, desc);\n\n  /* The field len is now set, we can generate the bit codes */\n  gen_codes(tree, max_code, s.bl_count);\n};\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nconst scan_tree = (s, tree, max_code) =>\n//    deflate_state *s;\n//    ct_data *tree;   /* the tree to be scanned */\n//    int max_code;    /* and its largest code of non zero frequency */\n{\n  let n;                     /* iterates over all tree elements */\n  let prevlen = -1;          /* last emitted length */\n  let curlen;                /* length of current code */\n\n  let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n  let count = 0;             /* repeat count of the current code */\n  let max_count = 7;         /* max repeat count */\n  let min_count = 4;         /* min repeat count */\n\n  if (nextlen === 0) {\n    max_count = 138;\n    min_count = 3;\n  }\n  tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n  for (n = 0; n <= max_code; n++) {\n    curlen = nextlen;\n    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n    if (++count < max_count && curlen === nextlen) {\n      continue;\n\n    } else if (count < min_count) {\n      s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n    } else if (curlen !== 0) {\n\n      if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n      s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n    } else if (count <= 10) {\n      s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n    } else {\n      s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n    }\n\n    count = 0;\n    prevlen = curlen;\n\n    if (nextlen === 0) {\n      max_count = 138;\n      min_count = 3;\n\n    } else if (curlen === nextlen) {\n      max_count = 6;\n      min_count = 3;\n\n    } else {\n      max_count = 7;\n      min_count = 4;\n    }\n  }\n};\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nconst send_tree = (s, tree, max_code) =>\n//    deflate_state *s;\n//    ct_data *tree; /* the tree to be scanned */\n//    int max_code;       /* and its largest code of non zero frequency */\n{\n  let n;                     /* iterates over all tree elements */\n  let prevlen = -1;          /* last emitted length */\n  let curlen;                /* length of current code */\n\n  let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n  let count = 0;             /* repeat count of the current code */\n  let max_count = 7;         /* max repeat count */\n  let min_count = 4;         /* min repeat count */\n\n  /* tree[max_code+1].Len = -1; */  /* guard already set */\n  if (nextlen === 0) {\n    max_count = 138;\n    min_count = 3;\n  }\n\n  for (n = 0; n <= max_code; n++) {\n    curlen = nextlen;\n    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n    if (++count < max_count && curlen === nextlen) {\n      continue;\n\n    } else if (count < min_count) {\n      do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n    } else if (curlen !== 0) {\n      if (curlen !== prevlen) {\n        send_code(s, curlen, s.bl_tree);\n        count--;\n      }\n      //Assert(count >= 3 && count <= 6, \" 3_6?\");\n      send_code(s, REP_3_6, s.bl_tree);\n      send_bits(s, count - 3, 2);\n\n    } else if (count <= 10) {\n      send_code(s, REPZ_3_10, s.bl_tree);\n      send_bits(s, count - 3, 3);\n\n    } else {\n      send_code(s, REPZ_11_138, s.bl_tree);\n      send_bits(s, count - 11, 7);\n    }\n\n    count = 0;\n    prevlen = curlen;\n    if (nextlen === 0) {\n      max_count = 138;\n      min_count = 3;\n\n    } else if (curlen === nextlen) {\n      max_count = 6;\n      min_count = 3;\n\n    } else {\n      max_count = 7;\n      min_count = 4;\n    }\n  }\n};\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nconst build_bl_tree = (s) => {\n\n  let max_blindex;  /* index of last bit length code of non zero freq */\n\n  /* Determine the bit length frequencies for literal and distance trees */\n  scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n  scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n  /* Build the bit length tree: */\n  build_tree(s, s.bl_desc);\n  /* opt_len now includes the length of the tree representations, except\n   * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n   */\n\n  /* Determine the number of bit length codes to send. The pkzip format\n   * requires that at least 4 bit length codes be sent. (appnote.txt says\n   * 3 but the actual value used is 4.)\n   */\n  for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n    if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n      break;\n    }\n  }\n  /* Update opt_len to include the bit length tree and counts */\n  s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n  //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n  //        s->opt_len, s->static_len));\n\n  return max_blindex;\n};\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nconst send_all_trees = (s, lcodes, dcodes, blcodes) =>\n//    deflate_state *s;\n//    int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n  let rank;                    /* index in bl_order */\n\n  //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n  //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n  //        \"too many codes\");\n  //Tracev((stderr, \"\\nbl counts: \"));\n  send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n  send_bits(s, dcodes - 1,   5);\n  send_bits(s, blcodes - 4,  4); /* not -3 as stated in appnote.txt */\n  for (rank = 0; rank < blcodes; rank++) {\n    //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n    send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n  }\n  //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n  send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n  //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n  send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n  //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n};\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n *    a) There are no non-portable control characters belonging to the\n *       \"black list\" (0..6, 14..25, 28..31).\n *    b) There is at least one printable character belonging to the\n *       \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n *   \"gray list\" that is ignored in this detection algorithm:\n *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nconst detect_data_type = (s) => {\n  /* black_mask is the bit mask of black-listed bytes\n   * set bits 0..6, 14..25, and 28..31\n   * 0xf3ffc07f = binary 11110011111111111100000001111111\n   */\n  let black_mask = 0xf3ffc07f;\n  let n;\n\n  /* Check for non-textual (\"black-listed\") bytes. */\n  for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n    if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n      return Z_BINARY;\n    }\n  }\n\n  /* Check for textual (\"white-listed\") bytes. */\n  if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n      s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n    return Z_TEXT;\n  }\n  for (n = 32; n < LITERALS; n++) {\n    if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n      return Z_TEXT;\n    }\n  }\n\n  /* There are no \"black-listed\" or \"white-listed\" bytes:\n   * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n   */\n  return Z_BINARY;\n};\n\n\nlet static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nconst _tr_init = (s) =>\n{\n\n  if (!static_init_done) {\n    tr_static_init();\n    static_init_done = true;\n  }\n\n  s.l_desc  = new TreeDesc(s.dyn_ltree, static_l_desc);\n  s.d_desc  = new TreeDesc(s.dyn_dtree, static_d_desc);\n  s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n  s.bi_buf = 0;\n  s.bi_valid = 0;\n\n  /* Initialize the first block of the first file: */\n  init_block(s);\n};\n\n\n/* ===========================================================================\n * Send a stored block\n */\nconst _tr_stored_block = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf;       /* input block */\n//ulg stored_len;   /* length of input block */\n//int last;         /* one if this is the last block for a file */\n{\n  send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3);    /* send block type */\n  copy_block(s, buf, stored_len, true); /* with header */\n};\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nconst _tr_align = (s) => {\n  send_bits(s, STATIC_TREES << 1, 3);\n  send_code(s, END_BLOCK, static_ltree);\n  bi_flush(s);\n};\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nconst _tr_flush_block = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf;       /* input block, or NULL if too old */\n//ulg stored_len;   /* length of input block */\n//int last;         /* one if this is the last block for a file */\n{\n  let opt_lenb, static_lenb;  /* opt_len and static_len in bytes */\n  let max_blindex = 0;        /* index of last bit length code of non zero freq */\n\n  /* Build the Huffman trees unless a stored block is forced */\n  if (s.level > 0) {\n\n    /* Check if the file is binary or text */\n    if (s.strm.data_type === Z_UNKNOWN) {\n      s.strm.data_type = detect_data_type(s);\n    }\n\n    /* Construct the literal and distance trees */\n    build_tree(s, s.l_desc);\n    // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n    //        s->static_len));\n\n    build_tree(s, s.d_desc);\n    // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n    //        s->static_len));\n    /* At this point, opt_len and static_len are the total bit lengths of\n     * the compressed block data, excluding the tree representations.\n     */\n\n    /* Build the bit length tree for the above two trees, and get the index\n     * in bl_order of the last bit length code to send.\n     */\n    max_blindex = build_bl_tree(s);\n\n    /* Determine the best encoding. Compute the block lengths in bytes. */\n    opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n    static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n    // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n    //        opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n    //        s->last_lit));\n\n    if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n  } else {\n    // Assert(buf != (char*)0, \"lost buf\");\n    opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n  }\n\n  if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n    /* 4: two words for the lengths */\n\n    /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n     * Otherwise we can't have processed more than WSIZE input bytes since\n     * the last block flush, because compression would have been\n     * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n     * transform a block into a stored block.\n     */\n    _tr_stored_block(s, buf, stored_len, last);\n\n  } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n    send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n    compress_block(s, static_ltree, static_dtree);\n\n  } else {\n    send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n    send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n    compress_block(s, s.dyn_ltree, s.dyn_dtree);\n  }\n  // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n  /* The above check is made mod 2^32, for files larger than 512 MB\n   * and uLong implemented on 32 bits.\n   */\n  init_block(s);\n\n  if (last) {\n    bi_windup(s);\n  }\n  // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n  //       s->compressed_len-7*last));\n};\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nconst _tr_tally = (s, dist, lc) =>\n//    deflate_state *s;\n//    unsigned dist;  /* distance of matched string */\n//    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n  //let out_length, in_length, dcode;\n\n  s.pending_buf[s.d_buf + s.last_lit * 2]     = (dist >>> 8) & 0xff;\n  s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n  s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n  s.last_lit++;\n\n  if (dist === 0) {\n    /* lc is the unmatched char */\n    s.dyn_ltree[lc * 2]/*.Freq*/++;\n  } else {\n    s.matches++;\n    /* Here, lc is the match length - MIN_MATCH */\n    dist--;             /* dist = match distance - 1 */\n    //Assert((ush)dist < (ush)MAX_DIST(s) &&\n    //       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n    //       (ush)d_code(dist) < (ush)D_CODES,  \"_tr_tally: bad match\");\n\n    s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n    s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n  }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n//  /* Try to guess if it is profitable to stop the current block here */\n//  if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n//    /* Compute an upper bound for the compressed length */\n//    out_length = s.last_lit*8;\n//    in_length = s.strstart - s.block_start;\n//\n//    for (dcode = 0; dcode < D_CODES; dcode++) {\n//      out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n//    }\n//    out_length >>>= 3;\n//    //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n//    //       s->last_lit, in_length, out_length,\n//    //       100L - out_length*100L/in_length));\n//    if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n//      return true;\n//    }\n//  }\n//#endif\n\n  return (s.last_lit === s.lit_bufsize - 1);\n  /* We avoid equality with lit_bufsize because of wraparound at 64K\n   * on 16 bit machines and because stored blocks are restricted to\n   * 64K-1 bytes.\n   */\n};\n\nvar _tr_init_1  = _tr_init;\nvar _tr_stored_block_1 = _tr_stored_block;\nvar _tr_flush_block_1  = _tr_flush_block;\nvar _tr_tally_1 = _tr_tally;\nvar _tr_align_1 = _tr_align;\n\nvar trees = {\n\t_tr_init: _tr_init_1,\n\t_tr_stored_block: _tr_stored_block_1,\n\t_tr_flush_block: _tr_flush_block_1,\n\t_tr_tally: _tr_tally_1,\n\t_tr_align: _tr_align_1\n};\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = (adler, buf, len, pos) => {\n  let s1 = (adler & 0xffff) |0,\n      s2 = ((adler >>> 16) & 0xffff) |0,\n      n = 0;\n\n  while (len !== 0) {\n    // Set limit ~ twice less than 5552, to keep\n    // s2 in 31-bits, because we force signed ints.\n    // in other case %= will fail.\n    n = len > 2000 ? 2000 : len;\n    len -= n;\n\n    do {\n      s1 = (s1 + buf[pos++]) |0;\n      s2 = (s2 + s1) |0;\n    } while (--n);\n\n    s1 %= 65521;\n    s2 %= 65521;\n  }\n\n  return (s1 | (s2 << 16)) |0;\n};\n\n\nvar adler32_1 = adler32;\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nconst makeTable = () => {\n  let c, table = [];\n\n  for (var n = 0; n < 256; n++) {\n    c = n;\n    for (var k = 0; k < 8; k++) {\n      c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n    }\n    table[n] = c;\n  }\n\n  return table;\n};\n\n// Create table on load. Just 255 signed longs. Not a problem.\nconst crcTable = new Uint32Array(makeTable());\n\n\nconst crc32 = (crc, buf, len, pos) => {\n  const t = crcTable;\n  const end = pos + len;\n\n  crc ^= -1;\n\n  for (let i = pos; i < end; i++) {\n    crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n  }\n\n  return (crc ^ (-1)); // >>> 0;\n};\n\n\nvar crc32_1 = crc32;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar messages = {\n  2:      'need dictionary',     /* Z_NEED_DICT       2  */\n  1:      'stream end',          /* Z_STREAM_END      1  */\n  0:      '',                    /* Z_OK              0  */\n  '-1':   'file error',          /* Z_ERRNO         (-1) */\n  '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */\n  '-3':   'data error',          /* Z_DATA_ERROR    (-3) */\n  '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */\n  '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */\n  '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar constants = {\n\n  /* Allowed flush values; see deflate() and inflate() below for details */\n  Z_NO_FLUSH:         0,\n  Z_PARTIAL_FLUSH:    1,\n  Z_SYNC_FLUSH:       2,\n  Z_FULL_FLUSH:       3,\n  Z_FINISH:           4,\n  Z_BLOCK:            5,\n  Z_TREES:            6,\n\n  /* Return codes for the compression/decompression functions. Negative values\n  * are errors, positive values are used for special but normal events.\n  */\n  Z_OK:               0,\n  Z_STREAM_END:       1,\n  Z_NEED_DICT:        2,\n  Z_ERRNO:           -1,\n  Z_STREAM_ERROR:    -2,\n  Z_DATA_ERROR:      -3,\n  Z_MEM_ERROR:       -4,\n  Z_BUF_ERROR:       -5,\n  //Z_VERSION_ERROR: -6,\n\n  /* compression levels */\n  Z_NO_COMPRESSION:         0,\n  Z_BEST_SPEED:             1,\n  Z_BEST_COMPRESSION:       9,\n  Z_DEFAULT_COMPRESSION:   -1,\n\n\n  Z_FILTERED:               1,\n  Z_HUFFMAN_ONLY:           2,\n  Z_RLE:                    3,\n  Z_FIXED:                  4,\n  Z_DEFAULT_STRATEGY:       0,\n\n  /* Possible values of the data_type field (though see inflate()) */\n  Z_BINARY:                 0,\n  Z_TEXT:                   1,\n  //Z_ASCII:                1, // = Z_TEXT (deprecated)\n  Z_UNKNOWN:                2,\n\n  /* The deflate compression method */\n  Z_DEFLATED:               8\n  //Z_NULL:                 null // Use -1 or null inline, depending on var type\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst { _tr_init: _tr_init$1, _tr_stored_block: _tr_stored_block$1, _tr_flush_block: _tr_flush_block$1, _tr_tally: _tr_tally$1, _tr_align: _tr_align$1 } = trees;\n\n\n\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n  Z_NO_FLUSH, Z_PARTIAL_FLUSH, Z_FULL_FLUSH, Z_FINISH, Z_BLOCK,\n  Z_OK, Z_STREAM_END, Z_STREAM_ERROR, Z_DATA_ERROR, Z_BUF_ERROR,\n  Z_DEFAULT_COMPRESSION,\n  Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED: Z_FIXED$1, Z_DEFAULT_STRATEGY,\n  Z_UNKNOWN: Z_UNKNOWN$1,\n  Z_DEFLATED\n} = constants;\n\n/*============================================================================*/\n\n\nconst MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_MEM_LEVEL = 8;\n\n\nconst LENGTH_CODES$1  = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nconst LITERALS$1      = 256;\n/* number of literal bytes 0..255 */\nconst L_CODES$1       = LITERALS$1 + 1 + LENGTH_CODES$1;\n/* number of Literal or Length codes, including the END_BLOCK code */\nconst D_CODES$1       = 30;\n/* number of distance codes */\nconst BL_CODES$1      = 19;\n/* number of codes used to transfer the bit lengths */\nconst HEAP_SIZE$1     = 2 * L_CODES$1 + 1;\n/* maximum heap size */\nconst MAX_BITS$1  = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst MIN_MATCH$1 = 3;\nconst MAX_MATCH$1 = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH$1 + MIN_MATCH$1 + 1);\n\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst EXTRA_STATE = 69;\nconst NAME_STATE = 73;\nconst COMMENT_STATE = 91;\nconst HCRC_STATE = 103;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\nconst BS_NEED_MORE      = 1; /* block not completed, need more input or more output */\nconst BS_BLOCK_DONE     = 2; /* block flush performed */\nconst BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nconst BS_FINISH_DONE    = 4; /* finish done, accept no more input or output */\n\nconst OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nconst err = (strm, errorCode) => {\n  strm.msg = messages[errorCode];\n  return errorCode;\n};\n\nconst rank = (f) => {\n  return ((f) << 1) - ((f) > 4 ? 9 : 0);\n};\n\nconst zero$1 = (buf) => {\n  let len = buf.length; while (--len >= 0) { buf[len] = 0; }\n};\n\n\n/* eslint-disable new-cap */\nlet HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;\n// This hash causes less collisions, https://github.com/nodeca/pako/issues/135\n// But breaks binary compatibility\n//let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;\nlet HASH = HASH_ZLIB;\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nconst flush_pending = (strm) => {\n  const s = strm.state;\n\n  //_tr_flush_bits(s);\n  let len = s.pending;\n  if (len > strm.avail_out) {\n    len = strm.avail_out;\n  }\n  if (len === 0) { return; }\n\n  strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out);\n  strm.next_out += len;\n  s.pending_out += len;\n  strm.total_out += len;\n  strm.avail_out -= len;\n  s.pending -= len;\n  if (s.pending === 0) {\n    s.pending_out = 0;\n  }\n};\n\n\nconst flush_block_only = (s, last) => {\n  _tr_flush_block$1(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n  s.block_start = s.strstart;\n  flush_pending(s.strm);\n};\n\n\nconst put_byte = (s, b) => {\n  s.pending_buf[s.pending++] = b;\n};\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nconst putShortMSB = (s, b) => {\n\n  //  put_byte(s, (Byte)(b >> 8));\n//  put_byte(s, (Byte)(b & 0xff));\n  s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n  s.pending_buf[s.pending++] = b & 0xff;\n};\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read.  All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nconst read_buf = (strm, buf, start, size) => {\n\n  let len = strm.avail_in;\n\n  if (len > size) { len = size; }\n  if (len === 0) { return 0; }\n\n  strm.avail_in -= len;\n\n  // zmemcpy(buf, strm->next_in, len);\n  buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start);\n  if (strm.state.wrap === 1) {\n    strm.adler = adler32_1(strm.adler, buf, len, start);\n  }\n\n  else if (strm.state.wrap === 2) {\n    strm.adler = crc32_1(strm.adler, buf, len, start);\n  }\n\n  strm.next_in += len;\n  strm.total_in += len;\n\n  return len;\n};\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nconst longest_match = (s, cur_match) => {\n\n  let chain_length = s.max_chain_length;      /* max hash chain length */\n  let scan = s.strstart; /* current string */\n  let match;                       /* matched string */\n  let len;                           /* length of current match */\n  let best_len = s.prev_length;              /* best match length so far */\n  let nice_match = s.nice_match;             /* stop if match long enough */\n  const limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n      s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n  const _win = s.window; // shortcut\n\n  const wmask = s.w_mask;\n  const prev  = s.prev;\n\n  /* Stop when cur_match becomes <= limit. To simplify the code,\n   * we prevent matches with the string of window index 0.\n   */\n\n  const strend = s.strstart + MAX_MATCH$1;\n  let scan_end1  = _win[scan + best_len - 1];\n  let scan_end   = _win[scan + best_len];\n\n  /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n   * It is easy to get rid of this optimization if necessary.\n   */\n  // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n  /* Do not waste too much time if we already have a good match: */\n  if (s.prev_length >= s.good_match) {\n    chain_length >>= 2;\n  }\n  /* Do not look for matches beyond the end of the input. This is necessary\n   * to make deflate deterministic.\n   */\n  if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n  // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n  do {\n    // Assert(cur_match < s->strstart, \"no future\");\n    match = cur_match;\n\n    /* Skip to next match if the match length cannot increase\n     * or if the match length is less than 2.  Note that the checks below\n     * for insufficient lookahead only occur occasionally for performance\n     * reasons.  Therefore uninitialized memory will be accessed, and\n     * conditional jumps will be made that depend on those values.\n     * However the length of the match is limited to the lookahead, so\n     * the output of deflate is not affected by the uninitialized values.\n     */\n\n    if (_win[match + best_len]     !== scan_end  ||\n        _win[match + best_len - 1] !== scan_end1 ||\n        _win[match]                !== _win[scan] ||\n        _win[++match]              !== _win[scan + 1]) {\n      continue;\n    }\n\n    /* The check at best_len-1 can be removed because it will be made\n     * again later. (This heuristic is not always a win.)\n     * It is not necessary to compare scan[2] and match[2] since they\n     * are always equal when the other bytes match, given that\n     * the hash keys are equal and that HASH_BITS >= 8.\n     */\n    scan += 2;\n    match++;\n    // Assert(*scan == *match, \"match[2]?\");\n\n    /* We check for insufficient lookahead only every 8th comparison;\n     * the 256th check will be made at strstart+258.\n     */\n    do {\n      /*jshint noempty:false*/\n    } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             scan < strend);\n\n    // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n    len = MAX_MATCH$1 - (strend - scan);\n    scan = strend - MAX_MATCH$1;\n\n    if (len > best_len) {\n      s.match_start = cur_match;\n      best_len = len;\n      if (len >= nice_match) {\n        break;\n      }\n      scan_end1  = _win[scan + best_len - 1];\n      scan_end   = _win[scan + best_len];\n    }\n  } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n  if (best_len <= s.lookahead) {\n    return best_len;\n  }\n  return s.lookahead;\n};\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n *    At least one byte has been read, or avail_in == 0; reads are\n *    performed for at least two bytes (required for the zip translate_eol\n *    option -- not supported here).\n */\nconst fill_window = (s) => {\n\n  const _w_size = s.w_size;\n  let p, n, m, more, str;\n\n  //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n  do {\n    more = s.window_size - s.lookahead - s.strstart;\n\n    // JS ints have 32 bit, block below not needed\n    /* Deal with !@#$% 64K limit: */\n    //if (sizeof(int) <= 2) {\n    //    if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n    //        more = wsize;\n    //\n    //  } else if (more == (unsigned)(-1)) {\n    //        /* Very unlikely, but possible on 16 bit machine if\n    //         * strstart == 0 && lookahead == 1 (input done a byte at time)\n    //         */\n    //        more--;\n    //    }\n    //}\n\n\n    /* If the window is almost full and there is insufficient lookahead,\n     * move the upper half to the lower one to make room in the upper half.\n     */\n    if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n      s.window.set(s.window.subarray(_w_size, _w_size + _w_size), 0);\n      s.match_start -= _w_size;\n      s.strstart -= _w_size;\n      /* we now have strstart >= MAX_DIST */\n      s.block_start -= _w_size;\n\n      /* Slide the hash table (could be avoided with 32 bit values\n       at the expense of memory usage). We slide even when level == 0\n       to keep the hash table consistent if we switch back to level > 0\n       later. (Using level 0 permanently is not an optimal usage of\n       zlib, so we don't care about this pathological case.)\n       */\n\n      n = s.hash_size;\n      p = n;\n\n      do {\n        m = s.head[--p];\n        s.head[p] = (m >= _w_size ? m - _w_size : 0);\n      } while (--n);\n\n      n = _w_size;\n      p = n;\n\n      do {\n        m = s.prev[--p];\n        s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n        /* If n is not on any hash chain, prev[n] is garbage but\n         * its value will never be used.\n         */\n      } while (--n);\n\n      more += _w_size;\n    }\n    if (s.strm.avail_in === 0) {\n      break;\n    }\n\n    /* If there was no sliding:\n     *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n     *    more == window_size - lookahead - strstart\n     * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n     * => more >= window_size - 2*WSIZE + 2\n     * In the BIG_MEM or MMAP case (not yet supported),\n     *   window_size == input_size + MIN_LOOKAHEAD  &&\n     *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n     * Otherwise, window_size == 2*WSIZE so more >= 2.\n     * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n     */\n    //Assert(more >= 2, \"more < 2\");\n    n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n    s.lookahead += n;\n\n    /* Initialize the hash value now that we have some input: */\n    if (s.lookahead + s.insert >= MIN_MATCH$1) {\n      str = s.strstart - s.insert;\n      s.ins_h = s.window[str];\n\n      /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n      s.ins_h = HASH(s, s.ins_h, s.window[str + 1]);\n//#if MIN_MATCH != 3\n//        Call update_hash() MIN_MATCH-3 more times\n//#endif\n      while (s.insert) {\n        /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n        s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH$1 - 1]);\n\n        s.prev[str & s.w_mask] = s.head[s.ins_h];\n        s.head[s.ins_h] = str;\n        str++;\n        s.insert--;\n        if (s.lookahead + s.insert < MIN_MATCH$1) {\n          break;\n        }\n      }\n    }\n    /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n     * but this is not important since only literal bytes will be emitted.\n     */\n\n  } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n  /* If the WIN_INIT bytes after the end of the current data have never been\n   * written, then zero those bytes in order to avoid memory check reports of\n   * the use of uninitialized (or uninitialised as Julian writes) bytes by\n   * the longest match routines.  Update the high water mark for the next\n   * time through here.  WIN_INIT is set to MAX_MATCH since the longest match\n   * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n   */\n//  if (s.high_water < s.window_size) {\n//    const curr = s.strstart + s.lookahead;\n//    let init = 0;\n//\n//    if (s.high_water < curr) {\n//      /* Previous high water mark below current data -- zero WIN_INIT\n//       * bytes or up to end of window, whichever is less.\n//       */\n//      init = s.window_size - curr;\n//      if (init > WIN_INIT)\n//        init = WIN_INIT;\n//      zmemzero(s->window + curr, (unsigned)init);\n//      s->high_water = curr + init;\n//    }\n//    else if (s->high_water < (ulg)curr + WIN_INIT) {\n//      /* High water mark at or above current data, but below current data\n//       * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n//       * to end of window, whichever is less.\n//       */\n//      init = (ulg)curr + WIN_INIT - s->high_water;\n//      if (init > s->window_size - s->high_water)\n//        init = s->window_size - s->high_water;\n//      zmemzero(s->window + s->high_water, (unsigned)init);\n//      s->high_water += init;\n//    }\n//  }\n//\n//  Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n//    \"not enough room for search\");\n};\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nconst deflate_stored = (s, flush) => {\n\n  /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n   * to pending_buf_size, and each stored block has a 5 byte header:\n   */\n  let max_block_size = 0xffff;\n\n  if (max_block_size > s.pending_buf_size - 5) {\n    max_block_size = s.pending_buf_size - 5;\n  }\n\n  /* Copy as much as possible from input to output: */\n  for (;;) {\n    /* Fill the window as much as possible: */\n    if (s.lookahead <= 1) {\n\n      //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n      //  s->block_start >= (long)s->w_size, \"slide too late\");\n//      if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n//        s.block_start >= s.w_size)) {\n//        throw  new Error(\"slide too late\");\n//      }\n\n      fill_window(s);\n      if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n\n      if (s.lookahead === 0) {\n        break;\n      }\n      /* flush the current block */\n    }\n    //Assert(s->block_start >= 0L, \"block gone\");\n//    if (s.block_start < 0) throw new Error(\"block gone\");\n\n    s.strstart += s.lookahead;\n    s.lookahead = 0;\n\n    /* Emit a stored block if pending_buf will be full: */\n    const max_start = s.block_start + max_block_size;\n\n    if (s.strstart === 0 || s.strstart >= max_start) {\n      /* strstart == 0 is possible when wraparound on 16-bit machine */\n      s.lookahead = s.strstart - max_start;\n      s.strstart = max_start;\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n\n\n    }\n    /* Flush if we may have to slide, otherwise block_start may become\n     * negative and the data will be gone:\n     */\n    if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n\n  s.insert = 0;\n\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n\n  if (s.strstart > s.block_start) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n\n  return BS_NEED_MORE;\n};\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nconst deflate_fast = (s, flush) => {\n\n  let hash_head;        /* head of the hash chain */\n  let bflush;           /* set if current block must be flushed */\n\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the next match, plus MIN_MATCH bytes to insert the\n     * string following the next match.\n     */\n    if (s.lookahead < MIN_LOOKAHEAD) {\n      fill_window(s);\n      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) {\n        break; /* flush the current block */\n      }\n    }\n\n    /* Insert the string window[strstart .. strstart+2] in the\n     * dictionary, and set hash_head to the head of the hash chain:\n     */\n    hash_head = 0/*NIL*/;\n    if (s.lookahead >= MIN_MATCH$1) {\n      /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n      s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n      s.head[s.ins_h] = s.strstart;\n      /***/\n    }\n\n    /* Find the longest match, discarding those <= prev_length.\n     * At this point we have always match_length < MIN_MATCH\n     */\n    if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n      /* To simplify the code, we prevent matches with the string\n       * of window index 0 (in particular we have to avoid a match\n       * of the string with itself at the start of the input file).\n       */\n      s.match_length = longest_match(s, hash_head);\n      /* longest_match() sets match_start */\n    }\n    if (s.match_length >= MIN_MATCH$1) {\n      // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n      /*** _tr_tally_dist(s, s.strstart - s.match_start,\n                     s.match_length - MIN_MATCH, bflush); ***/\n      bflush = _tr_tally$1(s, s.strstart - s.match_start, s.match_length - MIN_MATCH$1);\n\n      s.lookahead -= s.match_length;\n\n      /* Insert new strings in the hash table only if the match length\n       * is not too large. This saves time but degrades compression.\n       */\n      if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH$1) {\n        s.match_length--; /* string at strstart already in table */\n        do {\n          s.strstart++;\n          /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n          s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n          s.head[s.ins_h] = s.strstart;\n          /***/\n          /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n           * always MIN_MATCH bytes ahead.\n           */\n        } while (--s.match_length !== 0);\n        s.strstart++;\n      } else\n      {\n        s.strstart += s.match_length;\n        s.match_length = 0;\n        s.ins_h = s.window[s.strstart];\n        /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n        s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);\n\n//#if MIN_MATCH != 3\n//                Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n        /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n         * matter since it will be recomputed at next deflate call.\n         */\n      }\n    } else {\n      /* No match, output a literal byte */\n      //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n      bflush = _tr_tally$1(s, 0, s.window[s.strstart]);\n\n      s.lookahead--;\n      s.strstart++;\n    }\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = ((s.strstart < (MIN_MATCH$1 - 1)) ? s.strstart : MIN_MATCH$1 - 1);\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nconst deflate_slow = (s, flush) => {\n\n  let hash_head;          /* head of hash chain */\n  let bflush;              /* set if current block must be flushed */\n\n  let max_insert;\n\n  /* Process the input block. */\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the next match, plus MIN_MATCH bytes to insert the\n     * string following the next match.\n     */\n    if (s.lookahead < MIN_LOOKAHEAD) {\n      fill_window(s);\n      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) { break; } /* flush the current block */\n    }\n\n    /* Insert the string window[strstart .. strstart+2] in the\n     * dictionary, and set hash_head to the head of the hash chain:\n     */\n    hash_head = 0/*NIL*/;\n    if (s.lookahead >= MIN_MATCH$1) {\n      /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n      s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n      s.head[s.ins_h] = s.strstart;\n      /***/\n    }\n\n    /* Find the longest match, discarding those <= prev_length.\n     */\n    s.prev_length = s.match_length;\n    s.prev_match = s.match_start;\n    s.match_length = MIN_MATCH$1 - 1;\n\n    if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n        s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n      /* To simplify the code, we prevent matches with the string\n       * of window index 0 (in particular we have to avoid a match\n       * of the string with itself at the start of the input file).\n       */\n      s.match_length = longest_match(s, hash_head);\n      /* longest_match() sets match_start */\n\n      if (s.match_length <= 5 &&\n         (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH$1 && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n        /* If prev_match is also MIN_MATCH, match_start is garbage\n         * but we will ignore the current match anyway.\n         */\n        s.match_length = MIN_MATCH$1 - 1;\n      }\n    }\n    /* If there was a match at the previous step and the current\n     * match is not better, output the previous match:\n     */\n    if (s.prev_length >= MIN_MATCH$1 && s.match_length <= s.prev_length) {\n      max_insert = s.strstart + s.lookahead - MIN_MATCH$1;\n      /* Do not insert strings in hash table beyond this. */\n\n      //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n      /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n                     s.prev_length - MIN_MATCH, bflush);***/\n      bflush = _tr_tally$1(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH$1);\n      /* Insert in hash table all strings up to the end of the match.\n       * strstart-1 and strstart are already inserted. If there is not\n       * enough lookahead, the last two strings are not inserted in\n       * the hash table.\n       */\n      s.lookahead -= s.prev_length - 1;\n      s.prev_length -= 2;\n      do {\n        if (++s.strstart <= max_insert) {\n          /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n          s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n          s.head[s.ins_h] = s.strstart;\n          /***/\n        }\n      } while (--s.prev_length !== 0);\n      s.match_available = 0;\n      s.match_length = MIN_MATCH$1 - 1;\n      s.strstart++;\n\n      if (bflush) {\n        /*** FLUSH_BLOCK(s, 0); ***/\n        flush_block_only(s, false);\n        if (s.strm.avail_out === 0) {\n          return BS_NEED_MORE;\n        }\n        /***/\n      }\n\n    } else if (s.match_available) {\n      /* If there was no match at the previous position, output a\n       * single literal. If there was a match but the current match\n       * is longer, truncate the previous match to a single literal.\n       */\n      //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n      /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n      bflush = _tr_tally$1(s, 0, s.window[s.strstart - 1]);\n\n      if (bflush) {\n        /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n        flush_block_only(s, false);\n        /***/\n      }\n      s.strstart++;\n      s.lookahead--;\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n    } else {\n      /* There is no previous match to compare with, wait for\n       * the next step to decide.\n       */\n      s.match_available = 1;\n      s.strstart++;\n      s.lookahead--;\n    }\n  }\n  //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n  if (s.match_available) {\n    //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n    /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n    bflush = _tr_tally$1(s, 0, s.window[s.strstart - 1]);\n\n    s.match_available = 0;\n  }\n  s.insert = s.strstart < MIN_MATCH$1 - 1 ? s.strstart : MIN_MATCH$1 - 1;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n\n  return BS_BLOCK_DONE;\n};\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one.  Do not maintain a hash table.  (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nconst deflate_rle = (s, flush) => {\n\n  let bflush;            /* set if current block must be flushed */\n  let prev;              /* byte at distance one to match */\n  let scan, strend;      /* scan goes up to strend for length of run */\n\n  const _win = s.window;\n\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the longest run, plus one for the unrolled loop.\n     */\n    if (s.lookahead <= MAX_MATCH$1) {\n      fill_window(s);\n      if (s.lookahead <= MAX_MATCH$1 && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) { break; } /* flush the current block */\n    }\n\n    /* See how many times the previous byte repeats */\n    s.match_length = 0;\n    if (s.lookahead >= MIN_MATCH$1 && s.strstart > 0) {\n      scan = s.strstart - 1;\n      prev = _win[scan];\n      if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n        strend = s.strstart + MAX_MATCH$1;\n        do {\n          /*jshint noempty:false*/\n        } while (prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 scan < strend);\n        s.match_length = MAX_MATCH$1 - (strend - scan);\n        if (s.match_length > s.lookahead) {\n          s.match_length = s.lookahead;\n        }\n      }\n      //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n    }\n\n    /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n    if (s.match_length >= MIN_MATCH$1) {\n      //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n      /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n      bflush = _tr_tally$1(s, 1, s.match_length - MIN_MATCH$1);\n\n      s.lookahead -= s.match_length;\n      s.strstart += s.match_length;\n      s.match_length = 0;\n    } else {\n      /* No match, output a literal byte */\n      //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n      bflush = _tr_tally$1(s, 0, s.window[s.strstart]);\n\n      s.lookahead--;\n      s.strstart++;\n    }\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = 0;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nconst deflate_huff = (s, flush) => {\n\n  let bflush;             /* set if current block must be flushed */\n\n  for (;;) {\n    /* Make sure that we have a literal to write. */\n    if (s.lookahead === 0) {\n      fill_window(s);\n      if (s.lookahead === 0) {\n        if (flush === Z_NO_FLUSH) {\n          return BS_NEED_MORE;\n        }\n        break;      /* flush the current block */\n      }\n    }\n\n    /* Output a literal byte */\n    s.match_length = 0;\n    //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n    /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n    bflush = _tr_tally$1(s, 0, s.window[s.strstart]);\n    s.lookahead--;\n    s.strstart++;\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = 0;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n};\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\n  this.good_length = good_length;\n  this.max_lazy = max_lazy;\n  this.nice_length = nice_length;\n  this.max_chain = max_chain;\n  this.func = func;\n}\n\nconst configuration_table = [\n  /*      good lazy nice chain */\n  new Config(0, 0, 0, 0, deflate_stored),          /* 0 store only */\n  new Config(4, 4, 8, 4, deflate_fast),            /* 1 max speed, no lazy matches */\n  new Config(4, 5, 16, 8, deflate_fast),           /* 2 */\n  new Config(4, 6, 32, 32, deflate_fast),          /* 3 */\n\n  new Config(4, 4, 16, 16, deflate_slow),          /* 4 lazy matches */\n  new Config(8, 16, 32, 32, deflate_slow),         /* 5 */\n  new Config(8, 16, 128, 128, deflate_slow),       /* 6 */\n  new Config(8, 32, 128, 256, deflate_slow),       /* 7 */\n  new Config(32, 128, 258, 1024, deflate_slow),    /* 8 */\n  new Config(32, 258, 258, 4096, deflate_slow)     /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nconst lm_init = (s) => {\n\n  s.window_size = 2 * s.w_size;\n\n  /*** CLEAR_HASH(s); ***/\n  zero$1(s.head); // Fill with NIL (= 0);\n\n  /* Set the default configuration parameters:\n   */\n  s.max_lazy_match = configuration_table[s.level].max_lazy;\n  s.good_match = configuration_table[s.level].good_length;\n  s.nice_match = configuration_table[s.level].nice_length;\n  s.max_chain_length = configuration_table[s.level].max_chain;\n\n  s.strstart = 0;\n  s.block_start = 0;\n  s.lookahead = 0;\n  s.insert = 0;\n  s.match_length = s.prev_length = MIN_MATCH$1 - 1;\n  s.match_available = 0;\n  s.ins_h = 0;\n};\n\n\nfunction DeflateState() {\n  this.strm = null;            /* pointer back to this zlib stream */\n  this.status = 0;            /* as the name implies */\n  this.pending_buf = null;      /* output still pending */\n  this.pending_buf_size = 0;  /* size of pending_buf */\n  this.pending_out = 0;       /* next pending byte to output to the stream */\n  this.pending = 0;           /* nb of bytes in the pending buffer */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.gzhead = null;         /* gzip header information to write */\n  this.gzindex = 0;           /* where in extra, name, or comment */\n  this.method = Z_DEFLATED; /* can only be DEFLATED */\n  this.last_flush = -1;   /* value of flush param for previous deflate call */\n\n  this.w_size = 0;  /* LZ77 window size (32K by default) */\n  this.w_bits = 0;  /* log2(w_size)  (8..16) */\n  this.w_mask = 0;  /* w_size - 1 */\n\n  this.window = null;\n  /* Sliding window. Input bytes are read into the second half of the window,\n   * and move to the first half later to keep a dictionary of at least wSize\n   * bytes. With this organization, matches are limited to a distance of\n   * wSize-MAX_MATCH bytes, but this ensures that IO is always\n   * performed with a length multiple of the block size.\n   */\n\n  this.window_size = 0;\n  /* Actual size of window: 2*wSize, except when the user input buffer\n   * is directly used as sliding window.\n   */\n\n  this.prev = null;\n  /* Link to older string with same hash index. To limit the size of this\n   * array to 64K, this link is maintained only for the last 32K strings.\n   * An index in this array is thus a window index modulo 32K.\n   */\n\n  this.head = null;   /* Heads of the hash chains or NIL. */\n\n  this.ins_h = 0;       /* hash index of string to be inserted */\n  this.hash_size = 0;   /* number of elements in hash table */\n  this.hash_bits = 0;   /* log2(hash_size) */\n  this.hash_mask = 0;   /* hash_size-1 */\n\n  this.hash_shift = 0;\n  /* Number of bits by which ins_h must be shifted at each input\n   * step. It must be such that after MIN_MATCH steps, the oldest\n   * byte no longer takes part in the hash key, that is:\n   *   hash_shift * MIN_MATCH >= hash_bits\n   */\n\n  this.block_start = 0;\n  /* Window position at the beginning of the current output block. Gets\n   * negative when the window is moved backwards.\n   */\n\n  this.match_length = 0;      /* length of best match */\n  this.prev_match = 0;        /* previous match */\n  this.match_available = 0;   /* set if previous match exists */\n  this.strstart = 0;          /* start of string to insert */\n  this.match_start = 0;       /* start of matching string */\n  this.lookahead = 0;         /* number of valid bytes ahead in window */\n\n  this.prev_length = 0;\n  /* Length of the best match at previous step. Matches not greater than this\n   * are discarded. This is used in the lazy match evaluation.\n   */\n\n  this.max_chain_length = 0;\n  /* To speed up deflation, hash chains are never searched beyond this\n   * length.  A higher limit improves compression ratio but degrades the\n   * speed.\n   */\n\n  this.max_lazy_match = 0;\n  /* Attempt to find a better match only when the current match is strictly\n   * smaller than this value. This mechanism is used only for compression\n   * levels >= 4.\n   */\n  // That's alias to max_lazy_match, don't use directly\n  //this.max_insert_length = 0;\n  /* Insert new strings in the hash table only if the match length is not\n   * greater than this length. This saves time but degrades compression.\n   * max_insert_length is used only for compression levels <= 3.\n   */\n\n  this.level = 0;     /* compression level (1..9) */\n  this.strategy = 0;  /* favor or force Huffman coding*/\n\n  this.good_match = 0;\n  /* Use a faster search when the previous match is longer than this */\n\n  this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n              /* used by trees.c: */\n\n  /* Didn't use ct_data typedef below to suppress compiler warning */\n\n  // struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */\n  // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n  // struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */\n\n  // Use flat array of DOUBLE size, with interleaved fata,\n  // because JS does not support effective\n  this.dyn_ltree  = new Uint16Array(HEAP_SIZE$1 * 2);\n  this.dyn_dtree  = new Uint16Array((2 * D_CODES$1 + 1) * 2);\n  this.bl_tree    = new Uint16Array((2 * BL_CODES$1 + 1) * 2);\n  zero$1(this.dyn_ltree);\n  zero$1(this.dyn_dtree);\n  zero$1(this.bl_tree);\n\n  this.l_desc   = null;         /* desc. for literal tree */\n  this.d_desc   = null;         /* desc. for distance tree */\n  this.bl_desc  = null;         /* desc. for bit length tree */\n\n  //ush bl_count[MAX_BITS+1];\n  this.bl_count = new Uint16Array(MAX_BITS$1 + 1);\n  /* number of codes at each bit length for an optimal tree */\n\n  //int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */\n  this.heap = new Uint16Array(2 * L_CODES$1 + 1);  /* heap used to build the Huffman trees */\n  zero$1(this.heap);\n\n  this.heap_len = 0;               /* number of elements in the heap */\n  this.heap_max = 0;               /* element of largest frequency */\n  /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n   * The same heap array is used to build all trees.\n   */\n\n  this.depth = new Uint16Array(2 * L_CODES$1 + 1); //uch depth[2*L_CODES+1];\n  zero$1(this.depth);\n  /* Depth of each subtree used as tie breaker for trees of equal frequency\n   */\n\n  this.l_buf = 0;          /* buffer index for literals or lengths */\n\n  this.lit_bufsize = 0;\n  /* Size of match buffer for literals/lengths.  There are 4 reasons for\n   * limiting lit_bufsize to 64K:\n   *   - frequencies can be kept in 16 bit counters\n   *   - if compression is not successful for the first block, all input\n   *     data is still in the window so we can still emit a stored block even\n   *     when input comes from standard input.  (This can also be done for\n   *     all blocks if lit_bufsize is not greater than 32K.)\n   *   - if compression is not successful for a file smaller than 64K, we can\n   *     even emit a stored file instead of a stored block (saving 5 bytes).\n   *     This is applicable only for zip (not gzip or zlib).\n   *   - creating new Huffman trees less frequently may not provide fast\n   *     adaptation to changes in the input data statistics. (Take for\n   *     example a binary file with poorly compressible code followed by\n   *     a highly compressible string table.) Smaller buffer sizes give\n   *     fast adaptation but have of course the overhead of transmitting\n   *     trees more frequently.\n   *   - I can't count above 4\n   */\n\n  this.last_lit = 0;      /* running index in l_buf */\n\n  this.d_buf = 0;\n  /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n   * the same number of elements. To use different lengths, an extra flag\n   * array would be necessary.\n   */\n\n  this.opt_len = 0;       /* bit length of current block with optimal trees */\n  this.static_len = 0;    /* bit length of current block with static trees */\n  this.matches = 0;       /* number of string matches in current block */\n  this.insert = 0;        /* bytes at end of window left to insert */\n\n\n  this.bi_buf = 0;\n  /* Output buffer. bits are inserted starting at the bottom (least\n   * significant bits).\n   */\n  this.bi_valid = 0;\n  /* Number of valid bits in bi_buf.  All bits above the last valid bit\n   * are always zero.\n   */\n\n  // Used for window memory init. We safely ignore it for JS. That makes\n  // sense only for pointers and memory check tools.\n  //this.high_water = 0;\n  /* High water mark offset in window for initialized bytes -- bytes above\n   * this are set to zero in order to avoid memory check warnings when\n   * longest match routines access bytes past the input.  This is then\n   * updated to the new high water mark.\n   */\n}\n\n\nconst deflateResetKeep = (strm) => {\n\n  if (!strm || !strm.state) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n  strm.total_in = strm.total_out = 0;\n  strm.data_type = Z_UNKNOWN$1;\n\n  const s = strm.state;\n  s.pending = 0;\n  s.pending_out = 0;\n\n  if (s.wrap < 0) {\n    s.wrap = -s.wrap;\n    /* was made negative by deflate(..., Z_FINISH); */\n  }\n  s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n  strm.adler = (s.wrap === 2) ?\n    0  // crc32(0, Z_NULL, 0)\n  :\n    1; // adler32(0, Z_NULL, 0)\n  s.last_flush = Z_NO_FLUSH;\n  _tr_init$1(s);\n  return Z_OK;\n};\n\n\nconst deflateReset = (strm) => {\n\n  const ret = deflateResetKeep(strm);\n  if (ret === Z_OK) {\n    lm_init(strm.state);\n  }\n  return ret;\n};\n\n\nconst deflateSetHeader = (strm, head) => {\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n  strm.state.gzhead = head;\n  return Z_OK;\n};\n\n\nconst deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {\n\n  if (!strm) { // === Z_NULL\n    return Z_STREAM_ERROR;\n  }\n  let wrap = 1;\n\n  if (level === Z_DEFAULT_COMPRESSION) {\n    level = 6;\n  }\n\n  if (windowBits < 0) { /* suppress zlib wrapper */\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n\n  else if (windowBits > 15) {\n    wrap = 2;           /* write gzip wrapper instead */\n    windowBits -= 16;\n  }\n\n\n  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n    windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n    strategy < 0 || strategy > Z_FIXED$1) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n\n  if (windowBits === 8) {\n    windowBits = 9;\n  }\n  /* until 256-byte window bug fixed */\n\n  const s = new DeflateState();\n\n  strm.state = s;\n  s.strm = strm;\n\n  s.wrap = wrap;\n  s.gzhead = null;\n  s.w_bits = windowBits;\n  s.w_size = 1 << s.w_bits;\n  s.w_mask = s.w_size - 1;\n\n  s.hash_bits = memLevel + 7;\n  s.hash_size = 1 << s.hash_bits;\n  s.hash_mask = s.hash_size - 1;\n  s.hash_shift = ~~((s.hash_bits + MIN_MATCH$1 - 1) / MIN_MATCH$1);\n\n  s.window = new Uint8Array(s.w_size * 2);\n  s.head = new Uint16Array(s.hash_size);\n  s.prev = new Uint16Array(s.w_size);\n\n  // Don't need mem init magic for JS.\n  //s.high_water = 0;  /* nothing written to s->window yet */\n\n  s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n  s.pending_buf_size = s.lit_bufsize * 4;\n\n  //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n  //s->pending_buf = (uchf *) overlay;\n  s.pending_buf = new Uint8Array(s.pending_buf_size);\n\n  // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n  //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n  s.d_buf = 1 * s.lit_bufsize;\n\n  //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n  s.l_buf = (1 + 2) * s.lit_bufsize;\n\n  s.level = level;\n  s.strategy = strategy;\n  s.method = method;\n\n  return deflateReset(strm);\n};\n\nconst deflateInit = (strm, level) => {\n\n  return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n};\n\n\nconst deflate = (strm, flush) => {\n\n  let beg, val; // for gzip header write only\n\n  if (!strm || !strm.state ||\n    flush > Z_BLOCK || flush < 0) {\n    return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n  }\n\n  const s = strm.state;\n\n  if (!strm.output ||\n      (!strm.input && strm.avail_in !== 0) ||\n      (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n    return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n  }\n\n  s.strm = strm; /* just in case */\n  const old_flush = s.last_flush;\n  s.last_flush = flush;\n\n  /* Write the header */\n  if (s.status === INIT_STATE) {\n\n    if (s.wrap === 2) { // GZIP header\n      strm.adler = 0;  //crc32(0L, Z_NULL, 0);\n      put_byte(s, 31);\n      put_byte(s, 139);\n      put_byte(s, 8);\n      if (!s.gzhead) { // s->gzhead == Z_NULL\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, s.level === 9 ? 2 :\n                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n                     4 : 0));\n        put_byte(s, OS_CODE);\n        s.status = BUSY_STATE;\n      }\n      else {\n        put_byte(s, (s.gzhead.text ? 1 : 0) +\n                    (s.gzhead.hcrc ? 2 : 0) +\n                    (!s.gzhead.extra ? 0 : 4) +\n                    (!s.gzhead.name ? 0 : 8) +\n                    (!s.gzhead.comment ? 0 : 16)\n        );\n        put_byte(s, s.gzhead.time & 0xff);\n        put_byte(s, (s.gzhead.time >> 8) & 0xff);\n        put_byte(s, (s.gzhead.time >> 16) & 0xff);\n        put_byte(s, (s.gzhead.time >> 24) & 0xff);\n        put_byte(s, s.level === 9 ? 2 :\n                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n                     4 : 0));\n        put_byte(s, s.gzhead.os & 0xff);\n        if (s.gzhead.extra && s.gzhead.extra.length) {\n          put_byte(s, s.gzhead.extra.length & 0xff);\n          put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n        }\n        if (s.gzhead.hcrc) {\n          strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending, 0);\n        }\n        s.gzindex = 0;\n        s.status = EXTRA_STATE;\n      }\n    }\n    else // DEFLATE header\n    {\n      let header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n      let level_flags = -1;\n\n      if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n        level_flags = 0;\n      } else if (s.level < 6) {\n        level_flags = 1;\n      } else if (s.level === 6) {\n        level_flags = 2;\n      } else {\n        level_flags = 3;\n      }\n      header |= (level_flags << 6);\n      if (s.strstart !== 0) { header |= PRESET_DICT; }\n      header += 31 - (header % 31);\n\n      s.status = BUSY_STATE;\n      putShortMSB(s, header);\n\n      /* Save the adler32 of the preset dictionary: */\n      if (s.strstart !== 0) {\n        putShortMSB(s, strm.adler >>> 16);\n        putShortMSB(s, strm.adler & 0xffff);\n      }\n      strm.adler = 1; // adler32(0L, Z_NULL, 0);\n    }\n  }\n\n//#ifdef GZIP\n  if (s.status === EXTRA_STATE) {\n    if (s.gzhead.extra/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n\n      while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            break;\n          }\n        }\n        put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n        s.gzindex++;\n      }\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (s.gzindex === s.gzhead.extra.length) {\n        s.gzindex = 0;\n        s.status = NAME_STATE;\n      }\n    }\n    else {\n      s.status = NAME_STATE;\n    }\n  }\n  if (s.status === NAME_STATE) {\n    if (s.gzhead.name/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n      //int val;\n\n      do {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            val = 1;\n            break;\n          }\n        }\n        // JS specific: little magic to add zero terminator to end of string\n        if (s.gzindex < s.gzhead.name.length) {\n          val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n        } else {\n          val = 0;\n        }\n        put_byte(s, val);\n      } while (val !== 0);\n\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (val === 0) {\n        s.gzindex = 0;\n        s.status = COMMENT_STATE;\n      }\n    }\n    else {\n      s.status = COMMENT_STATE;\n    }\n  }\n  if (s.status === COMMENT_STATE) {\n    if (s.gzhead.comment/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n      //int val;\n\n      do {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            val = 1;\n            break;\n          }\n        }\n        // JS specific: little magic to add zero terminator to end of string\n        if (s.gzindex < s.gzhead.comment.length) {\n          val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n        } else {\n          val = 0;\n        }\n        put_byte(s, val);\n      } while (val !== 0);\n\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (val === 0) {\n        s.status = HCRC_STATE;\n      }\n    }\n    else {\n      s.status = HCRC_STATE;\n    }\n  }\n  if (s.status === HCRC_STATE) {\n    if (s.gzhead.hcrc) {\n      if (s.pending + 2 > s.pending_buf_size) {\n        flush_pending(strm);\n      }\n      if (s.pending + 2 <= s.pending_buf_size) {\n        put_byte(s, strm.adler & 0xff);\n        put_byte(s, (strm.adler >> 8) & 0xff);\n        strm.adler = 0; //crc32(0L, Z_NULL, 0);\n        s.status = BUSY_STATE;\n      }\n    }\n    else {\n      s.status = BUSY_STATE;\n    }\n  }\n//#endif\n\n  /* Flush as much pending output as possible */\n  if (s.pending !== 0) {\n    flush_pending(strm);\n    if (strm.avail_out === 0) {\n      /* Since avail_out is 0, deflate will be called again with\n       * more output space, but possibly with both pending and\n       * avail_in equal to zero. There won't be anything to do,\n       * but this is not an error situation so make sure we\n       * return OK instead of BUF_ERROR at next call of deflate:\n       */\n      s.last_flush = -1;\n      return Z_OK;\n    }\n\n    /* Make sure there is something to do and avoid duplicate consecutive\n     * flushes. For repeated and useless calls with Z_FINISH, we keep\n     * returning Z_STREAM_END instead of Z_BUF_ERROR.\n     */\n  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n    flush !== Z_FINISH) {\n    return err(strm, Z_BUF_ERROR);\n  }\n\n  /* User must not provide more input after the first FINISH: */\n  if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n    return err(strm, Z_BUF_ERROR);\n  }\n\n  /* Start a new block or continue the current one.\n   */\n  if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n    (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n    let bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n      (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n        configuration_table[s.level].func(s, flush));\n\n    if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n      s.status = FINISH_STATE;\n    }\n    if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n      if (strm.avail_out === 0) {\n        s.last_flush = -1;\n        /* avoid BUF_ERROR next call, see above */\n      }\n      return Z_OK;\n      /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n       * of deflate should use the same flush parameter to make sure\n       * that the flush is complete. So we don't have to output an\n       * empty block here, this will be done at next call. This also\n       * ensures that for a very small output buffer, we emit at most\n       * one empty block.\n       */\n    }\n    if (bstate === BS_BLOCK_DONE) {\n      if (flush === Z_PARTIAL_FLUSH) {\n        _tr_align$1(s);\n      }\n      else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n        _tr_stored_block$1(s, 0, 0, false);\n        /* For a full flush, this empty block will be recognized\n         * as a special marker by inflate_sync().\n         */\n        if (flush === Z_FULL_FLUSH) {\n          /*** CLEAR_HASH(s); ***/             /* forget history */\n          zero$1(s.head); // Fill with NIL (= 0);\n\n          if (s.lookahead === 0) {\n            s.strstart = 0;\n            s.block_start = 0;\n            s.insert = 0;\n          }\n        }\n      }\n      flush_pending(strm);\n      if (strm.avail_out === 0) {\n        s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n        return Z_OK;\n      }\n    }\n  }\n  //Assert(strm->avail_out > 0, \"bug2\");\n  //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n  if (flush !== Z_FINISH) { return Z_OK; }\n  if (s.wrap <= 0) { return Z_STREAM_END; }\n\n  /* Write the trailer */\n  if (s.wrap === 2) {\n    put_byte(s, strm.adler & 0xff);\n    put_byte(s, (strm.adler >> 8) & 0xff);\n    put_byte(s, (strm.adler >> 16) & 0xff);\n    put_byte(s, (strm.adler >> 24) & 0xff);\n    put_byte(s, strm.total_in & 0xff);\n    put_byte(s, (strm.total_in >> 8) & 0xff);\n    put_byte(s, (strm.total_in >> 16) & 0xff);\n    put_byte(s, (strm.total_in >> 24) & 0xff);\n  }\n  else\n  {\n    putShortMSB(s, strm.adler >>> 16);\n    putShortMSB(s, strm.adler & 0xffff);\n  }\n\n  flush_pending(strm);\n  /* If avail_out is zero, the application will call deflate again\n   * to flush the rest.\n   */\n  if (s.wrap > 0) { s.wrap = -s.wrap; }\n  /* write the trailer only once! */\n  return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n};\n\n\nconst deflateEnd = (strm) => {\n\n  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  const status = strm.state.status;\n  if (status !== INIT_STATE &&\n    status !== EXTRA_STATE &&\n    status !== NAME_STATE &&\n    status !== COMMENT_STATE &&\n    status !== HCRC_STATE &&\n    status !== BUSY_STATE &&\n    status !== FINISH_STATE\n  ) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n  strm.state = null;\n\n  return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n};\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nconst deflateSetDictionary = (strm, dictionary) => {\n\n  let dictLength = dictionary.length;\n\n  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  const s = strm.state;\n  const wrap = s.wrap;\n\n  if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n    return Z_STREAM_ERROR;\n  }\n\n  /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n  if (wrap === 1) {\n    /* adler32(strm->adler, dictionary, dictLength); */\n    strm.adler = adler32_1(strm.adler, dictionary, dictLength, 0);\n  }\n\n  s.wrap = 0;   /* avoid computing Adler-32 in read_buf */\n\n  /* if dictionary would fill window, just replace the history */\n  if (dictLength >= s.w_size) {\n    if (wrap === 0) {            /* already empty otherwise */\n      /*** CLEAR_HASH(s); ***/\n      zero$1(s.head); // Fill with NIL (= 0);\n      s.strstart = 0;\n      s.block_start = 0;\n      s.insert = 0;\n    }\n    /* use the tail */\n    // dictionary = dictionary.slice(dictLength - s.w_size);\n    let tmpDict = new Uint8Array(s.w_size);\n    tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0);\n    dictionary = tmpDict;\n    dictLength = s.w_size;\n  }\n  /* insert dictionary into window and hash */\n  const avail = strm.avail_in;\n  const next = strm.next_in;\n  const input = strm.input;\n  strm.avail_in = dictLength;\n  strm.next_in = 0;\n  strm.input = dictionary;\n  fill_window(s);\n  while (s.lookahead >= MIN_MATCH$1) {\n    let str = s.strstart;\n    let n = s.lookahead - (MIN_MATCH$1 - 1);\n    do {\n      /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n      s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH$1 - 1]);\n\n      s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n      s.head[s.ins_h] = str;\n      str++;\n    } while (--n);\n    s.strstart = str;\n    s.lookahead = MIN_MATCH$1 - 1;\n    fill_window(s);\n  }\n  s.strstart += s.lookahead;\n  s.block_start = s.strstart;\n  s.insert = s.lookahead;\n  s.lookahead = 0;\n  s.match_length = s.prev_length = MIN_MATCH$1 - 1;\n  s.match_available = 0;\n  strm.next_in = next;\n  strm.input = input;\n  strm.avail_in = avail;\n  s.wrap = wrap;\n  return Z_OK;\n};\n\n\nvar deflateInit_1 = deflateInit;\nvar deflateInit2_1 = deflateInit2;\nvar deflateReset_1 = deflateReset;\nvar deflateResetKeep_1 = deflateResetKeep;\nvar deflateSetHeader_1 = deflateSetHeader;\nvar deflate_2 = deflate;\nvar deflateEnd_1 = deflateEnd;\nvar deflateSetDictionary_1 = deflateSetDictionary;\nvar deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.deflateBound = deflateBound;\nmodule.exports.deflateCopy = deflateCopy;\nmodule.exports.deflateParams = deflateParams;\nmodule.exports.deflatePending = deflatePending;\nmodule.exports.deflatePrime = deflatePrime;\nmodule.exports.deflateTune = deflateTune;\n*/\n\nvar deflate_1 = {\n\tdeflateInit: deflateInit_1,\n\tdeflateInit2: deflateInit2_1,\n\tdeflateReset: deflateReset_1,\n\tdeflateResetKeep: deflateResetKeep_1,\n\tdeflateSetHeader: deflateSetHeader_1,\n\tdeflate: deflate_2,\n\tdeflateEnd: deflateEnd_1,\n\tdeflateSetDictionary: deflateSetDictionary_1,\n\tdeflateInfo: deflateInfo\n};\n\nconst _has = (obj, key) => {\n  return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nvar assign = function (obj /*from1, from2, from3, ...*/) {\n  const sources = Array.prototype.slice.call(arguments, 1);\n  while (sources.length) {\n    const source = sources.shift();\n    if (!source) { continue; }\n\n    if (typeof source !== 'object') {\n      throw new TypeError(source + 'must be non-object');\n    }\n\n    for (const p in source) {\n      if (_has(source, p)) {\n        obj[p] = source[p];\n      }\n    }\n  }\n\n  return obj;\n};\n\n\n// Join array of chunks to single array.\nvar flattenChunks = (chunks) => {\n  // calculate data length\n  let len = 0;\n\n  for (let i = 0, l = chunks.length; i < l; i++) {\n    len += chunks[i].length;\n  }\n\n  // join chunks\n  const result = new Uint8Array(len);\n\n  for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n    let chunk = chunks[i];\n    result.set(chunk, pos);\n    pos += chunk.length;\n  }\n\n  return result;\n};\n\nvar common = {\n\tassign: assign,\n\tflattenChunks: flattenChunks\n};\n\n// String encode/decode helpers\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nlet STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nconst _utf8len = new Uint8Array(256);\nfor (let q = 0; q < 256; q++) {\n  _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nvar string2buf = (str) => {\n  let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n  // count binary size\n  for (m_pos = 0; m_pos < str_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n      c2 = str.charCodeAt(m_pos + 1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n  }\n\n  // allocate buffer\n  buf = new Uint8Array(buf_len);\n\n  // convert\n  for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n      c2 = str.charCodeAt(m_pos + 1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    if (c < 0x80) {\n      /* one byte */\n      buf[i++] = c;\n    } else if (c < 0x800) {\n      /* two bytes */\n      buf[i++] = 0xC0 | (c >>> 6);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else if (c < 0x10000) {\n      /* three bytes */\n      buf[i++] = 0xE0 | (c >>> 12);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else {\n      /* four bytes */\n      buf[i++] = 0xf0 | (c >>> 18);\n      buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    }\n  }\n\n  return buf;\n};\n\n// Helper\nconst buf2binstring = (buf, len) => {\n  // On Chrome, the arguments in a function call that are allowed is `65534`.\n  // If the length of the buffer is smaller than that, we can use this optimization,\n  // otherwise we will take a slower path.\n  if (len < 65534) {\n    if (buf.subarray && STR_APPLY_UIA_OK) {\n      return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n    }\n  }\n\n  let result = '';\n  for (let i = 0; i < len; i++) {\n    result += String.fromCharCode(buf[i]);\n  }\n  return result;\n};\n\n\n// convert array to string\nvar buf2string = (buf, max) => {\n  let i, out;\n  const len = max || buf.length;\n\n  // Reserve max possible length (2 words per char)\n  // NB: by unknown reasons, Array is significantly faster for\n  //     String.fromCharCode.apply than Uint16Array.\n  const utf16buf = new Array(len * 2);\n\n  for (out = 0, i = 0; i < len;) {\n    let c = buf[i++];\n    // quick process ascii\n    if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n    let c_len = _utf8len[c];\n    // skip 5 & 6 byte codes\n    if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n    // apply mask on first byte\n    c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n    // join the rest\n    while (c_len > 1 && i < len) {\n      c = (c << 6) | (buf[i++] & 0x3f);\n      c_len--;\n    }\n\n    // terminated by end of string?\n    if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n    if (c < 0x10000) {\n      utf16buf[out++] = c;\n    } else {\n      c -= 0x10000;\n      utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n      utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n    }\n  }\n\n  return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max   - length limit (mandatory);\nvar utf8border = (buf, max) => {\n\n  max = max || buf.length;\n  if (max > buf.length) { max = buf.length; }\n\n  // go back from last position, until start of sequence found\n  let pos = max - 1;\n  while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n  // Very small and broken sequence,\n  // return max, because we should return something anyway.\n  if (pos < 0) { return max; }\n\n  // If we came to start of buffer - that means buffer is too small,\n  // return max too.\n  if (pos === 0) { return max; }\n\n  return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\nvar strings = {\n\tstring2buf: string2buf,\n\tbuf2string: buf2string,\n\tutf8border: utf8border\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n  /* next input byte */\n  this.input = null; // JS specific, because we have no pointers\n  this.next_in = 0;\n  /* number of bytes available at input */\n  this.avail_in = 0;\n  /* total number of input bytes read so far */\n  this.total_in = 0;\n  /* next output byte should be put there */\n  this.output = null; // JS specific, because we have no pointers\n  this.next_out = 0;\n  /* remaining free space at output */\n  this.avail_out = 0;\n  /* total number of bytes output so far */\n  this.total_out = 0;\n  /* last error message, NULL if no error */\n  this.msg = ''/*Z_NULL*/;\n  /* not visible by applications */\n  this.state = null;\n  /* best guess about the data type: binary or text */\n  this.data_type = 2/*Z_UNKNOWN*/;\n  /* adler32 value of the uncompressed data */\n  this.adler = 0;\n}\n\nvar zstream = ZStream;\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n  Z_NO_FLUSH: Z_NO_FLUSH$1, Z_SYNC_FLUSH, Z_FULL_FLUSH: Z_FULL_FLUSH$1, Z_FINISH: Z_FINISH$1,\n  Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1,\n  Z_DEFAULT_COMPRESSION: Z_DEFAULT_COMPRESSION$1,\n  Z_DEFAULT_STRATEGY: Z_DEFAULT_STRATEGY$1,\n  Z_DEFLATED: Z_DEFLATED$1\n} = constants;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `header` (Object) - custom header for gzip\n *   - `text` (Boolean) - true if compressed data believed to be text\n *   - `time` (Number) - modification time, unix timestamp\n *   - `os` (Number) - operation system code\n *   - `extra` (Array) - array of bytes with extra data (max 65536)\n *   - `name` (String) - file name (binary string)\n *   - `comment` (String) - comment (binary string)\n *   - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n *   , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n *   , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true);  // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n  this.options = common.assign({\n    level: Z_DEFAULT_COMPRESSION$1,\n    method: Z_DEFLATED$1,\n    chunkSize: 16384,\n    windowBits: 15,\n    memLevel: 8,\n    strategy: Z_DEFAULT_STRATEGY$1\n  }, options || {});\n\n  let opt = this.options;\n\n  if (opt.raw && (opt.windowBits > 0)) {\n    opt.windowBits = -opt.windowBits;\n  }\n\n  else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n    opt.windowBits += 16;\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm = new zstream();\n  this.strm.avail_out = 0;\n\n  let status = deflate_1.deflateInit2(\n    this.strm,\n    opt.level,\n    opt.method,\n    opt.windowBits,\n    opt.memLevel,\n    opt.strategy\n  );\n\n  if (status !== Z_OK$1) {\n    throw new Error(messages[status]);\n  }\n\n  if (opt.header) {\n    deflate_1.deflateSetHeader(this.strm, opt.header);\n  }\n\n  if (opt.dictionary) {\n    let dict;\n    // Convert data if needed\n    if (typeof opt.dictionary === 'string') {\n      // If we need to compress text, change encoding to utf8.\n      dict = strings.string2buf(opt.dictionary);\n    } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n      dict = new Uint8Array(opt.dictionary);\n    } else {\n      dict = opt.dictionary;\n    }\n\n    status = deflate_1.deflateSetDictionary(this.strm, dict);\n\n    if (status !== Z_OK$1) {\n      throw new Error(messages[status]);\n    }\n\n    this._dict_set = true;\n  }\n}\n\n/**\n * Deflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be\n *   converted to utf8 byte sequence.\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must\n * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending\n * buffers and call [[Deflate#onEnd]].\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, flush_mode) {\n  const strm = this.strm;\n  const chunkSize = this.options.chunkSize;\n  let status, _flush_mode;\n\n  if (this.ended) { return false; }\n\n  if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n  else _flush_mode = flush_mode === true ? Z_FINISH$1 : Z_NO_FLUSH$1;\n\n  // Convert data if needed\n  if (typeof data === 'string') {\n    // If we need to compress text, change encoding to utf8.\n    strm.input = strings.string2buf(data);\n  } else if (toString.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  for (;;) {\n    if (strm.avail_out === 0) {\n      strm.output = new Uint8Array(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n\n    // Make sure avail_out > 6 to avoid repeating markers\n    if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH$1) && strm.avail_out <= 6) {\n      this.onData(strm.output.subarray(0, strm.next_out));\n      strm.avail_out = 0;\n      continue;\n    }\n\n    status = deflate_1.deflate(strm, _flush_mode);\n\n    // Ended => flush and finish\n    if (status === Z_STREAM_END$1) {\n      if (strm.next_out > 0) {\n        this.onData(strm.output.subarray(0, strm.next_out));\n      }\n      status = deflate_1.deflateEnd(this.strm);\n      this.onEnd(status);\n      this.ended = true;\n      return status === Z_OK$1;\n    }\n\n    // Flush if out buffer full\n    if (strm.avail_out === 0) {\n      this.onData(strm.output);\n      continue;\n    }\n\n    // Flush if requested and has data\n    if (_flush_mode > 0 && strm.next_out > 0) {\n      this.onData(strm.output.subarray(0, strm.next_out));\n      strm.avail_out = 0;\n      continue;\n    }\n\n    if (strm.avail_in === 0) break;\n  }\n\n  return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array): output data.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n  // On success - join\n  if (status === Z_OK$1) {\n    this.result = common.flattenChunks(this.chunks);\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const data = new Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate$1(input, options) {\n  const deflator = new Deflate(options);\n\n  deflator.push(input, true);\n\n  // That will never happens, if you don't cheat with options :)\n  if (deflator.err) { throw deflator.msg || messages[deflator.err]; }\n\n  return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return deflate$1(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n  options = options || {};\n  options.gzip = true;\n  return deflate$1(input, options);\n}\n\n\nvar Deflate_1 = Deflate;\nvar deflate_2$1 = deflate$1;\nvar deflateRaw_1 = deflateRaw;\nvar gzip_1 = gzip;\nvar constants$1 = constants;\n\nvar deflate_1$1 = {\n\tDeflate: Deflate_1,\n\tdeflate: deflate_2$1,\n\tdeflateRaw: deflateRaw_1,\n\tgzip: gzip_1,\n\tconstants: constants$1\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nconst BAD = 30;       /* got a data error -- remain here until reset */\nconst TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\n\n/*\n   Decode literal, length, and distance codes and write out the resulting\n   literal and match bytes until either not enough input or output is\n   available, an end-of-block is encountered, or a data error is encountered.\n   When large enough input and output buffers are supplied to inflate(), for\n   example, a 16K input buffer and a 64K output buffer, more than 95% of the\n   inflate execution time is spent in this routine.\n\n   Entry assumptions:\n\n        state.mode === LEN\n        strm.avail_in >= 6\n        strm.avail_out >= 258\n        start >= strm.avail_out\n        state.bits < 8\n\n   On return, state.mode is one of:\n\n        LEN -- ran out of enough output space or enough available input\n        TYPE -- reached end of block code, inflate() to interpret next block\n        BAD -- error in block data\n\n   Notes:\n\n    - The maximum input bits used by a length/distance pair is 15 bits for the\n      length code, 5 bits for the length extra, 15 bits for the distance code,\n      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.\n      Therefore if strm.avail_in >= 6, then there is enough input to avoid\n      checking for available input while decoding.\n\n    - The maximum bytes that a single length/distance pair can output is 258\n      bytes, which is the maximum length that can be coded.  inflate_fast()\n      requires strm.avail_out >= 258 for each loop to avoid checking for\n      output space.\n */\nvar inffast = function inflate_fast(strm, start) {\n  let _in;                    /* local strm.input */\n  let last;                   /* have enough input while in < last */\n  let _out;                   /* local strm.output */\n  let beg;                    /* inflate()'s initial strm.output */\n  let end;                    /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n  let dmax;                   /* maximum distance from zlib header */\n//#endif\n  let wsize;                  /* window size or zero if not using window */\n  let whave;                  /* valid bytes in the window */\n  let wnext;                  /* window write index */\n  // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n  let s_window;               /* allocated sliding window, if wsize != 0 */\n  let hold;                   /* local strm.hold */\n  let bits;                   /* local strm.bits */\n  let lcode;                  /* local strm.lencode */\n  let dcode;                  /* local strm.distcode */\n  let lmask;                  /* mask for first level of length codes */\n  let dmask;                  /* mask for first level of distance codes */\n  let here;                   /* retrieved table entry */\n  let op;                     /* code bits, operation, extra bits, or */\n                              /*  window position, window bytes to copy */\n  let len;                    /* match length, unused bytes */\n  let dist;                   /* match distance */\n  let from;                   /* where to copy match from */\n  let from_source;\n\n\n  let input, output; // JS specific, because we have no pointers\n\n  /* copy state to local variables */\n  const state = strm.state;\n  //here = state.here;\n  _in = strm.next_in;\n  input = strm.input;\n  last = _in + (strm.avail_in - 5);\n  _out = strm.next_out;\n  output = strm.output;\n  beg = _out - (start - strm.avail_out);\n  end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n  dmax = state.dmax;\n//#endif\n  wsize = state.wsize;\n  whave = state.whave;\n  wnext = state.wnext;\n  s_window = state.window;\n  hold = state.hold;\n  bits = state.bits;\n  lcode = state.lencode;\n  dcode = state.distcode;\n  lmask = (1 << state.lenbits) - 1;\n  dmask = (1 << state.distbits) - 1;\n\n\n  /* decode literals and length/distances until end-of-block or not enough\n     input data or output space */\n\n  top:\n  do {\n    if (bits < 15) {\n      hold += input[_in++] << bits;\n      bits += 8;\n      hold += input[_in++] << bits;\n      bits += 8;\n    }\n\n    here = lcode[hold & lmask];\n\n    dolen:\n    for (;;) { // Goto emulation\n      op = here >>> 24/*here.bits*/;\n      hold >>>= op;\n      bits -= op;\n      op = (here >>> 16) & 0xff/*here.op*/;\n      if (op === 0) {                          /* literal */\n        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n        //        \"inflate:         literal '%c'\\n\" :\n        //        \"inflate:         literal 0x%02x\\n\", here.val));\n        output[_out++] = here & 0xffff/*here.val*/;\n      }\n      else if (op & 16) {                     /* length base */\n        len = here & 0xffff/*here.val*/;\n        op &= 15;                           /* number of extra bits */\n        if (op) {\n          if (bits < op) {\n            hold += input[_in++] << bits;\n            bits += 8;\n          }\n          len += hold & ((1 << op) - 1);\n          hold >>>= op;\n          bits -= op;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", len));\n        if (bits < 15) {\n          hold += input[_in++] << bits;\n          bits += 8;\n          hold += input[_in++] << bits;\n          bits += 8;\n        }\n        here = dcode[hold & dmask];\n\n        dodist:\n        for (;;) { // goto emulation\n          op = here >>> 24/*here.bits*/;\n          hold >>>= op;\n          bits -= op;\n          op = (here >>> 16) & 0xff/*here.op*/;\n\n          if (op & 16) {                      /* distance base */\n            dist = here & 0xffff/*here.val*/;\n            op &= 15;                       /* number of extra bits */\n            if (bits < op) {\n              hold += input[_in++] << bits;\n              bits += 8;\n              if (bits < op) {\n                hold += input[_in++] << bits;\n                bits += 8;\n              }\n            }\n            dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n            if (dist > dmax) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD;\n              break top;\n            }\n//#endif\n            hold >>>= op;\n            bits -= op;\n            //Tracevv((stderr, \"inflate:         distance %u\\n\", dist));\n            op = _out - beg;                /* max distance in output */\n            if (dist > op) {                /* see if copy from window */\n              op = dist - op;               /* distance back in window */\n              if (op > whave) {\n                if (state.sane) {\n                  strm.msg = 'invalid distance too far back';\n                  state.mode = BAD;\n                  break top;\n                }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//                if (len <= op - whave) {\n//                  do {\n//                    output[_out++] = 0;\n//                  } while (--len);\n//                  continue top;\n//                }\n//                len -= op - whave;\n//                do {\n//                  output[_out++] = 0;\n//                } while (--op > whave);\n//                if (op === 0) {\n//                  from = _out - dist;\n//                  do {\n//                    output[_out++] = output[from++];\n//                  } while (--len);\n//                  continue top;\n//                }\n//#endif\n              }\n              from = 0; // window index\n              from_source = s_window;\n              if (wnext === 0) {           /* very common case */\n                from += wsize - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              else if (wnext < op) {      /* wrap around window */\n                from += wsize + wnext - op;\n                op -= wnext;\n                if (op < len) {         /* some from end of window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = 0;\n                  if (wnext < len) {  /* some from start of window */\n                    op = wnext;\n                    len -= op;\n                    do {\n                      output[_out++] = s_window[from++];\n                    } while (--op);\n                    from = _out - dist;      /* rest from output */\n                    from_source = output;\n                  }\n                }\n              }\n              else {                      /* contiguous in window */\n                from += wnext - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              while (len > 2) {\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                len -= 3;\n              }\n              if (len) {\n                output[_out++] = from_source[from++];\n                if (len > 1) {\n                  output[_out++] = from_source[from++];\n                }\n              }\n            }\n            else {\n              from = _out - dist;          /* copy direct from output */\n              do {                        /* minimum length is three */\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                len -= 3;\n              } while (len > 2);\n              if (len) {\n                output[_out++] = output[from++];\n                if (len > 1) {\n                  output[_out++] = output[from++];\n                }\n              }\n            }\n          }\n          else if ((op & 64) === 0) {          /* 2nd level distance code */\n            here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n            continue dodist;\n          }\n          else {\n            strm.msg = 'invalid distance code';\n            state.mode = BAD;\n            break top;\n          }\n\n          break; // need to emulate goto via \"continue\"\n        }\n      }\n      else if ((op & 64) === 0) {              /* 2nd level length code */\n        here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n        continue dolen;\n      }\n      else if (op & 32) {                     /* end-of-block */\n        //Tracevv((stderr, \"inflate:         end of block\\n\"));\n        state.mode = TYPE;\n        break top;\n      }\n      else {\n        strm.msg = 'invalid literal/length code';\n        state.mode = BAD;\n        break top;\n      }\n\n      break; // need to emulate goto via \"continue\"\n    }\n  } while (_in < last && _out < end);\n\n  /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n  len = bits >> 3;\n  _in -= len;\n  bits -= len << 3;\n  hold &= (1 << bits) - 1;\n\n  /* update state and return */\n  strm.next_in = _in;\n  strm.next_out = _out;\n  strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n  strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n  state.hold = hold;\n  state.bits = bits;\n  return;\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst MAXBITS = 15;\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\nconst lbase = new Uint16Array([ /* Length codes 257..285 base */\n  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n  35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n]);\n\nconst lext = new Uint8Array([ /* Length codes 257..285 extra */\n  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n  19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n]);\n\nconst dbase = new Uint16Array([ /* Distance codes 0..29 base */\n  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n  257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n  8193, 12289, 16385, 24577, 0, 0\n]);\n\nconst dext = new Uint8Array([ /* Distance codes 0..29 extra */\n  16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n  23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n  28, 28, 29, 29, 64, 64\n]);\n\nconst inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n{\n  const bits = opts.bits;\n      //here = opts.here; /* table entry for duplication */\n\n  let len = 0;               /* a code's length in bits */\n  let sym = 0;               /* index of code symbols */\n  let min = 0, max = 0;          /* minimum and maximum code lengths */\n  let root = 0;              /* number of index bits for root table */\n  let curr = 0;              /* number of index bits for current table */\n  let drop = 0;              /* code bits to drop for sub-table */\n  let left = 0;                   /* number of prefix codes available */\n  let used = 0;              /* code entries in table used */\n  let huff = 0;              /* Huffman code */\n  let incr;              /* for incrementing code, index */\n  let fill;              /* index for replicating entries */\n  let low;               /* low bits for current root entry */\n  let mask;              /* mask for low root bits */\n  let next;             /* next available space in table */\n  let base = null;     /* base value table to use */\n  let base_index = 0;\n//  let shoextra;    /* extra bits table to use */\n  let end;                    /* use base and extra for symbol > end */\n  const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1];    /* number of codes of each length */\n  const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1];     /* offsets in table for each length */\n  let extra = null;\n  let extra_index = 0;\n\n  let here_bits, here_op, here_val;\n\n  /*\n   Process a set of code lengths to create a canonical Huffman code.  The\n   code lengths are lens[0..codes-1].  Each length corresponds to the\n   symbols 0..codes-1.  The Huffman code is generated by first sorting the\n   symbols by length from short to long, and retaining the symbol order\n   for codes with equal lengths.  Then the code starts with all zero bits\n   for the first code of the shortest length, and the codes are integer\n   increments for the same length, and zeros are appended as the length\n   increases.  For the deflate format, these bits are stored backwards\n   from their more natural integer increment ordering, and so when the\n   decoding tables are built in the large loop below, the integer codes\n   are incremented backwards.\n\n   This routine assumes, but does not check, that all of the entries in\n   lens[] are in the range 0..MAXBITS.  The caller must assure this.\n   1..MAXBITS is interpreted as that code length.  zero means that that\n   symbol does not occur in this code.\n\n   The codes are sorted by computing a count of codes for each length,\n   creating from that a table of starting indices for each length in the\n   sorted table, and then entering the symbols in order in the sorted\n   table.  The sorted table is work[], with that space being provided by\n   the caller.\n\n   The length counts are used for other purposes as well, i.e. finding\n   the minimum and maximum length codes, determining if there are any\n   codes at all, checking for a valid set of lengths, and looking ahead\n   at length counts to determine sub-table sizes when building the\n   decoding tables.\n   */\n\n  /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n  for (len = 0; len <= MAXBITS; len++) {\n    count[len] = 0;\n  }\n  for (sym = 0; sym < codes; sym++) {\n    count[lens[lens_index + sym]]++;\n  }\n\n  /* bound code lengths, force root to be within code lengths */\n  root = bits;\n  for (max = MAXBITS; max >= 1; max--) {\n    if (count[max] !== 0) { break; }\n  }\n  if (root > max) {\n    root = max;\n  }\n  if (max === 0) {                     /* no symbols to code at all */\n    //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */\n    //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;\n    //table.val[opts.table_index++] = 0;   //here.val = (var short)0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n    //table.op[opts.table_index] = 64;\n    //table.bits[opts.table_index] = 1;\n    //table.val[opts.table_index++] = 0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n    opts.bits = 1;\n    return 0;     /* no symbols, but wait for decoding to report error */\n  }\n  for (min = 1; min < max; min++) {\n    if (count[min] !== 0) { break; }\n  }\n  if (root < min) {\n    root = min;\n  }\n\n  /* check for an over-subscribed or incomplete set of lengths */\n  left = 1;\n  for (len = 1; len <= MAXBITS; len++) {\n    left <<= 1;\n    left -= count[len];\n    if (left < 0) {\n      return -1;\n    }        /* over-subscribed */\n  }\n  if (left > 0 && (type === CODES || max !== 1)) {\n    return -1;                      /* incomplete set */\n  }\n\n  /* generate offsets into symbol table for each length for sorting */\n  offs[1] = 0;\n  for (len = 1; len < MAXBITS; len++) {\n    offs[len + 1] = offs[len] + count[len];\n  }\n\n  /* sort symbols by length, by symbol order within each length */\n  for (sym = 0; sym < codes; sym++) {\n    if (lens[lens_index + sym] !== 0) {\n      work[offs[lens[lens_index + sym]]++] = sym;\n    }\n  }\n\n  /*\n   Create and fill in decoding tables.  In this loop, the table being\n   filled is at next and has curr index bits.  The code being used is huff\n   with length len.  That code is converted to an index by dropping drop\n   bits off of the bottom.  For codes where len is less than drop + curr,\n   those top drop + curr - len bits are incremented through all values to\n   fill the table with replicated entries.\n\n   root is the number of index bits for the root table.  When len exceeds\n   root, sub-tables are created pointed to by the root entry with an index\n   of the low root bits of huff.  This is saved in low to check for when a\n   new sub-table should be started.  drop is zero when the root table is\n   being filled, and drop is root when sub-tables are being filled.\n\n   When a new sub-table is needed, it is necessary to look ahead in the\n   code lengths to determine what size sub-table is needed.  The length\n   counts are used for this, and so count[] is decremented as codes are\n   entered in the tables.\n\n   used keeps track of how many table entries have been allocated from the\n   provided *table space.  It is checked for LENS and DIST tables against\n   the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n   the initial root table size constants.  See the comments in inftrees.h\n   for more information.\n\n   sym increments through all symbols, and the loop terminates when\n   all codes of length max, i.e. all codes, have been processed.  This\n   routine permits incomplete codes, so another loop after this one fills\n   in the rest of the decoding tables with invalid code markers.\n   */\n\n  /* set up for code type */\n  // poor man optimization - use if-else instead of switch,\n  // to avoid deopts in old v8\n  if (type === CODES) {\n    base = extra = work;    /* dummy value--not used */\n    end = 19;\n\n  } else if (type === LENS) {\n    base = lbase;\n    base_index -= 257;\n    extra = lext;\n    extra_index -= 257;\n    end = 256;\n\n  } else {                    /* DISTS */\n    base = dbase;\n    extra = dext;\n    end = -1;\n  }\n\n  /* initialize opts for loop */\n  huff = 0;                   /* starting code */\n  sym = 0;                    /* starting code symbol */\n  len = min;                  /* starting code length */\n  next = table_index;              /* current table to fill in */\n  curr = root;                /* current table index bits */\n  drop = 0;                   /* current bits to drop from code for index */\n  low = -1;                   /* trigger new sub-table when len > root */\n  used = 1 << root;          /* use root table entries */\n  mask = used - 1;            /* mask for comparing low */\n\n  /* check available table space */\n  if ((type === LENS && used > ENOUGH_LENS) ||\n    (type === DISTS && used > ENOUGH_DISTS)) {\n    return 1;\n  }\n\n  /* process all codes and make table entries */\n  for (;;) {\n    /* create table entry */\n    here_bits = len - drop;\n    if (work[sym] < end) {\n      here_op = 0;\n      here_val = work[sym];\n    }\n    else if (work[sym] > end) {\n      here_op = extra[extra_index + work[sym]];\n      here_val = base[base_index + work[sym]];\n    }\n    else {\n      here_op = 32 + 64;         /* end of block */\n      here_val = 0;\n    }\n\n    /* replicate for those indices with low len bits equal to huff */\n    incr = 1 << (len - drop);\n    fill = 1 << curr;\n    min = fill;                 /* save offset to next table */\n    do {\n      fill -= incr;\n      table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n    } while (fill !== 0);\n\n    /* backwards increment the len-bit code huff */\n    incr = 1 << (len - 1);\n    while (huff & incr) {\n      incr >>= 1;\n    }\n    if (incr !== 0) {\n      huff &= incr - 1;\n      huff += incr;\n    } else {\n      huff = 0;\n    }\n\n    /* go to next symbol, update count, len */\n    sym++;\n    if (--count[len] === 0) {\n      if (len === max) { break; }\n      len = lens[lens_index + work[sym]];\n    }\n\n    /* create new sub-table if needed */\n    if (len > root && (huff & mask) !== low) {\n      /* if first time, transition to sub-tables */\n      if (drop === 0) {\n        drop = root;\n      }\n\n      /* increment past last table */\n      next += min;            /* here min is 1 << curr */\n\n      /* determine length of next table */\n      curr = len - drop;\n      left = 1 << curr;\n      while (curr + drop < max) {\n        left -= count[curr + drop];\n        if (left <= 0) { break; }\n        curr++;\n        left <<= 1;\n      }\n\n      /* check for enough space */\n      used += 1 << curr;\n      if ((type === LENS && used > ENOUGH_LENS) ||\n        (type === DISTS && used > ENOUGH_DISTS)) {\n        return 1;\n      }\n\n      /* point entry in root table to sub-table */\n      low = huff & mask;\n      /*table.op[low] = curr;\n      table.bits[low] = root;\n      table.val[low] = next - opts.table_index;*/\n      table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n    }\n  }\n\n  /* fill in remaining table entry if code is incomplete (guaranteed to have\n   at most one remaining entry, since if the code is incomplete, the\n   maximum code length that was allowed to get this far is one bit) */\n  if (huff !== 0) {\n    //table.op[next + huff] = 64;            /* invalid code marker */\n    //table.bits[next + huff] = len - drop;\n    //table.val[next + huff] = 0;\n    table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n  }\n\n  /* set return parameters */\n  //opts.table_index += used;\n  opts.bits = root;\n  return 0;\n};\n\n\nvar inftrees = inflate_table;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n\n\nconst CODES$1 = 0;\nconst LENS$1 = 1;\nconst DISTS$1 = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n  Z_FINISH: Z_FINISH$2, Z_BLOCK: Z_BLOCK$1, Z_TREES,\n  Z_OK: Z_OK$2, Z_STREAM_END: Z_STREAM_END$2, Z_NEED_DICT, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR, Z_BUF_ERROR: Z_BUF_ERROR$1,\n  Z_DEFLATED: Z_DEFLATED$2\n} = constants;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nconst    HEAD = 1;       /* i: waiting for magic header */\nconst    FLAGS = 2;      /* i: waiting for method and flags (gzip) */\nconst    TIME = 3;       /* i: waiting for modification time (gzip) */\nconst    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */\nconst    EXLEN = 5;      /* i: waiting for extra length (gzip) */\nconst    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */\nconst    NAME = 7;       /* i: waiting for end of file name (gzip) */\nconst    COMMENT = 8;    /* i: waiting for end of comment (gzip) */\nconst    HCRC = 9;       /* i: waiting for header crc (gzip) */\nconst    DICTID = 10;    /* i: waiting for dictionary check value */\nconst    DICT = 11;      /* waiting for inflateSetDictionary() call */\nconst        TYPE$1 = 12;      /* i: waiting for type bits, including last-flag bit */\nconst        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */\nconst        STORED = 14;    /* i: waiting for stored size (length and complement) */\nconst        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */\nconst        COPY = 16;      /* i/o: waiting for input or output to copy stored block */\nconst        TABLE = 17;     /* i: waiting for dynamic block table lengths */\nconst        LENLENS = 18;   /* i: waiting for code length code lengths */\nconst        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */\nconst            LEN_ = 20;      /* i: same as LEN below, but only first time in */\nconst            LEN = 21;       /* i: waiting for length/lit/eob code */\nconst            LENEXT = 22;    /* i: waiting for length extra bits */\nconst            DIST = 23;      /* i: waiting for distance code */\nconst            DISTEXT = 24;   /* i: waiting for distance extra bits */\nconst            MATCH = 25;     /* o: waiting for output space to copy string */\nconst            LIT = 26;       /* o: waiting for output space to write literal */\nconst    CHECK = 27;     /* i: waiting for 32-bit check value */\nconst    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */\nconst    DONE = 29;      /* finished check, done -- remain here until reset */\nconst    BAD$1 = 30;       /* got a data error -- remain here until reset */\nconst    MEM = 31;       /* got an inflate() memory error -- remain here until reset */\nconst    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nconst ENOUGH_LENS$1 = 852;\nconst ENOUGH_DISTS$1 = 592;\n//const ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst MAX_WBITS$1 = 15;\n/* 32K LZ77 window */\nconst DEF_WBITS = MAX_WBITS$1;\n\n\nconst zswap32 = (q) => {\n\n  return  (((q >>> 24) & 0xff) +\n          ((q >>> 8) & 0xff00) +\n          ((q & 0xff00) << 8) +\n          ((q & 0xff) << 24));\n};\n\n\nfunction InflateState() {\n  this.mode = 0;             /* current inflate mode */\n  this.last = false;          /* true if processing last block */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.havedict = false;      /* true if dictionary provided */\n  this.flags = 0;             /* gzip header method and flags (0 if zlib) */\n  this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */\n  this.check = 0;             /* protected copy of check value */\n  this.total = 0;             /* protected copy of output count */\n  // TODO: may be {}\n  this.head = null;           /* where to save gzip header information */\n\n  /* sliding window */\n  this.wbits = 0;             /* log base 2 of requested window size */\n  this.wsize = 0;             /* window size or zero if not using window */\n  this.whave = 0;             /* valid bytes in the window */\n  this.wnext = 0;             /* window write index */\n  this.window = null;         /* allocated sliding window, if needed */\n\n  /* bit accumulator */\n  this.hold = 0;              /* input bit accumulator */\n  this.bits = 0;              /* number of bits in \"in\" */\n\n  /* for string and stored block copying */\n  this.length = 0;            /* literal or length of data to copy */\n  this.offset = 0;            /* distance back to copy string from */\n\n  /* for table and code decoding */\n  this.extra = 0;             /* extra bits needed */\n\n  /* fixed and dynamic code tables */\n  this.lencode = null;          /* starting table for length/literal codes */\n  this.distcode = null;         /* starting table for distance codes */\n  this.lenbits = 0;           /* index bits for lencode */\n  this.distbits = 0;          /* index bits for distcode */\n\n  /* dynamic table building */\n  this.ncode = 0;             /* number of code length code lengths */\n  this.nlen = 0;              /* number of length code lengths */\n  this.ndist = 0;             /* number of distance code lengths */\n  this.have = 0;              /* number of code lengths in lens[] */\n  this.next = null;              /* next available space in codes[] */\n\n  this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n  this.work = new Uint16Array(288); /* work area for code table building */\n\n  /*\n   because we don't have pointers in js, we use lencode and distcode directly\n   as buffers so we don't need codes\n  */\n  //this.codes = new Int32Array(ENOUGH);       /* space for code tables */\n  this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */\n  this.distdyn = null;             /* dynamic table for distance codes (JS specific) */\n  this.sane = 0;                   /* if false, allow invalid distance too far */\n  this.back = 0;                   /* bits back of last unprocessed length/lit */\n  this.was = 0;                    /* initial length of match */\n}\n\n\nconst inflateResetKeep = (strm) => {\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n  const state = strm.state;\n  strm.total_in = strm.total_out = state.total = 0;\n  strm.msg = ''; /*Z_NULL*/\n  if (state.wrap) {       /* to support ill-conceived Java test suite */\n    strm.adler = state.wrap & 1;\n  }\n  state.mode = HEAD;\n  state.last = 0;\n  state.havedict = 0;\n  state.dmax = 32768;\n  state.head = null/*Z_NULL*/;\n  state.hold = 0;\n  state.bits = 0;\n  //state.lencode = state.distcode = state.next = state.codes;\n  state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS$1);\n  state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS$1);\n\n  state.sane = 1;\n  state.back = -1;\n  //Tracev((stderr, \"inflate: reset\\n\"));\n  return Z_OK$2;\n};\n\n\nconst inflateReset = (strm) => {\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n  const state = strm.state;\n  state.wsize = 0;\n  state.whave = 0;\n  state.wnext = 0;\n  return inflateResetKeep(strm);\n\n};\n\n\nconst inflateReset2 = (strm, windowBits) => {\n  let wrap;\n\n  /* get the state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n  const state = strm.state;\n\n  /* extract wrap request from windowBits parameter */\n  if (windowBits < 0) {\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n  else {\n    wrap = (windowBits >> 4) + 1;\n    if (windowBits < 48) {\n      windowBits &= 15;\n    }\n  }\n\n  /* set number of window bits, free window if different */\n  if (windowBits && (windowBits < 8 || windowBits > 15)) {\n    return Z_STREAM_ERROR$1;\n  }\n  if (state.window !== null && state.wbits !== windowBits) {\n    state.window = null;\n  }\n\n  /* update state and reset the rest of it */\n  state.wrap = wrap;\n  state.wbits = windowBits;\n  return inflateReset(strm);\n};\n\n\nconst inflateInit2 = (strm, windowBits) => {\n\n  if (!strm) { return Z_STREAM_ERROR$1; }\n  //strm.msg = Z_NULL;                 /* in case we return an error */\n\n  const state = new InflateState();\n\n  //if (state === Z_NULL) return Z_MEM_ERROR;\n  //Tracev((stderr, \"inflate: allocated\\n\"));\n  strm.state = state;\n  state.window = null/*Z_NULL*/;\n  const ret = inflateReset2(strm, windowBits);\n  if (ret !== Z_OK$2) {\n    strm.state = null/*Z_NULL*/;\n  }\n  return ret;\n};\n\n\nconst inflateInit = (strm) => {\n\n  return inflateInit2(strm, DEF_WBITS);\n};\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding.  Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter.  This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time.  However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nlet virgin = true;\n\nlet lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\nconst fixedtables = (state) => {\n\n  /* build fixed huffman tables if first call (may not be thread safe) */\n  if (virgin) {\n    lenfix = new Int32Array(512);\n    distfix = new Int32Array(32);\n\n    /* literal/length table */\n    let sym = 0;\n    while (sym < 144) { state.lens[sym++] = 8; }\n    while (sym < 256) { state.lens[sym++] = 9; }\n    while (sym < 280) { state.lens[sym++] = 7; }\n    while (sym < 288) { state.lens[sym++] = 8; }\n\n    inftrees(LENS$1,  state.lens, 0, 288, lenfix,   0, state.work, { bits: 9 });\n\n    /* distance table */\n    sym = 0;\n    while (sym < 32) { state.lens[sym++] = 5; }\n\n    inftrees(DISTS$1, state.lens, 0, 32,   distfix, 0, state.work, { bits: 5 });\n\n    /* do this just once */\n    virgin = false;\n  }\n\n  state.lencode = lenfix;\n  state.lenbits = 9;\n  state.distcode = distfix;\n  state.distbits = 5;\n};\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning.  If window does not exist yet, create it.  This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nconst updatewindow = (strm, src, end, copy) => {\n\n  let dist;\n  const state = strm.state;\n\n  /* if it hasn't been done already, allocate space for the window */\n  if (state.window === null) {\n    state.wsize = 1 << state.wbits;\n    state.wnext = 0;\n    state.whave = 0;\n\n    state.window = new Uint8Array(state.wsize);\n  }\n\n  /* copy state->wsize or less output bytes into the circular window */\n  if (copy >= state.wsize) {\n    state.window.set(src.subarray(end - state.wsize, end), 0);\n    state.wnext = 0;\n    state.whave = state.wsize;\n  }\n  else {\n    dist = state.wsize - state.wnext;\n    if (dist > copy) {\n      dist = copy;\n    }\n    //zmemcpy(state->window + state->wnext, end - copy, dist);\n    state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n    copy -= dist;\n    if (copy) {\n      //zmemcpy(state->window, end - copy, copy);\n      state.window.set(src.subarray(end - copy, end), 0);\n      state.wnext = copy;\n      state.whave = state.wsize;\n    }\n    else {\n      state.wnext += dist;\n      if (state.wnext === state.wsize) { state.wnext = 0; }\n      if (state.whave < state.wsize) { state.whave += dist; }\n    }\n  }\n  return 0;\n};\n\n\nconst inflate = (strm, flush) => {\n\n  let state;\n  let input, output;          // input/output buffers\n  let next;                   /* next input INDEX */\n  let put;                    /* next output INDEX */\n  let have, left;             /* available input and output */\n  let hold;                   /* bit buffer */\n  let bits;                   /* bits in bit buffer */\n  let _in, _out;              /* save starting available input and output */\n  let copy;                   /* number of stored or match bytes to copy */\n  let from;                   /* where to copy match bytes from */\n  let from_source;\n  let here = 0;               /* current decoding table entry */\n  let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n  //let last;                   /* parent table entry */\n  let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n  let len;                    /* length to copy for repeats, bits to drop */\n  let ret;                    /* return code */\n  const hbuf = new Uint8Array(4);    /* buffer for gzip header crc calculation */\n  let opts;\n\n  let n; // temporary variable for NEED_BITS\n\n  const order = /* permutation of code lengths */\n    new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n  if (!strm || !strm.state || !strm.output ||\n      (!strm.input && strm.avail_in !== 0)) {\n    return Z_STREAM_ERROR$1;\n  }\n\n  state = strm.state;\n  if (state.mode === TYPE$1) { state.mode = TYPEDO; }    /* skip check */\n\n\n  //--- LOAD() ---\n  put = strm.next_out;\n  output = strm.output;\n  left = strm.avail_out;\n  next = strm.next_in;\n  input = strm.input;\n  have = strm.avail_in;\n  hold = state.hold;\n  bits = state.bits;\n  //---\n\n  _in = have;\n  _out = left;\n  ret = Z_OK$2;\n\n  inf_leave: // goto emulation\n  for (;;) {\n    switch (state.mode) {\n      case HEAD:\n        if (state.wrap === 0) {\n          state.mode = TYPEDO;\n          break;\n        }\n        //=== NEEDBITS(16);\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */\n          state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32_1(state.check, hbuf, 2, 0);\n          //===//\n\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          state.mode = FLAGS;\n          break;\n        }\n        state.flags = 0;           /* expect zlib header */\n        if (state.head) {\n          state.head.done = false;\n        }\n        if (!(state.wrap & 1) ||   /* check if zlib header allowed */\n          (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n          strm.msg = 'incorrect header check';\n          state.mode = BAD$1;\n          break;\n        }\n        if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED$2) {\n          strm.msg = 'unknown compression method';\n          state.mode = BAD$1;\n          break;\n        }\n        //--- DROPBITS(4) ---//\n        hold >>>= 4;\n        bits -= 4;\n        //---//\n        len = (hold & 0x0f)/*BITS(4)*/ + 8;\n        if (state.wbits === 0) {\n          state.wbits = len;\n        }\n        else if (len > state.wbits) {\n          strm.msg = 'invalid window size';\n          state.mode = BAD$1;\n          break;\n        }\n\n        // !!! pako patch. Force use `options.windowBits` if passed.\n        // Required to always use max window size by default.\n        state.dmax = 1 << state.wbits;\n        //state.dmax = 1 << len;\n\n        //Tracev((stderr, \"inflate:   zlib header ok\\n\"));\n        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n        state.mode = hold & 0x200 ? DICTID : TYPE$1;\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        break;\n      case FLAGS:\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.flags = hold;\n        if ((state.flags & 0xff) !== Z_DEFLATED$2) {\n          strm.msg = 'unknown compression method';\n          state.mode = BAD$1;\n          break;\n        }\n        if (state.flags & 0xe000) {\n          strm.msg = 'unknown header flags set';\n          state.mode = BAD$1;\n          break;\n        }\n        if (state.head) {\n          state.head.text = ((hold >> 8) & 1);\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32_1(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = TIME;\n        /* falls through */\n      case TIME:\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (state.head) {\n          state.head.time = hold;\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC4(state.check, hold)\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          hbuf[2] = (hold >>> 16) & 0xff;\n          hbuf[3] = (hold >>> 24) & 0xff;\n          state.check = crc32_1(state.check, hbuf, 4, 0);\n          //===\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = OS;\n        /* falls through */\n      case OS:\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (state.head) {\n          state.head.xflags = (hold & 0xff);\n          state.head.os = (hold >> 8);\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32_1(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = EXLEN;\n        /* falls through */\n      case EXLEN:\n        if (state.flags & 0x0400) {\n          //=== NEEDBITS(16); */\n          while (bits < 16) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.length = hold;\n          if (state.head) {\n            state.head.extra_len = hold;\n          }\n          if (state.flags & 0x0200) {\n            //=== CRC2(state.check, hold);\n            hbuf[0] = hold & 0xff;\n            hbuf[1] = (hold >>> 8) & 0xff;\n            state.check = crc32_1(state.check, hbuf, 2, 0);\n            //===//\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n        }\n        else if (state.head) {\n          state.head.extra = null/*Z_NULL*/;\n        }\n        state.mode = EXTRA;\n        /* falls through */\n      case EXTRA:\n        if (state.flags & 0x0400) {\n          copy = state.length;\n          if (copy > have) { copy = have; }\n          if (copy) {\n            if (state.head) {\n              len = state.head.extra_len - state.length;\n              if (!state.head.extra) {\n                // Use untyped array for more convenient processing later\n                state.head.extra = new Uint8Array(state.head.extra_len);\n              }\n              state.head.extra.set(\n                input.subarray(\n                  next,\n                  // extra field is limited to 65536 bytes\n                  // - no need for additional size check\n                  next + copy\n                ),\n                /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n                len\n              );\n              //zmemcpy(state.head.extra + len, next,\n              //        len + copy > state.head.extra_max ?\n              //        state.head.extra_max - len : copy);\n            }\n            if (state.flags & 0x0200) {\n              state.check = crc32_1(state.check, input, copy, next);\n            }\n            have -= copy;\n            next += copy;\n            state.length -= copy;\n          }\n          if (state.length) { break inf_leave; }\n        }\n        state.length = 0;\n        state.mode = NAME;\n        /* falls through */\n      case NAME:\n        if (state.flags & 0x0800) {\n          if (have === 0) { break inf_leave; }\n          copy = 0;\n          do {\n            // TODO: 2 or 1 bytes?\n            len = input[next + copy++];\n            /* use constant limit because in js we should not preallocate memory */\n            if (state.head && len &&\n                (state.length < 65536 /*state.head.name_max*/)) {\n              state.head.name += String.fromCharCode(len);\n            }\n          } while (len && copy < have);\n\n          if (state.flags & 0x0200) {\n            state.check = crc32_1(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          if (len) { break inf_leave; }\n        }\n        else if (state.head) {\n          state.head.name = null;\n        }\n        state.length = 0;\n        state.mode = COMMENT;\n        /* falls through */\n      case COMMENT:\n        if (state.flags & 0x1000) {\n          if (have === 0) { break inf_leave; }\n          copy = 0;\n          do {\n            len = input[next + copy++];\n            /* use constant limit because in js we should not preallocate memory */\n            if (state.head && len &&\n                (state.length < 65536 /*state.head.comm_max*/)) {\n              state.head.comment += String.fromCharCode(len);\n            }\n          } while (len && copy < have);\n          if (state.flags & 0x0200) {\n            state.check = crc32_1(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          if (len) { break inf_leave; }\n        }\n        else if (state.head) {\n          state.head.comment = null;\n        }\n        state.mode = HCRC;\n        /* falls through */\n      case HCRC:\n        if (state.flags & 0x0200) {\n          //=== NEEDBITS(16); */\n          while (bits < 16) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          if (hold !== (state.check & 0xffff)) {\n            strm.msg = 'header crc mismatch';\n            state.mode = BAD$1;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n        }\n        if (state.head) {\n          state.head.hcrc = ((state.flags >> 9) & 1);\n          state.head.done = true;\n        }\n        strm.adler = state.check = 0;\n        state.mode = TYPE$1;\n        break;\n      case DICTID:\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        strm.adler = state.check = zswap32(hold);\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = DICT;\n        /* falls through */\n      case DICT:\n        if (state.havedict === 0) {\n          //--- RESTORE() ---\n          strm.next_out = put;\n          strm.avail_out = left;\n          strm.next_in = next;\n          strm.avail_in = have;\n          state.hold = hold;\n          state.bits = bits;\n          //---\n          return Z_NEED_DICT;\n        }\n        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n        state.mode = TYPE$1;\n        /* falls through */\n      case TYPE$1:\n        if (flush === Z_BLOCK$1 || flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case TYPEDO:\n        if (state.last) {\n          //--- BYTEBITS() ---//\n          hold >>>= bits & 7;\n          bits -= bits & 7;\n          //---//\n          state.mode = CHECK;\n          break;\n        }\n        //=== NEEDBITS(3); */\n        while (bits < 3) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.last = (hold & 0x01)/*BITS(1)*/;\n        //--- DROPBITS(1) ---//\n        hold >>>= 1;\n        bits -= 1;\n        //---//\n\n        switch ((hold & 0x03)/*BITS(2)*/) {\n          case 0:                             /* stored block */\n            //Tracev((stderr, \"inflate:     stored block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = STORED;\n            break;\n          case 1:                             /* fixed block */\n            fixedtables(state);\n            //Tracev((stderr, \"inflate:     fixed codes block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = LEN_;             /* decode codes */\n            if (flush === Z_TREES) {\n              //--- DROPBITS(2) ---//\n              hold >>>= 2;\n              bits -= 2;\n              //---//\n              break inf_leave;\n            }\n            break;\n          case 2:                             /* dynamic block */\n            //Tracev((stderr, \"inflate:     dynamic codes block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = TABLE;\n            break;\n          case 3:\n            strm.msg = 'invalid block type';\n            state.mode = BAD$1;\n        }\n        //--- DROPBITS(2) ---//\n        hold >>>= 2;\n        bits -= 2;\n        //---//\n        break;\n      case STORED:\n        //--- BYTEBITS() ---// /* go to byte boundary */\n        hold >>>= bits & 7;\n        bits -= bits & 7;\n        //---//\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n          strm.msg = 'invalid stored block lengths';\n          state.mode = BAD$1;\n          break;\n        }\n        state.length = hold & 0xffff;\n        //Tracev((stderr, \"inflate:       stored length %u\\n\",\n        //        state.length));\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = COPY_;\n        if (flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case COPY_:\n        state.mode = COPY;\n        /* falls through */\n      case COPY:\n        copy = state.length;\n        if (copy) {\n          if (copy > have) { copy = have; }\n          if (copy > left) { copy = left; }\n          if (copy === 0) { break inf_leave; }\n          //--- zmemcpy(put, next, copy); ---\n          output.set(input.subarray(next, next + copy), put);\n          //---//\n          have -= copy;\n          next += copy;\n          left -= copy;\n          put += copy;\n          state.length -= copy;\n          break;\n        }\n        //Tracev((stderr, \"inflate:       stored end\\n\"));\n        state.mode = TYPE$1;\n        break;\n      case TABLE:\n        //=== NEEDBITS(14); */\n        while (bits < 14) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n        //--- DROPBITS(5) ---//\n        hold >>>= 5;\n        bits -= 5;\n        //---//\n        state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n        //--- DROPBITS(5) ---//\n        hold >>>= 5;\n        bits -= 5;\n        //---//\n        state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n        //--- DROPBITS(4) ---//\n        hold >>>= 4;\n        bits -= 4;\n        //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n        if (state.nlen > 286 || state.ndist > 30) {\n          strm.msg = 'too many length or distance symbols';\n          state.mode = BAD$1;\n          break;\n        }\n//#endif\n        //Tracev((stderr, \"inflate:       table sizes ok\\n\"));\n        state.have = 0;\n        state.mode = LENLENS;\n        /* falls through */\n      case LENLENS:\n        while (state.have < state.ncode) {\n          //=== NEEDBITS(3);\n          while (bits < 3) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n          //--- DROPBITS(3) ---//\n          hold >>>= 3;\n          bits -= 3;\n          //---//\n        }\n        while (state.have < 19) {\n          state.lens[order[state.have++]] = 0;\n        }\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        //state.next = state.codes;\n        //state.lencode = state.next;\n        // Switch to use dynamic table\n        state.lencode = state.lendyn;\n        state.lenbits = 7;\n\n        opts = { bits: state.lenbits };\n        ret = inftrees(CODES$1, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n        state.lenbits = opts.bits;\n\n        if (ret) {\n          strm.msg = 'invalid code lengths set';\n          state.mode = BAD$1;\n          break;\n        }\n        //Tracev((stderr, \"inflate:       code lengths ok\\n\"));\n        state.have = 0;\n        state.mode = CODELENS;\n        /* falls through */\n      case CODELENS:\n        while (state.have < state.nlen + state.ndist) {\n          for (;;) {\n            here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          if (here_val < 16) {\n            //--- DROPBITS(here.bits) ---//\n            hold >>>= here_bits;\n            bits -= here_bits;\n            //---//\n            state.lens[state.have++] = here_val;\n          }\n          else {\n            if (here_val === 16) {\n              //=== NEEDBITS(here.bits + 2);\n              n = here_bits + 2;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              if (state.have === 0) {\n                strm.msg = 'invalid bit length repeat';\n                state.mode = BAD$1;\n                break;\n              }\n              len = state.lens[state.have - 1];\n              copy = 3 + (hold & 0x03);//BITS(2);\n              //--- DROPBITS(2) ---//\n              hold >>>= 2;\n              bits -= 2;\n              //---//\n            }\n            else if (here_val === 17) {\n              //=== NEEDBITS(here.bits + 3);\n              n = here_bits + 3;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              len = 0;\n              copy = 3 + (hold & 0x07);//BITS(3);\n              //--- DROPBITS(3) ---//\n              hold >>>= 3;\n              bits -= 3;\n              //---//\n            }\n            else {\n              //=== NEEDBITS(here.bits + 7);\n              n = here_bits + 7;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              len = 0;\n              copy = 11 + (hold & 0x7f);//BITS(7);\n              //--- DROPBITS(7) ---//\n              hold >>>= 7;\n              bits -= 7;\n              //---//\n            }\n            if (state.have + copy > state.nlen + state.ndist) {\n              strm.msg = 'invalid bit length repeat';\n              state.mode = BAD$1;\n              break;\n            }\n            while (copy--) {\n              state.lens[state.have++] = len;\n            }\n          }\n        }\n\n        /* handle error breaks in while */\n        if (state.mode === BAD$1) { break; }\n\n        /* check for end-of-block code (better have one) */\n        if (state.lens[256] === 0) {\n          strm.msg = 'invalid code -- missing end-of-block';\n          state.mode = BAD$1;\n          break;\n        }\n\n        /* build code tables -- note: do not change the lenbits or distbits\n           values here (9 and 6) without reading the comments in inftrees.h\n           concerning the ENOUGH constants, which depend on those values */\n        state.lenbits = 9;\n\n        opts = { bits: state.lenbits };\n        ret = inftrees(LENS$1, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        // state.next_index = opts.table_index;\n        state.lenbits = opts.bits;\n        // state.lencode = state.next;\n\n        if (ret) {\n          strm.msg = 'invalid literal/lengths set';\n          state.mode = BAD$1;\n          break;\n        }\n\n        state.distbits = 6;\n        //state.distcode.copy(state.codes);\n        // Switch to use dynamic table\n        state.distcode = state.distdyn;\n        opts = { bits: state.distbits };\n        ret = inftrees(DISTS$1, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        // state.next_index = opts.table_index;\n        state.distbits = opts.bits;\n        // state.distcode = state.next;\n\n        if (ret) {\n          strm.msg = 'invalid distances set';\n          state.mode = BAD$1;\n          break;\n        }\n        //Tracev((stderr, 'inflate:       codes ok\\n'));\n        state.mode = LEN_;\n        if (flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case LEN_:\n        state.mode = LEN;\n        /* falls through */\n      case LEN:\n        if (have >= 6 && left >= 258) {\n          //--- RESTORE() ---\n          strm.next_out = put;\n          strm.avail_out = left;\n          strm.next_in = next;\n          strm.avail_in = have;\n          state.hold = hold;\n          state.bits = bits;\n          //---\n          inffast(strm, _out);\n          //--- LOAD() ---\n          put = strm.next_out;\n          output = strm.output;\n          left = strm.avail_out;\n          next = strm.next_in;\n          input = strm.input;\n          have = strm.avail_in;\n          hold = state.hold;\n          bits = state.bits;\n          //---\n\n          if (state.mode === TYPE$1) {\n            state.back = -1;\n          }\n          break;\n        }\n        state.back = 0;\n        for (;;) {\n          here = state.lencode[hold & ((1 << state.lenbits) - 1)];  /*BITS(state.lenbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if (here_bits <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if (here_op && (here_op & 0xf0) === 0) {\n          last_bits = here_bits;\n          last_op = here_op;\n          last_val = here_val;\n          for (;;) {\n            here = state.lencode[last_val +\n                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((last_bits + here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          //--- DROPBITS(last.bits) ---//\n          hold >>>= last_bits;\n          bits -= last_bits;\n          //---//\n          state.back += last_bits;\n        }\n        //--- DROPBITS(here.bits) ---//\n        hold >>>= here_bits;\n        bits -= here_bits;\n        //---//\n        state.back += here_bits;\n        state.length = here_val;\n        if (here_op === 0) {\n          //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n          //        \"inflate:         literal '%c'\\n\" :\n          //        \"inflate:         literal 0x%02x\\n\", here.val));\n          state.mode = LIT;\n          break;\n        }\n        if (here_op & 32) {\n          //Tracevv((stderr, \"inflate:         end of block\\n\"));\n          state.back = -1;\n          state.mode = TYPE$1;\n          break;\n        }\n        if (here_op & 64) {\n          strm.msg = 'invalid literal/length code';\n          state.mode = BAD$1;\n          break;\n        }\n        state.extra = here_op & 15;\n        state.mode = LENEXT;\n        /* falls through */\n      case LENEXT:\n        if (state.extra) {\n          //=== NEEDBITS(state.extra);\n          n = state.extra;\n          while (bits < n) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n          //--- DROPBITS(state.extra) ---//\n          hold >>>= state.extra;\n          bits -= state.extra;\n          //---//\n          state.back += state.extra;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", state.length));\n        state.was = state.length;\n        state.mode = DIST;\n        /* falls through */\n      case DIST:\n        for (;;) {\n          here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if ((here_bits) <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if ((here_op & 0xf0) === 0) {\n          last_bits = here_bits;\n          last_op = here_op;\n          last_val = here_val;\n          for (;;) {\n            here = state.distcode[last_val +\n                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((last_bits + here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          //--- DROPBITS(last.bits) ---//\n          hold >>>= last_bits;\n          bits -= last_bits;\n          //---//\n          state.back += last_bits;\n        }\n        //--- DROPBITS(here.bits) ---//\n        hold >>>= here_bits;\n        bits -= here_bits;\n        //---//\n        state.back += here_bits;\n        if (here_op & 64) {\n          strm.msg = 'invalid distance code';\n          state.mode = BAD$1;\n          break;\n        }\n        state.offset = here_val;\n        state.extra = (here_op) & 15;\n        state.mode = DISTEXT;\n        /* falls through */\n      case DISTEXT:\n        if (state.extra) {\n          //=== NEEDBITS(state.extra);\n          n = state.extra;\n          while (bits < n) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n          //--- DROPBITS(state.extra) ---//\n          hold >>>= state.extra;\n          bits -= state.extra;\n          //---//\n          state.back += state.extra;\n        }\n//#ifdef INFLATE_STRICT\n        if (state.offset > state.dmax) {\n          strm.msg = 'invalid distance too far back';\n          state.mode = BAD$1;\n          break;\n        }\n//#endif\n        //Tracevv((stderr, \"inflate:         distance %u\\n\", state.offset));\n        state.mode = MATCH;\n        /* falls through */\n      case MATCH:\n        if (left === 0) { break inf_leave; }\n        copy = _out - left;\n        if (state.offset > copy) {         /* copy from window */\n          copy = state.offset - copy;\n          if (copy > state.whave) {\n            if (state.sane) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD$1;\n              break;\n            }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//          Trace((stderr, \"inflate.c too far\\n\"));\n//          copy -= state.whave;\n//          if (copy > state.length) { copy = state.length; }\n//          if (copy > left) { copy = left; }\n//          left -= copy;\n//          state.length -= copy;\n//          do {\n//            output[put++] = 0;\n//          } while (--copy);\n//          if (state.length === 0) { state.mode = LEN; }\n//          break;\n//#endif\n          }\n          if (copy > state.wnext) {\n            copy -= state.wnext;\n            from = state.wsize - copy;\n          }\n          else {\n            from = state.wnext - copy;\n          }\n          if (copy > state.length) { copy = state.length; }\n          from_source = state.window;\n        }\n        else {                              /* copy from output */\n          from_source = output;\n          from = put - state.offset;\n          copy = state.length;\n        }\n        if (copy > left) { copy = left; }\n        left -= copy;\n        state.length -= copy;\n        do {\n          output[put++] = from_source[from++];\n        } while (--copy);\n        if (state.length === 0) { state.mode = LEN; }\n        break;\n      case LIT:\n        if (left === 0) { break inf_leave; }\n        output[put++] = state.length;\n        left--;\n        state.mode = LEN;\n        break;\n      case CHECK:\n        if (state.wrap) {\n          //=== NEEDBITS(32);\n          while (bits < 32) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            // Use '|' instead of '+' to make sure that result is signed\n            hold |= input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          _out -= left;\n          strm.total_out += _out;\n          state.total += _out;\n          if (_out) {\n            strm.adler = state.check =\n                /*UPDATE(state.check, put - _out, _out);*/\n                (state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out));\n\n          }\n          _out = left;\n          // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n          if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n            strm.msg = 'incorrect data check';\n            state.mode = BAD$1;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          //Tracev((stderr, \"inflate:   check matches trailer\\n\"));\n        }\n        state.mode = LENGTH;\n        /* falls through */\n      case LENGTH:\n        if (state.wrap && state.flags) {\n          //=== NEEDBITS(32);\n          while (bits < 32) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          if (hold !== (state.total & 0xffffffff)) {\n            strm.msg = 'incorrect length check';\n            state.mode = BAD$1;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          //Tracev((stderr, \"inflate:   length matches trailer\\n\"));\n        }\n        state.mode = DONE;\n        /* falls through */\n      case DONE:\n        ret = Z_STREAM_END$2;\n        break inf_leave;\n      case BAD$1:\n        ret = Z_DATA_ERROR$1;\n        break inf_leave;\n      case MEM:\n        return Z_MEM_ERROR;\n      case SYNC:\n        /* falls through */\n      default:\n        return Z_STREAM_ERROR$1;\n    }\n  }\n\n  // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n  /*\n     Return from inflate(), updating the total counts and the check value.\n     If there was no progress during the inflate() call, return a buffer\n     error.  Call updatewindow() to create and/or update the window state.\n     Note: a memory error from inflate() is non-recoverable.\n   */\n\n  //--- RESTORE() ---\n  strm.next_out = put;\n  strm.avail_out = left;\n  strm.next_in = next;\n  strm.avail_in = have;\n  state.hold = hold;\n  state.bits = bits;\n  //---\n\n  if (state.wsize || (_out !== strm.avail_out && state.mode < BAD$1 &&\n                      (state.mode < CHECK || flush !== Z_FINISH$2))) {\n    if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;\n  }\n  _in -= strm.avail_in;\n  _out -= strm.avail_out;\n  strm.total_in += _in;\n  strm.total_out += _out;\n  state.total += _out;\n  if (state.wrap && _out) {\n    strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n      (state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out));\n  }\n  strm.data_type = state.bits + (state.last ? 64 : 0) +\n                    (state.mode === TYPE$1 ? 128 : 0) +\n                    (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n  if (((_in === 0 && _out === 0) || flush === Z_FINISH$2) && ret === Z_OK$2) {\n    ret = Z_BUF_ERROR$1;\n  }\n  return ret;\n};\n\n\nconst inflateEnd = (strm) => {\n\n  if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n    return Z_STREAM_ERROR$1;\n  }\n\n  let state = strm.state;\n  if (state.window) {\n    state.window = null;\n  }\n  strm.state = null;\n  return Z_OK$2;\n};\n\n\nconst inflateGetHeader = (strm, head) => {\n\n  /* check state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n  const state = strm.state;\n  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }\n\n  /* save header structure */\n  state.head = head;\n  head.done = false;\n  return Z_OK$2;\n};\n\n\nconst inflateSetDictionary = (strm, dictionary) => {\n  const dictLength = dictionary.length;\n\n  let state;\n  let dictid;\n  let ret;\n\n  /* check state */\n  if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR$1; }\n  state = strm.state;\n\n  if (state.wrap !== 0 && state.mode !== DICT) {\n    return Z_STREAM_ERROR$1;\n  }\n\n  /* check for correct dictionary identifier */\n  if (state.mode === DICT) {\n    dictid = 1; /* adler32(0, null, 0)*/\n    /* dictid = adler32(dictid, dictionary, dictLength); */\n    dictid = adler32_1(dictid, dictionary, dictLength, 0);\n    if (dictid !== state.check) {\n      return Z_DATA_ERROR$1;\n    }\n  }\n  /* copy dictionary to window using updatewindow(), which will amend the\n   existing dictionary if appropriate */\n  ret = updatewindow(strm, dictionary, dictLength, dictLength);\n  if (ret) {\n    state.mode = MEM;\n    return Z_MEM_ERROR;\n  }\n  state.havedict = 1;\n  // Tracev((stderr, \"inflate:   dictionary set\\n\"));\n  return Z_OK$2;\n};\n\n\nvar inflateReset_1 = inflateReset;\nvar inflateReset2_1 = inflateReset2;\nvar inflateResetKeep_1 = inflateResetKeep;\nvar inflateInit_1 = inflateInit;\nvar inflateInit2_1 = inflateInit2;\nvar inflate_2 = inflate;\nvar inflateEnd_1 = inflateEnd;\nvar inflateGetHeader_1 = inflateGetHeader;\nvar inflateSetDictionary_1 = inflateSetDictionary;\nvar inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.inflateCopy = inflateCopy;\nmodule.exports.inflateGetDictionary = inflateGetDictionary;\nmodule.exports.inflateMark = inflateMark;\nmodule.exports.inflatePrime = inflatePrime;\nmodule.exports.inflateSync = inflateSync;\nmodule.exports.inflateSyncPoint = inflateSyncPoint;\nmodule.exports.inflateUndermine = inflateUndermine;\n*/\n\nvar inflate_1 = {\n\tinflateReset: inflateReset_1,\n\tinflateReset2: inflateReset2_1,\n\tinflateResetKeep: inflateResetKeep_1,\n\tinflateInit: inflateInit_1,\n\tinflateInit2: inflateInit2_1,\n\tinflate: inflate_2,\n\tinflateEnd: inflateEnd_1,\n\tinflateGetHeader: inflateGetHeader_1,\n\tinflateSetDictionary: inflateSetDictionary_1,\n\tinflateInfo: inflateInfo\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n  /* true if compressed data believed to be text */\n  this.text       = 0;\n  /* modification time */\n  this.time       = 0;\n  /* extra flags (not used when writing a gzip file) */\n  this.xflags     = 0;\n  /* operating system */\n  this.os         = 0;\n  /* pointer to extra field or Z_NULL if none */\n  this.extra      = null;\n  /* extra field length (valid if extra != Z_NULL) */\n  this.extra_len  = 0; // Actually, we don't need it in JS,\n                       // but leave for few code modifications\n\n  //\n  // Setup limits is not necessary because in js we should not preallocate memory\n  // for inflate use constant limit in 65536 bytes\n  //\n\n  /* space at extra (only when reading header) */\n  // this.extra_max  = 0;\n  /* pointer to zero-terminated file name or Z_NULL */\n  this.name       = '';\n  /* space at name (only when reading header) */\n  // this.name_max   = 0;\n  /* pointer to zero-terminated comment or Z_NULL */\n  this.comment    = '';\n  /* space at comment (only when reading header) */\n  // this.comm_max   = 0;\n  /* true if there was or will be a header crc */\n  this.hcrc       = 0;\n  /* true when done reading gzip header (not used when writing a gzip file) */\n  this.done       = false;\n}\n\nvar gzheader = GZheader;\n\nconst toString$1 = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n  Z_NO_FLUSH: Z_NO_FLUSH$2, Z_FINISH: Z_FINISH$3,\n  Z_OK: Z_OK$3, Z_STREAM_END: Z_STREAM_END$3, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$2, Z_DATA_ERROR: Z_DATA_ERROR$2, Z_MEM_ERROR: Z_MEM_ERROR$1\n} = constants;\n\n/* ===========================================================================*/\n\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true);  // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n  this.options = common.assign({\n    chunkSize: 1024 * 64,\n    windowBits: 15,\n    to: ''\n  }, options || {});\n\n  const opt = this.options;\n\n  // Force window size for `raw` data, if not set directly,\n  // because we have no header for autodetect.\n  if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n    opt.windowBits = -opt.windowBits;\n    if (opt.windowBits === 0) { opt.windowBits = -15; }\n  }\n\n  // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n  if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n      !(options && options.windowBits)) {\n    opt.windowBits += 32;\n  }\n\n  // Gzip header has no info about windows size, we can do autodetect only\n  // for deflate. So, if window size not set, force it to max when gzip possible\n  if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n    // bit 3 (16) -> gzipped data\n    // bit 4 (32) -> autodetect gzip/deflate\n    if ((opt.windowBits & 15) === 0) {\n      opt.windowBits |= 15;\n    }\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm   = new zstream();\n  this.strm.avail_out = 0;\n\n  let status  = inflate_1.inflateInit2(\n    this.strm,\n    opt.windowBits\n  );\n\n  if (status !== Z_OK$3) {\n    throw new Error(messages[status]);\n  }\n\n  this.header = new gzheader();\n\n  inflate_1.inflateGetHeader(this.strm, this.header);\n\n  // Setup dictionary\n  if (opt.dictionary) {\n    // Convert data if needed\n    if (typeof opt.dictionary === 'string') {\n      opt.dictionary = strings.string2buf(opt.dictionary);\n    } else if (toString$1.call(opt.dictionary) === '[object ArrayBuffer]') {\n      opt.dictionary = new Uint8Array(opt.dictionary);\n    }\n    if (opt.raw) { //In raw mode we need to set the dictionary early\n      status = inflate_1.inflateSetDictionary(this.strm, opt.dictionary);\n      if (status !== Z_OK$3) {\n        throw new Error(messages[status]);\n      }\n    }\n  }\n}\n\n/**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n *   flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n *   `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, flush_mode) {\n  const strm = this.strm;\n  const chunkSize = this.options.chunkSize;\n  const dictionary = this.options.dictionary;\n  let status, _flush_mode, last_avail_out;\n\n  if (this.ended) return false;\n\n  if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n  else _flush_mode = flush_mode === true ? Z_FINISH$3 : Z_NO_FLUSH$2;\n\n  // Convert data if needed\n  if (toString$1.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  for (;;) {\n    if (strm.avail_out === 0) {\n      strm.output = new Uint8Array(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n\n    status = inflate_1.inflate(strm, _flush_mode);\n\n    if (status === Z_NEED_DICT$1 && dictionary) {\n      status = inflate_1.inflateSetDictionary(strm, dictionary);\n\n      if (status === Z_OK$3) {\n        status = inflate_1.inflate(strm, _flush_mode);\n      } else if (status === Z_DATA_ERROR$2) {\n        // Replace code with more verbose\n        status = Z_NEED_DICT$1;\n      }\n    }\n\n    // Skip snyc markers if more data follows and not raw mode\n    while (strm.avail_in > 0 &&\n           status === Z_STREAM_END$3 &&\n           strm.state.wrap > 0 &&\n           data[strm.next_in] !== 0)\n    {\n      inflate_1.inflateReset(strm);\n      status = inflate_1.inflate(strm, _flush_mode);\n    }\n\n    switch (status) {\n      case Z_STREAM_ERROR$2:\n      case Z_DATA_ERROR$2:\n      case Z_NEED_DICT$1:\n      case Z_MEM_ERROR$1:\n        this.onEnd(status);\n        this.ended = true;\n        return false;\n    }\n\n    // Remember real `avail_out` value, because we may patch out buffer content\n    // to align utf8 strings boundaries.\n    last_avail_out = strm.avail_out;\n\n    if (strm.next_out) {\n      if (strm.avail_out === 0 || status === Z_STREAM_END$3) {\n\n        if (this.options.to === 'string') {\n\n          let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n          let tail = strm.next_out - next_out_utf8;\n          let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n          // move tail & realign counters\n          strm.next_out = tail;\n          strm.avail_out = chunkSize - tail;\n          if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n          this.onData(utf8str);\n\n        } else {\n          this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n        }\n      }\n    }\n\n    // Must repeat iteration if out buffer is full\n    if (status === Z_OK$3 && last_avail_out === 0) continue;\n\n    // Finalize if end of stream reached.\n    if (status === Z_STREAM_END$3) {\n      status = inflate_1.inflateEnd(this.strm);\n      this.onEnd(status);\n      this.ended = true;\n      return true;\n    }\n\n    if (strm.avail_in === 0) break;\n  }\n\n  return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n *   each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n  // On success - join\n  if (status === Z_OK$3) {\n    if (this.options.to === 'string') {\n      this.result = this.chunks.join('');\n    } else {\n      this.result = common.flattenChunks(this.chunks);\n    }\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n *   output = pako.inflate(input);\n * } catch (err)\n *   console.log(err);\n * }\n * ```\n **/\nfunction inflate$1(input, options) {\n  const inflator = new Inflate(options);\n\n  inflator.push(input);\n\n  // That will never happens, if you don't cheat with options :)\n  if (inflator.err) throw inflator.msg || messages[inflator.err];\n\n  return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return inflate$1(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nvar Inflate_1 = Inflate;\nvar inflate_2$1 = inflate$1;\nvar inflateRaw_1 = inflateRaw;\nvar ungzip = inflate$1;\nvar constants$2 = constants;\n\nvar inflate_1$1 = {\n\tInflate: Inflate_1,\n\tinflate: inflate_2$1,\n\tinflateRaw: inflateRaw_1,\n\tungzip: ungzip,\n\tconstants: constants$2\n};\n\nconst { Deflate: Deflate$1, deflate: deflate$2, deflateRaw: deflateRaw$1, gzip: gzip$1 } = deflate_1$1;\n\nconst { Inflate: Inflate$1, inflate: inflate$2, inflateRaw: inflateRaw$1, ungzip: ungzip$1 } = inflate_1$1;\n\n\n\nvar Deflate_1$1 = Deflate$1;\nvar deflate_1$2 = deflate$2;\nvar deflateRaw_1$1 = deflateRaw$1;\nvar gzip_1$1 = gzip$1;\nvar Inflate_1$1 = Inflate$1;\nvar inflate_1$2 = inflate$2;\nvar inflateRaw_1$1 = inflateRaw$1;\nvar ungzip_1 = ungzip$1;\nvar constants_1 = constants;\n\nvar pako = {\n\tDeflate: Deflate_1$1,\n\tdeflate: deflate_1$2,\n\tdeflateRaw: deflateRaw_1$1,\n\tgzip: gzip_1$1,\n\tInflate: Inflate_1$1,\n\tinflate: inflate_1$2,\n\tinflateRaw: inflateRaw_1$1,\n\tungzip: ungzip_1,\n\tconstants: constants_1\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/pako/dist/pako.esm.mjs?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/process/browser.js":
/*!****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/process/browser.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"b\": () => (/* binding */ browser)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\nvar browser = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module) {\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ());\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] };\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/process/browser.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/safe-buffer/index.js":
/*!******************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/safe-buffer/index.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"s\": () => (/* binding */ safeBuffer)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n/* harmony import */ var _buffer_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../buffer/index.js */ \"./node_modules/@kitware/vtk.js/vendor/buffer/index.js\");\n\n\n\n/* eslint-disable node/no-deprecated-api */\n\nvar safeBuffer = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module, exports) {\nvar Buffer = _buffer_index_js__WEBPACK_IMPORTED_MODULE_1__.b.Buffer;\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n  for (var key in src) {\n    dst[key] = src[key];\n  }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n  module.exports = _buffer_index_js__WEBPACK_IMPORTED_MODULE_1__.b;\n} else {\n  // Copy properties from require('buffer')\n  copyProps(_buffer_index_js__WEBPACK_IMPORTED_MODULE_1__.b, exports);\n  exports.Buffer = SafeBuffer;\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n  return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer);\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n  if (typeof arg === 'number') {\n    throw new TypeError('Argument must not be a number')\n  }\n  return Buffer(arg, encodingOrOffset, length)\n};\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  var buf = Buffer(size);\n  if (fill !== undefined) {\n    if (typeof encoding === 'string') {\n      buf.fill(fill, encoding);\n    } else {\n      buf.fill(fill);\n    }\n  } else {\n    buf.fill(0);\n  }\n  return buf\n};\n\nSafeBuffer.allocUnsafe = function (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  return Buffer(size)\n};\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  return _buffer_index_js__WEBPACK_IMPORTED_MODULE_1__.b.SlowBuffer(size)\n};\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/safe-buffer/index.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/seedrandom/index.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/seedrandom/index.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"s\": () => (/* binding */ seedrandom)\n/* harmony export */ });\n/* harmony import */ var _lib_alea_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/alea.js */ \"./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/alea.js\");\n/* harmony import */ var _lib_xor128_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/xor128.js */ \"./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xor128.js\");\n/* harmony import */ var _lib_xorwow_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/xorwow.js */ \"./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xorwow.js\");\n/* harmony import */ var _lib_xorshift7_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/xorshift7.js */ \"./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xorshift7.js\");\n/* harmony import */ var _lib_xor4096_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/xor4096.js */ \"./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xor4096.js\");\n/* harmony import */ var _lib_tychei_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/tychei.js */ \"./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/tychei.js\");\n/* harmony import */ var _seedrandom_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./seedrandom.js */ \"./node_modules/@kitware/vtk.js/vendor/seedrandom/seedrandom.js\");\n\n\n\n\n\n\n\n\n// A library of seedable RNGs implemented in Javascript.\n//\n// Usage:\n//\n// var seedrandom = require('seedrandom');\n// var random = seedrandom(1); // or any seed.\n// var x = random();       // 0 <= x < 1.  Every bit is random.\n// var x = random.quick(); // 0 <= x < 1.  32 bits of randomness.\n\n// alea, a 53-bit multiply-with-carry generator by Johannes Baagøe.\n// Period: ~2^116\n// Reported to pass all BigCrush tests.\n\n\n// xor128, a pure xor-shift generator by George Marsaglia.\n// Period: 2^128-1.\n// Reported to fail: MatrixRank and LinearComp.\n\n\n// xorwow, George Marsaglia's 160-bit xor-shift combined plus weyl.\n// Period: 2^192-2^32\n// Reported to fail: CollisionOver, SimpPoker, and LinearComp.\n\n\n// xorshift7, by François Panneton and Pierre L'ecuyer, takes\n// a different approach: it adds robustness by allowing more shifts\n// than Marsaglia's original three.  It is a 7-shift generator\n// with 256 bits, that passes BigCrush with no systmatic failures.\n// Period 2^256-1.\n// No systematic BigCrush failures reported.\n\n\n// xor4096, by Richard Brent, is a 4096-bit xor-shift with a\n// very long period that also adds a Weyl generator. It also passes\n// BigCrush with no systematic failures.  Its long period may\n// be useful if you have many generators and need to avoid\n// collisions.\n// Period: 2^4128-2^32.\n// No systematic BigCrush failures reported.\n\n\n// Tyche-i, by Samuel Neves and Filipe Araujo, is a bit-shifting random\n// number generator derived from ChaCha, a modern stream cipher.\n// https://eden.dei.uc.pt/~sneves/pubs/2011-snfa2.pdf\n// Period: ~2^127\n// No systematic BigCrush failures reported.\n\n\n// The original ARC4-based prng included in this library.\n// Period: ~2^1600\n\n\n_seedrandom_js__WEBPACK_IMPORTED_MODULE_6__.s.alea = _lib_alea_js__WEBPACK_IMPORTED_MODULE_0__.a;\n_seedrandom_js__WEBPACK_IMPORTED_MODULE_6__.s.xor128 = _lib_xor128_js__WEBPACK_IMPORTED_MODULE_1__.x;\n_seedrandom_js__WEBPACK_IMPORTED_MODULE_6__.s.xorwow = _lib_xorwow_js__WEBPACK_IMPORTED_MODULE_2__.x;\n_seedrandom_js__WEBPACK_IMPORTED_MODULE_6__.s.xorshift7 = _lib_xorshift7_js__WEBPACK_IMPORTED_MODULE_3__.x;\n_seedrandom_js__WEBPACK_IMPORTED_MODULE_6__.s.xor4096 = _lib_xor4096_js__WEBPACK_IMPORTED_MODULE_4__.x;\n_seedrandom_js__WEBPACK_IMPORTED_MODULE_6__.s.tychei = _lib_tychei_js__WEBPACK_IMPORTED_MODULE_5__.t;\n\nvar seedrandom = _seedrandom_js__WEBPACK_IMPORTED_MODULE_6__.s;\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/seedrandom/index.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/alea.js":
/*!********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/alea.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"a\": () => (/* binding */ alea)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\nvar alea = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module) {\n// A port of an algorithm by Johannes Baagøe <baagoe@baagoe.com>, 2010\n// http://baagoe.com/en/RandomMusings/javascript/\n// https://github.com/nquinlan/better-random-numbers-for-javascript-mirror\n// Original work is under MIT license -\n\n// Copyright (C) 2010 by Johannes Baagøe <baagoe@baagoe.org>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\n\n(function(global, module, define) {\n\nfunction Alea(seed) {\n  var me = this, mash = Mash();\n\n  me.next = function() {\n    var t = 2091639 * me.s0 + me.c * 2.3283064365386963e-10; // 2^-32\n    me.s0 = me.s1;\n    me.s1 = me.s2;\n    return me.s2 = t - (me.c = t | 0);\n  };\n\n  // Apply the seeding algorithm from Baagoe.\n  me.c = 1;\n  me.s0 = mash(' ');\n  me.s1 = mash(' ');\n  me.s2 = mash(' ');\n  me.s0 -= mash(seed);\n  if (me.s0 < 0) { me.s0 += 1; }\n  me.s1 -= mash(seed);\n  if (me.s1 < 0) { me.s1 += 1; }\n  me.s2 -= mash(seed);\n  if (me.s2 < 0) { me.s2 += 1; }\n  mash = null;\n}\n\nfunction copy(f, t) {\n  t.c = f.c;\n  t.s0 = f.s0;\n  t.s1 = f.s1;\n  t.s2 = f.s2;\n  return t;\n}\n\nfunction impl(seed, opts) {\n  var xg = new Alea(seed),\n      state = opts && opts.state,\n      prng = xg.next;\n  prng.int32 = function() { return (xg.next() * 0x100000000) | 0; };\n  prng.double = function() {\n    return prng() + (prng() * 0x200000 | 0) * 1.1102230246251565e-16; // 2^-53\n  };\n  prng.quick = prng;\n  if (state) {\n    if (typeof(state) == 'object') copy(state, xg);\n    prng.state = function() { return copy(xg, {}); };\n  }\n  return prng;\n}\n\nfunction Mash() {\n  var n = 0xefc8249d;\n\n  var mash = function(data) {\n    data = String(data);\n    for (var i = 0; i < data.length; i++) {\n      n += data.charCodeAt(i);\n      var h = 0.02519603282416938 * n;\n      n = h >>> 0;\n      h -= n;\n      h *= n;\n      n = h >>> 0;\n      h -= n;\n      n += h * 0x100000000; // 2^32\n    }\n    return (n >>> 0) * 2.3283064365386963e-10; // 2^-32\n  };\n\n  return mash;\n}\n\n\nif (module && module.exports) {\n  module.exports = impl;\n} else if (define && define.amd) {\n  define(function() { return impl; });\n} else {\n  this.alea = impl;\n}\n\n})(\n  _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a,\n  module,    // present in node.js\n  (typeof undefined) == 'function'    // present with an AMD loader\n);\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/alea.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/tychei.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/tychei.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"t\": () => (/* binding */ tychei)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\nvar tychei = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module) {\n// A Javascript implementaion of the \"Tyche-i\" prng algorithm by\n// Samuel Neves and Filipe Araujo.\n// See https://eden.dei.uc.pt/~sneves/pubs/2011-snfa2.pdf\n\n(function(global, module, define) {\n\nfunction XorGen(seed) {\n  var me = this, strseed = '';\n\n  // Set up generator function.\n  me.next = function() {\n    var b = me.b, c = me.c, d = me.d, a = me.a;\n    b = (b << 25) ^ (b >>> 7) ^ c;\n    c = (c - d) | 0;\n    d = (d << 24) ^ (d >>> 8) ^ a;\n    a = (a - b) | 0;\n    me.b = b = (b << 20) ^ (b >>> 12) ^ c;\n    me.c = c = (c - d) | 0;\n    me.d = (d << 16) ^ (c >>> 16) ^ a;\n    return me.a = (a - b) | 0;\n  };\n\n  /* The following is non-inverted tyche, which has better internal\n   * bit diffusion, but which is about 25% slower than tyche-i in JS.\n  me.next = function() {\n    var a = me.a, b = me.b, c = me.c, d = me.d;\n    a = (me.a + me.b | 0) >>> 0;\n    d = me.d ^ a; d = d << 16 ^ d >>> 16;\n    c = me.c + d | 0;\n    b = me.b ^ c; b = b << 12 ^ d >>> 20;\n    me.a = a = a + b | 0;\n    d = d ^ a; me.d = d = d << 8 ^ d >>> 24;\n    me.c = c = c + d | 0;\n    b = b ^ c;\n    return me.b = (b << 7 ^ b >>> 25);\n  }\n  */\n\n  me.a = 0;\n  me.b = 0;\n  me.c = 2654435769 | 0;\n  me.d = 1367130551;\n\n  if (seed === Math.floor(seed)) {\n    // Integer seed.\n    me.a = (seed / 0x100000000) | 0;\n    me.b = seed | 0;\n  } else {\n    // String seed.\n    strseed += seed;\n  }\n\n  // Mix in string seed, then discard an initial batch of 64 values.\n  for (var k = 0; k < strseed.length + 20; k++) {\n    me.b ^= strseed.charCodeAt(k) | 0;\n    me.next();\n  }\n}\n\nfunction copy(f, t) {\n  t.a = f.a;\n  t.b = f.b;\n  t.c = f.c;\n  t.d = f.d;\n  return t;\n}\nfunction impl(seed, opts) {\n  var xg = new XorGen(seed),\n      state = opts && opts.state,\n      prng = function() { return (xg.next() >>> 0) / 0x100000000; };\n  prng.double = function() {\n    do {\n      var top = xg.next() >>> 11,\n          bot = (xg.next() >>> 0) / 0x100000000,\n          result = (top + bot) / (1 << 21);\n    } while (result === 0);\n    return result;\n  };\n  prng.int32 = xg.next;\n  prng.quick = prng;\n  if (state) {\n    if (typeof(state) == 'object') copy(state, xg);\n    prng.state = function() { return copy(xg, {}); };\n  }\n  return prng;\n}\n\nif (module && module.exports) {\n  module.exports = impl;\n} else if (define && define.amd) {\n  define(function() { return impl; });\n} else {\n  this.tychei = impl;\n}\n\n})(\n  _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a,\n  module,    // present in node.js\n  (typeof undefined) == 'function'    // present with an AMD loader\n);\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/tychei.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xor128.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xor128.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"x\": () => (/* binding */ xor128)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\nvar xor128 = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module) {\n// A Javascript implementaion of the \"xor128\" prng algorithm by\n// George Marsaglia.  See http://www.jstatsoft.org/v08/i14/paper\n\n(function(global, module, define) {\n\nfunction XorGen(seed) {\n  var me = this, strseed = '';\n\n  me.x = 0;\n  me.y = 0;\n  me.z = 0;\n  me.w = 0;\n\n  // Set up generator function.\n  me.next = function() {\n    var t = me.x ^ (me.x << 11);\n    me.x = me.y;\n    me.y = me.z;\n    me.z = me.w;\n    return me.w ^= (me.w >>> 19) ^ t ^ (t >>> 8);\n  };\n\n  if (seed === (seed | 0)) {\n    // Integer seed.\n    me.x = seed;\n  } else {\n    // String seed.\n    strseed += seed;\n  }\n\n  // Mix in string seed, then discard an initial batch of 64 values.\n  for (var k = 0; k < strseed.length + 64; k++) {\n    me.x ^= strseed.charCodeAt(k) | 0;\n    me.next();\n  }\n}\n\nfunction copy(f, t) {\n  t.x = f.x;\n  t.y = f.y;\n  t.z = f.z;\n  t.w = f.w;\n  return t;\n}\n\nfunction impl(seed, opts) {\n  var xg = new XorGen(seed),\n      state = opts && opts.state,\n      prng = function() { return (xg.next() >>> 0) / 0x100000000; };\n  prng.double = function() {\n    do {\n      var top = xg.next() >>> 11,\n          bot = (xg.next() >>> 0) / 0x100000000,\n          result = (top + bot) / (1 << 21);\n    } while (result === 0);\n    return result;\n  };\n  prng.int32 = xg.next;\n  prng.quick = prng;\n  if (state) {\n    if (typeof(state) == 'object') copy(state, xg);\n    prng.state = function() { return copy(xg, {}); };\n  }\n  return prng;\n}\n\nif (module && module.exports) {\n  module.exports = impl;\n} else if (define && define.amd) {\n  define(function() { return impl; });\n} else {\n  this.xor128 = impl;\n}\n\n})(\n  _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a,\n  module,    // present in node.js\n  (typeof undefined) == 'function'    // present with an AMD loader\n);\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xor128.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xor4096.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xor4096.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"x\": () => (/* binding */ xor4096)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\nvar xor4096 = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module) {\n// A Javascript implementaion of Richard Brent's Xorgens xor4096 algorithm.\n//\n// This fast non-cryptographic random number generator is designed for\n// use in Monte-Carlo algorithms. It combines a long-period xorshift\n// generator with a Weyl generator, and it passes all common batteries\n// of stasticial tests for randomness while consuming only a few nanoseconds\n// for each prng generated.  For background on the generator, see Brent's\n// paper: \"Some long-period random number generators using shifts and xors.\"\n// http://arxiv.org/pdf/1004.3115v1.pdf\n//\n// Usage:\n//\n// var xor4096 = require('xor4096');\n// random = xor4096(1);                        // Seed with int32 or string.\n// assert.equal(random(), 0.1520436450538547); // (0, 1) range, 53 bits.\n// assert.equal(random.int32(), 1806534897);   // signed int32, 32 bits.\n//\n// For nonzero numeric keys, this impelementation provides a sequence\n// identical to that by Brent's xorgens 3 implementaion in C.  This\n// implementation also provides for initalizing the generator with\n// string seeds, or for saving and restoring the state of the generator.\n//\n// On Chrome, this prng benchmarks about 2.1 times slower than\n// Javascript's built-in Math.random().\n\n(function(global, module, define) {\n\nfunction XorGen(seed) {\n  var me = this;\n\n  // Set up generator function.\n  me.next = function() {\n    var w = me.w,\n        X = me.X, i = me.i, t, v;\n    // Update Weyl generator.\n    me.w = w = (w + 0x61c88647) | 0;\n    // Update xor generator.\n    v = X[(i + 34) & 127];\n    t = X[i = ((i + 1) & 127)];\n    v ^= v << 13;\n    t ^= t << 17;\n    v ^= v >>> 15;\n    t ^= t >>> 12;\n    // Update Xor generator array state.\n    v = X[i] = v ^ t;\n    me.i = i;\n    // Result is the combination.\n    return (v + (w ^ (w >>> 16))) | 0;\n  };\n\n  function init(me, seed) {\n    var t, v, i, j, w, X = [], limit = 128;\n    if (seed === (seed | 0)) {\n      // Numeric seeds initialize v, which is used to generates X.\n      v = seed;\n      seed = null;\n    } else {\n      // String seeds are mixed into v and X one character at a time.\n      seed = seed + '\\0';\n      v = 0;\n      limit = Math.max(limit, seed.length);\n    }\n    // Initialize circular array and weyl value.\n    for (i = 0, j = -32; j < limit; ++j) {\n      // Put the unicode characters into the array, and shuffle them.\n      if (seed) v ^= seed.charCodeAt((j + 32) % seed.length);\n      // After 32 shuffles, take v as the starting w value.\n      if (j === 0) w = v;\n      v ^= v << 10;\n      v ^= v >>> 15;\n      v ^= v << 4;\n      v ^= v >>> 13;\n      if (j >= 0) {\n        w = (w + 0x61c88647) | 0;     // Weyl.\n        t = (X[j & 127] ^= (v + w));  // Combine xor and weyl to init array.\n        i = (0 == t) ? i + 1 : 0;     // Count zeroes.\n      }\n    }\n    // We have detected all zeroes; make the key nonzero.\n    if (i >= 128) {\n      X[(seed && seed.length || 0) & 127] = -1;\n    }\n    // Run the generator 512 times to further mix the state before using it.\n    // Factoring this as a function slows the main generator, so it is just\n    // unrolled here.  The weyl generator is not advanced while warming up.\n    i = 127;\n    for (j = 4 * 128; j > 0; --j) {\n      v = X[(i + 34) & 127];\n      t = X[i = ((i + 1) & 127)];\n      v ^= v << 13;\n      t ^= t << 17;\n      v ^= v >>> 15;\n      t ^= t >>> 12;\n      X[i] = v ^ t;\n    }\n    // Storing state as object members is faster than using closure variables.\n    me.w = w;\n    me.X = X;\n    me.i = i;\n  }\n\n  init(me, seed);\n}\n\nfunction copy(f, t) {\n  t.i = f.i;\n  t.w = f.w;\n  t.X = f.X.slice();\n  return t;\n}\nfunction impl(seed, opts) {\n  if (seed == null) seed = +(new Date);\n  var xg = new XorGen(seed),\n      state = opts && opts.state,\n      prng = function() { return (xg.next() >>> 0) / 0x100000000; };\n  prng.double = function() {\n    do {\n      var top = xg.next() >>> 11,\n          bot = (xg.next() >>> 0) / 0x100000000,\n          result = (top + bot) / (1 << 21);\n    } while (result === 0);\n    return result;\n  };\n  prng.int32 = xg.next;\n  prng.quick = prng;\n  if (state) {\n    if (state.X) copy(state, xg);\n    prng.state = function() { return copy(xg, {}); };\n  }\n  return prng;\n}\n\nif (module && module.exports) {\n  module.exports = impl;\n} else if (define && define.amd) {\n  define(function() { return impl; });\n} else {\n  this.xor4096 = impl;\n}\n\n})(\n  _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a,                                     // window object or global\n  module,    // present in node.js\n  (typeof undefined) == 'function'    // present with an AMD loader\n);\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xor4096.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xorshift7.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xorshift7.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"x\": () => (/* binding */ xorshift7)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\nvar xorshift7 = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module) {\n// A Javascript implementaion of the \"xorshift7\" algorithm by\n// François Panneton and Pierre L'ecuyer:\n// \"On the Xorgshift Random Number Generators\"\n// http://saluc.engr.uconn.edu/refs/crypto/rng/panneton05onthexorshift.pdf\n\n(function(global, module, define) {\n\nfunction XorGen(seed) {\n  var me = this;\n\n  // Set up generator function.\n  me.next = function() {\n    // Update xor generator.\n    var X = me.x, i = me.i, t, v;\n    t = X[i]; t ^= (t >>> 7); v = t ^ (t << 24);\n    t = X[(i + 1) & 7]; v ^= t ^ (t >>> 10);\n    t = X[(i + 3) & 7]; v ^= t ^ (t >>> 3);\n    t = X[(i + 4) & 7]; v ^= t ^ (t << 7);\n    t = X[(i + 7) & 7]; t = t ^ (t << 13); v ^= t ^ (t << 9);\n    X[i] = v;\n    me.i = (i + 1) & 7;\n    return v;\n  };\n\n  function init(me, seed) {\n    var j, X = [];\n\n    if (seed === (seed | 0)) {\n      // Seed state array using a 32-bit integer.\n      X[0] = seed;\n    } else {\n      // Seed state using a string.\n      seed = '' + seed;\n      for (j = 0; j < seed.length; ++j) {\n        X[j & 7] = (X[j & 7] << 15) ^\n            (seed.charCodeAt(j) + X[(j + 1) & 7] << 13);\n      }\n    }\n    // Enforce an array length of 8, not all zeroes.\n    while (X.length < 8) X.push(0);\n    for (j = 0; j < 8 && X[j] === 0; ++j);\n    if (j == 8) X[7] = -1;\n\n    me.x = X;\n    me.i = 0;\n\n    // Discard an initial 256 values.\n    for (j = 256; j > 0; --j) {\n      me.next();\n    }\n  }\n\n  init(me, seed);\n}\n\nfunction copy(f, t) {\n  t.x = f.x.slice();\n  t.i = f.i;\n  return t;\n}\n\nfunction impl(seed, opts) {\n  if (seed == null) seed = +(new Date);\n  var xg = new XorGen(seed),\n      state = opts && opts.state,\n      prng = function() { return (xg.next() >>> 0) / 0x100000000; };\n  prng.double = function() {\n    do {\n      var top = xg.next() >>> 11,\n          bot = (xg.next() >>> 0) / 0x100000000,\n          result = (top + bot) / (1 << 21);\n    } while (result === 0);\n    return result;\n  };\n  prng.int32 = xg.next;\n  prng.quick = prng;\n  if (state) {\n    if (state.x) copy(state, xg);\n    prng.state = function() { return copy(xg, {}); };\n  }\n  return prng;\n}\n\nif (module && module.exports) {\n  module.exports = impl;\n} else if (define && define.amd) {\n  define(function() { return impl; });\n} else {\n  this.xorshift7 = impl;\n}\n\n})(\n  _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a,\n  module,    // present in node.js\n  (typeof undefined) == 'function'    // present with an AMD loader\n);\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xorshift7.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xorwow.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xorwow.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"x\": () => (/* binding */ xorwow)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n\n\nvar xorwow = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module) {\n// A Javascript implementaion of the \"xorwow\" prng algorithm by\n// George Marsaglia.  See http://www.jstatsoft.org/v08/i14/paper\n\n(function(global, module, define) {\n\nfunction XorGen(seed) {\n  var me = this, strseed = '';\n\n  // Set up generator function.\n  me.next = function() {\n    var t = (me.x ^ (me.x >>> 2));\n    me.x = me.y; me.y = me.z; me.z = me.w; me.w = me.v;\n    return (me.d = (me.d + 362437 | 0)) +\n       (me.v = (me.v ^ (me.v << 4)) ^ (t ^ (t << 1))) | 0;\n  };\n\n  me.x = 0;\n  me.y = 0;\n  me.z = 0;\n  me.w = 0;\n  me.v = 0;\n\n  if (seed === (seed | 0)) {\n    // Integer seed.\n    me.x = seed;\n  } else {\n    // String seed.\n    strseed += seed;\n  }\n\n  // Mix in string seed, then discard an initial batch of 64 values.\n  for (var k = 0; k < strseed.length + 64; k++) {\n    me.x ^= strseed.charCodeAt(k) | 0;\n    if (k == strseed.length) {\n      me.d = me.x << 10 ^ me.x >>> 4;\n    }\n    me.next();\n  }\n}\n\nfunction copy(f, t) {\n  t.x = f.x;\n  t.y = f.y;\n  t.z = f.z;\n  t.w = f.w;\n  t.v = f.v;\n  t.d = f.d;\n  return t;\n}\n\nfunction impl(seed, opts) {\n  var xg = new XorGen(seed),\n      state = opts && opts.state,\n      prng = function() { return (xg.next() >>> 0) / 0x100000000; };\n  prng.double = function() {\n    do {\n      var top = xg.next() >>> 11,\n          bot = (xg.next() >>> 0) / 0x100000000,\n          result = (top + bot) / (1 << 21);\n    } while (result === 0);\n    return result;\n  };\n  prng.int32 = xg.next;\n  prng.quick = prng;\n  if (state) {\n    if (typeof(state) == 'object') copy(state, xg);\n    prng.state = function() { return copy(xg, {}); };\n  }\n  return prng;\n}\n\nif (module && module.exports) {\n  module.exports = impl;\n} else if (define && define.amd) {\n  define(function() { return impl; });\n} else {\n  this.xorwow = impl;\n}\n\n})(\n  _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a,\n  module,    // present in node.js\n  (typeof undefined) == 'function'    // present with an AMD loader\n);\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/seedrandom/lib/xorwow.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/seedrandom/seedrandom.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/seedrandom/seedrandom.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"s\": () => (/* binding */ seedrandom)\n/* harmony export */ });\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n/* harmony import */ var _virtual_rollup_plugin_ignore_empty_module_placeholder_commonjs_proxy_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../_virtual/_rollup_plugin_ignore_empty_module_placeholder_commonjs-proxy.js */ \"./node_modules/@kitware/vtk.js/_virtual/_rollup_plugin_ignore_empty_module_placeholder_commonjs-proxy.js\");\n\n\n\n/*\nCopyright 2019 David Bau.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n*/\n\nvar seedrandom = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.c)(function (module) {\n(function (global, pool, math) {\n//\n// The following constants are related to IEEE 754 limits.\n//\n\nvar width = 256,        // each RC4 output is 0 <= x < 256\n    chunks = 6,         // at least six RC4 outputs for each double\n    digits = 52,        // there are 52 significant digits in a double\n    rngname = 'random', // rngname: name for Math.random and Math.seedrandom\n    startdenom = math.pow(width, chunks),\n    significance = math.pow(2, digits),\n    overflow = significance * 2,\n    mask = width - 1,\n    nodecrypto;         // node.js crypto module, initialized at the bottom.\n\n//\n// seedrandom()\n// This is the seedrandom function described above.\n//\nfunction seedrandom(seed, options, callback) {\n  var key = [];\n  options = (options == true) ? { entropy: true } : (options || {});\n\n  // Flatten the seed string or build one from local entropy if needed.\n  var shortseed = mixkey(flatten(\n    options.entropy ? [seed, tostring(pool)] :\n    (seed == null) ? autoseed() : seed, 3), key);\n\n  // Use the seed to initialize an ARC4 generator.\n  var arc4 = new ARC4(key);\n\n  // This function returns a random double in [0, 1) that contains\n  // randomness in every bit of the mantissa of the IEEE 754 value.\n  var prng = function() {\n    var n = arc4.g(chunks),             // Start with a numerator n < 2 ^ 48\n        d = startdenom,                 //   and denominator d = 2 ^ 48.\n        x = 0;                          //   and no 'extra last byte'.\n    while (n < significance) {          // Fill up all significant digits by\n      n = (n + x) * width;              //   shifting numerator and\n      d *= width;                       //   denominator and generating a\n      x = arc4.g(1);                    //   new least-significant-byte.\n    }\n    while (n >= overflow) {             // To avoid rounding up, before adding\n      n /= 2;                           //   last byte, shift everything\n      d /= 2;                           //   right using integer math until\n      x >>>= 1;                         //   we have exactly the desired bits.\n    }\n    return (n + x) / d;                 // Form the number within [0, 1).\n  };\n\n  prng.int32 = function() { return arc4.g(4) | 0; };\n  prng.quick = function() { return arc4.g(4) / 0x100000000; };\n  prng.double = prng;\n\n  // Mix the randomness into accumulated entropy.\n  mixkey(tostring(arc4.S), pool);\n\n  // Calling convention: what to return as a function of prng, seed, is_math.\n  return (options.pass || callback ||\n      function(prng, seed, is_math_call, state) {\n        if (state) {\n          // Load the arc4 state from the given state if it has an S array.\n          if (state.S) { copy(state, arc4); }\n          // Only provide the .state method if requested via options.state.\n          prng.state = function() { return copy(arc4, {}); };\n        }\n\n        // If called as a method of Math (Math.seedrandom()), mutate\n        // Math.random because that is how seedrandom.js has worked since v1.0.\n        if (is_math_call) { math[rngname] = prng; return seed; }\n\n        // Otherwise, it is a newer calling convention, so return the\n        // prng directly.\n        else return prng;\n      })(\n  prng,\n  shortseed,\n  'global' in options ? options.global : (this == math),\n  options.state);\n}\n\n//\n// ARC4\n//\n// An ARC4 implementation.  The constructor takes a key in the form of\n// an array of at most (width) integers that should be 0 <= x < (width).\n//\n// The g(count) method returns a pseudorandom integer that concatenates\n// the next (count) outputs from ARC4.  Its return value is a number x\n// that is in the range 0 <= x < (width ^ count).\n//\nfunction ARC4(key) {\n  var t, keylen = key.length,\n      me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];\n\n  // The empty key [] is treated as [0].\n  if (!keylen) { key = [keylen++]; }\n\n  // Set up S using the standard key scheduling algorithm.\n  while (i < width) {\n    s[i] = i++;\n  }\n  for (i = 0; i < width; i++) {\n    s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];\n    s[j] = t;\n  }\n\n  // The \"g\" method returns the next (count) outputs as one number.\n  (me.g = function(count) {\n    // Using instance members instead of closure state nearly doubles speed.\n    var t, r = 0,\n        i = me.i, j = me.j, s = me.S;\n    while (count--) {\n      t = s[i = mask & (i + 1)];\n      r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];\n    }\n    me.i = i; me.j = j;\n    return r;\n    // For robust unpredictability, the function call below automatically\n    // discards an initial batch of values.  This is called RC4-drop[256].\n    // See http://google.com/search?q=rsa+fluhrer+response&btnI\n  })(width);\n}\n\n//\n// copy()\n// Copies internal state of ARC4 to or from a plain object.\n//\nfunction copy(f, t) {\n  t.i = f.i;\n  t.j = f.j;\n  t.S = f.S.slice();\n  return t;\n}\n//\n// flatten()\n// Converts an object tree to nested arrays of strings.\n//\nfunction flatten(obj, depth) {\n  var result = [], typ = (typeof obj), prop;\n  if (depth && typ == 'object') {\n    for (prop in obj) {\n      try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}\n    }\n  }\n  return (result.length ? result : typ == 'string' ? obj : obj + '\\0');\n}\n\n//\n// mixkey()\n// Mixes a string seed into a key that is an array of integers, and\n// returns a shortened string seed that is equivalent to the result key.\n//\nfunction mixkey(seed, key) {\n  var stringseed = seed + '', smear, j = 0;\n  while (j < stringseed.length) {\n    key[mask & j] =\n      mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));\n  }\n  return tostring(key);\n}\n\n//\n// autoseed()\n// Returns an object for autoseeding, using window.crypto and Node crypto\n// module if available.\n//\nfunction autoseed() {\n  try {\n    var out;\n    if (nodecrypto && (out = nodecrypto.randomBytes)) {\n      // The use of 'out' to remember randomBytes makes tight minified code.\n      out = out(width);\n    } else {\n      out = new Uint8Array(width);\n      (global.crypto || global.msCrypto).getRandomValues(out);\n    }\n    return tostring(out);\n  } catch (e) {\n    var browser = global.navigator,\n        plugins = browser && browser.plugins;\n    return [+new Date, global, plugins, global.screen, tostring(pool)];\n  }\n}\n\n//\n// tostring()\n// Converts an array of charcodes to a string\n//\nfunction tostring(a) {\n  return String.fromCharCode.apply(0, a);\n}\n\n//\n// When seedrandom.js is loaded, we immediately mix a few bits\n// from the built-in RNG into the entropy pool.  Because we do\n// not want to interfere with deterministic PRNG state later,\n// seedrandom will not call math.random on its own again after\n// initialization.\n//\nmixkey(math.random(), pool);\n\n//\n// Nodejs and AMD support: export the implementation as a module using\n// either convention.\n//\nif (module.exports) {\n  module.exports = seedrandom;\n  // When in node.js, try using crypto package for autoseeding.\n  try {\n    nodecrypto = _virtual_rollup_plugin_ignore_empty_module_placeholder_commonjs_proxy_js__WEBPACK_IMPORTED_MODULE_1__.r;\n  } catch (ex) {}\n} else {\n  // When included as a plain script, set up Math.seedrandom global.\n  math['seed' + rngname] = seedrandom;\n}\n\n\n// End anonymous scope, and pass initial values.\n})(\n  // global: `self` in browsers (including strict mode and web workers),\n  // otherwise `this` in Node and other environments\n  (typeof self !== 'undefined') ? self : _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_0__.a,\n  [],     // pool: entropy pool starts empty\n  Math    // math: package containing random, pow, and seedrandom\n);\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/seedrandom/seedrandom.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/set-immediate-shim/index.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/set-immediate-shim/index.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"s\": () => (/* binding */ setImmediateShim)\n/* harmony export */ });\nvar setImmediateShim = typeof setImmediate === 'function' ? setImmediate :\n\tfunction setImmediate() {\n\t\tvar args = [].slice.apply(arguments);\n\t\targs.splice(1, 0, 0);\n\t\tsetTimeout.apply(null, args);\n\t};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/set-immediate-shim/index.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/string_decoder/lib/string_decoder.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/string_decoder/lib/string_decoder.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"S\": () => (/* binding */ StringDecoder_1)\n/* harmony export */ });\n/* harmony import */ var _safe_buffer_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../safe-buffer/index.js */ \"./node_modules/@kitware/vtk.js/vendor/safe-buffer/index.js\");\n\n\n/*<replacement>*/\n\nvar Buffer = _safe_buffer_index_js__WEBPACK_IMPORTED_MODULE_0__.s.Buffer;\n/*</replacement>*/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n  encoding = '' + encoding;\n  switch (encoding && encoding.toLowerCase()) {\n    case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n      return true;\n    default:\n      return false;\n  }\n};\n\nfunction _normalizeEncoding(enc) {\n  if (!enc) return 'utf8';\n  var retried;\n  while (true) {\n    switch (enc) {\n      case 'utf8':\n      case 'utf-8':\n        return 'utf8';\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return 'utf16le';\n      case 'latin1':\n      case 'binary':\n        return 'latin1';\n      case 'base64':\n      case 'ascii':\n      case 'hex':\n        return enc;\n      default:\n        if (retried) return; // undefined\n        enc = ('' + enc).toLowerCase();\n        retried = true;\n    }\n  }\n}\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n  var nenc = _normalizeEncoding(enc);\n  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n  return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nvar StringDecoder_1 = StringDecoder;\nfunction StringDecoder(encoding) {\n  this.encoding = normalizeEncoding(encoding);\n  var nb;\n  switch (this.encoding) {\n    case 'utf16le':\n      this.text = utf16Text;\n      this.end = utf16End;\n      nb = 4;\n      break;\n    case 'utf8':\n      this.fillLast = utf8FillLast;\n      nb = 4;\n      break;\n    case 'base64':\n      this.text = base64Text;\n      this.end = base64End;\n      nb = 3;\n      break;\n    default:\n      this.write = simpleWrite;\n      this.end = simpleEnd;\n      return;\n  }\n  this.lastNeed = 0;\n  this.lastTotal = 0;\n  this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n  if (buf.length === 0) return '';\n  var r;\n  var i;\n  if (this.lastNeed) {\n    r = this.fillLast(buf);\n    if (r === undefined) return '';\n    i = this.lastNeed;\n    this.lastNeed = 0;\n  } else {\n    i = 0;\n  }\n  if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n  return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n  if (this.lastNeed <= buf.length) {\n    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n  }\n  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n  this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n  if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n  return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n  var j = buf.length - 1;\n  if (j < i) return 0;\n  var nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) self.lastNeed = nb - 1;\n    return nb;\n  }\n  if (--j < i || nb === -2) return 0;\n  nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) self.lastNeed = nb - 2;\n    return nb;\n  }\n  if (--j < i || nb === -2) return 0;\n  nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) {\n      if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n    }\n    return nb;\n  }\n  return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n  if ((buf[0] & 0xC0) !== 0x80) {\n    self.lastNeed = 0;\n    return '\\ufffd';\n  }\n  if (self.lastNeed > 1 && buf.length > 1) {\n    if ((buf[1] & 0xC0) !== 0x80) {\n      self.lastNeed = 1;\n      return '\\ufffd';\n    }\n    if (self.lastNeed > 2 && buf.length > 2) {\n      if ((buf[2] & 0xC0) !== 0x80) {\n        self.lastNeed = 2;\n        return '\\ufffd';\n      }\n    }\n  }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n  var p = this.lastTotal - this.lastNeed;\n  var r = utf8CheckExtraBytes(this, buf);\n  if (r !== undefined) return r;\n  if (this.lastNeed <= buf.length) {\n    buf.copy(this.lastChar, p, 0, this.lastNeed);\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n  }\n  buf.copy(this.lastChar, p, 0, buf.length);\n  this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n  var total = utf8CheckIncomplete(this, buf, i);\n  if (!this.lastNeed) return buf.toString('utf8', i);\n  this.lastTotal = total;\n  var end = buf.length - (total - this.lastNeed);\n  buf.copy(this.lastChar, 0, end);\n  return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) return r + '\\ufffd';\n  return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n  if ((buf.length - i) % 2 === 0) {\n    var r = buf.toString('utf16le', i);\n    if (r) {\n      var c = r.charCodeAt(r.length - 1);\n      if (c >= 0xD800 && c <= 0xDBFF) {\n        this.lastNeed = 2;\n        this.lastTotal = 4;\n        this.lastChar[0] = buf[buf.length - 2];\n        this.lastChar[1] = buf[buf.length - 1];\n        return r.slice(0, -1);\n      }\n    }\n    return r;\n  }\n  this.lastNeed = 1;\n  this.lastTotal = 2;\n  this.lastChar[0] = buf[buf.length - 1];\n  return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) {\n    var end = this.lastTotal - this.lastNeed;\n    return r + this.lastChar.toString('utf16le', 0, end);\n  }\n  return r;\n}\n\nfunction base64Text(buf, i) {\n  var n = (buf.length - i) % 3;\n  if (n === 0) return buf.toString('base64', i);\n  this.lastNeed = 3 - n;\n  this.lastTotal = 3;\n  if (n === 1) {\n    this.lastChar[0] = buf[buf.length - 1];\n  } else {\n    this.lastChar[0] = buf[buf.length - 2];\n    this.lastChar[1] = buf[buf.length - 1];\n  }\n  return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n  return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n  return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n  return buf && buf.length ? this.write(buf) : '';\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/string_decoder/lib/string_decoder.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/style-inject/dist/style-inject.es.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/style-inject/dist/style-inject.es.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"s\": () => (/* binding */ styleInject)\n/* harmony export */ });\nfunction styleInject(css, ref) {\n  if ( ref === void 0 ) ref = {};\n  var insertAt = ref.insertAt;\n\n  if (!css || typeof document === 'undefined') { return; }\n\n  var head = document.head || document.getElementsByTagName('head')[0];\n  var style = document.createElement('style');\n  style.type = 'text/css';\n\n  if (insertAt === 'top') {\n    if (head.firstChild) {\n      head.insertBefore(style, head.firstChild);\n    } else {\n      head.appendChild(style);\n    }\n  } else {\n    head.appendChild(style);\n  }\n\n  if (style.styleSheet) {\n    style.styleSheet.cssText = css;\n  } else {\n    style.appendChild(document.createTextNode(css));\n  }\n}\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/style-inject/dist/style-inject.es.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/util/support/isBufferBrowser.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/util/support/isBufferBrowser.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"i\": () => (/* binding */ isBufferBrowser)\n/* harmony export */ });\nvar isBufferBrowser = function isBuffer(arg) {\n  return arg && typeof arg === 'object'\n    && typeof arg.copy === 'function'\n    && typeof arg.fill === 'function'\n    && typeof arg.readUInt8 === 'function';\n};\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/util/support/isBufferBrowser.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vendor/util/util.js":
/*!**********************************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vendor/util/util.js ***!
  \**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"u\": () => (/* binding */ util)\n/* harmony export */ });\n/* harmony import */ var _virtual_polyfill_node_process_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../_virtual/polyfill-node_process.js */ \"./node_modules/@kitware/vtk.js/_virtual/polyfill-node_process.js\");\n/* harmony import */ var _virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../_virtual/commonjsHelpers.js */ \"./node_modules/@kitware/vtk.js/_virtual/commonjsHelpers.js\");\n/* harmony import */ var _support_isBufferBrowser_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./support/isBufferBrowser.js */ \"./node_modules/@kitware/vtk.js/vendor/util/support/isBufferBrowser.js\");\n/* harmony import */ var _inherits_inherits_browser_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inherits/inherits_browser.js */ \"./node_modules/@kitware/vtk.js/vendor/inherits/inherits_browser.js\");\n\n\n\n\n\nvar util = (0,_virtual_commonjsHelpers_js__WEBPACK_IMPORTED_MODULE_1__.c)(function (module, exports) {\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n  function getOwnPropertyDescriptors(obj) {\n    var keys = Object.keys(obj);\n    var descriptors = {};\n    for (var i = 0; i < keys.length; i++) {\n      descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n    }\n    return descriptors;\n  };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n  if (!isString(f)) {\n    var objects = [];\n    for (var i = 0; i < arguments.length; i++) {\n      objects.push(inspect(arguments[i]));\n    }\n    return objects.join(' ');\n  }\n\n  var i = 1;\n  var args = arguments;\n  var len = args.length;\n  var str = String(f).replace(formatRegExp, function(x) {\n    if (x === '%%') return '%';\n    if (i >= len) return x;\n    switch (x) {\n      case '%s': return String(args[i++]);\n      case '%d': return Number(args[i++]);\n      case '%j':\n        try {\n          return JSON.stringify(args[i++]);\n        } catch (_) {\n          return '[Circular]';\n        }\n      default:\n        return x;\n    }\n  });\n  for (var x = args[i]; i < len; x = args[++i]) {\n    if (isNull(x) || !isObject(x)) {\n      str += ' ' + x;\n    } else {\n      str += ' ' + inspect(x);\n    }\n  }\n  return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n  if (typeof _virtual_polyfill_node_process_js__WEBPACK_IMPORTED_MODULE_0__.b !== 'undefined' && _virtual_polyfill_node_process_js__WEBPACK_IMPORTED_MODULE_0__.b.noDeprecation === true) {\n    return fn;\n  }\n\n  // Allow for deprecating things in the process of starting up.\n  if (typeof _virtual_polyfill_node_process_js__WEBPACK_IMPORTED_MODULE_0__.b === 'undefined') {\n    return function() {\n      return exports.deprecate(fn, msg).apply(this, arguments);\n    };\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      {\n        console.error(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n  if (isUndefined(debugEnviron))\n    debugEnviron = '';\n  set = set.toUpperCase();\n  if (!debugs[set]) {\n    if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n      var pid = _virtual_polyfill_node_process_js__WEBPACK_IMPORTED_MODULE_0__.b.pid;\n      debugs[set] = function() {\n        var msg = exports.format.apply(exports, arguments);\n        console.error('%s %d: %s', set, pid, msg);\n      };\n    } else {\n      debugs[set] = function() {};\n    }\n  }\n  return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n  // default options\n  var ctx = {\n    seen: [],\n    stylize: stylizeNoColor\n  };\n  // legacy...\n  if (arguments.length >= 3) ctx.depth = arguments[2];\n  if (arguments.length >= 4) ctx.colors = arguments[3];\n  if (isBoolean(opts)) {\n    // legacy...\n    ctx.showHidden = opts;\n  } else if (opts) {\n    // got an \"options\" object\n    exports._extend(ctx, opts);\n  }\n  // set default options\n  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n  if (isUndefined(ctx.depth)) ctx.depth = 2;\n  if (isUndefined(ctx.colors)) ctx.colors = false;\n  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n  if (ctx.colors) ctx.stylize = stylizeWithColor;\n  return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n  'bold' : [1, 22],\n  'italic' : [3, 23],\n  'underline' : [4, 24],\n  'inverse' : [7, 27],\n  'white' : [37, 39],\n  'grey' : [90, 39],\n  'black' : [30, 39],\n  'blue' : [34, 39],\n  'cyan' : [36, 39],\n  'green' : [32, 39],\n  'magenta' : [35, 39],\n  'red' : [31, 39],\n  'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n  'special': 'cyan',\n  'number': 'yellow',\n  'boolean': 'yellow',\n  'undefined': 'grey',\n  'null': 'bold',\n  'string': 'green',\n  'date': 'magenta',\n  // \"name\": intentionally not styling\n  'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n  var style = inspect.styles[styleType];\n\n  if (style) {\n    return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n           '\\u001b[' + inspect.colors[style][1] + 'm';\n  } else {\n    return str;\n  }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n  return str;\n}\n\n\nfunction arrayToHash(array) {\n  var hash = {};\n\n  array.forEach(function(val, idx) {\n    hash[val] = true;\n  });\n\n  return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n  // Provide a hook for user-specified inspect functions.\n  // Check that value is an object with an inspect function on it\n  if (ctx.customInspect &&\n      value &&\n      isFunction(value.inspect) &&\n      // Filter out the util module, it's inspect function is special\n      value.inspect !== exports.inspect &&\n      // Also filter out any prototype objects using the circular check.\n      !(value.constructor && value.constructor.prototype === value)) {\n    var ret = value.inspect(recurseTimes, ctx);\n    if (!isString(ret)) {\n      ret = formatValue(ctx, ret, recurseTimes);\n    }\n    return ret;\n  }\n\n  // Primitive types cannot have properties\n  var primitive = formatPrimitive(ctx, value);\n  if (primitive) {\n    return primitive;\n  }\n\n  // Look up the keys of the object.\n  var keys = Object.keys(value);\n  var visibleKeys = arrayToHash(keys);\n\n  if (ctx.showHidden) {\n    keys = Object.getOwnPropertyNames(value);\n  }\n\n  // IE doesn't make error fields non-enumerable\n  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n  if (isError(value)\n      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n    return formatError(value);\n  }\n\n  // Some type of object without properties can be shortcutted.\n  if (keys.length === 0) {\n    if (isFunction(value)) {\n      var name = value.name ? ': ' + value.name : '';\n      return ctx.stylize('[Function' + name + ']', 'special');\n    }\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    }\n    if (isDate(value)) {\n      return ctx.stylize(Date.prototype.toString.call(value), 'date');\n    }\n    if (isError(value)) {\n      return formatError(value);\n    }\n  }\n\n  var base = '', array = false, braces = ['{', '}'];\n\n  // Make Array say that they are Array\n  if (isArray(value)) {\n    array = true;\n    braces = ['[', ']'];\n  }\n\n  // Make functions say that they are functions\n  if (isFunction(value)) {\n    var n = value.name ? ': ' + value.name : '';\n    base = ' [Function' + n + ']';\n  }\n\n  // Make RegExps say that they are RegExps\n  if (isRegExp(value)) {\n    base = ' ' + RegExp.prototype.toString.call(value);\n  }\n\n  // Make dates with properties first say the date\n  if (isDate(value)) {\n    base = ' ' + Date.prototype.toUTCString.call(value);\n  }\n\n  // Make error with message first say the error\n  if (isError(value)) {\n    base = ' ' + formatError(value);\n  }\n\n  if (keys.length === 0 && (!array || value.length == 0)) {\n    return braces[0] + base + braces[1];\n  }\n\n  if (recurseTimes < 0) {\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    } else {\n      return ctx.stylize('[Object]', 'special');\n    }\n  }\n\n  ctx.seen.push(value);\n\n  var output;\n  if (array) {\n    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n  } else {\n    output = keys.map(function(key) {\n      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n    });\n  }\n\n  ctx.seen.pop();\n\n  return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n  if (isUndefined(value))\n    return ctx.stylize('undefined', 'undefined');\n  if (isString(value)) {\n    var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n                                             .replace(/'/g, \"\\\\'\")\n                                             .replace(/\\\\\"/g, '\"') + '\\'';\n    return ctx.stylize(simple, 'string');\n  }\n  if (isNumber(value))\n    return ctx.stylize('' + value, 'number');\n  if (isBoolean(value))\n    return ctx.stylize('' + value, 'boolean');\n  // For some reason typeof null is \"object\", so special case here.\n  if (isNull(value))\n    return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n  return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n  var output = [];\n  for (var i = 0, l = value.length; i < l; ++i) {\n    if (hasOwnProperty(value, String(i))) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          String(i), true));\n    } else {\n      output.push('');\n    }\n  }\n  keys.forEach(function(key) {\n    if (!key.match(/^\\d+$/)) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          key, true));\n    }\n  });\n  return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n  var name, str, desc;\n  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n  if (desc.get) {\n    if (desc.set) {\n      str = ctx.stylize('[Getter/Setter]', 'special');\n    } else {\n      str = ctx.stylize('[Getter]', 'special');\n    }\n  } else {\n    if (desc.set) {\n      str = ctx.stylize('[Setter]', 'special');\n    }\n  }\n  if (!hasOwnProperty(visibleKeys, key)) {\n    name = '[' + key + ']';\n  }\n  if (!str) {\n    if (ctx.seen.indexOf(desc.value) < 0) {\n      if (isNull(recurseTimes)) {\n        str = formatValue(ctx, desc.value, null);\n      } else {\n        str = formatValue(ctx, desc.value, recurseTimes - 1);\n      }\n      if (str.indexOf('\\n') > -1) {\n        if (array) {\n          str = str.split('\\n').map(function(line) {\n            return '  ' + line;\n          }).join('\\n').substr(2);\n        } else {\n          str = '\\n' + str.split('\\n').map(function(line) {\n            return '   ' + line;\n          }).join('\\n');\n        }\n      }\n    } else {\n      str = ctx.stylize('[Circular]', 'special');\n    }\n  }\n  if (isUndefined(name)) {\n    if (array && key.match(/^\\d+$/)) {\n      return str;\n    }\n    name = JSON.stringify('' + key);\n    if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n      name = name.substr(1, name.length - 2);\n      name = ctx.stylize(name, 'name');\n    } else {\n      name = name.replace(/'/g, \"\\\\'\")\n                 .replace(/\\\\\"/g, '\"')\n                 .replace(/(^\"|\"$)/g, \"'\");\n      name = ctx.stylize(name, 'string');\n    }\n  }\n\n  return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n  var length = output.reduce(function(prev, cur) {\n    if (cur.indexOf('\\n') >= 0) ;\n    return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n  }, 0);\n\n  if (length > 60) {\n    return braces[0] +\n           (base === '' ? '' : base + '\\n ') +\n           ' ' +\n           output.join(',\\n  ') +\n           ' ' +\n           braces[1];\n  }\n\n  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n  return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n  return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n  return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n  return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n  return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n  return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n  return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n  return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n  return isObject(e) &&\n      (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n  return arg === null ||\n         typeof arg === 'boolean' ||\n         typeof arg === 'number' ||\n         typeof arg === 'string' ||\n         typeof arg === 'symbol' ||  // ES6 symbol\n         typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = _support_isBufferBrowser_js__WEBPACK_IMPORTED_MODULE_2__.i;\n\nfunction objectToString(o) {\n  return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n  return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n              'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n  var d = new Date();\n  var time = [pad(d.getHours()),\n              pad(d.getMinutes()),\n              pad(d.getSeconds())].join(':');\n  return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n  console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n *     prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = _inherits_inherits_browser_js__WEBPACK_IMPORTED_MODULE_3__.i;\n\nexports._extend = function(origin, add) {\n  // Don't do anything if add isn't an object\n  if (!add || !isObject(add)) return origin;\n\n  var keys = Object.keys(add);\n  var i = keys.length;\n  while (i--) {\n    origin[keys[i]] = add[keys[i]];\n  }\n  return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n  if (typeof original !== 'function')\n    throw new TypeError('The \"original\" argument must be of type Function');\n\n  if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n    var fn = original[kCustomPromisifiedSymbol];\n    if (typeof fn !== 'function') {\n      throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n    }\n    Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n      value: fn, enumerable: false, writable: false, configurable: true\n    });\n    return fn;\n  }\n\n  function fn() {\n    var promiseResolve, promiseReject;\n    var promise = new Promise(function (resolve, reject) {\n      promiseResolve = resolve;\n      promiseReject = reject;\n    });\n\n    var args = [];\n    for (var i = 0; i < arguments.length; i++) {\n      args.push(arguments[i]);\n    }\n    args.push(function (err, value) {\n      if (err) {\n        promiseReject(err);\n      } else {\n        promiseResolve(value);\n      }\n    });\n\n    try {\n      original.apply(this, args);\n    } catch (err) {\n      promiseReject(err);\n    }\n\n    return promise;\n  }\n\n  Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n  if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n    value: fn, enumerable: false, writable: false, configurable: true\n  });\n  return Object.defineProperties(\n    fn,\n    getOwnPropertyDescriptors(original)\n  );\n};\n\nexports.promisify.custom = kCustomPromisifiedSymbol;\n\nfunction callbackifyOnRejected(reason, cb) {\n  // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n  // Because `null` is a special error value in callbacks which means \"no error\n  // occurred\", we error-wrap so the callback consumer can distinguish between\n  // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n  if (!reason) {\n    var newReason = new Error('Promise was rejected with a falsy value');\n    newReason.reason = reason;\n    reason = newReason;\n  }\n  return cb(reason);\n}\n\nfunction callbackify(original) {\n  if (typeof original !== 'function') {\n    throw new TypeError('The \"original\" argument must be of type Function');\n  }\n\n  // We DO NOT return the promise as it gives the user a false sense that\n  // the promise is actually somehow related to the callback's execution\n  // and that the callback throwing will reject the promise.\n  function callbackified() {\n    var args = [];\n    for (var i = 0; i < arguments.length; i++) {\n      args.push(arguments[i]);\n    }\n\n    var maybeCb = args.pop();\n    if (typeof maybeCb !== 'function') {\n      throw new TypeError('The last argument must be of type Function');\n    }\n    var self = this;\n    var cb = function() {\n      return maybeCb.apply(self, arguments);\n    };\n    // In true node style we process the callback on `nextTick` with all the\n    // implications (stack, `uncaughtException`, `async_hooks`)\n    original.apply(this, args)\n      .then(function(ret) { _virtual_polyfill_node_process_js__WEBPACK_IMPORTED_MODULE_0__.b.nextTick(cb, null, ret); },\n            function(rej) { _virtual_polyfill_node_process_js__WEBPACK_IMPORTED_MODULE_0__.b.nextTick(callbackifyOnRejected, rej, cb); });\n  }\n\n  Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n  Object.defineProperties(callbackified,\n                          getOwnPropertyDescriptors(original));\n  return callbackified;\n}\nexports.callbackify = callbackify;\n});\n\n\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vendor/util/util.js?");

/***/ }),

/***/ "./node_modules/@kitware/vtk.js/vtk.js":
/*!*********************************************!*\
  !*** ./node_modules/@kitware/vtk.js/vtk.js ***!
  \*********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__.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; }\n\nvar factoryMapping = {\n  vtkObject: function vtkObject() {\n    return null;\n  }\n};\nfunction vtk(obj) {\n  if (obj === null || obj === undefined) {\n    return obj;\n  }\n\n  if (obj.isA) {\n    return obj;\n  }\n\n  if (!obj.vtkClass) {\n    if (__webpack_require__.g.console && __webpack_require__.g.console.error) {\n      __webpack_require__.g.console.error('Invalid VTK object');\n    }\n\n    return null;\n  }\n\n  var constructor = factoryMapping[obj.vtkClass];\n\n  if (!constructor) {\n    if (__webpack_require__.g.console && __webpack_require__.g.console.error) {\n      __webpack_require__.g.console.error(\"No vtk class found for Object of type \".concat(obj.vtkClass));\n    }\n\n    return null;\n  } // Shallow copy object\n\n\n  var model = _objectSpread({}, obj); // Convert into vtkObject any nested key\n\n\n  Object.keys(model).forEach(function (keyName) {\n    if (model[keyName] && (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__.default)(model[keyName]) === 'object' && model[keyName].vtkClass) {\n      model[keyName] = vtk(model[keyName]);\n    }\n  }); // Return the root\n\n  var newInst = constructor(model);\n\n  if (newInst && newInst.modified) {\n    newInst.modified();\n  }\n\n  return newInst;\n}\n\nfunction register(vtkClassName, constructor) {\n  factoryMapping[vtkClassName] = constructor;\n} // Nest register method under the vtk function\n\n\nvtk.register = register;\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (vtk);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/@kitware/vtk.js/vtk.js?");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].use[2]!./src/GeometryViewer.module.css":
/*!*******************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].use[2]!./src/GeometryViewer.module.css ***!
  \*******************************************************************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".GeometryViewer-module-button_DDP31 {\\n  /* position: absolute; */\\n  right: 5px;\\n  top: 5px;\\n  width: 1em;\\n  z-index: 2;\\n  cursor: pointer;\\n}\\n\\n.GeometryViewer-module-rootController_2i3uK {\\n  display: -webkit-box;\\n  display: -ms-flexbox;\\n  display: flex;\\n  -webkit-box-orient: vertical;\\n  -webkit-box-direction: normal;\\n      -ms-flex-direction: column;\\n          flex-direction: column;\\n  /* position: absolute; */\\n  top: 5px;\\n  left: 5px;\\n  right: 5px;\\n  z-index: 1;\\n}\\n\\n.GeometryViewer-module-control_2C7Yu {\\n  display: -webkit-box;\\n  display: -ms-flexbox;\\n  display: flex;\\n  -webkit-box-orient: horizontal;\\n  -webkit-box-direction: normal;\\n      -ms-flex-direction: row;\\n          flex-direction: row;\\n  -webkit-box-flex: 1;\\n      -ms-flex: 1;\\n          flex: 1;\\n  -webkit-box-align: center;\\n      -ms-flex-align: center;\\n          align-items: center;\\n}\\n\\n.GeometryViewer-module-fullScreen_1WI9g {\\n  /* position: absolute; */\\n  width: 100vw;\\n  height: 100vh;\\n  top: 0;\\n  left: 0;\\n  overflow: hidden;\\n  background: black;\\n  margin: 0;\\n  padding: 0;\\n  z-index: -1;\\n  display: -webkit-box;\\n  display: -ms-flexbox;\\n  display: flex;\\n  -webkit-box-align: center;\\n      -ms-flex-align: center;\\n          align-items: center;\\n  -webkit-box-pack: center;\\n      -ms-flex-pack: center;\\n          justify-content: center;\\n}\\n\\n.GeometryViewer-module-fullParentSize_2Nt7U {\\n  /* position: absolute; */\\n  width: 100%;\\n  height: 100%;\\n  top: 0;\\n  left: 0;\\n  overflow: hidden;\\n}\\n\\n.GeometryViewer-module-selector_1_5IP {\\n  background: transparent;\\n  border: none;\\n  margin: 5px;\\n  z-index: 1;\\n  max-width: 100px;\\n  min-width: 100px;\\n}\\n\\nlabel.GeometryViewer-module-selector_1_5IP {\\n  font-size: 12px;\\n  text-overflow: ellipsis;\\n  overflow: hidden;\\n}\\n\\nselect:focus {\\n  outline: none;\\n  border: none;\\n}\\n\\n.GeometryViewer-module-progress_2vPhL {\\n  -webkit-box-flex: 0;\\n      -ms-flex: none;\\n          flex: none;\\n  font-size: 50px;\\n  color: white;\\n  z-index: 1;\\n  background: rgba(128,128,128,.5);\\n  padding: 20px;\\n  border-radius: 10px;\\n  -webkit-user-select: none;\\n     -moz-user-select: none;\\n      -ms-user-select: none;\\n          user-select: none;\\n}\\n\\n.GeometryViewer-module-dark_3qCyx {\\n  color: white;\\n}\\n\\n.GeometryViewer-module-dark_3qCyx option {\\n  color: black;\\n}\\n\\n.GeometryViewer-module-light_2i1wW {\\n  color: black;\\n}\\n\\n.GeometryViewer-module-light_2i1wW option {\\n  color: white;\\n}\\n\\n.GeometryViewer-module-fpsMonitor_1Qd9Q {\\n  /* position: absolute; */\\n  bottom: 10px;\\n  left: 10px;\\n  background-color: rgba(255, 255, 255, 0.5);\\n  border-radius: 5px;\\n  border: solid 1px gray;\\n}\\n\", \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"button\": \"GeometryViewer-module-button_DDP31\",\n\t\"rootController\": \"GeometryViewer-module-rootController_2i3uK\",\n\t\"control\": \"GeometryViewer-module-control_2C7Yu\",\n\t\"fullScreen\": \"GeometryViewer-module-fullScreen_1WI9g\",\n\t\"fullParentSize\": \"GeometryViewer-module-fullParentSize_2Nt7U\",\n\t\"selector\": \"GeometryViewer-module-selector_1_5IP\",\n\t\"progress\": \"GeometryViewer-module-progress_2vPhL\",\n\t\"dark\": \"GeometryViewer-module-dark_3qCyx GeometryViewer-module-selector_1_5IP\",\n\t\"light\": \"GeometryViewer-module-light_2i1wW GeometryViewer-module-selector_1_5IP\",\n\t\"fpsMonitor\": \"GeometryViewer-module-fpsMonitor_1Qd9Q\"\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./src/GeometryViewer.module.css?./node_modules/css-loader/dist/cjs.js??ruleSet%5B1%5D.rules%5B7%5D.use%5B1%5D!./node_modules/postcss-loader/dist/cjs.js??ruleSet%5B1%5D.rules%5B7%5D.use%5B2%5D");

/***/ }),

/***/ "./node_modules/css-loader/dist/runtime/api.js":
/*!*****************************************************!*\
  !*** ./node_modules/css-loader/dist/runtime/api.js ***!
  \*****************************************************/
/***/ ((module) => {

"use strict";
eval("\n\n/*\n  MIT License http://www.opensource.org/licenses/mit-license.php\n  Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n  var list = []; // return the list of modules as css string\n\n  list.toString = function toString() {\n    return this.map(function (item) {\n      var content = cssWithMappingToString(item);\n\n      if (item[2]) {\n        return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n      }\n\n      return content;\n    }).join(\"\");\n  }; // import a list of modules into the list\n  // eslint-disable-next-line func-names\n\n\n  list.i = function (modules, mediaQuery, dedupe) {\n    if (typeof modules === \"string\") {\n      // eslint-disable-next-line no-param-reassign\n      modules = [[null, modules, \"\"]];\n    }\n\n    var alreadyImportedModules = {};\n\n    if (dedupe) {\n      for (var i = 0; i < this.length; i++) {\n        // eslint-disable-next-line prefer-destructuring\n        var id = this[i][0];\n\n        if (id != null) {\n          alreadyImportedModules[id] = true;\n        }\n      }\n    }\n\n    for (var _i = 0; _i < modules.length; _i++) {\n      var item = [].concat(modules[_i]);\n\n      if (dedupe && alreadyImportedModules[item[0]]) {\n        // eslint-disable-next-line no-continue\n        continue;\n      }\n\n      if (mediaQuery) {\n        if (!item[2]) {\n          item[2] = mediaQuery;\n        } else {\n          item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n        }\n      }\n\n      list.push(item);\n    }\n  };\n\n  return list;\n};\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/css-loader/dist/runtime/api.js?");

/***/ }),

/***/ "./node_modules/regenerator-runtime/runtime.js":
/*!*****************************************************!*\
  !*** ./node_modules/regenerator-runtime/runtime.js ***!
  \*****************************************************/
/***/ ((module) => {

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

/***/ }),

/***/ "./src/GeometryViewer.module.css":
/*!***************************************!*\
  !*** ./src/GeometryViewer.module.css ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \"./node_modules/style-loader/dist/runtime/styleDomAPI.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_getTarget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/getTarget.js */ \"./node_modules/style-loader/dist/runtime/getTarget.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_getTarget_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_getTarget_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \"./node_modules/style-loader/dist/runtime/insertStyleElement.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_7_use_1_node_modules_postcss_loader_dist_cjs_js_ruleSet_1_rules_7_use_2_GeometryViewer_module_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].use[1]!../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].use[2]!./GeometryViewer.module.css */ \"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].use[2]!./src/GeometryViewer.module.css\");\n\n      \n      \n      \n      \n      \n      \n      \n\nvar options = {};\n\noptions.styleTagTransform = function(css, style){\n      if (style.styleSheet) {\n        style.styleSheet.cssText = css;\n      } else {\n      while (style.firstChild) {\n        style.removeChild(style.firstChild);\n      }\n\n      style.appendChild(document.createTextNode(css));\n    }\n  };\noptions.setAttributes = function(style) {\n        var nonce =\n           true ? __webpack_require__.nc : 0;\n\n        if (nonce) {\n          style.setAttribute(\"nonce\", nonce);\n        }\n      };\noptions.insert = function(style){\n    var target = _node_modules_style_loader_dist_runtime_getTarget_js__WEBPACK_IMPORTED_MODULE_2___default()(\"head\");\n\n    if (!target) {\n      throw new Error(\n        \"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\"\n      );\n    }\n\n    target.appendChild(style);\n  };\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_3___default());\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_7_use_1_node_modules_postcss_loader_dist_cjs_js_ruleSet_1_rules_7_use_2_GeometryViewer_module_css__WEBPACK_IMPORTED_MODULE_4__.default, options);\n\n\n\n\n       /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_7_use_1_node_modules_postcss_loader_dist_cjs_js_ruleSet_1_rules_7_use_2_GeometryViewer_module_css__WEBPACK_IMPORTED_MODULE_4__.default && _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_7_use_1_node_modules_postcss_loader_dist_cjs_js_ruleSet_1_rules_7_use_2_GeometryViewer_module_css__WEBPACK_IMPORTED_MODULE_4__.default.locals ? _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_7_use_1_node_modules_postcss_loader_dist_cjs_js_ruleSet_1_rules_7_use_2_GeometryViewer_module_css__WEBPACK_IMPORTED_MODULE_4__.default.locals : undefined);\n\n\n//# sourceURL=webpack://vtkjs_viewer/./src/GeometryViewer.module.css?");

/***/ }),

/***/ "./node_modules/style-loader/dist/runtime/getTarget.js":
/*!*************************************************************!*\
  !*** ./node_modules/style-loader/dist/runtime/getTarget.js ***!
  \*************************************************************/
/***/ ((module) => {

"use strict";
eval("\n\nvar memo = {};\n/* istanbul ignore next  */\n\nfunction getTarget(target) {\n  if (typeof memo[target] === \"undefined\") {\n    var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n    if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n      try {\n        // This will throw an exception if access to iframe is blocked\n        // due to cross-origin restrictions\n        styleTarget = styleTarget.contentDocument.head;\n      } catch (e) {\n        // istanbul ignore next\n        styleTarget = null;\n      }\n    }\n\n    memo[target] = styleTarget;\n  }\n\n  return memo[target];\n}\n\nmodule.exports = getTarget;\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/style-loader/dist/runtime/getTarget.js?");

/***/ }),

/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":
/*!****************************************************************************!*\
  !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
  \****************************************************************************/
/***/ ((module) => {

"use strict";
eval("\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n  var result = -1;\n\n  for (var i = 0; i < stylesInDom.length; i++) {\n    if (stylesInDom[i].identifier === identifier) {\n      result = i;\n      break;\n    }\n  }\n\n  return result;\n}\n\nfunction modulesToDom(list, options) {\n  var idCountMap = {};\n  var identifiers = [];\n\n  for (var i = 0; i < list.length; i++) {\n    var item = list[i];\n    var id = options.base ? item[0] + options.base : item[0];\n    var count = idCountMap[id] || 0;\n    var identifier = \"\".concat(id, \" \").concat(count);\n    idCountMap[id] = count + 1;\n    var index = getIndexByIdentifier(identifier);\n    var obj = {\n      css: item[1],\n      media: item[2],\n      sourceMap: item[3]\n    };\n\n    if (index !== -1) {\n      stylesInDom[index].references++;\n      stylesInDom[index].updater(obj);\n    } else {\n      stylesInDom.push({\n        identifier: identifier,\n        updater: addStyle(obj, options),\n        references: 1\n      });\n    }\n\n    identifiers.push(identifier);\n  }\n\n  return identifiers;\n}\n\nfunction addStyle(obj, options) {\n  var api = options.domAPI(options);\n  api.update(obj);\n  return function updateStyle(newObj) {\n    if (newObj) {\n      if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n        return;\n      }\n\n      api.update(obj = newObj);\n    } else {\n      api.remove();\n    }\n  };\n}\n\nmodule.exports = function (list, options) {\n  options = options || {};\n  list = list || [];\n  var lastIdentifiers = modulesToDom(list, options);\n  return function update(newList) {\n    newList = newList || [];\n\n    for (var i = 0; i < lastIdentifiers.length; i++) {\n      var identifier = lastIdentifiers[i];\n      var index = getIndexByIdentifier(identifier);\n      stylesInDom[index].references--;\n    }\n\n    var newLastIdentifiers = modulesToDom(newList, options);\n\n    for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n      var _identifier = lastIdentifiers[_i];\n\n      var _index = getIndexByIdentifier(_identifier);\n\n      if (stylesInDom[_index].references === 0) {\n        stylesInDom[_index].updater();\n\n        stylesInDom.splice(_index, 1);\n      }\n    }\n\n    lastIdentifiers = newLastIdentifiers;\n  };\n};\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?");

/***/ }),

/***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js":
/*!**********************************************************************!*\
  !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
  \**********************************************************************/
/***/ ((module) => {

"use strict";
eval("\n\n/* istanbul ignore next  */\nfunction insertStyleElement(options) {\n  var style = document.createElement(\"style\");\n  options.setAttributes(style, options.attributes);\n  options.insert(style);\n  return style;\n}\n\nmodule.exports = insertStyleElement;\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/style-loader/dist/runtime/insertStyleElement.js?");

/***/ }),

/***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js":
/*!***************************************************************!*\
  !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
  \***************************************************************/
/***/ ((module) => {

"use strict";
eval("\n\n/* istanbul ignore next  */\nfunction apply(style, options, obj) {\n  var css = obj.css;\n  var media = obj.media;\n  var sourceMap = obj.sourceMap;\n\n  if (media) {\n    style.setAttribute(\"media\", media);\n  } else {\n    style.removeAttribute(\"media\");\n  }\n\n  if (sourceMap && typeof btoa !== \"undefined\") {\n    css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n  } // For old IE\n\n  /* istanbul ignore if  */\n\n\n  options.styleTagTransform(css, style);\n}\n\nfunction removeStyleElement(style) {\n  // istanbul ignore if\n  if (style.parentNode === null) {\n    return false;\n  }\n\n  style.parentNode.removeChild(style);\n}\n/* istanbul ignore next  */\n\n\nfunction domAPI(options) {\n  var style = options.insertStyleElement(options);\n  return {\n    update: function update(obj) {\n      apply(style, options, obj);\n    },\n    remove: function remove() {\n      removeStyleElement(style);\n    }\n  };\n}\n\nmodule.exports = domAPI;\n\n//# sourceURL=webpack://vtkjs_viewer/./node_modules/style-loader/dist/runtime/styleDomAPI.js?");

/***/ }),

/***/ "./src/favicon-96x96.png":
/*!*******************************!*\
  !*** ./src/favicon-96x96.png ***!
  \*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (\"data:image/png;base64, \");\n\n//# sourceURL=webpack://vtkjs_viewer/./src/favicon-96x96.png?");

/***/ }),

/***/ "./src/index.js":
/*!**********************!*\
  !*** ./src/index.js ***!
  \**********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _kitware_vtk_js_Rendering_Profiles_Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @kitware/vtk.js/Rendering/Profiles/Geometry */ \"./node_modules/@kitware/vtk.js/Rendering/Profiles/Geometry.js\");\n/* harmony import */ var _kitware_vtk_js_macro__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @kitware/vtk.js/macro */ \"./node_modules/@kitware/vtk.js/macro.js\");\n/* harmony import */ var _kitware_vtk_js_Rendering_Core_Actor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @kitware/vtk.js/Rendering/Core/Actor */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Actor.js\");\n/* harmony import */ var _kitware_vtk_js_Common_Core_DataArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @kitware/vtk.js/Common/Core/DataArray */ \"./node_modules/@kitware/vtk.js/Common/Core/DataArray.js\");\n/* harmony import */ var _kitware_vtk_js_Rendering_Core_ScalarBarActor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @kitware/vtk.js/Rendering/Core/ScalarBarActor */ \"./node_modules/@kitware/vtk.js/Rendering/Core/ScalarBarActor.js\");\n/* harmony import */ var _kitware_vtk_js_Rendering_Core_ColorTransferFunction_ColorMaps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps */ \"./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps.js\");\n/* harmony import */ var _kitware_vtk_js_Rendering_Core_ColorTransferFunction__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @kitware/vtk.js/Rendering/Core/ColorTransferFunction */ \"./node_modules/@kitware/vtk.js/Rendering/Core/ColorTransferFunction.js\");\n/* harmony import */ var _kitware_vtk_js_Rendering_Misc_FullScreenRenderWindow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @kitware/vtk.js/Rendering/Misc/FullScreenRenderWindow */ \"./node_modules/@kitware/vtk.js/Rendering/Misc/FullScreenRenderWindow.js\");\n/* harmony import */ var _kitware_vtk_js_Rendering_Core_Mapper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @kitware/vtk.js/Rendering/Core/Mapper */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Mapper.js\");\n/* harmony import */ var _kitware_vtk_js_Common_Core_URLExtract__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @kitware/vtk.js/Common/Core/URLExtract */ \"./node_modules/@kitware/vtk.js/Common/Core/URLExtract.js\");\n/* harmony import */ var _kitware_vtk_js_IO_XML_XMLPolyDataReader__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @kitware/vtk.js/IO/XML/XMLPolyDataReader */ \"./node_modules/@kitware/vtk.js/IO/XML/XMLPolyDataReader.js\");\n/* harmony import */ var _kitware_vtk_js_Interaction_UI_FPSMonitor__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @kitware/vtk.js/Interaction/UI/FPSMonitor */ \"./node_modules/@kitware/vtk.js/Interaction/UI/FPSMonitor.js\");\n/* harmony import */ var _kitware_vtk_js_Common_Core_Base64__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @kitware/vtk.js/Common/Core/Base64 */ \"./node_modules/@kitware/vtk.js/Common/Core/Base64.js\");\n/* harmony import */ var _kitware_vtk_js_IO_Core_DataAccessHelper_HtmlDataAccessHelper__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @kitware/vtk.js/IO/Core/DataAccessHelper/HtmlDataAccessHelper */ \"./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js\");\n/* harmony import */ var _kitware_vtk_js_IO_Core_DataAccessHelper_JSZipDataAccessHelper__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @kitware/vtk.js/IO/Core/DataAccessHelper/JSZipDataAccessHelper */ \"./node_modules/@kitware/vtk.js/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js\");\n/* harmony import */ var _kitware_vtk_js_Rendering_Core_Mapper_Constants__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @kitware/vtk.js/Rendering/Core/Mapper/Constants */ \"./node_modules/@kitware/vtk.js/Rendering/Core/Mapper/Constants.js\");\n/* harmony import */ var _GeometryViewer_module_css__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./GeometryViewer.module.css */ \"./src/GeometryViewer.module.css\");\n/* harmony import */ var _favicon_96x96_png__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./favicon-96x96.png */ \"./src/favicon-96x96.png\");\n// Load the rendering pieces we want to use (for both WebGL and WebGPU)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Force DataAccessHelper to have access to various data source\n\n\n\n\n\n\n\n\nlet background = [0, 0, 0];\nlet renderWindow;\nlet renderer;\nlet scalarBarActor;\n\n__webpack_require__.g.pipeline = {};\n\n// Process arguments from URL\nconst userParams = _kitware_vtk_js_Common_Core_URLExtract__WEBPACK_IMPORTED_MODULE_9__.default.extractURLParameters();\n\n// Background handling\nif (userParams.background) {\n  background = userParams.background.split(',').map((s) => Number(s));\n}\nconst selectorClass =\n  background.length === 3 && background.reduce((a, b) => a + b, 0) < 1.5\n    ? _GeometryViewer_module_css__WEBPACK_IMPORTED_MODULE_16__.default.dark\n    : _GeometryViewer_module_css__WEBPACK_IMPORTED_MODULE_16__.default.light;\n\n// lut\nconst lutName = userParams.lut || 'erdc_rainbow_bright';\n\n// field\nconst field = userParams.field || '';\n\n// camera\nfunction updateCamera (camera) {\n  ['zoom', 'pitch', 'elevation', 'yaw', 'azimuth', 'roll', 'dolly'].forEach(\n    (key) => {\n      if (userParams[key]) {\n        camera[key](userParams[key]);\n      }\n      renderWindow.render();\n    }\n  );\n}\n__webpack_require__.g.updateCamera = updateCamera;\n\n// ----------------------------------------------------------------------------\n// DOM containers for UI control\n// ----------------------------------------------------------------------------\n\nconst rootControllerContainer = document.createElement('div');\nrootControllerContainer.setAttribute('class', _GeometryViewer_module_css__WEBPACK_IMPORTED_MODULE_16__.default.rootController);\n\nconst addDataSetButton = document.createElement('img');\naddDataSetButton.setAttribute('class', _GeometryViewer_module_css__WEBPACK_IMPORTED_MODULE_16__.default.button);\naddDataSetButton.setAttribute('src', _favicon_96x96_png__WEBPACK_IMPORTED_MODULE_17__.default);\naddDataSetButton.addEventListener('click', () => {\n  const isVisible = rootControllerContainer.style.display !== 'none';\n  rootControllerContainer.style.display = isVisible ? 'none' : 'flex';\n});\n\nconst fpsMonitor = _kitware_vtk_js_Interaction_UI_FPSMonitor__WEBPACK_IMPORTED_MODULE_11__.default.newInstance();\nconst fpsElm = fpsMonitor.getFpsMonitorContainer();\nfpsElm.classList.add(_GeometryViewer_module_css__WEBPACK_IMPORTED_MODULE_16__.default.fpsMonitor);\n\n// ----------------------------------------------------------------------------\n// Add class to body if iOS device\n// ----------------------------------------------------------------------------\n\nconst iOS = /iPad|iPhone|iPod/.test(window.navigator.platform);\n\nif (iOS) {\n  document.querySelector('body').classList.add('is-ios-device');\n}\n\n// ----------------------------------------------------------------------------\n\nfunction emptyContainer (container) {\n  fpsMonitor.setContainer(null);\n  while (container.firstChild) {\n    container.removeChild(container.firstChild);\n  }\n}\n\n__webpack_require__.g.emptyContainer = emptyContainer;\n// ----------------------------------------------------------------------------\n\nfunction createViewer (container) {\n  const fullScreenRenderer = _kitware_vtk_js_Rendering_Misc_FullScreenRenderWindow__WEBPACK_IMPORTED_MODULE_7__.default.newInstance({\n    background,\n    rootContainer: container,\n    containerStyle: { height: '100%', width: '100%', position: 'absolute' }\n  });\n  renderer = fullScreenRenderer.getRenderer();\n  renderWindow = fullScreenRenderer.getRenderWindow();\n\n  __webpack_require__.g.fullScreenRenderer = fullScreenRenderer;\n  __webpack_require__.g.renderer = renderer;\n  __webpack_require__.g.renderWindow = renderWindow;\n\n  renderWindow.getInteractor().setDesiredUpdateRate(15);\n\n  container.appendChild(rootControllerContainer);\n  container.appendChild(addDataSetButton);\n\n  scalarBarActor = _kitware_vtk_js_Rendering_Core_ScalarBarActor__WEBPACK_IMPORTED_MODULE_4__.default.newInstance();\n  renderer.addActor(scalarBarActor);\n\n  if (userParams.fps) {\n    if (Array.isArray(userParams.fps)) {\n      fpsMonitor.setMonitorVisibility(...userParams.fps);\n      if (userParams.fps.length === 4) {\n        fpsMonitor.setOrientation(userParams.fps[3]);\n      }\n    }\n    fpsMonitor.setRenderWindow(renderWindow);\n    fpsMonitor.setContainer(container);\n    fullScreenRenderer.setResizeCallback(fpsMonitor.update);\n  }\n}\n__webpack_require__.g.createViewer = createViewer;\n\n// ----------------------------------------------------------------------------\n\nfunction createPipeline (fileContents, name = undefined) {\n  // Create UI\n  const presetSelector = document.createElement('select');\n  presetSelector.setAttribute('class', selectorClass);\n  presetSelector.innerHTML = _kitware_vtk_js_Rendering_Core_ColorTransferFunction_ColorMaps__WEBPACK_IMPORTED_MODULE_5__.default.rgbPresetNames.map(\n      (name) =>\n        `<option value=\"${name}\" ${\n          lutName === name ? 'selected=\"selected\"' : ''\n        }>${name}</option>`\n    )\n    .join('');\n\n  const representationSelector = document.createElement('select');\n  representationSelector.setAttribute('class', selectorClass);\n  representationSelector.innerHTML = [\n    'Hidden',\n    'Points',\n    'Wireframe',\n    'Surface',\n    'Surface with Edge'\n  ]\n    .map(\n      (name, idx) =>\n        `<option value=\"${idx === 0 ? 0 : 1}:${idx < 4 ? idx - 1 : 2}:${\n          idx === 4 ? 1 : 0\n        }\">${name}</option>`\n    )\n    .join('');\n  representationSelector.value = '1:2:0';\n\n  const colorBySelector = document.createElement('select');\n  colorBySelector.setAttribute('class', selectorClass);\n\n  const componentSelector = document.createElement('select');\n  componentSelector.setAttribute('class', selectorClass);\n  componentSelector.style.display = 'none';\n\n  const opacitySelector = document.createElement('input');\n  opacitySelector.setAttribute('class', selectorClass);\n  opacitySelector.setAttribute('type', 'range');\n  opacitySelector.setAttribute('value', '100');\n  opacitySelector.setAttribute('max', '100');\n  opacitySelector.setAttribute('min', '1');\n\n  const pointSizeSelector = document.createElement('input');\n  pointSizeSelector.setAttribute('class', selectorClass);\n  pointSizeSelector.setAttribute('type', 'range');\n  pointSizeSelector.setAttribute('value', '1');\n  pointSizeSelector.setAttribute('max', '20');\n  pointSizeSelector.setAttribute('min', '1');\n  pointSizeSelector.style.display = 'none'; // Deafault hidden\n\n  if (name === undefined) {\n    name = 'Mesh';\n  }\n  const labelSelector = document.createElement('label');\n  labelSelector.setAttribute('class', selectorClass);\n  labelSelector.innerHTML = name;\n\n  const controlContainer = document.createElement('div');\n  controlContainer.setAttribute('class', _GeometryViewer_module_css__WEBPACK_IMPORTED_MODULE_16__.default.control);\n  controlContainer.appendChild(labelSelector);\n  controlContainer.appendChild(representationSelector);\n  controlContainer.appendChild(presetSelector);\n  controlContainer.appendChild(colorBySelector);\n  controlContainer.appendChild(componentSelector);\n  controlContainer.appendChild(opacitySelector);\n  controlContainer.appendChild(pointSizeSelector);\n  rootControllerContainer.appendChild(controlContainer);\n\n  // VTK pipeline\n  const vtpReader = _kitware_vtk_js_IO_XML_XMLPolyDataReader__WEBPACK_IMPORTED_MODULE_10__.default.newInstance();\n  var buffer = _kitware_vtk_js_Common_Core_Base64__WEBPACK_IMPORTED_MODULE_12__.default.toArrayBuffer(fileContents);\n  vtpReader.parseAsArrayBuffer(buffer);\n\n  const lookupTable = _kitware_vtk_js_Rendering_Core_ColorTransferFunction__WEBPACK_IMPORTED_MODULE_6__.default.newInstance();\n  const source = vtpReader.getOutputData(0);\n  const mapper = _kitware_vtk_js_Rendering_Core_Mapper__WEBPACK_IMPORTED_MODULE_8__.default.newInstance({\n    interpolateScalarsBeforeMapping: false,\n    useLookupTableScalarRange: true,\n    lookupTable,\n    scalarVisibility: false\n  });\n  const actor = _kitware_vtk_js_Rendering_Core_Actor__WEBPACK_IMPORTED_MODULE_2__.default.newInstance();\n  const scalars = source.getPointData().getScalars();\n  const dataRange = [].concat(scalars ? scalars.getRange() : [0, 1]);\n  let activeArray = _kitware_vtk_js_Common_Core_DataArray__WEBPACK_IMPORTED_MODULE_3__.default;\n\n  // --------------------------------------------------------------------\n  // Color handling\n  // --------------------------------------------------------------------\n\n  function applyPreset () {\n    const preset = _kitware_vtk_js_Rendering_Core_ColorTransferFunction_ColorMaps__WEBPACK_IMPORTED_MODULE_5__.default.getPresetByName(presetSelector.value);\n    lookupTable.applyColorMap(preset);\n    lookupTable.setMappingRange(dataRange[0], dataRange[1]);\n    lookupTable.updateRange();\n    renderWindow.render();\n  }\n  applyPreset();\n  presetSelector.addEventListener('change', applyPreset);\n\n  // --------------------------------------------------------------------\n  // Representation handling\n  // --------------------------------------------------------------------\n\n  function updateRepresentation (event) {\n    const [\n      visibility,\n      representation,\n      edgeVisibility\n    ] = event.target.value.split(':').map(Number);\n    actor.getProperty().set({ representation, edgeVisibility });\n    actor.setVisibility(!!visibility);\n    renderWindow.render();\n    console.log(representation);\n    if (representation === 0) {\n      // Points === 0\n      pointSizeSelector.style.display = 'block';\n    } else {\n      pointSizeSelector.style.display = 'none';\n    }\n  }\n  representationSelector.addEventListener('change', updateRepresentation);\n\n  // --------------------------------------------------------------------\n  // Opacity handling\n  // --------------------------------------------------------------------\n\n  function updateOpacity (event) {\n    const opacity = Number(event.target.value) / 100;\n    actor.getProperty().setOpacity(opacity);\n    renderWindow.render();\n  }\n\n  opacitySelector.addEventListener('input', updateOpacity);\n\n  // --------------------------------------------------------------------\n  // Point size handling\n  // --------------------------------------------------------------------\n\n  function updatePointSize (event) {\n    const pointSize = Number(event.target.value);\n    actor.getProperty().setPointSize(pointSize);\n    renderWindow.render();\n  }\n\n  pointSizeSelector.addEventListener('input', updatePointSize);\n\n  // --------------------------------------------------------------------\n  // ColorBy handling\n  // --------------------------------------------------------------------\n\n  const colorByOptions = [{ value: ':', label: 'Solid color' }].concat(\n    source\n      .getPointData()\n      .getArrays()\n      .map((a) => ({\n        label: `(p) ${a.getName()}`,\n        value: `PointData:${a.getName()}`\n      })),\n    source\n      .getCellData()\n      .getArrays()\n      .map((a) => ({\n        label: `(c) ${a.getName()}`,\n        value: `CellData:${a.getName()}`\n      }))\n  );\n  colorBySelector.innerHTML = colorByOptions\n    .map(\n      ({ label, value }) =>\n        `<option value=\"${value}\" ${\n          field === value ? 'selected=\"selected\"' : ''\n        }>${label}</option>`\n    )\n    .join('');\n\n  function updateColorBy (event) {\n    const [location, colorByArrayName] = event.target.value.split(':');\n    const interpolateScalarsBeforeMapping = location === 'PointData';\n    let colorMode = _kitware_vtk_js_Rendering_Core_Mapper_Constants__WEBPACK_IMPORTED_MODULE_15__.ColorMode.DEFAULT;\n    let scalarMode = _kitware_vtk_js_Rendering_Core_Mapper_Constants__WEBPACK_IMPORTED_MODULE_15__.ScalarMode.DEFAULT;\n    const scalarVisibility = location.length > 0;\n    if (scalarVisibility) {\n      const newArray = source[`get${location}`]().getArrayByName(\n        colorByArrayName\n      );\n      activeArray = newArray;\n      const newDataRange = activeArray.getRange();\n      dataRange[0] = newDataRange[0];\n      dataRange[1] = newDataRange[1];\n      colorMode = _kitware_vtk_js_Rendering_Core_Mapper_Constants__WEBPACK_IMPORTED_MODULE_15__.ColorMode.MAP_SCALARS;\n      scalarMode =\n        location === 'PointData'\n          ? _kitware_vtk_js_Rendering_Core_Mapper_Constants__WEBPACK_IMPORTED_MODULE_15__.ScalarMode.USE_POINT_FIELD_DATA\n          : _kitware_vtk_js_Rendering_Core_Mapper_Constants__WEBPACK_IMPORTED_MODULE_15__.ScalarMode.USE_CELL_FIELD_DATA;\n\n      const numberOfComponents = activeArray.getNumberOfComponents();\n      if (numberOfComponents > 1) {\n        // always start on magnitude setting\n        if (mapper.getLookupTable()) {\n          const lut = mapper.getLookupTable();\n          lut.setVectorModeToMagnitude();\n        }\n        componentSelector.style.display = 'block';\n        const compOpts = ['Magnitude'];\n        while (compOpts.length <= numberOfComponents) {\n          compOpts.push(`Component ${compOpts.length}`);\n        }\n        componentSelector.innerHTML = compOpts\n          .map((t, index) => `<option value=\"${index - 1}\">${t}</option>`)\n          .join('');\n        if (numberOfComponents > 2 && numberOfComponents < 5) {\n          componentSelector.innerHTML += '<option value=\"-2\">RGB(A)</option>';\n        }\n      } else {\n        componentSelector.style.display = 'none';\n      }\n      scalarBarActor.setAxisLabel(colorByArrayName);\n      scalarBarActor.setVisibility(true);\n    } else {\n      componentSelector.style.display = 'none';\n      scalarBarActor.setVisibility(false);\n    }\n    mapper.set({\n      colorByArrayName,\n      colorMode,\n      interpolateScalarsBeforeMapping,\n      scalarMode,\n      scalarVisibility\n    });\n    applyPreset();\n  }\n  colorBySelector.addEventListener('change', updateColorBy);\n  updateColorBy({ target: colorBySelector });\n\n  function updateColorByComponent (event) {\n    if (mapper.getLookupTable()) {\n      const lut = mapper.getLookupTable();\n      const v = Number(event.target.value);\n      if (v === -1) {\n        lut.setVectorModeToMagnitude();\n        mapper.setColorModeToMapScalars();\n        scalarBarActor.setVisibility(true);\n      } else if (v === -2) {\n        lut.setVectorModeToRGBColors();\n        mapper.setColorModeToDirectScalars();\n        scalarBarActor.setVisibility(false);\n      } else {\n        lut.setVectorModeToComponent();\n        mapper.setColorModeToMapScalars();\n        scalarBarActor.setVisibility(true);\n        lut.setVectorComponent(v);\n        const newDataRange = activeArray.getRange(v);\n        dataRange[0] = newDataRange[0];\n        dataRange[1] = newDataRange[1];\n        lookupTable.setMappingRange(dataRange[0], dataRange[1]);\n        lut.updateRange();\n      }\n      renderWindow.render();\n    }\n  }\n  componentSelector.addEventListener('change', updateColorByComponent);\n\n  // --------------------------------------------------------------------\n  // Pipeline handling\n  // --------------------------------------------------------------------\n\n  actor.setMapper(mapper);\n  mapper.setInputData(source);\n  renderer.addActor(actor);\n\n  scalarBarActor.setScalarsToColors(mapper.getLookupTable());\n\n  // Manage update when lookupTable change\n  const debouncedRender = (0,_kitware_vtk_js_macro__WEBPACK_IMPORTED_MODULE_1__.debounce)(renderWindow.render, 10);\n  lookupTable.onModified(debouncedRender, -1);\n\n  // First render\n  renderer.resetCamera();\n  renderWindow.render();\n\n  // global.pipeline[fileName] = {\n  //   actor,\n  //   mapper,\n  //   source,\n  //   lookupTable,\n  //   renderer,\n  //   renderWindow,\n  // };\n\n  // Update stats\n  fpsMonitor.update();\n}\n\n__webpack_require__.g.createPipeline = createPipeline;\n// ----------------------------------------------------------------------------\n\n\n//# sourceURL=webpack://vtkjs_viewer/./src/index.js?");

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			id: moduleId,
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/global */
/******/ 	(() => {
/******/ 		__webpack_require__.g = (function() {
/******/ 			if (typeof globalThis === 'object') return globalThis;
/******/ 			try {
/******/ 				return this || new Function('return this')();
/******/ 			} catch (e) {
/******/ 				if (typeof window === 'object') return window;
/******/ 			}
/******/ 		})();
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module can't be inlined because the eval devtool is used.
/******/ 	var __webpack_exports__ = __webpack_require__("./src/index.js");
/******/ 	
/******/ })()
;