in_source_id
stringlengths
13
58
issue
stringlengths
3
241k
before_files
listlengths
0
3
after_files
listlengths
0
3
pr_diff
stringlengths
109
107M
python-pillow__Pillow-576
Check libwebp 0.4.0 We should check Pillow with libwebp 0.4.0 prior to the next 2.4 release. https://chromium.googlesource.com/webm/libwebp/+/v0.4.0
[ { "content": "# > pyroma .\n# ------------------------------\n# Checking .\n# Found Pillow\n# ------------------------------\n# Final rating: 10/10\n# Your cheese is so fresh most people think it's a cream: Mascarpone\n# ------------------------------\nfrom __future__ import print_function\nimport glob\nimport os\nimport platform as plat\nimport re\nimport struct\nimport sys\n\nfrom distutils.command.build_ext import build_ext\nfrom distutils import sysconfig\nfrom setuptools import Extension, setup, find_packages\n\n\n_IMAGING = (\n \"decode\", \"encode\", \"map\", \"display\", \"outline\", \"path\")\n\n_LIB_IMAGING = (\n \"Access\", \"AlphaComposite\", \"Antialias\", \"Bands\", \"BitDecode\", \"Blend\",\n \"Chops\", \"Convert\", \"ConvertYCbCr\", \"Copy\", \"Crc32\", \"Crop\", \"Dib\", \"Draw\",\n \"Effects\", \"EpsEncode\", \"File\", \"Fill\", \"Filter\", \"FliDecode\",\n \"Geometry\", \"GetBBox\", \"GifDecode\", \"GifEncode\", \"HexDecode\",\n \"Histo\", \"JpegDecode\", \"JpegEncode\", \"LzwDecode\", \"Matrix\",\n \"ModeFilter\", \"MspDecode\", \"Negative\", \"Offset\", \"Pack\",\n \"PackDecode\", \"Palette\", \"Paste\", \"Quant\", \"QuantOctree\", \"QuantHash\",\n \"QuantHeap\", \"PcdDecode\", \"PcxDecode\", \"PcxEncode\", \"Point\",\n \"RankFilter\", \"RawDecode\", \"RawEncode\", \"Storage\", \"SunRleDecode\",\n \"TgaRleDecode\", \"Unpack\", \"UnpackYCC\", \"UnsharpMask\", \"XbmDecode\",\n \"XbmEncode\", \"ZipDecode\", \"ZipEncode\", \"TiffDecode\")\n\n\ndef _add_directory(path, dir, where=None):\n if dir is None:\n return\n dir = os.path.realpath(dir)\n if os.path.isdir(dir) and dir not in path:\n if where is None:\n path.append(dir)\n else:\n path.insert(where, dir)\n\n\ndef _find_include_file(self, include):\n for directory in self.compiler.include_dirs:\n if os.path.isfile(os.path.join(directory, include)):\n return 1\n return 0\n\n\ndef _find_library_file(self, library):\n # Fix for 3.2.x <3.2.4, 3.3.0, shared lib extension is the python shared\n # lib extension, not the system shared lib extension: e.g. .cpython-33.so\n # vs .so. See Python bug http://bugs.python.org/16754\n if 'cpython' in self.compiler.shared_lib_extension:\n existing = self.compiler.shared_lib_extension\n self.compiler.shared_lib_extension = \".\" + existing.split('.')[-1]\n ret = self.compiler.find_library_file(\n self.compiler.library_dirs, library)\n self.compiler.shared_lib_extension = existing\n return ret\n else:\n return self.compiler.find_library_file(\n self.compiler.library_dirs, library)\n\n\ndef _lib_include(root):\n # map root to (root/lib, root/include)\n return os.path.join(root, \"lib\"), os.path.join(root, \"include\")\n\n\ndef _read(file):\n return open(file, 'rb').read()\n\ntry:\n import _tkinter\nexcept ImportError:\n _tkinter = None\n\n\nNAME = 'Pillow'\nVERSION = '2.3.0'\nTCL_ROOT = None\nJPEG_ROOT = None\nZLIB_ROOT = None\nTIFF_ROOT = None\nFREETYPE_ROOT = None\nLCMS_ROOT = None\n\n\nclass pil_build_ext(build_ext):\n\n class feature:\n zlib = jpeg = tiff = freetype = tcl = tk = lcms = webp = webpmux = None\n required = []\n\n def require(self, feat):\n return feat in self.required\n def want(self, feat):\n return getattr(self, feat) is None\n\n def __iter__(self):\n for x in dir(self):\n if x[1] != '_':\n yield x\n\n feature = feature()\n\n user_options = build_ext.user_options + [\n ('disable-%s' % x, None, 'Disable support for %s' % x)\n for x in feature\n ] + [\n ('enable-%s' % x, None, 'Enable support for %s' % x)\n for x in feature\n ]\n\n def initialize_options(self):\n build_ext.initialize_options(self)\n for x in self.feature:\n setattr(self, 'disable_%s' % x, None)\n setattr(self, 'enable_%s' % x, None)\n\n def finalize_options(self):\n build_ext.finalize_options(self)\n for x in self.feature:\n if getattr(self, 'disable_%s' % x):\n setattr(self.feature, x, False)\n if getattr(self, 'enable_%s' % x):\n raise ValueError(\n 'Conflicting options: --enable-%s and --disable-%s'\n % (x, x))\n if getattr(self, 'enable_%s' % x):\n self.feature.required.append(x)\n\n def build_extensions(self):\n\n global TCL_ROOT\n\n library_dirs = []\n include_dirs = []\n\n _add_directory(include_dirs, \"libImaging\")\n\n #\n # add configured kits\n\n for root in (TCL_ROOT, JPEG_ROOT, TIFF_ROOT, ZLIB_ROOT,\n FREETYPE_ROOT, LCMS_ROOT):\n if isinstance(root, type(())):\n lib_root, include_root = root\n else:\n lib_root = include_root = root\n _add_directory(library_dirs, lib_root)\n _add_directory(include_dirs, include_root)\n\n # respect CFLAGS/LDFLAGS\n for k in ('CFLAGS', 'LDFLAGS'):\n if k in os.environ:\n for match in re.finditer(r'-I([^\\s]+)', os.environ[k]):\n _add_directory(include_dirs, match.group(1))\n for match in re.finditer(r'-L([^\\s]+)', os.environ[k]):\n _add_directory(library_dirs, match.group(1))\n\n # include, rpath, if set as environment variables:\n for k in ('C_INCLUDE_PATH', 'CPATH', 'INCLUDE'):\n if k in os.environ:\n for d in os.environ[k].split(os.path.pathsep):\n _add_directory(include_dirs, d)\n\n for k in ('LD_RUN_PATH', 'LIBRARY_PATH', 'LIB'):\n if k in os.environ:\n for d in os.environ[k].split(os.path.pathsep):\n _add_directory(library_dirs, d)\n\n prefix = sysconfig.get_config_var(\"prefix\")\n if prefix:\n _add_directory(library_dirs, os.path.join(prefix, \"lib\"))\n _add_directory(include_dirs, os.path.join(prefix, \"include\"))\n\n #\n # add platform directories\n\n if sys.platform == \"cygwin\":\n # pythonX.Y.dll.a is in the /usr/lib/pythonX.Y/config directory\n _add_directory(library_dirs, os.path.join(\n \"/usr/lib\", \"python%s\" % sys.version[:3], \"config\"))\n\n elif sys.platform == \"darwin\":\n # attempt to make sure we pick freetype2 over other versions\n _add_directory(include_dirs, \"/sw/include/freetype2\")\n _add_directory(include_dirs, \"/sw/lib/freetype2/include\")\n # fink installation directories\n _add_directory(library_dirs, \"/sw/lib\")\n _add_directory(include_dirs, \"/sw/include\")\n # darwin ports installation directories\n _add_directory(library_dirs, \"/opt/local/lib\")\n _add_directory(include_dirs, \"/opt/local/include\")\n \n # if homebrew is installed, use its lib and include directories\n import subprocess\n try:\n prefix = subprocess.check_output(['brew', '--prefix'])\n if prefix:\n prefix = prefix.strip()\n _add_directory(library_dirs, os.path.join(prefix, 'lib'))\n _add_directory(include_dirs, os.path.join(prefix, 'include'))\n \n # freetype2 is a key-only brew under opt/\n _add_directory(library_dirs, os.path.join(prefix, 'opt', 'freetype', 'lib'))\n _add_directory(include_dirs, os.path.join(prefix, 'opt', 'freetype', 'include'))\n except:\n pass # homebrew not installed\n \n # freetype2 ships with X11 (after homebrew, so that homebrew freetype is preferred)\n _add_directory(library_dirs, \"/usr/X11/lib\")\n _add_directory(include_dirs, \"/usr/X11/include\")\n\n elif sys.platform.startswith(\"linux\"):\n for platform_ in (plat.architecture()[0], plat.processor()):\n\n if not platform_:\n continue\n\n if platform_ in [\"x86_64\", \"64bit\"]:\n _add_directory(library_dirs, \"/lib64\")\n _add_directory(library_dirs, \"/usr/lib64\")\n _add_directory(library_dirs, \"/usr/lib/x86_64-linux-gnu\")\n break\n elif platform_ in [\"i386\", \"i686\", \"32bit\"]:\n _add_directory(library_dirs, \"/usr/lib/i386-linux-gnu\")\n break\n elif platform_ in [\"aarch64\"]:\n _add_directory(library_dirs, \"/usr/lib64\")\n _add_directory(library_dirs, \"/usr/lib/aarch64-linux-gnu\")\n break\n elif platform_ in [\"arm\", \"armv7l\"]:\n _add_directory(library_dirs, \"/usr/lib/arm-linux-gnueabi\")\n break\n elif platform_ in [\"ppc64\"]:\n _add_directory(library_dirs, \"/usr/lib64\")\n _add_directory(library_dirs, \"/usr/lib/ppc64-linux-gnu\")\n _add_directory(library_dirs, \"/usr/lib/powerpc64-linux-gnu\")\n break\n elif platform_ in [\"ppc\"]:\n _add_directory(library_dirs, \"/usr/lib/ppc-linux-gnu\")\n _add_directory(library_dirs, \"/usr/lib/powerpc-linux-gnu\")\n break\n elif platform_ in [\"s390x\"]:\n _add_directory(library_dirs, \"/usr/lib64\")\n _add_directory(library_dirs, \"/usr/lib/s390x-linux-gnu\")\n break\n elif platform_ in [\"s390\"]:\n _add_directory(library_dirs, \"/usr/lib/s390-linux-gnu\")\n break\n else:\n raise ValueError(\n \"Unable to identify Linux platform: `%s`\" % platform_)\n\n # XXX Kludge. Above /\\ we brute force support multiarch. Here we\n # try Barry's more general approach. Afterward, something should\n # work ;-)\n self.add_multiarch_paths()\n\n elif sys.platform.startswith(\"gnu\"):\n self.add_multiarch_paths()\n\n elif sys.platform.startswith(\"netbsd\"):\n _add_directory(library_dirs, \"/usr/pkg/lib\")\n _add_directory(include_dirs, \"/usr/pkg/include\")\n\n # FIXME: check /opt/stuff directories here?\n\n #\n # locate tkinter libraries\n\n if _tkinter:\n TCL_VERSION = _tkinter.TCL_VERSION[:3]\n\n if _tkinter and not TCL_ROOT:\n # we have Tkinter but the TCL_ROOT variable was not set;\n # try to locate appropriate Tcl/Tk libraries\n PYVERSION = sys.version[0] + sys.version[2]\n TCLVERSION = TCL_VERSION[0] + TCL_VERSION[2]\n roots = [\n # common installation directories, mostly for Windows\n # (for Unix-style platforms, we'll check in well-known\n # locations later)\n os.path.join(\"/py\" + PYVERSION, \"Tcl\"),\n os.path.join(\"/python\" + PYVERSION, \"Tcl\"),\n \"/Tcl\", \"/Tcl\" + TCLVERSION, \"/Tcl\" + TCL_VERSION,\n os.path.join(os.environ.get(\"ProgramFiles\", \"\"), \"Tcl\"), ]\n for TCL_ROOT in roots:\n TCL_ROOT = os.path.abspath(TCL_ROOT)\n if os.path.isfile(os.path.join(TCL_ROOT, \"include\", \"tk.h\")):\n # FIXME: use distutils logging (?)\n print(\"--- using Tcl/Tk libraries at\", TCL_ROOT)\n print(\"--- using Tcl/Tk version\", TCL_VERSION)\n TCL_ROOT = _lib_include(TCL_ROOT)\n break\n else:\n TCL_ROOT = None\n\n # add standard directories\n\n # look for tcl specific subdirectory (e.g debian)\n if _tkinter:\n tcl_dir = \"/usr/include/tcl\" + TCL_VERSION\n if os.path.isfile(os.path.join(tcl_dir, \"tk.h\")):\n _add_directory(include_dirs, tcl_dir)\n\n # standard locations\n _add_directory(library_dirs, \"/usr/local/lib\")\n _add_directory(include_dirs, \"/usr/local/include\")\n\n _add_directory(library_dirs, \"/usr/lib\")\n _add_directory(include_dirs, \"/usr/include\")\n\n #\n # insert new dirs *before* default libs, to avoid conflicts\n # between Python PYD stub libs and real libraries\n\n self.compiler.library_dirs = library_dirs + self.compiler.library_dirs\n self.compiler.include_dirs = include_dirs + self.compiler.include_dirs\n\n #\n # look for available libraries\n\n feature = self.feature\n\n if feature.want('zlib'):\n if _find_include_file(self, \"zlib.h\"):\n if _find_library_file(self, \"z\"):\n feature.zlib = \"z\"\n elif sys.platform == \"win32\" and _find_library_file(self, \"zlib\"):\n feature.zlib = \"zlib\" # alternative name\n\n if feature.want('jpeg'):\n if _find_include_file(self, \"jpeglib.h\"):\n if _find_library_file(self, \"jpeg\"):\n feature.jpeg = \"jpeg\"\n elif (\n sys.platform == \"win32\" and\n _find_library_file(self, \"libjpeg\")):\n feature.jpeg = \"libjpeg\" # alternative name\n\n if feature.want('tiff'):\n if _find_library_file(self, \"tiff\"):\n feature.tiff = \"tiff\"\n if sys.platform == \"win32\" and _find_library_file(self, \"libtiff\"):\n feature.tiff = \"libtiff\"\n if sys.platform == \"darwin\" and _find_library_file(self, \"libtiff\"):\n feature.tiff = \"libtiff\"\n\n if feature.want('freetype'):\n if _find_library_file(self, \"freetype\"):\n # look for freetype2 include files\n freetype_version = 0\n for dir in self.compiler.include_dirs:\n if os.path.isfile(os.path.join(dir, \"ft2build.h\")):\n freetype_version = 21\n dir = os.path.join(dir, \"freetype2\")\n break\n dir = os.path.join(dir, \"freetype2\")\n if os.path.isfile(os.path.join(dir, \"ft2build.h\")):\n freetype_version = 21\n break\n if os.path.isdir(os.path.join(dir, \"freetype\")):\n freetype_version = 20\n break\n if freetype_version:\n feature.freetype = \"freetype\"\n feature.freetype_version = freetype_version\n if dir:\n _add_directory(self.compiler.include_dirs, dir, 0)\n\n if feature.want('lcms'):\n if _find_include_file(self, \"lcms2.h\"):\n if _find_library_file(self, \"lcms2\"):\n feature.lcms = \"lcms\"\n\n if _tkinter and _find_include_file(self, \"tk.h\"):\n # the library names may vary somewhat (e.g. tcl84 or tcl8.4)\n version = TCL_VERSION[0] + TCL_VERSION[2]\n if feature.want('tcl'):\n if _find_library_file(self, \"tcl\" + version):\n feature.tcl = \"tcl\" + version\n elif _find_library_file(self, \"tcl\" + TCL_VERSION):\n feature.tcl = \"tcl\" + TCL_VERSION\n if feature.want('tk'):\n if _find_library_file(self, \"tk\" + version):\n feature.tk = \"tk\" + version\n elif _find_library_file(self, \"tk\" + TCL_VERSION):\n feature.tk = \"tk\" + TCL_VERSION\n\n if feature.want('webp'):\n if (_find_include_file(self, \"webp/encode.h\") and\n _find_include_file(self, \"webp/decode.h\")):\n if _find_library_file(self, \"webp\"): # in googles precompiled zip it is call \"libwebp\"\n feature.webp = \"webp\"\n\n if feature.want('webpmux'):\n if (_find_include_file(self, \"webp/mux.h\") and\n _find_include_file(self, \"webp/demux.h\")):\n if _find_library_file(self, \"webpmux\") and _find_library_file(self, \"webpdemux\"):\n feature.webpmux = \"webpmux\"\n\n for f in feature:\n if not getattr(feature, f) and feature.require(f):\n raise ValueError(\n '--enable-%s requested but %s not found, aborting.'\n % (f, f))\n\n #\n # core library\n\n files = [\"_imaging.c\"]\n for file in _IMAGING:\n files.append(file + \".c\")\n for file in _LIB_IMAGING:\n files.append(os.path.join(\"libImaging\", file + \".c\"))\n\n libs = []\n defs = []\n if feature.jpeg:\n libs.append(feature.jpeg)\n defs.append((\"HAVE_LIBJPEG\", None))\n if feature.zlib:\n libs.append(feature.zlib)\n defs.append((\"HAVE_LIBZ\", None))\n if feature.tiff:\n libs.append(feature.tiff)\n defs.append((\"HAVE_LIBTIFF\", None))\n if sys.platform == \"win32\":\n libs.extend([\"kernel32\", \"user32\", \"gdi32\"])\n if struct.unpack(\"h\", \"\\0\\1\".encode('ascii'))[0] == 1:\n defs.append((\"WORDS_BIGENDIAN\", None))\n\n exts = [(Extension(\n \"PIL._imaging\", files, libraries=libs, define_macros=defs))]\n\n #\n # additional libraries\n\n if feature.freetype:\n defs = []\n if feature.freetype_version == 20:\n defs.append((\"USE_FREETYPE_2_0\", None))\n exts.append(Extension(\n \"PIL._imagingft\", [\"_imagingft.c\"], libraries=[\"freetype\"],\n define_macros=defs))\n\n if os.path.isfile(\"_imagingtiff.c\") and feature.tiff:\n exts.append(Extension(\n \"PIL._imagingtiff\", [\"_imagingtiff.c\"], libraries=[\"tiff\"]))\n\n if os.path.isfile(\"_imagingcms.c\") and feature.lcms:\n extra = []\n if sys.platform == \"win32\":\n extra.extend([\"user32\", \"gdi32\"])\n exts.append(Extension(\n \"PIL._imagingcms\", [\"_imagingcms.c\"], libraries=[\"lcms2\"] + extra))\n\n if os.path.isfile(\"_webp.c\") and feature.webp:\n libs = [\"webp\"]\n defs = []\n\n if feature.webpmux:\n defs.append((\"HAVE_WEBPMUX\", None))\n libs.append(\"webpmux\")\n libs.append(\"webpdemux\")\n\n exts.append(Extension(\n \"PIL._webp\", [\"_webp.c\"], libraries=libs, define_macros=defs))\n\n if sys.platform == \"darwin\":\n # locate Tcl/Tk frameworks\n frameworks = []\n framework_roots = [\n \"/Library/Frameworks\",\n \"/System/Library/Frameworks\"]\n for root in framework_roots:\n if (\n os.path.exists(os.path.join(root, \"Tcl.framework\")) and\n os.path.exists(os.path.join(root, \"Tk.framework\"))):\n print(\"--- using frameworks at %s\" % root)\n frameworks = [\"-framework\", \"Tcl\", \"-framework\", \"Tk\"]\n dir = os.path.join(root, \"Tcl.framework\", \"Headers\")\n _add_directory(self.compiler.include_dirs, dir, 0)\n dir = os.path.join(root, \"Tk.framework\", \"Headers\")\n _add_directory(self.compiler.include_dirs, dir, 1)\n break\n if frameworks:\n exts.append(Extension(\n \"PIL._imagingtk\", [\"_imagingtk.c\", \"Tk/tkImaging.c\"],\n extra_compile_args=frameworks, extra_link_args=frameworks))\n feature.tcl = feature.tk = 1 # mark as present\n elif feature.tcl and feature.tk:\n exts.append(Extension(\n \"PIL._imagingtk\", [\"_imagingtk.c\", \"Tk/tkImaging.c\"],\n libraries=[feature.tcl, feature.tk]))\n\n if os.path.isfile(\"_imagingmath.c\"):\n exts.append(Extension(\"PIL._imagingmath\", [\"_imagingmath.c\"]))\n\n self.extensions[:] = exts\n\n build_ext.build_extensions(self)\n\n #\n # sanity and security checks\n\n unsafe_zlib = None\n\n if feature.zlib:\n unsafe_zlib = self.check_zlib_version(self.compiler.include_dirs)\n\n self.summary_report(feature, unsafe_zlib)\n\n def summary_report(self, feature, unsafe_zlib):\n\n print(\"-\" * 68)\n print(\"PIL SETUP SUMMARY\")\n print(\"-\" * 68)\n print(\"version Pillow %s\" % VERSION)\n v = sys.version.split(\"[\")\n print(\"platform %s %s\" % (sys.platform, v[0].strip()))\n for v in v[1:]:\n print(\" [%s\" % v.strip())\n print(\"-\" * 68)\n\n options = [\n (feature.tcl and feature.tk, \"TKINTER\"),\n (feature.jpeg, \"JPEG\"),\n (feature.zlib, \"ZLIB (PNG/ZIP)\"),\n (feature.tiff, \"LIBTIFF\"),\n (feature.freetype, \"FREETYPE2\"),\n (feature.lcms, \"LITTLECMS2\"),\n (feature.webp, \"WEBP\"),\n (feature.webpmux, \"WEBPMUX\"), ]\n\n all = 1\n for option in options:\n if option[0]:\n print(\"--- %s support available\" % option[1])\n else:\n print(\"*** %s support not available\" % option[1])\n if option[1] == \"TKINTER\" and _tkinter:\n version = _tkinter.TCL_VERSION\n print(\"(Tcl/Tk %s libraries needed)\" % version)\n all = 0\n\n if feature.zlib and unsafe_zlib:\n print(\"\")\n print(\"*** Warning: zlib\", unsafe_zlib)\n print(\"may contain a security vulnerability.\")\n print(\"*** Consider upgrading to zlib 1.2.3 or newer.\")\n print(\"*** See: http://www.kb.cert.org/vuls/id/238678\")\n print(\" http://www.kb.cert.org/vuls/id/680620\")\n print(\" http://www.gzip.org/zlib/advisory-2002-03-11.txt\")\n print(\"\")\n\n print(\"-\" * 68)\n\n if not all:\n print(\"To add a missing option, make sure you have the required\")\n print(\"library, and set the corresponding ROOT variable in the\")\n print(\"setup.py script.\")\n print(\"\")\n\n print(\"To check the build, run the selftest.py script.\")\n print(\"\")\n\n def check_zlib_version(self, include_dirs):\n # look for unsafe versions of zlib\n for dir in include_dirs:\n zlibfile = os.path.join(dir, \"zlib.h\")\n if os.path.isfile(zlibfile):\n break\n else:\n return\n for line in open(zlibfile).readlines():\n m = re.match('#define\\s+ZLIB_VERSION\\s+\"([^\"]*)\"', line)\n if not m:\n continue\n if m.group(1) < \"1.2.3\":\n return m.group(1)\n\n # http://hg.python.org/users/barry/rev/7e8deab93d5a\n def add_multiarch_paths(self):\n # Debian/Ubuntu multiarch support.\n # https://wiki.ubuntu.com/MultiarchSpec\n # self.build_temp\n tmpfile = os.path.join(self.build_temp, 'multiarch')\n if not os.path.exists(self.build_temp):\n os.makedirs(self.build_temp)\n ret = os.system(\n 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %\n tmpfile)\n try:\n if ret >> 8 == 0:\n fp = open(tmpfile, 'r')\n multiarch_path_component = fp.readline().strip()\n _add_directory(\n self.compiler.library_dirs,\n '/usr/lib/' + multiarch_path_component)\n _add_directory(\n self.compiler.include_dirs,\n '/usr/include/' + multiarch_path_component)\n finally:\n os.unlink(tmpfile)\n\nsetup(\n name=NAME,\n version=VERSION,\n description='Python Imaging Library (Fork)',\n long_description=(\n _read('README.rst') + b'\\n' +\n _read('CHANGES.rst')).decode('utf-8'),\n author='Alex Clark (fork author)',\n author_email='[email protected]',\n url='http://python-imaging.github.io/',\n classifiers=[\n \"Development Status :: 6 - Mature\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Scanners\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Programming Language :: Python :: 2\",\n \"Programming Language :: Python :: 2.6\",\n \"Programming Language :: Python :: 2.7\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.2\",\n \"Programming Language :: Python :: 3.3\", ],\n cmdclass={\"build_ext\": pil_build_ext},\n ext_modules=[Extension(\"PIL._imaging\", [\"_imaging.c\"])],\n include_package_data=True,\n packages=find_packages(),\n scripts=glob.glob(\"Scripts/pil*.py\"),\n test_suite='PIL.tests',\n keywords=[\"Imaging\",],\n license='Standard PIL License',\n zip_safe=True,\n )\n\n", "path": "setup.py" } ]
[ { "content": "# > pyroma .\n# ------------------------------\n# Checking .\n# Found Pillow\n# ------------------------------\n# Final rating: 10/10\n# Your cheese is so fresh most people think it's a cream: Mascarpone\n# ------------------------------\nfrom __future__ import print_function\nimport glob\nimport os\nimport platform as plat\nimport re\nimport struct\nimport sys\n\nfrom distutils.command.build_ext import build_ext\nfrom distutils import sysconfig\nfrom setuptools import Extension, setup, find_packages\n\n\n_IMAGING = (\n \"decode\", \"encode\", \"map\", \"display\", \"outline\", \"path\")\n\n_LIB_IMAGING = (\n \"Access\", \"AlphaComposite\", \"Antialias\", \"Bands\", \"BitDecode\", \"Blend\",\n \"Chops\", \"Convert\", \"ConvertYCbCr\", \"Copy\", \"Crc32\", \"Crop\", \"Dib\", \"Draw\",\n \"Effects\", \"EpsEncode\", \"File\", \"Fill\", \"Filter\", \"FliDecode\",\n \"Geometry\", \"GetBBox\", \"GifDecode\", \"GifEncode\", \"HexDecode\",\n \"Histo\", \"JpegDecode\", \"JpegEncode\", \"LzwDecode\", \"Matrix\",\n \"ModeFilter\", \"MspDecode\", \"Negative\", \"Offset\", \"Pack\",\n \"PackDecode\", \"Palette\", \"Paste\", \"Quant\", \"QuantOctree\", \"QuantHash\",\n \"QuantHeap\", \"PcdDecode\", \"PcxDecode\", \"PcxEncode\", \"Point\",\n \"RankFilter\", \"RawDecode\", \"RawEncode\", \"Storage\", \"SunRleDecode\",\n \"TgaRleDecode\", \"Unpack\", \"UnpackYCC\", \"UnsharpMask\", \"XbmDecode\",\n \"XbmEncode\", \"ZipDecode\", \"ZipEncode\", \"TiffDecode\")\n\n\ndef _add_directory(path, dir, where=None):\n if dir is None:\n return\n dir = os.path.realpath(dir)\n if os.path.isdir(dir) and dir not in path:\n if where is None:\n path.append(dir)\n else:\n path.insert(where, dir)\n\n\ndef _find_include_file(self, include):\n for directory in self.compiler.include_dirs:\n if os.path.isfile(os.path.join(directory, include)):\n return 1\n return 0\n\n\ndef _find_library_file(self, library):\n # Fix for 3.2.x <3.2.4, 3.3.0, shared lib extension is the python shared\n # lib extension, not the system shared lib extension: e.g. .cpython-33.so\n # vs .so. See Python bug http://bugs.python.org/16754\n if 'cpython' in self.compiler.shared_lib_extension:\n existing = self.compiler.shared_lib_extension\n self.compiler.shared_lib_extension = \".\" + existing.split('.')[-1]\n ret = self.compiler.find_library_file(\n self.compiler.library_dirs, library)\n self.compiler.shared_lib_extension = existing\n return ret\n else:\n return self.compiler.find_library_file(\n self.compiler.library_dirs, library)\n\n\ndef _lib_include(root):\n # map root to (root/lib, root/include)\n return os.path.join(root, \"lib\"), os.path.join(root, \"include\")\n\n\ndef _read(file):\n return open(file, 'rb').read()\n\ntry:\n import _tkinter\nexcept (ImportError, OSError):\n # pypy emits an oserror\n _tkinter = None\n\n\nNAME = 'Pillow'\nVERSION = '2.3.0'\nTCL_ROOT = None\nJPEG_ROOT = None\nZLIB_ROOT = None\nTIFF_ROOT = None\nFREETYPE_ROOT = None\nLCMS_ROOT = None\n\n\nclass pil_build_ext(build_ext):\n\n class feature:\n zlib = jpeg = tiff = freetype = tcl = tk = lcms = webp = webpmux = None\n required = []\n\n def require(self, feat):\n return feat in self.required\n def want(self, feat):\n return getattr(self, feat) is None\n\n def __iter__(self):\n for x in dir(self):\n if x[1] != '_':\n yield x\n\n feature = feature()\n\n user_options = build_ext.user_options + [\n ('disable-%s' % x, None, 'Disable support for %s' % x)\n for x in feature\n ] + [\n ('enable-%s' % x, None, 'Enable support for %s' % x)\n for x in feature\n ]\n\n def initialize_options(self):\n build_ext.initialize_options(self)\n for x in self.feature:\n setattr(self, 'disable_%s' % x, None)\n setattr(self, 'enable_%s' % x, None)\n\n def finalize_options(self):\n build_ext.finalize_options(self)\n for x in self.feature:\n if getattr(self, 'disable_%s' % x):\n setattr(self.feature, x, False)\n if getattr(self, 'enable_%s' % x):\n raise ValueError(\n 'Conflicting options: --enable-%s and --disable-%s'\n % (x, x))\n if getattr(self, 'enable_%s' % x):\n self.feature.required.append(x)\n\n def build_extensions(self):\n\n global TCL_ROOT\n\n library_dirs = []\n include_dirs = []\n\n _add_directory(include_dirs, \"libImaging\")\n\n #\n # add configured kits\n\n for root in (TCL_ROOT, JPEG_ROOT, TIFF_ROOT, ZLIB_ROOT,\n FREETYPE_ROOT, LCMS_ROOT):\n if isinstance(root, type(())):\n lib_root, include_root = root\n else:\n lib_root = include_root = root\n _add_directory(library_dirs, lib_root)\n _add_directory(include_dirs, include_root)\n\n # respect CFLAGS/LDFLAGS\n for k in ('CFLAGS', 'LDFLAGS'):\n if k in os.environ:\n for match in re.finditer(r'-I([^\\s]+)', os.environ[k]):\n _add_directory(include_dirs, match.group(1))\n for match in re.finditer(r'-L([^\\s]+)', os.environ[k]):\n _add_directory(library_dirs, match.group(1))\n\n # include, rpath, if set as environment variables:\n for k in ('C_INCLUDE_PATH', 'CPATH', 'INCLUDE'):\n if k in os.environ:\n for d in os.environ[k].split(os.path.pathsep):\n _add_directory(include_dirs, d)\n\n for k in ('LD_RUN_PATH', 'LIBRARY_PATH', 'LIB'):\n if k in os.environ:\n for d in os.environ[k].split(os.path.pathsep):\n _add_directory(library_dirs, d)\n\n prefix = sysconfig.get_config_var(\"prefix\")\n if prefix:\n _add_directory(library_dirs, os.path.join(prefix, \"lib\"))\n _add_directory(include_dirs, os.path.join(prefix, \"include\"))\n\n #\n # add platform directories\n\n if sys.platform == \"cygwin\":\n # pythonX.Y.dll.a is in the /usr/lib/pythonX.Y/config directory\n _add_directory(library_dirs, os.path.join(\n \"/usr/lib\", \"python%s\" % sys.version[:3], \"config\"))\n\n elif sys.platform == \"darwin\":\n # attempt to make sure we pick freetype2 over other versions\n _add_directory(include_dirs, \"/sw/include/freetype2\")\n _add_directory(include_dirs, \"/sw/lib/freetype2/include\")\n # fink installation directories\n _add_directory(library_dirs, \"/sw/lib\")\n _add_directory(include_dirs, \"/sw/include\")\n # darwin ports installation directories\n _add_directory(library_dirs, \"/opt/local/lib\")\n _add_directory(include_dirs, \"/opt/local/include\")\n \n # if homebrew is installed, use its lib and include directories\n import subprocess\n try:\n prefix = subprocess.check_output(['brew', '--prefix'])\n if prefix:\n prefix = prefix.strip()\n _add_directory(library_dirs, os.path.join(prefix, 'lib'))\n _add_directory(include_dirs, os.path.join(prefix, 'include'))\n \n # freetype2 is a key-only brew under opt/\n _add_directory(library_dirs, os.path.join(prefix, 'opt', 'freetype', 'lib'))\n _add_directory(include_dirs, os.path.join(prefix, 'opt', 'freetype', 'include'))\n except:\n pass # homebrew not installed\n \n # freetype2 ships with X11 (after homebrew, so that homebrew freetype is preferred)\n _add_directory(library_dirs, \"/usr/X11/lib\")\n _add_directory(include_dirs, \"/usr/X11/include\")\n\n elif sys.platform.startswith(\"linux\"):\n for platform_ in (plat.architecture()[0], plat.processor()):\n\n if not platform_:\n continue\n\n if platform_ in [\"x86_64\", \"64bit\"]:\n _add_directory(library_dirs, \"/lib64\")\n _add_directory(library_dirs, \"/usr/lib64\")\n _add_directory(library_dirs, \"/usr/lib/x86_64-linux-gnu\")\n break\n elif platform_ in [\"i386\", \"i686\", \"32bit\"]:\n _add_directory(library_dirs, \"/usr/lib/i386-linux-gnu\")\n break\n elif platform_ in [\"aarch64\"]:\n _add_directory(library_dirs, \"/usr/lib64\")\n _add_directory(library_dirs, \"/usr/lib/aarch64-linux-gnu\")\n break\n elif platform_ in [\"arm\", \"armv7l\"]:\n _add_directory(library_dirs, \"/usr/lib/arm-linux-gnueabi\")\n break\n elif platform_ in [\"ppc64\"]:\n _add_directory(library_dirs, \"/usr/lib64\")\n _add_directory(library_dirs, \"/usr/lib/ppc64-linux-gnu\")\n _add_directory(library_dirs, \"/usr/lib/powerpc64-linux-gnu\")\n break\n elif platform_ in [\"ppc\"]:\n _add_directory(library_dirs, \"/usr/lib/ppc-linux-gnu\")\n _add_directory(library_dirs, \"/usr/lib/powerpc-linux-gnu\")\n break\n elif platform_ in [\"s390x\"]:\n _add_directory(library_dirs, \"/usr/lib64\")\n _add_directory(library_dirs, \"/usr/lib/s390x-linux-gnu\")\n break\n elif platform_ in [\"s390\"]:\n _add_directory(library_dirs, \"/usr/lib/s390-linux-gnu\")\n break\n else:\n raise ValueError(\n \"Unable to identify Linux platform: `%s`\" % platform_)\n\n # XXX Kludge. Above /\\ we brute force support multiarch. Here we\n # try Barry's more general approach. Afterward, something should\n # work ;-)\n self.add_multiarch_paths()\n\n elif sys.platform.startswith(\"gnu\"):\n self.add_multiarch_paths()\n\n elif sys.platform.startswith(\"netbsd\"):\n _add_directory(library_dirs, \"/usr/pkg/lib\")\n _add_directory(include_dirs, \"/usr/pkg/include\")\n\n # FIXME: check /opt/stuff directories here?\n\n #\n # locate tkinter libraries\n\n if _tkinter:\n TCL_VERSION = _tkinter.TCL_VERSION[:3]\n\n if _tkinter and not TCL_ROOT:\n # we have Tkinter but the TCL_ROOT variable was not set;\n # try to locate appropriate Tcl/Tk libraries\n PYVERSION = sys.version[0] + sys.version[2]\n TCLVERSION = TCL_VERSION[0] + TCL_VERSION[2]\n roots = [\n # common installation directories, mostly for Windows\n # (for Unix-style platforms, we'll check in well-known\n # locations later)\n os.path.join(\"/py\" + PYVERSION, \"Tcl\"),\n os.path.join(\"/python\" + PYVERSION, \"Tcl\"),\n \"/Tcl\", \"/Tcl\" + TCLVERSION, \"/Tcl\" + TCL_VERSION,\n os.path.join(os.environ.get(\"ProgramFiles\", \"\"), \"Tcl\"), ]\n for TCL_ROOT in roots:\n TCL_ROOT = os.path.abspath(TCL_ROOT)\n if os.path.isfile(os.path.join(TCL_ROOT, \"include\", \"tk.h\")):\n # FIXME: use distutils logging (?)\n print(\"--- using Tcl/Tk libraries at\", TCL_ROOT)\n print(\"--- using Tcl/Tk version\", TCL_VERSION)\n TCL_ROOT = _lib_include(TCL_ROOT)\n break\n else:\n TCL_ROOT = None\n\n # add standard directories\n\n # look for tcl specific subdirectory (e.g debian)\n if _tkinter:\n tcl_dir = \"/usr/include/tcl\" + TCL_VERSION\n if os.path.isfile(os.path.join(tcl_dir, \"tk.h\")):\n _add_directory(include_dirs, tcl_dir)\n\n # standard locations\n _add_directory(library_dirs, \"/usr/local/lib\")\n _add_directory(include_dirs, \"/usr/local/include\")\n\n _add_directory(library_dirs, \"/usr/lib\")\n _add_directory(include_dirs, \"/usr/include\")\n\n #\n # insert new dirs *before* default libs, to avoid conflicts\n # between Python PYD stub libs and real libraries\n\n self.compiler.library_dirs = library_dirs + self.compiler.library_dirs\n self.compiler.include_dirs = include_dirs + self.compiler.include_dirs\n\n #\n # look for available libraries\n\n feature = self.feature\n\n if feature.want('zlib'):\n if _find_include_file(self, \"zlib.h\"):\n if _find_library_file(self, \"z\"):\n feature.zlib = \"z\"\n elif sys.platform == \"win32\" and _find_library_file(self, \"zlib\"):\n feature.zlib = \"zlib\" # alternative name\n\n if feature.want('jpeg'):\n if _find_include_file(self, \"jpeglib.h\"):\n if _find_library_file(self, \"jpeg\"):\n feature.jpeg = \"jpeg\"\n elif (\n sys.platform == \"win32\" and\n _find_library_file(self, \"libjpeg\")):\n feature.jpeg = \"libjpeg\" # alternative name\n\n if feature.want('tiff'):\n if _find_library_file(self, \"tiff\"):\n feature.tiff = \"tiff\"\n if sys.platform == \"win32\" and _find_library_file(self, \"libtiff\"):\n feature.tiff = \"libtiff\"\n if sys.platform == \"darwin\" and _find_library_file(self, \"libtiff\"):\n feature.tiff = \"libtiff\"\n\n if feature.want('freetype'):\n if _find_library_file(self, \"freetype\"):\n # look for freetype2 include files\n freetype_version = 0\n for dir in self.compiler.include_dirs:\n if os.path.isfile(os.path.join(dir, \"ft2build.h\")):\n freetype_version = 21\n dir = os.path.join(dir, \"freetype2\")\n break\n dir = os.path.join(dir, \"freetype2\")\n if os.path.isfile(os.path.join(dir, \"ft2build.h\")):\n freetype_version = 21\n break\n if os.path.isdir(os.path.join(dir, \"freetype\")):\n freetype_version = 20\n break\n if freetype_version:\n feature.freetype = \"freetype\"\n feature.freetype_version = freetype_version\n if dir:\n _add_directory(self.compiler.include_dirs, dir, 0)\n\n if feature.want('lcms'):\n if _find_include_file(self, \"lcms2.h\"):\n if _find_library_file(self, \"lcms2\"):\n feature.lcms = \"lcms\"\n\n if _tkinter and _find_include_file(self, \"tk.h\"):\n # the library names may vary somewhat (e.g. tcl84 or tcl8.4)\n version = TCL_VERSION[0] + TCL_VERSION[2]\n if feature.want('tcl'):\n if _find_library_file(self, \"tcl\" + version):\n feature.tcl = \"tcl\" + version\n elif _find_library_file(self, \"tcl\" + TCL_VERSION):\n feature.tcl = \"tcl\" + TCL_VERSION\n if feature.want('tk'):\n if _find_library_file(self, \"tk\" + version):\n feature.tk = \"tk\" + version\n elif _find_library_file(self, \"tk\" + TCL_VERSION):\n feature.tk = \"tk\" + TCL_VERSION\n\n if feature.want('webp'):\n if (_find_include_file(self, \"webp/encode.h\") and\n _find_include_file(self, \"webp/decode.h\")):\n if _find_library_file(self, \"webp\"): # in googles precompiled zip it is call \"libwebp\"\n feature.webp = \"webp\"\n\n if feature.want('webpmux'):\n if (_find_include_file(self, \"webp/mux.h\") and\n _find_include_file(self, \"webp/demux.h\")):\n if _find_library_file(self, \"webpmux\") and _find_library_file(self, \"webpdemux\"):\n feature.webpmux = \"webpmux\"\n\n for f in feature:\n if not getattr(feature, f) and feature.require(f):\n raise ValueError(\n '--enable-%s requested but %s not found, aborting.'\n % (f, f))\n\n #\n # core library\n\n files = [\"_imaging.c\"]\n for file in _IMAGING:\n files.append(file + \".c\")\n for file in _LIB_IMAGING:\n files.append(os.path.join(\"libImaging\", file + \".c\"))\n\n libs = []\n defs = []\n if feature.jpeg:\n libs.append(feature.jpeg)\n defs.append((\"HAVE_LIBJPEG\", None))\n if feature.zlib:\n libs.append(feature.zlib)\n defs.append((\"HAVE_LIBZ\", None))\n if feature.tiff:\n libs.append(feature.tiff)\n defs.append((\"HAVE_LIBTIFF\", None))\n if sys.platform == \"win32\":\n libs.extend([\"kernel32\", \"user32\", \"gdi32\"])\n if struct.unpack(\"h\", \"\\0\\1\".encode('ascii'))[0] == 1:\n defs.append((\"WORDS_BIGENDIAN\", None))\n\n exts = [(Extension(\n \"PIL._imaging\", files, libraries=libs, define_macros=defs))]\n\n #\n # additional libraries\n\n if feature.freetype:\n defs = []\n if feature.freetype_version == 20:\n defs.append((\"USE_FREETYPE_2_0\", None))\n exts.append(Extension(\n \"PIL._imagingft\", [\"_imagingft.c\"], libraries=[\"freetype\"],\n define_macros=defs))\n\n if os.path.isfile(\"_imagingtiff.c\") and feature.tiff:\n exts.append(Extension(\n \"PIL._imagingtiff\", [\"_imagingtiff.c\"], libraries=[\"tiff\"]))\n\n if os.path.isfile(\"_imagingcms.c\") and feature.lcms:\n extra = []\n if sys.platform == \"win32\":\n extra.extend([\"user32\", \"gdi32\"])\n exts.append(Extension(\n \"PIL._imagingcms\", [\"_imagingcms.c\"], libraries=[\"lcms2\"] + extra))\n\n if os.path.isfile(\"_webp.c\") and feature.webp:\n libs = [\"webp\"]\n defs = []\n\n if feature.webpmux:\n defs.append((\"HAVE_WEBPMUX\", None))\n libs.append(\"webpmux\")\n libs.append(\"webpdemux\")\n\n exts.append(Extension(\n \"PIL._webp\", [\"_webp.c\"], libraries=libs, define_macros=defs))\n\n if sys.platform == \"darwin\":\n # locate Tcl/Tk frameworks\n frameworks = []\n framework_roots = [\n \"/Library/Frameworks\",\n \"/System/Library/Frameworks\"]\n for root in framework_roots:\n if (\n os.path.exists(os.path.join(root, \"Tcl.framework\")) and\n os.path.exists(os.path.join(root, \"Tk.framework\"))):\n print(\"--- using frameworks at %s\" % root)\n frameworks = [\"-framework\", \"Tcl\", \"-framework\", \"Tk\"]\n dir = os.path.join(root, \"Tcl.framework\", \"Headers\")\n _add_directory(self.compiler.include_dirs, dir, 0)\n dir = os.path.join(root, \"Tk.framework\", \"Headers\")\n _add_directory(self.compiler.include_dirs, dir, 1)\n break\n if frameworks:\n exts.append(Extension(\n \"PIL._imagingtk\", [\"_imagingtk.c\", \"Tk/tkImaging.c\"],\n extra_compile_args=frameworks, extra_link_args=frameworks))\n feature.tcl = feature.tk = 1 # mark as present\n elif feature.tcl and feature.tk:\n exts.append(Extension(\n \"PIL._imagingtk\", [\"_imagingtk.c\", \"Tk/tkImaging.c\"],\n libraries=[feature.tcl, feature.tk]))\n\n if os.path.isfile(\"_imagingmath.c\"):\n exts.append(Extension(\"PIL._imagingmath\", [\"_imagingmath.c\"]))\n\n self.extensions[:] = exts\n\n build_ext.build_extensions(self)\n\n #\n # sanity and security checks\n\n unsafe_zlib = None\n\n if feature.zlib:\n unsafe_zlib = self.check_zlib_version(self.compiler.include_dirs)\n\n self.summary_report(feature, unsafe_zlib)\n\n def summary_report(self, feature, unsafe_zlib):\n\n print(\"-\" * 68)\n print(\"PIL SETUP SUMMARY\")\n print(\"-\" * 68)\n print(\"version Pillow %s\" % VERSION)\n v = sys.version.split(\"[\")\n print(\"platform %s %s\" % (sys.platform, v[0].strip()))\n for v in v[1:]:\n print(\" [%s\" % v.strip())\n print(\"-\" * 68)\n\n options = [\n (feature.tcl and feature.tk, \"TKINTER\"),\n (feature.jpeg, \"JPEG\"),\n (feature.zlib, \"ZLIB (PNG/ZIP)\"),\n (feature.tiff, \"LIBTIFF\"),\n (feature.freetype, \"FREETYPE2\"),\n (feature.lcms, \"LITTLECMS2\"),\n (feature.webp, \"WEBP\"),\n (feature.webpmux, \"WEBPMUX\"), ]\n\n all = 1\n for option in options:\n if option[0]:\n print(\"--- %s support available\" % option[1])\n else:\n print(\"*** %s support not available\" % option[1])\n if option[1] == \"TKINTER\" and _tkinter:\n version = _tkinter.TCL_VERSION\n print(\"(Tcl/Tk %s libraries needed)\" % version)\n all = 0\n\n if feature.zlib and unsafe_zlib:\n print(\"\")\n print(\"*** Warning: zlib\", unsafe_zlib)\n print(\"may contain a security vulnerability.\")\n print(\"*** Consider upgrading to zlib 1.2.3 or newer.\")\n print(\"*** See: http://www.kb.cert.org/vuls/id/238678\")\n print(\" http://www.kb.cert.org/vuls/id/680620\")\n print(\" http://www.gzip.org/zlib/advisory-2002-03-11.txt\")\n print(\"\")\n\n print(\"-\" * 68)\n\n if not all:\n print(\"To add a missing option, make sure you have the required\")\n print(\"library, and set the corresponding ROOT variable in the\")\n print(\"setup.py script.\")\n print(\"\")\n\n print(\"To check the build, run the selftest.py script.\")\n print(\"\")\n\n def check_zlib_version(self, include_dirs):\n # look for unsafe versions of zlib\n for dir in include_dirs:\n zlibfile = os.path.join(dir, \"zlib.h\")\n if os.path.isfile(zlibfile):\n break\n else:\n return\n for line in open(zlibfile).readlines():\n m = re.match('#define\\s+ZLIB_VERSION\\s+\"([^\"]*)\"', line)\n if not m:\n continue\n if m.group(1) < \"1.2.3\":\n return m.group(1)\n\n # http://hg.python.org/users/barry/rev/7e8deab93d5a\n def add_multiarch_paths(self):\n # Debian/Ubuntu multiarch support.\n # https://wiki.ubuntu.com/MultiarchSpec\n # self.build_temp\n tmpfile = os.path.join(self.build_temp, 'multiarch')\n if not os.path.exists(self.build_temp):\n os.makedirs(self.build_temp)\n ret = os.system(\n 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %\n tmpfile)\n try:\n if ret >> 8 == 0:\n fp = open(tmpfile, 'r')\n multiarch_path_component = fp.readline().strip()\n _add_directory(\n self.compiler.library_dirs,\n '/usr/lib/' + multiarch_path_component)\n _add_directory(\n self.compiler.include_dirs,\n '/usr/include/' + multiarch_path_component)\n finally:\n os.unlink(tmpfile)\n\nsetup(\n name=NAME,\n version=VERSION,\n description='Python Imaging Library (Fork)',\n long_description=(\n _read('README.rst') + b'\\n' +\n _read('CHANGES.rst')).decode('utf-8'),\n author='Alex Clark (fork author)',\n author_email='[email protected]',\n url='http://python-imaging.github.io/',\n classifiers=[\n \"Development Status :: 6 - Mature\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Scanners\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Programming Language :: Python :: 2\",\n \"Programming Language :: Python :: 2.6\",\n \"Programming Language :: Python :: 2.7\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.2\",\n \"Programming Language :: Python :: 3.3\", ],\n cmdclass={\"build_ext\": pil_build_ext},\n ext_modules=[Extension(\"PIL._imaging\", [\"_imaging.c\"])],\n include_package_data=True,\n packages=find_packages(),\n scripts=glob.glob(\"Scripts/pil*.py\"),\n test_suite='PIL.tests',\n keywords=[\"Imaging\",],\n license='Standard PIL License',\n zip_safe=True,\n )\n\n", "path": "setup.py" } ]
diff --git a/.gitignore b/.gitignore index 0a642e562e9..f16a1f9a8b8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,8 @@ docs/_build # Vim cruft .*.swp + +#emacs +*~ +\#*# +.#* diff --git a/.travis.yml b/.travis.yml index fc7b5e6a53e..d68de0b3279 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,9 @@ language: python virtualenv: system_site_packages: true +notifications: + irc: "chat.freenode.net#pil" + python: - 2.6 - 2.7 @@ -12,10 +15,14 @@ python: - "pypy" install: - - "sudo apt-get -qq install libfreetype6-dev liblcms2-dev libwebp-dev python-qt4 ghostscript libffi-dev" + - "sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-qt4 ghostscript libffi-dev cmake" - "pip install cffi" - - "sudo apt-get install python-tk" + # webp + - pushd depends && ./install_webp.sh && popd + + # openjpeg + - pushd depends && ./install_openjpeg.sh && popd script: - python setup.py clean diff --git a/Tests/test_image_point.py b/Tests/test_image_point.py index c70556f6ab0..34233f80ef5 100644 --- a/Tests/test_image_point.py +++ b/Tests/test_image_point.py @@ -2,6 +2,11 @@ from PIL import Image +if hasattr(sys, 'pypy_version_info'): + # This takes _forever_ on pypy. Open Bug, + # see https://github.com/python-imaging/Pillow/issues/484 + skip() + def test_sanity(): im = lena() diff --git a/Tests/test_imagetk.py b/Tests/test_imagetk.py index 5c39c928369..b30971e8f2e 100644 --- a/Tests/test_imagetk.py +++ b/Tests/test_imagetk.py @@ -3,7 +3,7 @@ from PIL import Image try: from PIL import ImageTk -except ImportError as v: +except (OSError, ImportError) as v: skip(v) success() diff --git a/depends/install_openjpeg.sh b/depends/install_openjpeg.sh new file mode 100755 index 00000000000..bd6b83e3b8d --- /dev/null +++ b/depends/install_openjpeg.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# install openjpeg + + +if [ ! -f openjpeg-2.0.0.tar.gz ]; then + wget 'https://openjpeg.googlecode.com/files/openjpeg-2.0.0.tar.gz' +fi + +rm -r openjpeg-2.0.0 +tar -xvzf openjpeg-2.0.0.tar.gz + + +pushd openjpeg-2.0.0 + +cmake -DCMAKE_INSTALL_PREFIX=/usr . && make && sudo make install + +popd + diff --git a/depends/install_webp.sh b/depends/install_webp.sh new file mode 100755 index 00000000000..5f5963712da --- /dev/null +++ b/depends/install_webp.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# install webp + + +if [ ! -f libwebp-0.4.0.tar.gz ]; then + wget 'https://webp.googlecode.com/files/libwebp-0.4.0.tar.gz' +fi + +rm -r libwebp-0.4.0 +tar -xvzf libwebp-0.4.0.tar.gz + + +pushd libwebp-0.4.0 + +./configure --prefix=/usr --enable-libwebpmux --enable-libwebpdemux && make && sudo make install + +popd + diff --git a/setup.py b/setup.py index a8ff2e76254..aa923838346 100644 --- a/setup.py +++ b/setup.py @@ -80,7 +80,8 @@ def _read(file): try: import _tkinter -except ImportError: +except (ImportError, OSError): + # pypy emits an oserror _tkinter = None
watchdogpolska__small_eod-479
Tagi Stworzenie ekranu Tagi tabela zawiera kolumnę * tag (pole `name` w serializatorze) Ekran paginowy wielkość strony 20 Ekran dostępny z menu bocznego
[ { "content": "from rest_framework import serializers\nfrom .models import Tag\n\n\nclass TagSerializer(serializers.ModelSerializer):\n class Meta:\n model = Tag\n fields = [\n \"name\",\n ]\n", "path": "backend-project/small_eod/tags/serializers.py" } ]
[ { "content": "from rest_framework import serializers\nfrom .models import Tag\n\n\nclass TagSerializer(serializers.ModelSerializer):\n class Meta:\n model = Tag\n fields = [\n \"name\",\n \"id\",\n ]\n", "path": "backend-project/small_eod/tags/serializers.py" } ]
diff --git a/backend-project/small_eod/tags/serializers.py b/backend-project/small_eod/tags/serializers.py index 1a94fd7f3..720e782c2 100644 --- a/backend-project/small_eod/tags/serializers.py +++ b/backend-project/small_eod/tags/serializers.py @@ -7,4 +7,5 @@ class Meta: model = Tag fields = [ "name", + "id", ] diff --git a/frontend-project/config/config.ts b/frontend-project/config/config.ts index c0d145d23..d93e90e4a 100644 --- a/frontend-project/config/config.ts +++ b/frontend-project/config/config.ts @@ -117,6 +117,12 @@ export default { }, ], }, + { + name: 'tags', + icon: 'FileTextOutlined', + path: '/tags', + component: './tags/list', + }, { name: 'letters', icon: 'FileTextOutlined', diff --git a/frontend-project/src/locales/en-US/menu.ts b/frontend-project/src/locales/en-US/menu.ts index 8cea7dbc5..26a31863b 100644 --- a/frontend-project/src/locales/en-US/menu.ts +++ b/frontend-project/src/locales/en-US/menu.ts @@ -8,6 +8,7 @@ export default { 'menu.cases': 'Cases', 'menu.cases.new': 'New', 'menu.cases.list': 'List', + 'menu.tags': 'Tags', 'menu.exception': 'Exception', 'menu.exception.not-find': '404', 'menu.exception.not-permission': '403', diff --git a/frontend-project/src/locales/pl-PL/menu.ts b/frontend-project/src/locales/pl-PL/menu.ts index b7f2edc0b..c8bc4e5a5 100644 --- a/frontend-project/src/locales/pl-PL/menu.ts +++ b/frontend-project/src/locales/pl-PL/menu.ts @@ -2,6 +2,7 @@ export default { 'menu.cases': 'Sprawy', 'menu.cases.new': 'Nowa', 'menu.cases.list': 'Lista', + 'menu.tags': 'Tagi', 'menu.home': 'Strona główna', 'menu.institutions': 'Instytucje', 'menu.institutions.new': 'Nowa', diff --git a/frontend-project/src/models/tags.ts b/frontend-project/src/models/tags.ts index 3d4f08481..794bbc1b7 100644 --- a/frontend-project/src/models/tags.ts +++ b/frontend-project/src/models/tags.ts @@ -1,21 +1,48 @@ -import { fetchAll } from '@/services/tags'; +import { fetchAll, fetchPage, Tag } from '@/services/tags'; +import { Effect, EffectsCommandMap } from 'dva'; +import { AnyAction, Reducer } from 'redux'; -const TagsModel = { +export interface TagModelType { + namespace: string; + state: Tag[]; + effects: { + fetchAll: Effect; + fetchPage: Effect; + }; + reducers: { + saveAll: Reducer<Tag[], AnyAction>; + savePage: Reducer<Tag[], AnyAction>; + }; +} +const defaultTagsState: Tag[] = []; + +const TagsModel: TagModelType = { namespace: 'tags', - state: [], + state: defaultTagsState, effects: { - *fetchAll(_, { call, put }) { + *fetchAll(_: AnyAction, { call, put }: EffectsCommandMap) { const response = yield call(fetchAll); yield put({ type: 'saveAll', payload: response, }); }, + *fetchPage({ payload }: AnyAction, { call, put }: EffectsCommandMap) { + const response = yield call(fetchPage, payload); + yield put({ + type: 'savePage', + payload: response, + }); + return response; + }, }, reducers: { saveAll(_, { payload }) { return payload.results; }, + savePage(_, { payload }) { + return payload.data; + }, }, }; export default TagsModel; diff --git a/frontend-project/src/pages/tags/list/index.tsx b/frontend-project/src/pages/tags/list/index.tsx new file mode 100644 index 000000000..dc70a7bef --- /dev/null +++ b/frontend-project/src/pages/tags/list/index.tsx @@ -0,0 +1,24 @@ +import { ProColumns } from '@ant-design/pro-table'; +import React, { FC } from 'react'; +import { formatMessage } from 'umi-plugin-react/locale'; +import { connect } from 'dva'; + +import { Tag } from '@/services/tags'; +import Table from '@/components/Table'; +import { PaginationParams, PaginationResponse } from '@/services/common.d'; + +const TableList: FC<{ dispatch: Function }> = ({ dispatch }) => { + const fetchData = (parameter: PaginationParams): Promise<PaginationResponse<Tag>> => { + return dispatch({ type: 'tags/fetchPage', payload: parameter }); + }; + + const columns: ProColumns<Tag>[] = [ + { + title: formatMessage({ id: 'tags-list.table.columns.name.title' }), + dataIndex: 'name', + }, + ]; + return <Table type="tags" columns={columns} fetchData={fetchData} />; +}; + +export default connect()(TableList); diff --git a/frontend-project/src/pages/tags/list/locales/en-US.ts b/frontend-project/src/pages/tags/list/locales/en-US.ts new file mode 100644 index 000000000..100fadd72 --- /dev/null +++ b/frontend-project/src/pages/tags/list/locales/en-US.ts @@ -0,0 +1,6 @@ +export default { + 'tags-list.page-header-content': 'List of tags', + 'tags-list.table-header-title': 'List of tags', + 'tags-list.table.columns.name.title': 'Name', + 'tags-list.table.total': 'Total', +}; diff --git a/frontend-project/src/pages/tags/list/locales/pl-PL.ts b/frontend-project/src/pages/tags/list/locales/pl-PL.ts new file mode 100644 index 000000000..a9f58bbb3 --- /dev/null +++ b/frontend-project/src/pages/tags/list/locales/pl-PL.ts @@ -0,0 +1,6 @@ +export default { + 'tags-list.page-header-content': 'Lista tagów', + 'tags-list.table-header-title': 'Lista tagów', + 'tags-list.table.columns.name.title': 'Nazwa', + 'tags-list.table.total': 'Łącznie', +}; diff --git a/frontend-project/src/services/institutions.ts b/frontend-project/src/services/institutions.ts index e2dea4f82..b234735b2 100644 --- a/frontend-project/src/services/institutions.ts +++ b/frontend-project/src/services/institutions.ts @@ -22,7 +22,7 @@ function fetchAllPages(page) { if (page.next) { const params = new URL(page.next).searchParams; return smallEodSDK - .tagsList({ + .institutionsList({ limit: params.get('limit'), offset: params.get('offset'), }) @@ -37,7 +37,8 @@ function fetchAllPages(page) { } export async function fetchAll() { - return new smallEodSDK.InstitutionsApi().institutionsList().then(page => fetchAllPages(page)); + smallEodSDK.InstitutionsApi(); + return smallEodSDK.institutionsList().then(page => fetchAllPages(page)); } export async function fetchOne(id: number) { diff --git a/frontend-project/src/services/tags.ts b/frontend-project/src/services/tags.ts index d584f51d4..194f3dc0e 100644 --- a/frontend-project/src/services/tags.ts +++ b/frontend-project/src/services/tags.ts @@ -1,6 +1,17 @@ +import { PaginationParams, PaginationResponse } from '@/services/common.d'; import smallEodSDK from '@/utils/sdk'; -function fetchAllPages(page) { +export interface Tag { + name: string; +} +export interface Page { + results: Tag[]; + count: number; + next: string; + previous: string; +} + +function fetchAllPages(page: Page) { if (page.next) { const params = new URL(page.next).searchParams; return smallEodSDK @@ -14,12 +25,25 @@ function fetchAllPages(page) { return fetchAllPages(nextPage); }); } - return page; } +export async function fetchPage({ + current, + pageSize, +}: PaginationParams): Promise<PaginationResponse<Tag>> { + const sdkResponse = await new smallEodSDK.TagsApi().tagsList({ + limit: pageSize, + offset: pageSize * (current - 1), + }); + + return { + data: sdkResponse.results, + total: sdkResponse.count, + }; +} + export async function fetchAll() { smallEodSDK.TagsApi(); - return smallEodSDK.tagsList().then(page => fetchAllPages(page)); }
encode__httpx-286
stop nox on first error During nox is running, if it gets an error, continues running. if we add this: `nox.options.stop_on_first_error = True`, we don't overlook check errors or others before PR.
[ { "content": "import nox\n\nsource_files = (\"httpx\", \"tests\", \"setup.py\", \"noxfile.py\")\n\n\[email protected](reuse_venv=True)\ndef lint(session):\n session.install(\"autoflake\", \"black\", \"flake8\", \"isort\", \"seed-isort-config\")\n\n session.run(\"autoflake\", \"--in-place\", \"--recursive\", *source_files)\n session.run(\"seed-isort-config\", \"--application-directories=httpx\")\n session.run(\"isort\", \"--project=httpx\", \"--recursive\", \"--apply\", *source_files)\n session.run(\"black\", \"--target-version=py36\", *source_files)\n\n check(session)\n\n\[email protected](reuse_venv=True)\ndef check(session):\n session.install(\n \"black\", \"flake8\", \"flake8-bugbear\", \"flake8-comprehensions\", \"mypy\"\n )\n\n session.run(\"black\", \"--check\", \"--diff\", \"--target-version=py36\", *source_files)\n session.run(\"flake8\", *source_files)\n session.run(\"mypy\", \"httpx\")\n\n\[email protected](reuse_venv=True)\ndef docs(session):\n session.install(\"mkdocs\", \"mkdocs-material\")\n\n session.run(\"mkdocs\", \"build\")\n\n\[email protected](python=[\"3.6\", \"3.7\", \"3.8\"])\ndef test(session):\n session.install(\"-r\", \"test-requirements.txt\")\n\n session.run(\"python\", \"-m\", \"pytest\")\n", "path": "noxfile.py" } ]
[ { "content": "import nox\n\nnox.options.stop_on_first_error = True\n\nsource_files = (\"httpx\", \"tests\", \"setup.py\", \"noxfile.py\")\n\n\[email protected](reuse_venv=True)\ndef lint(session):\n session.install(\"autoflake\", \"black\", \"flake8\", \"isort\", \"seed-isort-config\")\n\n session.run(\"autoflake\", \"--in-place\", \"--recursive\", *source_files)\n session.run(\"seed-isort-config\", \"--application-directories=httpx\")\n session.run(\"isort\", \"--project=httpx\", \"--recursive\", \"--apply\", *source_files)\n session.run(\"black\", \"--target-version=py36\", *source_files)\n\n check(session)\n\n\[email protected](reuse_venv=True)\ndef check(session):\n session.install(\n \"black\", \"flake8\", \"flake8-bugbear\", \"flake8-comprehensions\", \"mypy\"\n )\n\n session.run(\"black\", \"--check\", \"--diff\", \"--target-version=py36\", *source_files)\n session.run(\"flake8\", *source_files)\n session.run(\"mypy\", \"httpx\")\n\n\[email protected](reuse_venv=True)\ndef docs(session):\n session.install(\"mkdocs\", \"mkdocs-material\")\n\n session.run(\"mkdocs\", \"build\")\n\n\[email protected](python=[\"3.6\", \"3.7\", \"3.8\"])\ndef test(session):\n session.install(\"-r\", \"test-requirements.txt\")\n\n session.run(\"python\", \"-m\", \"pytest\")\n", "path": "noxfile.py" } ]
diff --git a/noxfile.py b/noxfile.py index 739470ab99..dea8595b85 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,5 +1,7 @@ import nox +nox.options.stop_on_first_error = True + source_files = ("httpx", "tests", "setup.py", "noxfile.py")
archlinux__archinstall-470
PermissionError redeclared in exceptions.py shadows built-in PermissionError class ``` class PermissionError(BaseException): pass ``` Can we remove this and just use the built-in? Or we could rename ours to something different.
[ { "content": "class RequirementError(BaseException):\n\tpass\n\n\nclass DiskError(BaseException):\n\tpass\n\n\nclass UnknownFilesystemFormat(BaseException):\n\tpass\n\n\nclass ProfileError(BaseException):\n\tpass\n\n\nclass SysCallError(BaseException):\n\tdef __init__(self, message, exit_code):\n\t\tsuper(SysCallError, self).__init__(message)\n\t\tself.message = message\n\t\tself.exit_code = exit_code\n\n\nclass ProfileNotFound(BaseException):\n\tpass\n\n\nclass HardwareIncompatibilityError(BaseException):\n\tpass\n\n\nclass PermissionError(BaseException):\n\tpass\n\n\nclass UserError(BaseException):\n\tpass\n\n\nclass ServiceException(BaseException):\n\tpass\n", "path": "archinstall/lib/exceptions.py" } ]
[ { "content": "class RequirementError(BaseException):\n\tpass\n\n\nclass DiskError(BaseException):\n\tpass\n\n\nclass UnknownFilesystemFormat(BaseException):\n\tpass\n\n\nclass ProfileError(BaseException):\n\tpass\n\n\nclass SysCallError(BaseException):\n\tdef __init__(self, message, exit_code):\n\t\tsuper(SysCallError, self).__init__(message)\n\t\tself.message = message\n\t\tself.exit_code = exit_code\n\n\nclass ProfileNotFound(BaseException):\n\tpass\n\n\nclass HardwareIncompatibilityError(BaseException):\n\tpass\n\n\nclass UserError(BaseException):\n\tpass\n\n\nclass ServiceException(BaseException):\n\tpass\n", "path": "archinstall/lib/exceptions.py" } ]
diff --git a/archinstall/lib/exceptions.py b/archinstall/lib/exceptions.py index 6837f58253..147b239b01 100644 --- a/archinstall/lib/exceptions.py +++ b/archinstall/lib/exceptions.py @@ -29,10 +29,6 @@ class HardwareIncompatibilityError(BaseException): pass -class PermissionError(BaseException): - pass - - class UserError(BaseException): pass
projectmesa__mesa-535
Issue 523 add networkx to the dependency specified in setup.py for #523 to allow all the tests to run without error when installing with the `pip install -e .` command.
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport re\n\nfrom setuptools import setup, find_packages\nfrom codecs import open\n\nrequires = [\n 'tornado >= 4.2, < 5.0.0',\n 'numpy',\n 'pandas',\n 'tqdm',\n 'click',\n]\n\nversion = ''\nwith open('mesa/__init__.py', 'r') as fd:\n version = re.search(r'^__version__\\s*=\\s*[\\'\"]([^\\'\"]*)[\\'\"]',\n fd.read(), re.MULTILINE).group(1)\n\nwith open('README.rst', 'rb', encoding='utf-8') as f:\n readme = f.read()\n\nsetup(\n name='Mesa',\n version=version,\n description=\"Agent-based modeling (ABM) in Python 3+\",\n long_description=readme,\n author='Project Mesa Team',\n author_email='[email protected]',\n url='https://github.com/projectmesa/mesa',\n packages=find_packages(),\n package_data={'mesa': ['visualization/templates/*.html', 'visualization/templates/css/*',\n 'visualization/templates/fonts/*', 'visualization/templates/js/*']},\n include_package_data=True,\n install_requires=requires,\n keywords='agent based modeling model ABM simulation multi-agent',\n license='Apache 2.0',\n zip_safe=False,\n classifiers=[\n 'Topic :: Scientific/Engineering',\n 'Topic :: Scientific/Engineering :: Artificial Life',\n 'Topic :: Scientific/Engineering :: Artificial Intelligence',\n 'Intended Audience :: Science/Research',\n 'Programming Language :: Python :: 3 :: Only',\n 'License :: OSI Approved :: Apache Software License',\n 'Operating System :: OS Independent',\n 'Development Status :: 3 - Alpha',\n 'Natural Language :: English',\n ],\n entry_points='''\n [console_scripts]\n mesa=mesa.main:cli\n ''',\n)\n", "path": "setup.py" } ]
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport re\n\nfrom setuptools import setup, find_packages\nfrom codecs import open\n\nrequires = [\n 'tornado >= 4.2, < 5.0.0',\n 'networkx',\n 'numpy',\n 'pandas',\n 'tqdm',\n]\n\nversion = ''\nwith open('mesa/__init__.py', 'r') as fd:\n version = re.search(r'^__version__\\s*=\\s*[\\'\"]([^\\'\"]*)[\\'\"]',\n fd.read(), re.MULTILINE).group(1)\n\nwith open('README.rst', 'rb', encoding='utf-8') as f:\n readme = f.read()\n\nsetup(\n name='Mesa',\n version=version,\n description=\"Agent-based modeling (ABM) in Python 3+\",\n long_description=readme,\n author='Project Mesa Team',\n author_email='[email protected]',\n url='https://github.com/projectmesa/mesa',\n packages=find_packages(),\n package_data={'mesa': ['visualization/templates/*.html', 'visualization/templates/css/*',\n 'visualization/templates/fonts/*', 'visualization/templates/js/*']},\n include_package_data=True,\n install_requires=requires,\n keywords='agent based modeling model ABM simulation multi-agent',\n license='Apache 2.0',\n zip_safe=False,\n classifiers=[\n 'Topic :: Scientific/Engineering',\n 'Topic :: Scientific/Engineering :: Artificial Life',\n 'Topic :: Scientific/Engineering :: Artificial Intelligence',\n 'Intended Audience :: Science/Research',\n 'Programming Language :: Python :: 3 :: Only',\n 'License :: OSI Approved :: Apache Software License',\n 'Operating System :: OS Independent',\n 'Development Status :: 3 - Alpha',\n 'Natural Language :: English',\n ],\n)\n", "path": "setup.py" } ]
diff --git a/setup.py b/setup.py index 33bda862497..7aad7ceedfe 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ requires = [ 'tornado >= 4.2, < 5.0.0', + 'networkx', 'numpy', 'pandas', 'tqdm', diff --git a/tests/test_lifespan.py b/tests/test_lifespan.py index 59b5a06b296..df2b7b90e9d 100644 --- a/tests/test_lifespan.py +++ b/tests/test_lifespan.py @@ -81,8 +81,8 @@ def test_ticks_seen(self): assert self.df.steps.max() == 1 def test_agent_lifetime(self): - lifetimes = self.df.groupby(["AgentID"]).Step.agg({"Step": - lambda x: len(x)}) + lifetimes = self.df.groupby(["AgentID"]).agg( + {"Step": lambda x: len(x)}) assert lifetimes.Step.max() == 2
cocotb__cocotb-1179
Add Scheduler to Library Reference The scheduler module is not at all listed in the Library Reference.
[ { "content": "# Copyright (c) 2013 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications Inc\n# All rights reserved.\n\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n# * Neither the name of Potential Ventures Ltd,\n# SolarFlare Communications Inc nor the\n# names of its contributors may be used to endorse or promote products\n# derived from this software without specific prior written permission.\n\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL POTENTIAL VENTURES LTD BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\"\"\"\nCocotb is a coroutine, cosimulation framework for writing testbenches in Python.\n\nSee http://cocotb.readthedocs.org for full documentation\n\"\"\"\nimport os\nimport sys\nimport logging\nimport threading\nimport random\nimport time\n\nimport cocotb.handle\nfrom cocotb.scheduler import Scheduler\nfrom cocotb.log import SimBaseLog, SimLog\nfrom cocotb.regression import RegressionManager\n\n\n# Things we want in the cocotb namespace\nfrom cocotb.decorators import test, coroutine, hook, function, external # noqa: F401\n\n# Singleton scheduler instance\n# NB this cheekily ensures a singleton since we're replacing the reference\n# so that cocotb.scheduler gives you the singleton instance and not the\n# scheduler package\n\n# GPI logging instance\nif \"COCOTB_SIM\" in os.environ:\n import simulator\n logging.basicConfig()\n logging.setLoggerClass(SimBaseLog)\n log = SimLog('cocotb')\n level = os.getenv(\"COCOTB_LOG_LEVEL\", \"INFO\")\n try:\n _default_log = getattr(logging, level)\n except AttributeError as e:\n log.error(\"Unable to set loging level to %s\" % level)\n _default_log = logging.INFO\n log.setLevel(_default_log)\n loggpi = SimLog('cocotb.gpi')\n # Notify GPI of log level\n simulator.log_level(_default_log)\n\n # If stdout/stderr are not TTYs, Python may not have opened them with line\n # buffering. In that case, try to reopen them with line buffering\n # explicitly enabled. This ensures that prints such as stack traces always\n # appear. Continue silently if this fails.\n try:\n if not sys.stdout.isatty():\n sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 1)\n log.debug(\"Reopened stdout with line buffering\")\n if not sys.stderr.isatty():\n sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 1)\n log.debug(\"Reopened stderr with line buffering\")\n except Exception as e:\n log.warning(\"Failed to ensure that stdout/stderr are line buffered: %s\", e)\n log.warning(\"Some stack traces may not appear because of this.\")\n\n\nscheduler = Scheduler()\nregression_manager = None\n\nplusargs = {}\n\n# To save typing provide an alias to scheduler.add\nfork = scheduler.add\n\n# FIXME is this really required?\n_rlock = threading.RLock()\n\n\ndef mem_debug(port):\n import cocotb.memdebug\n cocotb.memdebug.start(port)\n\n\ndef _initialise_testbench(root_name):\n \"\"\"\n This function is called after the simulator has elaborated all\n entities and is ready to run the test.\n\n The test must be defined by the environment variables\n MODULE\n TESTCASE\n\n The environment variable COCOTB_HOOKS contains a comma-separated list of\n modules that should be executed before the first test.\n \"\"\"\n _rlock.acquire()\n\n memcheck_port = os.getenv('MEMCHECK')\n if memcheck_port is not None:\n mem_debug(int(memcheck_port))\n\n exec_path = os.getenv('COCOTB_PY_DIR')\n if exec_path is None:\n exec_path = 'Unknown'\n\n version = os.getenv('VERSION')\n if version is None:\n log.info(\"Unable to determine Cocotb version from %s\" % exec_path)\n else:\n log.info(\"Running tests with Cocotb v%s from %s\" %\n (version, exec_path))\n\n # Create the base handle type\n\n process_plusargs()\n\n # Seed the Python random number generator to make this repeatable\n global RANDOM_SEED\n RANDOM_SEED = os.getenv('RANDOM_SEED')\n\n if RANDOM_SEED is None:\n if 'ntb_random_seed' in plusargs:\n RANDOM_SEED = eval(plusargs['ntb_random_seed'])\n elif 'seed' in plusargs:\n RANDOM_SEED = eval(plusargs['seed'])\n else:\n RANDOM_SEED = int(time.time())\n log.info(\"Seeding Python random module with %d\" % (RANDOM_SEED))\n else:\n RANDOM_SEED = int(RANDOM_SEED)\n log.info(\"Seeding Python random module with supplied seed %d\" % (RANDOM_SEED))\n random.seed(RANDOM_SEED)\n\n module_str = os.getenv('MODULE')\n test_str = os.getenv('TESTCASE')\n hooks_str = os.getenv('COCOTB_HOOKS', '')\n\n if not module_str:\n raise ImportError(\"Environment variables defining the module(s) to \" +\n \"execute not defined. MODULE=\\\"%s\\\"\" % (module_str))\n\n modules = module_str.split(',')\n hooks = hooks_str.split(',') if hooks_str else []\n\n global regression_manager\n\n regression_manager = RegressionManager(root_name, modules, tests=test_str, seed=RANDOM_SEED, hooks=hooks)\n regression_manager.initialise()\n regression_manager.execute()\n\n _rlock.release()\n return True\n\n\ndef _sim_event(level, message):\n \"\"\"Function that can be called externally to signal an event\"\"\"\n SIM_INFO = 0\n SIM_TEST_FAIL = 1\n SIM_FAIL = 2\n from cocotb.result import TestFailure, SimFailure\n\n if level is SIM_TEST_FAIL:\n scheduler.log.error(\"Failing test at simulator request\")\n scheduler.finish_test(TestFailure(\"Failure from external source: %s\" %\n message))\n elif level is SIM_FAIL:\n # We simply return here as the simulator will exit\n # so no cleanup is needed\n msg = (\"Failing test at simulator request before test run completion: \"\n \"%s\" % message)\n scheduler.log.error(msg)\n scheduler.finish_scheduler(SimFailure(msg))\n else:\n scheduler.log.error(\"Unsupported sim event\")\n\n return True\n\n\ndef process_plusargs():\n\n global plusargs\n\n plusargs = {}\n\n for option in cocotb.argv:\n if option.startswith('+'):\n if option.find('=') != -1:\n (name, value) = option[1:].split('=')\n plusargs[name] = value\n else:\n plusargs[option[1:]] = True\n", "path": "cocotb/__init__.py" } ]
[ { "content": "# Copyright (c) 2013 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications Inc\n# All rights reserved.\n\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n# * Neither the name of Potential Ventures Ltd,\n# SolarFlare Communications Inc nor the\n# names of its contributors may be used to endorse or promote products\n# derived from this software without specific prior written permission.\n\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL POTENTIAL VENTURES LTD BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\"\"\"\nCocotb is a coroutine, cosimulation framework for writing testbenches in Python.\n\nSee http://cocotb.readthedocs.org for full documentation\n\"\"\"\nimport os\nimport sys\nimport logging\nimport threading\nimport random\nimport time\n\nimport cocotb.handle\nfrom cocotb.scheduler import Scheduler\nfrom cocotb.log import SimBaseLog, SimLog\nfrom cocotb.regression import RegressionManager\n\n\n# Things we want in the cocotb namespace\nfrom cocotb.decorators import test, coroutine, hook, function, external # noqa: F401\n\n# Singleton scheduler instance\n# NB this cheekily ensures a singleton since we're replacing the reference\n# so that cocotb.scheduler gives you the singleton instance and not the\n# scheduler package\n\n# GPI logging instance\nif \"COCOTB_SIM\" in os.environ:\n import simulator\n logging.basicConfig()\n logging.setLoggerClass(SimBaseLog)\n log = SimLog('cocotb')\n level = os.getenv(\"COCOTB_LOG_LEVEL\", \"INFO\")\n try:\n _default_log = getattr(logging, level)\n except AttributeError as e:\n log.error(\"Unable to set loging level to %s\" % level)\n _default_log = logging.INFO\n log.setLevel(_default_log)\n loggpi = SimLog('cocotb.gpi')\n # Notify GPI of log level\n simulator.log_level(_default_log)\n\n # If stdout/stderr are not TTYs, Python may not have opened them with line\n # buffering. In that case, try to reopen them with line buffering\n # explicitly enabled. This ensures that prints such as stack traces always\n # appear. Continue silently if this fails.\n try:\n if not sys.stdout.isatty():\n sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 1)\n log.debug(\"Reopened stdout with line buffering\")\n if not sys.stderr.isatty():\n sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 1)\n log.debug(\"Reopened stderr with line buffering\")\n except Exception as e:\n log.warning(\"Failed to ensure that stdout/stderr are line buffered: %s\", e)\n log.warning(\"Some stack traces may not appear because of this.\")\n\n\nscheduler = Scheduler()\n\"\"\"The global scheduler instance.\"\"\"\n\nregression_manager = None\n\nplusargs = {}\n\n# To save typing provide an alias to scheduler.add\nfork = scheduler.add\n\n# FIXME is this really required?\n_rlock = threading.RLock()\n\n\ndef mem_debug(port):\n import cocotb.memdebug\n cocotb.memdebug.start(port)\n\n\ndef _initialise_testbench(root_name):\n \"\"\"\n This function is called after the simulator has elaborated all\n entities and is ready to run the test.\n\n The test must be defined by the environment variables\n MODULE\n TESTCASE\n\n The environment variable COCOTB_HOOKS contains a comma-separated list of\n modules that should be executed before the first test.\n \"\"\"\n _rlock.acquire()\n\n memcheck_port = os.getenv('MEMCHECK')\n if memcheck_port is not None:\n mem_debug(int(memcheck_port))\n\n exec_path = os.getenv('COCOTB_PY_DIR')\n if exec_path is None:\n exec_path = 'Unknown'\n\n version = os.getenv('VERSION')\n if version is None:\n log.info(\"Unable to determine Cocotb version from %s\" % exec_path)\n else:\n log.info(\"Running tests with Cocotb v%s from %s\" %\n (version, exec_path))\n\n # Create the base handle type\n\n process_plusargs()\n\n # Seed the Python random number generator to make this repeatable\n global RANDOM_SEED\n RANDOM_SEED = os.getenv('RANDOM_SEED')\n\n if RANDOM_SEED is None:\n if 'ntb_random_seed' in plusargs:\n RANDOM_SEED = eval(plusargs['ntb_random_seed'])\n elif 'seed' in plusargs:\n RANDOM_SEED = eval(plusargs['seed'])\n else:\n RANDOM_SEED = int(time.time())\n log.info(\"Seeding Python random module with %d\" % (RANDOM_SEED))\n else:\n RANDOM_SEED = int(RANDOM_SEED)\n log.info(\"Seeding Python random module with supplied seed %d\" % (RANDOM_SEED))\n random.seed(RANDOM_SEED)\n\n module_str = os.getenv('MODULE')\n test_str = os.getenv('TESTCASE')\n hooks_str = os.getenv('COCOTB_HOOKS', '')\n\n if not module_str:\n raise ImportError(\"Environment variables defining the module(s) to \" +\n \"execute not defined. MODULE=\\\"%s\\\"\" % (module_str))\n\n modules = module_str.split(',')\n hooks = hooks_str.split(',') if hooks_str else []\n\n global regression_manager\n\n regression_manager = RegressionManager(root_name, modules, tests=test_str, seed=RANDOM_SEED, hooks=hooks)\n regression_manager.initialise()\n regression_manager.execute()\n\n _rlock.release()\n return True\n\n\ndef _sim_event(level, message):\n \"\"\"Function that can be called externally to signal an event\"\"\"\n SIM_INFO = 0\n SIM_TEST_FAIL = 1\n SIM_FAIL = 2\n from cocotb.result import TestFailure, SimFailure\n\n if level is SIM_TEST_FAIL:\n scheduler.log.error(\"Failing test at simulator request\")\n scheduler.finish_test(TestFailure(\"Failure from external source: %s\" %\n message))\n elif level is SIM_FAIL:\n # We simply return here as the simulator will exit\n # so no cleanup is needed\n msg = (\"Failing test at simulator request before test run completion: \"\n \"%s\" % message)\n scheduler.log.error(msg)\n scheduler.finish_scheduler(SimFailure(msg))\n else:\n scheduler.log.error(\"Unsupported sim event\")\n\n return True\n\n\ndef process_plusargs():\n\n global plusargs\n\n plusargs = {}\n\n for option in cocotb.argv:\n if option.startswith('+'):\n if option.find('=') != -1:\n (name, value) = option[1:].split('=')\n plusargs[name] = value\n else:\n plusargs[option[1:]] = True\n", "path": "cocotb/__init__.py" } ]
diff --git a/cocotb/__init__.py b/cocotb/__init__.py index c77686c430..5666928f45 100644 --- a/cocotb/__init__.py +++ b/cocotb/__init__.py @@ -85,6 +85,8 @@ scheduler = Scheduler() +"""The global scheduler instance.""" + regression_manager = None plusargs = {} diff --git a/documentation/source/library_reference.rst b/documentation/source/library_reference.rst index 4228b57f5b..d0b3f4e1c6 100644 --- a/documentation/source/library_reference.rst +++ b/documentation/source/library_reference.rst @@ -67,7 +67,6 @@ classes used within ``cocotb``. :members: :member-order: bysource - Testbench Structure =================== @@ -282,3 +281,24 @@ Signal Tracer for WaveDrom :members: :member-order: bysource :synopsis: A signal tracer for WaveDrom. + + +Developer-focused +================= + +The Scheduler +------------- + +.. note:: + The scheduler object should generally not be interacted with directly - + the only part of it that a user will need is encapsulated in :func:`~cocotb.fork`, + everything else works behind the scenes. + +.. currentmodule:: cocotb.scheduler + +.. autodata:: cocotb.scheduler + +.. autoclass:: Scheduler + :members: + :member-order: bysource +
statsmodels__statsmodels-1374
move graphics.tsa to tsa.graphics Makes more sense to me to keep the tsa stuff under the tsa namespace. Might need to deprecate functions that aren't new.
[ { "content": "from .ar_model import AR\nfrom .arima_model import ARMA, ARIMA\nimport vector_ar as var\nfrom .vector_ar.var_model import VAR\nfrom .vector_ar.svar_model import SVAR\nfrom .vector_ar.dynamic import DynamicVAR\nimport filters\nimport tsatools\nfrom .tsatools import (add_trend, detrend, lagmat, lagmat2ds, add_lag)\nimport interp\nimport stattools\nfrom .stattools import *\nfrom .base import datetools\n", "path": "statsmodels/tsa/api.py" } ]
[ { "content": "from .ar_model import AR\nfrom .arima_model import ARMA, ARIMA\nimport vector_ar as var\nfrom .vector_ar.var_model import VAR\nfrom .vector_ar.svar_model import SVAR\nfrom .vector_ar.dynamic import DynamicVAR\nimport filters\nimport tsatools\nfrom .tsatools import (add_trend, detrend, lagmat, lagmat2ds, add_lag)\nimport interp\nimport stattools\nfrom .stattools import *\nfrom .base import datetools\nfrom ..graphics import tsaplots as graphics\n", "path": "statsmodels/tsa/api.py" } ]
diff --git a/docs/source/release/version0.6.rst b/docs/source/release/version0.6.rst index 4a4e21bf37a..1dab9b71bc2 100644 --- a/docs/source/release/version0.6.rst +++ b/docs/source/release/version0.6.rst @@ -37,13 +37,14 @@ Adding functionality to look at seasonality in plots. Two new functions are :fun dta.index.values) dta.index = pd.DatetimeIndex(dates, freq='M') - fig = sm.graphics.tsa.month_plot(dta) + fig = sm.tsa.graphics.month_plot(dta) Other important new features ---------------------------- * Added :func:`sm.tsa.arma_order_select_ic`. A convenience function to quickly get the information criteria for use in tentative order selection of ARMA processes. +* Plotting functions for timeseries is now imported under the ``sm.tsa.graphics`` namespace in addition to ``sm.graphics.tsa``. Major Bugs fixed ---------------- diff --git a/statsmodels/tsa/api.py b/statsmodels/tsa/api.py index 6e272c78f00..ee3e235a600 100644 --- a/statsmodels/tsa/api.py +++ b/statsmodels/tsa/api.py @@ -11,3 +11,4 @@ import stattools from .stattools import * from .base import datetools +from ..graphics import tsaplots as graphics
open-mmlab__mmsegmentation-658
error in train.py error in line 134 in mmsegmentation/tools/train.py model.init_weights() is error model.init_weight() is ok
[ { "content": "import mmcv\n\nfrom .version import __version__, version_info\n\nMMCV_MIN = '1.3.1'\nMMCV_MAX = '1.4.0'\n\n\ndef digit_version(version_str):\n digit_version = []\n for x in version_str.split('.'):\n if x.isdigit():\n digit_version.append(int(x))\n elif x.find('rc') != -1:\n patch_version = x.split('rc')\n digit_version.append(int(patch_version[0]) - 1)\n digit_version.append(int(patch_version[1]))\n return digit_version\n\n\nmmcv_min_version = digit_version(MMCV_MIN)\nmmcv_max_version = digit_version(MMCV_MAX)\nmmcv_version = digit_version(mmcv.__version__)\n\n\nassert (mmcv_min_version <= mmcv_version <= mmcv_max_version), \\\n f'MMCV=={mmcv.__version__} is used but incompatible. ' \\\n f'Please install mmcv>={mmcv_min_version}, <={mmcv_max_version}.'\n\n__all__ = ['__version__', 'version_info']\n", "path": "mmseg/__init__.py" } ]
[ { "content": "import mmcv\n\nfrom .version import __version__, version_info\n\nMMCV_MIN = '1.3.7'\nMMCV_MAX = '1.4.0'\n\n\ndef digit_version(version_str):\n digit_version = []\n for x in version_str.split('.'):\n if x.isdigit():\n digit_version.append(int(x))\n elif x.find('rc') != -1:\n patch_version = x.split('rc')\n digit_version.append(int(patch_version[0]) - 1)\n digit_version.append(int(patch_version[1]))\n return digit_version\n\n\nmmcv_min_version = digit_version(MMCV_MIN)\nmmcv_max_version = digit_version(MMCV_MAX)\nmmcv_version = digit_version(mmcv.__version__)\n\n\nassert (mmcv_min_version <= mmcv_version <= mmcv_max_version), \\\n f'MMCV=={mmcv.__version__} is used but incompatible. ' \\\n f'Please install mmcv>={mmcv_min_version}, <={mmcv_max_version}.'\n\n__all__ = ['__version__', 'version_info']\n", "path": "mmseg/__init__.py" } ]
diff --git a/docs/get_started.md b/docs/get_started.md index 23e6a52866..05f2ddc916 100644 --- a/docs/get_started.md +++ b/docs/get_started.md @@ -11,9 +11,11 @@ The compatible MMSegmentation and MMCV versions are as below. Please install the | MMSegmentation version | MMCV version | |:-------------------:|:-------------------:| -| master | mmcv-full>=1.3.1, <1.4.0 | -| 0.13.0 | mmcv-full>=1.3.1, <1.4.0 | -| 0.12.0 | mmcv-full>=1.1.4, <1.4.0 | +| master | mmcv-full>=1.3.7, <1.4.0 | +| 0.14.1 | mmcv-full>=1.3.7, <1.4.0 | +| 0.14.0 | mmcv-full>=1.3.1, <1.3.2 | +| 0.13.0 | mmcv-full>=1.3.1, <1.3.2 | +| 0.12.0 | mmcv-full>=1.1.4, <1.3.2 | | 0.11.0 | mmcv-full>=1.1.4, <1.3.0 | | 0.10.0 | mmcv-full>=1.1.4, <1.3.0 | | 0.9.0 | mmcv-full>=1.1.4, <1.3.0 | diff --git a/mmseg/__init__.py b/mmseg/__init__.py index 96a8ca14fe..dbdebf9943 100644 --- a/mmseg/__init__.py +++ b/mmseg/__init__.py @@ -2,7 +2,7 @@ from .version import __version__, version_info -MMCV_MIN = '1.3.1' +MMCV_MIN = '1.3.7' MMCV_MAX = '1.4.0'
carltongibson__django-filter-989
DeprecationWarning on python 3.7 ``` django_filters/widgets.py:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working ``` see potential fix here: https://github.com/pyparsing/pyparsing/pull/16/files
[ { "content": "from collections import Iterable\nfrom itertools import chain\nfrom re import search, sub\n\nfrom django import forms\nfrom django.db.models.fields import BLANK_CHOICE_DASH\nfrom django.forms.utils import flatatt\nfrom django.utils.datastructures import MultiValueDict\nfrom django.utils.encoding import force_text\nfrom django.utils.http import urlencode\nfrom django.utils.safestring import mark_safe\nfrom django.utils.translation import ugettext as _\n\n\nclass LinkWidget(forms.Widget):\n def __init__(self, attrs=None, choices=()):\n super().__init__(attrs)\n\n self.choices = choices\n\n def value_from_datadict(self, data, files, name):\n value = super().value_from_datadict(data, files, name)\n self.data = data\n return value\n\n def render(self, name, value, attrs=None, choices=(), renderer=None):\n if not hasattr(self, 'data'):\n self.data = {}\n if value is None:\n value = ''\n final_attrs = self.build_attrs(self.attrs, extra_attrs=attrs)\n output = ['<ul%s>' % flatatt(final_attrs)]\n options = self.render_options(choices, [value], name)\n if options:\n output.append(options)\n output.append('</ul>')\n return mark_safe('\\n'.join(output))\n\n def render_options(self, choices, selected_choices, name):\n selected_choices = set(force_text(v) for v in selected_choices)\n output = []\n for option_value, option_label in chain(self.choices, choices):\n if isinstance(option_label, (list, tuple)):\n for option in option_label:\n output.append(\n self.render_option(name, selected_choices, *option))\n else:\n output.append(\n self.render_option(name, selected_choices,\n option_value, option_label))\n return '\\n'.join(output)\n\n def render_option(self, name, selected_choices,\n option_value, option_label):\n option_value = force_text(option_value)\n if option_label == BLANK_CHOICE_DASH[0][1]:\n option_label = _(\"All\")\n data = self.data.copy()\n data[name] = option_value\n selected = data == self.data or option_value in selected_choices\n try:\n url = data.urlencode()\n except AttributeError:\n url = urlencode(data)\n return self.option_string() % {\n 'attrs': selected and ' class=\"selected\"' or '',\n 'query_string': url,\n 'label': force_text(option_label)\n }\n\n def option_string(self):\n return '<li><a%(attrs)s href=\"?%(query_string)s\">%(label)s</a></li>'\n\n\nclass SuffixedMultiWidget(forms.MultiWidget):\n \"\"\"\n A MultiWidget that allows users to provide custom suffixes instead of indexes.\n\n - Suffixes must be unique.\n - There must be the same number of suffixes as fields.\n \"\"\"\n suffixes = []\n\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n\n assert len(self.widgets) == len(self.suffixes)\n assert len(self.suffixes) == len(set(self.suffixes))\n\n def suffixed(self, name, suffix):\n return '_'.join([name, suffix]) if suffix else name\n\n def get_context(self, name, value, attrs):\n context = super().get_context(name, value, attrs)\n for subcontext, suffix in zip(context['widget']['subwidgets'], self.suffixes):\n subcontext['name'] = self.suffixed(name, suffix)\n\n return context\n\n def value_from_datadict(self, data, files, name):\n return [\n widget.value_from_datadict(data, files, self.suffixed(name, suffix))\n for widget, suffix in zip(self.widgets, self.suffixes)\n ]\n\n def value_omitted_from_data(self, data, files, name):\n return all(\n widget.value_omitted_from_data(data, files, self.suffixed(name, suffix))\n for widget, suffix in zip(self.widgets, self.suffixes)\n )\n\n def replace_name(self, output, index):\n result = search(r'name=\"(?P<name>.*)_%d\"' % index, output)\n name = result.group('name')\n name = self.suffixed(name, self.suffixes[index])\n name = 'name=\"%s\"' % name\n\n return sub(r'name=\".*_%d\"' % index, name, output)\n\n def decompress(self, value):\n if value is None:\n return [None, None]\n return value\n\n\nclass RangeWidget(SuffixedMultiWidget):\n template_name = 'django_filters/widgets/multiwidget.html'\n suffixes = ['min', 'max']\n\n def __init__(self, attrs=None):\n widgets = (forms.TextInput, forms.TextInput)\n super().__init__(widgets, attrs)\n\n def decompress(self, value):\n if value:\n return [value.start, value.stop]\n return [None, None]\n\n\nclass DateRangeWidget(RangeWidget):\n suffixes = ['after', 'before']\n\n\nclass LookupChoiceWidget(SuffixedMultiWidget):\n suffixes = [None, 'lookup']\n\n def decompress(self, value):\n if value is None:\n return [None, None]\n return value\n\n\nclass BooleanWidget(forms.Select):\n \"\"\"Convert true/false values into the internal Python True/False.\n This can be used for AJAX queries that pass true/false from JavaScript's\n internal types through.\n \"\"\"\n def __init__(self, attrs=None):\n choices = (('', _('Unknown')),\n ('true', _('Yes')),\n ('false', _('No')))\n super().__init__(attrs, choices)\n\n def render(self, name, value, attrs=None, renderer=None):\n try:\n value = {\n True: 'true',\n False: 'false',\n '1': 'true',\n '0': 'false'\n }[value]\n except KeyError:\n value = ''\n return super().render(name, value, attrs, renderer=renderer)\n\n def value_from_datadict(self, data, files, name):\n value = data.get(name, None)\n if isinstance(value, str):\n value = value.lower()\n\n return {\n '1': True,\n '0': False,\n 'true': True,\n 'false': False,\n True: True,\n False: False,\n }.get(value, None)\n\n\nclass BaseCSVWidget(forms.Widget):\n def _isiterable(self, value):\n return isinstance(value, Iterable) and not isinstance(value, str)\n\n def value_from_datadict(self, data, files, name):\n value = super().value_from_datadict(data, files, name)\n\n if value is not None:\n if value == '': # empty value should parse as an empty list\n return []\n return value.split(',')\n return None\n\n def render(self, name, value, attrs=None, renderer=None):\n if not self._isiterable(value):\n value = [value]\n\n if len(value) <= 1:\n # delegate to main widget (Select, etc...) if not multiple values\n value = value[0] if value else ''\n return super().render(name, value, attrs, renderer=renderer)\n\n # if we have multiple values, we need to force render as a text input\n # (otherwise, the additional values are lost)\n surrogate = forms.TextInput()\n value = [force_text(surrogate.format_value(v)) for v in value]\n value = ','.join(list(value))\n\n return surrogate.render(name, value, attrs, renderer=renderer)\n\n\nclass CSVWidget(BaseCSVWidget, forms.TextInput):\n pass\n\n\nclass QueryArrayWidget(BaseCSVWidget, forms.TextInput):\n \"\"\"\n Enables request query array notation that might be consumed by MultipleChoiceFilter\n\n 1. Values can be provided as csv string: ?foo=bar,baz\n 2. Values can be provided as query array: ?foo[]=bar&foo[]=baz\n 3. Values can be provided as query array: ?foo=bar&foo=baz\n\n Note: Duplicate and empty values are skipped from results\n \"\"\"\n\n def value_from_datadict(self, data, files, name):\n if not isinstance(data, MultiValueDict):\n for key, value in data.items():\n # treat value as csv string: ?foo=1,2\n if isinstance(value, str):\n data[key] = [x.strip() for x in value.rstrip(',').split(',') if x]\n data = MultiValueDict(data)\n\n values_list = data.getlist(name, data.getlist('%s[]' % name)) or []\n\n # apparently its an array, so no need to process it's values as csv\n # ?foo=1&foo=2 -> data.getlist(foo) -> foo = [1, 2]\n # ?foo[]=1&foo[]=2 -> data.getlist(foo[]) -> foo = [1, 2]\n if len(values_list) > 0:\n ret = [x for x in values_list if x]\n else:\n ret = []\n\n return list(set(ret))\n", "path": "django_filters/widgets.py" } ]
[ { "content": "from collections.abc import Iterable\nfrom itertools import chain\nfrom re import search, sub\n\nfrom django import forms\nfrom django.db.models.fields import BLANK_CHOICE_DASH\nfrom django.forms.utils import flatatt\nfrom django.utils.datastructures import MultiValueDict\nfrom django.utils.encoding import force_text\nfrom django.utils.http import urlencode\nfrom django.utils.safestring import mark_safe\nfrom django.utils.translation import ugettext as _\n\n\nclass LinkWidget(forms.Widget):\n def __init__(self, attrs=None, choices=()):\n super().__init__(attrs)\n\n self.choices = choices\n\n def value_from_datadict(self, data, files, name):\n value = super().value_from_datadict(data, files, name)\n self.data = data\n return value\n\n def render(self, name, value, attrs=None, choices=(), renderer=None):\n if not hasattr(self, 'data'):\n self.data = {}\n if value is None:\n value = ''\n final_attrs = self.build_attrs(self.attrs, extra_attrs=attrs)\n output = ['<ul%s>' % flatatt(final_attrs)]\n options = self.render_options(choices, [value], name)\n if options:\n output.append(options)\n output.append('</ul>')\n return mark_safe('\\n'.join(output))\n\n def render_options(self, choices, selected_choices, name):\n selected_choices = set(force_text(v) for v in selected_choices)\n output = []\n for option_value, option_label in chain(self.choices, choices):\n if isinstance(option_label, (list, tuple)):\n for option in option_label:\n output.append(\n self.render_option(name, selected_choices, *option))\n else:\n output.append(\n self.render_option(name, selected_choices,\n option_value, option_label))\n return '\\n'.join(output)\n\n def render_option(self, name, selected_choices,\n option_value, option_label):\n option_value = force_text(option_value)\n if option_label == BLANK_CHOICE_DASH[0][1]:\n option_label = _(\"All\")\n data = self.data.copy()\n data[name] = option_value\n selected = data == self.data or option_value in selected_choices\n try:\n url = data.urlencode()\n except AttributeError:\n url = urlencode(data)\n return self.option_string() % {\n 'attrs': selected and ' class=\"selected\"' or '',\n 'query_string': url,\n 'label': force_text(option_label)\n }\n\n def option_string(self):\n return '<li><a%(attrs)s href=\"?%(query_string)s\">%(label)s</a></li>'\n\n\nclass SuffixedMultiWidget(forms.MultiWidget):\n \"\"\"\n A MultiWidget that allows users to provide custom suffixes instead of indexes.\n\n - Suffixes must be unique.\n - There must be the same number of suffixes as fields.\n \"\"\"\n suffixes = []\n\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n\n assert len(self.widgets) == len(self.suffixes)\n assert len(self.suffixes) == len(set(self.suffixes))\n\n def suffixed(self, name, suffix):\n return '_'.join([name, suffix]) if suffix else name\n\n def get_context(self, name, value, attrs):\n context = super().get_context(name, value, attrs)\n for subcontext, suffix in zip(context['widget']['subwidgets'], self.suffixes):\n subcontext['name'] = self.suffixed(name, suffix)\n\n return context\n\n def value_from_datadict(self, data, files, name):\n return [\n widget.value_from_datadict(data, files, self.suffixed(name, suffix))\n for widget, suffix in zip(self.widgets, self.suffixes)\n ]\n\n def value_omitted_from_data(self, data, files, name):\n return all(\n widget.value_omitted_from_data(data, files, self.suffixed(name, suffix))\n for widget, suffix in zip(self.widgets, self.suffixes)\n )\n\n def replace_name(self, output, index):\n result = search(r'name=\"(?P<name>.*)_%d\"' % index, output)\n name = result.group('name')\n name = self.suffixed(name, self.suffixes[index])\n name = 'name=\"%s\"' % name\n\n return sub(r'name=\".*_%d\"' % index, name, output)\n\n def decompress(self, value):\n if value is None:\n return [None, None]\n return value\n\n\nclass RangeWidget(SuffixedMultiWidget):\n template_name = 'django_filters/widgets/multiwidget.html'\n suffixes = ['min', 'max']\n\n def __init__(self, attrs=None):\n widgets = (forms.TextInput, forms.TextInput)\n super().__init__(widgets, attrs)\n\n def decompress(self, value):\n if value:\n return [value.start, value.stop]\n return [None, None]\n\n\nclass DateRangeWidget(RangeWidget):\n suffixes = ['after', 'before']\n\n\nclass LookupChoiceWidget(SuffixedMultiWidget):\n suffixes = [None, 'lookup']\n\n def decompress(self, value):\n if value is None:\n return [None, None]\n return value\n\n\nclass BooleanWidget(forms.Select):\n \"\"\"Convert true/false values into the internal Python True/False.\n This can be used for AJAX queries that pass true/false from JavaScript's\n internal types through.\n \"\"\"\n def __init__(self, attrs=None):\n choices = (('', _('Unknown')),\n ('true', _('Yes')),\n ('false', _('No')))\n super().__init__(attrs, choices)\n\n def render(self, name, value, attrs=None, renderer=None):\n try:\n value = {\n True: 'true',\n False: 'false',\n '1': 'true',\n '0': 'false'\n }[value]\n except KeyError:\n value = ''\n return super().render(name, value, attrs, renderer=renderer)\n\n def value_from_datadict(self, data, files, name):\n value = data.get(name, None)\n if isinstance(value, str):\n value = value.lower()\n\n return {\n '1': True,\n '0': False,\n 'true': True,\n 'false': False,\n True: True,\n False: False,\n }.get(value, None)\n\n\nclass BaseCSVWidget(forms.Widget):\n def _isiterable(self, value):\n return isinstance(value, Iterable) and not isinstance(value, str)\n\n def value_from_datadict(self, data, files, name):\n value = super().value_from_datadict(data, files, name)\n\n if value is not None:\n if value == '': # empty value should parse as an empty list\n return []\n return value.split(',')\n return None\n\n def render(self, name, value, attrs=None, renderer=None):\n if not self._isiterable(value):\n value = [value]\n\n if len(value) <= 1:\n # delegate to main widget (Select, etc...) if not multiple values\n value = value[0] if value else ''\n return super().render(name, value, attrs, renderer=renderer)\n\n # if we have multiple values, we need to force render as a text input\n # (otherwise, the additional values are lost)\n surrogate = forms.TextInput()\n value = [force_text(surrogate.format_value(v)) for v in value]\n value = ','.join(list(value))\n\n return surrogate.render(name, value, attrs, renderer=renderer)\n\n\nclass CSVWidget(BaseCSVWidget, forms.TextInput):\n pass\n\n\nclass QueryArrayWidget(BaseCSVWidget, forms.TextInput):\n \"\"\"\n Enables request query array notation that might be consumed by MultipleChoiceFilter\n\n 1. Values can be provided as csv string: ?foo=bar,baz\n 2. Values can be provided as query array: ?foo[]=bar&foo[]=baz\n 3. Values can be provided as query array: ?foo=bar&foo=baz\n\n Note: Duplicate and empty values are skipped from results\n \"\"\"\n\n def value_from_datadict(self, data, files, name):\n if not isinstance(data, MultiValueDict):\n for key, value in data.items():\n # treat value as csv string: ?foo=1,2\n if isinstance(value, str):\n data[key] = [x.strip() for x in value.rstrip(',').split(',') if x]\n data = MultiValueDict(data)\n\n values_list = data.getlist(name, data.getlist('%s[]' % name)) or []\n\n # apparently its an array, so no need to process it's values as csv\n # ?foo=1&foo=2 -> data.getlist(foo) -> foo = [1, 2]\n # ?foo[]=1&foo[]=2 -> data.getlist(foo[]) -> foo = [1, 2]\n if len(values_list) > 0:\n ret = [x for x in values_list if x]\n else:\n ret = []\n\n return list(set(ret))\n", "path": "django_filters/widgets.py" } ]
diff --git a/django_filters/widgets.py b/django_filters/widgets.py index fc7490299..756f4f776 100644 --- a/django_filters/widgets.py +++ b/django_filters/widgets.py @@ -1,4 +1,4 @@ -from collections import Iterable +from collections.abc import Iterable from itertools import chain from re import search, sub
microsoft__DeepSpeed-3137
Add Full Apache License #3111 did not include the full Apache 2.0 License text. Adding that here. @jeffra
[ { "content": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\n# This script extracts fp32 consolidated weights from a zero 2 and 3 DeepSpeed checkpoints. It gets\n# copied into the top level checkpoint dir, so the user can easily do the conversion at any point in\n# the future. Once extracted, the weights don't require DeepSpeed and can be used in any\n# application.\n#\n# example: python zero_to_fp32.py . pytorch_model.bin\n\nimport argparse\nimport torch\nimport glob\nimport math\nimport os\nimport re\nfrom collections import OrderedDict\n\n# while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with\n# DeepSpeed data structures it has to be available in the current python environment.\nfrom deepspeed.utils import logger\nfrom deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,\n FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES)\n\ndebug = 0\n\n# load to cpu\ndevice = torch.device('cpu')\n\n\ndef atoi(text):\n return int(text) if text.isdigit() else text\n\n\ndef natural_keys(text):\n '''\n alist.sort(key=natural_keys) sorts in human order\n http://nedbatchelder.com/blog/200712/human_sorting.html\n (See Toothy's implementation in the comments)\n '''\n return [atoi(c) for c in re.split(r'(\\d+)', text)]\n\n\ndef get_model_state_file(checkpoint_dir, zero_stage):\n if not os.path.isdir(checkpoint_dir):\n raise FileNotFoundError(f\"Directory '{checkpoint_dir}' doesn't exist\")\n\n # there should be only one file\n if zero_stage == 2:\n file = os.path.join(checkpoint_dir, \"mp_rank_00_model_states.pt\")\n elif zero_stage == 3:\n file = os.path.join(checkpoint_dir, \"zero_pp_rank_0_mp_rank_00_model_states.pt\")\n\n if not os.path.exists(file):\n raise FileNotFoundError(f\"can't find model states file at '{file}'\")\n\n return file\n\n\ndef get_optim_files(checkpoint_dir):\n # XXX: need to test that this simple glob rule works for multi-node setup too\n optim_files = sorted(glob.glob(os.path.join(checkpoint_dir, \"*_optim_states.pt\")), key=natural_keys)\n\n if len(optim_files) == 0:\n raise FileNotFoundError(f\"can't find '*_optim_states.pt' files in directory '{checkpoint_dir}'\")\n\n return optim_files\n\n\ndef parse_model_state(file):\n state_dict = torch.load(file, map_location=device)\n\n if BUFFER_NAMES not in state_dict:\n raise ValueError(f\"{file} is not a model state checkpoint\")\n buffer_names = state_dict[BUFFER_NAMES]\n if debug:\n print(\"Found buffers:\", buffer_names)\n\n # recover just the buffers while restoring them to fp32 if they were saved in fp16\n buffers = {k: v.float() for k, v in state_dict[\"module\"].items() if k in buffer_names}\n param_shapes = state_dict[PARAM_SHAPES]\n\n ds_version = state_dict.get(DS_VERSION, None)\n\n return buffers, param_shapes, ds_version\n\n\ndef parse_optim_states(files, ds_checkpoint_dir):\n\n total_files = len(files)\n state_dicts = []\n for f in files:\n state_dicts.append(torch.load(f, map_location=device))\n\n if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:\n raise ValueError(f\"{files[0]} is not a zero checkpoint\")\n zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]\n world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]\n\n # For ZeRO-2 each param group can have different partition_count as data parallelism for expert\n # parameters can be different from data parallelism for non-expert parameters. So we can just\n # use the max of the partition_count to get the dp world_size.\n\n if type(world_size) is list:\n world_size = max(world_size)\n\n if world_size != total_files:\n raise ValueError(\n f\"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. \"\n \"Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes.\"\n )\n\n # the groups are named differently in each stage\n if zero_stage == 2:\n fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS\n elif zero_stage == 3:\n fp32_groups_key = FP32_FLAT_GROUPS\n else:\n raise ValueError(f\"unknown zero stage {zero_stage}\")\n\n if zero_stage == 2:\n fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]\n elif zero_stage == 3:\n # if there is more than one param group, there will be multiple flattened tensors - one\n # flattened tensor per group - for simplicity merge them into a single tensor\n #\n # XXX: could make the script more memory efficient for when there are multiple groups - it\n # will require matching the sub-lists of param_shapes for each param group flattened tensor\n\n fp32_flat_groups = [\n torch.cat(state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key], 0) for i in range(len(state_dicts))\n ]\n\n return zero_stage, world_size, fp32_flat_groups\n\n\ndef _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir):\n \"\"\"\n Returns fp32 state_dict reconstructed from ds checkpoint\n\n Args:\n - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)\n\n \"\"\"\n print(f\"Processing zero checkpoint '{ds_checkpoint_dir}'\")\n\n optim_files = get_optim_files(ds_checkpoint_dir)\n zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)\n print(f\"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}\")\n\n model_file = get_model_state_file(ds_checkpoint_dir, zero_stage)\n buffers, param_shapes, ds_version = parse_model_state(model_file)\n print(f'Parsing checkpoint created by deepspeed=={ds_version}')\n\n if zero_stage == 2:\n return _get_fp32_state_dict_from_zero2_checkpoint(world_size, param_shapes, fp32_flat_groups, buffers)\n elif zero_stage == 3:\n return _get_fp32_state_dict_from_zero3_checkpoint(world_size, param_shapes, fp32_flat_groups, buffers)\n\n\ndef _get_fp32_state_dict_from_zero2_checkpoint(world_size, param_shapes, fp32_flat_groups, buffers):\n\n # Reconstruction protocol:\n #\n # XXX: document this\n\n if debug:\n for i in range(world_size):\n for j in range(len(fp32_flat_groups[0])):\n print(f\"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}\")\n\n # XXX: memory usage doubles here (zero2)\n num_param_groups = len(fp32_flat_groups[0])\n merged_single_partition_of_fp32_groups = []\n for i in range(num_param_groups):\n merged_partitions = [sd[i] for sd in fp32_flat_groups]\n full_single_fp32_vector = torch.cat(merged_partitions, 0)\n merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)\n avail_numel = sum(\n [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])\n\n if debug:\n wanted_params = sum([len(shapes) for shapes in param_shapes])\n wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])\n # not asserting if there is a mismatch due to possible padding\n print(f\"Have {avail_numel} numels to process.\")\n print(f\"Need {wanted_numel} numels in {wanted_params} params.\")\n\n state_dict = OrderedDict()\n\n # buffers\n state_dict.update(buffers)\n if debug:\n print(f\"added {len(buffers)} buffers\")\n\n # params\n # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support\n # out-of-core computing solution\n total_numel = 0\n total_params = 0\n for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):\n offset = 0\n avail_numel = full_single_fp32_vector.numel()\n for name, shape in shapes.items():\n\n unpartitioned_numel = shape.numel()\n total_numel += unpartitioned_numel\n total_params += 1\n\n if debug:\n print(f\"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} \")\n state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)\n offset += unpartitioned_numel\n\n # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and\n # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex\n # paddings performed in the code it's almost impossible to predict the exact numbers w/o the\n # live optimizer object, so we are checking that the numbers are within the right range\n align_to = 2 * world_size\n\n def zero2_align(x):\n return align_to * math.ceil(x / align_to)\n\n if debug:\n print(f\"original offset={offset}, avail_numel={avail_numel}\")\n\n offset = zero2_align(offset)\n avail_numel = zero2_align(avail_numel)\n\n if debug:\n print(f\"aligned offset={offset}, avail_numel={avail_numel}\")\n\n # Sanity check\n if offset != avail_numel:\n raise ValueError(f\"consumed {offset} numels out of {avail_numel} - something is wrong\")\n\n print(f\"Reconstructed fp32 state dict with {total_params} params {total_numel} elements\")\n\n return state_dict\n\n\ndef zero3_partitioned_param_info(unpartitioned_numel, world_size):\n remainder = unpartitioned_numel % world_size\n padding_numel = (world_size - remainder) if remainder else 0\n partitioned_numel = math.ceil(unpartitioned_numel / world_size)\n return partitioned_numel, padding_numel\n\n\ndef _get_fp32_state_dict_from_zero3_checkpoint(world_size, param_shapes, fp32_flat_groups, buffers):\n\n # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each\n # param, re-consolidating each param, while dealing with padding if any\n\n avail_numel = fp32_flat_groups[0].numel() * world_size\n # merge list of dicts, preserving order\n param_shapes = {k: v for d in param_shapes for k, v in d.items()}\n\n if debug:\n for i in range(world_size):\n print(f\"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}\")\n\n wanted_params = len(param_shapes)\n wanted_numel = sum(shape.numel() for shape in param_shapes.values())\n # not asserting if there is a mismatch due to possible padding\n print(f\"Have {avail_numel} numels to process.\")\n print(f\"Need {wanted_numel} numels in {wanted_params} params.\")\n\n state_dict = OrderedDict()\n\n # buffers\n state_dict.update(buffers)\n if debug:\n print(f\"added {len(buffers)} buffers\")\n\n # params\n # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support\n # out-of-core computing solution\n offset = 0\n total_numel = 0\n total_params = 0\n for name, shape in param_shapes.items():\n\n unpartitioned_numel = shape.numel()\n total_numel += unpartitioned_numel\n total_params += 1\n\n partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)\n\n if debug:\n print(\n f\"{total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}\"\n )\n\n # XXX: memory usage doubles here\n state_dict[name] = torch.cat(\n tuple(fp32_flat_groups[i].narrow(0, offset, partitioned_numel) for i in range(world_size)),\n 0).narrow(0, 0, unpartitioned_numel).view(shape)\n offset += partitioned_numel\n\n offset *= world_size\n\n # Sanity check\n if offset != avail_numel:\n raise ValueError(f\"consumed {offset} numels out of {avail_numel} - something is wrong\")\n\n print(f\"Reconstructed fp32 state dict with {total_params} params {total_numel} elements\")\n\n return state_dict\n\n\ndef get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None):\n \"\"\"\n Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with\n ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example\n via a model hub.\n\n Args:\n - ``checkpoint_dir``: path to the desired checkpoint folder\n - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``\n\n Returns:\n - pytorch ``state_dict``\n\n Note: this approach may not work if your application doesn't have sufficient free CPU memory and\n you may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with\n the checkpoint.\n\n A typical usage might be ::\n\n from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint\n # do the training and checkpoint saving\n state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu\n model = model.cpu() # move to cpu\n model.load_state_dict(state_dict)\n # submit to model hub or save the model to share with others\n\n In this example the ``model`` will no longer be usable in the deepspeed context of the same\n application. i.e. you will need to re-initialize the deepspeed engine, since\n ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.\n\n If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.\n\n \"\"\"\n if tag is None:\n latest_path = os.path.join(checkpoint_dir, 'latest')\n if os.path.isfile(latest_path):\n with open(latest_path, 'r') as fd:\n tag = fd.read().strip()\n else:\n raise ValueError(f\"Unable to find 'latest' file at {latest_path}\")\n\n ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)\n\n if not os.path.isdir(ds_checkpoint_dir):\n raise FileNotFoundError(f\"Directory '{ds_checkpoint_dir}' doesn't exist\")\n\n return _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir)\n\n\ndef convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir, output_file, tag=None):\n \"\"\"\n Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be\n loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.\n\n Args:\n - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)\n - ``output_file``: path to the pytorch fp32 state_dict output file (e.g. path/pytorch_model.bin)\n - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``\n \"\"\"\n\n state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)\n print(f\"Saving fp32 state dict to {output_file}\")\n torch.save(state_dict, output_file)\n\n\ndef load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):\n \"\"\"\n 1. Put the provided model to cpu\n 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``\n 3. Load it into the provided model\n\n Args:\n - ``model``: the model object to update\n - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)\n - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``\n\n Returns:\n - ``model`: modified model\n\n Make sure you have plenty of CPU memory available before you call this function. If you don't\n have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it\n conveniently placed for you in the checkpoint folder.\n\n A typical usage might be ::\n\n from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint\n model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)\n # submit to model hub or save the model to share with others\n\n Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context\n of the same application. i.e. you will need to re-initialize the deepspeed engine, since\n ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.\n\n \"\"\"\n logger.info(f\"Extracting fp32 weights\")\n state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)\n\n logger.info(f\"Overwriting model with fp32 weights\")\n model = model.cpu()\n model.load_state_dict(state_dict, strict=False)\n\n return model\n\n\nif __name__ == \"__main__\":\n\n parser = argparse.ArgumentParser()\n parser.add_argument(\"checkpoint_dir\",\n type=str,\n help=\"path to the desired checkpoint folder, e.g., path/checkpoint-12\")\n parser.add_argument(\n \"output_file\",\n type=str,\n help=\"path to the pytorch fp32 state_dict output file (e.g. path/checkpoint-12/pytorch_model.bin)\")\n parser.add_argument(\"-d\", \"--debug\", action='store_true', help=\"enable debug\")\n args = parser.parse_args()\n\n debug = args.debug\n\n convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir, args.output_file)\n", "path": "deepspeed/utils/zero_to_fp32.py" } ]
[ { "content": "#!/usr/bin/env python\n\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\n# This script extracts fp32 consolidated weights from a zero 2 and 3 DeepSpeed checkpoints. It gets\n# copied into the top level checkpoint dir, so the user can easily do the conversion at any point in\n# the future. Once extracted, the weights don't require DeepSpeed and can be used in any\n# application.\n#\n# example: python zero_to_fp32.py . pytorch_model.bin\n\nimport argparse\nimport torch\nimport glob\nimport math\nimport os\nimport re\nfrom collections import OrderedDict\n\n# while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with\n# DeepSpeed data structures it has to be available in the current python environment.\nfrom deepspeed.utils import logger\nfrom deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,\n FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES)\n\ndebug = 0\n\n# load to cpu\ndevice = torch.device('cpu')\n\n\ndef atoi(text):\n return int(text) if text.isdigit() else text\n\n\ndef natural_keys(text):\n '''\n alist.sort(key=natural_keys) sorts in human order\n http://nedbatchelder.com/blog/200712/human_sorting.html\n (See Toothy's implementation in the comments)\n '''\n return [atoi(c) for c in re.split(r'(\\d+)', text)]\n\n\ndef get_model_state_file(checkpoint_dir, zero_stage):\n if not os.path.isdir(checkpoint_dir):\n raise FileNotFoundError(f\"Directory '{checkpoint_dir}' doesn't exist\")\n\n # there should be only one file\n if zero_stage == 2:\n file = os.path.join(checkpoint_dir, \"mp_rank_00_model_states.pt\")\n elif zero_stage == 3:\n file = os.path.join(checkpoint_dir, \"zero_pp_rank_0_mp_rank_00_model_states.pt\")\n\n if not os.path.exists(file):\n raise FileNotFoundError(f\"can't find model states file at '{file}'\")\n\n return file\n\n\ndef get_optim_files(checkpoint_dir):\n # XXX: need to test that this simple glob rule works for multi-node setup too\n optim_files = sorted(glob.glob(os.path.join(checkpoint_dir, \"*_optim_states.pt\")), key=natural_keys)\n\n if len(optim_files) == 0:\n raise FileNotFoundError(f\"can't find '*_optim_states.pt' files in directory '{checkpoint_dir}'\")\n\n return optim_files\n\n\ndef parse_model_state(file):\n state_dict = torch.load(file, map_location=device)\n\n if BUFFER_NAMES not in state_dict:\n raise ValueError(f\"{file} is not a model state checkpoint\")\n buffer_names = state_dict[BUFFER_NAMES]\n if debug:\n print(\"Found buffers:\", buffer_names)\n\n # recover just the buffers while restoring them to fp32 if they were saved in fp16\n buffers = {k: v.float() for k, v in state_dict[\"module\"].items() if k in buffer_names}\n param_shapes = state_dict[PARAM_SHAPES]\n\n ds_version = state_dict.get(DS_VERSION, None)\n\n return buffers, param_shapes, ds_version\n\n\ndef parse_optim_states(files, ds_checkpoint_dir):\n\n total_files = len(files)\n state_dicts = []\n for f in files:\n state_dicts.append(torch.load(f, map_location=device))\n\n if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:\n raise ValueError(f\"{files[0]} is not a zero checkpoint\")\n zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]\n world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]\n\n # For ZeRO-2 each param group can have different partition_count as data parallelism for expert\n # parameters can be different from data parallelism for non-expert parameters. So we can just\n # use the max of the partition_count to get the dp world_size.\n\n if type(world_size) is list:\n world_size = max(world_size)\n\n if world_size != total_files:\n raise ValueError(\n f\"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. \"\n \"Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes.\"\n )\n\n # the groups are named differently in each stage\n if zero_stage == 2:\n fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS\n elif zero_stage == 3:\n fp32_groups_key = FP32_FLAT_GROUPS\n else:\n raise ValueError(f\"unknown zero stage {zero_stage}\")\n\n if zero_stage == 2:\n fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]\n elif zero_stage == 3:\n # if there is more than one param group, there will be multiple flattened tensors - one\n # flattened tensor per group - for simplicity merge them into a single tensor\n #\n # XXX: could make the script more memory efficient for when there are multiple groups - it\n # will require matching the sub-lists of param_shapes for each param group flattened tensor\n\n fp32_flat_groups = [\n torch.cat(state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key], 0) for i in range(len(state_dicts))\n ]\n\n return zero_stage, world_size, fp32_flat_groups\n\n\ndef _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir):\n \"\"\"\n Returns fp32 state_dict reconstructed from ds checkpoint\n\n Args:\n - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)\n\n \"\"\"\n print(f\"Processing zero checkpoint '{ds_checkpoint_dir}'\")\n\n optim_files = get_optim_files(ds_checkpoint_dir)\n zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)\n print(f\"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}\")\n\n model_file = get_model_state_file(ds_checkpoint_dir, zero_stage)\n buffers, param_shapes, ds_version = parse_model_state(model_file)\n print(f'Parsing checkpoint created by deepspeed=={ds_version}')\n\n if zero_stage == 2:\n return _get_fp32_state_dict_from_zero2_checkpoint(world_size, param_shapes, fp32_flat_groups, buffers)\n elif zero_stage == 3:\n return _get_fp32_state_dict_from_zero3_checkpoint(world_size, param_shapes, fp32_flat_groups, buffers)\n\n\ndef _get_fp32_state_dict_from_zero2_checkpoint(world_size, param_shapes, fp32_flat_groups, buffers):\n\n # Reconstruction protocol:\n #\n # XXX: document this\n\n if debug:\n for i in range(world_size):\n for j in range(len(fp32_flat_groups[0])):\n print(f\"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}\")\n\n # XXX: memory usage doubles here (zero2)\n num_param_groups = len(fp32_flat_groups[0])\n merged_single_partition_of_fp32_groups = []\n for i in range(num_param_groups):\n merged_partitions = [sd[i] for sd in fp32_flat_groups]\n full_single_fp32_vector = torch.cat(merged_partitions, 0)\n merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)\n avail_numel = sum(\n [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])\n\n if debug:\n wanted_params = sum([len(shapes) for shapes in param_shapes])\n wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])\n # not asserting if there is a mismatch due to possible padding\n print(f\"Have {avail_numel} numels to process.\")\n print(f\"Need {wanted_numel} numels in {wanted_params} params.\")\n\n state_dict = OrderedDict()\n\n # buffers\n state_dict.update(buffers)\n if debug:\n print(f\"added {len(buffers)} buffers\")\n\n # params\n # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support\n # out-of-core computing solution\n total_numel = 0\n total_params = 0\n for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):\n offset = 0\n avail_numel = full_single_fp32_vector.numel()\n for name, shape in shapes.items():\n\n unpartitioned_numel = shape.numel()\n total_numel += unpartitioned_numel\n total_params += 1\n\n if debug:\n print(f\"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} \")\n state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)\n offset += unpartitioned_numel\n\n # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and\n # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex\n # paddings performed in the code it's almost impossible to predict the exact numbers w/o the\n # live optimizer object, so we are checking that the numbers are within the right range\n align_to = 2 * world_size\n\n def zero2_align(x):\n return align_to * math.ceil(x / align_to)\n\n if debug:\n print(f\"original offset={offset}, avail_numel={avail_numel}\")\n\n offset = zero2_align(offset)\n avail_numel = zero2_align(avail_numel)\n\n if debug:\n print(f\"aligned offset={offset}, avail_numel={avail_numel}\")\n\n # Sanity check\n if offset != avail_numel:\n raise ValueError(f\"consumed {offset} numels out of {avail_numel} - something is wrong\")\n\n print(f\"Reconstructed fp32 state dict with {total_params} params {total_numel} elements\")\n\n return state_dict\n\n\ndef zero3_partitioned_param_info(unpartitioned_numel, world_size):\n remainder = unpartitioned_numel % world_size\n padding_numel = (world_size - remainder) if remainder else 0\n partitioned_numel = math.ceil(unpartitioned_numel / world_size)\n return partitioned_numel, padding_numel\n\n\ndef _get_fp32_state_dict_from_zero3_checkpoint(world_size, param_shapes, fp32_flat_groups, buffers):\n\n # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each\n # param, re-consolidating each param, while dealing with padding if any\n\n avail_numel = fp32_flat_groups[0].numel() * world_size\n # merge list of dicts, preserving order\n param_shapes = {k: v for d in param_shapes for k, v in d.items()}\n\n if debug:\n for i in range(world_size):\n print(f\"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}\")\n\n wanted_params = len(param_shapes)\n wanted_numel = sum(shape.numel() for shape in param_shapes.values())\n # not asserting if there is a mismatch due to possible padding\n print(f\"Have {avail_numel} numels to process.\")\n print(f\"Need {wanted_numel} numels in {wanted_params} params.\")\n\n state_dict = OrderedDict()\n\n # buffers\n state_dict.update(buffers)\n if debug:\n print(f\"added {len(buffers)} buffers\")\n\n # params\n # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support\n # out-of-core computing solution\n offset = 0\n total_numel = 0\n total_params = 0\n for name, shape in param_shapes.items():\n\n unpartitioned_numel = shape.numel()\n total_numel += unpartitioned_numel\n total_params += 1\n\n partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)\n\n if debug:\n print(\n f\"{total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}\"\n )\n\n # XXX: memory usage doubles here\n state_dict[name] = torch.cat(\n tuple(fp32_flat_groups[i].narrow(0, offset, partitioned_numel) for i in range(world_size)),\n 0).narrow(0, 0, unpartitioned_numel).view(shape)\n offset += partitioned_numel\n\n offset *= world_size\n\n # Sanity check\n if offset != avail_numel:\n raise ValueError(f\"consumed {offset} numels out of {avail_numel} - something is wrong\")\n\n print(f\"Reconstructed fp32 state dict with {total_params} params {total_numel} elements\")\n\n return state_dict\n\n\ndef get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None):\n \"\"\"\n Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with\n ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example\n via a model hub.\n\n Args:\n - ``checkpoint_dir``: path to the desired checkpoint folder\n - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``\n\n Returns:\n - pytorch ``state_dict``\n\n Note: this approach may not work if your application doesn't have sufficient free CPU memory and\n you may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with\n the checkpoint.\n\n A typical usage might be ::\n\n from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint\n # do the training and checkpoint saving\n state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu\n model = model.cpu() # move to cpu\n model.load_state_dict(state_dict)\n # submit to model hub or save the model to share with others\n\n In this example the ``model`` will no longer be usable in the deepspeed context of the same\n application. i.e. you will need to re-initialize the deepspeed engine, since\n ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.\n\n If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.\n\n \"\"\"\n if tag is None:\n latest_path = os.path.join(checkpoint_dir, 'latest')\n if os.path.isfile(latest_path):\n with open(latest_path, 'r') as fd:\n tag = fd.read().strip()\n else:\n raise ValueError(f\"Unable to find 'latest' file at {latest_path}\")\n\n ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)\n\n if not os.path.isdir(ds_checkpoint_dir):\n raise FileNotFoundError(f\"Directory '{ds_checkpoint_dir}' doesn't exist\")\n\n return _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir)\n\n\ndef convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir, output_file, tag=None):\n \"\"\"\n Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be\n loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.\n\n Args:\n - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)\n - ``output_file``: path to the pytorch fp32 state_dict output file (e.g. path/pytorch_model.bin)\n - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``\n \"\"\"\n\n state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)\n print(f\"Saving fp32 state dict to {output_file}\")\n torch.save(state_dict, output_file)\n\n\ndef load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):\n \"\"\"\n 1. Put the provided model to cpu\n 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``\n 3. Load it into the provided model\n\n Args:\n - ``model``: the model object to update\n - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)\n - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``\n\n Returns:\n - ``model`: modified model\n\n Make sure you have plenty of CPU memory available before you call this function. If you don't\n have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it\n conveniently placed for you in the checkpoint folder.\n\n A typical usage might be ::\n\n from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint\n model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)\n # submit to model hub or save the model to share with others\n\n Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context\n of the same application. i.e. you will need to re-initialize the deepspeed engine, since\n ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.\n\n \"\"\"\n logger.info(f\"Extracting fp32 weights\")\n state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)\n\n logger.info(f\"Overwriting model with fp32 weights\")\n model = model.cpu()\n model.load_state_dict(state_dict, strict=False)\n\n return model\n\n\nif __name__ == \"__main__\":\n\n parser = argparse.ArgumentParser()\n parser.add_argument(\"checkpoint_dir\",\n type=str,\n help=\"path to the desired checkpoint folder, e.g., path/checkpoint-12\")\n parser.add_argument(\n \"output_file\",\n type=str,\n help=\"path to the pytorch fp32 state_dict output file (e.g. path/checkpoint-12/pytorch_model.bin)\")\n parser.add_argument(\"-d\", \"--debug\", action='store_true', help=\"enable debug\")\n args = parser.parse_args()\n\n debug = args.debug\n\n convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir, args.output_file)\n", "path": "deepspeed/utils/zero_to_fp32.py" } ]
diff --git a/deepspeed/utils/zero_to_fp32.py b/deepspeed/utils/zero_to_fp32.py index 55d23ca61745..6c8a5de2b1e0 100755 --- a/deepspeed/utils/zero_to_fp32.py +++ b/deepspeed/utils/zero_to_fp32.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0
pymodbus-dev__pymodbus-1422
py.typed missing in pip install ### Versions - Python: 3.11 - OS: macOS - Pymodbus: 3.2.0 (pip install) - Modbus Hardware (if used): ### Description running mypy on my project complains about missing ``` artisanlib/modbusport.py:68: error: Skipping analyzing "pymodbus.constants": module is installed, but missing library stubs or py.typed marker [import] artisanlib/modbusport.py:69: error: Skipping analyzing "pymodbus.payload": module is installed, but missing library stubs or py.typed marker [import] artisanlib/modbusport.py:241: error: Skipping analyzing "pymodbus.client": module is installed, but missing library stubs or py.typed marker [import] artisanlib/modbusport.py:385: error: Skipping analyzing "pymodbus.pdu": module is installed, but missing library stubs or py.typed marker [import] ``` despite all your nice work on adding type annotations. The file py.typed id not get installed along via ``` # sudo -H python3 -m pip install pymodbus --upgrade ``` ``` # cd /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pymodbus # ls ./py.typed ls: ./py.typed: No such file or directory ``` I added it as follows and the mypy errors went away. ``` # cd /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pymodbus # sudo touch py.typed ```
[ { "content": "#!/usr/bin/env python3\n\"\"\"Installs pymodbus using setuptools.\"\"\"\n\n\n# --------------------------------------------------------------------------- #\n# initialization\n# --------------------------------------------------------------------------- #\nfrom setuptools import setup\n\n\ndependencies = {}\nwith open(\"requirements.txt\") as reqs:\n option = None\n for line in reqs.read().split(\"\\n\"):\n if line == \"\":\n option = None\n elif line.startswith(\"# install:\"):\n option = line.split(\":\")[1]\n dependencies[option] = []\n elif not line.startswith(\"#\") and option:\n dependencies[option].append(line)\n\ninstall_req = dependencies[\"required\"]\ndel dependencies[\"required\"]\n\n\n# --------------------------------------------------------------------------- #\n# configuration\n# --------------------------------------------------------------------------- #\nsetup(\n install_requires=install_req,\n extras_require=dependencies,\n)\n", "path": "setup.py" } ]
[ { "content": "#!/usr/bin/env python3\n\"\"\"Installs pymodbus using setuptools.\"\"\"\n\n\n# --------------------------------------------------------------------------- #\n# initialization\n# --------------------------------------------------------------------------- #\nfrom setuptools import setup\n\n\ndependencies = {}\nwith open(\"requirements.txt\") as reqs:\n option = None\n for line in reqs.read().split(\"\\n\"):\n if line == \"\":\n option = None\n elif line.startswith(\"# install:\"):\n option = line.split(\":\")[1]\n dependencies[option] = []\n elif not line.startswith(\"#\") and option:\n dependencies[option].append(line)\n\ninstall_req = dependencies[\"required\"]\ndel dependencies[\"required\"]\n\n\n# --------------------------------------------------------------------------- #\n# configuration\n# --------------------------------------------------------------------------- #\nsetup(\n install_requires=install_req,\n extras_require=dependencies,\n package_data={\"pymodbus\": [\"py.typed\"]},\n)\n", "path": "setup.py" } ]
diff --git a/setup.py b/setup.py index 1551b2dd6..7cd2ed605 100644 --- a/setup.py +++ b/setup.py @@ -30,4 +30,5 @@ setup( install_requires=install_req, extras_require=dependencies, + package_data={"pymodbus": ["py.typed"]}, )
uccser__cs-unplugged-434
Check desired orientation of binary to alphabet resource Currently is displayed in portrait but half the page is unused. May be better to switch to landscape which will increase the size of table cells.
[ { "content": "\"\"\"Module for generating Binary to Alphabet resource.\"\"\"\n\nfrom PIL import Image, ImageDraw, ImageFont\nfrom utils.retrieve_query_parameter import retrieve_query_parameter\n\n\ndef resource_image(request, resource):\n \"\"\"Create a image for Binary to Alphabet resource.\n\n Args:\n request: HTTP request object\n resource: Object of resource data.\n\n Returns:\n A Pillow image object.\n \"\"\"\n # Retrieve relevant image\n parameter_options = valid_options()\n worksheet_version = retrieve_query_parameter(request, \"worksheet_version\", parameter_options[\"worksheet_version\"])\n if worksheet_version == \"student\":\n image_path = \"static/img/resources/binary-to-alphabet/table.png\"\n else:\n image_path = \"static/img/resources/binary-to-alphabet/table-teacher.png\"\n image = Image.open(image_path)\n draw = ImageDraw.Draw(image)\n\n font_size = 30\n font_path = \"static/fonts/PatrickHand-Regular.ttf\"\n font = ImageFont.truetype(font_path, font_size)\n\n # Draw headings\n column_headings = [\"Base 10\", \"Binary\", \"Letter\"]\n heading_coord_x = 18\n heading_coord_y = 6\n\n i = 0\n while i < 9: # 9 = number of columns\n\n if i % 3 == 0:\n text = str(column_headings[0])\n elif i % 3 == 1:\n text = str(column_headings[1])\n else:\n text = str(column_headings[2])\n\n draw.text(\n (heading_coord_x, heading_coord_y),\n text,\n font=font,\n fill=\"#000\"\n )\n\n heading_coord_x += 113\n\n i += 1\n\n # Draw numbers\n # Column data: (min number, max number), x coord\n columns_data = [((0, 9), 58), ((9, 18), 397), ((18, 27), 736)]\n\n for column_set in columns_data:\n start, end = column_set[0]\n base_coord_x = column_set[1]\n base_coord_y = 75\n\n for number in range(start, end):\n text = str(number)\n text_width, text_height = draw.textsize(text, font=font)\n coord_x = base_coord_x - (text_width / 2)\n coord_y = base_coord_y - (text_height / 2)\n\n draw.text(\n (coord_x, coord_y),\n text,\n font=font,\n fill=\"#000\"\n )\n\n base_coord_y += 54\n\n return image\n\n\ndef subtitle(request, resource):\n \"\"\"Return the subtitle string of the resource.\n\n Used after the resource name in the filename, and\n also on the resource image.\n\n Args:\n request: HTTP request object\n resource: Object of resource data.\n\n Returns:\n text for subtitle (string)\n \"\"\"\n text = \"{} - {}\".format(\n retrieve_query_parameter(request, \"worksheet_version\"),\n retrieve_query_parameter(request, \"paper_size\")\n )\n return text\n\n\ndef valid_options():\n \"\"\"Provide dictionary of all valid parameters.\n\n This excludes the header text parameter.\n\n Returns:\n All valid options (dict).\n \"\"\"\n return {\n \"worksheet_version\": [\"student\", \"teacher\"],\n \"paper_size\": [\"a4\", \"letter\"]\n }\n", "path": "csunplugged/resources/views/binary_to_alphabet.py" } ]
[ { "content": "\"\"\"Module for generating Binary to Alphabet resource.\"\"\"\n\nfrom PIL import Image, ImageDraw, ImageFont\nfrom utils.retrieve_query_parameter import retrieve_query_parameter\n\n\ndef resource_image(request, resource):\n \"\"\"Create a image for Binary to Alphabet resource.\n\n Args:\n request: HTTP request object\n resource: Object of resource data.\n\n Returns:\n A Pillow image object.\n \"\"\"\n # Retrieve relevant image\n parameter_options = valid_options()\n worksheet_version = retrieve_query_parameter(request, \"worksheet_version\", parameter_options[\"worksheet_version\"])\n if worksheet_version == \"student\":\n image_path = \"static/img/resources/binary-to-alphabet/table.png\"\n else:\n image_path = \"static/img/resources/binary-to-alphabet/table-teacher.png\"\n image = Image.open(image_path)\n draw = ImageDraw.Draw(image)\n\n font_size = 30\n font_path = \"static/fonts/PatrickHand-Regular.ttf\"\n font = ImageFont.truetype(font_path, font_size)\n\n # Draw headings\n column_headings = [\"Base 10\", \"Binary\", \"Letter\"]\n heading_coord_x = 18\n heading_coord_y = 6\n\n i = 0\n while i < 9: # 9 = number of columns\n\n if i % 3 == 0:\n text = str(column_headings[0])\n elif i % 3 == 1:\n text = str(column_headings[1])\n else:\n text = str(column_headings[2])\n\n draw.text(\n (heading_coord_x, heading_coord_y),\n text,\n font=font,\n fill=\"#000\"\n )\n\n heading_coord_x += 113\n\n i += 1\n\n # Draw numbers\n # Column data: (min number, max number), x coord\n columns_data = [((0, 9), 58), ((9, 18), 397), ((18, 27), 736)]\n\n for column_set in columns_data:\n start, end = column_set[0]\n base_coord_x = column_set[1]\n base_coord_y = 75\n\n for number in range(start, end):\n text = str(number)\n text_width, text_height = draw.textsize(text, font=font)\n coord_x = base_coord_x - (text_width / 2)\n coord_y = base_coord_y - (text_height / 2)\n\n draw.text(\n (coord_x, coord_y),\n text,\n font=font,\n fill=\"#000\"\n )\n\n base_coord_y += 54\n\n image = image.rotate(90, expand=True)\n return image\n\n\ndef subtitle(request, resource):\n \"\"\"Return the subtitle string of the resource.\n\n Used after the resource name in the filename, and\n also on the resource image.\n\n Args:\n request: HTTP request object\n resource: Object of resource data.\n\n Returns:\n text for subtitle (string)\n \"\"\"\n text = \"{} - {}\".format(\n retrieve_query_parameter(request, \"worksheet_version\"),\n retrieve_query_parameter(request, \"paper_size\")\n )\n return text\n\n\ndef valid_options():\n \"\"\"Provide dictionary of all valid parameters.\n\n This excludes the header text parameter.\n\n Returns:\n All valid options (dict).\n \"\"\"\n return {\n \"worksheet_version\": [\"student\", \"teacher\"],\n \"paper_size\": [\"a4\", \"letter\"]\n }\n", "path": "csunplugged/resources/views/binary_to_alphabet.py" } ]
diff --git a/csunplugged/resources/views/binary_to_alphabet.py b/csunplugged/resources/views/binary_to_alphabet.py index 8942f1170..894c0fa22 100644 --- a/csunplugged/resources/views/binary_to_alphabet.py +++ b/csunplugged/resources/views/binary_to_alphabet.py @@ -78,6 +78,7 @@ def resource_image(request, resource): base_coord_y += 54 + image = image.rotate(90, expand=True) return image diff --git a/csunplugged/static/img/resources/binary-to-alphabet/thumbnail.png b/csunplugged/static/img/resources/binary-to-alphabet/thumbnail.png index 91b092548..2b435e547 100644 Binary files a/csunplugged/static/img/resources/binary-to-alphabet/thumbnail.png and b/csunplugged/static/img/resources/binary-to-alphabet/thumbnail.png differ
spack__spack-6618
xrootd needs openssl xrootd needs openssl headers to compile for 4.6.0 spack find : always prompt 0 installed packages On a clean `develop` checkout : ``` $ git clone https://github.com/LLNL/spack.git Cloning into 'spack'... remote: Counting objects: 25613, done. remote: Compressing objects: 100% (42/42), done. remote: Total 25613 (delta 12), reused 3 (delta 3), pack-reused 25557 Receiving objects: 100% (25613/25613), 6.65 MiB | 6.46 MiB/s, done. Resolving deltas: 100% (13031/13031), done. Checking connectivity... done. $ cd spack $ . share/spack/setup-env.sh $ spack compilers ==> Available compilers -- gcc ---------------------------------------------------------- [email protected] $ spack install zlib ==> Installing zlib ==> Trying to fetch from file:///home/mculpo/production/spack-mirror/zlib/zlib-1.2.8.tar.gz ######################################################################## 100,0% ==> Staging archive: /home/mculpo/tmp/spack/var/spack/stage/zlib-1.2.8-d6pdl6xvnvap6ihrqcqtgvweghbszmix/zlib-1.2.8.tar.gz ==> Created stage in /home/mculpo/tmp/spack/var/spack/stage/zlib-1.2.8-d6pdl6xvnvap6ihrqcqtgvweghbszmix ==> No patches needed for zlib ==> Building zlib ==> Successfully installed zlib Fetch: 0.01s. Build: 3.69s. Total: 3.70s. [+] /home/mculpo/tmp/spack/opt/spack/linux-x86_64/gcc-4.8/zlib-1.2.8-d6pdl6xvnvap6ihrqcqtgvweghbszmix $ spack find ==> 0 installed packages. $ spack install szip ==> Installing szip ==> Trying to fetch from file:///home/mculpo/production/spack-mirror/szip/szip-2.1.tar.gz ######################################################################## 100,0% ==> Staging archive: /home/mculpo/tmp/spack/var/spack/stage/szip-2.1-esfmhl54wbdb7nnnip6y6jbxlbmxs2jq/szip-2.1.tar.gz ==> Created stage in /home/mculpo/tmp/spack/var/spack/stage/szip-2.1-esfmhl54wbdb7nnnip6y6jbxlbmxs2jq ==> No patches needed for szip ==> Building szip ==> Successfully installed szip Fetch: 0.01s. Build: 8.09s. Total: 8.10s. [+] /home/mculpo/tmp/spack/opt/spack/linux-x86_64/gcc-4.8/szip-2.1-esfmhl54wbdb7nnnip6y6jbxlbmxs2jq $ spack find ==> 0 installed packages. ``` The db seems to be written correctly : ``` database: installs: d6pdl6xvnvap6ihrqcqtgvweghbszmix: explicit: true installed: true path: /home/mculpo/tmp/spack/opt/spack/linux-x86_64/gcc-4.8/zlib-1.2.8-d6pdl6xvnvap6ihrqcqtgvweghbszmix ref_count: 0 spec: zlib: arch: linux-x86_64 compiler: name: gcc version: '4.8' dependencies: {} namespace: builtin parameters: cflags: [] cppflags: [] cxxflags: [] fflags: [] ldflags: [] ldlibs: [] version: 1.2.8 esfmhl54wbdb7nnnip6y6jbxlbmxs2jq: explicit: true installed: true path: /home/mculpo/tmp/spack/opt/spack/linux-x86_64/gcc-4.8/szip-2.1-esfmhl54wbdb7nnnip6y6jbxlbmxs2jq ref_count: 0 spec: szip: arch: linux-x86_64 compiler: name: gcc version: '4.8' dependencies: {} namespace: builtin parameters: cflags: [] cppflags: [] cxxflags: [] fflags: [] ldflags: [] ldlibs: [] version: '2.1' version: 0.9.1 ``` xrootd requires zlib to be installed on system CMake can't find zlib when installing xrootd. zlib is not listed as a dependency fro xrootd, so CMake looks for it on the system.
[ { "content": "##############################################################################\n# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, [email protected], All rights reserved.\n# LLNL-CODE-647188\n#\n# For details, see https://github.com/spack/spack\n# Please also see the NOTICE and LICENSE files for our notice and the LGPL.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License (as\n# published by the Free Software Foundation) version 2.1, February 1999.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and\n# conditions of the GNU Lesser General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public\n# License along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n##############################################################################\n\nfrom spack import *\n\n\nclass Xrootd(CMakePackage):\n \"\"\"The XROOTD project aims at giving high performance, scalable fault\n tolerant access to data repositories of many kinds.\"\"\"\n homepage = \"http://xrootd.org\"\n url = \"http://xrootd.org/download/v4.6.0/xrootd-4.6.0.tar.gz\"\n\n version('4.6.0', '5d60aade2d995b68fe0c46896bc4a5d1')\n version('4.5.0', 'd485df3d4a991e1c35efa4bf9ef663d7')\n version('4.4.1', '72b0842f802ccc94dede4ac5ab2a589e')\n version('4.4.0', '58f55e56801d3661d753ff5fd33dbcc9')\n version('4.3.0', '39c2fab9f632f35e12ff607ccaf9e16c')\n\n depends_on('[email protected]:', type='build')\n depends_on('zlib')\n", "path": "var/spack/repos/builtin/packages/xrootd/package.py" } ]
[ { "content": "##############################################################################\n# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, [email protected], All rights reserved.\n# LLNL-CODE-647188\n#\n# For details, see https://github.com/spack/spack\n# Please also see the NOTICE and LICENSE files for our notice and the LGPL.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License (as\n# published by the Free Software Foundation) version 2.1, February 1999.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and\n# conditions of the GNU Lesser General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public\n# License along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n##############################################################################\n\nfrom spack import *\n\n\nclass Xrootd(CMakePackage):\n \"\"\"The XROOTD project aims at giving high performance, scalable fault\n tolerant access to data repositories of many kinds.\"\"\"\n homepage = \"http://xrootd.org\"\n url = \"http://xrootd.org/download/v4.6.0/xrootd-4.6.0.tar.gz\"\n\n version('4.6.0', '5d60aade2d995b68fe0c46896bc4a5d1')\n version('4.5.0', 'd485df3d4a991e1c35efa4bf9ef663d7')\n version('4.4.1', '72b0842f802ccc94dede4ac5ab2a589e')\n version('4.4.0', '58f55e56801d3661d753ff5fd33dbcc9')\n version('4.3.0', '39c2fab9f632f35e12ff607ccaf9e16c')\n\n depends_on('[email protected]:', type='build')\n depends_on('zlib')\n depends_on('openssl')\n", "path": "var/spack/repos/builtin/packages/xrootd/package.py" } ]
diff --git a/var/spack/repos/builtin/packages/xrootd/package.py b/var/spack/repos/builtin/packages/xrootd/package.py index 2514997f88a18c..16a178788334df 100644 --- a/var/spack/repos/builtin/packages/xrootd/package.py +++ b/var/spack/repos/builtin/packages/xrootd/package.py @@ -40,3 +40,4 @@ class Xrootd(CMakePackage): depends_on('[email protected]:', type='build') depends_on('zlib') + depends_on('openssl')
streamlit__streamlit-6663
st.json replaces multiple spaces with single space ### Checklist - [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues. - [X] I added a very descriptive title to this issue. - [X] I have provided sufficient information below to help reproduce this issue. ### Summary When using st.json, multiple spaces in strings are replaced with a single space. ### Reproducible Code Example ```Python import streamlit as st st.json({"Hello World": "Hello James"}) ``` ### Steps To Reproduce _No response_ ### Expected Behavior _No response_ ### Current Behavior _No response_ ### Is this a regression? - [ ] Yes, this used to work in a previous version. ### Debug info - Streamlit version: - Python version: - Operating System: - Browser: - Virtual environment: ### Additional Information _No response_ ### Are you willing to submit a PR? - [ ] Yes, I am willing to submit a PR! st.json replaces multiple spaces with single space ### Checklist - [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues. - [X] I added a very descriptive title to this issue. - [X] I have provided sufficient information below to help reproduce this issue. ### Summary When using st.json, multiple spaces in strings are replaced with a single space. ### Reproducible Code Example ```Python import streamlit as st st.json({"Hello World": "Hello James"}) ``` ### Steps To Reproduce _No response_ ### Expected Behavior _No response_ ### Current Behavior _No response_ ### Is this a regression? - [ ] Yes, this used to work in a previous version. ### Debug info - Streamlit version: - Python version: - Operating System: - Browser: - Virtual environment: ### Additional Information _No response_ ### Are you willing to submit a PR? - [ ] Yes, I am willing to submit a PR!
[ { "content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport streamlit as st\n\ndata = {\"foo\": \"bar\"}\nst.json(data)\nst.json(data, expanded=False)\n", "path": "e2e/scripts/st_json.py" } ]
[ { "content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport streamlit as st\n\ndata = {\"foo\": \"bar\"}\nst.json(data)\nst.json(data, expanded=False)\ndata = {\"Hello World\": \"Foo Bar\"}\nst.json(data)\n", "path": "e2e/scripts/st_json.py" } ]
diff --git a/e2e/scripts/st_json.py b/e2e/scripts/st_json.py index 31a2b9b87904..2681bdaea318 100644 --- a/e2e/scripts/st_json.py +++ b/e2e/scripts/st_json.py @@ -17,3 +17,5 @@ data = {"foo": "bar"} st.json(data) st.json(data, expanded=False) +data = {"Hello World": "Foo Bar"} +st.json(data) diff --git a/e2e/specs/st_json.spec.js b/e2e/specs/st_json.spec.js index 56d8ce3c91f4..b6a518db329a 100644 --- a/e2e/specs/st_json.spec.js +++ b/e2e/specs/st_json.spec.js @@ -28,4 +28,14 @@ describe("st.json", () => { it("displays collapsed json", () => { cy.getIndexed("[data-testid='stJson']", 1).should("contain", "..."); }); + + it("preserves multiple white spaces", () => { + cy.getIndexed("[data-testid='stJson']", 2) + .should("contain", "Hello World") + .and("contain", "Foo Bar"); + }); + + it('matches snapshot', () => { + cy.getIndexed("[data-testid='stJson']", 2).matchThemedSnapshots("json-white-spaces") + }); }); diff --git a/frontend/cypress/snapshots/linux/2x/st_json.spec.js/json-white-spaces-dark.snap.png b/frontend/cypress/snapshots/linux/2x/st_json.spec.js/json-white-spaces-dark.snap.png new file mode 100644 index 000000000000..9299be406f47 Binary files /dev/null and b/frontend/cypress/snapshots/linux/2x/st_json.spec.js/json-white-spaces-dark.snap.png differ diff --git a/frontend/cypress/snapshots/linux/2x/st_json.spec.js/json-white-spaces.snap.png b/frontend/cypress/snapshots/linux/2x/st_json.spec.js/json-white-spaces.snap.png new file mode 100644 index 000000000000..16b1fd35e109 Binary files /dev/null and b/frontend/cypress/snapshots/linux/2x/st_json.spec.js/json-white-spaces.snap.png differ diff --git a/frontend/src/lib/components/elements/Json/Json.tsx b/frontend/src/lib/components/elements/Json/Json.tsx index f2b2be980c1d..9586b1e50047 100644 --- a/frontend/src/lib/components/elements/Json/Json.tsx +++ b/frontend/src/lib/components/elements/Json/Json.tsx @@ -69,6 +69,7 @@ export default function Json({ width, element }: JsonProps): ReactElement { fontFamily: theme.genericFonts.codeFont, fontSize: theme.fontSizes.sm, backgroundColor: theme.colors.bgColor, + whiteSpace: "pre-wrap", // preserve whitespace }} /> </div>
jazzband__pip-tools-555
pip-sync uninstalls pkg-resources, breaks psycopg2 `pip-sync` uninstalls `pkg-resources`, which in turn breaks installation of many other packages. `pkg-resources` is a new "system" package that was recently extracted from `setuptools` (since version 31, I believe). I think it must be handled similarly to `setuptools`. ##### Steps to replicate On a fully updated Ubuntu 16.04 LTS: ```console semenov@dev2:~/tmp$ rm -rf ~/.cache/pip semenov@dev2:~/tmp$ virtualenv --python=$(which python3) test Already using interpreter /usr/bin/python3 Using base prefix '/usr' New python executable in /home/semenov/tmp/test/bin/python3 Also creating executable in /home/semenov/tmp/test/bin/python Installing setuptools, pkg_resources, pip, wheel...done. semenov@dev2:~/tmp$ cd test semenov@dev2:~/tmp/test$ . bin/activate (test) semenov@dev2:~/tmp/test$ pip install pip-tools Collecting pip-tools Downloading pip_tools-1.8.0-py2.py3-none-any.whl Collecting six (from pip-tools) Downloading six-1.10.0-py2.py3-none-any.whl Collecting first (from pip-tools) Downloading first-2.0.1-py2.py3-none-any.whl Collecting click>=6 (from pip-tools) Downloading click-6.6-py2.py3-none-any.whl (71kB) 100% |████████████████████████████████| 71kB 559kB/s Installing collected packages: six, first, click, pip-tools Successfully installed click-6.6 first-2.0.1 pip-tools-1.8.0 six-1.10.0 (test) semenov@dev2:~/tmp/test$ echo psycopg2 > requirements.in (test) semenov@dev2:~/tmp/test$ pip-compile # # This file is autogenerated by pip-compile # To update, run: # # pip-compile --output-file requirements.txt requirements.in # psycopg2==2.6.2 (test) semenov@dev2:~/tmp/test$ pip-sync Uninstalling pkg-resources-0.0.0: Successfully uninstalled pkg-resources-0.0.0 Collecting psycopg2==2.6.2 Downloading psycopg2-2.6.2.tar.gz (376kB) 100% |████████████████████████████████| 378kB 2.4MB/s Could not import setuptools which is required to install from a source distribution. Traceback (most recent call last): File "/home/semenov/tmp/test/lib/python3.5/site-packages/pip/req/req_install.py", line 387, in setup_py import setuptools # noqa File "/home/semenov/tmp/test/lib/python3.5/site-packages/setuptools/__init__.py", line 10, in <module> from setuptools.extern.six.moves import filter, filterfalse, map File "/home/semenov/tmp/test/lib/python3.5/site-packages/setuptools/extern/__init__.py", line 1, in <module> from pkg_resources.extern import VendorImporter ImportError: No module named 'pkg_resources.extern' Traceback (most recent call last): File "/home/semenov/tmp/test/bin/pip-sync", line 11, in <module> sys.exit(cli()) File "/home/semenov/tmp/test/lib/python3.5/site-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/home/semenov/tmp/test/lib/python3.5/site-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/home/semenov/tmp/test/lib/python3.5/site-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/semenov/tmp/test/lib/python3.5/site-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/home/semenov/tmp/test/lib/python3.5/site-packages/piptools/scripts/sync.py", line 72, in cli install_flags=install_flags)) File "/home/semenov/tmp/test/lib/python3.5/site-packages/piptools/sync.py", line 157, in sync check_call([pip, 'install'] + pip_flags + install_flags + sorted(to_install)) File "/usr/lib/python3.5/subprocess.py", line 581, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['pip', 'install', 'psycopg2==2.6.2']' returned non-zero exit status 1 ``` ##### Expected result `pip-sync` keeps `pkg-resources` in place, `psycopg2` installs normally. ##### Actual result `pip-sync` uninstalls `pkg-resources`, then `psycopg2` installation fails with: `ImportError: No module named 'pkg_resources.extern'`
[ { "content": "import collections\nimport os\nimport sys\nfrom subprocess import check_call\n\nfrom . import click\nfrom .exceptions import IncompatibleRequirements, UnsupportedConstraint\nfrom .utils import flat_map, format_requirement, key_from_req\n\nPACKAGES_TO_IGNORE = [\n 'pip',\n 'pip-tools',\n 'pip-review',\n 'setuptools',\n 'wheel',\n]\n\n\ndef dependency_tree(installed_keys, root_key):\n \"\"\"\n Calculate the dependency tree for the package `root_key` and return\n a collection of all its dependencies. Uses a DFS traversal algorithm.\n\n `installed_keys` should be a {key: requirement} mapping, e.g.\n {'django': from_line('django==1.8')}\n `root_key` should be the key to return the dependency tree for.\n \"\"\"\n dependencies = set()\n queue = collections.deque()\n\n if root_key in installed_keys:\n dep = installed_keys[root_key]\n queue.append(dep)\n\n while queue:\n v = queue.popleft()\n key = key_from_req(v)\n if key in dependencies:\n continue\n\n dependencies.add(key)\n\n for dep_specifier in v.requires():\n dep_name = key_from_req(dep_specifier)\n if dep_name in installed_keys:\n dep = installed_keys[dep_name]\n\n if dep_specifier.specifier.contains(dep.version):\n queue.append(dep)\n\n return dependencies\n\n\ndef get_dists_to_ignore(installed):\n \"\"\"\n Returns a collection of package names to ignore when performing pip-sync,\n based on the currently installed environment. For example, when pip-tools\n is installed in the local environment, it should be ignored, including all\n of its dependencies (e.g. click). When pip-tools is not installed\n locally, click should also be installed/uninstalled depending on the given\n requirements.\n \"\"\"\n installed_keys = {key_from_req(r): r for r in installed}\n return list(flat_map(lambda req: dependency_tree(installed_keys, req), PACKAGES_TO_IGNORE))\n\n\ndef merge(requirements, ignore_conflicts):\n by_key = {}\n\n for ireq in requirements:\n if ireq.link is not None and not ireq.editable:\n msg = ('pip-compile does not support URLs as packages, unless they are editable. '\n 'Perhaps add -e option?')\n raise UnsupportedConstraint(msg, ireq)\n\n key = ireq.link or key_from_req(ireq.req)\n\n if not ignore_conflicts:\n existing_ireq = by_key.get(key)\n if existing_ireq:\n # NOTE: We check equality here since we can assume that the\n # requirements are all pinned\n if ireq.specifier != existing_ireq.specifier:\n raise IncompatibleRequirements(ireq, existing_ireq)\n\n # TODO: Always pick the largest specifier in case of a conflict\n by_key[key] = ireq\n\n return by_key.values()\n\n\ndef diff(compiled_requirements, installed_dists):\n \"\"\"\n Calculate which packages should be installed or uninstalled, given a set\n of compiled requirements and a list of currently installed modules.\n \"\"\"\n requirements_lut = {r.link or key_from_req(r.req): r for r in compiled_requirements}\n\n satisfied = set() # holds keys\n to_install = set() # holds InstallRequirement objects\n to_uninstall = set() # holds keys\n\n pkgs_to_ignore = get_dists_to_ignore(installed_dists)\n for dist in installed_dists:\n key = key_from_req(dist)\n if key not in requirements_lut:\n to_uninstall.add(key)\n elif requirements_lut[key].specifier.contains(dist.version):\n satisfied.add(key)\n\n for key, requirement in requirements_lut.items():\n if key not in satisfied:\n to_install.add(requirement)\n\n # Make sure to not uninstall any packages that should be ignored\n to_uninstall -= set(pkgs_to_ignore)\n\n return (to_install, to_uninstall)\n\n\ndef sync(to_install, to_uninstall, verbose=False, dry_run=False, pip_flags=None, install_flags=None):\n \"\"\"\n Install and uninstalls the given sets of modules.\n \"\"\"\n if not to_uninstall and not to_install:\n click.echo(\"Everything up-to-date\")\n\n if pip_flags is None:\n pip_flags = []\n\n if not verbose:\n pip_flags += ['-q']\n\n if os.environ.get('VIRTUAL_ENV'):\n # find pip via PATH\n pip = 'pip'\n else:\n # find pip in same directory as pip-sync entry-point script\n pip = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), 'pip')\n\n if to_uninstall:\n if dry_run:\n click.echo(\"Would uninstall:\")\n for pkg in to_uninstall:\n click.echo(\" {}\".format(pkg))\n else:\n check_call([pip, 'uninstall', '-y'] + pip_flags + sorted(to_uninstall))\n\n if to_install:\n if install_flags is None:\n install_flags = []\n if dry_run:\n click.echo(\"Would install:\")\n for ireq in to_install:\n click.echo(\" {}\".format(format_requirement(ireq)))\n else:\n package_args = []\n for ireq in sorted(to_install):\n if ireq.editable:\n package_args.extend(['-e', str(ireq.link or ireq.req)])\n else:\n package_args.append(str(ireq.req))\n check_call([pip, 'install'] + pip_flags + install_flags + package_args)\n return 0\n", "path": "piptools/sync.py" } ]
[ { "content": "import collections\nimport os\nimport sys\nfrom subprocess import check_call\n\nfrom . import click\nfrom .exceptions import IncompatibleRequirements, UnsupportedConstraint\nfrom .utils import flat_map, format_requirement, key_from_req\n\nPACKAGES_TO_IGNORE = [\n 'pip',\n 'pip-tools',\n 'pip-review',\n 'pkg-resources',\n 'setuptools',\n 'wheel',\n]\n\n\ndef dependency_tree(installed_keys, root_key):\n \"\"\"\n Calculate the dependency tree for the package `root_key` and return\n a collection of all its dependencies. Uses a DFS traversal algorithm.\n\n `installed_keys` should be a {key: requirement} mapping, e.g.\n {'django': from_line('django==1.8')}\n `root_key` should be the key to return the dependency tree for.\n \"\"\"\n dependencies = set()\n queue = collections.deque()\n\n if root_key in installed_keys:\n dep = installed_keys[root_key]\n queue.append(dep)\n\n while queue:\n v = queue.popleft()\n key = key_from_req(v)\n if key in dependencies:\n continue\n\n dependencies.add(key)\n\n for dep_specifier in v.requires():\n dep_name = key_from_req(dep_specifier)\n if dep_name in installed_keys:\n dep = installed_keys[dep_name]\n\n if dep_specifier.specifier.contains(dep.version):\n queue.append(dep)\n\n return dependencies\n\n\ndef get_dists_to_ignore(installed):\n \"\"\"\n Returns a collection of package names to ignore when performing pip-sync,\n based on the currently installed environment. For example, when pip-tools\n is installed in the local environment, it should be ignored, including all\n of its dependencies (e.g. click). When pip-tools is not installed\n locally, click should also be installed/uninstalled depending on the given\n requirements.\n \"\"\"\n installed_keys = {key_from_req(r): r for r in installed}\n return list(flat_map(lambda req: dependency_tree(installed_keys, req), PACKAGES_TO_IGNORE))\n\n\ndef merge(requirements, ignore_conflicts):\n by_key = {}\n\n for ireq in requirements:\n if ireq.link is not None and not ireq.editable:\n msg = ('pip-compile does not support URLs as packages, unless they are editable. '\n 'Perhaps add -e option?')\n raise UnsupportedConstraint(msg, ireq)\n\n key = ireq.link or key_from_req(ireq.req)\n\n if not ignore_conflicts:\n existing_ireq = by_key.get(key)\n if existing_ireq:\n # NOTE: We check equality here since we can assume that the\n # requirements are all pinned\n if ireq.specifier != existing_ireq.specifier:\n raise IncompatibleRequirements(ireq, existing_ireq)\n\n # TODO: Always pick the largest specifier in case of a conflict\n by_key[key] = ireq\n\n return by_key.values()\n\n\ndef diff(compiled_requirements, installed_dists):\n \"\"\"\n Calculate which packages should be installed or uninstalled, given a set\n of compiled requirements and a list of currently installed modules.\n \"\"\"\n requirements_lut = {r.link or key_from_req(r.req): r for r in compiled_requirements}\n\n satisfied = set() # holds keys\n to_install = set() # holds InstallRequirement objects\n to_uninstall = set() # holds keys\n\n pkgs_to_ignore = get_dists_to_ignore(installed_dists)\n for dist in installed_dists:\n key = key_from_req(dist)\n if key not in requirements_lut:\n to_uninstall.add(key)\n elif requirements_lut[key].specifier.contains(dist.version):\n satisfied.add(key)\n\n for key, requirement in requirements_lut.items():\n if key not in satisfied:\n to_install.add(requirement)\n\n # Make sure to not uninstall any packages that should be ignored\n to_uninstall -= set(pkgs_to_ignore)\n\n return (to_install, to_uninstall)\n\n\ndef sync(to_install, to_uninstall, verbose=False, dry_run=False, pip_flags=None, install_flags=None):\n \"\"\"\n Install and uninstalls the given sets of modules.\n \"\"\"\n if not to_uninstall and not to_install:\n click.echo(\"Everything up-to-date\")\n\n if pip_flags is None:\n pip_flags = []\n\n if not verbose:\n pip_flags += ['-q']\n\n if os.environ.get('VIRTUAL_ENV'):\n # find pip via PATH\n pip = 'pip'\n else:\n # find pip in same directory as pip-sync entry-point script\n pip = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), 'pip')\n\n if to_uninstall:\n if dry_run:\n click.echo(\"Would uninstall:\")\n for pkg in to_uninstall:\n click.echo(\" {}\".format(pkg))\n else:\n check_call([pip, 'uninstall', '-y'] + pip_flags + sorted(to_uninstall))\n\n if to_install:\n if install_flags is None:\n install_flags = []\n if dry_run:\n click.echo(\"Would install:\")\n for ireq in to_install:\n click.echo(\" {}\".format(format_requirement(ireq)))\n else:\n package_args = []\n for ireq in sorted(to_install):\n if ireq.editable:\n package_args.extend(['-e', str(ireq.link or ireq.req)])\n else:\n package_args.append(str(ireq.req))\n check_call([pip, 'install'] + pip_flags + install_flags + package_args)\n return 0\n", "path": "piptools/sync.py" } ]
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e04189fd..1de8180b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ when `--allow-unsafe` was not set. ([#517](https://github.com/jazzband/pip-tools - Fixed bug where editable PyPI dependencies would have a `download_dir` and be exposed to `git-checkout-index`, (thus losing their VCS directory) and `python setup.py egg_info` fails. ([#385](https://github.com/jazzband/pip-tools/pull/385#) and [#538](https://github.com/jazzband/pip-tools/pull/538)). Thanks @blueyed and @dfee - Fixed bug where some primary dependencies were annotated with "via" info comments. ([#542](https://github.com/jazzband/pip-tools/pull/542)). Thanks @quantus +- Fixed bug where pkg-resources would be removed by pip-sync in Ubuntu. ([#555](https://github.com/jazzband/pip-tools/pull/555)). Thanks @cemsbr # 1.9.0 (2017-04-12) diff --git a/piptools/sync.py b/piptools/sync.py index 50577ed45..97392718e 100644 --- a/piptools/sync.py +++ b/piptools/sync.py @@ -11,6 +11,7 @@ 'pip', 'pip-tools', 'pip-review', + 'pkg-resources', 'setuptools', 'wheel', ] diff --git a/tests/test_sync.py b/tests/test_sync.py index 731b15464..cf77024cb 100644 --- a/tests/test_sync.py +++ b/tests/test_sync.py @@ -100,6 +100,16 @@ def test_diff_should_uninstall(fake_dist): assert to_uninstall == {'django'} # no version spec when uninstalling +def test_diff_should_not_uninstall(fake_dist): + ignored = ('pip==7.1.0', 'pip-tools==1.1.1', 'pip-review==1.1.1', + 'pkg-resources==0.0.0', 'setuptools==34.0.0', 'wheel==0.29.0') + installed = [fake_dist(pkg) for pkg in ignored] + reqs = [] + + to_uninstall = diff(reqs, installed)[1] + assert to_uninstall == set() + + def test_diff_should_update(fake_dist, from_line): installed = [fake_dist('django==1.7')] reqs = [from_line('django==1.8')]
wemake-services__wemake-python-styleguide-1700
WPS421 doesn't catch pprint.pprint() WPS421 has pprint in the blacklist, however does not catch a call to `pprint.pprint()`. WPS421 doesn't catch pprint.pprint() WPS421 has pprint in the blacklist, however does not catch a call to `pprint.pprint()`.
[ { "content": "\"\"\"\nThis module contains list of white- and black-listed ``python`` members.\n\nWe add values here when we want to make them public.\nOr when a value is reused in several places.\nThen, we automatically have to add it here and document it.\n\nOther constants that are not used across modules\nand does not require to be documented can be defined where they are used.\n\nAll values here must be documented with ``#:`` comments.\n\"\"\"\n\nimport math\nimport re\n\nfrom typing_extensions import Final\n\n#: List of functions we forbid to use.\nFUNCTIONS_BLACKLIST: Final = frozenset((\n # Code generation:\n 'eval',\n 'exec',\n 'compile',\n\n # Termination:\n 'exit',\n 'quit',\n\n # Magic:\n 'globals',\n 'locals',\n 'vars',\n 'dir',\n\n # IO:\n 'print',\n 'pprint',\n 'input',\n 'breakpoint',\n\n # Attribute access:\n 'hasattr',\n 'delattr',\n\n # Gratis:\n 'copyright',\n 'help',\n 'credits',\n\n # Dynamic imports:\n '__import__',\n\n # OOP:\n 'staticmethod',\n\n # Mypy:\n 'reveal_type',\n))\n\n#: List of module metadata we forbid to use.\nMODULE_METADATA_VARIABLES_BLACKLIST: Final = frozenset((\n '__author__',\n '__all__',\n '__version__',\n '__about__',\n))\n\n#: List of variable names we forbid to use.\nVARIABLE_NAMES_BLACKLIST: Final = frozenset((\n # Meaningless words:\n 'data',\n 'result',\n 'results',\n 'item',\n 'items',\n 'value',\n 'values',\n 'val',\n 'vals',\n 'var',\n 'vars',\n 'variable',\n 'content',\n 'contents',\n 'info',\n 'handle',\n 'handler',\n 'file',\n 'obj',\n 'objects',\n 'objs',\n 'some',\n 'do',\n 'param',\n 'params',\n 'parameters',\n\n # Confuseables:\n 'no',\n 'true',\n 'false',\n\n # Names from examples:\n 'foo',\n 'bar',\n 'baz',\n))\n\n#: List of characters sequences that are hard to read.\nUNREADABLE_CHARACTER_COMBINATIONS: Final = frozenset((\n '1l',\n '1I',\n '0O',\n 'O0',\n # Not included: 'lI', 'l1', 'Il'\n # Because these names are quite common in real words.\n))\n\n#: List of special names that are used only as first argument in methods.\nSPECIAL_ARGUMENT_NAMES_WHITELIST: Final = frozenset((\n 'self',\n 'cls',\n 'mcs',\n))\n\n#: List of all magic methods from the python docs.\nALL_MAGIC_METHODS: Final = frozenset((\n '__new__',\n '__init__',\n '__del__',\n\n '__repr__',\n '__str__',\n '__bytes__',\n '__format__',\n\n '__lt__',\n '__le__',\n '__eq__',\n '__ne__',\n '__gt__',\n '__ge__',\n\n '__hash__',\n '__bool__',\n\n '__getattr__',\n '__getattribute__',\n '__setattr__',\n '__delattr__',\n '__dir__',\n\n '__get__',\n '__set__',\n '__delete__',\n '__set_name__',\n\n '__init_subclass__',\n '__instancecheck__',\n '__subclasscheck__',\n '__class_getitem__',\n\n '__call__',\n '__len__',\n '__length_hint__',\n '__getitem__',\n '__setitem__',\n '__delitem__',\n '__missing__',\n '__iter__',\n '__reversed__',\n '__contains__',\n\n '__add__',\n '__sub__',\n '__mul__',\n '__matmul__',\n '__truediv__',\n '__floordiv__',\n '__mod__',\n '__divmod__',\n '__pow__',\n '__lshift__',\n '__rshift__',\n '__and__',\n '__xor__',\n '__or__',\n '__radd__',\n '__rsub__',\n '__rmul__',\n '__rmatmul__',\n '__rtruediv__',\n '__rfloordiv__',\n '__rmod__',\n '__rdivmod__',\n '__rpow__',\n '__rlshift__',\n '__rrshift__',\n '__rand__',\n '__rxor__',\n '__ror__',\n '__iadd__',\n '__isub__',\n '__imul__',\n '__imatmul__',\n '__itruediv__',\n '__ifloordiv__',\n '__imod__',\n '__ipow__',\n '__ilshift__',\n '__irshift__',\n '__iand__',\n '__ixor__',\n '__ior__',\n '__neg__',\n '__pos__',\n '__abs__',\n '__invert__',\n '__complex__',\n '__int__',\n '__float__',\n '__index__',\n '__round__',\n '__trunc__',\n '__floor__',\n '__ceil__',\n\n '__enter__',\n '__exit__',\n\n '__await__',\n '__aiter__',\n '__anext__',\n '__aenter__',\n '__aexit__',\n))\n\n#: List of magic methods that are forbidden to use.\nMAGIC_METHODS_BLACKLIST: Final = frozenset((\n # Since we don't use `del`:\n '__del__',\n '__delitem__',\n '__delete__',\n\n # Since we don't use `pickle`:\n '__reduce__',\n '__reduce_ex__',\n\n '__dir__', # since we don't use `dir()`\n '__delattr__', # since we don't use `delattr()`\n))\n\n#: List of magic methods that are not allowed to be generators.\nYIELD_MAGIC_METHODS_BLACKLIST: Final = ALL_MAGIC_METHODS.difference({\n # Allowed to be used with ``yield`` keyword:\n '__call__',\n '__iter__',\n})\n\n#: List of magic methods that are not allowed to be async.\nASYNC_MAGIC_METHODS_BLACKLIST: Final = ALL_MAGIC_METHODS.difference({\n # In order of appearance on\n # https://docs.python.org/3/reference/datamodel.html#basic-customization\n # Allowed magic methods are:\n '__anext__',\n '__aenter__',\n '__aexit__',\n '__call__',\n})\n\n#: List of builtin classes that are allowed to subclass.\nALLOWED_BUILTIN_CLASSES: Final = frozenset((\n 'type',\n 'object',\n))\n\n#: List of nested functions' names we allow to use.\nNESTED_FUNCTIONS_WHITELIST: Final = frozenset((\n 'decorator',\n 'factory',\n 'wrapper',\n))\n\n#: List of allowed ``__future__`` imports.\nFUTURE_IMPORTS_WHITELIST: Final = frozenset((\n 'annotations',\n 'generator_stop',\n))\n\n#: List of blacklisted module names.\nMODULE_NAMES_BLACKLIST: Final = frozenset((\n 'util',\n 'utils',\n 'utilities',\n 'helpers',\n))\n\n#: List of allowed module magic names.\nMAGIC_MODULE_NAMES_WHITELIST: Final = frozenset((\n '__init__',\n '__main__',\n))\n\n#: List of bad magic module functions.\nMAGIC_MODULE_NAMES_BLACKLIST: Final = frozenset((\n '__getattr__',\n '__dir__',\n))\n\n#: Regex pattern to name modules.\nMODULE_NAME_PATTERN: Final = re.compile(r'^_?_?[a-z][a-z\\d_]*[a-z\\d](__)?$')\n\n#: Common numbers that are allowed to be used without being called \"magic\".\nMAGIC_NUMBERS_WHITELIST: Final = frozenset((\n 0, # both int and float\n 0.1,\n 0.5,\n 1.0,\n 100,\n 1000,\n 1024, # bytes\n 24, # hours\n 60, # seconds, minutes\n\n 1j, # imaginary part of a complex number\n))\n\n#: Maximum amount of ``pragma`` no-cover comments per module.\nMAX_NO_COVER_COMMENTS: Final = 5\n\n#: Maximum length of ``yield`` ``tuple`` expressions.\nMAX_LEN_YIELD_TUPLE: Final = 5\n\n#: Maximum number of compare nodes in a single expression.\nMAX_COMPARES: Final = 2\n\n#: Maximum number of conditions in a single ``if`` or ``while`` statement.\nMAX_CONDITIONS: Final = 4\n\n#: Maximum number of `elif` blocks in a single `if` condition:\nMAX_ELIFS: Final = 3\n\n#: Maximum number of ``except`` cases in a single ``try`` clause.\nMAX_EXCEPT_CASES: Final = 3\n\n#: Approximate constants which real values should be imported from math module.\nMATH_APPROXIMATE_CONSTANTS: Final = frozenset((\n math.pi,\n math.e,\n math.tau,\n))\n\n#: List of vague method names that may cause confusion if imported as is:\nVAGUE_IMPORTS_BLACKLIST: Final = frozenset((\n 'read',\n 'write',\n 'load',\n 'loads',\n 'dump',\n 'dumps',\n 'parse',\n 'safe_load',\n 'safe_dump',\n 'load_all',\n 'dump_all',\n 'safe_load_all',\n 'safe_dump_all',\n))\n\n#: List of literals without arguments we forbid to use.\nLITERALS_BLACKLIST: Final = frozenset((\n 'int',\n 'float',\n 'str',\n 'bytes',\n 'bool',\n 'complex',\n))\n\n#: List of functions in which arguments must be tuples.\nTUPLE_ARGUMENTS_METHODS: Final = frozenset((\n 'frozenset',\n))\n\n#: Conditions that can appear in the ``if`` statement to allow nested imports.\nALLOWED_NESTED_IMPORTS_CONDITIONS: Final = frozenset((\n 'TYPE_CHECKING',\n))\n\n#: List of commonly used aliases\nALIAS_NAMES_WHITELIST: Final = frozenset((\n 'np',\n 'pd',\n 'df',\n 'plt',\n 'sns',\n 'tf',\n 'cv',\n))\n\n# Internal variables\n# ==================\n\n# Please, do not touch values beyond this line!\n# ---------------------------------------------\n\n# They are not publicly documented since they are not used by the end user.\n# But, we still need them to be defined here.\n\n# Used as a default filename, when it is not passed by flake8:\nSTDIN: Final = 'stdin'\n\n# Used to specify as a placeholder for `__init__`:\nINIT: Final = '__init__'\n\n# Used to determine when we are running on Windows:\nWINDOWS_OS: Final = 'nt'\n\n# Used as a placeholder for special `_` variable:\nUNUSED_PLACEHOLDER: Final = '_'\n", "path": "wemake_python_styleguide/constants.py" } ]
[ { "content": "\"\"\"\nThis module contains list of white- and black-listed ``python`` members.\n\nWe add values here when we want to make them public.\nOr when a value is reused in several places.\nThen, we automatically have to add it here and document it.\n\nOther constants that are not used across modules\nand does not require to be documented can be defined where they are used.\n\nAll values here must be documented with ``#:`` comments.\n\"\"\"\n\nimport math\nimport re\n\nfrom typing_extensions import Final\n\n#: List of functions we forbid to use.\nFUNCTIONS_BLACKLIST: Final = frozenset((\n # Code generation:\n 'eval',\n 'exec',\n 'compile',\n\n # Termination:\n 'exit',\n 'quit',\n\n # Magic:\n 'globals',\n 'locals',\n 'vars',\n 'dir',\n\n # IO:\n 'print',\n 'pprint',\n 'pprint.pprint',\n 'input',\n 'breakpoint',\n\n # Attribute access:\n 'hasattr',\n 'delattr',\n\n # Gratis:\n 'copyright',\n 'help',\n 'credits',\n\n # Dynamic imports:\n '__import__',\n\n # OOP:\n 'staticmethod',\n\n # Mypy:\n 'reveal_type',\n))\n\n#: List of module metadata we forbid to use.\nMODULE_METADATA_VARIABLES_BLACKLIST: Final = frozenset((\n '__author__',\n '__all__',\n '__version__',\n '__about__',\n))\n\n#: List of variable names we forbid to use.\nVARIABLE_NAMES_BLACKLIST: Final = frozenset((\n # Meaningless words:\n 'data',\n 'result',\n 'results',\n 'item',\n 'items',\n 'value',\n 'values',\n 'val',\n 'vals',\n 'var',\n 'vars',\n 'variable',\n 'content',\n 'contents',\n 'info',\n 'handle',\n 'handler',\n 'file',\n 'obj',\n 'objects',\n 'objs',\n 'some',\n 'do',\n 'param',\n 'params',\n 'parameters',\n\n # Confuseables:\n 'no',\n 'true',\n 'false',\n\n # Names from examples:\n 'foo',\n 'bar',\n 'baz',\n))\n\n#: List of characters sequences that are hard to read.\nUNREADABLE_CHARACTER_COMBINATIONS: Final = frozenset((\n '1l',\n '1I',\n '0O',\n 'O0',\n # Not included: 'lI', 'l1', 'Il'\n # Because these names are quite common in real words.\n))\n\n#: List of special names that are used only as first argument in methods.\nSPECIAL_ARGUMENT_NAMES_WHITELIST: Final = frozenset((\n 'self',\n 'cls',\n 'mcs',\n))\n\n#: List of all magic methods from the python docs.\nALL_MAGIC_METHODS: Final = frozenset((\n '__new__',\n '__init__',\n '__del__',\n\n '__repr__',\n '__str__',\n '__bytes__',\n '__format__',\n\n '__lt__',\n '__le__',\n '__eq__',\n '__ne__',\n '__gt__',\n '__ge__',\n\n '__hash__',\n '__bool__',\n\n '__getattr__',\n '__getattribute__',\n '__setattr__',\n '__delattr__',\n '__dir__',\n\n '__get__',\n '__set__',\n '__delete__',\n '__set_name__',\n\n '__init_subclass__',\n '__instancecheck__',\n '__subclasscheck__',\n '__class_getitem__',\n\n '__call__',\n '__len__',\n '__length_hint__',\n '__getitem__',\n '__setitem__',\n '__delitem__',\n '__missing__',\n '__iter__',\n '__reversed__',\n '__contains__',\n\n '__add__',\n '__sub__',\n '__mul__',\n '__matmul__',\n '__truediv__',\n '__floordiv__',\n '__mod__',\n '__divmod__',\n '__pow__',\n '__lshift__',\n '__rshift__',\n '__and__',\n '__xor__',\n '__or__',\n '__radd__',\n '__rsub__',\n '__rmul__',\n '__rmatmul__',\n '__rtruediv__',\n '__rfloordiv__',\n '__rmod__',\n '__rdivmod__',\n '__rpow__',\n '__rlshift__',\n '__rrshift__',\n '__rand__',\n '__rxor__',\n '__ror__',\n '__iadd__',\n '__isub__',\n '__imul__',\n '__imatmul__',\n '__itruediv__',\n '__ifloordiv__',\n '__imod__',\n '__ipow__',\n '__ilshift__',\n '__irshift__',\n '__iand__',\n '__ixor__',\n '__ior__',\n '__neg__',\n '__pos__',\n '__abs__',\n '__invert__',\n '__complex__',\n '__int__',\n '__float__',\n '__index__',\n '__round__',\n '__trunc__',\n '__floor__',\n '__ceil__',\n\n '__enter__',\n '__exit__',\n\n '__await__',\n '__aiter__',\n '__anext__',\n '__aenter__',\n '__aexit__',\n))\n\n#: List of magic methods that are forbidden to use.\nMAGIC_METHODS_BLACKLIST: Final = frozenset((\n # Since we don't use `del`:\n '__del__',\n '__delitem__',\n '__delete__',\n\n # Since we don't use `pickle`:\n '__reduce__',\n '__reduce_ex__',\n\n '__dir__', # since we don't use `dir()`\n '__delattr__', # since we don't use `delattr()`\n))\n\n#: List of magic methods that are not allowed to be generators.\nYIELD_MAGIC_METHODS_BLACKLIST: Final = ALL_MAGIC_METHODS.difference({\n # Allowed to be used with ``yield`` keyword:\n '__call__',\n '__iter__',\n})\n\n#: List of magic methods that are not allowed to be async.\nASYNC_MAGIC_METHODS_BLACKLIST: Final = ALL_MAGIC_METHODS.difference({\n # In order of appearance on\n # https://docs.python.org/3/reference/datamodel.html#basic-customization\n # Allowed magic methods are:\n '__anext__',\n '__aenter__',\n '__aexit__',\n '__call__',\n})\n\n#: List of builtin classes that are allowed to subclass.\nALLOWED_BUILTIN_CLASSES: Final = frozenset((\n 'type',\n 'object',\n))\n\n#: List of nested functions' names we allow to use.\nNESTED_FUNCTIONS_WHITELIST: Final = frozenset((\n 'decorator',\n 'factory',\n 'wrapper',\n))\n\n#: List of allowed ``__future__`` imports.\nFUTURE_IMPORTS_WHITELIST: Final = frozenset((\n 'annotations',\n 'generator_stop',\n))\n\n#: List of blacklisted module names.\nMODULE_NAMES_BLACKLIST: Final = frozenset((\n 'util',\n 'utils',\n 'utilities',\n 'helpers',\n))\n\n#: List of allowed module magic names.\nMAGIC_MODULE_NAMES_WHITELIST: Final = frozenset((\n '__init__',\n '__main__',\n))\n\n#: List of bad magic module functions.\nMAGIC_MODULE_NAMES_BLACKLIST: Final = frozenset((\n '__getattr__',\n '__dir__',\n))\n\n#: Regex pattern to name modules.\nMODULE_NAME_PATTERN: Final = re.compile(r'^_?_?[a-z][a-z\\d_]*[a-z\\d](__)?$')\n\n#: Common numbers that are allowed to be used without being called \"magic\".\nMAGIC_NUMBERS_WHITELIST: Final = frozenset((\n 0, # both int and float\n 0.1,\n 0.5,\n 1.0,\n 100,\n 1000,\n 1024, # bytes\n 24, # hours\n 60, # seconds, minutes\n\n 1j, # imaginary part of a complex number\n))\n\n#: Maximum amount of ``pragma`` no-cover comments per module.\nMAX_NO_COVER_COMMENTS: Final = 5\n\n#: Maximum length of ``yield`` ``tuple`` expressions.\nMAX_LEN_YIELD_TUPLE: Final = 5\n\n#: Maximum number of compare nodes in a single expression.\nMAX_COMPARES: Final = 2\n\n#: Maximum number of conditions in a single ``if`` or ``while`` statement.\nMAX_CONDITIONS: Final = 4\n\n#: Maximum number of `elif` blocks in a single `if` condition:\nMAX_ELIFS: Final = 3\n\n#: Maximum number of ``except`` cases in a single ``try`` clause.\nMAX_EXCEPT_CASES: Final = 3\n\n#: Approximate constants which real values should be imported from math module.\nMATH_APPROXIMATE_CONSTANTS: Final = frozenset((\n math.pi,\n math.e,\n math.tau,\n))\n\n#: List of vague method names that may cause confusion if imported as is:\nVAGUE_IMPORTS_BLACKLIST: Final = frozenset((\n 'read',\n 'write',\n 'load',\n 'loads',\n 'dump',\n 'dumps',\n 'parse',\n 'safe_load',\n 'safe_dump',\n 'load_all',\n 'dump_all',\n 'safe_load_all',\n 'safe_dump_all',\n))\n\n#: List of literals without arguments we forbid to use.\nLITERALS_BLACKLIST: Final = frozenset((\n 'int',\n 'float',\n 'str',\n 'bytes',\n 'bool',\n 'complex',\n))\n\n#: List of functions in which arguments must be tuples.\nTUPLE_ARGUMENTS_METHODS: Final = frozenset((\n 'frozenset',\n))\n\n#: Conditions that can appear in the ``if`` statement to allow nested imports.\nALLOWED_NESTED_IMPORTS_CONDITIONS: Final = frozenset((\n 'TYPE_CHECKING',\n))\n\n#: List of commonly used aliases\nALIAS_NAMES_WHITELIST: Final = frozenset((\n 'np',\n 'pd',\n 'df',\n 'plt',\n 'sns',\n 'tf',\n 'cv',\n))\n\n# Internal variables\n# ==================\n\n# Please, do not touch values beyond this line!\n# ---------------------------------------------\n\n# They are not publicly documented since they are not used by the end user.\n# But, we still need them to be defined here.\n\n# Used as a default filename, when it is not passed by flake8:\nSTDIN: Final = 'stdin'\n\n# Used to specify as a placeholder for `__init__`:\nINIT: Final = '__init__'\n\n# Used to determine when we are running on Windows:\nWINDOWS_OS: Final = 'nt'\n\n# Used as a placeholder for special `_` variable:\nUNUSED_PLACEHOLDER: Final = '_'\n", "path": "wemake_python_styleguide/constants.py" } ]
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cf56332c..b4ed1c340 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ Semantic versioning in our case means: - Allow to use `^` with `1` - Fixes false positives in WPS513 and WPS323 - Fixes false positive WPS426 if `lambda` in loop uses only its arguments +- Fixes false negative WPS421 with `pprint.pprint` ### Misc diff --git a/tests/test_visitors/test_ast/test_functions/test_wrong_function_calls.py b/tests/test_visitors/test_ast/test_functions/test_wrong_function_calls.py index 6cb98d4e5..016a2b045 100644 --- a/tests/test_visitors/test_ast/test_functions/test_wrong_function_calls.py +++ b/tests/test_visitors/test_ast/test_functions/test_wrong_function_calls.py @@ -42,6 +42,33 @@ def test_wrong_function_called( assert_error_text(visitor, bad_function) [email protected]('bad_module_and_function', [ + 'pprint.pprint', +]) [email protected]('code', [ + regular_call, + assignment_call, + nested_function_call, +]) +def test_wrong_function_call_with_module( + assert_errors, + assert_error_text, + parse_ast_tree, + bad_module_and_function, + code, + default_options, + mode, +): + """Testing that a module.function() call can be restricted.""" + tree = parse_ast_tree(mode(code.format(bad_module_and_function))) + + visitor = WrongFunctionCallVisitor(default_options, tree=tree) + visitor.run() + + assert_errors(visitor, [WrongFunctionCallViolation]) + assert_error_text(visitor, bad_module_and_function) + + @pytest.mark.parametrize('good_function', [ 'len', 'abs', diff --git a/wemake_python_styleguide/constants.py b/wemake_python_styleguide/constants.py index d975fcf0f..7c35e9b2c 100644 --- a/wemake_python_styleguide/constants.py +++ b/wemake_python_styleguide/constants.py @@ -36,6 +36,7 @@ # IO: 'print', 'pprint', + 'pprint.pprint', 'input', 'breakpoint',
scipy__scipy-17210
BUG: Build failure due to problems with shebang line in cythoner.py I ran into a problem running `dev.py` that appears to be caused by the shebang line `#!python3` in the file `scipy/_build_utils/cythoner.py`. If I change it to `#!/usr/bin/env python` then the build works fine. Most files in scipy with a shebang line use `#!/usr/bin/env python`. Only files in the `_build_utils` use `#!python3`. Error message when running `python dev.py build`: ```shell Meson build setup OK 💻 ninja -C /mnt/c/Users/Jozsef/OSS/scipy-test/build ninja: Entering directory `/mnt/c/Users/Jozsef/OSS/scipy-test/build' [3/1562] Generating 'scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c'. FAILED: scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c /mnt/c/Users/Jozsef/OSS/scipy-test/scipy/_build_utils/cythoner.py ../scipy/_lib/_ccallback_c.pyx scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c /bin/sh: 1: /mnt/c/Users/Jozsef/OSS/scipy-test/scipy/_build_utils/cythoner.py: not found [12/1562] Compiling C++ object scipy/_lib/_uarray/_uarray.cpython-310-x86_64-linux-gnu.so.p/_uarray_dispatch.cxx.o ninja: build stopped: subcommand failed. Build failed! ``` If I try running `cythoner.py` directly: ```shell -bash: /mnt/c/Users/Jozsef/OSS/scipy-conda/scipy/_build_utils/cythoner.py: python3: bad interpreter: No such file or directory ``` I'm using conda with WSL (Ubuntu).
[ { "content": "#!python3\n\"\"\" Scipy variant of Cython command\n\nCython, as applied to single pyx file.\n\nExpects two arguments, infile and outfile.\n\nOther options passed through to cython command line parser.\n\"\"\"\n\nimport os\nimport os.path as op\nimport sys\nimport subprocess as sbp\n\n\ndef main():\n in_fname, out_fname = (op.abspath(p) for p in sys.argv[1:3])\n\n sbp.run(['cython', '-3', '--fast-fail',\n '--output-file', out_fname,\n '--include-dir', os.getcwd()] +\n sys.argv[3:] + [in_fname],\n check=True)\n\n\nif __name__ == '__main__':\n main()\n", "path": "scipy/_build_utils/cythoner.py" } ]
[ { "content": "#!/usr/bin/env python3\n\"\"\" Scipy variant of Cython command\n\nCython, as applied to single pyx file.\n\nExpects two arguments, infile and outfile.\n\nOther options passed through to cython command line parser.\n\"\"\"\n\nimport os\nimport os.path as op\nimport sys\nimport subprocess as sbp\n\n\ndef main():\n in_fname, out_fname = (op.abspath(p) for p in sys.argv[1:3])\n\n sbp.run(['cython', '-3', '--fast-fail',\n '--output-file', out_fname,\n '--include-dir', os.getcwd()] +\n sys.argv[3:] + [in_fname],\n check=True)\n\n\nif __name__ == '__main__':\n main()\n", "path": "scipy/_build_utils/cythoner.py" } ]
diff --git a/scipy/_build_utils/cythoner.py b/scipy/_build_utils/cythoner.py index d61062560fbe..6ef7ad43c2d0 100644 --- a/scipy/_build_utils/cythoner.py +++ b/scipy/_build_utils/cythoner.py @@ -1,4 +1,4 @@ -#!python3 +#!/usr/bin/env python3 """ Scipy variant of Cython command Cython, as applied to single pyx file.
google-research__text-to-text-transfer-transformer-983
No values in Mixture Registry **THE ISSUES SECTION IS ONLY FOR FILING BUGS. PLEASE ASK YOUR QUESTION ON THE DISCUSSION TAB.** I ran the script provided [here](https://github.com/google-research/text-to-text-transfer-transformer/blob/main/t5/models/hf_model.py#L39), after installing T5 in my environment, but got: ``` File "run_t5_glue_test.py", line 12, in <module> model.eval( File "/home/paulwu/miniconda3/envs/t5/lib/python3.8/site-packages/t5/models/hf_model.py", line 445, in eval utils.run_eval( File "/home/paulwu/miniconda3/envs/t5/lib/python3.8/site-packages/t5/models/utils.py", line 288, in run_eval vocabulary = get_vocabulary(mixture_or_task_name) File "/home/paulwu/miniconda3/envs/t5/lib/python3.8/site-packages/t5/models/utils.py", line 118, in get_vocabulary provider = t5.data.get_mixture_or_task(mixture_or_task_name) File "/home/paulwu/miniconda3/envs/t5/lib/python3.8/site-packages/seqio/dataset_providers.py", line 1517, in get_mixture_or_task raise ValueError( ValueError: No Task or Mixture found with name 'glue_cola_v002'. Available: ``` When I try the command `python -c "import t5; print(t5.data.MixtureRegistry.names())"`, I got this: ``` 2022-02-18 19:36:08.448536: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory 2022-02-18 19:36:08.448560: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. dict_keys([]) ``` Could anyone help me to get mixture registry, please?
[ { "content": "# Copyright 2022 The T5 Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Lint as: python3\n\"\"\"Hugging Face Transformers T5 Model.\n\nThis model API is fully functional but should be treated as experimental and\nsubject to change. Due to implementation details, if you are interested in\nexactly replicating the results in ``Exploring the Limits of Transfer Learning\nwith a Unified Text-to-Text Transformer'' you should use the MtfModel API\ninstead.\n\nUsage example for fine-tuning and evaluating on CoLA:\n\n```Python\nimport functools\n\nimport t5\nimport t5.models\nimport torch\nimport transformers\n\nif torch.cuda.is_available():\n device = torch.device(\"cuda\")\nelse:\n device = torch.device(\"cpu\")\n\nmodel = t5.models.HfPyTorchModel(\"t5-base\", \"/tmp/hft5/\", device)\n\n# Evaluate the pre-trained checkpoint, before further fine-tuning\nmodel.eval(\n \"glue_cola_v002\",\n sequence_length={\"inputs\": 64, \"targets\": 4},\n batch_size=128,\n)\n\n# Run 1000 steps of fine-tuning\nmodel.train(\n mixture_or_task_name=\"glue_cola_v002\",\n steps=1000,\n save_steps=100,\n sequence_length={\"inputs\": 64, \"targets\": 4},\n split=\"train\",\n batch_size=32,\n optimizer=functools.partial(transformers.AdamW, lr=1e-4),\n)\n\n# Evaluate after fine-tuning\nmodel.eval(\n \"glue_cola_v002\",\n checkpoint_steps=\"all\",\n sequence_length={\"inputs\": 64, \"targets\": 4},\n batch_size=128,\n)\n\n# Generate some predictions\ninputs = [\n \"cola sentence: This is a totally valid sentence.\",\n \"cola sentence: A doggy detail was walking famously.\",\n]\nmodel.predict(\n inputs,\n sequence_length={\"inputs\": 32},\n batch_size=2,\n output_file=\"/tmp/hft5/example_predictions.txt\",\n)\n```\n\n\"\"\"\n\nimport functools\nimport itertools\nimport os\nimport re\nimport time\n\nfrom absl import logging\nimport mesh_tensorflow.transformer.dataset as transformer_dataset\nimport t5.data\nfrom t5.models import utils\nfrom t5.models.t5_model import T5Model\nimport tensorflow.compat.v1 as tf\nimport tensorflow_datasets as tfds\nimport torch\nimport torch.utils.tensorboard\n\nCHECKPOINT_FILE_FORMAT = \"model-{}.checkpoint\"\n\n\ndef tokens_to_batches(dataset,\n sequence_length,\n batch_size,\n output_features,\n mixture_or_task=None):\n \"\"\"Convert a dataset of token sequences to batches of padded/masked examples.\n\n Args:\n dataset: tf.data.Dataset containing examples with token sequences.\n sequence_length: dict of int, a dict mapping feature name to length.\n batch_size: int, the number of padded sequences in each batch.\n output_features: list of str, features to include in the dataset.\n mixture_or_task: a Task or Mixture object, used to correctly specify eos if\n provided. If none, eos is always added at the end of the sequence.\n\n Returns:\n A generator that produces batches of numpy examples.\n \"\"\"\n\n if mixture_or_task:\n eos_keys = set(\n k for k, f in mixture_or_task.output_features.items() if f.add_eos)\n else:\n eos_keys = True\n\n dataset = transformer_dataset.pack_or_pad(\n dataset,\n sequence_length,\n pack=False,\n feature_keys=output_features,\n ensure_eos=eos_keys,\n )\n\n def _map_fn(ex):\n for key in output_features:\n tensor = ex[key]\n mask = tf.cast(tf.greater(tensor, 0), tensor.dtype)\n ex[key + \"_mask\"] = mask\n return ex\n\n dataset = dataset.map(\n _map_fn,\n num_parallel_calls=tf.data.experimental.AUTOTUNE,\n )\n\n dataset = dataset.batch(batch_size, drop_remainder=False)\n return tfds.as_numpy(dataset)\n\n\ndef _get_dataset(mixture_or_task_or_name,\n sequence_length,\n split,\n shuffle=True):\n \"\"\"Get a tf.data.Dataset for a given Task or Mixture.\n\n Args:\n mixture_or_task_or_name: Task or Mixture or str, the name of the Mixture or\n Task to train on or the Tasks or Mixture object itself.\n Must be pre-registered in the global `t5.data.TaskRegistry` or\n `t5.data.MixtureRegistry.`\n sequence_length: dict of int, a dict mapping feature name to length.\n split: str or `tensorflow_datasets.Split`, the data split to load.\n shuffle: boolean, whether to shuffle the dataset.\n\n Returns:\n A generator that produces batches of numpy examples.\n \"\"\"\n if isinstance(mixture_or_task_or_name, str):\n task = t5.data.get_mixture_or_task(mixture_or_task_or_name)\n else:\n task = mixture_or_task_or_name\n\n return task.get_dataset(sequence_length, split, shuffle=shuffle)\n\n\nclass HfPyTorchModel(T5Model):\n \"\"\"Wrapper class for Hugging Face Transformers PyTorch T5 model.\"\"\"\n\n def __init__(self, model_spec, model_dir, device):\n \"\"\"Constructor for HfModel class.\n\n Args:\n model_spec: A str to pass into the `pretrained_model_name_or_path`\n argument of `transformers.T5ForConditionalGeneration.from_pretrained`\n (e.g. `\"t5-base\"` or a path to a previously trained model) or an\n instance of the `transformers.configuration_t5.T5Config` class to use\n to directly construct the `transformers.T5ForConditionalGeneration`\n object.\n model_dir: str, directory to save and load model checkpoints.\n device: `torch.device` on which the model should be run.\n \"\"\"\n # We have to import transformers here because it has a side effect of\n # creating a TensorFlow graph, which prevents eager execution from being\n # enabled in files that import hf_model.py\n import transformers # pylint: disable=import-outside-toplevel,g-import-not-at-top\n if isinstance(model_spec, str):\n self._model = transformers.T5ForConditionalGeneration.from_pretrained(\n model_spec\n )\n elif isinstance(model_spec, transformers.T5Config):\n self._model = transformers.T5ForConditionalGeneration(model_spec)\n else:\n raise ValueError(\"model_spec should be a string or T5Config.\")\n\n tf.io.gfile.makedirs(model_dir)\n self._writer = torch.utils.tensorboard.writer.SummaryWriter(model_dir)\n self._model_dir = model_dir\n self._device = device\n if self._device.type == \"cuda\":\n self._model.cuda()\n self._step = 0\n self.load_latest_checkpoint()\n self.to_tensor = functools.partial(\n torch.as_tensor, device=self._device, dtype=torch.long)\n\n @property\n def model(self):\n return self._model\n\n @property\n def step(self):\n return self._step\n\n def save_checkpoint(self, step):\n \"\"\"Save the current model parameters to the `model_dir`.\n\n Args:\n step: int, the current training step.\n \"\"\"\n path = os.path.join(self._model_dir, CHECKPOINT_FILE_FORMAT.format(step))\n torch.save(self._model.state_dict(), path)\n\n def load_checkpoint(self, step, model_dir=None):\n \"\"\"Load the model parameters from a checkpoint at a given step.\n\n Args:\n step: int, load the checkpoint from this training step.\n model_dir: str, the directory of the checkpoint to load or None to use\n this model's directory.\n \"\"\"\n model_dir = model_dir or self._model_dir\n path = os.path.join(model_dir, CHECKPOINT_FILE_FORMAT.format(step))\n logging.info(\"Loading from %s\", path)\n self._model.load_state_dict(torch.load(path))\n self._step = step\n\n def get_all_checkpoint_steps(self, model_dir=None):\n \"\"\"Retrieve the steps corresponding to all checkpoints in `model_dir`.\n\n Args:\n model_dir: str, the directory of the checkpoints or None to use this\n model's directory.\n\n Returns:\n A list of ints corresponding to all checkpoint steps, or None if there\n are no checkpoints in the model directory.\n \"\"\"\n model_dir = model_dir or self._model_dir\n checkpoint_files = tf.io.gfile.glob(\n os.path.join(model_dir, CHECKPOINT_FILE_FORMAT.format(\"*\"))\n )\n if not checkpoint_files:\n return\n step_regex = re.compile(\".*\" + CHECKPOINT_FILE_FORMAT.format(r\"(\\d+)\"))\n steps = [int(step_regex.match(path).group(1)) for path in checkpoint_files]\n return sorted(steps)\n\n def get_latest_checkpoint_step(self, model_dir=None):\n \"\"\"Retrieve the step corresponding to the most recent checkpoint.\n\n Args:\n model_dir: str, the directory of the checkpoints or None to use this\n model's directory.\n\n Returns:\n An integer corresponding to the most recent step, or None if there are no\n checkpoints in the model directory.\n \"\"\"\n steps = self.get_all_checkpoint_steps(model_dir)\n if steps is not None:\n return max(steps)\n\n def load_latest_checkpoint(self):\n \"\"\"Load the most recent checkpoint and update the model's current step.\"\"\"\n latest_step = self.get_latest_checkpoint_step()\n if latest_step is not None:\n self.load_checkpoint(latest_step)\n\n def train(\n self,\n mixture_or_task_name,\n steps,\n save_steps,\n sequence_length,\n split,\n batch_size,\n optimizer,\n learning_rate_scheduler=None,\n ):\n \"\"\"Train the model on the given Mixture or Task.\n\n Args:\n mixture_or_task_name: str, the name of the Mixture or Task to train on.\n Must be pre-registered in the global `t5.data.TaskRegistry` or\n `t5.data.MixtureRegistry.`\n steps: int, the total number of steps to train for.\n save_steps: int, the number of steps between checkpoint saves.\n sequence_length: dict of int, a dict mapping feature name to length.\n split: str or `tensorflow_datasets.Split`, the data split to load.\n batch_size: int, the number of padded sequences in each batch.\n optimizer: function that takes the model parameters as its sole argument.\n For example, to use an AdamW optimizer with a learning rate of 1e-4,\n you could pass in `functools.partial(transformers.AdamW, lr=1e-4)`.\n learning_rate_scheduler: optional function that takes in an optimizer as\n its sole argument. For example, to use a schedule that warms up the\n optimizer's learning rate after 100 steps, you could pass in\n `functools.partial(transformers.get_constant_schedule_with_warmup,\n num_warmup_steps=100)`.\n \"\"\"\n self._model.train()\n ds = _get_dataset(mixture_or_task_name, sequence_length, split)\n task = t5.data.get_mixture_or_task(mixture_or_task_name)\n ds = tokens_to_batches(ds, sequence_length, batch_size,\n tuple(task.output_features), task)\n # Repeat dataset forever\n ds = itertools.cycle(ds)\n optimizer = optimizer(self._model.parameters())\n if learning_rate_scheduler:\n learning_rate_scheduler = learning_rate_scheduler(optimizer)\n\n now = time.time()\n for train_step, batch in enumerate(itertools.islice(ds, steps)):\n\n if not train_step % save_steps:\n # TODO(craffel): Consider saving optimizer and scheduler state.\n logging.info(\"Saving checkpoint for step %s\", self._step)\n self.save_checkpoint(self._step)\n\n self._model.zero_grad()\n outputs = self._model(\n input_ids=self.to_tensor(batch[\"inputs\"]),\n attention_mask=self.to_tensor(batch[\"inputs_mask\"]),\n decoder_attention_mask=self.to_tensor(batch[\"targets_mask\"]),\n labels=self.to_tensor(batch[\"targets\"]),\n )\n loss = outputs[0]\n loss.backward()\n optimizer.step()\n if learning_rate_scheduler:\n learning_rate_scheduler.step()\n\n self._writer.add_scalar(\n \"loss\", loss.detach().cpu().numpy(), self._step\n )\n self._writer.add_scalar(\"step/s\", 1 / (time.time() - now), self._step)\n now = time.time()\n self._step += 1\n\n logging.info(\"Saving final checkpoint for step %s\", self._step)\n self.save_checkpoint(self._step)\n\n def eval(\n self,\n mixture_or_task_name,\n sequence_length,\n batch_size,\n checkpoint_steps=None,\n summary_dir=None,\n split=\"validation\",\n compute_sequence_length=False,\n **generate_kwargs,\n ):\n \"\"\"Evaluate the model on the given Mixture or Task.\n\n *Note*: If a checkpoint step is provided (i.e. `checkpoint_steps is not\n None`), the model's state will be replaced by the state in those\n checkpoints. If you have not saved your model before calling `eval`, you\n should call `save_checkpoint` before `eval` to avoid losing its parameter\n values and state.\n\n Args:\n mixture_or_task_name: str, the name of the Mixture or Task to evaluate\n on. Must be pre-registered in the global `t5.data.TaskRegistry` or\n `t5.data.MixtureRegistry.`\n sequence_length: dict of int, a dict mapping feature name to length.\n batch_size: int, the number of padded sequences in each batch.\n checkpoint_steps: int, list of ints, \"all\", or None. If None, eval in the\n model in its current state without loading any checkpoints. If an int\n or list of ints, evaluation will be run on the checkpoint files in\n `model_dir` whose global steps are those provided. If -1, eval on the\n latest checkpoint from the model directory. If \"all\", evaluate all\n checkpoints in the model directory.\n summary_dir: str, path to write TensorBoard events file summaries for\n eval. If None, use model_dir/{split}_eval.\n split: str, the mixture/task split to evaluate on.\n compute_sequence_length: bool, automatically compute sequence length\n during eval mode.\n **generate_kwargs: Additional keyword arguments to pass to\n `transformers.PretrainedModel.generate()`, for example to change the\n decoding strategy. See the documentation for\n `transformers.PretrainedModel.generate()` for options.\n \"\"\"\n\n def _predict_from_tasks(tasks, vocabulary, checkpoint_step, sequence_length,\n datasets, **unused_kwargs):\n\n if isinstance(vocabulary, tuple):\n vocab = vocabulary[1]\n\n if checkpoint_step != self._step:\n self.load_checkpoint(checkpoint_step)\n self._model.eval()\n outputs = []\n for task in tasks:\n if compute_sequence_length:\n ds = _get_dataset(task.name, sequence_length, split, shuffle=False)\n else:\n ds = datasets[task.name]\n\n ds = list(tokens_to_batches(\n ds, sequence_length, batch_size, tuple(task.output_features), task))\n for batch in ds:\n predicted_tokens = self._model.generate(\n input_ids=self.to_tensor(batch[\"inputs\"]), **generate_kwargs\n )\n predicted_tokens = predicted_tokens.cpu().numpy().tolist()\n predictions = [vocab.decode(p) for p in predicted_tokens]\n\n outputs.extend(predictions)\n\n return outputs\n\n if checkpoint_steps is None:\n checkpoint_steps = [self._step]\n elif isinstance(checkpoint_steps, int):\n checkpoint_steps = [checkpoint_steps]\n elif checkpoint_steps == \"all\":\n checkpoint_steps = self.get_all_checkpoint_steps()\n elif not isinstance(checkpoint_steps, (list, tuple)):\n raise ValueError(\n f\"checkpoint_steps must be None, int or list; got {checkpoint_steps}\"\n )\n\n summary_dir = summary_dir or os.path.join(self._model_dir, f\"{split}_eval\")\n tf.io.gfile.makedirs(summary_dir)\n\n utils.run_eval(\n mixture_or_task_name=mixture_or_task_name,\n predict_or_score_fn=_predict_from_tasks,\n checkpoint_steps=checkpoint_steps,\n dataset_fn=functools.partial(_get_dataset, shuffle=False),\n summary_dir=summary_dir,\n split=split,\n sequence_length=None if compute_sequence_length else sequence_length,\n batch_size=batch_size)\n\n def predict(\n self,\n inputs,\n sequence_length,\n batch_size,\n output_file=None,\n vocabulary=None,\n **generate_kwargs,\n ):\n \"\"\"Evaluate the model on the given Mixture or Task.\n\n *Note*: If a checkpoint step is provided (i.e. `checkpoint_steps is not\n None`), the model's state will be replaced by the state in those\n checkpoints. If you have not saved your model before calling `eval`, you\n should call `save_checkpoint` before `eval` to avoid losing its parameter\n values and state.\n\n Args:\n inputs: list of str or str, either a list of inputs to feed into the\n model or the path to a text file that contains a single input on each\n line.\n sequence_length: dict of int, a dict mapping feature name to length.\n batch_size: int, the number of padded sequences in each batch.\n output_file: str or None, path to write out predictions or None to skip\n writing.\n vocabulary: t5.data.vocabularies.Vocabulary or dict or None. Either the\n Vocabulary to use for processing inputs and targets, a dict mapping\n \"inputs\" to a Vocabulary for encoding the inputs and \"targets\" for\n decoding the predictions, or None (default) to use a\n t5.data.SentencePieceVocabulary with the provided\n sentencepiece_model_path (as was used in all pre-trained T5 models).\n **generate_kwargs: Additional keyword arguments to pass to\n `transformers.PretrainedModel.generate()`, for example to change the\n decoding strategy. See the documentation for\n `transformers.PretrainedModel.generate()` for options.\n \"\"\"\n if isinstance(inputs, str):\n if not tf.io.gfile.exists(inputs):\n raise ValueError(\n f\"A str was provided for `inputs`, but the path {inputs} does not \"\n \"exist. If you want the model's output for {inputs}, you should \"\n \"feed in inputs=['{inputs}']\"\n )\n with tf.io.gfile.GFile(inputs) as f:\n inputs = [l.strip() for l in f]\n\n if vocabulary is None:\n vocab = t5.data.get_default_vocabulary()\n vocabs = {\"inputs\": vocab, \"targets\": vocab}\n elif isinstance(vocabulary, t5.data.vocabularies.Vocabulary):\n vocabs = {\"inputs\": vocabulary, \"targets\": vocabulary}\n elif isinstance(vocabulary, dict):\n vocabs = vocabulary\n else:\n raise ValueError(\"vocabulary must be a dict, a Vocabulary, or None\")\n\n dataset = tf.data.Dataset.from_tensor_slices(inputs)\n dataset = dataset.map(\n lambda x: {\"inputs\": tf.cast(vocabs[\"inputs\"].encode_tf(x), tf.int64)},\n num_parallel_calls=tf.data.experimental.AUTOTUNE,\n )\n dataset = tokens_to_batches(\n dataset, sequence_length, batch_size, [\"inputs\"]\n )\n\n predictions = []\n for batch in dataset:\n predicted_tokens = self._model.generate(\n input_ids=self.to_tensor(batch[\"inputs\"]), **generate_kwargs\n )\n predicted_tokens = predicted_tokens.cpu().numpy().tolist()\n predictions.extend(\n [vocabs[\"targets\"].decode(p) for p in predicted_tokens]\n )\n\n for inp, pred in zip(inputs, predictions):\n logging.info(\"%s\\n -> %s\", inp, pred)\n\n if output_file is not None:\n utils.write_lines_to_file(predictions, output_file)\n\n def finetune(\n self,\n mixture_or_task_name,\n finetune_steps,\n pretrained_model_dir,\n pretrained_checkpoint_step=-1,\n **train_kwargs,\n ):\n \"\"\"Trains model after loading from any existing checkpoint.\n\n Note that if you have initialized the model using a pre-trained model\n specification (e.g. by passing \"t5-base\" for `model_spec`) then you can\n just call `train` directly. This function is only provided for convenience\n for loading a pre-trained model checkpoint from an arbitrary model\n directory before calling `train`.\n\n Args:\n mixture_or_task_name: str, the name of the Mixture or Task to evaluate\n on. Must be pre-registered in the global `t5.data.TaskRegistry` or\n `t5.data.MixtureRegistry.`\n finetune_steps: int, the number of additional steps to train for.\n pretrained_model_dir: str, directory with pretrained model checkpoints.\n pretrained_checkpoint_step: int, checkpoint to initialize weights from.\n If -1 (default), use the latest checkpoint from the pretrained model\n directory.\n **train_kwargs: Additional keyword arguments to pass to `train`. See the\n docstring for `train` for more details.\n \"\"\"\n if pretrained_checkpoint_step == -1:\n pretrained_checkpoint_step = self.get_latest_checkpoint_step(\n pretrained_model_dir\n )\n self.load_checkpoint(pretrained_checkpoint_step, pretrained_model_dir)\n self.train(mixture_or_task_name, finetune_steps, **train_kwargs)\n", "path": "t5/models/hf_model.py" } ]
[ { "content": "# Copyright 2022 The T5 Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Lint as: python3\n\"\"\"Hugging Face Transformers T5 Model.\n\nThis model API is fully functional but should be treated as experimental and\nsubject to change. Due to implementation details, if you are interested in\nexactly replicating the results in ``Exploring the Limits of Transfer Learning\nwith a Unified Text-to-Text Transformer'' you should use the MtfModel API\ninstead.\n\nUsage example for fine-tuning and evaluating on CoLA:\n\n```Python\nimport functools\n\nimport t5\nimport t5.data.mixtures\nimport t5.models\nimport torch\nimport transformers\n\nif torch.cuda.is_available():\n device = torch.device(\"cuda\")\nelse:\n device = torch.device(\"cpu\")\n\nmodel = t5.models.HfPyTorchModel(\"t5-base\", \"/tmp/hft5/\", device)\n\n# Evaluate the pre-trained checkpoint, before further fine-tuning\nmodel.eval(\n \"glue_cola_v002\",\n sequence_length={\"inputs\": 64, \"targets\": 4},\n batch_size=128,\n)\n\n# Run 1000 steps of fine-tuning\nmodel.train(\n mixture_or_task_name=\"glue_cola_v002\",\n steps=1000,\n save_steps=100,\n sequence_length={\"inputs\": 64, \"targets\": 4},\n split=\"train\",\n batch_size=32,\n optimizer=functools.partial(transformers.AdamW, lr=1e-4),\n)\n\n# Evaluate after fine-tuning\nmodel.eval(\n \"glue_cola_v002\",\n checkpoint_steps=\"all\",\n sequence_length={\"inputs\": 64, \"targets\": 4},\n batch_size=128,\n)\n\n# Generate some predictions\ninputs = [\n \"cola sentence: This is a totally valid sentence.\",\n \"cola sentence: A doggy detail was walking famously.\",\n]\nmodel.predict(\n inputs,\n sequence_length={\"inputs\": 32},\n batch_size=2,\n output_file=\"/tmp/hft5/example_predictions.txt\",\n)\n```\n\n\"\"\"\n\nimport functools\nimport itertools\nimport os\nimport re\nimport time\n\nfrom absl import logging\nimport mesh_tensorflow.transformer.dataset as transformer_dataset\nimport t5.data\nfrom t5.models import utils\nfrom t5.models.t5_model import T5Model\nimport tensorflow.compat.v1 as tf\nimport tensorflow_datasets as tfds\nimport torch\nimport torch.utils.tensorboard\n\nCHECKPOINT_FILE_FORMAT = \"model-{}.checkpoint\"\n\n\ndef tokens_to_batches(dataset,\n sequence_length,\n batch_size,\n output_features,\n mixture_or_task=None):\n \"\"\"Convert a dataset of token sequences to batches of padded/masked examples.\n\n Args:\n dataset: tf.data.Dataset containing examples with token sequences.\n sequence_length: dict of int, a dict mapping feature name to length.\n batch_size: int, the number of padded sequences in each batch.\n output_features: list of str, features to include in the dataset.\n mixture_or_task: a Task or Mixture object, used to correctly specify eos if\n provided. If none, eos is always added at the end of the sequence.\n\n Returns:\n A generator that produces batches of numpy examples.\n \"\"\"\n\n if mixture_or_task:\n eos_keys = set(\n k for k, f in mixture_or_task.output_features.items() if f.add_eos)\n else:\n eos_keys = True\n\n dataset = transformer_dataset.pack_or_pad(\n dataset,\n sequence_length,\n pack=False,\n feature_keys=output_features,\n ensure_eos=eos_keys,\n )\n\n def _map_fn(ex):\n for key in output_features:\n tensor = ex[key]\n mask = tf.cast(tf.greater(tensor, 0), tensor.dtype)\n ex[key + \"_mask\"] = mask\n return ex\n\n dataset = dataset.map(\n _map_fn,\n num_parallel_calls=tf.data.experimental.AUTOTUNE,\n )\n\n dataset = dataset.batch(batch_size, drop_remainder=False)\n return tfds.as_numpy(dataset)\n\n\ndef _get_dataset(mixture_or_task_or_name,\n sequence_length,\n split,\n shuffle=True):\n \"\"\"Get a tf.data.Dataset for a given Task or Mixture.\n\n Args:\n mixture_or_task_or_name: Task or Mixture or str, the name of the Mixture or\n Task to train on or the Tasks or Mixture object itself.\n Must be pre-registered in the global `t5.data.TaskRegistry` or\n `t5.data.MixtureRegistry.`\n sequence_length: dict of int, a dict mapping feature name to length.\n split: str or `tensorflow_datasets.Split`, the data split to load.\n shuffle: boolean, whether to shuffle the dataset.\n\n Returns:\n A generator that produces batches of numpy examples.\n \"\"\"\n if isinstance(mixture_or_task_or_name, str):\n task = t5.data.get_mixture_or_task(mixture_or_task_or_name)\n else:\n task = mixture_or_task_or_name\n\n return task.get_dataset(sequence_length, split, shuffle=shuffle)\n\n\nclass HfPyTorchModel(T5Model):\n \"\"\"Wrapper class for Hugging Face Transformers PyTorch T5 model.\"\"\"\n\n def __init__(self, model_spec, model_dir, device):\n \"\"\"Constructor for HfModel class.\n\n Args:\n model_spec: A str to pass into the `pretrained_model_name_or_path`\n argument of `transformers.T5ForConditionalGeneration.from_pretrained`\n (e.g. `\"t5-base\"` or a path to a previously trained model) or an\n instance of the `transformers.configuration_t5.T5Config` class to use\n to directly construct the `transformers.T5ForConditionalGeneration`\n object.\n model_dir: str, directory to save and load model checkpoints.\n device: `torch.device` on which the model should be run.\n \"\"\"\n # We have to import transformers here because it has a side effect of\n # creating a TensorFlow graph, which prevents eager execution from being\n # enabled in files that import hf_model.py\n import transformers # pylint: disable=import-outside-toplevel,g-import-not-at-top\n if isinstance(model_spec, str):\n self._model = transformers.T5ForConditionalGeneration.from_pretrained(\n model_spec\n )\n elif isinstance(model_spec, transformers.T5Config):\n self._model = transformers.T5ForConditionalGeneration(model_spec)\n else:\n raise ValueError(\"model_spec should be a string or T5Config.\")\n\n tf.io.gfile.makedirs(model_dir)\n self._writer = torch.utils.tensorboard.writer.SummaryWriter(model_dir)\n self._model_dir = model_dir\n self._device = device\n if self._device.type == \"cuda\":\n self._model.cuda()\n self._step = 0\n self.load_latest_checkpoint()\n self.to_tensor = functools.partial(\n torch.as_tensor, device=self._device, dtype=torch.long)\n\n @property\n def model(self):\n return self._model\n\n @property\n def step(self):\n return self._step\n\n def save_checkpoint(self, step):\n \"\"\"Save the current model parameters to the `model_dir`.\n\n Args:\n step: int, the current training step.\n \"\"\"\n path = os.path.join(self._model_dir, CHECKPOINT_FILE_FORMAT.format(step))\n torch.save(self._model.state_dict(), path)\n\n def load_checkpoint(self, step, model_dir=None):\n \"\"\"Load the model parameters from a checkpoint at a given step.\n\n Args:\n step: int, load the checkpoint from this training step.\n model_dir: str, the directory of the checkpoint to load or None to use\n this model's directory.\n \"\"\"\n model_dir = model_dir or self._model_dir\n path = os.path.join(model_dir, CHECKPOINT_FILE_FORMAT.format(step))\n logging.info(\"Loading from %s\", path)\n self._model.load_state_dict(torch.load(path))\n self._step = step\n\n def get_all_checkpoint_steps(self, model_dir=None):\n \"\"\"Retrieve the steps corresponding to all checkpoints in `model_dir`.\n\n Args:\n model_dir: str, the directory of the checkpoints or None to use this\n model's directory.\n\n Returns:\n A list of ints corresponding to all checkpoint steps, or None if there\n are no checkpoints in the model directory.\n \"\"\"\n model_dir = model_dir or self._model_dir\n checkpoint_files = tf.io.gfile.glob(\n os.path.join(model_dir, CHECKPOINT_FILE_FORMAT.format(\"*\"))\n )\n if not checkpoint_files:\n return\n step_regex = re.compile(\".*\" + CHECKPOINT_FILE_FORMAT.format(r\"(\\d+)\"))\n steps = [int(step_regex.match(path).group(1)) for path in checkpoint_files]\n return sorted(steps)\n\n def get_latest_checkpoint_step(self, model_dir=None):\n \"\"\"Retrieve the step corresponding to the most recent checkpoint.\n\n Args:\n model_dir: str, the directory of the checkpoints or None to use this\n model's directory.\n\n Returns:\n An integer corresponding to the most recent step, or None if there are no\n checkpoints in the model directory.\n \"\"\"\n steps = self.get_all_checkpoint_steps(model_dir)\n if steps is not None:\n return max(steps)\n\n def load_latest_checkpoint(self):\n \"\"\"Load the most recent checkpoint and update the model's current step.\"\"\"\n latest_step = self.get_latest_checkpoint_step()\n if latest_step is not None:\n self.load_checkpoint(latest_step)\n\n def train(\n self,\n mixture_or_task_name,\n steps,\n save_steps,\n sequence_length,\n split,\n batch_size,\n optimizer,\n learning_rate_scheduler=None,\n ):\n \"\"\"Train the model on the given Mixture or Task.\n\n Args:\n mixture_or_task_name: str, the name of the Mixture or Task to train on.\n Must be pre-registered in the global `t5.data.TaskRegistry` or\n `t5.data.MixtureRegistry.`\n steps: int, the total number of steps to train for.\n save_steps: int, the number of steps between checkpoint saves.\n sequence_length: dict of int, a dict mapping feature name to length.\n split: str or `tensorflow_datasets.Split`, the data split to load.\n batch_size: int, the number of padded sequences in each batch.\n optimizer: function that takes the model parameters as its sole argument.\n For example, to use an AdamW optimizer with a learning rate of 1e-4,\n you could pass in `functools.partial(transformers.AdamW, lr=1e-4)`.\n learning_rate_scheduler: optional function that takes in an optimizer as\n its sole argument. For example, to use a schedule that warms up the\n optimizer's learning rate after 100 steps, you could pass in\n `functools.partial(transformers.get_constant_schedule_with_warmup,\n num_warmup_steps=100)`.\n \"\"\"\n self._model.train()\n ds = _get_dataset(mixture_or_task_name, sequence_length, split)\n task = t5.data.get_mixture_or_task(mixture_or_task_name)\n ds = tokens_to_batches(ds, sequence_length, batch_size,\n tuple(task.output_features), task)\n # Repeat dataset forever\n ds = itertools.cycle(ds)\n optimizer = optimizer(self._model.parameters())\n if learning_rate_scheduler:\n learning_rate_scheduler = learning_rate_scheduler(optimizer)\n\n now = time.time()\n for train_step, batch in enumerate(itertools.islice(ds, steps)):\n\n if not train_step % save_steps:\n # TODO(craffel): Consider saving optimizer and scheduler state.\n logging.info(\"Saving checkpoint for step %s\", self._step)\n self.save_checkpoint(self._step)\n\n self._model.zero_grad()\n outputs = self._model(\n input_ids=self.to_tensor(batch[\"inputs\"]),\n attention_mask=self.to_tensor(batch[\"inputs_mask\"]),\n decoder_attention_mask=self.to_tensor(batch[\"targets_mask\"]),\n labels=self.to_tensor(batch[\"targets\"]),\n )\n loss = outputs[0]\n loss.backward()\n optimizer.step()\n if learning_rate_scheduler:\n learning_rate_scheduler.step()\n\n self._writer.add_scalar(\n \"loss\", loss.detach().cpu().numpy(), self._step\n )\n self._writer.add_scalar(\"step/s\", 1 / (time.time() - now), self._step)\n now = time.time()\n self._step += 1\n\n logging.info(\"Saving final checkpoint for step %s\", self._step)\n self.save_checkpoint(self._step)\n\n def eval(\n self,\n mixture_or_task_name,\n sequence_length,\n batch_size,\n checkpoint_steps=None,\n summary_dir=None,\n split=\"validation\",\n compute_sequence_length=False,\n **generate_kwargs,\n ):\n \"\"\"Evaluate the model on the given Mixture or Task.\n\n *Note*: If a checkpoint step is provided (i.e. `checkpoint_steps is not\n None`), the model's state will be replaced by the state in those\n checkpoints. If you have not saved your model before calling `eval`, you\n should call `save_checkpoint` before `eval` to avoid losing its parameter\n values and state.\n\n Args:\n mixture_or_task_name: str, the name of the Mixture or Task to evaluate\n on. Must be pre-registered in the global `t5.data.TaskRegistry` or\n `t5.data.MixtureRegistry.`\n sequence_length: dict of int, a dict mapping feature name to length.\n batch_size: int, the number of padded sequences in each batch.\n checkpoint_steps: int, list of ints, \"all\", or None. If None, eval in the\n model in its current state without loading any checkpoints. If an int\n or list of ints, evaluation will be run on the checkpoint files in\n `model_dir` whose global steps are those provided. If -1, eval on the\n latest checkpoint from the model directory. If \"all\", evaluate all\n checkpoints in the model directory.\n summary_dir: str, path to write TensorBoard events file summaries for\n eval. If None, use model_dir/{split}_eval.\n split: str, the mixture/task split to evaluate on.\n compute_sequence_length: bool, automatically compute sequence length\n during eval mode.\n **generate_kwargs: Additional keyword arguments to pass to\n `transformers.PretrainedModel.generate()`, for example to change the\n decoding strategy. See the documentation for\n `transformers.PretrainedModel.generate()` for options.\n \"\"\"\n\n def _predict_from_tasks(tasks, vocabulary, checkpoint_step, sequence_length,\n datasets, **unused_kwargs):\n\n if isinstance(vocabulary, tuple):\n vocab = vocabulary[1]\n\n if checkpoint_step != self._step:\n self.load_checkpoint(checkpoint_step)\n self._model.eval()\n outputs = []\n for task in tasks:\n if compute_sequence_length:\n ds = _get_dataset(task.name, sequence_length, split, shuffle=False)\n else:\n ds = datasets[task.name]\n\n ds = list(tokens_to_batches(\n ds, sequence_length, batch_size, tuple(task.output_features), task))\n for batch in ds:\n predicted_tokens = self._model.generate(\n input_ids=self.to_tensor(batch[\"inputs\"]), **generate_kwargs\n )\n predicted_tokens = predicted_tokens.cpu().numpy().tolist()\n predictions = [vocab.decode(p) for p in predicted_tokens]\n\n outputs.extend(predictions)\n\n return outputs\n\n if checkpoint_steps is None:\n checkpoint_steps = [self._step]\n elif isinstance(checkpoint_steps, int):\n checkpoint_steps = [checkpoint_steps]\n elif checkpoint_steps == \"all\":\n checkpoint_steps = self.get_all_checkpoint_steps()\n elif not isinstance(checkpoint_steps, (list, tuple)):\n raise ValueError(\n f\"checkpoint_steps must be None, int or list; got {checkpoint_steps}\"\n )\n\n summary_dir = summary_dir or os.path.join(self._model_dir, f\"{split}_eval\")\n tf.io.gfile.makedirs(summary_dir)\n\n utils.run_eval(\n mixture_or_task_name=mixture_or_task_name,\n predict_or_score_fn=_predict_from_tasks,\n checkpoint_steps=checkpoint_steps,\n dataset_fn=functools.partial(_get_dataset, shuffle=False),\n summary_dir=summary_dir,\n split=split,\n sequence_length=None if compute_sequence_length else sequence_length,\n batch_size=batch_size)\n\n def predict(\n self,\n inputs,\n sequence_length,\n batch_size,\n output_file=None,\n vocabulary=None,\n **generate_kwargs,\n ):\n \"\"\"Evaluate the model on the given Mixture or Task.\n\n *Note*: If a checkpoint step is provided (i.e. `checkpoint_steps is not\n None`), the model's state will be replaced by the state in those\n checkpoints. If you have not saved your model before calling `eval`, you\n should call `save_checkpoint` before `eval` to avoid losing its parameter\n values and state.\n\n Args:\n inputs: list of str or str, either a list of inputs to feed into the\n model or the path to a text file that contains a single input on each\n line.\n sequence_length: dict of int, a dict mapping feature name to length.\n batch_size: int, the number of padded sequences in each batch.\n output_file: str or None, path to write out predictions or None to skip\n writing.\n vocabulary: t5.data.vocabularies.Vocabulary or dict or None. Either the\n Vocabulary to use for processing inputs and targets, a dict mapping\n \"inputs\" to a Vocabulary for encoding the inputs and \"targets\" for\n decoding the predictions, or None (default) to use a\n t5.data.SentencePieceVocabulary with the provided\n sentencepiece_model_path (as was used in all pre-trained T5 models).\n **generate_kwargs: Additional keyword arguments to pass to\n `transformers.PretrainedModel.generate()`, for example to change the\n decoding strategy. See the documentation for\n `transformers.PretrainedModel.generate()` for options.\n \"\"\"\n if isinstance(inputs, str):\n if not tf.io.gfile.exists(inputs):\n raise ValueError(\n f\"A str was provided for `inputs`, but the path {inputs} does not \"\n \"exist. If you want the model's output for {inputs}, you should \"\n \"feed in inputs=['{inputs}']\"\n )\n with tf.io.gfile.GFile(inputs) as f:\n inputs = [l.strip() for l in f]\n\n if vocabulary is None:\n vocab = t5.data.get_default_vocabulary()\n vocabs = {\"inputs\": vocab, \"targets\": vocab}\n elif isinstance(vocabulary, t5.data.vocabularies.Vocabulary):\n vocabs = {\"inputs\": vocabulary, \"targets\": vocabulary}\n elif isinstance(vocabulary, dict):\n vocabs = vocabulary\n else:\n raise ValueError(\"vocabulary must be a dict, a Vocabulary, or None\")\n\n dataset = tf.data.Dataset.from_tensor_slices(inputs)\n dataset = dataset.map(\n lambda x: {\"inputs\": tf.cast(vocabs[\"inputs\"].encode_tf(x), tf.int64)},\n num_parallel_calls=tf.data.experimental.AUTOTUNE,\n )\n dataset = tokens_to_batches(\n dataset, sequence_length, batch_size, [\"inputs\"]\n )\n\n predictions = []\n for batch in dataset:\n predicted_tokens = self._model.generate(\n input_ids=self.to_tensor(batch[\"inputs\"]), **generate_kwargs\n )\n predicted_tokens = predicted_tokens.cpu().numpy().tolist()\n predictions.extend(\n [vocabs[\"targets\"].decode(p) for p in predicted_tokens]\n )\n\n for inp, pred in zip(inputs, predictions):\n logging.info(\"%s\\n -> %s\", inp, pred)\n\n if output_file is not None:\n utils.write_lines_to_file(predictions, output_file)\n\n def finetune(\n self,\n mixture_or_task_name,\n finetune_steps,\n pretrained_model_dir,\n pretrained_checkpoint_step=-1,\n **train_kwargs,\n ):\n \"\"\"Trains model after loading from any existing checkpoint.\n\n Note that if you have initialized the model using a pre-trained model\n specification (e.g. by passing \"t5-base\" for `model_spec`) then you can\n just call `train` directly. This function is only provided for convenience\n for loading a pre-trained model checkpoint from an arbitrary model\n directory before calling `train`.\n\n Args:\n mixture_or_task_name: str, the name of the Mixture or Task to evaluate\n on. Must be pre-registered in the global `t5.data.TaskRegistry` or\n `t5.data.MixtureRegistry.`\n finetune_steps: int, the number of additional steps to train for.\n pretrained_model_dir: str, directory with pretrained model checkpoints.\n pretrained_checkpoint_step: int, checkpoint to initialize weights from.\n If -1 (default), use the latest checkpoint from the pretrained model\n directory.\n **train_kwargs: Additional keyword arguments to pass to `train`. See the\n docstring for `train` for more details.\n \"\"\"\n if pretrained_checkpoint_step == -1:\n pretrained_checkpoint_step = self.get_latest_checkpoint_step(\n pretrained_model_dir\n )\n self.load_checkpoint(pretrained_checkpoint_step, pretrained_model_dir)\n self.train(mixture_or_task_name, finetune_steps, **train_kwargs)\n", "path": "t5/models/hf_model.py" } ]
diff --git a/t5/models/hf_model.py b/t5/models/hf_model.py index 79fec9a0..2e3d8be9 100644 --- a/t5/models/hf_model.py +++ b/t5/models/hf_model.py @@ -27,6 +27,7 @@ import functools import t5 +import t5.data.mixtures import t5.models import torch import transformers
keras-team__keras-19118
`keras.ops.broadcast_to` throws error `expected ArrayLike, got KerasVariable` when broadcasting a Keras layer weight. Only on `jax` backend. Hello, When I try to broadcast a Keras layer's weight that I create with the `self.add_weight` method, using the `keras.ops.broadcast_to` function, everything works fine on both `torch` and `tensorflow` backends, but on `jax` backend, I run into the following error: ``` Traceback (most recent call last): File "/home/abaid/projects/sandbox/jax/brodcast_error_with_keras.py", line 22, in <module> outputs = tst_layer(inputs) ^^^^^^^^^^^^^^^^^ File "/home/abaid/miniconda3/envs/ML/lib/python3.11/site-packages/keras/src/utils/traceback_utils.py", line 123, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/abaid/projects/sandbox/jax/brodcast_error_with_keras.py", line 15, in call x_weight_broadcasted = ops.broadcast_to(self.x_weight, (8, 2)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/abaid/miniconda3/envs/ML/lib/python3.11/site-packages/jax/_src/numpy/lax_numpy.py", line 1227, in broadcast_to return util._broadcast_to(array, shape) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/abaid/miniconda3/envs/ML/lib/python3.11/site-packages/jax/_src/numpy/util.py", line 413, in _broadcast_to arr = arr if isinstance(arr, Array) else lax.asarray(arr) ^^^^^^^^^^^^^^^^ File "/home/abaid/miniconda3/envs/ML/lib/python3.11/site-packages/jax/_src/lax/lax.py", line 137, in asarray raise TypeError(f"asarray: expected ArrayLike, got {x} of type {type(x)}.") TypeError: Exception encountered when calling TestLayer.call(). asarray: expected ArrayLike, got <KerasVariable shape=(1, 2), dtype=float32, path=test_layer/variable> of type <class 'keras.src.backend.jax.core.Variable'>. Arguments received by TestLayer.call(): • inputs=jnp.ndarray(shape=(8, 5), dtype=float32) ``` Here is the simplified code snippet that replicates the issue and produces the error traceback posted above. ``` import os os.environ["KERAS_BACKEND"] = "jax" from keras import ops, random, layers class TestLayer(layers.Layer): def __init__(self, **kwargs): super().__init__(**kwargs) self.x_weight = self.add_weight( shape=(1, 2), initializer="random_normal" ) def call(self, inputs): x_weight_broadcasted = ops.broadcast_to(self.x_weight, (8, 2)) outputs = ops.concatenate([x_weight_broadcasted, inputs], axis=1) return outputs tst_layer = TestLayer() inputs = random.normal((8, 5)) outputs = tst_layer(inputs) assert ops.shape(outputs) == (8, 7) ```
[ { "content": "import builtins\nimport math\n\nimport jax.experimental.sparse as jax_sparse\nimport jax.numpy as jnp\n\nfrom keras.backend import config\nfrom keras.backend.common import dtypes\nfrom keras.backend.common.variables import standardize_dtype\nfrom keras.backend.jax import sparse\nfrom keras.backend.jax.core import cast\nfrom keras.backend.jax.core import convert_to_tensor\n\n\[email protected]_binary_union(linear=True, use_sparsify=True)\ndef add(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.add(x1, x2)\n\n\ndef bincount(x, weights=None, minlength=0):\n if len(x.shape) == 2:\n if weights is None:\n\n def bincount_fn(arr):\n return jnp.bincount(arr, minlength=minlength)\n\n bincounts = list(map(bincount_fn, x))\n else:\n\n def bincount_fn(arr_w):\n return jnp.bincount(\n arr_w[0], weights=arr_w[1], minlength=minlength\n )\n\n bincounts = list(map(bincount_fn, zip(x, weights)))\n\n return jnp.stack(bincounts)\n return jnp.bincount(x, weights=weights, minlength=minlength)\n\n\ndef einsum(subscripts, *operands, **kwargs):\n operands = [convert_to_tensor(x) for x in operands]\n return jnp.einsum(subscripts, *operands, **kwargs)\n\n\[email protected]_binary_union(linear=True, use_sparsify=True)\ndef subtract(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.subtract(x1, x2)\n\n\ndef matmul(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n if isinstance(x1, jax_sparse.JAXSparse) or isinstance(\n x2, jax_sparse.JAXSparse\n ):\n if not hasattr(matmul, \"sparse_matmul\"):\n matmul.sparse_matmul = jax_sparse.sparsify(jnp.matmul)\n if isinstance(x1, jax_sparse.BCOO):\n x1 = jax_sparse.bcoo_update_layout(\n x1, n_batch=len(x1.shape) - 2, on_inefficient=\"warn\"\n )\n if isinstance(x2, jax_sparse.BCOO):\n x2 = jax_sparse.bcoo_update_layout(\n x2, n_batch=len(x2.shape) - 2, on_inefficient=\"warn\"\n )\n return matmul.sparse_matmul(x1, x2)\n\n return jnp.matmul(x1, x2)\n\n\ndef multiply(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n if isinstance(x1, jax_sparse.BCOO):\n if isinstance(x2, jax_sparse.BCOO):\n # x1 is sparse, x2 is sparse.\n if x1.indices is x2.indices:\n # `bcoo_multiply_sparse`` will not detect that the indices are\n # the same, optimize this case here.\n if not x1.unique_indices:\n x1 = jax_sparse.bcoo_sum_duplicates(x1)\n x2 = jax_sparse.bcoo_sum_duplicates(x2)\n return jax_sparse.BCOO(\n (jnp.multiply(x1.data, x2.data), x1.indices),\n shape=x1.shape,\n indices_sorted=True,\n unique_indices=True,\n )\n else:\n return jax_sparse.bcoo_multiply_sparse(x1, x2)\n else:\n # x1 is sparse, x2 is dense.\n out_data = jax_sparse.bcoo_multiply_dense(x1, x2)\n return jax_sparse.BCOO(\n (out_data, x1.indices),\n shape=x1.shape,\n indices_sorted=x1.indices_sorted,\n unique_indices=x1.unique_indices,\n )\n elif isinstance(x2, jax_sparse.BCOO):\n # x1 is dense, x2 is sparse.\n out_data = jax_sparse.bcoo_multiply_dense(x2, x1)\n return jax_sparse.BCOO(\n (out_data, x2.indices),\n shape=x2.shape,\n indices_sorted=x2.indices_sorted,\n unique_indices=x2.unique_indices,\n )\n return jnp.multiply(x1, x2)\n\n\ndef mean(x, axis=None, keepdims=False):\n x = convert_to_tensor(x)\n ori_dtype = standardize_dtype(x.dtype)\n # `jnp.mean` does not handle low precision (e.g., float16) overflow\n # correctly, so we compute with float32 and cast back to the original type.\n compute_dtype = dtypes.result_type(x.dtype, \"float32\")\n if \"int\" in ori_dtype or ori_dtype == \"bool\":\n result_dtype = compute_dtype\n else:\n result_dtype = ori_dtype\n if isinstance(x, jax_sparse.BCOO):\n if axis is None:\n axis = tuple(range(len(x.shape)))\n (\n canonical_axis,\n keep_dims_shape,\n broadcast_dimensions,\n ) = sparse.axis_shape_dims_for_broadcast_in_dim(\n axis, x.shape, insert_dims=False\n )\n divisor = math.prod(x.shape[i] for i in canonical_axis)\n output = jax_sparse.bcoo_reduce_sum(x, axes=canonical_axis)\n output = jax_sparse.BCOO(\n (output.data.astype(result_dtype) / divisor, output.indices),\n shape=output.shape,\n )\n if keepdims:\n # `bcoo_reduce_sum` does not support keepdims, neither does\n # sparsify(jnp.sum), so we recreate the empty dimensions.\n output = jax_sparse.bcoo_broadcast_in_dim(\n output,\n shape=keep_dims_shape,\n broadcast_dimensions=broadcast_dimensions,\n )\n return output\n else:\n output = jnp.mean(x, axis=axis, keepdims=keepdims, dtype=compute_dtype)\n return cast(output, result_dtype)\n\n\ndef max(x, axis=None, keepdims=False, initial=None):\n x = convert_to_tensor(x)\n return jnp.max(x, axis=axis, keepdims=keepdims, initial=initial)\n\n\ndef ones(shape, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.ones(shape, dtype=dtype)\n\n\ndef zeros(shape, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.zeros(shape, dtype=dtype)\n\n\[email protected]_unary(linear=False)\ndef absolute(x):\n return jnp.absolute(x)\n\n\[email protected]_unary(linear=False)\ndef abs(x):\n return jnp.absolute(x)\n\n\ndef all(x, axis=None, keepdims=False):\n return jnp.all(x, axis=axis, keepdims=keepdims)\n\n\ndef any(x, axis=None, keepdims=False):\n return jnp.any(x, axis=axis, keepdims=keepdims)\n\n\ndef amax(x, axis=None, keepdims=False):\n return jnp.amax(x, axis=axis, keepdims=keepdims)\n\n\ndef amin(x, axis=None, keepdims=False):\n return jnp.amin(x, axis=axis, keepdims=keepdims)\n\n\ndef append(x1, x2, axis=None):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.append(x1, x2, axis=axis)\n\n\ndef arange(start, stop=None, step=1, dtype=None):\n if dtype is None:\n dtypes_to_resolve = [\n getattr(start, \"dtype\", type(start)),\n getattr(step, \"dtype\", type(step)),\n ]\n if stop is not None:\n dtypes_to_resolve.append(getattr(stop, \"dtype\", type(stop)))\n dtype = dtypes.result_type(*dtypes_to_resolve)\n dtype = standardize_dtype(dtype)\n return jnp.arange(start, stop, step=step, dtype=dtype)\n\n\[email protected]_unary\ndef arccos(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.arccos(x)\n\n\[email protected]_unary\ndef arccosh(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.arccosh(x)\n\n\[email protected]_unary(linear=False)\ndef arcsin(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.arcsin(x)\n\n\[email protected]_unary(linear=False)\ndef arcsinh(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.arcsinh(x)\n\n\[email protected]_unary(linear=False)\ndef arctan(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.arctan(x)\n\n\ndef arctan2(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n dtype = dtypes.result_type(x1.dtype, x2.dtype, float)\n x1 = cast(x1, dtype)\n x2 = cast(x2, dtype)\n return jnp.arctan2(x1, x2)\n\n\[email protected]_unary(linear=False)\ndef arctanh(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.arctanh(x)\n\n\ndef argmax(x, axis=None):\n return jnp.argmax(x, axis=axis)\n\n\ndef argmin(x, axis=None):\n return jnp.argmin(x, axis=axis)\n\n\ndef argsort(x, axis=-1):\n x = convert_to_tensor(x)\n if x.ndim == 0:\n return jnp.argsort(x, axis=None)\n return jnp.argsort(x, axis=axis)\n\n\ndef array(x, dtype=None):\n return jnp.array(x, dtype=dtype)\n\n\ndef average(x, axis=None, weights=None):\n x = convert_to_tensor(x)\n dtypes_to_resolve = [x.dtype, float]\n if weights is not None:\n weights = convert_to_tensor(weights)\n dtypes_to_resolve.append(weights.dtype)\n dtype = dtypes.result_type(*dtypes_to_resolve)\n x = cast(x, dtype)\n if weights is not None:\n weights = cast(weights, dtype)\n return jnp.average(x, weights=weights, axis=axis)\n\n\ndef broadcast_to(x, shape):\n return jnp.broadcast_to(x, shape)\n\n\[email protected]_unary(linear=False)\ndef ceil(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n return cast(jnp.ceil(x), dtype)\n\n\ndef clip(x, x_min, x_max):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"bool\":\n x = cast(x, \"int32\")\n return jnp.clip(x, x_min, x_max)\n\n\ndef concatenate(xs, axis=0):\n bcoo_count = builtins.sum(isinstance(x, jax_sparse.BCOO) for x in xs)\n if bcoo_count:\n if bcoo_count == len(xs):\n ndim = len(xs[0].shape)\n if not -ndim <= axis < ndim:\n raise ValueError(\n f\"In `axis`, axis {axis} is out of bounds for array \"\n f\"of dimension {ndim}\"\n )\n if axis < 0:\n axis = axis + ndim\n return jax_sparse.bcoo_concatenate(xs, dimension=axis)\n else:\n xs = [\n x.todense() if isinstance(x, jax_sparse.JAXSparse) else x\n for x in xs\n ]\n return jnp.concatenate(xs, axis=axis)\n\n\[email protected]_unary(linear=True)\ndef conjugate(x):\n return jnp.conjugate(x)\n\n\[email protected]_unary(linear=True)\ndef conj(x):\n return jnp.conjugate(x)\n\n\[email protected]_unary(linear=True)\ndef copy(x):\n return jnp.copy(x)\n\n\[email protected]_unary\ndef cos(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.cos(x)\n\n\[email protected]_unary\ndef cosh(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.cosh(x)\n\n\ndef count_nonzero(x, axis=None):\n return cast(jnp.count_nonzero(x, axis=axis), \"int32\")\n\n\ndef cross(x1, x2, axisa=-1, axisb=-1, axisc=-1, axis=None):\n return jnp.cross(\n x1,\n x2,\n axisa=axisa,\n axisb=axisb,\n axisc=axisc,\n axis=axis,\n )\n\n\ndef cumprod(x, axis=None, dtype=None):\n return jnp.cumprod(x, axis=axis, dtype=dtype)\n\n\ndef cumsum(x, axis=None, dtype=None):\n return jnp.cumsum(x, axis=axis, dtype=dtype)\n\n\ndef diag(x, k=0):\n x = convert_to_tensor(x)\n return jnp.diag(x, k=k)\n\n\ndef diagonal(x, offset=0, axis1=0, axis2=1):\n return jnp.diagonal(\n x,\n offset=offset,\n axis1=axis1,\n axis2=axis2,\n )\n\n\ndef diff(a, n=1, axis=-1):\n return jnp.diff(a, n=n, axis=axis)\n\n\ndef digitize(x, bins):\n x = convert_to_tensor(x)\n bins = convert_to_tensor(bins)\n return jnp.digitize(x, bins)\n\n\ndef dot(x, y):\n return jnp.dot(x, y)\n\n\ndef empty(shape, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.empty(shape, dtype=dtype)\n\n\ndef equal(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.equal(x1, x2)\n\n\[email protected]_unary\ndef exp(x):\n x = convert_to_tensor(x)\n ori_dtype = standardize_dtype(x.dtype)\n if \"int\" in ori_dtype or ori_dtype == \"bool\":\n x = cast(x, config.floatx())\n return jnp.exp(x)\n\n\ndef expand_dims(x, axis):\n if isinstance(x, jax_sparse.BCOO):\n (\n _,\n result_shape,\n broadcast_dimensions,\n ) = sparse.axis_shape_dims_for_broadcast_in_dim(\n axis, x.shape, insert_dims=True\n )\n return jax_sparse.bcoo_broadcast_in_dim(\n x, shape=result_shape, broadcast_dimensions=broadcast_dimensions\n )\n return jnp.expand_dims(x, axis)\n\n\[email protected]_unary(linear=False)\ndef expm1(x):\n x = convert_to_tensor(x)\n ori_dtype = standardize_dtype(x.dtype)\n if \"int\" in ori_dtype or ori_dtype == \"bool\":\n x = cast(x, config.floatx())\n return jnp.expm1(x)\n\n\ndef flip(x, axis=None):\n return jnp.flip(x, axis=axis)\n\n\[email protected]_unary(linear=False)\ndef floor(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.floor(x)\n\n\ndef full(shape, fill_value, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.full(shape, fill_value, dtype=dtype)\n\n\ndef full_like(x, fill_value, dtype=None):\n return jnp.full_like(x, fill_value, dtype=dtype)\n\n\ndef greater(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.greater(x1, x2)\n\n\ndef greater_equal(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.greater_equal(x1, x2)\n\n\ndef hstack(xs):\n return jnp.hstack(xs)\n\n\ndef identity(n, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.identity(n, dtype=dtype)\n\n\[email protected]_unary(linear=True)\ndef imag(x):\n return jnp.imag(x)\n\n\ndef isclose(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.isclose(x1, x2)\n\n\[email protected]_unary\ndef isfinite(x):\n return jnp.isfinite(x)\n\n\[email protected]_unary(linear=False)\ndef isinf(x):\n return jnp.isinf(x)\n\n\[email protected]_unary(linear=False)\ndef isnan(x):\n return jnp.isnan(x)\n\n\ndef less(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.less(x1, x2)\n\n\ndef less_equal(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.less_equal(x1, x2)\n\n\ndef linspace(\n start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0\n):\n return jnp.linspace(\n start,\n stop,\n num=num,\n endpoint=endpoint,\n retstep=retstep,\n dtype=dtype,\n axis=axis,\n )\n\n\[email protected]_unary\ndef log(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.log(x)\n\n\[email protected]_unary\ndef log10(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.log10(x)\n\n\[email protected]_unary(linear=False)\ndef log1p(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.log1p(x)\n\n\[email protected]_unary\ndef log2(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.log2(x)\n\n\ndef logaddexp(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n dtype = dtypes.result_type(x1.dtype, x2.dtype, float)\n x1 = cast(x1, dtype)\n x2 = cast(x2, dtype)\n return jnp.logaddexp(x1, x2)\n\n\ndef logical_and(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.logical_and(x1, x2)\n\n\ndef logical_not(x):\n return jnp.logical_not(x)\n\n\ndef logical_or(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.logical_or(x1, x2)\n\n\ndef logspace(start, stop, num=50, endpoint=True, base=10, dtype=None, axis=0):\n return jnp.logspace(\n start,\n stop,\n num=num,\n endpoint=endpoint,\n base=base,\n dtype=dtype,\n axis=axis,\n )\n\n\[email protected]_binary_union(linear=False, use_sparsify=False)\ndef maximum(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.maximum(x1, x2)\n\n\ndef median(x, axis=None, keepdims=False):\n # axis of jnp.median must be hashable\n if isinstance(axis, list):\n axis = tuple(axis)\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n\n result = jnp.median(x, axis=axis, keepdims=keepdims)\n\n # TODO: jnp.median failed to keepdims when axis is None\n if keepdims is True and axis is None:\n for _ in range(x.ndim - 1):\n result = jnp.expand_dims(result, axis=-1)\n return result\n\n\ndef meshgrid(*x, indexing=\"xy\"):\n return jnp.meshgrid(*x, indexing=indexing)\n\n\ndef min(x, axis=None, keepdims=False, initial=None):\n return jnp.min(x, axis=axis, keepdims=keepdims, initial=initial)\n\n\[email protected]_binary_union(linear=False, use_sparsify=False)\ndef minimum(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.minimum(x1, x2)\n\n\ndef mod(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.mod(x1, x2)\n\n\ndef moveaxis(x, source, destination):\n return jnp.moveaxis(x, source=source, destination=destination)\n\n\ndef nan_to_num(x):\n return jnp.nan_to_num(x)\n\n\ndef ndim(x):\n return jnp.ndim(x)\n\n\ndef nonzero(x):\n return jnp.nonzero(x)\n\n\ndef not_equal(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.not_equal(x1, x2)\n\n\ndef ones_like(x, dtype=None):\n return jnp.ones_like(x, dtype=dtype)\n\n\ndef zeros_like(x, dtype=None):\n return jnp.zeros_like(x, dtype=dtype)\n\n\ndef outer(x1, x2):\n return jnp.outer(x1, x2)\n\n\ndef pad(x, pad_width, mode=\"constant\", constant_values=None):\n kwargs = {}\n if constant_values is not None:\n if mode != \"constant\":\n raise ValueError(\n \"Argument `constant_values` can only be \"\n \"provided when `mode == 'constant'`. \"\n f\"Received: mode={mode}\"\n )\n kwargs[\"constant_values\"] = constant_values\n return jnp.pad(x, pad_width, mode=mode, **kwargs)\n\n\ndef prod(x, axis=None, keepdims=False, dtype=None):\n return jnp.prod(x, axis=axis, keepdims=keepdims, dtype=dtype)\n\n\ndef quantile(x, q, axis=None, method=\"linear\", keepdims=False):\n x = convert_to_tensor(x)\n q = convert_to_tensor(q)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n\n result = jnp.quantile(x, q, axis=axis, method=method, keepdims=keepdims)\n\n # TODO: jnp.quantile failed to keepdims when axis is None\n if keepdims is True and axis is None:\n for _ in range(x.ndim - 1):\n result = jnp.expand_dims(result, axis=-1)\n return result\n\n\ndef ravel(x):\n return jnp.ravel(x)\n\n\[email protected]_unary(linear=True)\ndef real(x):\n return jnp.real(x)\n\n\[email protected]_unary\ndef reciprocal(x):\n return jnp.reciprocal(x)\n\n\ndef repeat(x, repeats, axis=None):\n return jnp.repeat(x, repeats, axis=axis)\n\n\ndef reshape(x, newshape):\n if isinstance(x, jax_sparse.BCOO):\n from keras.ops import operation_utils\n\n # Resolve the -1 in `new_shape` if applicable and possible\n output_shape = operation_utils.compute_reshape_output_shape(\n x.shape, newshape, \"new_shape\"\n )\n if None not in output_shape:\n newshape = output_shape\n return jax_sparse.bcoo_reshape(x, new_sizes=newshape)\n return jnp.reshape(x, newshape)\n\n\ndef roll(x, shift, axis=None):\n return jnp.roll(x, shift, axis=axis)\n\n\[email protected]_unary(linear=False)\ndef sign(x):\n return jnp.sign(x)\n\n\[email protected]_unary(linear=False)\ndef sin(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.sin(x)\n\n\[email protected]_unary(linear=False)\ndef sinh(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.sinh(x)\n\n\ndef size(x):\n return jnp.size(x)\n\n\ndef sort(x, axis=-1):\n return jnp.sort(x, axis=axis)\n\n\ndef split(x, indices_or_sections, axis=0):\n return jnp.split(x, indices_or_sections, axis=axis)\n\n\ndef stack(x, axis=0):\n return jnp.stack(x, axis=axis)\n\n\ndef std(x, axis=None, keepdims=False):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.std(x, axis=axis, keepdims=keepdims)\n\n\ndef swapaxes(x, axis1, axis2):\n return jnp.swapaxes(x, axis1=axis1, axis2=axis2)\n\n\ndef take(x, indices, axis=None):\n x = convert_to_tensor(x)\n indices = convert_to_tensor(indices, sparse=False)\n return jnp.take(x, indices, axis=axis)\n\n\ndef take_along_axis(x, indices, axis=None):\n return jnp.take_along_axis(x, indices, axis=axis)\n\n\[email protected]_unary(linear=False)\ndef tan(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.tan(x)\n\n\[email protected]_unary(linear=False)\ndef tanh(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.tanh(x)\n\n\ndef tensordot(x1, x2, axes=2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.tensordot(x1, x2, axes=axes)\n\n\[email protected]_unary(linear=False)\ndef round(x, decimals=0):\n return jnp.round(x, decimals=decimals)\n\n\ndef tile(x, repeats):\n return jnp.tile(x, repeats)\n\n\ndef trace(x, offset=0, axis1=0, axis2=1):\n x = convert_to_tensor(x)\n dtype = None\n if standardize_dtype(x.dtype) == \"bool\":\n dtype = \"int32\"\n return jnp.trace(x, offset=offset, axis1=axis1, axis2=axis2, dtype=dtype)\n\n\ndef tri(N, M=None, k=0, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.tri(N, M=M, k=k, dtype=dtype)\n\n\ndef tril(x, k=0):\n return jnp.tril(x, k=k)\n\n\ndef triu(x, k=0):\n return jnp.triu(x, k=k)\n\n\ndef vdot(x1, x2):\n return jnp.vdot(x1, x2)\n\n\ndef vstack(xs):\n return jnp.vstack(xs)\n\n\ndef where(condition, x1, x2):\n return jnp.where(condition, x1, x2)\n\n\[email protected]_division\ndef divide(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.divide(x1, x2)\n\n\[email protected]_division\ndef true_divide(x1, x2):\n return divide(x1, x2)\n\n\ndef power(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.power(x1, x2)\n\n\[email protected]_unary(linear=True)\ndef negative(x):\n return jnp.negative(x)\n\n\[email protected]_unary(linear=False)\ndef square(x):\n return jnp.square(x)\n\n\[email protected]_unary(linear=False)\ndef sqrt(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.sqrt(x)\n\n\ndef squeeze(x, axis=None):\n if isinstance(x, jax_sparse.BCOO):\n if axis is None:\n axis = tuple(i for i, d in enumerate(x.shape) if d == 1)\n elif isinstance(axis, int):\n axis = (axis,)\n return jax_sparse.bcoo_squeeze(x, dimensions=axis)\n return jnp.squeeze(x, axis=axis)\n\n\ndef transpose(x, axes=None):\n x = convert_to_tensor(x)\n if isinstance(x, jax_sparse.BCOO):\n num_dims = len(x.shape)\n if axes is None:\n permutation = tuple(range(num_dims)[::-1])\n else:\n permutation = []\n for a in axes:\n if not -num_dims <= a < num_dims:\n raise ValueError(\n f\"axis {a} out of bounds for tensor of rank {num_dims}\"\n )\n permutation.append(a if a >= 0 else a + num_dims)\n return jax_sparse.bcoo_transpose(x, permutation=permutation)\n return jnp.transpose(x, axes=axes)\n\n\ndef var(x, axis=None, keepdims=False):\n x = convert_to_tensor(x)\n # `jnp.var` does not handle low precision (e.g., float16) overflow\n # correctly, so we compute with float32 and cast back to the original type.\n compute_dtype = dtypes.result_type(x.dtype, \"float32\")\n result_dtype = dtypes.result_type(x.dtype, float)\n return cast(\n jnp.var(x, axis=axis, keepdims=keepdims, dtype=compute_dtype),\n result_dtype,\n )\n\n\ndef sum(x, axis=None, keepdims=False):\n x = convert_to_tensor(x)\n return jnp.sum(x, axis=axis, keepdims=keepdims)\n\n\ndef eye(N, M=None, k=0, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.eye(N, M=M, k=k, dtype=dtype)\n\n\ndef floor_divide(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.floor_divide(x1, x2)\n\n\ndef logical_xor(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.logical_xor(x1, x2)\n", "path": "keras/backend/jax/numpy.py" } ]
[ { "content": "import builtins\nimport math\n\nimport jax.experimental.sparse as jax_sparse\nimport jax.numpy as jnp\n\nfrom keras.backend import config\nfrom keras.backend.common import dtypes\nfrom keras.backend.common.variables import standardize_dtype\nfrom keras.backend.jax import sparse\nfrom keras.backend.jax.core import cast\nfrom keras.backend.jax.core import convert_to_tensor\n\n\[email protected]_binary_union(linear=True, use_sparsify=True)\ndef add(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.add(x1, x2)\n\n\ndef bincount(x, weights=None, minlength=0):\n if len(x.shape) == 2:\n if weights is None:\n\n def bincount_fn(arr):\n return jnp.bincount(arr, minlength=minlength)\n\n bincounts = list(map(bincount_fn, x))\n else:\n\n def bincount_fn(arr_w):\n return jnp.bincount(\n arr_w[0], weights=arr_w[1], minlength=minlength\n )\n\n bincounts = list(map(bincount_fn, zip(x, weights)))\n\n return jnp.stack(bincounts)\n return jnp.bincount(x, weights=weights, minlength=minlength)\n\n\ndef einsum(subscripts, *operands, **kwargs):\n operands = [convert_to_tensor(x) for x in operands]\n return jnp.einsum(subscripts, *operands, **kwargs)\n\n\[email protected]_binary_union(linear=True, use_sparsify=True)\ndef subtract(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.subtract(x1, x2)\n\n\ndef matmul(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n if isinstance(x1, jax_sparse.JAXSparse) or isinstance(\n x2, jax_sparse.JAXSparse\n ):\n if not hasattr(matmul, \"sparse_matmul\"):\n matmul.sparse_matmul = jax_sparse.sparsify(jnp.matmul)\n if isinstance(x1, jax_sparse.BCOO):\n x1 = jax_sparse.bcoo_update_layout(\n x1, n_batch=len(x1.shape) - 2, on_inefficient=\"warn\"\n )\n if isinstance(x2, jax_sparse.BCOO):\n x2 = jax_sparse.bcoo_update_layout(\n x2, n_batch=len(x2.shape) - 2, on_inefficient=\"warn\"\n )\n return matmul.sparse_matmul(x1, x2)\n\n return jnp.matmul(x1, x2)\n\n\ndef multiply(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n if isinstance(x1, jax_sparse.BCOO):\n if isinstance(x2, jax_sparse.BCOO):\n # x1 is sparse, x2 is sparse.\n if x1.indices is x2.indices:\n # `bcoo_multiply_sparse`` will not detect that the indices are\n # the same, optimize this case here.\n if not x1.unique_indices:\n x1 = jax_sparse.bcoo_sum_duplicates(x1)\n x2 = jax_sparse.bcoo_sum_duplicates(x2)\n return jax_sparse.BCOO(\n (jnp.multiply(x1.data, x2.data), x1.indices),\n shape=x1.shape,\n indices_sorted=True,\n unique_indices=True,\n )\n else:\n return jax_sparse.bcoo_multiply_sparse(x1, x2)\n else:\n # x1 is sparse, x2 is dense.\n out_data = jax_sparse.bcoo_multiply_dense(x1, x2)\n return jax_sparse.BCOO(\n (out_data, x1.indices),\n shape=x1.shape,\n indices_sorted=x1.indices_sorted,\n unique_indices=x1.unique_indices,\n )\n elif isinstance(x2, jax_sparse.BCOO):\n # x1 is dense, x2 is sparse.\n out_data = jax_sparse.bcoo_multiply_dense(x2, x1)\n return jax_sparse.BCOO(\n (out_data, x2.indices),\n shape=x2.shape,\n indices_sorted=x2.indices_sorted,\n unique_indices=x2.unique_indices,\n )\n return jnp.multiply(x1, x2)\n\n\ndef mean(x, axis=None, keepdims=False):\n x = convert_to_tensor(x)\n ori_dtype = standardize_dtype(x.dtype)\n # `jnp.mean` does not handle low precision (e.g., float16) overflow\n # correctly, so we compute with float32 and cast back to the original type.\n compute_dtype = dtypes.result_type(x.dtype, \"float32\")\n if \"int\" in ori_dtype or ori_dtype == \"bool\":\n result_dtype = compute_dtype\n else:\n result_dtype = ori_dtype\n if isinstance(x, jax_sparse.BCOO):\n if axis is None:\n axis = tuple(range(len(x.shape)))\n (\n canonical_axis,\n keep_dims_shape,\n broadcast_dimensions,\n ) = sparse.axis_shape_dims_for_broadcast_in_dim(\n axis, x.shape, insert_dims=False\n )\n divisor = math.prod(x.shape[i] for i in canonical_axis)\n output = jax_sparse.bcoo_reduce_sum(x, axes=canonical_axis)\n output = jax_sparse.BCOO(\n (output.data.astype(result_dtype) / divisor, output.indices),\n shape=output.shape,\n )\n if keepdims:\n # `bcoo_reduce_sum` does not support keepdims, neither does\n # sparsify(jnp.sum), so we recreate the empty dimensions.\n output = jax_sparse.bcoo_broadcast_in_dim(\n output,\n shape=keep_dims_shape,\n broadcast_dimensions=broadcast_dimensions,\n )\n return output\n else:\n output = jnp.mean(x, axis=axis, keepdims=keepdims, dtype=compute_dtype)\n return cast(output, result_dtype)\n\n\ndef max(x, axis=None, keepdims=False, initial=None):\n x = convert_to_tensor(x)\n return jnp.max(x, axis=axis, keepdims=keepdims, initial=initial)\n\n\ndef ones(shape, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.ones(shape, dtype=dtype)\n\n\ndef zeros(shape, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.zeros(shape, dtype=dtype)\n\n\[email protected]_unary(linear=False)\ndef absolute(x):\n return jnp.absolute(x)\n\n\[email protected]_unary(linear=False)\ndef abs(x):\n return jnp.absolute(x)\n\n\ndef all(x, axis=None, keepdims=False):\n return jnp.all(x, axis=axis, keepdims=keepdims)\n\n\ndef any(x, axis=None, keepdims=False):\n return jnp.any(x, axis=axis, keepdims=keepdims)\n\n\ndef amax(x, axis=None, keepdims=False):\n return jnp.amax(x, axis=axis, keepdims=keepdims)\n\n\ndef amin(x, axis=None, keepdims=False):\n return jnp.amin(x, axis=axis, keepdims=keepdims)\n\n\ndef append(x1, x2, axis=None):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.append(x1, x2, axis=axis)\n\n\ndef arange(start, stop=None, step=1, dtype=None):\n if dtype is None:\n dtypes_to_resolve = [\n getattr(start, \"dtype\", type(start)),\n getattr(step, \"dtype\", type(step)),\n ]\n if stop is not None:\n dtypes_to_resolve.append(getattr(stop, \"dtype\", type(stop)))\n dtype = dtypes.result_type(*dtypes_to_resolve)\n dtype = standardize_dtype(dtype)\n return jnp.arange(start, stop, step=step, dtype=dtype)\n\n\[email protected]_unary\ndef arccos(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.arccos(x)\n\n\[email protected]_unary\ndef arccosh(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.arccosh(x)\n\n\[email protected]_unary(linear=False)\ndef arcsin(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.arcsin(x)\n\n\[email protected]_unary(linear=False)\ndef arcsinh(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.arcsinh(x)\n\n\[email protected]_unary(linear=False)\ndef arctan(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.arctan(x)\n\n\ndef arctan2(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n dtype = dtypes.result_type(x1.dtype, x2.dtype, float)\n x1 = cast(x1, dtype)\n x2 = cast(x2, dtype)\n return jnp.arctan2(x1, x2)\n\n\[email protected]_unary(linear=False)\ndef arctanh(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.arctanh(x)\n\n\ndef argmax(x, axis=None):\n return jnp.argmax(x, axis=axis)\n\n\ndef argmin(x, axis=None):\n return jnp.argmin(x, axis=axis)\n\n\ndef argsort(x, axis=-1):\n x = convert_to_tensor(x)\n if x.ndim == 0:\n return jnp.argsort(x, axis=None)\n return jnp.argsort(x, axis=axis)\n\n\ndef array(x, dtype=None):\n return jnp.array(x, dtype=dtype)\n\n\ndef average(x, axis=None, weights=None):\n x = convert_to_tensor(x)\n dtypes_to_resolve = [x.dtype, float]\n if weights is not None:\n weights = convert_to_tensor(weights)\n dtypes_to_resolve.append(weights.dtype)\n dtype = dtypes.result_type(*dtypes_to_resolve)\n x = cast(x, dtype)\n if weights is not None:\n weights = cast(weights, dtype)\n return jnp.average(x, weights=weights, axis=axis)\n\n\ndef broadcast_to(x, shape):\n x = convert_to_tensor(x)\n return jnp.broadcast_to(x, shape)\n\n\[email protected]_unary(linear=False)\ndef ceil(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n return cast(jnp.ceil(x), dtype)\n\n\ndef clip(x, x_min, x_max):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"bool\":\n x = cast(x, \"int32\")\n return jnp.clip(x, x_min, x_max)\n\n\ndef concatenate(xs, axis=0):\n bcoo_count = builtins.sum(isinstance(x, jax_sparse.BCOO) for x in xs)\n if bcoo_count:\n if bcoo_count == len(xs):\n ndim = len(xs[0].shape)\n if not -ndim <= axis < ndim:\n raise ValueError(\n f\"In `axis`, axis {axis} is out of bounds for array \"\n f\"of dimension {ndim}\"\n )\n if axis < 0:\n axis = axis + ndim\n return jax_sparse.bcoo_concatenate(xs, dimension=axis)\n else:\n xs = [\n x.todense() if isinstance(x, jax_sparse.JAXSparse) else x\n for x in xs\n ]\n return jnp.concatenate(xs, axis=axis)\n\n\[email protected]_unary(linear=True)\ndef conjugate(x):\n return jnp.conjugate(x)\n\n\[email protected]_unary(linear=True)\ndef conj(x):\n return jnp.conjugate(x)\n\n\[email protected]_unary(linear=True)\ndef copy(x):\n return jnp.copy(x)\n\n\[email protected]_unary\ndef cos(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.cos(x)\n\n\[email protected]_unary\ndef cosh(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.cosh(x)\n\n\ndef count_nonzero(x, axis=None):\n return cast(jnp.count_nonzero(x, axis=axis), \"int32\")\n\n\ndef cross(x1, x2, axisa=-1, axisb=-1, axisc=-1, axis=None):\n return jnp.cross(\n x1,\n x2,\n axisa=axisa,\n axisb=axisb,\n axisc=axisc,\n axis=axis,\n )\n\n\ndef cumprod(x, axis=None, dtype=None):\n return jnp.cumprod(x, axis=axis, dtype=dtype)\n\n\ndef cumsum(x, axis=None, dtype=None):\n return jnp.cumsum(x, axis=axis, dtype=dtype)\n\n\ndef diag(x, k=0):\n x = convert_to_tensor(x)\n return jnp.diag(x, k=k)\n\n\ndef diagonal(x, offset=0, axis1=0, axis2=1):\n return jnp.diagonal(\n x,\n offset=offset,\n axis1=axis1,\n axis2=axis2,\n )\n\n\ndef diff(a, n=1, axis=-1):\n return jnp.diff(a, n=n, axis=axis)\n\n\ndef digitize(x, bins):\n x = convert_to_tensor(x)\n bins = convert_to_tensor(bins)\n return jnp.digitize(x, bins)\n\n\ndef dot(x, y):\n return jnp.dot(x, y)\n\n\ndef empty(shape, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.empty(shape, dtype=dtype)\n\n\ndef equal(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.equal(x1, x2)\n\n\[email protected]_unary\ndef exp(x):\n x = convert_to_tensor(x)\n ori_dtype = standardize_dtype(x.dtype)\n if \"int\" in ori_dtype or ori_dtype == \"bool\":\n x = cast(x, config.floatx())\n return jnp.exp(x)\n\n\ndef expand_dims(x, axis):\n if isinstance(x, jax_sparse.BCOO):\n (\n _,\n result_shape,\n broadcast_dimensions,\n ) = sparse.axis_shape_dims_for_broadcast_in_dim(\n axis, x.shape, insert_dims=True\n )\n return jax_sparse.bcoo_broadcast_in_dim(\n x, shape=result_shape, broadcast_dimensions=broadcast_dimensions\n )\n return jnp.expand_dims(x, axis)\n\n\[email protected]_unary(linear=False)\ndef expm1(x):\n x = convert_to_tensor(x)\n ori_dtype = standardize_dtype(x.dtype)\n if \"int\" in ori_dtype or ori_dtype == \"bool\":\n x = cast(x, config.floatx())\n return jnp.expm1(x)\n\n\ndef flip(x, axis=None):\n return jnp.flip(x, axis=axis)\n\n\[email protected]_unary(linear=False)\ndef floor(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.floor(x)\n\n\ndef full(shape, fill_value, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.full(shape, fill_value, dtype=dtype)\n\n\ndef full_like(x, fill_value, dtype=None):\n return jnp.full_like(x, fill_value, dtype=dtype)\n\n\ndef greater(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.greater(x1, x2)\n\n\ndef greater_equal(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.greater_equal(x1, x2)\n\n\ndef hstack(xs):\n return jnp.hstack(xs)\n\n\ndef identity(n, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.identity(n, dtype=dtype)\n\n\[email protected]_unary(linear=True)\ndef imag(x):\n return jnp.imag(x)\n\n\ndef isclose(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.isclose(x1, x2)\n\n\[email protected]_unary\ndef isfinite(x):\n return jnp.isfinite(x)\n\n\[email protected]_unary(linear=False)\ndef isinf(x):\n return jnp.isinf(x)\n\n\[email protected]_unary(linear=False)\ndef isnan(x):\n return jnp.isnan(x)\n\n\ndef less(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.less(x1, x2)\n\n\ndef less_equal(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.less_equal(x1, x2)\n\n\ndef linspace(\n start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0\n):\n return jnp.linspace(\n start,\n stop,\n num=num,\n endpoint=endpoint,\n retstep=retstep,\n dtype=dtype,\n axis=axis,\n )\n\n\[email protected]_unary\ndef log(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.log(x)\n\n\[email protected]_unary\ndef log10(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.log10(x)\n\n\[email protected]_unary(linear=False)\ndef log1p(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.log1p(x)\n\n\[email protected]_unary\ndef log2(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.log2(x)\n\n\ndef logaddexp(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n dtype = dtypes.result_type(x1.dtype, x2.dtype, float)\n x1 = cast(x1, dtype)\n x2 = cast(x2, dtype)\n return jnp.logaddexp(x1, x2)\n\n\ndef logical_and(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.logical_and(x1, x2)\n\n\ndef logical_not(x):\n return jnp.logical_not(x)\n\n\ndef logical_or(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.logical_or(x1, x2)\n\n\ndef logspace(start, stop, num=50, endpoint=True, base=10, dtype=None, axis=0):\n return jnp.logspace(\n start,\n stop,\n num=num,\n endpoint=endpoint,\n base=base,\n dtype=dtype,\n axis=axis,\n )\n\n\[email protected]_binary_union(linear=False, use_sparsify=False)\ndef maximum(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.maximum(x1, x2)\n\n\ndef median(x, axis=None, keepdims=False):\n # axis of jnp.median must be hashable\n if isinstance(axis, list):\n axis = tuple(axis)\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n\n result = jnp.median(x, axis=axis, keepdims=keepdims)\n\n # TODO: jnp.median failed to keepdims when axis is None\n if keepdims is True and axis is None:\n for _ in range(x.ndim - 1):\n result = jnp.expand_dims(result, axis=-1)\n return result\n\n\ndef meshgrid(*x, indexing=\"xy\"):\n return jnp.meshgrid(*x, indexing=indexing)\n\n\ndef min(x, axis=None, keepdims=False, initial=None):\n return jnp.min(x, axis=axis, keepdims=keepdims, initial=initial)\n\n\[email protected]_binary_union(linear=False, use_sparsify=False)\ndef minimum(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.minimum(x1, x2)\n\n\ndef mod(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.mod(x1, x2)\n\n\ndef moveaxis(x, source, destination):\n return jnp.moveaxis(x, source=source, destination=destination)\n\n\ndef nan_to_num(x):\n return jnp.nan_to_num(x)\n\n\ndef ndim(x):\n return jnp.ndim(x)\n\n\ndef nonzero(x):\n return jnp.nonzero(x)\n\n\ndef not_equal(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.not_equal(x1, x2)\n\n\ndef ones_like(x, dtype=None):\n return jnp.ones_like(x, dtype=dtype)\n\n\ndef zeros_like(x, dtype=None):\n return jnp.zeros_like(x, dtype=dtype)\n\n\ndef outer(x1, x2):\n return jnp.outer(x1, x2)\n\n\ndef pad(x, pad_width, mode=\"constant\", constant_values=None):\n kwargs = {}\n if constant_values is not None:\n if mode != \"constant\":\n raise ValueError(\n \"Argument `constant_values` can only be \"\n \"provided when `mode == 'constant'`. \"\n f\"Received: mode={mode}\"\n )\n kwargs[\"constant_values\"] = constant_values\n return jnp.pad(x, pad_width, mode=mode, **kwargs)\n\n\ndef prod(x, axis=None, keepdims=False, dtype=None):\n return jnp.prod(x, axis=axis, keepdims=keepdims, dtype=dtype)\n\n\ndef quantile(x, q, axis=None, method=\"linear\", keepdims=False):\n x = convert_to_tensor(x)\n q = convert_to_tensor(q)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n\n result = jnp.quantile(x, q, axis=axis, method=method, keepdims=keepdims)\n\n # TODO: jnp.quantile failed to keepdims when axis is None\n if keepdims is True and axis is None:\n for _ in range(x.ndim - 1):\n result = jnp.expand_dims(result, axis=-1)\n return result\n\n\ndef ravel(x):\n return jnp.ravel(x)\n\n\[email protected]_unary(linear=True)\ndef real(x):\n return jnp.real(x)\n\n\[email protected]_unary\ndef reciprocal(x):\n return jnp.reciprocal(x)\n\n\ndef repeat(x, repeats, axis=None):\n return jnp.repeat(x, repeats, axis=axis)\n\n\ndef reshape(x, newshape):\n if isinstance(x, jax_sparse.BCOO):\n from keras.ops import operation_utils\n\n # Resolve the -1 in `new_shape` if applicable and possible\n output_shape = operation_utils.compute_reshape_output_shape(\n x.shape, newshape, \"new_shape\"\n )\n if None not in output_shape:\n newshape = output_shape\n return jax_sparse.bcoo_reshape(x, new_sizes=newshape)\n return jnp.reshape(x, newshape)\n\n\ndef roll(x, shift, axis=None):\n return jnp.roll(x, shift, axis=axis)\n\n\[email protected]_unary(linear=False)\ndef sign(x):\n return jnp.sign(x)\n\n\[email protected]_unary(linear=False)\ndef sin(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.sin(x)\n\n\[email protected]_unary(linear=False)\ndef sinh(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.sinh(x)\n\n\ndef size(x):\n return jnp.size(x)\n\n\ndef sort(x, axis=-1):\n return jnp.sort(x, axis=axis)\n\n\ndef split(x, indices_or_sections, axis=0):\n return jnp.split(x, indices_or_sections, axis=axis)\n\n\ndef stack(x, axis=0):\n return jnp.stack(x, axis=axis)\n\n\ndef std(x, axis=None, keepdims=False):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.std(x, axis=axis, keepdims=keepdims)\n\n\ndef swapaxes(x, axis1, axis2):\n return jnp.swapaxes(x, axis1=axis1, axis2=axis2)\n\n\ndef take(x, indices, axis=None):\n x = convert_to_tensor(x)\n indices = convert_to_tensor(indices, sparse=False)\n return jnp.take(x, indices, axis=axis)\n\n\ndef take_along_axis(x, indices, axis=None):\n return jnp.take_along_axis(x, indices, axis=axis)\n\n\[email protected]_unary(linear=False)\ndef tan(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.tan(x)\n\n\[email protected]_unary(linear=False)\ndef tanh(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n dtype = config.floatx()\n else:\n dtype = dtypes.result_type(x.dtype, float)\n x = cast(x, dtype)\n return jnp.tanh(x)\n\n\ndef tensordot(x1, x2, axes=2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.tensordot(x1, x2, axes=axes)\n\n\[email protected]_unary(linear=False)\ndef round(x, decimals=0):\n return jnp.round(x, decimals=decimals)\n\n\ndef tile(x, repeats):\n return jnp.tile(x, repeats)\n\n\ndef trace(x, offset=0, axis1=0, axis2=1):\n x = convert_to_tensor(x)\n dtype = None\n if standardize_dtype(x.dtype) == \"bool\":\n dtype = \"int32\"\n return jnp.trace(x, offset=offset, axis1=axis1, axis2=axis2, dtype=dtype)\n\n\ndef tri(N, M=None, k=0, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.tri(N, M=M, k=k, dtype=dtype)\n\n\ndef tril(x, k=0):\n return jnp.tril(x, k=k)\n\n\ndef triu(x, k=0):\n return jnp.triu(x, k=k)\n\n\ndef vdot(x1, x2):\n return jnp.vdot(x1, x2)\n\n\ndef vstack(xs):\n return jnp.vstack(xs)\n\n\ndef where(condition, x1, x2):\n return jnp.where(condition, x1, x2)\n\n\[email protected]_division\ndef divide(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.divide(x1, x2)\n\n\[email protected]_division\ndef true_divide(x1, x2):\n return divide(x1, x2)\n\n\ndef power(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.power(x1, x2)\n\n\[email protected]_unary(linear=True)\ndef negative(x):\n return jnp.negative(x)\n\n\[email protected]_unary(linear=False)\ndef square(x):\n return jnp.square(x)\n\n\[email protected]_unary(linear=False)\ndef sqrt(x):\n x = convert_to_tensor(x)\n if standardize_dtype(x.dtype) == \"int64\":\n x = cast(x, config.floatx())\n return jnp.sqrt(x)\n\n\ndef squeeze(x, axis=None):\n if isinstance(x, jax_sparse.BCOO):\n if axis is None:\n axis = tuple(i for i, d in enumerate(x.shape) if d == 1)\n elif isinstance(axis, int):\n axis = (axis,)\n return jax_sparse.bcoo_squeeze(x, dimensions=axis)\n return jnp.squeeze(x, axis=axis)\n\n\ndef transpose(x, axes=None):\n x = convert_to_tensor(x)\n if isinstance(x, jax_sparse.BCOO):\n num_dims = len(x.shape)\n if axes is None:\n permutation = tuple(range(num_dims)[::-1])\n else:\n permutation = []\n for a in axes:\n if not -num_dims <= a < num_dims:\n raise ValueError(\n f\"axis {a} out of bounds for tensor of rank {num_dims}\"\n )\n permutation.append(a if a >= 0 else a + num_dims)\n return jax_sparse.bcoo_transpose(x, permutation=permutation)\n return jnp.transpose(x, axes=axes)\n\n\ndef var(x, axis=None, keepdims=False):\n x = convert_to_tensor(x)\n # `jnp.var` does not handle low precision (e.g., float16) overflow\n # correctly, so we compute with float32 and cast back to the original type.\n compute_dtype = dtypes.result_type(x.dtype, \"float32\")\n result_dtype = dtypes.result_type(x.dtype, float)\n return cast(\n jnp.var(x, axis=axis, keepdims=keepdims, dtype=compute_dtype),\n result_dtype,\n )\n\n\ndef sum(x, axis=None, keepdims=False):\n x = convert_to_tensor(x)\n return jnp.sum(x, axis=axis, keepdims=keepdims)\n\n\ndef eye(N, M=None, k=0, dtype=None):\n dtype = dtype or config.floatx()\n return jnp.eye(N, M=M, k=k, dtype=dtype)\n\n\ndef floor_divide(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.floor_divide(x1, x2)\n\n\ndef logical_xor(x1, x2):\n x1 = convert_to_tensor(x1)\n x2 = convert_to_tensor(x2)\n return jnp.logical_xor(x1, x2)\n", "path": "keras/backend/jax/numpy.py" } ]
diff --git a/keras/backend/jax/numpy.py b/keras/backend/jax/numpy.py index ac9d10ae3675..0b062489065b 100644 --- a/keras/backend/jax/numpy.py +++ b/keras/backend/jax/numpy.py @@ -322,6 +322,7 @@ def average(x, axis=None, weights=None): def broadcast_to(x, shape): + x = convert_to_tensor(x) return jnp.broadcast_to(x, shape)
celery__celery-3671
Request on_timeout should ignore soft time limit exception When Request.on_timeout receive a soft timeout from billiard, it does the same as if it was receiving a hard time limit exception. This is ran by the controller. But the task may catch this exception and eg. return (this is what soft timeout are for). This cause: 1. the result to be saved once as an exception by the controller (on_timeout) and another time with the result returned by the task 2. the task status to be passed to failure and to success on the same manner 3. if the task is participating to a chord, the chord result counter (at least with redis) is incremented twice (instead of once), making the chord to return prematurely and eventually loose tasks… 1, 2 and 3 can leads of course to strange race conditions… ## Steps to reproduce (Illustration) with the program in test_timeout.py: ```python import time import celery app = celery.Celery('test_timeout') app.conf.update( result_backend="redis://localhost/0", broker_url="amqp://celery:celery@localhost:5672/host", ) @app.task(soft_time_limit=1) def test(): try: time.sleep(2) except Exception: return 1 @app.task() def add(args): print("### adding", args) return sum(args) @app.task() def on_error(context, exception, traceback, **kwargs): print("### on_error: ", exception) if __name__ == "__main__": result = celery.chord([test.s().set(link_error=on_error.s()), test.s().set(link_error=on_error.s())])(add.s()) result.get() ``` start a worker and the program: ``` $ celery -A test_timeout worker -l WARNING $ python3 test_timeout.py ``` ## Expected behavior add method is called with `[1, 1]` as argument and test_timeout.py return normally ## Actual behavior The test_timeout.py fails, with ``` celery.backends.base.ChordError: Callback error: ChordError("Dependency 15109e05-da43-449f-9081-85d839ac0ef2 raised SoftTimeLimitExceeded('SoftTimeLimitExceeded(True,)',)", ``` On the worker side, the **on_error is called but the add method as well !** ``` [2017-11-29 23:07:25,538: WARNING/MainProcess] Soft time limit (1s) exceeded for test_timeout.test[15109e05-da43-449f-9081-85d839ac0ef2] [2017-11-29 23:07:25,546: WARNING/MainProcess] ### on_error: [2017-11-29 23:07:25,546: WARNING/MainProcess] SoftTimeLimitExceeded(True,) [2017-11-29 23:07:25,547: WARNING/MainProcess] Soft time limit (1s) exceeded for test_timeout.test[38f3f7f2-4a89-4318-8ee9-36a987f73757] [2017-11-29 23:07:25,553: ERROR/MainProcess] Chord callback for 'ef6d7a38-d1b4-40ad-b937-ffa84e40bb23' raised: ChordError("Dependency 15109e05-da43-449f-9081-85d839ac0ef2 raised SoftTimeLimitExceeded('SoftTimeLimitExceeded(True,)',)",) Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/celery/backends/redis.py", line 290, in on_chord_part_return callback.delay([unpack(tup, decode) for tup in resl]) File "/usr/local/lib/python3.4/dist-packages/celery/backends/redis.py", line 290, in <listcomp> callback.delay([unpack(tup, decode) for tup in resl]) File "/usr/local/lib/python3.4/dist-packages/celery/backends/redis.py", line 243, in _unpack_chord_result raise ChordError('Dependency {0} raised {1!r}'.format(tid, retval)) celery.exceptions.ChordError: Dependency 15109e05-da43-449f-9081-85d839ac0ef2 raised SoftTimeLimitExceeded('SoftTimeLimitExceeded(True,)',) [2017-11-29 23:07:25,565: WARNING/MainProcess] ### on_error: [2017-11-29 23:07:25,565: WARNING/MainProcess] SoftTimeLimitExceeded(True,) [2017-11-29 23:07:27,262: WARNING/PoolWorker-2] ### adding [2017-11-29 23:07:27,264: WARNING/PoolWorker-2] [1, 1] ``` Of course, on purpose did I choose to call the test.s() twice, to show that the count in the chord continues. In fact: - the chord result is incremented twice by the error of soft time limit - the chord result is again incremented twice by the correct returning of `test` task ## Conclusion Request.on_timeout should not process soft time limit exception. here is a quick monkey patch (correction of celery is trivial) ```python def patch_celery_request_on_timeout(): from celery.worker import request orig = request.Request.on_timeout def patched_on_timeout(self, soft, timeout): if not soft: orig(self, soft, timeout) request.Request.on_timeout = patched_on_timeout patch_celery_request_on_timeout() ``` ## version info software -> celery:4.1.0 (latentcall) kombu:4.0.2 py:3.4.3 billiard:3.5.0.2 py-amqp:2.1.4 platform -> system:Linux arch:64bit, ELF imp:CPython loader -> celery.loaders.app.AppLoader settings -> transport:amqp results:redis://10.0.3.253/0
[ { "content": "from __future__ import absolute_import, unicode_literals\nfrom . import app\n\n\[email protected]\ndef add(x, y):\n return x + y\n\n\[email protected]\ndef mul(x, y):\n return x * y\n\n\[email protected]\ndef xsum(numbers):\n return sum(numbers)\n", "path": "examples/next-steps/proj/tasks.py" } ]
[ { "content": "from __future__ import absolute_import, unicode_literals\nfrom .celery import app\n\n\[email protected]\ndef add(x, y):\n return x + y\n\n\[email protected]\ndef mul(x, y):\n return x * y\n\n\[email protected]\ndef xsum(numbers):\n return sum(numbers)\n", "path": "examples/next-steps/proj/tasks.py" } ]
diff --git a/examples/next-steps/proj/tasks.py b/examples/next-steps/proj/tasks.py index 22317e2cee3..07387c89e6f 100644 --- a/examples/next-steps/proj/tasks.py +++ b/examples/next-steps/proj/tasks.py @@ -1,5 +1,5 @@ from __future__ import absolute_import, unicode_literals -from . import app +from .celery import app @app.task
mlflow__mlflow-9267
Remove python shebang Remove: https://github.com/mlflow/mlflow/blob/d898704ed4987c5113be0cda47c28054df18f4c4/docs/source/conf.py#L1 https://github.com/mlflow/mlflow/blob/d898704ed4987c5113be0cda47c28054df18f4c4/tests/utils/test_file_utils.py#L1
[ { "content": "#!/usr/bin/env python3\n#\n# MLflow documentation build configuration file, created by\n# cookiecutter pipproject\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport sys\nimport os\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nsys.path.insert(0, os.path.abspath(\"../..\"))\nsys.path.insert(0, os.path.abspath(\".\"))\n\nfrom docutils.nodes import Text\nfrom sphinx.addnodes import pending_xref\n\nimport mlflow\nimport languagesections\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n \"sphinx.ext.autodoc\",\n \"sphinx.ext.viewcode\",\n \"sphinx.ext.napoleon\",\n \"sphinx_click.ext\",\n \"test_code_block\",\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n# source_suffix = ['.rst', '.md']\nsource_suffix = \".rst\"\n\n# The encoding of source files.\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n# General information about the project.\nproject = \"MLflow\"\ncopyright = \"MLflow Project, a Series of LF Projects, LLC. All rights reserved\"\nauthor = \"MLflow\"\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n\nimport mlflow.version\n\n# The short X.Y version.\nversion = mlflow.version.VERSION\n# The full version, including alpha/beta/rc tags.\nrelease = mlflow.version.VERSION\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n# today = ''\n# Else, today_fmt is used as the format for a strftime call.\n# today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = []\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n# show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = \"sphinx\"\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n# keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages. See the documentation for\n# a list of builtin themes.\n\nhtml_context = {\n \"gtm_id\": os.environ.get(\"GTM_ID\", \"\"),\n}\n\nhtml_theme_path = [\"../theme/\"]\nhtml_theme = \"mlflow\"\nhtml_favicon = \"_static/favicon.ico\"\n\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further. For a list of options available for each theme, see the\n# documentation.\n# html_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\n# html_theme_path = []\n\n# The name for this set of Sphinx documents.\n# \"<project> v<release> documentation\" by default.\n# html_title = 'MLflow v0.0.1'\n\n# A shorter title for the navigation bar. Default is the same as html_title.\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n# html_logo = None\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n# html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\n# Add any extra paths that contain custom files (such as robots.txt or\n# .htaccess) here, relative to this directory. These files are copied\n# directly to the root of the documentation.\n# html_extra_path = []\n\n# If not None, a 'Last updated on:' timestamp is inserted at every page\n# bottom, using the given strftime format.\n# The empty string is equivalent to '%b %d, %Y'.\n# html_last_updated_fmt = None\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n# html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n# html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n# html_additional_pages = {}\n\n# If false, no module index is generated.\n# html_domain_indices = True\n\n# If false, no index is generated.\n# html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n# html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\nhtml_show_sourcelink = False\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\nhtml_show_sphinx = False\n\nhtml_permalinks_icon = \" \"\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n# html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it. The value of this option must be the\n# base URL from which the finished HTML is served.\n# html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n# html_file_suffix = None\n\n# Language to be used for generating the HTML full-text search index.\n# Sphinx supports the following languages:\n# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'\n# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'\n# html_search_language = 'en'\n\n# A dictionary with options for the search language support, empty by default.\n# 'ja' uses this config value.\n# 'zh' user can custom change `jieba` dictionary path.\n# html_search_options = {'type': 'default'}\n\n# The name of a javascript file (relative to the configuration directory) that\n# implements a search results scorer. If empty, the default will be used.\n# html_search_scorer = 'scorer.js'\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"MLflowdoc\"\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n # The paper size ('letterpaper' or 'a4paper').\n # 'papersize': 'letterpaper',\n # The font size ('10pt', '11pt' or '12pt').\n # 'pointsize': '10pt',\n # Additional stuff for the LaTeX preamble.\n # 'preamble': '',\n # Latex figure (float) alignment\n # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n# author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n (master_doc, \"MLflow.tex\", \"MLflow Documentation\", \"Databricks\", \"manual\"),\n]\n\n# Mock torch & fastai imports as per suggestion in\n# https://github.com/sphinx-doc/sphinx/issues/6521#issuecomment-505765893\nautodoc_mock_imports = [\"torch\", \"fastai\"]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n# latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n# latex_use_parts = False\n\n# If true, show page references after internal links.\n# latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n# latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n# latex_appendices = []\n\n# If false, no module index is generated.\n# latex_domain_indices = True\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [(master_doc, \"MLflow\", \"MLflow Documentation\", [author], 1)]\n\n# If true, show URL addresses after external links.\n# man_show_urls = False\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n# dir menu entry, description, category)\ntexinfo_documents = [\n (\n master_doc,\n \"MLflow\",\n \"MLflow Documentation\",\n author,\n \"MLflow\",\n \"End-to-end machine learning toolkit.\",\n \"Miscellaneous\",\n ),\n]\n\n# Documents to append as an appendix to all manuals.\n# texinfo_appendices = []\n\n# If false, no module index is generated.\n# texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n# texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n# texinfo_no_detailmenu = False\n\n# Enable nitpicky mode to log warnings for broken references\nnitpicky = True\nnitpick_ignore = [\n # Ignore a missing reference in `mlflow/store/entities/paged_list.py`\n (\"py:class\", \"T\"),\n # Ignore \"parent class reference not found\" errors for subclasses of ``object``\n (\"py:class\", \"object\"),\n (\"py:class\", \"enum.Enum\"),\n (\"py:class\", \"bytes\"),\n (\"py:class\", \"bytearray\"),\n # Suppress warnings for missing references in type annotations\n (\"py:class\", \"numpy.dtype\"),\n (\"py:class\", \"numpy.ndarray\"),\n (\"py:class\", \"pandas.core.series.Series\"),\n (\"py:class\", \"pandas.core.frame.DataFrame\"),\n (\"py:class\", \"pandas.DataFrame\"),\n (\"py:class\", \"pyspark.sql.dataframe.DataFrame\"),\n (\"py:class\", \"matplotlib.figure.Figure\"),\n (\"py:class\", \"plotly.graph_objects.Figure\"),\n (\"py:class\", \"PIL.Image.Image\"),\n (\"py:class\", \"mlflow.deployments.base.BaseDeploymentClient\"),\n (\"py:class\", \"mlflow.types.schema.DataType\"),\n (\"py:class\", \"mlflow.types.schema.ColSpec\"),\n (\"py:class\", \"mlflow.types.schema.TensorSpec\"),\n (\"py:class\", \"mlflow.types.schema.Schema\"),\n (\"py:class\", \"mlflow.types.schema.ParamSchema\"),\n (\"py:class\", \"mlflow.types.schema.ParamSpec\"),\n (\"py:class\", \"mlflow.models.model.Model\"),\n (\"py:class\", \"mlflow.models.signature.ModelSignature\"),\n (\"py:class\", \"MlflowInferableDataset\"),\n (\"py:class\", \"csr_matrix\"),\n (\"py:class\", \"csc_matrix\"),\n (\"py:class\", \"scipy.sparse.csr.csr_matrix\"),\n (\"py:class\", \"scipy.sparse.csc.csc_matrix\"),\n (\"py:class\", \"scipy.sparse._csr.csr_matrix\"),\n (\"py:class\", \"scipy.sparse._csc.csc_matrix\"),\n (\"py:class\", \"pathlib.Path\"),\n (\"py:class\", \"pydantic.main.BaseModel\"),\n]\n\n\ndef _get_reference_map():\n \"\"\"\n Sphinx computes references for type annotations using fully-qualified classnames,\n so references in undocumented modules (even if the referenced object is exposed via\n a different module from the one it's defined in) are considered invalid by Sphinx.\n\n Example:\n ```\n def start_run(...) -> ActiveRun:\n # ActiveRun is defined in `mlflow/tracking/fluent.py`\n ...\n ```\n\n For this code, Sphinx tries to create a link for `ActiveRun` using\n `mlflow.tracking.fluent.ActiveRun` as a reference target, but the module\n `mlflow.tracking.fluent` is undocumented, so Sphinx raises this warning:\n `WARNING: py:class reference target not found: mlflow.tracking.fluent.ActiveRun`.\n As a workaround, replace `mlflow.tracking.fluent.ActiveRun` with `mlflow.ActiveRun`.\n \"\"\"\n ref_map = {\n # < Invalid reference >: < valid reference >\n \"mlflow.tracking.fluent.ActiveRun\": \"mlflow.ActiveRun\",\n \"mlflow.store.entities.paged_list.PagedList\": \"mlflow.store.entities.PagedList\",\n }\n\n # Tracking entities\n for entity_name in mlflow.entities.__all__:\n entity_cls = getattr(mlflow.entities, entity_name)\n invalid_ref = entity_cls.__module__ + \".\" + entity_name\n valid_ref = \"mlflow.entities.{}\".format(entity_name)\n ref_map[invalid_ref] = valid_ref\n\n # Model registry entities\n for entity_name in mlflow.entities.model_registry.__all__:\n entity_cls = getattr(mlflow.entities.model_registry, entity_name)\n invalid_ref = entity_cls.__module__ + \".\" + entity_name\n valid_ref = \"mlflow.entities.model_registry.{}\".format(entity_name)\n ref_map[invalid_ref] = valid_ref\n\n return ref_map\n\n\nREFERENCE_MAP = _get_reference_map()\n\n\ndef resolve_missing_references(app, doctree):\n for node in doctree.traverse(condition=pending_xref):\n missing_ref = node.get(\"reftarget\", None)\n if missing_ref is not None and missing_ref in REFERENCE_MAP:\n real_ref = REFERENCE_MAP[missing_ref]\n text_to_render = real_ref.split(\".\")[-1]\n node[\"reftarget\"] = real_ref\n text_node = next(iter(node.traverse(lambda n: n.tagname == \"#text\")))\n text_node.parent.replace(text_node, Text(text_to_render, \"\"))\n\n\ndef setup(app):\n languagesections.setup(app)\n app.connect(\"doctree-read\", resolve_missing_references)\n\n\nlinkcheck_ignore = [\n # Ignore local URLs when validating external links\n r\"http://localhost:\\d+/?\",\n]\n", "path": "docs/source/conf.py" } ]
[ { "content": "#\n# MLflow documentation build configuration file, created by\n# cookiecutter pipproject\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport sys\nimport os\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nsys.path.insert(0, os.path.abspath(\"../..\"))\nsys.path.insert(0, os.path.abspath(\".\"))\n\nfrom docutils.nodes import Text\nfrom sphinx.addnodes import pending_xref\n\nimport mlflow\nimport languagesections\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n \"sphinx.ext.autodoc\",\n \"sphinx.ext.viewcode\",\n \"sphinx.ext.napoleon\",\n \"sphinx_click.ext\",\n \"test_code_block\",\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n# source_suffix = ['.rst', '.md']\nsource_suffix = \".rst\"\n\n# The encoding of source files.\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n# General information about the project.\nproject = \"MLflow\"\ncopyright = \"MLflow Project, a Series of LF Projects, LLC. All rights reserved\"\nauthor = \"MLflow\"\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n\nimport mlflow.version\n\n# The short X.Y version.\nversion = mlflow.version.VERSION\n# The full version, including alpha/beta/rc tags.\nrelease = mlflow.version.VERSION\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n# today = ''\n# Else, today_fmt is used as the format for a strftime call.\n# today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = []\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n# show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = \"sphinx\"\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n# keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages. See the documentation for\n# a list of builtin themes.\n\nhtml_context = {\n \"gtm_id\": os.environ.get(\"GTM_ID\", \"\"),\n}\n\nhtml_theme_path = [\"../theme/\"]\nhtml_theme = \"mlflow\"\nhtml_favicon = \"_static/favicon.ico\"\n\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further. For a list of options available for each theme, see the\n# documentation.\n# html_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\n# html_theme_path = []\n\n# The name for this set of Sphinx documents.\n# \"<project> v<release> documentation\" by default.\n# html_title = 'MLflow v0.0.1'\n\n# A shorter title for the navigation bar. Default is the same as html_title.\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n# html_logo = None\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n# html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\n# Add any extra paths that contain custom files (such as robots.txt or\n# .htaccess) here, relative to this directory. These files are copied\n# directly to the root of the documentation.\n# html_extra_path = []\n\n# If not None, a 'Last updated on:' timestamp is inserted at every page\n# bottom, using the given strftime format.\n# The empty string is equivalent to '%b %d, %Y'.\n# html_last_updated_fmt = None\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n# html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n# html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n# html_additional_pages = {}\n\n# If false, no module index is generated.\n# html_domain_indices = True\n\n# If false, no index is generated.\n# html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n# html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\nhtml_show_sourcelink = False\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\nhtml_show_sphinx = False\n\nhtml_permalinks_icon = \" \"\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n# html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it. The value of this option must be the\n# base URL from which the finished HTML is served.\n# html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n# html_file_suffix = None\n\n# Language to be used for generating the HTML full-text search index.\n# Sphinx supports the following languages:\n# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'\n# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'\n# html_search_language = 'en'\n\n# A dictionary with options for the search language support, empty by default.\n# 'ja' uses this config value.\n# 'zh' user can custom change `jieba` dictionary path.\n# html_search_options = {'type': 'default'}\n\n# The name of a javascript file (relative to the configuration directory) that\n# implements a search results scorer. If empty, the default will be used.\n# html_search_scorer = 'scorer.js'\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"MLflowdoc\"\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n # The paper size ('letterpaper' or 'a4paper').\n # 'papersize': 'letterpaper',\n # The font size ('10pt', '11pt' or '12pt').\n # 'pointsize': '10pt',\n # Additional stuff for the LaTeX preamble.\n # 'preamble': '',\n # Latex figure (float) alignment\n # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n# author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n (master_doc, \"MLflow.tex\", \"MLflow Documentation\", \"Databricks\", \"manual\"),\n]\n\n# Mock torch & fastai imports as per suggestion in\n# https://github.com/sphinx-doc/sphinx/issues/6521#issuecomment-505765893\nautodoc_mock_imports = [\"torch\", \"fastai\"]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n# latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n# latex_use_parts = False\n\n# If true, show page references after internal links.\n# latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n# latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n# latex_appendices = []\n\n# If false, no module index is generated.\n# latex_domain_indices = True\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [(master_doc, \"MLflow\", \"MLflow Documentation\", [author], 1)]\n\n# If true, show URL addresses after external links.\n# man_show_urls = False\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n# dir menu entry, description, category)\ntexinfo_documents = [\n (\n master_doc,\n \"MLflow\",\n \"MLflow Documentation\",\n author,\n \"MLflow\",\n \"End-to-end machine learning toolkit.\",\n \"Miscellaneous\",\n ),\n]\n\n# Documents to append as an appendix to all manuals.\n# texinfo_appendices = []\n\n# If false, no module index is generated.\n# texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n# texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n# texinfo_no_detailmenu = False\n\n# Enable nitpicky mode to log warnings for broken references\nnitpicky = True\nnitpick_ignore = [\n # Ignore a missing reference in `mlflow/store/entities/paged_list.py`\n (\"py:class\", \"T\"),\n # Ignore \"parent class reference not found\" errors for subclasses of ``object``\n (\"py:class\", \"object\"),\n (\"py:class\", \"enum.Enum\"),\n (\"py:class\", \"bytes\"),\n (\"py:class\", \"bytearray\"),\n # Suppress warnings for missing references in type annotations\n (\"py:class\", \"numpy.dtype\"),\n (\"py:class\", \"numpy.ndarray\"),\n (\"py:class\", \"pandas.core.series.Series\"),\n (\"py:class\", \"pandas.core.frame.DataFrame\"),\n (\"py:class\", \"pandas.DataFrame\"),\n (\"py:class\", \"pyspark.sql.dataframe.DataFrame\"),\n (\"py:class\", \"matplotlib.figure.Figure\"),\n (\"py:class\", \"plotly.graph_objects.Figure\"),\n (\"py:class\", \"PIL.Image.Image\"),\n (\"py:class\", \"mlflow.deployments.base.BaseDeploymentClient\"),\n (\"py:class\", \"mlflow.types.schema.DataType\"),\n (\"py:class\", \"mlflow.types.schema.ColSpec\"),\n (\"py:class\", \"mlflow.types.schema.TensorSpec\"),\n (\"py:class\", \"mlflow.types.schema.Schema\"),\n (\"py:class\", \"mlflow.types.schema.ParamSchema\"),\n (\"py:class\", \"mlflow.types.schema.ParamSpec\"),\n (\"py:class\", \"mlflow.models.model.Model\"),\n (\"py:class\", \"mlflow.models.signature.ModelSignature\"),\n (\"py:class\", \"MlflowInferableDataset\"),\n (\"py:class\", \"csr_matrix\"),\n (\"py:class\", \"csc_matrix\"),\n (\"py:class\", \"scipy.sparse.csr.csr_matrix\"),\n (\"py:class\", \"scipy.sparse.csc.csc_matrix\"),\n (\"py:class\", \"scipy.sparse._csr.csr_matrix\"),\n (\"py:class\", \"scipy.sparse._csc.csc_matrix\"),\n (\"py:class\", \"pathlib.Path\"),\n (\"py:class\", \"pydantic.main.BaseModel\"),\n]\n\n\ndef _get_reference_map():\n \"\"\"\n Sphinx computes references for type annotations using fully-qualified classnames,\n so references in undocumented modules (even if the referenced object is exposed via\n a different module from the one it's defined in) are considered invalid by Sphinx.\n\n Example:\n ```\n def start_run(...) -> ActiveRun:\n # ActiveRun is defined in `mlflow/tracking/fluent.py`\n ...\n ```\n\n For this code, Sphinx tries to create a link for `ActiveRun` using\n `mlflow.tracking.fluent.ActiveRun` as a reference target, but the module\n `mlflow.tracking.fluent` is undocumented, so Sphinx raises this warning:\n `WARNING: py:class reference target not found: mlflow.tracking.fluent.ActiveRun`.\n As a workaround, replace `mlflow.tracking.fluent.ActiveRun` with `mlflow.ActiveRun`.\n \"\"\"\n ref_map = {\n # < Invalid reference >: < valid reference >\n \"mlflow.tracking.fluent.ActiveRun\": \"mlflow.ActiveRun\",\n \"mlflow.store.entities.paged_list.PagedList\": \"mlflow.store.entities.PagedList\",\n }\n\n # Tracking entities\n for entity_name in mlflow.entities.__all__:\n entity_cls = getattr(mlflow.entities, entity_name)\n invalid_ref = entity_cls.__module__ + \".\" + entity_name\n valid_ref = \"mlflow.entities.{}\".format(entity_name)\n ref_map[invalid_ref] = valid_ref\n\n # Model registry entities\n for entity_name in mlflow.entities.model_registry.__all__:\n entity_cls = getattr(mlflow.entities.model_registry, entity_name)\n invalid_ref = entity_cls.__module__ + \".\" + entity_name\n valid_ref = \"mlflow.entities.model_registry.{}\".format(entity_name)\n ref_map[invalid_ref] = valid_ref\n\n return ref_map\n\n\nREFERENCE_MAP = _get_reference_map()\n\n\ndef resolve_missing_references(app, doctree):\n for node in doctree.traverse(condition=pending_xref):\n missing_ref = node.get(\"reftarget\", None)\n if missing_ref is not None and missing_ref in REFERENCE_MAP:\n real_ref = REFERENCE_MAP[missing_ref]\n text_to_render = real_ref.split(\".\")[-1]\n node[\"reftarget\"] = real_ref\n text_node = next(iter(node.traverse(lambda n: n.tagname == \"#text\")))\n text_node.parent.replace(text_node, Text(text_to_render, \"\"))\n\n\ndef setup(app):\n languagesections.setup(app)\n app.connect(\"doctree-read\", resolve_missing_references)\n\n\nlinkcheck_ignore = [\n # Ignore local URLs when validating external links\n r\"http://localhost:\\d+/?\",\n]\n", "path": "docs/source/conf.py" } ]
diff --git a/docs/source/conf.py b/docs/source/conf.py index 6659cf6e0550f..d8ee88a262e3c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 # # MLflow documentation build configuration file, created by # cookiecutter pipproject diff --git a/tests/utils/test_file_utils.py b/tests/utils/test_file_utils.py index 0b065191d48ea..049b7d00e11a0 100644 --- a/tests/utils/test_file_utils.py +++ b/tests/utils/test_file_utils.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import codecs import filecmp import hashlib
getsentry__sentry-5098
MYSQL_PWD not recognized as sensitive field In Sentry 8.11.0, the data key `MYSQL_PWD` is not treated as sensitive and is transmitted in cleartext and shown in the UI, while things that look like mysql connection string are rendered as `mysql://readonly:[Filtered]@db1.example.com/` MYSQL_PWD is the standard way of providing a password to mysql cli tools, and I'd argue any field that ends in _PWD is unsafe.
[ { "content": "\"\"\"\nsentry.constants\n~~~~~~~~~~~~~~~~\n\nThese settings act as the default (base) settings for the Sentry-provided\nweb-server\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\nfrom __future__ import absolute_import, print_function\n\nimport logging\nimport os.path\nimport six\n\nfrom collections import OrderedDict\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\nfrom operator import attrgetter\n\n\ndef get_all_languages():\n results = []\n for path in os.listdir(os.path.join(MODULE_ROOT, 'locale')):\n if path.startswith('.'):\n continue\n if '_' in path:\n pre, post = path.split('_', 1)\n path = '{}-{}'.format(pre, post.lower())\n results.append(path)\n return results\n\nMODULE_ROOT = os.path.dirname(__import__('sentry').__file__)\nDATA_ROOT = os.path.join(MODULE_ROOT, 'data')\n\nSORT_OPTIONS = OrderedDict((\n ('priority', _('Priority')),\n ('date', _('Last Seen')),\n ('new', _('First Seen')),\n ('freq', _('Frequency')),\n))\n\nSEARCH_SORT_OPTIONS = OrderedDict((\n ('score', _('Score')),\n ('date', _('Last Seen')),\n ('new', _('First Seen')),\n))\n\n# XXX: Deprecated: use GroupStatus instead\nSTATUS_UNRESOLVED = 0\nSTATUS_RESOLVED = 1\nSTATUS_IGNORED = 2\n\nSTATUS_CHOICES = {\n 'resolved': STATUS_RESOLVED,\n 'unresolved': STATUS_UNRESOLVED,\n 'ignored': STATUS_IGNORED,\n\n # TODO(dcramer): remove in 9.0\n 'muted': STATUS_IGNORED,\n}\n\n# Normalize counts to the 15 minute marker. This value MUST be less than 60. A\n# value of 0 would store counts for every minute, and is the lowest level of\n# accuracy provided.\nMINUTE_NORMALIZATION = 15\n\nMAX_TAG_KEY_LENGTH = 32\nMAX_TAG_VALUE_LENGTH = 200\nMAX_CULPRIT_LENGTH = 200\nMAX_EMAIL_FIELD_LENGTH = 75\n\n# Team slugs which may not be used. Generally these are top level URL patterns\n# which we don't want to worry about conflicts on.\nRESERVED_ORGANIZATION_SLUGS = frozenset((\n 'admin', 'manage', 'login', 'account', 'register', 'api',\n 'accept', 'organizations', 'teams', 'projects', 'help',\n 'docs', 'logout', '404', '500', '_static', 'out', 'debug',\n 'remote', 'get-cli', 'blog', 'welcome', 'features',\n 'customers', 'integrations', 'signup', 'pricing',\n 'subscribe', 'enterprise', 'about', 'jobs', 'thanks', 'guide',\n 'privacy', 'security', 'terms', 'from', 'sponsorship', 'for',\n 'at', 'platforms', 'branding', 'vs', 'answers', '_admin',\n 'support',\n))\n\nLOG_LEVELS = {\n logging.DEBUG: 'debug',\n logging.INFO: 'info',\n logging.WARNING: 'warning',\n logging.ERROR: 'error',\n logging.FATAL: 'fatal',\n}\nDEFAULT_LOG_LEVEL = 'error'\nDEFAULT_LOGGER_NAME = ''\nLOG_LEVELS_MAP = {v: k for k, v in six.iteritems(LOG_LEVELS)}\n\n\n# Default alerting threshold values\nDEFAULT_ALERT_PROJECT_THRESHOLD = (500, 25) # 500%, 25 events\nDEFAULT_ALERT_GROUP_THRESHOLD = (1000, 25) # 1000%, 25 events\n\n# Default paginator value\nEVENTS_PER_PAGE = 15\n\n# Default sort option for the group stream\nDEFAULT_SORT_OPTION = 'date'\n\n# Setup languages for only available locales\nLANGUAGE_MAP = dict(settings.LANGUAGES)\nLANGUAGES = [(k, LANGUAGE_MAP[k]) for k in get_all_languages() if k in LANGUAGE_MAP]\n\n# TODO(dcramer): We eventually want to make this user-editable\nTAG_LABELS = {\n 'exc_type': 'Exception Type',\n 'sentry:user': 'User',\n 'sentry:filename': 'File',\n 'sentry:function': 'Function',\n 'sentry:release': 'Release',\n 'os': 'OS',\n 'url': 'URL',\n 'server_name': 'Server',\n}\n\n# TODO(dcramer): once this is more flushed out we want this to be extendable\nSENTRY_RULES = (\n 'sentry.rules.actions.notify_event.NotifyEventAction',\n 'sentry.rules.actions.notify_event_service.NotifyEventServiceAction',\n 'sentry.rules.conditions.every_event.EveryEventCondition',\n 'sentry.rules.conditions.first_seen_event.FirstSeenEventCondition',\n 'sentry.rules.conditions.regression_event.RegressionEventCondition',\n 'sentry.rules.conditions.tagged_event.TaggedEventCondition',\n 'sentry.rules.conditions.event_frequency.EventFrequencyCondition',\n 'sentry.rules.conditions.event_frequency.EventUniqueUserFrequencyCondition',\n 'sentry.rules.conditions.event_attribute.EventAttributeCondition',\n 'sentry.rules.conditions.level.LevelCondition',\n)\n\n# methods as defined by http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html + PATCH\nHTTP_METHODS = ('GET', 'POST', 'PUT', 'OPTIONS', 'HEAD', 'DELETE', 'TRACE', 'CONNECT', 'PATCH')\n\nCLIENT_RESERVED_ATTRS = (\n 'project',\n 'errors',\n 'event_id',\n 'message',\n 'checksum',\n 'culprit',\n 'fingerprint',\n 'level',\n 'time_spent',\n 'logger',\n 'server_name',\n 'site',\n 'received',\n 'timestamp',\n 'extra',\n 'modules',\n 'tags',\n 'platform',\n 'release',\n 'environment',\n)\n\nDEFAULT_SCRUBBED_FIELDS = (\n 'password',\n 'secret',\n 'passwd',\n 'authorization',\n 'api_key',\n 'apikey',\n 'access_token',\n 'auth',\n 'credentials',\n)\n\nVALID_PLATFORMS = set([\n 'as3',\n 'c',\n 'cfml',\n 'cocoa',\n 'csharp',\n 'go',\n 'java',\n 'javascript',\n 'node',\n 'objc',\n 'other',\n 'perl',\n 'php',\n 'python',\n 'ruby',\n 'elixir',\n 'haskell',\n 'groovy',\n])\n\nOK_PLUGIN_ENABLED = _(\"The {name} integration has been enabled.\")\n\nOK_PLUGIN_DISABLED = _(\"The {name} integration has been disabled.\")\n\nOK_PLUGIN_SAVED = _('Configuration for the {name} integration has been saved.')\n\nWARN_SESSION_EXPIRED = 'Your session has expired.' # TODO: translate this\n\n# Key to use when ordering a list of events manually\nEVENT_ORDERING_KEY = attrgetter('datetime', 'id')\n\nFILTER_MASK = '[Filtered]'\n\n# Maximum length of a symbol\nMAX_SYM = 256\n\n# Known dsym mimetypes\nKNOWN_DSYM_TYPES = {\n 'application/x-mach-binary': 'macho'\n}\n\nNATIVE_UNKNOWN_STRING = '<unknown>'\n\n\nclass ObjectStatus(object):\n VISIBLE = 0\n HIDDEN = 1\n PENDING_DELETION = 2\n DELETION_IN_PROGRESS = 3\n\n @classmethod\n def as_choices(cls):\n return (\n (cls.VISIBLE, 'visible'),\n (cls.HIDDEN, 'hidden'),\n (cls.PENDING_DELETION, 'pending_deletion'),\n (cls.DELETION_IN_PROGRESS, 'deletion_in_progress'),\n )\n", "path": "src/sentry/constants.py" } ]
[ { "content": "\"\"\"\nsentry.constants\n~~~~~~~~~~~~~~~~\n\nThese settings act as the default (base) settings for the Sentry-provided\nweb-server\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\nfrom __future__ import absolute_import, print_function\n\nimport logging\nimport os.path\nimport six\n\nfrom collections import OrderedDict\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\nfrom operator import attrgetter\n\n\ndef get_all_languages():\n results = []\n for path in os.listdir(os.path.join(MODULE_ROOT, 'locale')):\n if path.startswith('.'):\n continue\n if '_' in path:\n pre, post = path.split('_', 1)\n path = '{}-{}'.format(pre, post.lower())\n results.append(path)\n return results\n\nMODULE_ROOT = os.path.dirname(__import__('sentry').__file__)\nDATA_ROOT = os.path.join(MODULE_ROOT, 'data')\n\nSORT_OPTIONS = OrderedDict((\n ('priority', _('Priority')),\n ('date', _('Last Seen')),\n ('new', _('First Seen')),\n ('freq', _('Frequency')),\n))\n\nSEARCH_SORT_OPTIONS = OrderedDict((\n ('score', _('Score')),\n ('date', _('Last Seen')),\n ('new', _('First Seen')),\n))\n\n# XXX: Deprecated: use GroupStatus instead\nSTATUS_UNRESOLVED = 0\nSTATUS_RESOLVED = 1\nSTATUS_IGNORED = 2\n\nSTATUS_CHOICES = {\n 'resolved': STATUS_RESOLVED,\n 'unresolved': STATUS_UNRESOLVED,\n 'ignored': STATUS_IGNORED,\n\n # TODO(dcramer): remove in 9.0\n 'muted': STATUS_IGNORED,\n}\n\n# Normalize counts to the 15 minute marker. This value MUST be less than 60. A\n# value of 0 would store counts for every minute, and is the lowest level of\n# accuracy provided.\nMINUTE_NORMALIZATION = 15\n\nMAX_TAG_KEY_LENGTH = 32\nMAX_TAG_VALUE_LENGTH = 200\nMAX_CULPRIT_LENGTH = 200\nMAX_EMAIL_FIELD_LENGTH = 75\n\n# Team slugs which may not be used. Generally these are top level URL patterns\n# which we don't want to worry about conflicts on.\nRESERVED_ORGANIZATION_SLUGS = frozenset((\n 'admin', 'manage', 'login', 'account', 'register', 'api',\n 'accept', 'organizations', 'teams', 'projects', 'help',\n 'docs', 'logout', '404', '500', '_static', 'out', 'debug',\n 'remote', 'get-cli', 'blog', 'welcome', 'features',\n 'customers', 'integrations', 'signup', 'pricing',\n 'subscribe', 'enterprise', 'about', 'jobs', 'thanks', 'guide',\n 'privacy', 'security', 'terms', 'from', 'sponsorship', 'for',\n 'at', 'platforms', 'branding', 'vs', 'answers', '_admin',\n 'support',\n))\n\nLOG_LEVELS = {\n logging.DEBUG: 'debug',\n logging.INFO: 'info',\n logging.WARNING: 'warning',\n logging.ERROR: 'error',\n logging.FATAL: 'fatal',\n}\nDEFAULT_LOG_LEVEL = 'error'\nDEFAULT_LOGGER_NAME = ''\nLOG_LEVELS_MAP = {v: k for k, v in six.iteritems(LOG_LEVELS)}\n\n\n# Default alerting threshold values\nDEFAULT_ALERT_PROJECT_THRESHOLD = (500, 25) # 500%, 25 events\nDEFAULT_ALERT_GROUP_THRESHOLD = (1000, 25) # 1000%, 25 events\n\n# Default paginator value\nEVENTS_PER_PAGE = 15\n\n# Default sort option for the group stream\nDEFAULT_SORT_OPTION = 'date'\n\n# Setup languages for only available locales\nLANGUAGE_MAP = dict(settings.LANGUAGES)\nLANGUAGES = [(k, LANGUAGE_MAP[k]) for k in get_all_languages() if k in LANGUAGE_MAP]\n\n# TODO(dcramer): We eventually want to make this user-editable\nTAG_LABELS = {\n 'exc_type': 'Exception Type',\n 'sentry:user': 'User',\n 'sentry:filename': 'File',\n 'sentry:function': 'Function',\n 'sentry:release': 'Release',\n 'os': 'OS',\n 'url': 'URL',\n 'server_name': 'Server',\n}\n\n# TODO(dcramer): once this is more flushed out we want this to be extendable\nSENTRY_RULES = (\n 'sentry.rules.actions.notify_event.NotifyEventAction',\n 'sentry.rules.actions.notify_event_service.NotifyEventServiceAction',\n 'sentry.rules.conditions.every_event.EveryEventCondition',\n 'sentry.rules.conditions.first_seen_event.FirstSeenEventCondition',\n 'sentry.rules.conditions.regression_event.RegressionEventCondition',\n 'sentry.rules.conditions.tagged_event.TaggedEventCondition',\n 'sentry.rules.conditions.event_frequency.EventFrequencyCondition',\n 'sentry.rules.conditions.event_frequency.EventUniqueUserFrequencyCondition',\n 'sentry.rules.conditions.event_attribute.EventAttributeCondition',\n 'sentry.rules.conditions.level.LevelCondition',\n)\n\n# methods as defined by http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html + PATCH\nHTTP_METHODS = ('GET', 'POST', 'PUT', 'OPTIONS', 'HEAD', 'DELETE', 'TRACE', 'CONNECT', 'PATCH')\n\nCLIENT_RESERVED_ATTRS = (\n 'project',\n 'errors',\n 'event_id',\n 'message',\n 'checksum',\n 'culprit',\n 'fingerprint',\n 'level',\n 'time_spent',\n 'logger',\n 'server_name',\n 'site',\n 'received',\n 'timestamp',\n 'extra',\n 'modules',\n 'tags',\n 'platform',\n 'release',\n 'environment',\n)\n\nDEFAULT_SCRUBBED_FIELDS = (\n 'password',\n 'secret',\n 'passwd',\n 'authorization',\n 'api_key',\n 'apikey',\n 'access_token',\n 'auth',\n 'credentials',\n 'mysql_pwd',\n)\n\nVALID_PLATFORMS = set([\n 'as3',\n 'c',\n 'cfml',\n 'cocoa',\n 'csharp',\n 'go',\n 'java',\n 'javascript',\n 'node',\n 'objc',\n 'other',\n 'perl',\n 'php',\n 'python',\n 'ruby',\n 'elixir',\n 'haskell',\n 'groovy',\n])\n\nOK_PLUGIN_ENABLED = _(\"The {name} integration has been enabled.\")\n\nOK_PLUGIN_DISABLED = _(\"The {name} integration has been disabled.\")\n\nOK_PLUGIN_SAVED = _('Configuration for the {name} integration has been saved.')\n\nWARN_SESSION_EXPIRED = 'Your session has expired.' # TODO: translate this\n\n# Key to use when ordering a list of events manually\nEVENT_ORDERING_KEY = attrgetter('datetime', 'id')\n\nFILTER_MASK = '[Filtered]'\n\n# Maximum length of a symbol\nMAX_SYM = 256\n\n# Known dsym mimetypes\nKNOWN_DSYM_TYPES = {\n 'application/x-mach-binary': 'macho'\n}\n\nNATIVE_UNKNOWN_STRING = '<unknown>'\n\n\nclass ObjectStatus(object):\n VISIBLE = 0\n HIDDEN = 1\n PENDING_DELETION = 2\n DELETION_IN_PROGRESS = 3\n\n @classmethod\n def as_choices(cls):\n return (\n (cls.VISIBLE, 'visible'),\n (cls.HIDDEN, 'hidden'),\n (cls.PENDING_DELETION, 'pending_deletion'),\n (cls.DELETION_IN_PROGRESS, 'deletion_in_progress'),\n )\n", "path": "src/sentry/constants.py" } ]
diff --git a/src/sentry/constants.py b/src/sentry/constants.py index 6de35f1385085c..62f67baa86ecfd 100644 --- a/src/sentry/constants.py +++ b/src/sentry/constants.py @@ -173,6 +173,7 @@ def get_all_languages(): 'access_token', 'auth', 'credentials', + 'mysql_pwd', ) VALID_PLATFORMS = set([ diff --git a/tests/sentry/utils/test_data_scrubber.py b/tests/sentry/utils/test_data_scrubber.py index d9667f390fca75..fc109a2df92639 100644 --- a/tests/sentry/utils/test_data_scrubber.py +++ b/tests/sentry/utils/test_data_scrubber.py @@ -366,3 +366,8 @@ def test_empty_field(self): proc = SensitiveDataFilter(fields=['']) proc.apply(data) assert data['extra'] == {'foobar': 'xxx'} + + def test_should_have_mysql_pwd_as_a_default(self): + proc = SensitiveDataFilter(include_defaults=True) + assert proc.sanitize('MYSQL_PWD', 'the one') == FILTER_MASK + assert proc.sanitize('mysql_pwd', 'the two') == FILTER_MASK
codespell-project__codespell-3157
Exit status is always 0 when started as a Python module When started as `python -m codespell_lib` codespell always exits with 0. Is it intentional?
[ { "content": "from ._codespell import _script_main\n\nif __name__ == \"__main__\":\n _script_main()\n", "path": "codespell_lib/__main__.py" } ]
[ { "content": "import sys\n\nfrom ._codespell import _script_main\n\nif __name__ == \"__main__\":\n sys.exit(_script_main())\n", "path": "codespell_lib/__main__.py" } ]
diff --git a/codespell_lib/__main__.py b/codespell_lib/__main__.py index bbadb84c5b..ecc82e092b 100644 --- a/codespell_lib/__main__.py +++ b/codespell_lib/__main__.py @@ -1,4 +1,6 @@ +import sys + from ._codespell import _script_main if __name__ == "__main__": - _script_main() + sys.exit(_script_main())
mlcommons__GaNDLF-747
Porting to PyTorch 2.0 **Is your feature request related to a problem? Please describe.** As PyTorch 2.0 is approaching its release and promising significant benefits, particularly in model compilation, it would be beneficial for GaNDLF to migrate to the platform once it becomes stable. To learn more about PyTorch 2.0, visit [here](https://pytorch.org/get-started/pytorch-2.0/). **Describe the solution you'd like** A transition after *tagging* GaNDLF to move to pytorch 2.0 **Describe alternatives you've considered** N.A. **Additional context** N.A.
[ { "content": "#!/usr/bin/env python\n\n\"\"\"The setup script.\"\"\"\n\n\nimport sys, re, os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.install import install\nfrom setuptools.command.develop import develop\nfrom setuptools.command.egg_info import egg_info\n\ntry:\n with open(\"README.md\") as readme_file:\n readme = readme_file.read()\nexcept Exception as error:\n readme = \"No README information found.\"\n sys.stderr.write(\n \"Warning: Could not open '%s' due %s\\n\" % (\"README.md\", error)\n )\n\n\nclass CustomInstallCommand(install):\n def run(self):\n install.run(self)\n\n\nclass CustomDevelopCommand(develop):\n def run(self):\n develop.run(self)\n\n\nclass CustomEggInfoCommand(egg_info):\n def run(self):\n egg_info.run(self)\n\n\ntry:\n filepath = \"GANDLF/version.py\"\n version_file = open(filepath)\n (__version__,) = re.findall('__version__ = \"(.*)\"', version_file.read())\n\nexcept Exception as error:\n __version__ = \"0.0.1\"\n sys.stderr.write(\n \"Warning: Could not open '%s' due %s\\n\" % (filepath, error)\n )\n\n# Handle cases where specific files need to be bundled into the final package as installed via PyPI\ndockerfiles = [\n item\n for item in os.listdir(os.path.dirname(os.path.abspath(__file__)))\n if (os.path.isfile(item) and item.startswith(\"Dockerfile-\"))\n]\nentrypoint_files = [\n item\n for item in os.listdir(os.path.dirname(os.path.abspath(__file__)))\n if (os.path.isfile(item) and item.startswith(\"gandlf_\"))\n]\nsetup_files = [\"setup.py\", \".dockerignore\", \"pyproject.toml\", \"MANIFEST.in\"]\nall_extra_files = dockerfiles + entrypoint_files + setup_files\nall_extra_files_pathcorrected = [\n os.path.join(\"../\", item) for item in all_extra_files\n]\n# find_packages should only ever find these as subpackages of gandlf, not as top-level packages\n# generate this dynamically?\n# GANDLF.GANDLF is needed to prevent recursion madness in deployments\ntoplevel_package_excludes = [\n \"GANDLF.GANDLF\",\n \"anonymize\",\n \"cli\",\n \"compute\",\n \"data\",\n \"grad_clipping\",\n \"losses\",\n \"metrics\",\n \"models\",\n \"optimizers\",\n \"schedulers\",\n \"utils\",\n]\n\n\nrequirements = [\n \"torch==1.13.1\",\n \"black==23.11.0\",\n \"numpy==1.25.0\",\n \"scipy\",\n \"SimpleITK!=2.0.*\",\n \"SimpleITK!=2.2.1\", # https://github.com/mlcommons/GaNDLF/issues/536\n \"torchvision\",\n \"tqdm\",\n \"torchio==0.18.75\",\n \"pandas>=2.0.0\",\n \"scikit-learn>=0.23.2\",\n \"scikit-image>=0.19.1\",\n \"setuptools\",\n \"seaborn\",\n \"pyyaml\",\n \"tiffslide\",\n \"matplotlib\",\n \"gdown\",\n \"pytest\",\n \"coverage\",\n \"pytest-cov\",\n \"psutil\",\n \"medcam\",\n \"opencv-python\",\n \"torchmetrics==1.1.2\",\n \"zarr==2.10.3\",\n \"pydicom\",\n \"onnx\",\n \"torchinfo==1.7.0\",\n \"segmentation-models-pytorch==0.3.2\",\n \"ACSConv==0.1.1\",\n \"docker\",\n \"dicom-anonymizer\",\n \"twine\",\n \"zarr\",\n \"keyring\",\n]\n\nif __name__ == \"__main__\":\n setup(\n name=\"GANDLF\",\n version=__version__,\n author=\"MLCommons\",\n author_email=\"[email protected]\",\n python_requires=\">=3.9, <3.11\",\n packages=find_packages(\n where=os.path.dirname(os.path.abspath(__file__)),\n exclude=toplevel_package_excludes,\n ),\n cmdclass={\n \"install\": CustomInstallCommand,\n \"develop\": CustomDevelopCommand,\n \"egg_info\": CustomEggInfoCommand,\n },\n scripts=[\n \"gandlf_run\",\n \"gandlf_constructCSV\",\n \"gandlf_collectStats\",\n \"gandlf_patchMiner\",\n \"gandlf_preprocess\",\n \"gandlf_anonymizer\",\n \"gandlf_verifyInstall\",\n \"gandlf_configGenerator\",\n \"gandlf_recoverConfig\",\n \"gandlf_deploy\",\n \"gandlf_optimizeModel\",\n \"gandlf_generateMetrics\",\n ],\n classifiers=[\n \"Development Status :: 3 - Alpha\",\n \"Intended Audience :: Science/Research\",\n \"License :: OSI Approved :: Apache Software License\",\n \"Natural Language :: English\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Topic :: Scientific/Engineering :: Medical Science Apps.\",\n ],\n description=(\n \"PyTorch-based framework that handles segmentation/regression/classification using various DL architectures for medical imaging.\"\n ),\n install_requires=requirements,\n license=\"Apache-2.0\",\n long_description=readme,\n long_description_content_type=\"text/markdown\",\n include_package_data=True,\n package_data={\"GANDLF\": all_extra_files_pathcorrected},\n keywords=\"semantic, segmentation, regression, classification, data-augmentation, medical-imaging, clinical-workflows, deep-learning, pytorch\",\n zip_safe=False,\n )\n", "path": "setup.py" } ]
[ { "content": "#!/usr/bin/env python\n\n\"\"\"The setup script.\"\"\"\n\n\nimport sys, re, os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.install import install\nfrom setuptools.command.develop import develop\nfrom setuptools.command.egg_info import egg_info\n\ntry:\n with open(\"README.md\") as readme_file:\n readme = readme_file.read()\nexcept Exception as error:\n readme = \"No README information found.\"\n sys.stderr.write(\n \"Warning: Could not open '%s' due %s\\n\" % (\"README.md\", error)\n )\n\n\nclass CustomInstallCommand(install):\n def run(self):\n install.run(self)\n\n\nclass CustomDevelopCommand(develop):\n def run(self):\n develop.run(self)\n\n\nclass CustomEggInfoCommand(egg_info):\n def run(self):\n egg_info.run(self)\n\n\ntry:\n filepath = \"GANDLF/version.py\"\n version_file = open(filepath)\n (__version__,) = re.findall('__version__ = \"(.*)\"', version_file.read())\n\nexcept Exception as error:\n __version__ = \"0.0.1\"\n sys.stderr.write(\n \"Warning: Could not open '%s' due %s\\n\" % (filepath, error)\n )\n\n# Handle cases where specific files need to be bundled into the final package as installed via PyPI\ndockerfiles = [\n item\n for item in os.listdir(os.path.dirname(os.path.abspath(__file__)))\n if (os.path.isfile(item) and item.startswith(\"Dockerfile-\"))\n]\nentrypoint_files = [\n item\n for item in os.listdir(os.path.dirname(os.path.abspath(__file__)))\n if (os.path.isfile(item) and item.startswith(\"gandlf_\"))\n]\nsetup_files = [\"setup.py\", \".dockerignore\", \"pyproject.toml\", \"MANIFEST.in\"]\nall_extra_files = dockerfiles + entrypoint_files + setup_files\nall_extra_files_pathcorrected = [\n os.path.join(\"../\", item) for item in all_extra_files\n]\n# find_packages should only ever find these as subpackages of gandlf, not as top-level packages\n# generate this dynamically?\n# GANDLF.GANDLF is needed to prevent recursion madness in deployments\ntoplevel_package_excludes = [\n \"GANDLF.GANDLF\",\n \"anonymize\",\n \"cli\",\n \"compute\",\n \"data\",\n \"grad_clipping\",\n \"losses\",\n \"metrics\",\n \"models\",\n \"optimizers\",\n \"schedulers\",\n \"utils\",\n]\n\n\nrequirements = [\n \"torch==2.1.0\",\n \"black==23.11.0\",\n \"numpy==1.25.0\",\n \"scipy\",\n \"SimpleITK!=2.0.*\",\n \"SimpleITK!=2.2.1\", # https://github.com/mlcommons/GaNDLF/issues/536\n \"torchvision\",\n \"tqdm\",\n \"torchio==0.18.75\",\n \"pandas>=2.0.0\",\n \"scikit-learn>=0.23.2\",\n \"scikit-image>=0.19.1\",\n \"setuptools\",\n \"seaborn\",\n \"pyyaml\",\n \"tiffslide\",\n \"matplotlib\",\n \"gdown\",\n \"pytest\",\n \"coverage\",\n \"pytest-cov\",\n \"psutil\",\n \"medcam\",\n \"opencv-python\",\n \"torchmetrics==1.1.2\",\n \"zarr==2.10.3\",\n \"pydicom\",\n \"onnx\",\n \"torchinfo==1.7.0\",\n \"segmentation-models-pytorch==0.3.2\",\n \"ACSConv==0.1.1\",\n \"docker\",\n \"dicom-anonymizer\",\n \"twine\",\n \"zarr\",\n \"keyring\",\n]\n\nif __name__ == \"__main__\":\n setup(\n name=\"GANDLF\",\n version=__version__,\n author=\"MLCommons\",\n author_email=\"[email protected]\",\n python_requires=\">=3.9, <3.11\",\n packages=find_packages(\n where=os.path.dirname(os.path.abspath(__file__)),\n exclude=toplevel_package_excludes,\n ),\n cmdclass={\n \"install\": CustomInstallCommand,\n \"develop\": CustomDevelopCommand,\n \"egg_info\": CustomEggInfoCommand,\n },\n scripts=[\n \"gandlf_run\",\n \"gandlf_constructCSV\",\n \"gandlf_collectStats\",\n \"gandlf_patchMiner\",\n \"gandlf_preprocess\",\n \"gandlf_anonymizer\",\n \"gandlf_verifyInstall\",\n \"gandlf_configGenerator\",\n \"gandlf_recoverConfig\",\n \"gandlf_deploy\",\n \"gandlf_optimizeModel\",\n \"gandlf_generateMetrics\",\n ],\n classifiers=[\n \"Development Status :: 3 - Alpha\",\n \"Intended Audience :: Science/Research\",\n \"License :: OSI Approved :: Apache Software License\",\n \"Natural Language :: English\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Topic :: Scientific/Engineering :: Medical Science Apps.\",\n ],\n description=(\n \"PyTorch-based framework that handles segmentation/regression/classification using various DL architectures for medical imaging.\"\n ),\n install_requires=requirements,\n license=\"Apache-2.0\",\n long_description=readme,\n long_description_content_type=\"text/markdown\",\n include_package_data=True,\n package_data={\"GANDLF\": all_extra_files_pathcorrected},\n keywords=\"semantic, segmentation, regression, classification, data-augmentation, medical-imaging, clinical-workflows, deep-learning, pytorch\",\n zip_safe=False,\n )\n", "path": "setup.py" } ]
diff --git a/.devcontainer/onCreateCommand.sh b/.devcontainer/onCreateCommand.sh index bd69500a8..fe14726b0 100755 --- a/.devcontainer/onCreateCommand.sh +++ b/.devcontainer/onCreateCommand.sh @@ -5,4 +5,4 @@ pip install wheel pip install openvino-dev==2023.0.1 # [OPTIONAL] to generate optimized models for inference pip install mlcube_docker # [OPTIONAL] to deploy GaNDLF models as MLCube-compliant Docker containers pip install medmnist==2.1.0 -pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu +pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index e938ebaa8..fc79af237 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -6,7 +6,7 @@ # if runnning on a GPU machine, install the GPU version of pytorch if command -v nvidia-smi &> /dev/null then - pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116 + pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118 fi pip install -e . diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e7b67070e..92c5cde27 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -25,8 +25,8 @@ jobs: fail-fast: false # So that remaining jobs don't instantly quit if one fails (e.g, CPU/ROCm don't upload if CUDA just fails to push to ghcr...) matrix: include: # Platform locates Dockerfile ("Dockerfile-{PLATFORM}"), docker tag has to be all lowercase alphanumeric for mysterious docker reasons - - platform: CUDA11.6 - dockertag: cuda116 + - platform: CUDA11.8 + dockertag: cuda118 - platform: CPU dockertag: cpu # - platform: ROCm diff --git a/.github/workflows/mlcube-test.yml b/.github/workflows/mlcube-test.yml index 1c5b3e58c..5b7294dd1 100644 --- a/.github/workflows/mlcube-test.yml +++ b/.github/workflows/mlcube-test.yml @@ -73,7 +73,7 @@ jobs: python -m pip install --upgrade pip python -m pip install wheel python -m pip install openvino-dev==2023.0.1 mlcube_docker - pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu + pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu pip install -e . - name: Run mlcube deploy tests working-directory: ./testing diff --git a/.github/workflows/openfl-test.yml b/.github/workflows/openfl-test.yml index 99db48023..78867aadf 100644 --- a/.github/workflows/openfl-test.yml +++ b/.github/workflows/openfl-test.yml @@ -73,7 +73,7 @@ jobs: sudo apt-get install libvips libvips-tools -y python -m pip install --upgrade pip python -m pip install wheel - pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu + pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu pip install -e . - name: Run generic unit tests to download data and construct CSVs if: steps.changed-files-specific.outputs.only_modified == 'false' # Run on any non-docs change diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index efbabbdd9..1cb4cf254 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -74,7 +74,7 @@ jobs: python -m pip install --upgrade pip python -m pip install wheel python -m pip install openvino-dev==2023.0.1 mlcube_docker - pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu + pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu pip install -e . - name: Run generic unit tests if: steps.changed-files-specific.outputs.only_modified == 'false' # Run on any non-docs change diff --git a/Dockerfile-CPU b/Dockerfile-CPU index 0120f2af1..d06cc003a 100644 --- a/Dockerfile-CPU +++ b/Dockerfile-CPU @@ -9,7 +9,7 @@ RUN add-apt-repository ppa:deadsnakes/ppa RUN apt-get update && apt-get install -y python3.9 python3-pip libjpeg8-dev zlib1g-dev python3-dev libpython3.9-dev libffi-dev libgl1 RUN python3.9 -m pip install --upgrade pip # EXPLICITLY install cpu versions of torch/torchvision (not all versions have +cpu modes on PyPI...) -RUN python3.9 -m pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu +RUN python3.9 -m pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu RUN python3.9 -m pip install openvino-dev==2023.0.1 opencv-python-headless mlcube_docker # Do some dependency installation separately here to make layer caching more efficient diff --git a/Dockerfile-CUDA11.6 b/Dockerfile-CUDA11.8 similarity index 92% rename from Dockerfile-CUDA11.6 rename to Dockerfile-CUDA11.8 index db052592e..d8eb30b1a 100644 --- a/Dockerfile-CUDA11.6 +++ b/Dockerfile-CUDA11.8 @@ -1,4 +1,4 @@ -FROM nvidia/cuda:11.6.2-devel-ubuntu20.04 +FROM nvidia/cuda:11.8.0-devel-ubuntu20.04 LABEL github="https://github.com/mlcommons/GaNDLF" LABEL docs="https://mlcommons.github.io/GaNDLF/" LABEL version=1.0 @@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y software-properties-common RUN add-apt-repository ppa:deadsnakes/ppa RUN apt-get update && apt-get install -y python3.9 python3-pip libjpeg8-dev zlib1g-dev python3-dev libpython3.9-dev libffi-dev libgl1 RUN python3.9 -m pip install --upgrade pip -RUN python3.9 -m pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116 +RUN python3.9 -m pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118 RUN python3.9 -m pip install openvino-dev==2023.0.1 opencv-python-headless mlcube_docker # Do some dependency installation separately here to make layer caching more efficient diff --git a/Dockerfile-ROCm b/Dockerfile-ROCm index 9bbdaaa2b..81c0b04b3 100644 --- a/Dockerfile-ROCm +++ b/Dockerfile-ROCm @@ -1,4 +1,4 @@ -FROM rocm/pytorch:rocm5.2.3_ubuntu20.04_py3.7_pytorch_1.12.1 +FROM rocm/pytorch:rocm5.6_ubuntu20.04_py3.8_pytorch_1.12.1 LABEL github="https://github.com/mlcommons/GaNDLF" LABEL docs="https://mlcommons.github.io/GaNDLF/" LABEL version=1.0 @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y software-properties-common RUN add-apt-repository ppa:deadsnakes/ppa RUN apt-get update && apt-get install -y python3.9 python3-pip libjpeg8-dev zlib1g-dev python3-dev libpython3.9-dev libffi-dev libgl1 RUN python3.9 -m pip install --upgrade pip -RUN python3.9 -m pip install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/rocm5.2 +RUN python3.9 -m pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/rocm5.6 RUN python3.9 -m pip install --upgrade pip && python3.9 -m pip install openvino-dev==2023.0.1 opencv-python-headless mlcube_docker RUN apt-get update && apt-get install -y libgl1 diff --git a/docs/setup.md b/docs/setup.md index 0ce038e01..32aa2db9f 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -30,11 +30,11 @@ GaNDLF's primary computational foundation is built on PyTorch, and as such it su (venv_gandlf) $> ### subsequent commands go here ### PyTorch installation - https://pytorch.org/get-started/previous-versions/#v1131 ## CUDA 11.6 -# (venv_gandlf) $> pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116 +# (venv_gandlf) $> pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118 ## ROCm -# (venv_gandlf) $> pip install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/rocm5.2 +# (venv_gandlf) $> pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/rocm5.6 ## CPU-only -# (venv_gandlf) $> pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu +# (venv_gandlf) $> pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --extra-index-url https://download.pytorch.org/whl/cpu ``` ### Optional Dependencies diff --git a/mlcube/model_mlcube/mlcube.yaml b/mlcube/model_mlcube/mlcube.yaml index 1d3704be7..a2cddab5a 100644 --- a/mlcube/model_mlcube/mlcube.yaml +++ b/mlcube/model_mlcube/mlcube.yaml @@ -30,7 +30,7 @@ docker: # Docker build context relative to $MLCUBE_ROOT. (gandlf_deploy can handle this automatically.) build_context: "../" # Docker file name within docker build context. Any "Dockerfile-*" in the GaNDLF source repo is valid. - build_file: "Dockerfile-CUDA11.6" + build_file: "Dockerfile-CUDA11.8" # These settings should be set by global MLCube configuration, generally not per-deployment. # However, some sane defaults (for Docker >19.03) are here: diff --git a/setup.py b/setup.py index 4b01240a7..4e02b6e79 100644 --- a/setup.py +++ b/setup.py @@ -81,7 +81,7 @@ def run(self): requirements = [ - "torch==1.13.1", + "torch==2.1.0", "black==23.11.0", "numpy==1.25.0", "scipy",
svthalia__concrexit-2186
Order payments by date in payment inline in payment user admin ### Is your feature request related to a problem? Please describe. The PaymentUserAdmin features a PaymentInline for all payments a user made. Those payments right should be ordered by date (I think they are ordered alphabetically right now) ### Describe the solution you'd like Order the payments inline by date (and possibly globally order them by date by setting it in the meta field of the payment model) ### Motivation More intuitive model
[ { "content": "\"\"\"Registers admin interfaces for the payments module.\"\"\"\nimport csv\nfrom collections import OrderedDict\n\nfrom django.contrib import admin, messages\nfrom django.contrib.admin import ModelAdmin\nfrom django.contrib.admin.utils import model_ngettext\nfrom django.db.models import QuerySet\nfrom django.db.models.query_utils import Q\nfrom django.http import HttpResponse, HttpRequest\nfrom django.urls import path, reverse\nfrom django.utils import timezone\nfrom django.utils.html import format_html\nfrom django.utils.text import capfirst\nfrom django.utils.translation import gettext_lazy as _\n\nfrom payments import services, admin_views\nfrom payments.forms import BankAccountAdminForm, BatchPaymentInlineAdminForm\nfrom .models import Payment, BankAccount, Batch, PaymentUser\n\n\ndef _show_message(\n model_admin: ModelAdmin, request: HttpRequest, n: int, message: str, error: str\n) -> None:\n if n == 0:\n model_admin.message_user(request, error, messages.ERROR)\n else:\n model_admin.message_user(\n request,\n message % {\"count\": n, \"items\": model_ngettext(model_admin.opts, n)},\n messages.SUCCESS,\n )\n\n\[email protected](Payment)\nclass PaymentAdmin(admin.ModelAdmin):\n \"\"\"Manage the payments.\"\"\"\n\n list_display = (\n \"created_at\",\n \"amount\",\n \"type\",\n \"paid_by_link\",\n \"processed_by_link\",\n \"batch_link\",\n \"topic\",\n )\n list_filter = (\"type\", \"batch\")\n list_select_related = (\"paid_by\", \"processed_by\", \"batch\")\n date_hierarchy = \"created_at\"\n fields = (\n \"created_at\",\n \"amount\",\n \"type\",\n \"paid_by\",\n \"processed_by\",\n \"topic\",\n \"notes\",\n \"batch\",\n )\n readonly_fields = (\n \"created_at\",\n \"amount\",\n \"paid_by\",\n \"processed_by\",\n \"type\",\n \"topic\",\n \"notes\",\n \"batch\",\n )\n search_fields = (\n \"topic\",\n \"notes\",\n \"paid_by__username\",\n \"paid_by__first_name\",\n \"paid_by__last_name\",\n \"processed_by__username\",\n \"processed_by__first_name\",\n \"processed_by__last_name\",\n \"amount\",\n )\n ordering = (\"-created_at\",)\n autocomplete_fields = (\"paid_by\", \"processed_by\")\n actions = [\n \"add_to_new_batch\",\n \"add_to_last_batch\",\n \"export_csv\",\n ]\n\n @staticmethod\n def _member_link(member: PaymentUser) -> str:\n return (\n format_html(\n \"<a href='{}'>{}</a>\", member.get_absolute_url(), member.get_full_name()\n )\n if member\n else None\n )\n\n def paid_by_link(self, obj: Payment) -> str:\n return self._member_link(obj.paid_by)\n\n paid_by_link.admin_order_field = \"paid_by\"\n paid_by_link.short_description = _(\"paid by\")\n\n @staticmethod\n def _batch_link(payment: Payment, batch: Batch) -> str:\n if batch:\n return format_html(\n \"<a href='{}'>{}</a>\", batch.get_absolute_url(), str(batch)\n )\n if payment.type == Payment.TPAY:\n return _(\"No batch attached\")\n return \"\"\n\n def batch_link(self, obj: Payment) -> str:\n return self._batch_link(obj, obj.batch)\n\n batch_link.admin_order_field = \"batch\"\n batch_link.short_description = _(\"in batch\")\n\n def processed_by_link(self, obj: Payment) -> str:\n return self._member_link(obj.processed_by)\n\n processed_by_link.admin_order_field = \"processed_by\"\n processed_by_link.short_description = _(\"processed by\")\n\n def has_delete_permission(self, request, obj=None):\n if isinstance(obj, Payment):\n if obj.batch and obj.batch.processed:\n return False\n if (\n \"payment/\" in request.path\n and request.POST\n and request.POST.get(\"action\") == \"delete_selected\"\n ):\n for payment_id in request.POST.getlist(\"_selected_action\"):\n payment = Payment.objects.get(id=payment_id)\n if payment.batch and payment.batch.processed:\n return False\n\n return super().has_delete_permission(request, obj)\n\n def get_field_queryset(self, db, db_field, request):\n if str(db_field) == \"payments.Payment.batch\":\n return Batch.objects.filter(processed=False)\n return super().get_field_queryset(db, db_field, request)\n\n def get_readonly_fields(self, request: HttpRequest, obj: Payment = None):\n if not obj:\n return \"created_at\", \"processed_by\", \"batch\"\n if obj.type == Payment.TPAY and not (obj.batch and obj.batch.processed):\n return (\n \"created_at\",\n \"amount\",\n \"type\",\n \"paid_by\",\n \"processed_by\",\n \"notes\",\n \"topic\",\n )\n return super().get_readonly_fields(request, obj)\n\n def get_actions(self, request: HttpRequest) -> OrderedDict:\n \"\"\"Get the actions for the payments.\n\n Hide the processing actions if the right permissions are missing\n \"\"\"\n actions = super().get_actions(request)\n if not request.user.has_perm(\"payments.process_batches\"):\n del actions[\"add_to_new_batch\"]\n del actions[\"add_to_last_batch\"]\n\n return actions\n\n def add_to_new_batch(self, request: HttpRequest, queryset: QuerySet) -> None:\n \"\"\"Add selected TPAY payments to a new batch.\"\"\"\n tpays = queryset.filter(type=Payment.TPAY)\n if len(tpays) > 0:\n batch = Batch.objects.create()\n tpays.update(batch=batch)\n _show_message(\n self,\n request,\n len(tpays),\n _(\"Successfully added {} payments to new batch\").format(len(tpays)),\n _(\"No payments using Thalia Pay are selected, no batch is created\"),\n )\n\n add_to_new_batch.short_description = _(\n \"Add selected Thalia Pay payments to a new batch\"\n )\n\n def add_to_last_batch(self, request: HttpRequest, queryset: QuerySet) -> None:\n \"\"\"Add selected TPAY payments to the last batch.\"\"\"\n tpays = queryset.filter(type=Payment.TPAY)\n if len(tpays) > 0:\n batch = Batch.objects.last()\n if batch is None:\n self.message_user(request, _(\"No batches available.\"), messages.ERROR)\n elif not batch.processed:\n batch.save()\n tpays.update(batch=batch)\n self.message_user(\n request,\n _(\"Successfully added {} payments to {}\").format(len(tpays), batch),\n messages.SUCCESS,\n )\n else:\n self.message_user(\n request,\n _(\"The last batch {} is already processed\").format(batch),\n messages.ERROR,\n )\n else:\n self.message_user(\n request,\n _(\"No payments using Thalia Pay are selected, no batch is created\"),\n messages.ERROR,\n )\n\n add_to_last_batch.short_description = _(\n \"Add selected Thalia Pay payments to the last batch\"\n )\n\n def get_urls(self) -> list:\n urls = super().get_urls()\n custom_urls = [\n path(\n \"<str:app_label>/<str:model_name>/<payable>/create/\",\n self.admin_site.admin_view(admin_views.PaymentAdminView.as_view()),\n name=\"payments_payment_create\",\n ),\n ]\n return custom_urls + urls\n\n def export_csv(self, request: HttpRequest, queryset: QuerySet) -> HttpResponse:\n \"\"\"Export a CSV of payments.\n\n :param request: Request\n :param queryset: Items to be exported\n \"\"\"\n response = HttpResponse(content_type=\"text/csv\")\n response[\"Content-Disposition\"] = 'attachment;filename=\"payments.csv\"'\n writer = csv.writer(response)\n headers = [\n _(\"created\"),\n _(\"amount\"),\n _(\"type\"),\n _(\"processor\"),\n _(\"payer id\"),\n _(\"payer name\"),\n _(\"notes\"),\n ]\n writer.writerow([capfirst(x) for x in headers])\n for payment in queryset:\n writer.writerow(\n [\n payment.created_at,\n payment.amount,\n payment.get_type_display(),\n payment.processed_by.get_full_name()\n if payment.processed_by\n else \"-\",\n payment.paid_by.pk if payment.paid_by else \"-\",\n payment.paid_by.get_full_name() if payment.paid_by else \"-\",\n payment.notes,\n ]\n )\n return response\n\n export_csv.short_description = _(\"Export\")\n\n\nclass ValidAccountFilter(admin.SimpleListFilter):\n \"\"\"Filter the memberships by whether they are active or not.\"\"\"\n\n title = _(\"mandates\")\n parameter_name = \"active\"\n\n def lookups(self, request, model_admin) -> tuple:\n return (\n (\"valid\", _(\"Valid\")),\n (\"invalid\", _(\"Invalid\")),\n (\"none\", _(\"None\")),\n )\n\n def queryset(self, request, queryset) -> QuerySet:\n now = timezone.now()\n\n if self.value() == \"valid\":\n return queryset.filter(\n Q(valid_from__lte=now) & Q(valid_until=None) | Q(valid_until__lt=now)\n )\n\n if self.value() == \"invalid\":\n return queryset.filter(valid_until__gte=now)\n\n if self.value() == \"none\":\n return queryset.filter(valid_from=None)\n\n return queryset\n\n\nclass PaymentsInline(admin.TabularInline):\n \"\"\"The inline for payments in the Batch admin.\"\"\"\n\n model = Payment\n readonly_fields = (\n \"topic\",\n \"paid_by\",\n \"amount\",\n \"created_at\",\n \"notes\",\n )\n form = BatchPaymentInlineAdminForm\n extra = 0\n max_num = 0\n can_delete = False\n\n def get_fields(self, request, obj=None):\n fields = super().get_fields(request, obj)\n if obj and obj.processed:\n fields.remove(\"remove_batch\")\n return fields\n\n\[email protected](Batch)\nclass BatchAdmin(admin.ModelAdmin):\n \"\"\"Manage payment batches.\"\"\"\n\n inlines = (PaymentsInline,)\n list_display = (\n \"id\",\n \"description\",\n \"withdrawal_date\",\n \"start_date\",\n \"end_date\",\n \"total_amount\",\n \"payments_count\",\n \"processing_date\",\n \"processed\",\n )\n fields = (\n \"id\",\n \"description\",\n \"withdrawal_date\",\n \"processed\",\n \"processing_date\",\n \"total_amount\",\n )\n search_fields = (\n \"id\",\n \"description\",\n \"withdrawal_date\",\n )\n\n def get_readonly_fields(self, request: HttpRequest, obj: Batch = None):\n default_fields = (\n \"id\",\n \"processed\",\n \"processing_date\",\n \"total_amount\",\n )\n if obj and obj.processed:\n return (\"description\", \"withdrawal_date\",) + default_fields\n return default_fields\n\n def has_delete_permission(self, request, obj=None):\n if isinstance(obj, Batch):\n if obj.processed:\n return False\n if (\n \"batch/\" in request.path\n and request.POST\n and request.POST.get(\"action\") == \"delete_selected\"\n ):\n for payment_id in request.POST.getlist(\"_selected_action\"):\n if Batch.objects.get(id=payment_id).processed:\n return False\n\n return super().has_delete_permission(request, obj)\n\n def get_urls(self) -> list:\n urls = super().get_urls()\n custom_urls = [\n path(\n \"<int:pk>/process/\",\n self.admin_site.admin_view(admin_views.BatchProcessAdminView.as_view()),\n name=\"payments_batch_process\",\n ),\n path(\n \"<int:pk>/export/\",\n self.admin_site.admin_view(admin_views.BatchExportAdminView.as_view()),\n name=\"payments_batch_export\",\n ),\n path(\n \"<int:pk>/export-topic/\",\n self.admin_site.admin_view(\n admin_views.BatchTopicExportAdminView.as_view()\n ),\n name=\"payments_batch_export_topic\",\n ),\n path(\n \"<int:pk>/topic-description/\",\n self.admin_site.admin_view(\n admin_views.BatchTopicDescriptionAdminView.as_view()\n ),\n name=\"payments_batch_topic_description\",\n ),\n path(\n \"new_filled/\",\n self.admin_site.admin_view(\n admin_views.BatchNewFilledAdminView.as_view()\n ),\n name=\"payments_batch_new_batch_filled\",\n ),\n ]\n return custom_urls + urls\n\n def save_formset(self, request, form, formset, change):\n instances = formset.save(commit=False)\n\n for instance in instances:\n if instance.batch and not instance.batch.processed:\n instance.batch = None\n instance.save()\n formset.save_m2m()\n\n def changeform_view(\n self,\n request: HttpRequest,\n object_id: str = None,\n form_url: str = \"\",\n extra_context: dict = None,\n ) -> HttpResponse:\n \"\"\"Render the change formview.\n\n Only allow when the batch has not been processed yet.\n \"\"\"\n extra_context = extra_context or {}\n obj = None\n if object_id is not None and request.user.has_perm(\"payments.process_batches\"):\n obj = Batch.objects.get(id=object_id)\n\n extra_context[\"batch\"] = obj\n return super().changeform_view(request, object_id, form_url, extra_context)\n\n\[email protected](BankAccount)\nclass BankAccountAdmin(admin.ModelAdmin):\n \"\"\"Manage bank accounts.\"\"\"\n\n list_display = (\"iban\", \"owner_link\", \"last_used\", \"valid_from\", \"valid_until\")\n fields = (\n \"created_at\",\n \"last_used\",\n \"owner\",\n \"iban\",\n \"bic\",\n \"initials\",\n \"last_name\",\n \"mandate_no\",\n \"valid_from\",\n \"valid_until\",\n \"signature\",\n \"can_be_revoked\",\n )\n readonly_fields = (\n \"created_at\",\n \"can_be_revoked\",\n )\n search_fields = (\"owner__username\", \"owner__first_name\", \"owner__last_name\", \"iban\")\n autocomplete_fields = (\"owner\",)\n actions = [\"set_last_used\"]\n form = BankAccountAdminForm\n\n def owner_link(self, obj: BankAccount) -> str:\n if obj.owner:\n return format_html(\n \"<a href='{}'>{}</a>\",\n reverse(\"admin:auth_user_change\", args=[obj.owner.pk]),\n obj.owner.get_full_name(),\n )\n return \"\"\n\n owner_link.admin_order_field = \"owner\"\n owner_link.short_description = _(\"owner\")\n\n def can_be_revoked(self, obj: BankAccount):\n return obj.can_be_revoked\n\n can_be_revoked.boolean = True\n\n def set_last_used(self, request: HttpRequest, queryset: QuerySet) -> None:\n \"\"\"Set the last used date of selected accounts.\"\"\"\n if request.user.has_perm(\"payments.change_bankaccount\"):\n updated = services.update_last_used(queryset)\n _show_message(\n self,\n request,\n updated,\n message=_(\"Successfully updated %(count)d %(items)s.\"),\n error=_(\"The selected account(s) could not be updated.\"),\n )\n\n set_last_used.short_description = _(\"Update the last used date\")\n\n def export_csv(self, request: HttpRequest, queryset: QuerySet) -> HttpResponse:\n response = HttpResponse(content_type=\"text/csv\")\n response[\"Content-Disposition\"] = 'attachment;filename=\"accounts.csv\"'\n writer = csv.writer(response)\n headers = [\n _(\"created\"),\n _(\"name\"),\n _(\"reference\"),\n _(\"IBAN\"),\n _(\"BIC\"),\n _(\"valid from\"),\n _(\"valid until\"),\n _(\"signature\"),\n ]\n writer.writerow([capfirst(x) for x in headers])\n for account in queryset:\n writer.writerow(\n [\n account.created_at,\n account.name,\n account.mandate_no,\n account.iban,\n account.bic or \"\",\n account.valid_from or \"\",\n account.valid_until or \"\",\n account.signature or \"\",\n ]\n )\n return response\n\n export_csv.short_description = _(\"Export\")\n\n\nclass BankAccountInline(admin.TabularInline):\n model = BankAccount\n fields = (\n \"iban\",\n \"bic\",\n \"mandate_no\",\n \"valid_from\",\n \"valid_until\",\n \"last_used\",\n )\n show_change_link = True\n\n can_delete = False\n\n def has_add_permission(self, request, obj=None):\n return False\n\n def has_change_permission(self, request, obj=None):\n return False\n\n\nclass PaymentInline(admin.TabularInline):\n model = Payment\n fields = (\n \"created_at\",\n \"type\",\n \"amount\",\n \"topic\",\n \"notes\",\n \"batch\",\n )\n\n show_change_link = True\n\n can_delete = False\n\n def has_add_permission(self, request, obj=None):\n return False\n\n def has_change_permission(self, request, obj=None):\n return False\n\n\nclass ThaliaPayAllowedFilter(admin.SimpleListFilter):\n title = _(\"Thalia Pay allowed\")\n parameter_name = \"tpay_allowed\"\n\n def lookups(self, request, model_admin):\n return (\"1\", _(\"Yes\")), (\"0\", _(\"No\"))\n\n def queryset(self, request, queryset):\n if self.value() == \"1\":\n return queryset.filter(tpay_allowed=True)\n if self.value() == \"0\":\n return queryset.exclude(tpay_allowed=True)\n return queryset\n\n\nclass ThaliaPayEnabledFilter(admin.SimpleListFilter):\n title = _(\"Thalia Pay enabled\")\n parameter_name = \"tpay_enabled\"\n\n def lookups(self, request, model_admin):\n return (\"1\", _(\"Yes\")), (\"0\", _(\"No\"))\n\n def queryset(self, request, queryset):\n if self.value() == \"1\":\n return queryset.filter(tpay_enabled=True)\n if self.value() == \"0\":\n return queryset.exclude(tpay_enabled=True)\n return queryset\n\n\nclass ThaliaPayBalanceFilter(admin.SimpleListFilter):\n title = _(\"Thalia Pay balance\")\n parameter_name = \"tpay_balance\"\n\n def lookups(self, request, model_admin):\n return (\n (\"0\", \"€0,00\"),\n (\"1\", \">€0.00\"),\n )\n\n def queryset(self, request, queryset):\n if self.value() == \"0\":\n return queryset.filter(tpay_balance=0)\n if self.value() == \"1\":\n return queryset.exclude(tpay_balance=0)\n return queryset\n\n\[email protected](PaymentUser)\nclass PaymentUserAdmin(admin.ModelAdmin):\n list_display = (\n \"__str__\",\n \"email\",\n \"get_tpay_allowed\",\n \"get_tpay_enabled\",\n \"get_tpay_balance\",\n )\n list_filter = [\n ThaliaPayAllowedFilter,\n ThaliaPayEnabledFilter,\n ThaliaPayBalanceFilter,\n ]\n\n inlines = [BankAccountInline, PaymentInline]\n\n fields = (\n \"user_link\",\n \"get_tpay_allowed\",\n \"get_tpay_enabled\",\n \"get_tpay_balance\",\n )\n\n readonly_fields = (\n \"user_link\",\n \"get_tpay_allowed\",\n \"get_tpay_enabled\",\n \"get_tpay_balance\",\n )\n\n search_fields = (\n \"first_name\",\n \"last_name\",\n \"username\",\n \"email\",\n )\n\n def get_queryset(self, request):\n queryset = super().get_queryset(request)\n queryset = queryset.prefetch_related(\"bank_accounts\", \"paid_payment_set\")\n queryset = queryset.select_properties(\n \"tpay_balance\", \"tpay_enabled\", \"tpay_allowed\",\n )\n return queryset\n\n def get_tpay_balance(self, obj):\n return f\"€ {obj.tpay_balance:.2f}\" if obj.tpay_enabled else \"-\"\n\n get_tpay_balance.short_description = _(\"balance\")\n\n def get_tpay_enabled(self, obj):\n return obj.tpay_enabled\n\n get_tpay_enabled.short_description = _(\"Thalia Pay enabled\")\n get_tpay_enabled.boolean = True\n\n def get_tpay_allowed(self, obj):\n return obj.tpay_allowed\n\n get_tpay_allowed.short_description = _(\"Thalia Pay allowed\")\n get_tpay_allowed.boolean = True\n\n def user_link(self, obj):\n return (\n format_html(\n \"<a href='{}'>{}</a>\",\n reverse(\"admin:auth_user_change\", args=[obj.pk]),\n obj.get_full_name(),\n )\n if obj\n else \"\"\n )\n\n user_link.admin_order_field = \"user\"\n user_link.short_description = _(\"user\")\n\n actions = [\"disallow_thalia_pay\", \"allow_thalia_pay\"]\n\n def disallow_thalia_pay(self, request, queryset):\n count = 0\n for x in queryset:\n changed = x.disallow_tpay()\n count += 1 if changed else 0\n messages.success(\n request, _(f\"Succesfully disallowed Thalia Pay for {count} users.\"),\n )\n\n disallow_thalia_pay.short_description = _(\"Disallow Thalia Pay for selected users\")\n\n def allow_thalia_pay(self, request, queryset):\n count = 0\n for x in queryset:\n changed = x.allow_tpay()\n count += 1 if changed else 0\n messages.success(\n request, _(f\"Succesfully allowed Thalia Pay for {count} users.\"),\n )\n\n allow_thalia_pay.short_description = _(\"Allow Thalia Pay for selected users\")\n\n def has_add_permission(self, request, obj=None):\n return False\n\n def has_change_permission(self, request, obj=None):\n return False\n\n def has_delete_permission(self, request, obj=None):\n return False\n", "path": "website/payments/admin.py" } ]
[ { "content": "\"\"\"Registers admin interfaces for the payments module.\"\"\"\nimport csv\nfrom collections import OrderedDict\n\nfrom django.contrib import admin, messages\nfrom django.contrib.admin import ModelAdmin\nfrom django.contrib.admin.utils import model_ngettext\nfrom django.db.models import QuerySet\nfrom django.db.models.query_utils import Q\nfrom django.http import HttpResponse, HttpRequest\nfrom django.urls import path, reverse\nfrom django.utils import timezone\nfrom django.utils.html import format_html\nfrom django.utils.text import capfirst\nfrom django.utils.translation import gettext_lazy as _\n\nfrom payments import services, admin_views\nfrom payments.forms import BankAccountAdminForm, BatchPaymentInlineAdminForm\nfrom .models import Payment, BankAccount, Batch, PaymentUser\n\n\ndef _show_message(\n model_admin: ModelAdmin, request: HttpRequest, n: int, message: str, error: str\n) -> None:\n if n == 0:\n model_admin.message_user(request, error, messages.ERROR)\n else:\n model_admin.message_user(\n request,\n message % {\"count\": n, \"items\": model_ngettext(model_admin.opts, n)},\n messages.SUCCESS,\n )\n\n\[email protected](Payment)\nclass PaymentAdmin(admin.ModelAdmin):\n \"\"\"Manage the payments.\"\"\"\n\n list_display = (\n \"created_at\",\n \"amount\",\n \"type\",\n \"paid_by_link\",\n \"processed_by_link\",\n \"batch_link\",\n \"topic\",\n )\n list_filter = (\"type\", \"batch\")\n list_select_related = (\"paid_by\", \"processed_by\", \"batch\")\n date_hierarchy = \"created_at\"\n fields = (\n \"created_at\",\n \"amount\",\n \"type\",\n \"paid_by\",\n \"processed_by\",\n \"topic\",\n \"notes\",\n \"batch\",\n )\n readonly_fields = (\n \"created_at\",\n \"amount\",\n \"paid_by\",\n \"processed_by\",\n \"type\",\n \"topic\",\n \"notes\",\n \"batch\",\n )\n search_fields = (\n \"topic\",\n \"notes\",\n \"paid_by__username\",\n \"paid_by__first_name\",\n \"paid_by__last_name\",\n \"processed_by__username\",\n \"processed_by__first_name\",\n \"processed_by__last_name\",\n \"amount\",\n )\n ordering = (\"-created_at\",)\n autocomplete_fields = (\"paid_by\", \"processed_by\")\n actions = [\n \"add_to_new_batch\",\n \"add_to_last_batch\",\n \"export_csv\",\n ]\n\n @staticmethod\n def _member_link(member: PaymentUser) -> str:\n return (\n format_html(\n \"<a href='{}'>{}</a>\", member.get_absolute_url(), member.get_full_name()\n )\n if member\n else None\n )\n\n def paid_by_link(self, obj: Payment) -> str:\n return self._member_link(obj.paid_by)\n\n paid_by_link.admin_order_field = \"paid_by\"\n paid_by_link.short_description = _(\"paid by\")\n\n @staticmethod\n def _batch_link(payment: Payment, batch: Batch) -> str:\n if batch:\n return format_html(\n \"<a href='{}'>{}</a>\", batch.get_absolute_url(), str(batch)\n )\n if payment.type == Payment.TPAY:\n return _(\"No batch attached\")\n return \"\"\n\n def batch_link(self, obj: Payment) -> str:\n return self._batch_link(obj, obj.batch)\n\n batch_link.admin_order_field = \"batch\"\n batch_link.short_description = _(\"in batch\")\n\n def processed_by_link(self, obj: Payment) -> str:\n return self._member_link(obj.processed_by)\n\n processed_by_link.admin_order_field = \"processed_by\"\n processed_by_link.short_description = _(\"processed by\")\n\n def has_delete_permission(self, request, obj=None):\n if isinstance(obj, Payment):\n if obj.batch and obj.batch.processed:\n return False\n if (\n \"payment/\" in request.path\n and request.POST\n and request.POST.get(\"action\") == \"delete_selected\"\n ):\n for payment_id in request.POST.getlist(\"_selected_action\"):\n payment = Payment.objects.get(id=payment_id)\n if payment.batch and payment.batch.processed:\n return False\n\n return super().has_delete_permission(request, obj)\n\n def get_field_queryset(self, db, db_field, request):\n if str(db_field) == \"payments.Payment.batch\":\n return Batch.objects.filter(processed=False)\n return super().get_field_queryset(db, db_field, request)\n\n def get_readonly_fields(self, request: HttpRequest, obj: Payment = None):\n if not obj:\n return \"created_at\", \"processed_by\", \"batch\"\n if obj.type == Payment.TPAY and not (obj.batch and obj.batch.processed):\n return (\n \"created_at\",\n \"amount\",\n \"type\",\n \"paid_by\",\n \"processed_by\",\n \"notes\",\n \"topic\",\n )\n return super().get_readonly_fields(request, obj)\n\n def get_actions(self, request: HttpRequest) -> OrderedDict:\n \"\"\"Get the actions for the payments.\n\n Hide the processing actions if the right permissions are missing\n \"\"\"\n actions = super().get_actions(request)\n if not request.user.has_perm(\"payments.process_batches\"):\n del actions[\"add_to_new_batch\"]\n del actions[\"add_to_last_batch\"]\n\n return actions\n\n def add_to_new_batch(self, request: HttpRequest, queryset: QuerySet) -> None:\n \"\"\"Add selected TPAY payments to a new batch.\"\"\"\n tpays = queryset.filter(type=Payment.TPAY)\n if len(tpays) > 0:\n batch = Batch.objects.create()\n tpays.update(batch=batch)\n _show_message(\n self,\n request,\n len(tpays),\n _(\"Successfully added {} payments to new batch\").format(len(tpays)),\n _(\"No payments using Thalia Pay are selected, no batch is created\"),\n )\n\n add_to_new_batch.short_description = _(\n \"Add selected Thalia Pay payments to a new batch\"\n )\n\n def add_to_last_batch(self, request: HttpRequest, queryset: QuerySet) -> None:\n \"\"\"Add selected TPAY payments to the last batch.\"\"\"\n tpays = queryset.filter(type=Payment.TPAY)\n if len(tpays) > 0:\n batch = Batch.objects.last()\n if batch is None:\n self.message_user(request, _(\"No batches available.\"), messages.ERROR)\n elif not batch.processed:\n batch.save()\n tpays.update(batch=batch)\n self.message_user(\n request,\n _(\"Successfully added {} payments to {}\").format(len(tpays), batch),\n messages.SUCCESS,\n )\n else:\n self.message_user(\n request,\n _(\"The last batch {} is already processed\").format(batch),\n messages.ERROR,\n )\n else:\n self.message_user(\n request,\n _(\"No payments using Thalia Pay are selected, no batch is created\"),\n messages.ERROR,\n )\n\n add_to_last_batch.short_description = _(\n \"Add selected Thalia Pay payments to the last batch\"\n )\n\n def get_urls(self) -> list:\n urls = super().get_urls()\n custom_urls = [\n path(\n \"<str:app_label>/<str:model_name>/<payable>/create/\",\n self.admin_site.admin_view(admin_views.PaymentAdminView.as_view()),\n name=\"payments_payment_create\",\n ),\n ]\n return custom_urls + urls\n\n def export_csv(self, request: HttpRequest, queryset: QuerySet) -> HttpResponse:\n \"\"\"Export a CSV of payments.\n\n :param request: Request\n :param queryset: Items to be exported\n \"\"\"\n response = HttpResponse(content_type=\"text/csv\")\n response[\"Content-Disposition\"] = 'attachment;filename=\"payments.csv\"'\n writer = csv.writer(response)\n headers = [\n _(\"created\"),\n _(\"amount\"),\n _(\"type\"),\n _(\"processor\"),\n _(\"payer id\"),\n _(\"payer name\"),\n _(\"notes\"),\n ]\n writer.writerow([capfirst(x) for x in headers])\n for payment in queryset:\n writer.writerow(\n [\n payment.created_at,\n payment.amount,\n payment.get_type_display(),\n payment.processed_by.get_full_name()\n if payment.processed_by\n else \"-\",\n payment.paid_by.pk if payment.paid_by else \"-\",\n payment.paid_by.get_full_name() if payment.paid_by else \"-\",\n payment.notes,\n ]\n )\n return response\n\n export_csv.short_description = _(\"Export\")\n\n\nclass ValidAccountFilter(admin.SimpleListFilter):\n \"\"\"Filter the memberships by whether they are active or not.\"\"\"\n\n title = _(\"mandates\")\n parameter_name = \"active\"\n\n def lookups(self, request, model_admin) -> tuple:\n return (\n (\"valid\", _(\"Valid\")),\n (\"invalid\", _(\"Invalid\")),\n (\"none\", _(\"None\")),\n )\n\n def queryset(self, request, queryset) -> QuerySet:\n now = timezone.now()\n\n if self.value() == \"valid\":\n return queryset.filter(\n Q(valid_from__lte=now) & Q(valid_until=None) | Q(valid_until__lt=now)\n )\n\n if self.value() == \"invalid\":\n return queryset.filter(valid_until__gte=now)\n\n if self.value() == \"none\":\n return queryset.filter(valid_from=None)\n\n return queryset\n\n\nclass PaymentsInline(admin.TabularInline):\n \"\"\"The inline for payments in the Batch admin.\"\"\"\n\n model = Payment\n readonly_fields = (\n \"topic\",\n \"paid_by\",\n \"amount\",\n \"created_at\",\n \"notes\",\n )\n form = BatchPaymentInlineAdminForm\n extra = 0\n max_num = 0\n can_delete = False\n\n def get_fields(self, request, obj=None):\n fields = super().get_fields(request, obj)\n if obj and obj.processed:\n fields.remove(\"remove_batch\")\n return fields\n\n\[email protected](Batch)\nclass BatchAdmin(admin.ModelAdmin):\n \"\"\"Manage payment batches.\"\"\"\n\n inlines = (PaymentsInline,)\n list_display = (\n \"id\",\n \"description\",\n \"withdrawal_date\",\n \"start_date\",\n \"end_date\",\n \"total_amount\",\n \"payments_count\",\n \"processing_date\",\n \"processed\",\n )\n fields = (\n \"id\",\n \"description\",\n \"withdrawal_date\",\n \"processed\",\n \"processing_date\",\n \"total_amount\",\n )\n search_fields = (\n \"id\",\n \"description\",\n \"withdrawal_date\",\n )\n\n def get_readonly_fields(self, request: HttpRequest, obj: Batch = None):\n default_fields = (\n \"id\",\n \"processed\",\n \"processing_date\",\n \"total_amount\",\n )\n if obj and obj.processed:\n return (\"description\", \"withdrawal_date\",) + default_fields\n return default_fields\n\n def has_delete_permission(self, request, obj=None):\n if isinstance(obj, Batch):\n if obj.processed:\n return False\n if (\n \"batch/\" in request.path\n and request.POST\n and request.POST.get(\"action\") == \"delete_selected\"\n ):\n for payment_id in request.POST.getlist(\"_selected_action\"):\n if Batch.objects.get(id=payment_id).processed:\n return False\n\n return super().has_delete_permission(request, obj)\n\n def get_urls(self) -> list:\n urls = super().get_urls()\n custom_urls = [\n path(\n \"<int:pk>/process/\",\n self.admin_site.admin_view(admin_views.BatchProcessAdminView.as_view()),\n name=\"payments_batch_process\",\n ),\n path(\n \"<int:pk>/export/\",\n self.admin_site.admin_view(admin_views.BatchExportAdminView.as_view()),\n name=\"payments_batch_export\",\n ),\n path(\n \"<int:pk>/export-topic/\",\n self.admin_site.admin_view(\n admin_views.BatchTopicExportAdminView.as_view()\n ),\n name=\"payments_batch_export_topic\",\n ),\n path(\n \"<int:pk>/topic-description/\",\n self.admin_site.admin_view(\n admin_views.BatchTopicDescriptionAdminView.as_view()\n ),\n name=\"payments_batch_topic_description\",\n ),\n path(\n \"new_filled/\",\n self.admin_site.admin_view(\n admin_views.BatchNewFilledAdminView.as_view()\n ),\n name=\"payments_batch_new_batch_filled\",\n ),\n ]\n return custom_urls + urls\n\n def save_formset(self, request, form, formset, change):\n instances = formset.save(commit=False)\n\n for instance in instances:\n if instance.batch and not instance.batch.processed:\n instance.batch = None\n instance.save()\n formset.save_m2m()\n\n def changeform_view(\n self,\n request: HttpRequest,\n object_id: str = None,\n form_url: str = \"\",\n extra_context: dict = None,\n ) -> HttpResponse:\n \"\"\"Render the change formview.\n\n Only allow when the batch has not been processed yet.\n \"\"\"\n extra_context = extra_context or {}\n obj = None\n if object_id is not None and request.user.has_perm(\"payments.process_batches\"):\n obj = Batch.objects.get(id=object_id)\n\n extra_context[\"batch\"] = obj\n return super().changeform_view(request, object_id, form_url, extra_context)\n\n\[email protected](BankAccount)\nclass BankAccountAdmin(admin.ModelAdmin):\n \"\"\"Manage bank accounts.\"\"\"\n\n list_display = (\"iban\", \"owner_link\", \"last_used\", \"valid_from\", \"valid_until\")\n fields = (\n \"created_at\",\n \"last_used\",\n \"owner\",\n \"iban\",\n \"bic\",\n \"initials\",\n \"last_name\",\n \"mandate_no\",\n \"valid_from\",\n \"valid_until\",\n \"signature\",\n \"can_be_revoked\",\n )\n readonly_fields = (\n \"created_at\",\n \"can_be_revoked\",\n )\n search_fields = (\"owner__username\", \"owner__first_name\", \"owner__last_name\", \"iban\")\n autocomplete_fields = (\"owner\",)\n actions = [\"set_last_used\"]\n form = BankAccountAdminForm\n\n def owner_link(self, obj: BankAccount) -> str:\n if obj.owner:\n return format_html(\n \"<a href='{}'>{}</a>\",\n reverse(\"admin:auth_user_change\", args=[obj.owner.pk]),\n obj.owner.get_full_name(),\n )\n return \"\"\n\n owner_link.admin_order_field = \"owner\"\n owner_link.short_description = _(\"owner\")\n\n def can_be_revoked(self, obj: BankAccount):\n return obj.can_be_revoked\n\n can_be_revoked.boolean = True\n\n def set_last_used(self, request: HttpRequest, queryset: QuerySet) -> None:\n \"\"\"Set the last used date of selected accounts.\"\"\"\n if request.user.has_perm(\"payments.change_bankaccount\"):\n updated = services.update_last_used(queryset)\n _show_message(\n self,\n request,\n updated,\n message=_(\"Successfully updated %(count)d %(items)s.\"),\n error=_(\"The selected account(s) could not be updated.\"),\n )\n\n set_last_used.short_description = _(\"Update the last used date\")\n\n def export_csv(self, request: HttpRequest, queryset: QuerySet) -> HttpResponse:\n response = HttpResponse(content_type=\"text/csv\")\n response[\"Content-Disposition\"] = 'attachment;filename=\"accounts.csv\"'\n writer = csv.writer(response)\n headers = [\n _(\"created\"),\n _(\"name\"),\n _(\"reference\"),\n _(\"IBAN\"),\n _(\"BIC\"),\n _(\"valid from\"),\n _(\"valid until\"),\n _(\"signature\"),\n ]\n writer.writerow([capfirst(x) for x in headers])\n for account in queryset:\n writer.writerow(\n [\n account.created_at,\n account.name,\n account.mandate_no,\n account.iban,\n account.bic or \"\",\n account.valid_from or \"\",\n account.valid_until or \"\",\n account.signature or \"\",\n ]\n )\n return response\n\n export_csv.short_description = _(\"Export\")\n\n\nclass BankAccountInline(admin.TabularInline):\n model = BankAccount\n fields = (\n \"iban\",\n \"bic\",\n \"mandate_no\",\n \"valid_from\",\n \"valid_until\",\n \"last_used\",\n )\n show_change_link = True\n\n can_delete = False\n\n def has_add_permission(self, request, obj=None):\n return False\n\n def has_change_permission(self, request, obj=None):\n return False\n\n\nclass PaymentInline(admin.TabularInline):\n model = Payment\n fields = (\n \"created_at\",\n \"type\",\n \"amount\",\n \"topic\",\n \"notes\",\n \"batch\",\n )\n ordering = (\"-created_at\",)\n\n show_change_link = True\n\n can_delete = False\n\n def has_add_permission(self, request, obj=None):\n return False\n\n def has_change_permission(self, request, obj=None):\n return False\n\n\nclass ThaliaPayAllowedFilter(admin.SimpleListFilter):\n title = _(\"Thalia Pay allowed\")\n parameter_name = \"tpay_allowed\"\n\n def lookups(self, request, model_admin):\n return (\"1\", _(\"Yes\")), (\"0\", _(\"No\"))\n\n def queryset(self, request, queryset):\n if self.value() == \"1\":\n return queryset.filter(tpay_allowed=True)\n if self.value() == \"0\":\n return queryset.exclude(tpay_allowed=True)\n return queryset\n\n\nclass ThaliaPayEnabledFilter(admin.SimpleListFilter):\n title = _(\"Thalia Pay enabled\")\n parameter_name = \"tpay_enabled\"\n\n def lookups(self, request, model_admin):\n return (\"1\", _(\"Yes\")), (\"0\", _(\"No\"))\n\n def queryset(self, request, queryset):\n if self.value() == \"1\":\n return queryset.filter(tpay_enabled=True)\n if self.value() == \"0\":\n return queryset.exclude(tpay_enabled=True)\n return queryset\n\n\nclass ThaliaPayBalanceFilter(admin.SimpleListFilter):\n title = _(\"Thalia Pay balance\")\n parameter_name = \"tpay_balance\"\n\n def lookups(self, request, model_admin):\n return (\n (\"0\", \"€0,00\"),\n (\"1\", \">€0.00\"),\n )\n\n def queryset(self, request, queryset):\n if self.value() == \"0\":\n return queryset.filter(tpay_balance=0)\n if self.value() == \"1\":\n return queryset.exclude(tpay_balance=0)\n return queryset\n\n\[email protected](PaymentUser)\nclass PaymentUserAdmin(admin.ModelAdmin):\n list_display = (\n \"__str__\",\n \"email\",\n \"get_tpay_allowed\",\n \"get_tpay_enabled\",\n \"get_tpay_balance\",\n )\n list_filter = [\n ThaliaPayAllowedFilter,\n ThaliaPayEnabledFilter,\n ThaliaPayBalanceFilter,\n ]\n\n inlines = [BankAccountInline, PaymentInline]\n\n fields = (\n \"user_link\",\n \"get_tpay_allowed\",\n \"get_tpay_enabled\",\n \"get_tpay_balance\",\n )\n\n readonly_fields = (\n \"user_link\",\n \"get_tpay_allowed\",\n \"get_tpay_enabled\",\n \"get_tpay_balance\",\n )\n\n search_fields = (\n \"first_name\",\n \"last_name\",\n \"username\",\n \"email\",\n )\n\n def get_queryset(self, request):\n queryset = super().get_queryset(request)\n queryset = queryset.prefetch_related(\"bank_accounts\", \"paid_payment_set\")\n queryset = queryset.select_properties(\n \"tpay_balance\", \"tpay_enabled\", \"tpay_allowed\",\n )\n return queryset\n\n def get_tpay_balance(self, obj):\n return f\"€ {obj.tpay_balance:.2f}\" if obj.tpay_enabled else \"-\"\n\n get_tpay_balance.short_description = _(\"balance\")\n\n def get_tpay_enabled(self, obj):\n return obj.tpay_enabled\n\n get_tpay_enabled.short_description = _(\"Thalia Pay enabled\")\n get_tpay_enabled.boolean = True\n\n def get_tpay_allowed(self, obj):\n return obj.tpay_allowed\n\n get_tpay_allowed.short_description = _(\"Thalia Pay allowed\")\n get_tpay_allowed.boolean = True\n\n def user_link(self, obj):\n return (\n format_html(\n \"<a href='{}'>{}</a>\",\n reverse(\"admin:auth_user_change\", args=[obj.pk]),\n obj.get_full_name(),\n )\n if obj\n else \"\"\n )\n\n user_link.admin_order_field = \"user\"\n user_link.short_description = _(\"user\")\n\n actions = [\"disallow_thalia_pay\", \"allow_thalia_pay\"]\n\n def disallow_thalia_pay(self, request, queryset):\n count = 0\n for x in queryset:\n changed = x.disallow_tpay()\n count += 1 if changed else 0\n messages.success(\n request, _(f\"Succesfully disallowed Thalia Pay for {count} users.\"),\n )\n\n disallow_thalia_pay.short_description = _(\"Disallow Thalia Pay for selected users\")\n\n def allow_thalia_pay(self, request, queryset):\n count = 0\n for x in queryset:\n changed = x.allow_tpay()\n count += 1 if changed else 0\n messages.success(\n request, _(f\"Succesfully allowed Thalia Pay for {count} users.\"),\n )\n\n allow_thalia_pay.short_description = _(\"Allow Thalia Pay for selected users\")\n\n def has_add_permission(self, request, obj=None):\n return False\n\n def has_change_permission(self, request, obj=None):\n return False\n\n def has_delete_permission(self, request, obj=None):\n return False\n", "path": "website/payments/admin.py" } ]
diff --git a/website/payments/admin.py b/website/payments/admin.py index 2dd23b163..dd1981be3 100644 --- a/website/payments/admin.py +++ b/website/payments/admin.py @@ -570,6 +570,7 @@ class PaymentInline(admin.TabularInline): "notes", "batch", ) + ordering = ("-created_at",) show_change_link = True
vispy__vispy-1794
Add transparent color to internal color dictionary Hi, I've been working extending and improving `napari`'s color support (mostly [here](https://github.com/napari/napari/pull/782)) and we'd be very happy to have a "transparent" color in your internal `color_dict`, which simply corresponds to `#00000000`. This modification is very minimal (I'd be happy to do it myself) and can provide us with the bare-bones support we'd like to see. Is that possible? Thanks. _Originally posted by @HagaiHargil in https://github.com/vispy/vispy/issues/1345#issuecomment-566884858_
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\ndef get_color_names():\n \"\"\"Get the known color names\n\n Returns\n -------\n names : list\n List of color names known by Vispy.\n \"\"\"\n names = list(_color_dict.keys())\n names.sort()\n return names\n\n\ndef get_color_dict():\n \"\"\"Get the known colors\n\n Returns\n -------\n color_dict : dict\n Dict of colors known by Vispy {name: #rgb}.\n \"\"\"\n return _color_dict.copy()\n\n\n# This is used by color functions to translate user strings to colors\n# For now, this is web colors, and all in hex. It will take some simple\n# but annoying refactoring to deal with non-hex entries if we want them.\n\n# Add the CSS colors, courtesy MIT-licensed code from Dave Eddy:\n# github.com/bahamas10/css-color-names/blob/master/css-color-names.json\n\n_color_dict = {\n \"k\": '#000000',\n \"w\": '#FFFFFF',\n \"r\": '#FF0000',\n \"g\": '#00FF00',\n \"b\": '#0000FF',\n \"y\": '#FFFF00',\n \"m\": '#FF00FF',\n \"c\": '#00FFFF',\n \"aqua\": \"#00ffff\",\n \"aliceblue\": \"#f0f8ff\",\n \"antiquewhite\": \"#faebd7\",\n \"black\": \"#000000\",\n \"blue\": \"#0000ff\",\n \"cyan\": \"#00ffff\",\n \"darkblue\": \"#00008b\",\n \"darkcyan\": \"#008b8b\",\n \"darkgreen\": \"#006400\",\n \"darkturquoise\": \"#00ced1\",\n \"deepskyblue\": \"#00bfff\",\n \"green\": \"#008000\",\n \"lime\": \"#00ff00\",\n \"mediumblue\": \"#0000cd\",\n \"mediumspringgreen\": \"#00fa9a\",\n \"navy\": \"#000080\",\n \"springgreen\": \"#00ff7f\",\n \"teal\": \"#008080\",\n \"midnightblue\": \"#191970\",\n \"dodgerblue\": \"#1e90ff\",\n \"lightseagreen\": \"#20b2aa\",\n \"forestgreen\": \"#228b22\",\n \"seagreen\": \"#2e8b57\",\n \"darkslategray\": \"#2f4f4f\",\n \"darkslategrey\": \"#2f4f4f\",\n \"limegreen\": \"#32cd32\",\n \"mediumseagreen\": \"#3cb371\",\n \"turquoise\": \"#40e0d0\",\n \"royalblue\": \"#4169e1\",\n \"steelblue\": \"#4682b4\",\n \"darkslateblue\": \"#483d8b\",\n \"mediumturquoise\": \"#48d1cc\",\n \"indigo\": \"#4b0082\",\n \"darkolivegreen\": \"#556b2f\",\n \"cadetblue\": \"#5f9ea0\",\n \"cornflowerblue\": \"#6495ed\",\n \"mediumaquamarine\": \"#66cdaa\",\n \"dimgray\": \"#696969\",\n \"dimgrey\": \"#696969\",\n \"slateblue\": \"#6a5acd\",\n \"olivedrab\": \"#6b8e23\",\n \"slategray\": \"#708090\",\n \"slategrey\": \"#708090\",\n \"lightslategray\": \"#778899\",\n \"lightslategrey\": \"#778899\",\n \"mediumslateblue\": \"#7b68ee\",\n \"lawngreen\": \"#7cfc00\",\n \"aquamarine\": \"#7fffd4\",\n \"chartreuse\": \"#7fff00\",\n \"gray\": \"#808080\",\n \"grey\": \"#808080\",\n \"maroon\": \"#800000\",\n \"olive\": \"#808000\",\n \"purple\": \"#800080\",\n \"lightskyblue\": \"#87cefa\",\n \"skyblue\": \"#87ceeb\",\n \"blueviolet\": \"#8a2be2\",\n \"darkmagenta\": \"#8b008b\",\n \"darkred\": \"#8b0000\",\n \"saddlebrown\": \"#8b4513\",\n \"darkseagreen\": \"#8fbc8f\",\n \"lightgreen\": \"#90ee90\",\n \"mediumpurple\": \"#9370db\",\n \"darkviolet\": \"#9400d3\",\n \"palegreen\": \"#98fb98\",\n \"darkorchid\": \"#9932cc\",\n \"yellowgreen\": \"#9acd32\",\n \"sienna\": \"#a0522d\",\n \"brown\": \"#a52a2a\",\n \"darkgray\": \"#a9a9a9\",\n \"darkgrey\": \"#a9a9a9\",\n \"greenyellow\": \"#adff2f\",\n \"lightblue\": \"#add8e6\",\n \"paleturquoise\": \"#afeeee\",\n \"lightsteelblue\": \"#b0c4de\",\n \"powderblue\": \"#b0e0e6\",\n \"firebrick\": \"#b22222\",\n \"darkgoldenrod\": \"#b8860b\",\n \"mediumorchid\": \"#ba55d3\",\n \"rosybrown\": \"#bc8f8f\",\n \"darkkhaki\": \"#bdb76b\",\n \"silver\": \"#c0c0c0\",\n \"mediumvioletred\": \"#c71585\",\n \"indianred\": \"#cd5c5c\",\n \"peru\": \"#cd853f\",\n \"chocolate\": \"#d2691e\",\n \"tan\": \"#d2b48c\",\n \"lightgray\": \"#d3d3d3\",\n \"lightgrey\": \"#d3d3d3\",\n \"thistle\": \"#d8bfd8\",\n \"goldenrod\": \"#daa520\",\n \"orchid\": \"#da70d6\",\n \"palevioletred\": \"#db7093\",\n \"crimson\": \"#dc143c\",\n \"gainsboro\": \"#dcdcdc\",\n \"plum\": \"#dda0dd\",\n \"burlywood\": \"#deb887\",\n \"lightcyan\": \"#e0ffff\",\n \"lavender\": \"#e6e6fa\",\n \"darksalmon\": \"#e9967a\",\n \"palegoldenrod\": \"#eee8aa\",\n \"violet\": \"#ee82ee\",\n \"azure\": \"#f0ffff\",\n \"honeydew\": \"#f0fff0\",\n \"khaki\": \"#f0e68c\",\n \"lightcoral\": \"#f08080\",\n \"sandybrown\": \"#f4a460\",\n \"beige\": \"#f5f5dc\",\n \"mintcream\": \"#f5fffa\",\n \"wheat\": \"#f5deb3\",\n \"whitesmoke\": \"#f5f5f5\",\n \"ghostwhite\": \"#f8f8ff\",\n \"lightgoldenrodyellow\": \"#fafad2\",\n \"linen\": \"#faf0e6\",\n \"salmon\": \"#fa8072\",\n \"oldlace\": \"#fdf5e6\",\n \"bisque\": \"#ffe4c4\",\n \"blanchedalmond\": \"#ffebcd\",\n \"coral\": \"#ff7f50\",\n \"cornsilk\": \"#fff8dc\",\n \"darkorange\": \"#ff8c00\",\n \"deeppink\": \"#ff1493\",\n \"floralwhite\": \"#fffaf0\",\n \"fuchsia\": \"#ff00ff\",\n \"gold\": \"#ffd700\",\n \"hotpink\": \"#ff69b4\",\n \"ivory\": \"#fffff0\",\n \"lavenderblush\": \"#fff0f5\",\n \"lemonchiffon\": \"#fffacd\",\n \"lightpink\": \"#ffb6c1\",\n \"lightsalmon\": \"#ffa07a\",\n \"lightyellow\": \"#ffffe0\",\n \"magenta\": \"#ff00ff\",\n \"mistyrose\": \"#ffe4e1\",\n \"moccasin\": \"#ffe4b5\",\n \"navajowhite\": \"#ffdead\",\n \"orange\": \"#ffa500\",\n \"orangered\": \"#ff4500\",\n \"papayawhip\": \"#ffefd5\",\n \"peachpuff\": \"#ffdab9\",\n \"pink\": \"#ffc0cb\",\n \"red\": \"#ff0000\",\n \"seashell\": \"#fff5ee\",\n \"snow\": \"#fffafa\",\n \"tomato\": \"#ff6347\",\n \"white\": \"#ffffff\",\n \"yellow\": \"#ffff00\",\n}\n", "path": "vispy/color/_color_dict.py" } ]
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\ndef get_color_names():\n \"\"\"Get the known color names\n\n Returns\n -------\n names : list\n List of color names known by Vispy.\n \"\"\"\n names = list(_color_dict.keys())\n names.sort()\n return names\n\n\ndef get_color_dict():\n \"\"\"Get the known colors\n\n Returns\n -------\n color_dict : dict\n Dict of colors known by Vispy {name: #rgb}.\n \"\"\"\n return _color_dict.copy()\n\n\n# This is used by color functions to translate user strings to colors\n# For now, this is web colors, and all in hex. It will take some simple\n# but annoying refactoring to deal with non-hex entries if we want them.\n\n# Add the CSS colors, courtesy MIT-licensed code from Dave Eddy:\n# github.com/bahamas10/css-color-names/blob/master/css-color-names.json\n\n_color_dict = {\n \"k\": '#000000',\n \"w\": '#FFFFFF',\n \"r\": '#FF0000',\n \"g\": '#00FF00',\n \"b\": '#0000FF',\n \"y\": '#FFFF00',\n \"m\": '#FF00FF',\n \"c\": '#00FFFF',\n \"aqua\": \"#00ffff\",\n \"aliceblue\": \"#f0f8ff\",\n \"antiquewhite\": \"#faebd7\",\n \"black\": \"#000000\",\n \"blue\": \"#0000ff\",\n \"cyan\": \"#00ffff\",\n \"darkblue\": \"#00008b\",\n \"darkcyan\": \"#008b8b\",\n \"darkgreen\": \"#006400\",\n \"darkturquoise\": \"#00ced1\",\n \"deepskyblue\": \"#00bfff\",\n \"green\": \"#008000\",\n \"lime\": \"#00ff00\",\n \"mediumblue\": \"#0000cd\",\n \"mediumspringgreen\": \"#00fa9a\",\n \"navy\": \"#000080\",\n \"springgreen\": \"#00ff7f\",\n \"teal\": \"#008080\",\n \"midnightblue\": \"#191970\",\n \"dodgerblue\": \"#1e90ff\",\n \"lightseagreen\": \"#20b2aa\",\n \"forestgreen\": \"#228b22\",\n \"seagreen\": \"#2e8b57\",\n \"darkslategray\": \"#2f4f4f\",\n \"darkslategrey\": \"#2f4f4f\",\n \"limegreen\": \"#32cd32\",\n \"mediumseagreen\": \"#3cb371\",\n \"turquoise\": \"#40e0d0\",\n \"royalblue\": \"#4169e1\",\n \"steelblue\": \"#4682b4\",\n \"darkslateblue\": \"#483d8b\",\n \"mediumturquoise\": \"#48d1cc\",\n \"indigo\": \"#4b0082\",\n \"darkolivegreen\": \"#556b2f\",\n \"cadetblue\": \"#5f9ea0\",\n \"cornflowerblue\": \"#6495ed\",\n \"mediumaquamarine\": \"#66cdaa\",\n \"dimgray\": \"#696969\",\n \"dimgrey\": \"#696969\",\n \"slateblue\": \"#6a5acd\",\n \"olivedrab\": \"#6b8e23\",\n \"slategray\": \"#708090\",\n \"slategrey\": \"#708090\",\n \"lightslategray\": \"#778899\",\n \"lightslategrey\": \"#778899\",\n \"mediumslateblue\": \"#7b68ee\",\n \"lawngreen\": \"#7cfc00\",\n \"aquamarine\": \"#7fffd4\",\n \"chartreuse\": \"#7fff00\",\n \"gray\": \"#808080\",\n \"grey\": \"#808080\",\n \"maroon\": \"#800000\",\n \"olive\": \"#808000\",\n \"purple\": \"#800080\",\n \"lightskyblue\": \"#87cefa\",\n \"skyblue\": \"#87ceeb\",\n \"blueviolet\": \"#8a2be2\",\n \"darkmagenta\": \"#8b008b\",\n \"darkred\": \"#8b0000\",\n \"saddlebrown\": \"#8b4513\",\n \"darkseagreen\": \"#8fbc8f\",\n \"lightgreen\": \"#90ee90\",\n \"mediumpurple\": \"#9370db\",\n \"darkviolet\": \"#9400d3\",\n \"palegreen\": \"#98fb98\",\n \"darkorchid\": \"#9932cc\",\n \"yellowgreen\": \"#9acd32\",\n \"sienna\": \"#a0522d\",\n \"brown\": \"#a52a2a\",\n \"darkgray\": \"#a9a9a9\",\n \"darkgrey\": \"#a9a9a9\",\n \"greenyellow\": \"#adff2f\",\n \"lightblue\": \"#add8e6\",\n \"paleturquoise\": \"#afeeee\",\n \"lightsteelblue\": \"#b0c4de\",\n \"powderblue\": \"#b0e0e6\",\n \"firebrick\": \"#b22222\",\n \"darkgoldenrod\": \"#b8860b\",\n \"mediumorchid\": \"#ba55d3\",\n \"rosybrown\": \"#bc8f8f\",\n \"darkkhaki\": \"#bdb76b\",\n \"silver\": \"#c0c0c0\",\n \"mediumvioletred\": \"#c71585\",\n \"indianred\": \"#cd5c5c\",\n \"peru\": \"#cd853f\",\n \"chocolate\": \"#d2691e\",\n \"tan\": \"#d2b48c\",\n \"lightgray\": \"#d3d3d3\",\n \"lightgrey\": \"#d3d3d3\",\n \"thistle\": \"#d8bfd8\",\n \"goldenrod\": \"#daa520\",\n \"orchid\": \"#da70d6\",\n \"palevioletred\": \"#db7093\",\n \"crimson\": \"#dc143c\",\n \"gainsboro\": \"#dcdcdc\",\n \"plum\": \"#dda0dd\",\n \"burlywood\": \"#deb887\",\n \"lightcyan\": \"#e0ffff\",\n \"lavender\": \"#e6e6fa\",\n \"darksalmon\": \"#e9967a\",\n \"palegoldenrod\": \"#eee8aa\",\n \"violet\": \"#ee82ee\",\n \"azure\": \"#f0ffff\",\n \"honeydew\": \"#f0fff0\",\n \"khaki\": \"#f0e68c\",\n \"lightcoral\": \"#f08080\",\n \"sandybrown\": \"#f4a460\",\n \"beige\": \"#f5f5dc\",\n \"mintcream\": \"#f5fffa\",\n \"wheat\": \"#f5deb3\",\n \"whitesmoke\": \"#f5f5f5\",\n \"ghostwhite\": \"#f8f8ff\",\n \"lightgoldenrodyellow\": \"#fafad2\",\n \"linen\": \"#faf0e6\",\n \"salmon\": \"#fa8072\",\n \"oldlace\": \"#fdf5e6\",\n \"bisque\": \"#ffe4c4\",\n \"blanchedalmond\": \"#ffebcd\",\n \"coral\": \"#ff7f50\",\n \"cornsilk\": \"#fff8dc\",\n \"darkorange\": \"#ff8c00\",\n \"deeppink\": \"#ff1493\",\n \"floralwhite\": \"#fffaf0\",\n \"fuchsia\": \"#ff00ff\",\n \"gold\": \"#ffd700\",\n \"hotpink\": \"#ff69b4\",\n \"ivory\": \"#fffff0\",\n \"lavenderblush\": \"#fff0f5\",\n \"lemonchiffon\": \"#fffacd\",\n \"lightpink\": \"#ffb6c1\",\n \"lightsalmon\": \"#ffa07a\",\n \"lightyellow\": \"#ffffe0\",\n \"magenta\": \"#ff00ff\",\n \"mistyrose\": \"#ffe4e1\",\n \"moccasin\": \"#ffe4b5\",\n \"navajowhite\": \"#ffdead\",\n \"orange\": \"#ffa500\",\n \"orangered\": \"#ff4500\",\n \"papayawhip\": \"#ffefd5\",\n \"peachpuff\": \"#ffdab9\",\n \"pink\": \"#ffc0cb\",\n \"red\": \"#ff0000\",\n \"seashell\": \"#fff5ee\",\n \"snow\": \"#fffafa\",\n \"tomato\": \"#ff6347\",\n \"white\": \"#ffffff\",\n \"yellow\": \"#ffff00\",\n \"transparent\": \"#00000000\",\n}\n", "path": "vispy/color/_color_dict.py" } ]
diff --git a/vispy/color/_color_dict.py b/vispy/color/_color_dict.py index e4f5007007..119194a699 100644 --- a/vispy/color/_color_dict.py +++ b/vispy/color/_color_dict.py @@ -190,4 +190,5 @@ def get_color_dict(): "tomato": "#ff6347", "white": "#ffffff", "yellow": "#ffff00", + "transparent": "#00000000", }
InstaPy__InstaPy-4046
Instapy-chromedriver not supporting latest Chrome browser version The Instapy-chrome driver only supports Chrome upto versions 71 and since the update, the whole program quits with the error of ensure chromedriver is installed at .../insta-py/chromedriver_linux64..
[ { "content": "# flake8: noqa\n\nfrom .instapy import InstaPy\nfrom .util import smart_run\nfrom .settings import Settings\nfrom .file_manager import set_workspace\nfrom .file_manager import get_workspace\n\n\n# __variables__ with double-quoted values will be available in setup.py\n__version__ = \"0.2.1\"\n\n", "path": "instapy/__init__.py" } ]
[ { "content": "# flake8: noqa\n\nfrom .instapy import InstaPy\nfrom .util import smart_run\nfrom .settings import Settings\nfrom .file_manager import set_workspace\nfrom .file_manager import get_workspace\n\n\n# __variables__ with double-quoted values will be available in setup.py\n__version__ = \"0.2.2\"\n\n", "path": "instapy/__init__.py" } ]
diff --git a/CHANGELOG.md b/CHANGELOG.md index 35d1ba268..b61cf3c47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ The **goal** of this file is explaining to the users of our project the notable _The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)_. +## [0.2.2] - 2019-02-21 +### Fixed +- Chromedriver requirementnow >= 2.44 instead of == 2.44 + + ## [0.2.1] - 2019-02-21 ### Fixed - xPath for Log In button diff --git a/instapy/__init__.py b/instapy/__init__.py index 0ea6a74a2..82c94dc97 100644 --- a/instapy/__init__.py +++ b/instapy/__init__.py @@ -8,5 +8,5 @@ # __variables__ with double-quoted values will be available in setup.py -__version__ = "0.2.1" +__version__ = "0.2.2" diff --git a/requirements.txt b/requirements.txt index 08d352dfa..fb4ddf825 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,4 +18,4 @@ urllib3>=1.24.1 regex>=2018.11.22 MeaningCloud-python>=1.1.1 PyYAML>=3.13 -instapy-chromedriver==2.44 +instapy-chromedriver>=2.44
elastic__apm-agent-python-1494
[META 576] Sanitize `*auth*` instead of `authorization` [![issue details](https://img.shields.io/endpoint?label=meta-issue:&url=https%3A%2F%2Fgiss.app.elstc.co%2Fapi%2Fstatus%2Felastic%2Fapm%2F576)](https://github.com/elastic/apm/issues/576) [![issue details](https://img.shields.io/endpoint?label=spec-issue:&url=https%3A%2F%2Fgiss.app.elstc.co%2Fapi%2Fstatus%2Felastic%2Fapm%2F577)](https://github.com/elastic/apm/issues/577) Sanitize `*auth*` instead of `authorization`
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice, this\n# list of conditions and the following disclaimer.\n#\n# * Redistributions in binary form must reproduce the above copyright notice,\n# this list of conditions and the following disclaimer in the documentation\n# and/or other materials provided with the distribution.\n#\n# * Neither the name of the copyright holder nor the names of its\n# contributors may be used to endorse or promote products derived from\n# this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nimport decimal\nimport re\nfrom collections import namedtuple\n\n\ndef _starmatch_to_regex(pattern):\n \"\"\"\n This is a duplicate of starmatch_to_regex() in utils/__init__.py\n\n Duplication to avoid circular imports\n \"\"\"\n options = re.DOTALL\n # check if we are case sensitive\n if pattern.startswith(\"(?-i)\"):\n pattern = pattern[5:]\n else:\n options |= re.IGNORECASE\n i, n = 0, len(pattern)\n res = []\n while i < n:\n c = pattern[i]\n i = i + 1\n if c == \"*\":\n res.append(\".*\")\n else:\n res.append(re.escape(c))\n return re.compile(r\"(?:%s)\\Z\" % \"\".join(res), options)\n\n\nEVENTS_API_PATH = \"intake/v2/events\"\nAGENT_CONFIG_PATH = \"config/v1/agents\"\nSERVER_INFO_PATH = \"\"\n\nTRACE_CONTEXT_VERSION = 0\nTRACEPARENT_HEADER_NAME = \"traceparent\"\nTRACEPARENT_LEGACY_HEADER_NAME = \"elastic-apm-traceparent\"\nTRACESTATE_HEADER_NAME = \"tracestate\"\n\nTIMESTAMP_FORMAT = \"%Y-%m-%dT%H:%M:%S.%fZ\"\n\nKEYWORD_MAX_LENGTH = 1024\n\nHTTP_WITH_BODY = {\"POST\", \"PUT\", \"PATCH\", \"DELETE\"}\n\nMASK = \"[REDACTED]\"\n\nEXCEPTION_CHAIN_MAX_DEPTH = 50\n\nERROR = \"error\"\nTRANSACTION = \"transaction\"\nSPAN = \"span\"\nMETRICSET = \"metricset\"\n\nLABEL_RE = re.compile('[.*\"]')\n\nHARDCODED_PROCESSORS = [\"elasticapm.processors.add_context_lines_to_frames\"]\n\nBASE_SANITIZE_FIELD_NAMES_UNPROCESSED = [\n \"password\",\n \"passwd\",\n \"pwd\",\n \"secret\",\n \"*key\",\n \"*token*\",\n \"*session*\",\n \"*credit*\",\n \"*card*\",\n \"authorization\",\n \"set-cookie\",\n]\n\nBASE_SANITIZE_FIELD_NAMES = [_starmatch_to_regex(x) for x in BASE_SANITIZE_FIELD_NAMES_UNPROCESSED]\n\nOUTCOME = namedtuple(\"OUTCOME\", [\"SUCCESS\", \"FAILURE\", \"UNKNOWN\"])(\n SUCCESS=\"success\", FAILURE=\"failure\", UNKNOWN=\"unknown\"\n)\n\ntry:\n # Python 2\n LABEL_TYPES = (bool, int, long, float, decimal.Decimal)\nexcept NameError:\n # Python 3\n LABEL_TYPES = (bool, int, float, decimal.Decimal)\n\nTRACESTATE = namedtuple(\"TRACESTATE\", [\"SAMPLE_RATE\"])(SAMPLE_RATE=\"s\")\n", "path": "elasticapm/conf/constants.py" } ]
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice, this\n# list of conditions and the following disclaimer.\n#\n# * Redistributions in binary form must reproduce the above copyright notice,\n# this list of conditions and the following disclaimer in the documentation\n# and/or other materials provided with the distribution.\n#\n# * Neither the name of the copyright holder nor the names of its\n# contributors may be used to endorse or promote products derived from\n# this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nimport decimal\nimport re\nfrom collections import namedtuple\n\n\ndef _starmatch_to_regex(pattern):\n \"\"\"\n This is a duplicate of starmatch_to_regex() in utils/__init__.py\n\n Duplication to avoid circular imports\n \"\"\"\n options = re.DOTALL\n # check if we are case sensitive\n if pattern.startswith(\"(?-i)\"):\n pattern = pattern[5:]\n else:\n options |= re.IGNORECASE\n i, n = 0, len(pattern)\n res = []\n while i < n:\n c = pattern[i]\n i = i + 1\n if c == \"*\":\n res.append(\".*\")\n else:\n res.append(re.escape(c))\n return re.compile(r\"(?:%s)\\Z\" % \"\".join(res), options)\n\n\nEVENTS_API_PATH = \"intake/v2/events\"\nAGENT_CONFIG_PATH = \"config/v1/agents\"\nSERVER_INFO_PATH = \"\"\n\nTRACE_CONTEXT_VERSION = 0\nTRACEPARENT_HEADER_NAME = \"traceparent\"\nTRACEPARENT_LEGACY_HEADER_NAME = \"elastic-apm-traceparent\"\nTRACESTATE_HEADER_NAME = \"tracestate\"\n\nTIMESTAMP_FORMAT = \"%Y-%m-%dT%H:%M:%S.%fZ\"\n\nKEYWORD_MAX_LENGTH = 1024\n\nHTTP_WITH_BODY = {\"POST\", \"PUT\", \"PATCH\", \"DELETE\"}\n\nMASK = \"[REDACTED]\"\n\nEXCEPTION_CHAIN_MAX_DEPTH = 50\n\nERROR = \"error\"\nTRANSACTION = \"transaction\"\nSPAN = \"span\"\nMETRICSET = \"metricset\"\n\nLABEL_RE = re.compile('[.*\"]')\n\nHARDCODED_PROCESSORS = [\"elasticapm.processors.add_context_lines_to_frames\"]\n\nBASE_SANITIZE_FIELD_NAMES_UNPROCESSED = [\n \"password\",\n \"passwd\",\n \"pwd\",\n \"secret\",\n \"*key\",\n \"*token*\",\n \"*session*\",\n \"*credit*\",\n \"*card*\",\n \"*auth*\",\n \"set-cookie\",\n]\n\nBASE_SANITIZE_FIELD_NAMES = [_starmatch_to_regex(x) for x in BASE_SANITIZE_FIELD_NAMES_UNPROCESSED]\n\nOUTCOME = namedtuple(\"OUTCOME\", [\"SUCCESS\", \"FAILURE\", \"UNKNOWN\"])(\n SUCCESS=\"success\", FAILURE=\"failure\", UNKNOWN=\"unknown\"\n)\n\ntry:\n # Python 2\n LABEL_TYPES = (bool, int, long, float, decimal.Decimal)\nexcept NameError:\n # Python 3\n LABEL_TYPES = (bool, int, float, decimal.Decimal)\n\nTRACESTATE = namedtuple(\"TRACESTATE\", [\"SAMPLE_RATE\"])(SAMPLE_RATE=\"s\")\n", "path": "elasticapm/conf/constants.py" } ]
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index a9105fc36..6e8023128 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -37,6 +37,7 @@ endif::[] ===== Features * Add OpenTelemetry API bridge {pull}1411[#1411] +* Change default for `sanitize_field_names` to sanitize `*auth*` instead of `authorization` {pull}1494[#1494] [float] ===== Bug fixes diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc index 938d4d038..a43b3e43e 100644 --- a/docs/configuration.asciidoc +++ b/docs/configuration.asciidoc @@ -855,7 +855,7 @@ WARNING: We recommend always including the default set of validators if you cust "*session*", "*credit*", "*card*", - "authorization", + "*auth*", "set-cookie"]` |============ diff --git a/docs/sanitizing-data.asciidoc b/docs/sanitizing-data.asciidoc index 153ea4391..6ecf0073d 100644 --- a/docs/sanitizing-data.asciidoc +++ b/docs/sanitizing-data.asciidoc @@ -59,15 +59,17 @@ ELASTIC_APM = { 'APP_NAME': '<APP-NAME>', 'SECRET_TOKEN': '<SECRET-TOKEN>', 'SANITIZE_FIELD_NAMES': ( - 'My-Sensitive-Field', - 'authorization', - 'password', - 'secret', - 'passwd', - 'token', - 'api_key', - 'access_token', - 'sessionid', + "password", + "passwd", + "pwd", + "secret", + "*key", + "*token*", + "*session*", + "*credit*", + "*card*", + "*auth*", + "set-cookie", ), } ---- diff --git a/elasticapm/conf/constants.py b/elasticapm/conf/constants.py index 4f7a24927..227d7fa08 100644 --- a/elasticapm/conf/constants.py +++ b/elasticapm/conf/constants.py @@ -95,7 +95,7 @@ def _starmatch_to_regex(pattern): "*session*", "*credit*", "*card*", - "authorization", + "*auth*", "set-cookie", ]
getsentry__sentry-67881
Support release field for customized fingerprint rules ### Problem Statement ## Context Sentry's App Hangs collected for iOS Widgets extensions do not accurately reflect whether the extension code is hanging. ## Problem I have disabled app hang collection in widgets in new clients, but old clients will continue to log them, and, under some circumstances, new clients may log some too. App Hangs from widgets may be in their own group or share a group with real app hangs reflected in the main application or other app extensions, they just seem to happen a lot more in the cases they share a group with the main app or extensions. I want to entirely stop collecting these app hangs for old clients, so it does not disrupt my team's ability to triage and resolve real app hangs. If I cannot do this, my team is likely to have app hangs re-open as regressed even though they are not, and there's also likely to be a lot of noise both on alerts and also when browsing app hangs. It will be very difficult to understand what's real and what isn't, as well as whether the issue is actually impacting users and at what level. ## My Solution I went to Fingerprint Rules with the intent to group together all the app hangs coming from widgets releases so that they could be discarded and deleted. Here's the fingerprint rule I tried: ``` tags.mechanism:"AppHang" tags.release:"com.getdropbox.Dropbox.Widgets*" -> widget_app_hangs title="Widget App Hang" ``` But it does not seem that `tags.release` exists? The rule seems to do nothing. ### Solution Brainstorm My intended solution would work, I think, if I could access release in some way inside a fingerprint rule. I'm super open to other solutions for my problem. Something else I tried that doesn't work entirely: I can use inbound filters to drop all things from widgets, but the issue is that I still want things from widgets, I just don't want app hangs from widgets. So that does not help solve the whole issue, only most of it. I can drop those older versions entirely, at the expense of losing all their error reports, but some newer versions will have a (bad) cached value for the feature gate used to control whether we collect app hangs on widgets, that may live for a very long time. ### Product Area Ingestion and Filtering ┆Issue is synchronized with this [Jira Improvement](https://getsentry.atlassian.net/browse/FEEDBACK-2132) by [Unito](https://www.unito.io)
[ { "content": "from __future__ import annotations\n\nimport inspect\nimport logging\nfrom collections.abc import Sequence\nfrom pathlib import Path\n\nfrom django.conf import settings\nfrom parsimonious.exceptions import ParseError\nfrom parsimonious.grammar import Grammar\nfrom parsimonious.nodes import NodeVisitor\n\nfrom sentry.grouping.utils import get_rule_bool\nfrom sentry.stacktraces.functions import get_function_name_for_frame\nfrom sentry.stacktraces.platform import get_behavior_family_for_platform\nfrom sentry.utils.event_frames import find_stack_frames\nfrom sentry.utils.glob import glob_match\nfrom sentry.utils.safe import get_path\nfrom sentry.utils.strings import unescape_string\nfrom sentry.utils.tag_normalization import normalized_sdk_tag_from_event\n\nlogger = logging.getLogger(__name__)\n\nVERSION = 1\n\nCONFIGS_DIR: Path = Path(__file__).with_name(\"configs\")\n\n# Grammar is defined in EBNF syntax.\nfingerprinting_grammar = Grammar(\n r\"\"\"\n\nfingerprinting_rules = line*\n\nline = _ (comment / rule / empty) newline?\n\nrule = _ matchers _ follow _ fingerprint\n\nmatchers = matcher+\nmatcher = _ negation? matcher_type sep argument\nmatcher_type = key / quoted_key\nargument = quoted / unquoted\n\nkey = ~r\"[a-zA-Z0-9_\\.-]+\"\nquoted_key = ~r\"\\\"([a-zA-Z0-9_\\.:-]+)\\\"\"\n\nfingerprint = fp_value+\nfp_value = _ fp_argument _ \",\"?\nfp_argument = fp_attribute / quoted / unquoted_no_comma\nfp_attribute = key \"=\" quoted\n\ncomment = ~r\"#[^\\r\\n]*\"\n\nquoted = ~r'\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"'\nunquoted = ~r\"\\S+\"\nunquoted_no_comma = ~r\"((?:\\{\\{\\s*\\S+\\s*\\}\\})|(?:[^\\s\\{,]+))\"\n\nfollow = \"->\"\nsep = \":\"\nspace = \" \"\nempty = \"\"\nnegation = \"!\"\nnewline = ~r\"[\\r\\n]\"\n_ = space*\n\n\"\"\"\n)\n\n\nclass InvalidFingerprintingConfig(Exception):\n pass\n\n\nclass EventAccess:\n def __init__(self, event):\n self.event = event\n self._exceptions = None\n self._frames = None\n self._messages = None\n self._log_info = None\n self._toplevel = None\n self._tags = None\n self._sdk = None\n self._family = None\n\n def get_messages(self):\n if self._messages is None:\n self._messages = []\n message = get_path(self.event, \"logentry\", \"formatted\", filter=True)\n if message:\n self._messages.append(\n {\n \"message\": message,\n }\n )\n return self._messages\n\n def get_log_info(self):\n if self._log_info is None:\n log_info = {}\n logger = get_path(self.event, \"logger\", filter=True)\n if logger:\n log_info[\"logger\"] = logger\n level = get_path(self.event, \"level\", filter=True)\n if level:\n log_info[\"level\"] = level\n if log_info:\n self._log_info = [log_info]\n else:\n self._log_info = []\n return self._log_info\n\n def get_exceptions(self):\n if self._exceptions is None:\n self._exceptions = []\n for exc in get_path(self.event, \"exception\", \"values\", filter=True) or ():\n self._exceptions.append(\n {\n \"type\": exc.get(\"type\"),\n \"value\": exc.get(\"value\"),\n }\n )\n return self._exceptions\n\n def _push_frame(self, frame):\n platform = frame.get(\"platform\") or self.event.get(\"platform\")\n func = get_function_name_for_frame(frame, platform)\n self._frames.append(\n {\n \"function\": func or \"<unknown>\",\n \"abs_path\": frame.get(\"abs_path\") or frame.get(\"filename\"),\n \"filename\": frame.get(\"filename\"),\n \"module\": frame.get(\"module\"),\n \"package\": frame.get(\"package\"),\n \"app\": frame.get(\"in_app\"),\n }\n )\n\n def get_frames(self, with_functions=False):\n if self._frames is None:\n self._frames = []\n\n find_stack_frames(self.event.data, self._push_frame)\n return self._frames\n\n def get_toplevel(self):\n if self._toplevel is None:\n self._toplevel = self.get_messages() + self.get_exceptions()\n return self._toplevel\n\n def get_tags(self):\n if self._tags is None:\n self._tags = [\n {\"tags.%s\" % k: v for (k, v) in get_path(self.event, \"tags\", filter=True) or ()}\n ]\n return self._tags\n\n def get_sdk(self):\n if self._sdk is None:\n self._sdk = [{\"sdk\": normalized_sdk_tag_from_event(self.event)}]\n return self._sdk\n\n def get_family(self):\n self._family = self._family or [\n {\"family\": get_behavior_family_for_platform(self.event.get(\"platform\"))}\n ]\n return self._family\n\n def get_values(self, match_group):\n return getattr(self, \"get_\" + match_group)()\n\n\nclass FingerprintingRules:\n def __init__(\n self,\n rules,\n changelog=None,\n version=None,\n bases: Sequence[str] | None = None,\n ):\n if version is None:\n version = VERSION\n self.version = version\n self.rules = rules\n self.changelog = changelog\n self.bases = bases or []\n\n def iter_rules(self, include_builtin=True):\n if self.rules:\n yield from self.rules\n if include_builtin:\n for base in self.bases:\n base_rules = FINGERPRINTING_BASES.get(base, [])\n yield from base_rules\n\n def get_fingerprint_values_for_event(self, event):\n if not (self.bases or self.rules):\n return\n access = EventAccess(event)\n for rule in self.iter_rules():\n new_values = rule.get_fingerprint_values_for_event_access(access)\n if new_values is not None:\n return (rule,) + new_values\n\n @classmethod\n def _from_config_structure(cls, data, bases=None):\n version = data[\"version\"]\n if version != VERSION:\n raise ValueError(\"Unknown version\")\n return cls(\n rules=[Rule._from_config_structure(x) for x in data[\"rules\"]],\n version=version,\n bases=bases,\n )\n\n def _to_config_structure(self, include_builtin=False):\n rules = self.iter_rules(include_builtin=include_builtin)\n\n return {\"version\": self.version, \"rules\": [x._to_config_structure() for x in rules]}\n\n def to_json(self, include_builtin=False):\n return self._to_config_structure(include_builtin=include_builtin)\n\n @classmethod\n def from_json(cls, value, bases=None):\n try:\n return cls._from_config_structure(value, bases=bases)\n except (LookupError, AttributeError, TypeError, ValueError) as e:\n raise ValueError(\"invalid fingerprinting config: %s\" % e)\n\n @staticmethod\n def from_config_string(s, bases=None):\n try:\n tree = fingerprinting_grammar.parse(s)\n except ParseError as e:\n context = e.text[e.pos : e.pos + 33]\n if len(context) == 33:\n context = context[:-1] + \"...\"\n raise InvalidFingerprintingConfig(\n f'Invalid syntax near \"{context}\" (line {e.line()}, column {e.column()})'\n )\n return FingerprintingVisitor(bases=bases).visit(tree)\n\n\nclass BuiltInFingerprintingRules(FingerprintingRules):\n \"\"\"\n A FingerprintingRules object that marks all of its rules as built-in\n \"\"\"\n\n @staticmethod\n def from_config_string(s, bases=None):\n fingerprinting_rules = FingerprintingRules.from_config_string(s, bases=bases)\n for r in fingerprinting_rules.rules:\n r.is_builtin = True\n return fingerprinting_rules\n\n @classmethod\n def _from_config_structure(cls, data, bases=None):\n fingerprinting_rules = super()._from_config_structure(data, bases=bases)\n for r in fingerprinting_rules.rules:\n r.is_builtin = True\n return fingerprinting_rules\n\n\nMATCHERS = {\n # discover field names\n \"error.type\": \"type\",\n \"error.value\": \"value\",\n \"stack.module\": \"module\",\n \"stack.abs_path\": \"path\",\n \"stack.package\": \"package\",\n \"stack.function\": \"function\",\n \"message\": \"message\",\n \"logger\": \"logger\",\n \"level\": \"level\",\n # fingerprinting shortened fields\n \"type\": \"type\",\n \"value\": \"value\",\n \"module\": \"module\",\n \"path\": \"path\",\n \"package\": \"package\",\n \"function\": \"function\",\n # fingerprinting specific fields\n \"family\": \"family\",\n \"app\": \"app\",\n \"sdk\": \"sdk\",\n}\n\n\nclass Match:\n def __init__(self, key, pattern, negated=False):\n if key.startswith(\"tags.\"):\n self.key = key\n else:\n try:\n self.key = MATCHERS[key]\n except KeyError:\n raise InvalidFingerprintingConfig(\"Unknown matcher '%s'\" % key)\n self.pattern = pattern\n self.negated = negated\n\n @property\n def match_group(self):\n if self.key == \"message\":\n return \"toplevel\"\n if self.key in (\"logger\", \"level\"):\n return \"log_info\"\n if self.key in (\"type\", \"value\"):\n return \"exceptions\"\n if self.key.startswith(\"tags.\"):\n return \"tags\"\n if self.key == \"sdk\":\n return \"sdk\"\n if self.key == \"family\":\n return \"family\"\n return \"frames\"\n\n def matches(self, values):\n rv = self._positive_match(values)\n if self.negated:\n rv = not rv\n return rv\n\n def _positive_path_match(self, value):\n if value is None:\n return False\n if glob_match(value, self.pattern, ignorecase=True, doublestar=True, path_normalize=True):\n return True\n if not value.startswith(\"/\") and glob_match(\n \"/\" + value, self.pattern, ignorecase=True, doublestar=True, path_normalize=True\n ):\n return True\n return False\n\n def _positive_match(self, values):\n # path is special in that it tests against two values (abs_path and path)\n if self.key == \"path\":\n value = values.get(\"abs_path\")\n if self._positive_path_match(value):\n return True\n alt_value = values.get(\"filename\")\n if alt_value != value:\n if self._positive_path_match(value):\n return True\n return False\n\n # message tests against value as well as this is what users expect\n if self.key == \"message\":\n for key in (\"message\", \"value\"):\n value = values.get(key)\n if value is not None and glob_match(value, self.pattern, ignorecase=True):\n return True\n return False\n\n value = values.get(self.key)\n if value is None:\n return False\n elif self.key == \"package\":\n if self._positive_path_match(value):\n return True\n elif self.key == \"family\":\n flags = self.pattern.split(\",\")\n if \"all\" in flags or value in flags:\n return True\n elif self.key == \"sdk\":\n flags = self.pattern.split(\",\")\n if \"all\" in flags or value in flags:\n return True\n elif self.key == \"app\":\n ref_val = get_rule_bool(self.pattern)\n if ref_val is not None and ref_val == value:\n return True\n elif glob_match(value, self.pattern, ignorecase=self.key in (\"level\", \"value\")):\n return True\n return False\n\n def _to_config_structure(self):\n key = self.key\n if self.negated:\n key = \"!\" + key\n return [key, self.pattern]\n\n @classmethod\n def _from_config_structure(cls, obj):\n key = obj[0]\n if key.startswith(\"!\"):\n key = key[1:]\n negated = True\n else:\n negated = False\n return cls(key, obj[1], negated)\n\n @property\n def text(self):\n return '{}{}:\"{}\"'.format(\n self.negated and \"!\" or \"\",\n self.key,\n self.pattern,\n )\n\n\nclass Rule:\n def __init__(self, matchers, fingerprint, attributes, is_builtin: bool = False):\n self.matchers = matchers\n self.fingerprint = fingerprint\n self.attributes = attributes\n self.is_builtin = is_builtin\n\n def get_fingerprint_values_for_event_access(self, access):\n by_match_group = {}\n for matcher in self.matchers:\n by_match_group.setdefault(matcher.match_group, []).append(matcher)\n\n for match_group, matchers in by_match_group.items():\n for values in access.get_values(match_group):\n if all(x.matches(values) for x in matchers):\n break\n else:\n return\n\n return self.fingerprint, self.attributes\n\n def _to_config_structure(self):\n config_structure = {\n \"matchers\": [x._to_config_structure() for x in self.matchers],\n \"fingerprint\": self.fingerprint,\n \"attributes\": self.attributes,\n }\n\n # only adding this key if it's true to avoid having to change in a bazillion asserts\n if self.is_builtin:\n config_structure[\"is_builtin\"] = True\n return config_structure\n\n @classmethod\n def _from_config_structure(cls, obj):\n return cls(\n [Match._from_config_structure(x) for x in obj[\"matchers\"]],\n obj[\"fingerprint\"],\n obj.get(\"attributes\") or {},\n obj.get(\"is_builtin\") or False,\n )\n\n def to_json(self):\n return self._to_config_structure()\n\n @classmethod\n def from_json(cls, json):\n return cls._from_config_structure(json)\n\n @property\n def text(self):\n return (\n '%s -> \"%s\" %s'\n % (\n \" \".join(x.text for x in self.matchers),\n \"\".join(x for x in self.fingerprint),\n \" \".join(f'{k}=\"{v}\"' for (k, v) in sorted(self.attributes.items())),\n )\n ).rstrip()\n\n\nclass FingerprintingVisitor(NodeVisitor):\n visit_empty = lambda *a: None\n unwrapped_exceptions = (InvalidFingerprintingConfig,)\n\n def __init__(self, bases):\n self.bases = bases\n\n def visit_comment(self, node, children):\n return node.text\n\n def visit_fingerprinting_rules(self, node, children):\n changelog = []\n rules = []\n in_header = True\n for child in children:\n if isinstance(child, str):\n if in_header and child[:2] == \"##\":\n changelog.append(child[2:].rstrip())\n else:\n in_header = False\n elif child is not None:\n rules.append(child)\n in_header = False\n return FingerprintingRules(\n rules=rules,\n changelog=inspect.cleandoc(\"\\n\".join(changelog)).rstrip() or None,\n bases=self.bases,\n )\n\n def visit_line(self, node, children):\n _, line, _ = children\n comment_or_rule_or_empty = line[0]\n if comment_or_rule_or_empty:\n return comment_or_rule_or_empty\n\n def visit_rule(self, node, children):\n _, matcher, _, _, _, (fingerprint, attributes) = children\n return Rule(matcher, fingerprint, attributes)\n\n def visit_matcher(self, node, children):\n _, negation, ty, _, argument = children\n return Match(ty, argument, bool(negation))\n\n def visit_matcher_type(self, node, children):\n return children[0]\n\n def visit_argument(self, node, children):\n return children[0]\n\n visit_fp_argument = visit_argument\n\n def visit_fingerprint(self, node, children):\n fingerprint = []\n attributes = {}\n for item in children:\n if isinstance(item, tuple):\n key, value = item\n attributes[key] = value\n else:\n fingerprint.append(item)\n return fingerprint, attributes\n\n def visit_fp_value(self, node, children):\n _, argument, _, _ = children\n return argument\n\n def visit_fp_attribute(self, node, children):\n key, _, value = children\n if key != \"title\":\n raise InvalidFingerprintingConfig(\"Unknown attribute '%s'\" % key)\n return (key, value)\n\n def visit_quoted(self, node, children):\n return unescape_string(node.text[1:-1])\n\n def visit_unquoted(self, node, children):\n return node.text\n\n visit_unquoted_no_comma = visit_unquoted\n\n def generic_visit(self, node, children):\n return children\n\n def visit_key(self, node, children):\n return node.text\n\n def visit_quoted_key(self, node, children):\n # leading ! are used to indicate negation. make sure they don't appear.\n return node.match.groups()[0].lstrip(\"!\")\n\n\ndef _load_configs():\n if not CONFIGS_DIR.exists():\n logger.error(\n \"Failed to load Fingerprinting Configs, invalid _config_dir: %s\",\n CONFIGS_DIR,\n )\n if settings.DEBUG:\n raise Exception(\n f\"Failed to load Fingerprinting Configs, invalid _config_dir: '{CONFIGS_DIR}'\"\n )\n\n configs = {}\n\n for config_file_path in sorted(CONFIGS_DIR.glob(\"**/*.txt\")):\n config_name = config_file_path.parent.name\n configs.setdefault(config_name, [])\n\n try:\n with open(config_file_path) as config_file:\n str_conf = config_file.read().rstrip()\n configs[config_name].extend(\n BuiltInFingerprintingRules.from_config_string(str_conf).rules\n )\n except InvalidFingerprintingConfig:\n logger.exception(\n \"Fingerprinting Config %s Invalid\",\n config_file_path,\n )\n if settings.DEBUG:\n raise\n except Exception:\n logger.exception(\n \"Failed to load Fingerprinting Config %s\",\n config_file_path,\n )\n if settings.DEBUG:\n raise\n\n return configs\n\n\nFINGERPRINTING_BASES = _load_configs()\n", "path": "src/sentry/grouping/fingerprinting/__init__.py" } ]
[ { "content": "from __future__ import annotations\n\nimport inspect\nimport logging\nfrom collections.abc import Sequence\nfrom pathlib import Path\n\nfrom django.conf import settings\nfrom parsimonious.exceptions import ParseError\nfrom parsimonious.grammar import Grammar\nfrom parsimonious.nodes import NodeVisitor\n\nfrom sentry.grouping.utils import get_rule_bool\nfrom sentry.stacktraces.functions import get_function_name_for_frame\nfrom sentry.stacktraces.platform import get_behavior_family_for_platform\nfrom sentry.utils.event_frames import find_stack_frames\nfrom sentry.utils.glob import glob_match\nfrom sentry.utils.safe import get_path\nfrom sentry.utils.strings import unescape_string\nfrom sentry.utils.tag_normalization import normalized_sdk_tag_from_event\n\nlogger = logging.getLogger(__name__)\n\nVERSION = 1\n\nCONFIGS_DIR: Path = Path(__file__).with_name(\"configs\")\n\n# Grammar is defined in EBNF syntax.\nfingerprinting_grammar = Grammar(\n r\"\"\"\n\nfingerprinting_rules = line*\n\nline = _ (comment / rule / empty) newline?\n\nrule = _ matchers _ follow _ fingerprint\n\nmatchers = matcher+\nmatcher = _ negation? matcher_type sep argument\nmatcher_type = key / quoted_key\nargument = quoted / unquoted\n\nkey = ~r\"[a-zA-Z0-9_\\.-]+\"\nquoted_key = ~r\"\\\"([a-zA-Z0-9_\\.:-]+)\\\"\"\n\nfingerprint = fp_value+\nfp_value = _ fp_argument _ \",\"?\nfp_argument = fp_attribute / quoted / unquoted_no_comma\nfp_attribute = key \"=\" quoted\n\ncomment = ~r\"#[^\\r\\n]*\"\n\nquoted = ~r'\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"'\nunquoted = ~r\"\\S+\"\nunquoted_no_comma = ~r\"((?:\\{\\{\\s*\\S+\\s*\\}\\})|(?:[^\\s\\{,]+))\"\n\nfollow = \"->\"\nsep = \":\"\nspace = \" \"\nempty = \"\"\nnegation = \"!\"\nnewline = ~r\"[\\r\\n]\"\n_ = space*\n\n\"\"\"\n)\n\n\nclass InvalidFingerprintingConfig(Exception):\n pass\n\n\nclass EventAccess:\n def __init__(self, event):\n self.event = event\n self._exceptions = None\n self._frames = None\n self._messages = None\n self._log_info = None\n self._toplevel = None\n self._tags = None\n self._sdk = None\n self._family = None\n\n def get_messages(self):\n if self._messages is None:\n self._messages = []\n message = get_path(self.event, \"logentry\", \"formatted\", filter=True)\n if message:\n self._messages.append(\n {\n \"message\": message,\n }\n )\n return self._messages\n\n def get_log_info(self):\n if self._log_info is None:\n log_info = {}\n logger = get_path(self.event, \"logger\", filter=True)\n if logger:\n log_info[\"logger\"] = logger\n level = get_path(self.event, \"level\", filter=True)\n if level:\n log_info[\"level\"] = level\n if log_info:\n self._log_info = [log_info]\n else:\n self._log_info = []\n return self._log_info\n\n def get_exceptions(self):\n if self._exceptions is None:\n self._exceptions = []\n for exc in get_path(self.event, \"exception\", \"values\", filter=True) or ():\n self._exceptions.append(\n {\n \"type\": exc.get(\"type\"),\n \"value\": exc.get(\"value\"),\n }\n )\n return self._exceptions\n\n def _push_frame(self, frame):\n platform = frame.get(\"platform\") or self.event.get(\"platform\")\n func = get_function_name_for_frame(frame, platform)\n self._frames.append(\n {\n \"function\": func or \"<unknown>\",\n \"abs_path\": frame.get(\"abs_path\") or frame.get(\"filename\"),\n \"filename\": frame.get(\"filename\"),\n \"module\": frame.get(\"module\"),\n \"package\": frame.get(\"package\"),\n \"app\": frame.get(\"in_app\"),\n }\n )\n\n def get_frames(self, with_functions=False):\n if self._frames is None:\n self._frames = []\n\n find_stack_frames(self.event.data, self._push_frame)\n return self._frames\n\n def get_toplevel(self):\n if self._toplevel is None:\n self._toplevel = self.get_messages() + self.get_exceptions()\n return self._toplevel\n\n def get_tags(self):\n if self._tags is None:\n self._tags = [\n {\"tags.%s\" % k: v for (k, v) in get_path(self.event, \"tags\", filter=True) or ()}\n ]\n return self._tags\n\n def get_sdk(self):\n if self._sdk is None:\n self._sdk = [{\"sdk\": normalized_sdk_tag_from_event(self.event)}]\n return self._sdk\n\n def get_family(self):\n self._family = self._family or [\n {\"family\": get_behavior_family_for_platform(self.event.get(\"platform\"))}\n ]\n return self._family\n\n def get_values(self, match_group):\n return getattr(self, \"get_\" + match_group)()\n\n\nclass FingerprintingRules:\n def __init__(\n self,\n rules,\n changelog=None,\n version=None,\n bases: Sequence[str] | None = None,\n ):\n if version is None:\n version = VERSION\n self.version = version\n self.rules = rules\n self.changelog = changelog\n self.bases = bases or []\n\n def iter_rules(self, include_builtin=True):\n if self.rules:\n yield from self.rules\n if include_builtin:\n for base in self.bases:\n base_rules = FINGERPRINTING_BASES.get(base, [])\n yield from base_rules\n\n def get_fingerprint_values_for_event(self, event):\n if not (self.bases or self.rules):\n return\n access = EventAccess(event)\n for rule in self.iter_rules():\n new_values = rule.get_fingerprint_values_for_event_access(access)\n if new_values is not None:\n return (rule,) + new_values\n\n @classmethod\n def _from_config_structure(cls, data, bases=None):\n version = data[\"version\"]\n if version != VERSION:\n raise ValueError(\"Unknown version\")\n return cls(\n rules=[Rule._from_config_structure(x) for x in data[\"rules\"]],\n version=version,\n bases=bases,\n )\n\n def _to_config_structure(self, include_builtin=False):\n rules = self.iter_rules(include_builtin=include_builtin)\n\n return {\"version\": self.version, \"rules\": [x._to_config_structure() for x in rules]}\n\n def to_json(self, include_builtin=False):\n return self._to_config_structure(include_builtin=include_builtin)\n\n @classmethod\n def from_json(cls, value, bases=None):\n try:\n return cls._from_config_structure(value, bases=bases)\n except (LookupError, AttributeError, TypeError, ValueError) as e:\n raise ValueError(\"invalid fingerprinting config: %s\" % e)\n\n @staticmethod\n def from_config_string(s, bases=None):\n try:\n tree = fingerprinting_grammar.parse(s)\n except ParseError as e:\n context = e.text[e.pos : e.pos + 33]\n if len(context) == 33:\n context = context[:-1] + \"...\"\n raise InvalidFingerprintingConfig(\n f'Invalid syntax near \"{context}\" (line {e.line()}, column {e.column()})'\n )\n return FingerprintingVisitor(bases=bases).visit(tree)\n\n\nclass BuiltInFingerprintingRules(FingerprintingRules):\n \"\"\"\n A FingerprintingRules object that marks all of its rules as built-in\n \"\"\"\n\n @staticmethod\n def from_config_string(s, bases=None):\n fingerprinting_rules = FingerprintingRules.from_config_string(s, bases=bases)\n for r in fingerprinting_rules.rules:\n r.is_builtin = True\n return fingerprinting_rules\n\n @classmethod\n def _from_config_structure(cls, data, bases=None):\n fingerprinting_rules = super()._from_config_structure(data, bases=bases)\n for r in fingerprinting_rules.rules:\n r.is_builtin = True\n return fingerprinting_rules\n\n\nMATCHERS = {\n # discover field names\n \"error.type\": \"type\",\n \"error.value\": \"value\",\n \"stack.module\": \"module\",\n \"stack.abs_path\": \"path\",\n \"stack.package\": \"package\",\n \"stack.function\": \"function\",\n \"message\": \"message\",\n \"logger\": \"logger\",\n \"level\": \"level\",\n # fingerprinting shortened fields\n \"type\": \"type\",\n \"value\": \"value\",\n \"module\": \"module\",\n \"path\": \"path\",\n \"package\": \"package\",\n \"function\": \"function\",\n # fingerprinting specific fields\n \"family\": \"family\",\n \"app\": \"app\",\n \"sdk\": \"sdk\",\n \"release\": \"release\",\n}\n\n\nclass Match:\n def __init__(self, key, pattern, negated=False):\n if key.startswith(\"tags.\"):\n self.key = key\n else:\n try:\n self.key = MATCHERS[key]\n except KeyError:\n raise InvalidFingerprintingConfig(\"Unknown matcher '%s'\" % key)\n self.pattern = pattern\n self.negated = negated\n\n @property\n def match_group(self):\n if self.key == \"message\":\n return \"toplevel\"\n if self.key in (\"logger\", \"level\"):\n return \"log_info\"\n if self.key in (\"type\", \"value\"):\n return \"exceptions\"\n if self.key.startswith(\"tags.\"):\n return \"tags\"\n if self.key == \"sdk\":\n return \"sdk\"\n if self.key == \"family\":\n return \"family\"\n return \"frames\"\n\n def matches(self, values):\n rv = self._positive_match(values)\n if self.negated:\n rv = not rv\n return rv\n\n def _positive_path_match(self, value):\n if value is None:\n return False\n if glob_match(value, self.pattern, ignorecase=True, doublestar=True, path_normalize=True):\n return True\n if not value.startswith(\"/\") and glob_match(\n \"/\" + value, self.pattern, ignorecase=True, doublestar=True, path_normalize=True\n ):\n return True\n return False\n\n def _positive_match(self, values):\n # path is special in that it tests against two values (abs_path and path)\n if self.key == \"path\":\n value = values.get(\"abs_path\")\n if self._positive_path_match(value):\n return True\n alt_value = values.get(\"filename\")\n if alt_value != value:\n if self._positive_path_match(value):\n return True\n return False\n\n # message tests against value as well as this is what users expect\n if self.key == \"message\":\n for key in (\"message\", \"value\"):\n value = values.get(key)\n if value is not None and glob_match(value, self.pattern, ignorecase=True):\n return True\n return False\n\n value = values.get(self.key)\n if value is None:\n return False\n elif self.key == \"package\":\n if self._positive_path_match(value):\n return True\n elif self.key == \"family\":\n flags = self.pattern.split(\",\")\n if \"all\" in flags or value in flags:\n return True\n elif self.key == \"sdk\":\n flags = self.pattern.split(\",\")\n if \"all\" in flags or value in flags:\n return True\n elif self.key == \"app\":\n ref_val = get_rule_bool(self.pattern)\n if ref_val is not None and ref_val == value:\n return True\n elif glob_match(value, self.pattern, ignorecase=self.key in (\"level\", \"value\")):\n return True\n return False\n\n def _to_config_structure(self):\n key = self.key\n if self.negated:\n key = \"!\" + key\n return [key, self.pattern]\n\n @classmethod\n def _from_config_structure(cls, obj):\n key = obj[0]\n if key.startswith(\"!\"):\n key = key[1:]\n negated = True\n else:\n negated = False\n return cls(key, obj[1], negated)\n\n @property\n def text(self):\n return '{}{}:\"{}\"'.format(\n self.negated and \"!\" or \"\",\n self.key,\n self.pattern,\n )\n\n\nclass Rule:\n def __init__(self, matchers, fingerprint, attributes, is_builtin: bool = False):\n self.matchers = matchers\n self.fingerprint = fingerprint\n self.attributes = attributes\n self.is_builtin = is_builtin\n\n def get_fingerprint_values_for_event_access(self, access):\n by_match_group = {}\n for matcher in self.matchers:\n by_match_group.setdefault(matcher.match_group, []).append(matcher)\n\n for match_group, matchers in by_match_group.items():\n for values in access.get_values(match_group):\n if all(x.matches(values) for x in matchers):\n break\n else:\n return\n\n return self.fingerprint, self.attributes\n\n def _to_config_structure(self):\n config_structure = {\n \"matchers\": [x._to_config_structure() for x in self.matchers],\n \"fingerprint\": self.fingerprint,\n \"attributes\": self.attributes,\n }\n\n # only adding this key if it's true to avoid having to change in a bazillion asserts\n if self.is_builtin:\n config_structure[\"is_builtin\"] = True\n return config_structure\n\n @classmethod\n def _from_config_structure(cls, obj):\n return cls(\n [Match._from_config_structure(x) for x in obj[\"matchers\"]],\n obj[\"fingerprint\"],\n obj.get(\"attributes\") or {},\n obj.get(\"is_builtin\") or False,\n )\n\n def to_json(self):\n return self._to_config_structure()\n\n @classmethod\n def from_json(cls, json):\n return cls._from_config_structure(json)\n\n @property\n def text(self):\n return (\n '%s -> \"%s\" %s'\n % (\n \" \".join(x.text for x in self.matchers),\n \"\".join(x for x in self.fingerprint),\n \" \".join(f'{k}=\"{v}\"' for (k, v) in sorted(self.attributes.items())),\n )\n ).rstrip()\n\n\nclass FingerprintingVisitor(NodeVisitor):\n visit_empty = lambda *a: None\n unwrapped_exceptions = (InvalidFingerprintingConfig,)\n\n def __init__(self, bases):\n self.bases = bases\n\n def visit_comment(self, node, children):\n return node.text\n\n def visit_fingerprinting_rules(self, node, children):\n changelog = []\n rules = []\n in_header = True\n for child in children:\n if isinstance(child, str):\n if in_header and child[:2] == \"##\":\n changelog.append(child[2:].rstrip())\n else:\n in_header = False\n elif child is not None:\n rules.append(child)\n in_header = False\n return FingerprintingRules(\n rules=rules,\n changelog=inspect.cleandoc(\"\\n\".join(changelog)).rstrip() or None,\n bases=self.bases,\n )\n\n def visit_line(self, node, children):\n _, line, _ = children\n comment_or_rule_or_empty = line[0]\n if comment_or_rule_or_empty:\n return comment_or_rule_or_empty\n\n def visit_rule(self, node, children):\n _, matcher, _, _, _, (fingerprint, attributes) = children\n return Rule(matcher, fingerprint, attributes)\n\n def visit_matcher(self, node, children):\n _, negation, ty, _, argument = children\n return Match(ty, argument, bool(negation))\n\n def visit_matcher_type(self, node, children):\n return children[0]\n\n def visit_argument(self, node, children):\n return children[0]\n\n visit_fp_argument = visit_argument\n\n def visit_fingerprint(self, node, children):\n fingerprint = []\n attributes = {}\n for item in children:\n if isinstance(item, tuple):\n key, value = item\n attributes[key] = value\n else:\n fingerprint.append(item)\n return fingerprint, attributes\n\n def visit_fp_value(self, node, children):\n _, argument, _, _ = children\n return argument\n\n def visit_fp_attribute(self, node, children):\n key, _, value = children\n if key != \"title\":\n raise InvalidFingerprintingConfig(\"Unknown attribute '%s'\" % key)\n return (key, value)\n\n def visit_quoted(self, node, children):\n return unescape_string(node.text[1:-1])\n\n def visit_unquoted(self, node, children):\n return node.text\n\n visit_unquoted_no_comma = visit_unquoted\n\n def generic_visit(self, node, children):\n return children\n\n def visit_key(self, node, children):\n return node.text\n\n def visit_quoted_key(self, node, children):\n # leading ! are used to indicate negation. make sure they don't appear.\n return node.match.groups()[0].lstrip(\"!\")\n\n\ndef _load_configs():\n if not CONFIGS_DIR.exists():\n logger.error(\n \"Failed to load Fingerprinting Configs, invalid _config_dir: %s\",\n CONFIGS_DIR,\n )\n if settings.DEBUG:\n raise Exception(\n f\"Failed to load Fingerprinting Configs, invalid _config_dir: '{CONFIGS_DIR}'\"\n )\n\n configs = {}\n\n for config_file_path in sorted(CONFIGS_DIR.glob(\"**/*.txt\")):\n config_name = config_file_path.parent.name\n configs.setdefault(config_name, [])\n\n try:\n with open(config_file_path) as config_file:\n str_conf = config_file.read().rstrip()\n configs[config_name].extend(\n BuiltInFingerprintingRules.from_config_string(str_conf).rules\n )\n except InvalidFingerprintingConfig:\n logger.exception(\n \"Fingerprinting Config %s Invalid\",\n config_file_path,\n )\n if settings.DEBUG:\n raise\n except Exception:\n logger.exception(\n \"Failed to load Fingerprinting Config %s\",\n config_file_path,\n )\n if settings.DEBUG:\n raise\n\n return configs\n\n\nFINGERPRINTING_BASES = _load_configs()\n", "path": "src/sentry/grouping/fingerprinting/__init__.py" } ]
diff --git a/src/sentry/grouping/fingerprinting/__init__.py b/src/sentry/grouping/fingerprinting/__init__.py index 038df88af8a1a0..1ed0b115b61f0e 100644 --- a/src/sentry/grouping/fingerprinting/__init__.py +++ b/src/sentry/grouping/fingerprinting/__init__.py @@ -283,6 +283,7 @@ def _from_config_structure(cls, data, bases=None): "family": "family", "app": "app", "sdk": "sdk", + "release": "release", } diff --git a/tests/sentry/grouping/test_fingerprinting.py b/tests/sentry/grouping/test_fingerprinting.py index d91de8381411eb..a10c28f65b0cd9 100644 --- a/tests/sentry/grouping/test_fingerprinting.py +++ b/tests/sentry/grouping/test_fingerprinting.py @@ -130,6 +130,7 @@ def test_discover_field_parsing(insta_snapshot): stack.function:assertion_failed stack.module:foo -> AssertionFailed, foo app:true -> aha app:true -> {{ default }} +release:foo -> {{ default }} """ ) assert rules._to_config_structure() == { @@ -146,6 +147,7 @@ def test_discover_field_parsing(insta_snapshot): }, {"matchers": [["app", "true"]], "fingerprint": ["aha"], "attributes": {}}, {"matchers": [["app", "true"]], "fingerprint": ["{{ default }}"], "attributes": {}}, + {"matchers": [["release", "foo"]], "fingerprint": ["{{ default }}"], "attributes": {}}, ], "version": 1, }
modin-project__modin-7045
ModuleNotFoundError: No module named 'modin.pandas.testing' This module is public and is used quite often. It shouldn't be difficult to maintain, as it has a few functions: ```python __all__ = [ "assert_extension_array_equal", "assert_frame_equal", "assert_series_equal", "assert_index_equal", ] ```
[ { "content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the \"License\"); you may not use this file except in\n# compliance with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software distributed under\n# the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n# ANY KIND, either express or implied. See the License for the specific language\n# governing permissions and limitations under the License.\n\nimport warnings\n\nimport pandas\nfrom packaging import version\n\n__pandas_version__ = \"2.2\"\n\nif (\n version.parse(pandas.__version__).release[:2]\n != version.parse(__pandas_version__).release[:2]\n):\n warnings.warn(\n f\"The pandas version installed ({pandas.__version__}) does not match the supported pandas version in\"\n + f\" Modin ({__pandas_version__}.X). This may cause undesired side effects!\"\n )\n\n# The extensions assigned to this module\n_PD_EXTENSIONS_ = {}\n\n# to not pollute namespace\ndel version\n\nwith warnings.catch_warnings():\n warnings.simplefilter(\"ignore\")\n from pandas import (\n eval,\n factorize,\n test,\n date_range,\n period_range,\n Index,\n MultiIndex,\n CategoricalIndex,\n bdate_range,\n DatetimeIndex,\n Timedelta,\n Timestamp,\n set_eng_float_format,\n options,\n describe_option,\n set_option,\n get_option,\n reset_option,\n option_context,\n NaT,\n PeriodIndex,\n Categorical,\n Interval,\n UInt8Dtype,\n UInt16Dtype,\n UInt32Dtype,\n UInt64Dtype,\n SparseDtype,\n Int8Dtype,\n Int16Dtype,\n Int32Dtype,\n Int64Dtype,\n StringDtype,\n BooleanDtype,\n CategoricalDtype,\n DatetimeTZDtype,\n IntervalDtype,\n PeriodDtype,\n RangeIndex,\n TimedeltaIndex,\n IntervalIndex,\n IndexSlice,\n Grouper,\n array,\n Period,\n DateOffset,\n timedelta_range,\n infer_freq,\n interval_range,\n ExcelWriter,\n NamedAgg,\n NA,\n api,\n ArrowDtype,\n Flags,\n Float32Dtype,\n Float64Dtype,\n from_dummies,\n )\n\nimport os\n\nfrom modin.config import Parameter\n\n_is_first_update = {}\n\n\ndef _update_engine(publisher: Parameter):\n from modin.config import (\n CpuCount,\n Engine,\n IsExperimental,\n StorageFormat,\n ValueSource,\n )\n\n # Set this so that Pandas doesn't try to multithread by itself\n os.environ[\"OMP_NUM_THREADS\"] = \"1\"\n\n sfmt = StorageFormat.get()\n\n if sfmt == \"Hdk\":\n is_hdk = True\n elif sfmt == \"Omnisci\":\n is_hdk = True\n StorageFormat.put(\"Hdk\")\n warnings.warn(\n \"The OmniSci storage format has been deprecated. Please use \"\n + '`StorageFormat.put(\"hdk\")` or `MODIN_STORAGE_FORMAT=\"hdk\"` instead.'\n )\n else:\n is_hdk = False\n\n if is_hdk and publisher.get_value_source() == ValueSource.DEFAULT:\n publisher.put(\"Native\")\n IsExperimental.put(True)\n if (\n publisher.get() == \"Native\"\n and StorageFormat.get_value_source() == ValueSource.DEFAULT\n ):\n is_hdk = True\n StorageFormat.put(\"Hdk\")\n IsExperimental.put(True)\n\n if publisher.get() == \"Ray\":\n if _is_first_update.get(\"Ray\", True):\n from modin.core.execution.ray.common import initialize_ray\n\n initialize_ray()\n elif publisher.get() == \"Native\":\n # With HDK storage format there is only a single worker per node\n # and we allow it to work on all cores.\n if is_hdk:\n os.environ[\"OMP_NUM_THREADS\"] = str(CpuCount.get())\n else:\n raise ValueError(\n f\"Storage format should be 'Hdk' with 'Native' engine, but provided {sfmt}.\"\n )\n elif publisher.get() == \"Dask\":\n if _is_first_update.get(\"Dask\", True):\n from modin.core.execution.dask.common import initialize_dask\n\n initialize_dask()\n elif publisher.get() == \"Unidist\":\n if _is_first_update.get(\"Unidist\", True):\n from modin.core.execution.unidist.common import initialize_unidist\n\n initialize_unidist()\n elif publisher.get() not in Engine.NOINIT_ENGINES:\n raise ImportError(\"Unrecognized execution engine: {}.\".format(publisher.get()))\n\n _is_first_update[publisher.get()] = False\n\n\nfrom modin.pandas import errors\nfrom modin.utils import show_versions\n\nfrom .. import __version__\nfrom .dataframe import DataFrame\nfrom .general import (\n concat,\n crosstab,\n cut,\n get_dummies,\n isna,\n isnull,\n lreshape,\n melt,\n merge,\n merge_asof,\n merge_ordered,\n notna,\n notnull,\n pivot,\n pivot_table,\n qcut,\n to_datetime,\n to_numeric,\n to_timedelta,\n unique,\n value_counts,\n wide_to_long,\n)\nfrom .io import (\n ExcelFile,\n HDFStore,\n json_normalize,\n read_clipboard,\n read_csv,\n read_excel,\n read_feather,\n read_fwf,\n read_gbq,\n read_hdf,\n read_html,\n read_json,\n read_orc,\n read_parquet,\n read_pickle,\n read_sas,\n read_spss,\n read_sql,\n read_sql_query,\n read_sql_table,\n read_stata,\n read_table,\n read_xml,\n to_pickle,\n)\nfrom .plotting import Plotting as plotting\nfrom .series import Series\n\n\ndef __getattr__(name: str):\n \"\"\"\n Overrides getattr on the module to enable extensions.\n\n Parameters\n ----------\n name : str\n The name of the attribute being retrieved.\n\n Returns\n -------\n Attribute\n Returns the extension attribute, if it exists, otherwise returns the attribute\n imported in this file.\n \"\"\"\n try:\n return _PD_EXTENSIONS_.get(name, globals()[name])\n except KeyError:\n raise AttributeError(f\"module 'modin.pandas' has no attribute '{name}'\")\n\n\n__all__ = [ # noqa: F405\n \"_PD_EXTENSIONS_\",\n \"DataFrame\",\n \"Series\",\n \"read_csv\",\n \"read_parquet\",\n \"read_json\",\n \"read_html\",\n \"read_clipboard\",\n \"read_excel\",\n \"read_hdf\",\n \"read_feather\",\n \"read_stata\",\n \"read_sas\",\n \"read_pickle\",\n \"read_sql\",\n \"read_gbq\",\n \"read_table\",\n \"read_spss\",\n \"read_orc\",\n \"json_normalize\",\n \"concat\",\n \"eval\",\n \"cut\",\n \"factorize\",\n \"test\",\n \"qcut\",\n \"to_datetime\",\n \"get_dummies\",\n \"isna\",\n \"isnull\",\n \"merge\",\n \"pivot_table\",\n \"date_range\",\n \"Index\",\n \"MultiIndex\",\n \"Series\",\n \"bdate_range\",\n \"period_range\",\n \"DatetimeIndex\",\n \"to_timedelta\",\n \"set_eng_float_format\",\n \"options\",\n \"describe_option\",\n \"set_option\",\n \"get_option\",\n \"reset_option\",\n \"option_context\",\n \"CategoricalIndex\",\n \"Timedelta\",\n \"Timestamp\",\n \"NaT\",\n \"PeriodIndex\",\n \"Categorical\",\n \"__version__\",\n \"melt\",\n \"crosstab\",\n \"plotting\",\n \"Interval\",\n \"UInt8Dtype\",\n \"UInt16Dtype\",\n \"UInt32Dtype\",\n \"UInt64Dtype\",\n \"SparseDtype\",\n \"Int8Dtype\",\n \"Int16Dtype\",\n \"Int32Dtype\",\n \"Int64Dtype\",\n \"CategoricalDtype\",\n \"DatetimeTZDtype\",\n \"IntervalDtype\",\n \"PeriodDtype\",\n \"BooleanDtype\",\n \"StringDtype\",\n \"NA\",\n \"RangeIndex\",\n \"TimedeltaIndex\",\n \"IntervalIndex\",\n \"IndexSlice\",\n \"Grouper\",\n \"array\",\n \"Period\",\n \"show_versions\",\n \"DateOffset\",\n \"timedelta_range\",\n \"infer_freq\",\n \"interval_range\",\n \"ExcelWriter\",\n \"read_fwf\",\n \"read_sql_table\",\n \"read_sql_query\",\n \"ExcelFile\",\n \"to_pickle\",\n \"HDFStore\",\n \"lreshape\",\n \"wide_to_long\",\n \"merge_asof\",\n \"merge_ordered\",\n \"notnull\",\n \"notna\",\n \"pivot\",\n \"to_numeric\",\n \"unique\",\n \"value_counts\",\n \"NamedAgg\",\n \"api\",\n \"read_xml\",\n \"ArrowDtype\",\n \"Flags\",\n \"Float32Dtype\",\n \"Float64Dtype\",\n \"from_dummies\",\n \"errors\",\n]\n\ndel pandas, Parameter\n", "path": "modin/pandas/__init__.py" } ]
[ { "content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the \"License\"); you may not use this file except in\n# compliance with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software distributed under\n# the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n# ANY KIND, either express or implied. See the License for the specific language\n# governing permissions and limitations under the License.\n\nimport warnings\n\nimport pandas\nfrom packaging import version\n\n__pandas_version__ = \"2.2\"\n\nif (\n version.parse(pandas.__version__).release[:2]\n != version.parse(__pandas_version__).release[:2]\n):\n warnings.warn(\n f\"The pandas version installed ({pandas.__version__}) does not match the supported pandas version in\"\n + f\" Modin ({__pandas_version__}.X). This may cause undesired side effects!\"\n )\n\n# The extensions assigned to this module\n_PD_EXTENSIONS_ = {}\n\n# to not pollute namespace\ndel version\n\nwith warnings.catch_warnings():\n warnings.simplefilter(\"ignore\")\n from pandas import (\n eval,\n factorize,\n test,\n date_range,\n period_range,\n Index,\n MultiIndex,\n CategoricalIndex,\n bdate_range,\n DatetimeIndex,\n Timedelta,\n Timestamp,\n set_eng_float_format,\n options,\n describe_option,\n set_option,\n get_option,\n reset_option,\n option_context,\n NaT,\n PeriodIndex,\n Categorical,\n Interval,\n UInt8Dtype,\n UInt16Dtype,\n UInt32Dtype,\n UInt64Dtype,\n SparseDtype,\n Int8Dtype,\n Int16Dtype,\n Int32Dtype,\n Int64Dtype,\n StringDtype,\n BooleanDtype,\n CategoricalDtype,\n DatetimeTZDtype,\n IntervalDtype,\n PeriodDtype,\n RangeIndex,\n TimedeltaIndex,\n IntervalIndex,\n IndexSlice,\n Grouper,\n array,\n Period,\n DateOffset,\n timedelta_range,\n infer_freq,\n interval_range,\n ExcelWriter,\n NamedAgg,\n NA,\n api,\n ArrowDtype,\n Flags,\n Float32Dtype,\n Float64Dtype,\n from_dummies,\n testing,\n )\n\nimport os\n\nfrom modin.config import Parameter\n\n_is_first_update = {}\n\n\ndef _update_engine(publisher: Parameter):\n from modin.config import (\n CpuCount,\n Engine,\n IsExperimental,\n StorageFormat,\n ValueSource,\n )\n\n # Set this so that Pandas doesn't try to multithread by itself\n os.environ[\"OMP_NUM_THREADS\"] = \"1\"\n\n sfmt = StorageFormat.get()\n\n if sfmt == \"Hdk\":\n is_hdk = True\n elif sfmt == \"Omnisci\":\n is_hdk = True\n StorageFormat.put(\"Hdk\")\n warnings.warn(\n \"The OmniSci storage format has been deprecated. Please use \"\n + '`StorageFormat.put(\"hdk\")` or `MODIN_STORAGE_FORMAT=\"hdk\"` instead.'\n )\n else:\n is_hdk = False\n\n if is_hdk and publisher.get_value_source() == ValueSource.DEFAULT:\n publisher.put(\"Native\")\n IsExperimental.put(True)\n if (\n publisher.get() == \"Native\"\n and StorageFormat.get_value_source() == ValueSource.DEFAULT\n ):\n is_hdk = True\n StorageFormat.put(\"Hdk\")\n IsExperimental.put(True)\n\n if publisher.get() == \"Ray\":\n if _is_first_update.get(\"Ray\", True):\n from modin.core.execution.ray.common import initialize_ray\n\n initialize_ray()\n elif publisher.get() == \"Native\":\n # With HDK storage format there is only a single worker per node\n # and we allow it to work on all cores.\n if is_hdk:\n os.environ[\"OMP_NUM_THREADS\"] = str(CpuCount.get())\n else:\n raise ValueError(\n f\"Storage format should be 'Hdk' with 'Native' engine, but provided {sfmt}.\"\n )\n elif publisher.get() == \"Dask\":\n if _is_first_update.get(\"Dask\", True):\n from modin.core.execution.dask.common import initialize_dask\n\n initialize_dask()\n elif publisher.get() == \"Unidist\":\n if _is_first_update.get(\"Unidist\", True):\n from modin.core.execution.unidist.common import initialize_unidist\n\n initialize_unidist()\n elif publisher.get() not in Engine.NOINIT_ENGINES:\n raise ImportError(\"Unrecognized execution engine: {}.\".format(publisher.get()))\n\n _is_first_update[publisher.get()] = False\n\n\nfrom modin.pandas import errors\nfrom modin.utils import show_versions\n\nfrom .. import __version__\nfrom .dataframe import DataFrame\nfrom .general import (\n concat,\n crosstab,\n cut,\n get_dummies,\n isna,\n isnull,\n lreshape,\n melt,\n merge,\n merge_asof,\n merge_ordered,\n notna,\n notnull,\n pivot,\n pivot_table,\n qcut,\n to_datetime,\n to_numeric,\n to_timedelta,\n unique,\n value_counts,\n wide_to_long,\n)\nfrom .io import (\n ExcelFile,\n HDFStore,\n json_normalize,\n read_clipboard,\n read_csv,\n read_excel,\n read_feather,\n read_fwf,\n read_gbq,\n read_hdf,\n read_html,\n read_json,\n read_orc,\n read_parquet,\n read_pickle,\n read_sas,\n read_spss,\n read_sql,\n read_sql_query,\n read_sql_table,\n read_stata,\n read_table,\n read_xml,\n to_pickle,\n)\nfrom .plotting import Plotting as plotting\nfrom .series import Series\n\n\ndef __getattr__(name: str):\n \"\"\"\n Overrides getattr on the module to enable extensions.\n\n Parameters\n ----------\n name : str\n The name of the attribute being retrieved.\n\n Returns\n -------\n Attribute\n Returns the extension attribute, if it exists, otherwise returns the attribute\n imported in this file.\n \"\"\"\n try:\n return _PD_EXTENSIONS_.get(name, globals()[name])\n except KeyError:\n raise AttributeError(f\"module 'modin.pandas' has no attribute '{name}'\")\n\n\n__all__ = [ # noqa: F405\n \"_PD_EXTENSIONS_\",\n \"DataFrame\",\n \"Series\",\n \"read_csv\",\n \"read_parquet\",\n \"read_json\",\n \"read_html\",\n \"read_clipboard\",\n \"read_excel\",\n \"read_hdf\",\n \"read_feather\",\n \"read_stata\",\n \"read_sas\",\n \"read_pickle\",\n \"read_sql\",\n \"read_gbq\",\n \"read_table\",\n \"read_spss\",\n \"read_orc\",\n \"json_normalize\",\n \"concat\",\n \"eval\",\n \"cut\",\n \"factorize\",\n \"test\",\n \"qcut\",\n \"to_datetime\",\n \"get_dummies\",\n \"isna\",\n \"isnull\",\n \"merge\",\n \"pivot_table\",\n \"date_range\",\n \"Index\",\n \"MultiIndex\",\n \"Series\",\n \"bdate_range\",\n \"period_range\",\n \"DatetimeIndex\",\n \"to_timedelta\",\n \"set_eng_float_format\",\n \"options\",\n \"describe_option\",\n \"set_option\",\n \"get_option\",\n \"reset_option\",\n \"option_context\",\n \"CategoricalIndex\",\n \"Timedelta\",\n \"Timestamp\",\n \"NaT\",\n \"PeriodIndex\",\n \"Categorical\",\n \"__version__\",\n \"melt\",\n \"crosstab\",\n \"plotting\",\n \"Interval\",\n \"UInt8Dtype\",\n \"UInt16Dtype\",\n \"UInt32Dtype\",\n \"UInt64Dtype\",\n \"SparseDtype\",\n \"Int8Dtype\",\n \"Int16Dtype\",\n \"Int32Dtype\",\n \"Int64Dtype\",\n \"CategoricalDtype\",\n \"DatetimeTZDtype\",\n \"IntervalDtype\",\n \"PeriodDtype\",\n \"BooleanDtype\",\n \"StringDtype\",\n \"NA\",\n \"RangeIndex\",\n \"TimedeltaIndex\",\n \"IntervalIndex\",\n \"IndexSlice\",\n \"Grouper\",\n \"array\",\n \"Period\",\n \"show_versions\",\n \"DateOffset\",\n \"timedelta_range\",\n \"infer_freq\",\n \"interval_range\",\n \"ExcelWriter\",\n \"read_fwf\",\n \"read_sql_table\",\n \"read_sql_query\",\n \"ExcelFile\",\n \"to_pickle\",\n \"HDFStore\",\n \"lreshape\",\n \"wide_to_long\",\n \"merge_asof\",\n \"merge_ordered\",\n \"notnull\",\n \"notna\",\n \"pivot\",\n \"to_numeric\",\n \"unique\",\n \"value_counts\",\n \"NamedAgg\",\n \"api\",\n \"read_xml\",\n \"ArrowDtype\",\n \"Flags\",\n \"Float32Dtype\",\n \"Float64Dtype\",\n \"from_dummies\",\n \"errors\",\n]\n\ndel pandas, Parameter\n", "path": "modin/pandas/__init__.py" } ]
diff --git a/modin/pandas/__init__.py b/modin/pandas/__init__.py index 1c40219d55e..d816980f6c0 100644 --- a/modin/pandas/__init__.py +++ b/modin/pandas/__init__.py @@ -94,6 +94,7 @@ Float32Dtype, Float64Dtype, from_dummies, + testing, ) import os diff --git a/modin/pandas/test/dataframe/test_default.py b/modin/pandas/test/dataframe/test_default.py index 96f4dc15868..39a2121ce52 100644 --- a/modin/pandas/test/dataframe/test_default.py +++ b/modin/pandas/test/dataframe/test_default.py @@ -1365,10 +1365,10 @@ def test_setattr_axes(): if StorageFormat.get() != "Hdk": # Not yet supported - #1766 df.index = ["foo", "bar"] # Check that ensure_index was called - pandas.testing.assert_index_equal(df.index, pandas.Index(["foo", "bar"])) + pd.testing.assert_index_equal(df.index, pandas.Index(["foo", "bar"])) df.columns = [9, 10] - pandas.testing.assert_index_equal(df.columns, pandas.Index([9, 10])) + pd.testing.assert_index_equal(df.columns, pandas.Index([9, 10])) @pytest.mark.parametrize("data", test_data_values, ids=test_data_keys) diff --git a/modin/pandas/test/dataframe/test_indexing.py b/modin/pandas/test/dataframe/test_indexing.py index 151ca62f7bb..49a6e7edb25 100644 --- a/modin/pandas/test/dataframe/test_indexing.py +++ b/modin/pandas/test/dataframe/test_indexing.py @@ -18,7 +18,6 @@ import pandas import pytest from pandas._testing import ensure_clean -from pandas.testing import assert_index_equal import modin.pandas as pd from modin.config import MinPartitionSize, NPartitions, StorageFormat @@ -42,6 +41,7 @@ test_data_keys, test_data_values, ) +from modin.pandas.testing import assert_index_equal from modin.utils import get_current_execution NPartitions.put(4) diff --git a/modin/pandas/test/dataframe/test_map_metadata.py b/modin/pandas/test/dataframe/test_map_metadata.py index 27d6669823c..a47ab0cd850 100644 --- a/modin/pandas/test/dataframe/test_map_metadata.py +++ b/modin/pandas/test/dataframe/test_map_metadata.py @@ -15,7 +15,6 @@ import numpy as np import pandas import pytest -from pandas.testing import assert_index_equal, assert_series_equal import modin.pandas as pd from modin.config import NPartitions, StorageFormat @@ -49,6 +48,7 @@ test_func_keys, test_func_values, ) +from modin.pandas.testing import assert_index_equal, assert_series_equal from modin.test.test_utils import warns_that_defaulting_to_pandas from modin.utils import get_current_execution diff --git a/modin/pandas/test/dataframe/test_reduce.py b/modin/pandas/test/dataframe/test_reduce.py index f170b60a744..767b0eff25a 100644 --- a/modin/pandas/test/dataframe/test_reduce.py +++ b/modin/pandas/test/dataframe/test_reduce.py @@ -15,7 +15,6 @@ import numpy as np import pandas import pytest -from pandas._testing import assert_series_equal import modin.pandas as pd from modin.config import Engine, NPartitions, StorageFormat @@ -39,6 +38,7 @@ test_data_large_categorical_dataframe, test_data_values, ) +from modin.pandas.testing import assert_series_equal NPartitions.put(4) diff --git a/modin/pandas/test/test_api.py b/modin/pandas/test/test_api.py index de612469546..d4eb4beb923 100644 --- a/modin/pandas/test/test_api.py +++ b/modin/pandas/test/test_api.py @@ -28,7 +28,6 @@ def test_top_level_api_equality(): ignore_pandas = [ "annotations", "np", - "testing", "tests", "pandas", "core", diff --git a/modin/pandas/test/test_general.py b/modin/pandas/test/test_general.py index 72f33d55d80..abe689aa74b 100644 --- a/modin/pandas/test/test_general.py +++ b/modin/pandas/test/test_general.py @@ -17,11 +17,11 @@ import pandas import pytest from numpy.testing import assert_array_equal -from pandas.testing import assert_frame_equal import modin.pandas as pd from modin.config import StorageFormat from modin.pandas.io import to_pandas +from modin.pandas.testing import assert_frame_equal from modin.test.test_utils import warns_that_defaulting_to_pandas from modin.utils import get_current_execution diff --git a/modin/pandas/test/test_series.py b/modin/pandas/test/test_series.py index a3e03ec8c92..5d6260cd276 100644 --- a/modin/pandas/test/test_series.py +++ b/modin/pandas/test/test_series.py @@ -23,13 +23,13 @@ import pandas._libs.lib as lib import pytest from numpy.testing import assert_array_equal -from pandas._testing import assert_series_equal from pandas.core.indexing import IndexingError from pandas.errors import SpecificationError import modin.pandas as pd from modin.config import NPartitions, StorageFormat from modin.pandas.io import to_pandas +from modin.pandas.testing import assert_series_equal from modin.test.test_utils import warns_that_defaulting_to_pandas from modin.utils import get_current_execution, try_cast_to_pandas diff --git a/modin/pandas/test/utils.py b/modin/pandas/test/utils.py index 58bf2304e97..b350b9aa934 100644 --- a/modin/pandas/test/utils.py +++ b/modin/pandas/test/utils.py @@ -35,16 +35,16 @@ is_string_dtype, is_timedelta64_dtype, ) -from pandas.testing import ( + +import modin.pandas as pd +from modin.config import MinPartitionSize, NPartitions, TestDatasetSize, TrackFileLeaks +from modin.pandas.io import to_pandas +from modin.pandas.testing import ( assert_extension_array_equal, assert_frame_equal, assert_index_equal, assert_series_equal, ) - -import modin.pandas as pd -from modin.config import MinPartitionSize, NPartitions, TestDatasetSize, TrackFileLeaks -from modin.pandas.io import to_pandas from modin.utils import try_cast_to_pandas random_state = np.random.RandomState(seed=42) diff --git a/modin/pandas/testing/__init__.py b/modin/pandas/testing/__init__.py new file mode 100644 index 00000000000..77045307ede --- /dev/null +++ b/modin/pandas/testing/__init__.py @@ -0,0 +1,125 @@ +# Licensed to Modin Development Team under one or more contributor license agreements. +# See the NOTICE file distributed with this work for additional information regarding +# copyright ownership. The Modin Development Team licenses this file to you under the +# Apache License, Version 2.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under +# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific language +# governing permissions and limitations under the License. + +""" +Public testing utility functions. +""" + +from __future__ import annotations + +from typing import Literal + +from pandas._libs import lib +from pandas.testing import assert_extension_array_equal +from pandas.testing import assert_frame_equal as pd_assert_frame_equal +from pandas.testing import assert_index_equal +from pandas.testing import assert_series_equal as pd_assert_series_equal + +from modin.utils import _inherit_docstrings, try_cast_to_pandas + + +@_inherit_docstrings(pd_assert_frame_equal, apilink="pandas.testing.assert_frame_equal") +def assert_frame_equal( + left, + right, + check_dtype: bool | Literal["equiv"] = True, + check_index_type: bool | Literal["equiv"] = "equiv", + check_column_type: bool | Literal["equiv"] = "equiv", + check_frame_type: bool = True, + check_names: bool = True, + by_blocks: bool = False, + check_exact: bool | lib.NoDefault = lib.no_default, + check_datetimelike_compat: bool = False, + check_categorical: bool = True, + check_like: bool = False, + check_freq: bool = True, + check_flags: bool = True, + rtol: float | lib.NoDefault = lib.no_default, + atol: float | lib.NoDefault = lib.no_default, + obj: str = "DataFrame", +) -> None: + left = try_cast_to_pandas(left) + right = try_cast_to_pandas(right) + pd_assert_frame_equal( + left, + right, + check_dtype=check_dtype, + check_index_type=check_index_type, + check_column_type=check_column_type, + check_frame_type=check_frame_type, + check_names=check_names, + by_blocks=by_blocks, + check_exact=check_exact, + check_datetimelike_compat=check_datetimelike_compat, + check_categorical=check_categorical, + check_like=check_like, + check_freq=check_freq, + check_flags=check_flags, + rtol=rtol, + atol=atol, + obj=obj, + ) + + +@_inherit_docstrings( + pd_assert_series_equal, apilink="pandas.testing.assert_series_equal" +) +def assert_series_equal( + left, + right, + check_dtype: bool | Literal["equiv"] = True, + check_index_type: bool | Literal["equiv"] = "equiv", + check_series_type: bool = True, + check_names: bool = True, + check_exact: bool | lib.NoDefault = lib.no_default, + check_datetimelike_compat: bool = False, + check_categorical: bool = True, + check_category_order: bool = True, + check_freq: bool = True, + check_flags: bool = True, + rtol: float | lib.NoDefault = lib.no_default, + atol: float | lib.NoDefault = lib.no_default, + obj: str = "Series", + *, + check_index: bool = True, + check_like: bool = False, +) -> None: + left = try_cast_to_pandas(left) + right = try_cast_to_pandas(right) + pd_assert_series_equal( + left, + right, + check_dtype=check_dtype, + check_index_type=check_index_type, + check_series_type=check_series_type, + check_names=check_names, + check_exact=check_exact, + check_datetimelike_compat=check_datetimelike_compat, + check_categorical=check_categorical, + check_category_order=check_category_order, + check_freq=check_freq, + check_flags=check_flags, + rtol=rtol, + atol=atol, + obj=obj, + check_index=check_index, + check_like=check_like, + ) + + +__all__ = [ + "assert_extension_array_equal", + "assert_frame_equal", + "assert_series_equal", + "assert_index_equal", +]
sanic-org__sanic-1530
Publish 19.3 release to PyPI Thank you for the release 3 days ago! https://github.com/huge-success/sanic/releases/tag/19.3 It's missing from PyPI at the moment: https://pypi.org/project/sanic/#history Please publish it at your convenience 🙇 Keep up the awesome work ❤️
[ { "content": "from sanic.app import Sanic\nfrom sanic.blueprints import Blueprint\n\n\n__version__ = \"19.03.0\"\n\n__all__ = [\"Sanic\", \"Blueprint\"]\n", "path": "sanic/__init__.py" } ]
[ { "content": "from sanic.app import Sanic\nfrom sanic.blueprints import Blueprint\n\n\n__version__ = \"19.03.1\"\n\n__all__ = [\"Sanic\", \"Blueprint\"]\n", "path": "sanic/__init__.py" } ]
diff --git a/sanic/__init__.py b/sanic/__init__.py index 88d1193bc4..c7c69bd45a 100644 --- a/sanic/__init__.py +++ b/sanic/__init__.py @@ -2,6 +2,6 @@ from sanic.blueprints import Blueprint -__version__ = "19.03.0" +__version__ = "19.03.1" __all__ = ["Sanic", "Blueprint"]
mdn__kuma-1830
generate window.waffle without HTTP request See https://github.com/jsocol/django-waffle/pull/100
[ { "content": "# Django settings for kuma project.\nfrom datetime import date\nimport logging\nimport os\nimport platform\nimport json\n\nfrom django.utils.functional import lazy\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom sumo_locales import LOCALES\n\nDEBUG = False\nTEMPLATE_DEBUG = DEBUG\n\nROOT = os.path.dirname(os.path.abspath(__file__))\npath = lambda *a: os.path.join(ROOT, *a)\n\nROOT_PACKAGE = os.path.basename(ROOT)\n\nADMINS = (\n # ('Your Name', '[email protected]'),\n)\n\nPROTOCOL = 'https://'\nDOMAIN = 'developer.mozilla.org'\nSITE_URL = PROTOCOL + DOMAIN\nPRODUCTION_URL = SITE_URL\nUSE_X_FORWARDED_HOST = True\n\nMANAGERS = ADMINS\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n 'NAME': 'kuma', # Or path to database file if using sqlite3.\n 'USER': '', # Not used with sqlite3.\n 'PASSWORD': '', # Not used with sqlite3.\n 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.\n 'PORT': '', # Set to empty string for default. Not used with sqlite3.\n 'OPTIONS': {'init_command': 'SET storage_engine=InnoDB'},\n },\n}\n\nMIGRATION_DATABASES = {\n 'wikidb': {\n 'NAME': 'wikidb',\n 'ENGINE': 'django.db.backends.mysql',\n 'HOST': 'localhost',\n 'USER': 'wikiuser',\n 'PASSWORD': 'wikipass',\n },\n}\n\n# Dekiwiki has a backend API. protocol://hostname:port\n# If set to False, integration with MindTouch / Dekiwiki will be disabled\nDEKIWIKI_ENDPOINT = False # 'https://developer-stage9.mozilla.org'\nDEKIWIKI_APIKEY = 'SET IN LOCAL SETTINGS'\nDEKIWIKI_MOCK = True\n\n# Cache Settings\nCACHE_BACKEND = 'locmem://?timeout=86400'\nCACHE_PREFIX = 'kuma:'\nCACHE_COUNT_TIMEOUT = 60 # seconds\n\nCACHES = {\n 'default': {\n 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',\n 'TIMEOUT': 60,\n 'KEY_PREFIX': 'kuma',\n },\n # NOTE: The 'secondary' cache should be the same as 'default' in\n # settings_local. The only reason it exists is because we had some issues\n # with caching, disabled 'default', and wanted to selectively re-enable\n # caching on a case-by-case basis to resolve the issue.\n 'secondary': {\n 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',\n 'TIMEOUT': 60,\n 'KEY_PREFIX': 'kuma',\n }\n}\n\nSECONDARY_CACHE_ALIAS = 'secondary'\n\n# Addresses email comes from\nDEFAULT_FROM_EMAIL = '[email protected]'\nSERVER_EMAIL = '[email protected]'\n\nPLATFORM_NAME = platform.node()\n\n# Local time zone for this installation. Choices can be found here:\n# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name\n# although not all choices may be available on all operating systems.\n# If running in a Windows environment this must be set to the same as your\n# system time zone.\nTIME_ZONE = 'US/Pacific'\n\n# Language code for this installation. All choices can be found here:\n# http://www.i18nguy.com/unicode/language-identifiers.html\nLANGUAGE_CODE = 'en-US'\n\n# Supported languages\nSUMO_LANGUAGES = (\n 'ak', 'ar', 'as', 'ast', 'bg', 'bn-BD', 'bn-IN', 'bs', 'ca', 'cs', 'da',\n 'de', 'el', 'en-US', 'eo', 'es', 'et', 'eu', 'fa', 'fi', 'fr', 'fur',\n 'fy-NL', 'ga-IE', 'gd', 'gl', 'gu-IN', 'he', 'hi-IN', 'hr', 'hu', 'hy-AM',\n 'id', 'ilo', 'is', 'it', 'ja', 'kk', 'kn', 'ko', 'lt', 'mai', 'mk', 'mn',\n 'mr', 'ms', 'my', 'nb-NO', 'nl', 'no', 'oc', 'pa-IN', 'pl', 'pt-BR',\n 'pt-PT', 'rm', 'ro', 'ru', 'rw', 'si', 'sk', 'sl', 'sq', 'sr-CYRL',\n 'sr-LATN', 'sv-SE', 'ta-LK', 'te', 'th', 'tr', 'uk', 'vi', 'zh-CN',\n 'zh-TW',\n)\n\n# Accepted locales\nMDN_LANGUAGES = ('en-US', 'ar', 'bn-BD', 'de', 'el', 'es', 'fa', 'fi', 'fr',\n 'cs', 'ca', 'fy-NL', 'ga-IE', 'he', 'hr', 'hu', 'id', 'it',\n 'ja', 'ka', 'ko', 'ms', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro',\n 'ru', 'sq', 'th', 'tr', 'vi', 'zh-CN', 'zh-TW')\nRTL_LANGUAGES = ('ar', 'fa', 'fa-IR', 'he')\n\nDEV_POOTLE_PRODUCT_DETAILS_MAP = {\n 'pt': 'pt-PT',\n 'fy': 'fy-NL',\n 'xx-testing': 'x-testing',\n}\n\n# Override generic locale handling with explicit mappings.\n# Keys are the requested locale; values are the delivered locale.\nLOCALE_ALIASES = {\n # Treat \"English (United States)\" as the canonical \"English\".\n 'en': 'en-US',\n\n # Create aliases for over-specific locales.\n 'bn': 'bn-BD',\n 'fy': 'fy-NL',\n 'ga': 'ga-IE',\n 'gu': 'gu-IN',\n 'hi': 'hi-IN',\n 'hy': 'hy-AM',\n 'pa': 'pa-IN',\n 'sv': 'sv-SE',\n 'ta': 'ta-LK',\n\n # Map a prefix to one of its multiple specific locales.\n 'pt': 'pt-PT',\n 'sr': 'sr-Cyrl',\n 'zh': 'zh-CN',\n\n # Create aliases for locales which do not share a prefix.\n 'nb-NO': 'no',\n 'nn-NO': 'no',\n\n # Create aliases for locales which use region subtags to assume scripts.\n 'zh-Hans': 'zh-CN',\n 'zh-Hant': 'zh-TW',\n}\n\ntry:\n DEV_LANGUAGES = [\n loc.replace('_','-') for loc in os.listdir(path('locale'))\n if os.path.isdir(path('locale', loc))\n and loc not in ['.svn', '.git', 'templates']\n ]\n for pootle_dir in DEV_LANGUAGES:\n if pootle_dir in DEV_POOTLE_PRODUCT_DETAILS_MAP:\n DEV_LANGUAGES.remove(pootle_dir)\n DEV_LANGUAGES.append(DEV_POOTLE_PRODUCT_DETAILS_MAP[pootle_dir])\nexcept OSError:\n DEV_LANGUAGES = ('en-US',)\n\nPROD_LANGUAGES = MDN_LANGUAGES\n\nLANGUAGE_URL_MAP = dict([(i.lower(), i) for i in PROD_LANGUAGES])\nfor requested_lang, delivered_lang in LOCALE_ALIASES.items():\n if delivered_lang in PROD_LANGUAGES:\n LANGUAGE_URL_MAP[requested_lang.lower()] = delivered_lang\n\n# Override Django's built-in with our native names\ndef lazy_langs():\n from product_details import product_details\n # for bug 664330\n # from django.conf import settings\n # langs = DEV_LANGUAGES if (getattr(settings, 'DEV', False) or getattr(settings, 'STAGE', False)) else PROD_LANGUAGES\n langs = PROD_LANGUAGES\n return dict([(lang.lower(), product_details.languages[lang]['native'])\n for lang in langs])\n\nLANGUAGES = lazy(lazy_langs, dict)()\nLANGUAGE_CHOICES = sorted(tuple([(i, LOCALES[i].native) for i in MDN_LANGUAGES]), key=lambda lang:lang[0])\n\n# DEKI uses different locale keys\ndef lazy_language_deki_map():\n # for bug 664330\n # from django.conf import settings\n # langs = DEV_LANGUAGES if (getattr(settings, 'DEV', False) or getattr(settings, 'STAGE', False)) else PROD_LANGUAGES\n langs = PROD_LANGUAGES\n lang_deki_map = dict([(i, i) for i in langs])\n lang_deki_map['en-US'] = 'en'\n lang_deki_map['zh-CN'] = 'cn'\n lang_deki_map['zh-TW'] = 'zh_tw'\n return lang_deki_map\n\nLANGUAGE_DEKI_MAP = lazy(lazy_language_deki_map, dict)()\n\n# List of MindTouch locales mapped to Kuma locales.\n#\n# Language in MindTouch pages are first determined from the locale in the page\n# title, with a fallback to the language in the page record.\n#\n# So, first MindTouch locales were inventoried like so:\n#\n# mysql --skip-column-names -uroot wikidb -B \\\n# -e 'select page_title from pages where page_namespace=0' \\\n# > page-titles.txt\n#\n# grep '/' page-titles.txt | cut -d'/' -f1 | sort -f | uniq -ci | sort -rn\n#\n# Then, the database languages were inventoried like so:\n#\n# select page_language, count(page_id) as ct\n# from pages group by page_language order by ct desc;\n#\n# Also worth noting, these are locales configured in the prod Control Panel:\n#\n# en,ar,ca,cs,de,el,es,fa,fi,fr,he,hr,hu,it,ja,\n# ka,ko,nl,pl,pt,ro,ru,th,tr,uk,vi,zh-cn,zh-tw\n#\n# The Kuma side was picked from elements of the MDN_LANGUAGES list in\n# settings.py, and a few were added to match MindTouch locales.\n#\n# Most of these end up being direct mappings, but it's instructive to go\n# through the mapping exercise.\n\nMT_TO_KUMA_LOCALE_MAP = {\n \"en\" : \"en-US\",\n \"ja\" : \"ja\",\n \"pl\" : \"pl\",\n \"fr\" : \"fr\",\n \"es\" : \"es\",\n \"\" : \"en-US\",\n \"cn\" : \"zh-CN\",\n \"zh_cn\" : \"zh-CN\",\n \"zh-cn\" : \"zh-CN\",\n \"zh_tw\" : \"zh-TW\",\n \"zh-tw\" : \"zh-TW\",\n \"ko\" : \"ko\",\n \"pt\" : \"pt-PT\",\n \"de\" : \"de\",\n \"it\" : \"it\",\n \"ca\" : \"ca\",\n \"cs\" : \"cs\",\n \"ru\" : \"ru\",\n \"nl\" : \"nl\",\n \"hu\" : \"hu\",\n \"he\" : \"he\",\n \"el\" : \"el\",\n \"fi\" : \"fi\",\n \"tr\" : \"tr\",\n \"vi\" : \"vi\",\n \"ro\" : \"ro\",\n \"ar\" : \"ar\",\n \"th\" : \"th\",\n \"fa\" : \"fa\",\n \"ka\" : \"ka\",\n}\n\nTEXT_DOMAIN = 'messages'\n\nSITE_ID = 1\n\nPROD_DETAILS_DIR = path('../product_details_json')\nMDC_PAGES_DIR = path('../mdc_pages')\n\n# If you set this to False, Django will make some optimizations so as not\n# to load the internationalization machinery.\nUSE_I18N = True\nUSE_L10N = True\nLOCALE_PATHS = (\n path('locale'),\n)\n\n# Use the real robots.txt?\nENGAGE_ROBOTS = False\n\n# Absolute path to the directory that holds media.\n# Example: \"/home/media/media.lawrence.com/\"\nMEDIA_ROOT = path('media')\n\n# Absolute path to the directory for the humans.txt file.\nHUMANSTXT_ROOT = MEDIA_ROOT\n\n# URL that handles the media served from MEDIA_ROOT. Make sure to use a\n# trailing slash if there is a path component (optional in other cases).\n# Examples: \"http://media.lawrence.com\", \"http://example.com/media/\"\nMEDIA_URL = '/media/'\nSTATIC_URL = '/static/'\nSTATIC_ROOT = path('static')\n\nSERVE_MEDIA = False\n\n# Paths that don't require a locale prefix.\nSUPPORTED_NONLOCALES = ('media', 'admin', 'robots.txt', 'services', 'static',\n '1', 'files', '@api', 'grappelli',\n '.well-known')\n\n# Make this unique, and don't share it with anybody.\nSECRET_KEY = '#%tc(zja8j01!r#h_y)=hy!^k)9az74k+-ib&ij&+**s3-e^_z'\n\n# List of callables that know how to import templates from various sources.\nTEMPLATE_LOADERS = (\n 'jingo.Loader',\n 'django.template.loaders.filesystem.Loader',\n 'django.template.loaders.app_directories.Loader',\n# 'django.template.loaders.eggs.Loader',\n)\n\nJINGO_EXCLUDE_APPS = (\n 'admin',\n 'admindocs',\n 'registration',\n 'grappelli',\n)\n\nTEMPLATE_CONTEXT_PROCESSORS = (\n 'django.contrib.auth.context_processors.auth',\n 'django.core.context_processors.debug',\n 'django.core.context_processors.media',\n 'django.core.context_processors.request',\n 'django.core.context_processors.csrf',\n 'django.contrib.messages.context_processors.messages',\n\n 'sumo.context_processors.global_settings',\n 'sumo.context_processors.for_data',\n\n 'devmo.context_processors.i18n',\n 'devmo.context_processors.next_url',\n\n 'jingo_minify.helpers.build_ids',\n\n 'constance.context_processors.config',\n 'django_browserid.context_processors.browserid_form',\n)\n\nMIDDLEWARE_CLASSES = (\n # This gives us atomic success or failure on multi-row writes. It does not\n # give us a consistent per-transaction snapshot for reads; that would need\n # the serializable isolation level (which InnoDB does support) and code to\n # retry transactions that roll back due to serialization failures. It's a\n # possibility for the future. Keep in mind that memcache defeats\n # snapshotted reads where we don't explicitly use the \"uncached\" manager.\n 'django.middleware.transaction.TransactionMiddleware',\n\n # LocaleURLMiddleware must be before any middleware that uses\n # sumo.urlresolvers.reverse() to add locale prefixes to URLs:\n 'sumo.middleware.LocaleURLMiddleware',\n 'wiki.middleware.DocumentZoneMiddleware',\n 'wiki.middleware.ReadOnlyMiddleware',\n 'sumo.middleware.Forbidden403Middleware',\n 'django.middleware.common.CommonMiddleware',\n 'sumo.middleware.RemoveSlashMiddleware',\n 'commonware.middleware.NoVarySessionMiddleware',\n 'django.middleware.clickjacking.XFrameOptionsMiddleware',\n 'django.middleware.csrf.CsrfViewMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n 'django.contrib.messages.middleware.MessageMiddleware',\n 'sumo.anonymous.AnonymousIdentityMiddleware',\n 'sumo.middleware.PlusToSpaceMiddleware',\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'users.middleware.BanMiddleware',\n 'django_statsd.middleware.GraphiteRequestTimingMiddleware',\n 'django_statsd.middleware.GraphiteMiddleware',\n)\n\n# Auth\nAUTHENTICATION_BACKENDS = (\n 'django_browserid.auth.BrowserIDBackend',\n 'django.contrib.auth.backends.ModelBackend',\n 'teamwork.backends.TeamworkBackend',\n)\nAUTH_PROFILE_MODULE = 'devmo.UserProfile'\n\nPASSWORD_HASHERS = (\n 'users.backends.Sha256Hasher',\n 'django.contrib.auth.hashers.SHA1PasswordHasher',\n 'django.contrib.auth.hashers.MD5PasswordHasher',\n 'django.contrib.auth.hashers.UnsaltedMD5PasswordHasher',\n)\n\nUSER_AVATAR_PATH = 'uploads/avatars/'\nDEFAULT_AVATAR = MEDIA_URL + 'img/avatar-default.png'\nAVATAR_SIZE = 48 # in pixels\nACCOUNT_ACTIVATION_DAYS = 30\nMAX_AVATAR_FILE_SIZE = 131072 # 100k, in bytes\n\nROOT_URLCONF = 'urls'\n\nTEMPLATE_DIRS = (\n # Put strings here, like \"/home/html/django_templates\"\n # Always use forward slashes, even on Windows.\n # Don't forget to use absolute paths, not relative paths.\n path('templates'),\n)\n\nSTATICFILES_FINDERS = (\n 'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n 'django.contrib.staticfiles.finders.FileSystemFinder',\n)\n\n# TODO: Figure out why changing the order of apps (for example, moving taggit\n# higher in the list) breaks tests.\nINSTALLED_APPS = (\n # django\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.sites',\n 'django.contrib.messages',\n\n 'grappelli.dashboard',\n 'grappelli',\n 'django.contrib.admin',\n\n 'django.contrib.sitemaps',\n 'django.contrib.staticfiles',\n\n # BrowserID\n 'django_browserid',\n\n # MDN\n 'devmo',\n 'docs',\n 'feeder',\n 'landing',\n 'search',\n 'users',\n 'wiki',\n\n # DEMOS\n 'demos',\n 'captcha',\n 'contentflagging',\n 'actioncounters',\n 'threadedcomments',\n\n # util\n 'cronjobs',\n 'jingo_minify',\n 'product_details',\n 'tower',\n 'smuggler',\n 'constance.backends.database',\n 'constance',\n 'waffle',\n 'soapbox',\n 'django_statsd',\n 'authkeys',\n 'tidings',\n 'teamwork',\n 'djcelery',\n 'taggit',\n 'raven.contrib.django.raven_compat',\n 'dbgettext',\n\n 'dashboards',\n 'kpi',\n\n # migrations\n 'south',\n 'rest_framework',\n\n # testing.\n 'django_nose',\n 'test_utils',\n\n # other\n 'humans',\n)\n\nTEST_RUNNER = 'test_utils.runner.RadicalTestSuiteRunner'\nTEST_UTILS_NO_TRUNCATE = ('django_content_type',)\n\n# Feed fetcher config\nFEEDER_TIMEOUT = 6 # in seconds\n\ndef JINJA_CONFIG():\n import jinja2\n from django.conf import settings\n from django.core.cache.backends.memcached import CacheClass as MemcachedCacheClass\n from caching.base import cache\n config = {'extensions': ['tower.template.i18n', 'caching.ext.cache',\n 'jinja2.ext.with_', 'jinja2.ext.loopcontrols',\n 'jinja2.ext.autoescape'],\n 'finalize': lambda x: x if x is not None else ''}\n if isinstance(cache, MemcachedCacheClass) and not settings.DEBUG:\n # We're passing the _cache object directly to jinja because\n # Django can't store binary directly; it enforces unicode on it.\n # Details: http://jinja.pocoo.org/2/documentation/api#bytecode-cache\n # and in the errors you get when you try it the other way.\n bc = jinja2.MemcachedBytecodeCache(cache._cache,\n \"%sj2:\" % settings.CACHE_PREFIX)\n config['cache_size'] = -1 # Never clear the cache\n config['bytecode_cache'] = bc\n return config\n\n# Let Tower know about our additional keywords.\n# DO NOT import an ngettext variant as _lazy.\nTOWER_KEYWORDS = {\n '_lazy': None,\n}\n\n# Tells the extract script what files to look for l10n in and what function\n# handles the extraction. The Tower library expects this.\nDOMAIN_METHODS = {\n 'messages': [\n ('vendor/**', 'ignore'),\n ('apps/access/**', 'ignore'),\n ('apps/dashboards/**', 'ignore'),\n ('apps/kadmin/**', 'ignore'),\n ('apps/sumo/**', 'ignore'),\n ('apps/**.py',\n 'tower.management.commands.extract.extract_tower_python'),\n ('**/templates/**.html',\n 'tower.management.commands.extract.extract_tower_template'),\n ],\n 'javascript': [\n # We can't say **.js because that would dive into any libraries.\n ('media/js/libs/ckeditor/plugins/mdn-link/**.js', 'javascript')\n ],\n}\n\n# These domains will not be merged into messages.pot and will use separate PO\n# files. See the following URL for an example of how to set these domains\n# in DOMAIN_METHODS.\n# http://github.com/jbalogh/zamboni/blob/d4c64239c24aa2f1e91276909823d1d1b290f0ee/settings.py#L254\nSTANDALONE_DOMAINS = [\n 'javascript',\n ]\n\n# If you have trouble extracting strings with Tower, try setting this\n# to True\nTOWER_ADD_HEADERS = True\n\n# Bundles for JS/CSS Minification\nMINIFY_BUNDLES = {\n 'css': {\n 'mdn': (\n 'css/fonts.css',\n 'css/mdn-screen.css',\n 'css/redesign-transition.css',\n ),\n 'jquery-ui': (\n 'js/libs/jquery-ui-1.10.3.custom/css/ui-lightness/jquery-ui-1.10.3.custom.min.css',\n 'css/jqueryui/moz-jquery-plugins.css',\n ),\n 'demostudio': (\n 'css/demos.css',\n ),\n 'devderby': (\n 'css/devderby.css',\n ),\n 'err404': (\n 'css/err404.css',\n ),\n 'home': (\n 'redesign/css/home.css',\n ),\n 'search': (\n 'redesign/css/search.css',\n ),\n 'wiki': (\n 'css/wiki.css',\n 'css/wiki-screen.css',\n ),\n 'sphinx': (\n 'css/wiki.css',\n 'css/wiki-screen.css',\n 'css/sphinx.css',\n ),\n 'dashboards': (\n 'css/dashboards.css',\n 'js/libs/DataTables-1.9.4/media/css/jquery.dataTables.css',\n 'js/libs/DataTables-1.9.4/extras/Scroller/media/css/dataTables.scroller.css',\n ),\n 'ie': (\n 'css/ie.css',\n ),\n 'users': (\n 'css/users.css',\n ),\n 'redesign-users': (\n 'redesign/css/users.css',\n ),\n 'tagit': (\n 'css/libs/jquery.tagit.css',\n ),\n 'syntax-prism': (\n 'js/libs/prism/prism.css',\n 'js/libs/prism/plugins/line-highlight/prism-line-highlight.css',\n 'js/libs/prism/plugins/ie8/prism-ie8.css',\n 'js/prism-mdn/plugins/line-numbering/prism-line-numbering.css',\n 'js/prism-mdn/components/prism-json.css',\n 'redesign/css/wiki-syntax.css',\n ),\n 'promote': (\n 'css/promote.css',\n ),\n 'redesign-main': (\n 'redesign/css/main.css',\n ),\n 'redesign-wiki': (\n 'redesign/css/wiki.css',\n 'redesign/css/zones.css',\n 'redesign/css/diff.css',\n ),\n 'redesign-sphinx': (\n 'redesign/css/wiki.css',\n 'redesign/css/sphinx.css',\n ),\n 'redesign-demos': (\n 'redesign/css/demo-studio.css',\n ),\n 'redesign-err404': (\n 'redesign/css/err404.css',\n ),\n 'calendar': (\n 'redesign/css/calendar.css',\n ),\n 'redesign-profile': (\n 'redesign/css/profile.css',\n ),\n 'redesign-promote': (\n 'redesign/css/promote.css',\n ),\n 'redesign-dashboards': (\n 'redesign/css/dashboards.css',\n 'redesign/css/diff.css',\n 'js/libs/DataTables-1.9.4/media/css/jquery.dataTables.css',\n 'js/libs/DataTables-1.9.4/extras/Scroller/media/css/dataTables.scroller.css',\n ),\n 'newsletter': (\n 'redesign/css/newsletter.css',\n ),\n },\n 'js': {\n 'popup': (\n 'js/libs/jquery-1.9.1.js',\n 'js/jquery-upgrade-compat.js',\n 'js/libs/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js',\n 'js/modal-control.js',\n 'js/init.js',\n ),\n 'profile': (\n 'js/profile.js',\n 'js/moz-jquery-plugins.js',\n ),\n 'events': (\n 'js/libs/jquery.gmap-1.1.0.js',\n 'js/calendar.js',\n ),\n 'demostudio': (\n 'js/libs/jquery.hoverIntent.minified.js',\n 'js/libs/jquery.scrollTo-1.4.2-min.js',\n 'js/demos.js',\n 'js/libs/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js',\n 'js/modal-control.js',\n ),\n 'demostudio_devderby_landing': (\n 'js/demos-devderby-landing.js',\n ),\n 'jquery-ui': (\n 'js/libs/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js',\n 'js/moz-jquery-plugins.js',\n ),\n 'libs/tagit': (\n 'js/libs/tag-it.js',\n ),\n 'search': (\n 'redesign/js/search.js',\n ),\n 'wiki': (\n 'js/main.js',\n 'js/wiki.js',\n ),\n 'wiki-edit': (\n 'js/wiki-edit.js',\n 'js/libs/tag-it.js',\n 'js/wiki-tags-edit.js',\n ),\n 'dashboards': (\n 'js/libs/DataTables-1.9.4/media/js/jquery.dataTables.js',\n 'js/libs/DataTables-1.9.4/extras/Scroller/media/js/dataTables.scroller.js',\n ),\n 'users': (\n 'js/empty.js',\n ),\n 'framebuster': (\n 'js/framebuster.js',\n ),\n 'syntax-prism': (\n 'js/libs/prism/prism.js',\n 'js/prism-mdn/components/prism-json.js',\n 'js/prism-mdn/plugins/line-numbering/prism-line-numbering.js',\n 'js/syntax-prism.js',\n ),\n 'ace-editor': (\n 'js/libs/ace/ace.js',\n 'js/libs/ace/mode-javascript.js',\n 'js/libs/ace/theme-dreamweaver.js',\n 'js/libs/ace/worker-javascript.js',\n ),\n 'redesign-main': (\n 'js/libs/jquery-1.9.1.js',\n 'js/jquery-upgrade-compat.js',\n 'js/init.js',\n\n # Home Page\n # cycle and slideshow only needed on the home page (or any page\n # featuring the slide show widget).\n 'js/libs/jquery.cycle.js',\n 'js/libs/slideshow.js',\n \n 'redesign/js/components.js',\n 'redesign/js/main.js',\n ),\n 'redesign-wiki': (\n 'redesign/js/wiki.js',\n ),\n 'newsletter': (\n 'redesign/js/newsletter.js',\n ),\n },\n}\n\nJAVA_BIN = '/usr/bin/java'\n\n#\n# Session cookies\nSESSION_COOKIE_SECURE = True\nSESSION_COOKIE_HTTPONLY = True\nSESSION_EXPIRE_AT_BROWSER_CLOSE = True\n\n# Cookie prefix from PHPBB settings.\nPHPBB_COOKIE_PREFIX = 'phpbb3_jzxvr'\n\n#\n# Connection information for Sphinx search\nSPHINX_HOST = '127.0.0.1'\nSPHINX_PORT = 3381\nSPHINXQL_PORT = 3382\n\nSPHINX_INDEXER = '/usr/bin/indexer'\nSPHINX_SEARCHD = '/usr/bin/searchd'\nSPHINX_CONFIG_PATH = path('configs/sphinx/sphinx.conf')\n\nTEST_SPHINX_PATH = path('tmp/test/sphinx')\nTEST_SPHINX_PORT = 3416\nTEST_SPHINXQL_PORT = 3418\n\nSEARCH_MAX_RESULTS = 1000\nSEARCH_RESULTS_PER_PAGE = 10\n\n# Search default settings\n# comma-separated tuple of included category IDs. Negative IDs are excluded.\nSEARCH_DEFAULT_CATEGORIES = (10, 20,)\nSEARCH_SUMMARY_LENGTH = 275\n\n# The length for which we would like the user to cache search forms and\n# results, in minutes.\nSEARCH_CACHE_PERIOD = 15\n\n# Maximum length of the filename. Forms should use this and raise\n# ValidationError if the length is exceeded.\n# @see http://code.djangoproject.com/ticket/9893\n# Columns are 250 but this leaves 50 chars for the upload_to prefix\nMAX_FILENAME_LENGTH = 200\nMAX_FILEPATH_LENGTH = 250\n\nATTACHMENT_HOST = 'mdn.mozillademos.org'\n\n# Auth and permissions related constants\nLOGIN_URL = '/users/login'\nLOGOUT_URL = '/users/logout'\nLOGIN_REDIRECT_URL = \"/\"\nLOGOUT_REDIRECT_URL = \"/\"\nREGISTER_URL = '/users/register'\n\n# Video settings, hard coded here for now.\n# TODO: figure out a way that doesn't need these values\nWIKI_VIDEO_WIDTH = 640\nWIKI_VIDEO_HEIGHT = 480\n\nIMAGE_MAX_FILESIZE = 1048576 # 1 megabyte, in bytes\nTHUMBNAIL_SIZE = 120 # Thumbnail size, in pixels\nTHUMBNAIL_UPLOAD_PATH = 'uploads/images/thumbnails/'\nIMAGE_UPLOAD_PATH = 'uploads/images/'\n# A string listing image mime types to accept, comma separated.\n# String must not contain double quotes!\nIMAGE_ALLOWED_MIMETYPES = 'image/jpeg,image/png,image/gif'\n\n# Email\nEMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'\nEMAIL_FILE_PATH = '/tmp/kuma-messages'\n\n# Celery\nimport djcelery\ndjcelery.setup_loader()\n\nBROKER_HOST = 'localhost'\nBROKER_PORT = 5672\nBROKER_USER = 'kuma'\nBROKER_PASSWORD = 'kuma'\nBROKER_VHOST = 'kuma'\nCELERY_RESULT_BACKEND = 'amqp'\nCELERY_IGNORE_RESULT = True\nCELERY_ALWAYS_EAGER = True # For tests. Set to False for use.\nCELERY_SEND_TASK_ERROR_EMAILS = True\nCELERYD_LOG_LEVEL = logging.INFO\nCELERYD_CONCURRENCY = 4\n\nCELERY_IMPORTS = (\n 'wiki.tasks',\n 'search.tasks',\n 'tidings.events',\n 'elasticutils.contrib.django.tasks',\n)\n\nCELERY_ANNOTATIONS = {\n \"elasticutils.contrib.django.tasks.index_objects\": {\n \"rate_limit\": \"100/m\",\n },\n \"elasticutils.contrib.django.tasks.unindex_objects\": {\n \"rate_limit\": \"100/m\",\n }\n}\n\nCELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'\n\n# Wiki rebuild settings\nWIKI_REBUILD_TOKEN = 'sumo:wiki:full-rebuild'\nWIKI_REBUILD_ON_DEMAND = False\n\n# Anonymous user cookie\nANONYMOUS_COOKIE_NAME = 'SUMO_ANONID'\nANONYMOUS_COOKIE_MAX_AGE = 30 * 86400 # Seconds\n\n# Top contributors cache settings\nTOP_CONTRIBUTORS_CACHE_KEY = 'sumo:TopContributors'\nTOP_CONTRIBUTORS_CACHE_TIMEOUT = 60 * 60 * 12\n\n# Do not change this without also deleting all wiki documents:\nWIKI_DEFAULT_LANGUAGE = LANGUAGE_CODE\n\n\nTIDINGS_FROM_ADDRESS = '[email protected]'\nTIDINGS_CONFIRM_ANONYMOUS_WATCHES = True\n\n# recaptcha\nRECAPTCHA_USE_SSL = False\nRECAPTCHA_PRIVATE_KEY = 'SET ME IN SETTINGS_LOCAL'\nRECAPTCHA_PUBLIC_KEY = 'SET ME IN SETTINGS_LOCAL'\n\n# content flagging\nFLAG_REASONS = (\n ('notworking', _('This demo is not working for me')),\n ('inappropriate', _('This demo contains inappropriate content')),\n ('plagarised', _('This demo was not created by the author')),\n)\n\n# bit.ly\nBITLY_API_KEY = \"SET ME IN SETTINGS_LOCAL\"\nBITLY_USERNAME = \"SET ME IN SETTINGS_LOCAL\"\n\nGOOGLE_MAPS_API_KEY = \"ABQIAAAAijZqBZcz-rowoXZC1tt9iRT5rHVQFKUGOHoyfP_4KyrflbHKcRTt9kQJVST5oKMRj8vKTQS2b7oNjQ\"\n\n# demo studio uploads\n# Filesystem path where files uploaded for demos will be written\nDEMO_UPLOADS_ROOT = path('media/uploads/demos')\n# Base URL from where files uploaded for demos will be linked and served\nDEMO_UPLOADS_URL = '/media/uploads/demos/'\n\n# Make sure South stays out of the way during testing\nSOUTH_TESTS_MIGRATE = False\nSKIP_SOUTH_TESTS = True\n\n# Provide migrations for third-party vendor apps\n# TODO: Move migrations for our apps here, rather than living with the app?\nSOUTH_MIGRATION_MODULES = {\n 'taggit': 'migrations.south.taggit',\n # HACK: South treats \"database\" as the name of constance.backends.database\n 'database': 'migrations.south.constance',\n}\n\nCONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'\nCONSTANCE_DATABASE_CACHE_BACKEND = None\n\n# Settings and defaults controllable by Constance in admin\nCONSTANCE_CONFIG = dict(\n\n BROWSERID_REALM_JSON = (\n json.dumps({\n 'realm': ['https://developer.mozilla.org',\n 'https://marketplace.firefox.com']\n }),\n \"Define the other sites belonging to this site's BrowserID realm.\"\n ),\n\n DEMOS_DEVDERBY_CURRENT_CHALLENGE_TAG = (\n \"challenge:2011:september\",\n \"Dev derby current challenge\"\n ),\n\n DEMOS_DEVDERBY_PREVIOUS_WINNER_TAG = (\n \"system:challenge:firstplace:2011:august\",\n \"Tag used to find most recent winner for dev derby\"\n ),\n\n DEMOS_DEVDERBY_CHALLENGE_CHOICE_TAGS = (\n ' '.join([\n \"challenge:2011:september\",\n \"challenge:2011:october\",\n \"challenge:2011:november\",\n ]),\n \"Dev derby choices displayed on submission form (space-separated tags)\"\n ),\n\n DEMOS_DEVDERBY_PREVIOUS_CHALLENGE_TAGS = (\n ' '.join([\n \"challenge:2011:august\",\n \"challenge:2011:july\",\n \"challenge:2011:june\",\n ]),\n \"Dev derby tags for previous challenges (space-separated tags)\"\n ),\n\n DEMOS_DEVDERBY_HOMEPAGE_FEATURED_DEMO = (\n 0,\n 'The ID of the demo which should be featured on the new homepage structure'\n ),\n\n BASKET_RETRIES = (\n 5,\n 'Number of time to retry basket post before giving up.'\n ),\n BASKET_RETRY_WAIT = (\n .5,\n 'How long to wait between basket api request retries. '\n 'We typically multiply this value by the retry number so, e.g., '\n 'the 4th retry waits 4*.5 = 2 seconds.'\n ),\n BASKET_API_KEY = (\n '',\n 'API Key to use for basket requests'\n ),\n\n BETA_GROUP_NAME = (\n 'Beta Testers',\n 'Name of the django.contrib.auth.models.Group to use as beta testers'\n ),\n\n KUMA_DOCUMENT_RENDER_TIMEOUT = (\n 180.0,\n 'Maximum seconds to wait before considering a rendering in progress or '\n 'scheduled as failed and allowing another attempt.'\n ),\n KUMA_DOCUMENT_FORCE_DEFERRED_TIMEOUT = (\n 10.0,\n 'Maximum seconds to allow a document to spend rendering during the '\n 'response cycle before flagging it to be sent to the deferred rendering '\n 'queue for future renders.'\n ),\n\n KUMASCRIPT_TIMEOUT = (\n 0.0,\n 'Maximum seconds to wait for a response from the kumascript service. '\n 'On timeout, the document gets served up as-is and without macro '\n 'evaluation as an attempt at graceful failure. NOTE: a value of 0 '\n 'disables kumascript altogether.'\n ),\n KUMASCRIPT_MAX_AGE = (\n 600,\n 'Maximum acceptable age (in seconds) of a cached response from '\n 'kumascript. Passed along in a Cache-Control: max-age={value} header, '\n 'which tells kumascript whether or not to serve up a cached response.'\n ),\n\n KUMA_CUSTOM_CSS_PATH = (\n '/en-US/docs/Template:CustomCSS',\n 'Path to a wiki document whose raw content will be loaded as a CSS '\n 'stylesheet for the wiki base template. Will also cause the ?raw '\n 'parameter for this path to send a Content-Type: text/css header. Empty '\n 'value disables the feature altogether.',\n ),\n\n KUMA_CUSTOM_SAMPLE_CSS_PATH = (\n '/en-US/docs/Template:CustomSampleCSS',\n 'Path to a wiki document whose raw content will be loaded as a CSS '\n 'stylesheet for live sample template. Will also cause the ?raw '\n 'parameter for this path to send a Content-Type: text/css header. Empty '\n 'value disables the feature altogether.',\n ),\n\n DIFF_CONTEXT_LINES = (\n 0,\n 'Number of lines of context to show in diff display.',\n ),\n\n FEED_DIFF_CONTEXT_LINES = (\n 3,\n 'Number of lines of context to show in feed diff display.',\n ),\n\n WIKI_ATTACHMENT_ALLOWED_TYPES = (\n 'image/gif image/jpeg image/png image/svg+xml text/html image/vnd.adobe.photoshop',\n 'Allowed file types for wiki file attachments',\n ),\n\n KUMA_WIKI_IFRAME_ALLOWED_HOSTS = (\n '^https?\\:\\/\\/(developer-local.allizom.org|developer-dev.allizom.org|developer.allizom.org|mozillademos.org|testserver|localhost\\:8000|(www.)?youtube.com\\/embed\\/(\\.*))',\n 'Regex comprised of domain names that are allowed for IFRAME SRCs'\n ),\n\n GOOGLE_ANALYTICS_ACCOUNT = (\n '0',\n 'Google Analytics Tracking Account Number (0 to disable)',\n ),\n\n OPTIMIZELY_PROJECT_ID = (\n '',\n 'The ID value for optimizely Project Code script'\n ),\n\n BLEACH_ALLOWED_TAGS = (\n json.dumps([\n 'a', 'p', 'div',\n ]),\n \"JSON array of tags allowed through Bleach\",\n ),\n\n BLEACH_ALLOWED_ATTRIBUTES = (\n json.dumps({\n '*': ['id', 'class', 'style'],\n }),\n \"JSON object associating tags with lists of allowed attributes\",\n ),\n\n BLEACH_ALLOWED_STYLES = (\n json.dumps([\n 'font-size', 'text-align',\n ]),\n \"JSON array listing CSS styles allowed on tags\",\n ),\n\n WIKI_DOCUMENT_TAG_SUGGESTIONS = (\n json.dumps([\n \"Accessibility\", \"AJAX\", \"API\", \"Apps\",\n \"Canvas\", \"CSS\", \"Device\", \"DOM\", \"Events\",\n \"Extensions\", \"Firefox\", \"Firefox OS\", \"Games\",\n \"Gecko\", \"Graphics\", \"Internationalization\", \"History\", \"HTML\", \"HTTP\", \"JavaScript\", \"Layout\",\n \"Localization\", \"MDN\", \"Mobile\", \"Mozilla\",\n \"Networking\", \"Persona\", \"Places\", \"Plugins\", \"Protocols\",\n\n \"Reference\", \"Tutorial\", \"Landing\",\n\n \"junk\", \"NeedsMarkupWork\", \"NeedsContent\", \"NeedsExample\",\n ]),\n \"JSON array listing tag suggestions for documents\"\n ),\n\n SEARCH_FILTER_TAG_OPTIONS = (\n json.dumps([\n \"Accessibility\", \"AJAX\", \"API\", \"Apps\",\n \"Canvas\", \"CSS\", \"Device\", \"DOM\", \"Events\",\n \"Extensions\", \"Firefox\", \"Firefox OS\", \"Games\",\n \"Gecko\", \"Graphics\", \"Internationalization\", \"History\", \"HTML\", \"HTTP\", \"JavaScript\", \"Layout\",\n \"Localization\", \"MDN\", \"Mobile\", \"Mozilla\",\n \"Networking\", \"Persona\", \"Places\", \"Plugins\", \"Protocols\",\n\n \"Reference\", \"Tutorial\", \"Landing\",\n\n \"junk\", \"NeedsMarkupWork\", \"NeedsContent\", \"NeedsExample\",\n ]),\n \"JSON array of tags that are enabled for search faceting\"\n ),\n\n EXTERNAL_SIGNUP_EMAIL = (\n '',\n 'The email address to receive external docs signup emails.'\n ),\n)\n\nBROWSERID_VERIFICATION_URL = 'https://verifier.login.persona.org/verify'\n\nLOGIN_REDIRECT_URL = '/'\nLOGIN_REDIRECT_URL_FAILURE = '/'\n\nBASKET_URL = 'https://basket.mozilla.com'\nBASKET_APPS_NEWSLETTER = 'app-dev'\n\nKUMASCRIPT_URL_TEMPLATE = 'http://developer.mozilla.org:9080/docs/{path}'\n\nSTATSD_CLIENT = 'django_statsd.clients.normal'\nSTATSD_HOST = 'localhost'\nSTATSD_PORT = 8125\nSTATSD_PREFIX = 'developer'\n\nGRAPHITE_HOST = 'localhost'\nGRAPHITE_PORT = 2003\nGRAPHITE_PREFIX = 'devmo'\nGRAPHITE_TIMEOUT = 1\n\nES_DISABLED = True\nES_LIVE_INDEX = False\n\nLOG_LEVEL = logging.WARN\nSYSLOG_TAG = 'http_app_kuma'\n\nLOGGING = {\n 'version': 1,\n 'disable_existing_loggers': False,\n 'filters': {\n 'require_debug_false': {\n '()': 'django.utils.log.RequireDebugFalse',\n },\n 'require_debug_true': {\n # use from devmo.helpers until we upgrade to django 1.5\n '()': 'devmo.future.filters.RequireDebugTrue',\n },\n },\n 'formatters': {\n 'default': {\n 'format': '{0}: %(asctime)s %(name)s:%(levelname)s %(message)s: '\n '%(pathname)s:%(lineno)s'.format(SYSLOG_TAG),\n }\n },\n 'handlers': {\n 'console': {\n 'class': 'logging.StreamHandler',\n 'filters': ['require_debug_true'],\n 'level': LOG_LEVEL,\n },\n 'mail_admins': {\n 'class': 'django.utils.log.AdminEmailHandler',\n 'filters': ['require_debug_false'],\n 'level': logging.ERROR,\n },\n },\n 'loggers': {\n 'mdn': {\n 'handlers': ['console'],\n 'propagate': True,\n # Use the most permissive setting. It is filtered in the handlers.\n 'level': logging.DEBUG,\n },\n 'django.request': {\n 'handlers': ['console'],\n 'propagate': True,\n # Use the most permissive setting. It is filtered in the handlers.\n 'level': logging.DEBUG,\n },\n },\n}\n\n\nCSRF_COOKIE_SECURE = True\nX_FRAME_OPTIONS = 'DENY'\n\nSENTRY_DSN = 'set this in settings_local.py'\nTEAMWORK_BASE_POLICIES = {\n 'anonymous': (\n 'wiki.view_document',),\n 'authenticated': (\n 'wiki.view_document', 'wiki.add_document', 'wiki.add_revision'),\n}\n\nGRAPPELLI_ADMIN_TITLE = 'Mozilla Developer Network - Admin'\nGRAPPELLI_INDEX_DASHBOARD = 'admin_dashboard.CustomIndexDashboard'\n\nDBGETTEXT_PATH = 'apps/'\nDBGETTEXT_ROOT = 'translations'\n", "path": "settings.py" } ]
[ { "content": "# Django settings for kuma project.\nfrom datetime import date\nimport logging\nimport os\nimport platform\nimport json\n\nfrom django.utils.functional import lazy\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom sumo_locales import LOCALES\n\nDEBUG = False\nTEMPLATE_DEBUG = DEBUG\n\nROOT = os.path.dirname(os.path.abspath(__file__))\npath = lambda *a: os.path.join(ROOT, *a)\n\nROOT_PACKAGE = os.path.basename(ROOT)\n\nADMINS = (\n # ('Your Name', '[email protected]'),\n)\n\nPROTOCOL = 'https://'\nDOMAIN = 'developer.mozilla.org'\nSITE_URL = PROTOCOL + DOMAIN\nPRODUCTION_URL = SITE_URL\nUSE_X_FORWARDED_HOST = True\n\nMANAGERS = ADMINS\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n 'NAME': 'kuma', # Or path to database file if using sqlite3.\n 'USER': '', # Not used with sqlite3.\n 'PASSWORD': '', # Not used with sqlite3.\n 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.\n 'PORT': '', # Set to empty string for default. Not used with sqlite3.\n 'OPTIONS': {'init_command': 'SET storage_engine=InnoDB'},\n },\n}\n\nMIGRATION_DATABASES = {\n 'wikidb': {\n 'NAME': 'wikidb',\n 'ENGINE': 'django.db.backends.mysql',\n 'HOST': 'localhost',\n 'USER': 'wikiuser',\n 'PASSWORD': 'wikipass',\n },\n}\n\n# Dekiwiki has a backend API. protocol://hostname:port\n# If set to False, integration with MindTouch / Dekiwiki will be disabled\nDEKIWIKI_ENDPOINT = False # 'https://developer-stage9.mozilla.org'\nDEKIWIKI_APIKEY = 'SET IN LOCAL SETTINGS'\nDEKIWIKI_MOCK = True\n\n# Cache Settings\nCACHE_BACKEND = 'locmem://?timeout=86400'\nCACHE_PREFIX = 'kuma:'\nCACHE_COUNT_TIMEOUT = 60 # seconds\n\nCACHES = {\n 'default': {\n 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',\n 'TIMEOUT': 60,\n 'KEY_PREFIX': 'kuma',\n },\n # NOTE: The 'secondary' cache should be the same as 'default' in\n # settings_local. The only reason it exists is because we had some issues\n # with caching, disabled 'default', and wanted to selectively re-enable\n # caching on a case-by-case basis to resolve the issue.\n 'secondary': {\n 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',\n 'TIMEOUT': 60,\n 'KEY_PREFIX': 'kuma',\n }\n}\n\nSECONDARY_CACHE_ALIAS = 'secondary'\n\n# Addresses email comes from\nDEFAULT_FROM_EMAIL = '[email protected]'\nSERVER_EMAIL = '[email protected]'\n\nPLATFORM_NAME = platform.node()\n\n# Local time zone for this installation. Choices can be found here:\n# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name\n# although not all choices may be available on all operating systems.\n# If running in a Windows environment this must be set to the same as your\n# system time zone.\nTIME_ZONE = 'US/Pacific'\n\n# Language code for this installation. All choices can be found here:\n# http://www.i18nguy.com/unicode/language-identifiers.html\nLANGUAGE_CODE = 'en-US'\n\n# Supported languages\nSUMO_LANGUAGES = (\n 'ak', 'ar', 'as', 'ast', 'bg', 'bn-BD', 'bn-IN', 'bs', 'ca', 'cs', 'da',\n 'de', 'el', 'en-US', 'eo', 'es', 'et', 'eu', 'fa', 'fi', 'fr', 'fur',\n 'fy-NL', 'ga-IE', 'gd', 'gl', 'gu-IN', 'he', 'hi-IN', 'hr', 'hu', 'hy-AM',\n 'id', 'ilo', 'is', 'it', 'ja', 'kk', 'kn', 'ko', 'lt', 'mai', 'mk', 'mn',\n 'mr', 'ms', 'my', 'nb-NO', 'nl', 'no', 'oc', 'pa-IN', 'pl', 'pt-BR',\n 'pt-PT', 'rm', 'ro', 'ru', 'rw', 'si', 'sk', 'sl', 'sq', 'sr-CYRL',\n 'sr-LATN', 'sv-SE', 'ta-LK', 'te', 'th', 'tr', 'uk', 'vi', 'zh-CN',\n 'zh-TW',\n)\n\n# Accepted locales\nMDN_LANGUAGES = ('en-US', 'ar', 'bn-BD', 'de', 'el', 'es', 'fa', 'fi', 'fr',\n 'cs', 'ca', 'fy-NL', 'ga-IE', 'he', 'hr', 'hu', 'id', 'it',\n 'ja', 'ka', 'ko', 'ms', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro',\n 'ru', 'sq', 'th', 'tr', 'vi', 'zh-CN', 'zh-TW')\nRTL_LANGUAGES = ('ar', 'fa', 'fa-IR', 'he')\n\nDEV_POOTLE_PRODUCT_DETAILS_MAP = {\n 'pt': 'pt-PT',\n 'fy': 'fy-NL',\n 'xx-testing': 'x-testing',\n}\n\n# Override generic locale handling with explicit mappings.\n# Keys are the requested locale; values are the delivered locale.\nLOCALE_ALIASES = {\n # Treat \"English (United States)\" as the canonical \"English\".\n 'en': 'en-US',\n\n # Create aliases for over-specific locales.\n 'bn': 'bn-BD',\n 'fy': 'fy-NL',\n 'ga': 'ga-IE',\n 'gu': 'gu-IN',\n 'hi': 'hi-IN',\n 'hy': 'hy-AM',\n 'pa': 'pa-IN',\n 'sv': 'sv-SE',\n 'ta': 'ta-LK',\n\n # Map a prefix to one of its multiple specific locales.\n 'pt': 'pt-PT',\n 'sr': 'sr-Cyrl',\n 'zh': 'zh-CN',\n\n # Create aliases for locales which do not share a prefix.\n 'nb-NO': 'no',\n 'nn-NO': 'no',\n\n # Create aliases for locales which use region subtags to assume scripts.\n 'zh-Hans': 'zh-CN',\n 'zh-Hant': 'zh-TW',\n}\n\ntry:\n DEV_LANGUAGES = [\n loc.replace('_','-') for loc in os.listdir(path('locale'))\n if os.path.isdir(path('locale', loc))\n and loc not in ['.svn', '.git', 'templates']\n ]\n for pootle_dir in DEV_LANGUAGES:\n if pootle_dir in DEV_POOTLE_PRODUCT_DETAILS_MAP:\n DEV_LANGUAGES.remove(pootle_dir)\n DEV_LANGUAGES.append(DEV_POOTLE_PRODUCT_DETAILS_MAP[pootle_dir])\nexcept OSError:\n DEV_LANGUAGES = ('en-US',)\n\nPROD_LANGUAGES = MDN_LANGUAGES\n\nLANGUAGE_URL_MAP = dict([(i.lower(), i) for i in PROD_LANGUAGES])\nfor requested_lang, delivered_lang in LOCALE_ALIASES.items():\n if delivered_lang in PROD_LANGUAGES:\n LANGUAGE_URL_MAP[requested_lang.lower()] = delivered_lang\n\n# Override Django's built-in with our native names\ndef lazy_langs():\n from product_details import product_details\n # for bug 664330\n # from django.conf import settings\n # langs = DEV_LANGUAGES if (getattr(settings, 'DEV', False) or getattr(settings, 'STAGE', False)) else PROD_LANGUAGES\n langs = PROD_LANGUAGES\n return dict([(lang.lower(), product_details.languages[lang]['native'])\n for lang in langs])\n\nLANGUAGES = lazy(lazy_langs, dict)()\nLANGUAGE_CHOICES = sorted(tuple([(i, LOCALES[i].native) for i in MDN_LANGUAGES]), key=lambda lang:lang[0])\n\n# DEKI uses different locale keys\ndef lazy_language_deki_map():\n # for bug 664330\n # from django.conf import settings\n # langs = DEV_LANGUAGES if (getattr(settings, 'DEV', False) or getattr(settings, 'STAGE', False)) else PROD_LANGUAGES\n langs = PROD_LANGUAGES\n lang_deki_map = dict([(i, i) for i in langs])\n lang_deki_map['en-US'] = 'en'\n lang_deki_map['zh-CN'] = 'cn'\n lang_deki_map['zh-TW'] = 'zh_tw'\n return lang_deki_map\n\nLANGUAGE_DEKI_MAP = lazy(lazy_language_deki_map, dict)()\n\n# List of MindTouch locales mapped to Kuma locales.\n#\n# Language in MindTouch pages are first determined from the locale in the page\n# title, with a fallback to the language in the page record.\n#\n# So, first MindTouch locales were inventoried like so:\n#\n# mysql --skip-column-names -uroot wikidb -B \\\n# -e 'select page_title from pages where page_namespace=0' \\\n# > page-titles.txt\n#\n# grep '/' page-titles.txt | cut -d'/' -f1 | sort -f | uniq -ci | sort -rn\n#\n# Then, the database languages were inventoried like so:\n#\n# select page_language, count(page_id) as ct\n# from pages group by page_language order by ct desc;\n#\n# Also worth noting, these are locales configured in the prod Control Panel:\n#\n# en,ar,ca,cs,de,el,es,fa,fi,fr,he,hr,hu,it,ja,\n# ka,ko,nl,pl,pt,ro,ru,th,tr,uk,vi,zh-cn,zh-tw\n#\n# The Kuma side was picked from elements of the MDN_LANGUAGES list in\n# settings.py, and a few were added to match MindTouch locales.\n#\n# Most of these end up being direct mappings, but it's instructive to go\n# through the mapping exercise.\n\nMT_TO_KUMA_LOCALE_MAP = {\n \"en\" : \"en-US\",\n \"ja\" : \"ja\",\n \"pl\" : \"pl\",\n \"fr\" : \"fr\",\n \"es\" : \"es\",\n \"\" : \"en-US\",\n \"cn\" : \"zh-CN\",\n \"zh_cn\" : \"zh-CN\",\n \"zh-cn\" : \"zh-CN\",\n \"zh_tw\" : \"zh-TW\",\n \"zh-tw\" : \"zh-TW\",\n \"ko\" : \"ko\",\n \"pt\" : \"pt-PT\",\n \"de\" : \"de\",\n \"it\" : \"it\",\n \"ca\" : \"ca\",\n \"cs\" : \"cs\",\n \"ru\" : \"ru\",\n \"nl\" : \"nl\",\n \"hu\" : \"hu\",\n \"he\" : \"he\",\n \"el\" : \"el\",\n \"fi\" : \"fi\",\n \"tr\" : \"tr\",\n \"vi\" : \"vi\",\n \"ro\" : \"ro\",\n \"ar\" : \"ar\",\n \"th\" : \"th\",\n \"fa\" : \"fa\",\n \"ka\" : \"ka\",\n}\n\nTEXT_DOMAIN = 'messages'\n\nSITE_ID = 1\n\nPROD_DETAILS_DIR = path('../product_details_json')\nMDC_PAGES_DIR = path('../mdc_pages')\n\n# If you set this to False, Django will make some optimizations so as not\n# to load the internationalization machinery.\nUSE_I18N = True\nUSE_L10N = True\nLOCALE_PATHS = (\n path('locale'),\n)\n\n# Use the real robots.txt?\nENGAGE_ROBOTS = False\n\n# Absolute path to the directory that holds media.\n# Example: \"/home/media/media.lawrence.com/\"\nMEDIA_ROOT = path('media')\n\n# Absolute path to the directory for the humans.txt file.\nHUMANSTXT_ROOT = MEDIA_ROOT\n\n# URL that handles the media served from MEDIA_ROOT. Make sure to use a\n# trailing slash if there is a path component (optional in other cases).\n# Examples: \"http://media.lawrence.com\", \"http://example.com/media/\"\nMEDIA_URL = '/media/'\nSTATIC_URL = '/static/'\nSTATIC_ROOT = path('static')\n\nSERVE_MEDIA = False\n\n# Paths that don't require a locale prefix.\nSUPPORTED_NONLOCALES = ('media', 'admin', 'robots.txt', 'services', 'static',\n '1', 'files', '@api', 'grappelli',\n '.well-known')\n\n# Make this unique, and don't share it with anybody.\nSECRET_KEY = '#%tc(zja8j01!r#h_y)=hy!^k)9az74k+-ib&ij&+**s3-e^_z'\n\n# List of callables that know how to import templates from various sources.\nTEMPLATE_LOADERS = (\n 'jingo.Loader',\n 'django.template.loaders.filesystem.Loader',\n 'django.template.loaders.app_directories.Loader',\n# 'django.template.loaders.eggs.Loader',\n)\n\nJINGO_EXCLUDE_APPS = (\n 'admin',\n 'admindocs',\n 'registration',\n 'grappelli',\n 'waffle'\n)\n\nTEMPLATE_CONTEXT_PROCESSORS = (\n 'django.contrib.auth.context_processors.auth',\n 'django.core.context_processors.debug',\n 'django.core.context_processors.media',\n 'django.core.context_processors.request',\n 'django.core.context_processors.csrf',\n 'django.contrib.messages.context_processors.messages',\n\n 'sumo.context_processors.global_settings',\n 'sumo.context_processors.for_data',\n\n 'devmo.context_processors.i18n',\n 'devmo.context_processors.next_url',\n\n 'jingo_minify.helpers.build_ids',\n\n 'constance.context_processors.config',\n 'django_browserid.context_processors.browserid_form',\n)\n\nMIDDLEWARE_CLASSES = (\n # This gives us atomic success or failure on multi-row writes. It does not\n # give us a consistent per-transaction snapshot for reads; that would need\n # the serializable isolation level (which InnoDB does support) and code to\n # retry transactions that roll back due to serialization failures. It's a\n # possibility for the future. Keep in mind that memcache defeats\n # snapshotted reads where we don't explicitly use the \"uncached\" manager.\n 'django.middleware.transaction.TransactionMiddleware',\n\n # LocaleURLMiddleware must be before any middleware that uses\n # sumo.urlresolvers.reverse() to add locale prefixes to URLs:\n 'sumo.middleware.LocaleURLMiddleware',\n 'wiki.middleware.DocumentZoneMiddleware',\n 'wiki.middleware.ReadOnlyMiddleware',\n 'sumo.middleware.Forbidden403Middleware',\n 'django.middleware.common.CommonMiddleware',\n 'sumo.middleware.RemoveSlashMiddleware',\n 'commonware.middleware.NoVarySessionMiddleware',\n 'django.middleware.clickjacking.XFrameOptionsMiddleware',\n 'django.middleware.csrf.CsrfViewMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n 'django.contrib.messages.middleware.MessageMiddleware',\n 'sumo.anonymous.AnonymousIdentityMiddleware',\n 'sumo.middleware.PlusToSpaceMiddleware',\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'users.middleware.BanMiddleware',\n 'django_statsd.middleware.GraphiteRequestTimingMiddleware',\n 'django_statsd.middleware.GraphiteMiddleware',\n)\n\n# Auth\nAUTHENTICATION_BACKENDS = (\n 'django_browserid.auth.BrowserIDBackend',\n 'django.contrib.auth.backends.ModelBackend',\n 'teamwork.backends.TeamworkBackend',\n)\nAUTH_PROFILE_MODULE = 'devmo.UserProfile'\n\nPASSWORD_HASHERS = (\n 'users.backends.Sha256Hasher',\n 'django.contrib.auth.hashers.SHA1PasswordHasher',\n 'django.contrib.auth.hashers.MD5PasswordHasher',\n 'django.contrib.auth.hashers.UnsaltedMD5PasswordHasher',\n)\n\nUSER_AVATAR_PATH = 'uploads/avatars/'\nDEFAULT_AVATAR = MEDIA_URL + 'img/avatar-default.png'\nAVATAR_SIZE = 48 # in pixels\nACCOUNT_ACTIVATION_DAYS = 30\nMAX_AVATAR_FILE_SIZE = 131072 # 100k, in bytes\n\nROOT_URLCONF = 'urls'\n\nTEMPLATE_DIRS = (\n # Put strings here, like \"/home/html/django_templates\"\n # Always use forward slashes, even on Windows.\n # Don't forget to use absolute paths, not relative paths.\n path('templates'),\n)\n\nSTATICFILES_FINDERS = (\n 'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n 'django.contrib.staticfiles.finders.FileSystemFinder',\n)\n\n# TODO: Figure out why changing the order of apps (for example, moving taggit\n# higher in the list) breaks tests.\nINSTALLED_APPS = (\n # django\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.sites',\n 'django.contrib.messages',\n\n 'grappelli.dashboard',\n 'grappelli',\n 'django.contrib.admin',\n\n 'django.contrib.sitemaps',\n 'django.contrib.staticfiles',\n\n # BrowserID\n 'django_browserid',\n\n # MDN\n 'devmo',\n 'docs',\n 'feeder',\n 'landing',\n 'search',\n 'users',\n 'wiki',\n\n # DEMOS\n 'demos',\n 'captcha',\n 'contentflagging',\n 'actioncounters',\n 'threadedcomments',\n\n # util\n 'cronjobs',\n 'jingo_minify',\n 'product_details',\n 'tower',\n 'smuggler',\n 'constance.backends.database',\n 'constance',\n 'waffle',\n 'soapbox',\n 'django_statsd',\n 'authkeys',\n 'tidings',\n 'teamwork',\n 'djcelery',\n 'taggit',\n 'raven.contrib.django.raven_compat',\n 'dbgettext',\n\n 'dashboards',\n 'kpi',\n\n # migrations\n 'south',\n 'rest_framework',\n\n # testing.\n 'django_nose',\n 'test_utils',\n\n # other\n 'humans',\n)\n\nTEST_RUNNER = 'test_utils.runner.RadicalTestSuiteRunner'\nTEST_UTILS_NO_TRUNCATE = ('django_content_type',)\n\n# Feed fetcher config\nFEEDER_TIMEOUT = 6 # in seconds\n\ndef JINJA_CONFIG():\n import jinja2\n from django.conf import settings\n from django.core.cache.backends.memcached import CacheClass as MemcachedCacheClass\n from caching.base import cache\n config = {'extensions': ['tower.template.i18n', 'caching.ext.cache',\n 'jinja2.ext.with_', 'jinja2.ext.loopcontrols',\n 'jinja2.ext.autoescape'],\n 'finalize': lambda x: x if x is not None else ''}\n if isinstance(cache, MemcachedCacheClass) and not settings.DEBUG:\n # We're passing the _cache object directly to jinja because\n # Django can't store binary directly; it enforces unicode on it.\n # Details: http://jinja.pocoo.org/2/documentation/api#bytecode-cache\n # and in the errors you get when you try it the other way.\n bc = jinja2.MemcachedBytecodeCache(cache._cache,\n \"%sj2:\" % settings.CACHE_PREFIX)\n config['cache_size'] = -1 # Never clear the cache\n config['bytecode_cache'] = bc\n return config\n\n# Let Tower know about our additional keywords.\n# DO NOT import an ngettext variant as _lazy.\nTOWER_KEYWORDS = {\n '_lazy': None,\n}\n\n# Tells the extract script what files to look for l10n in and what function\n# handles the extraction. The Tower library expects this.\nDOMAIN_METHODS = {\n 'messages': [\n ('vendor/**', 'ignore'),\n ('apps/access/**', 'ignore'),\n ('apps/dashboards/**', 'ignore'),\n ('apps/kadmin/**', 'ignore'),\n ('apps/sumo/**', 'ignore'),\n ('apps/**.py',\n 'tower.management.commands.extract.extract_tower_python'),\n ('**/templates/**.html',\n 'tower.management.commands.extract.extract_tower_template'),\n ],\n 'javascript': [\n # We can't say **.js because that would dive into any libraries.\n ('media/js/libs/ckeditor/plugins/mdn-link/**.js', 'javascript')\n ],\n}\n\n# These domains will not be merged into messages.pot and will use separate PO\n# files. See the following URL for an example of how to set these domains\n# in DOMAIN_METHODS.\n# http://github.com/jbalogh/zamboni/blob/d4c64239c24aa2f1e91276909823d1d1b290f0ee/settings.py#L254\nSTANDALONE_DOMAINS = [\n 'javascript',\n ]\n\n# If you have trouble extracting strings with Tower, try setting this\n# to True\nTOWER_ADD_HEADERS = True\n\n# Bundles for JS/CSS Minification\nMINIFY_BUNDLES = {\n 'css': {\n 'mdn': (\n 'css/fonts.css',\n 'css/mdn-screen.css',\n 'css/redesign-transition.css',\n ),\n 'jquery-ui': (\n 'js/libs/jquery-ui-1.10.3.custom/css/ui-lightness/jquery-ui-1.10.3.custom.min.css',\n 'css/jqueryui/moz-jquery-plugins.css',\n ),\n 'demostudio': (\n 'css/demos.css',\n ),\n 'devderby': (\n 'css/devderby.css',\n ),\n 'err404': (\n 'css/err404.css',\n ),\n 'home': (\n 'redesign/css/home.css',\n ),\n 'search': (\n 'redesign/css/search.css',\n ),\n 'wiki': (\n 'css/wiki.css',\n 'css/wiki-screen.css',\n ),\n 'sphinx': (\n 'css/wiki.css',\n 'css/wiki-screen.css',\n 'css/sphinx.css',\n ),\n 'dashboards': (\n 'css/dashboards.css',\n 'js/libs/DataTables-1.9.4/media/css/jquery.dataTables.css',\n 'js/libs/DataTables-1.9.4/extras/Scroller/media/css/dataTables.scroller.css',\n ),\n 'ie': (\n 'css/ie.css',\n ),\n 'users': (\n 'css/users.css',\n ),\n 'redesign-users': (\n 'redesign/css/users.css',\n ),\n 'tagit': (\n 'css/libs/jquery.tagit.css',\n ),\n 'syntax-prism': (\n 'js/libs/prism/prism.css',\n 'js/libs/prism/plugins/line-highlight/prism-line-highlight.css',\n 'js/libs/prism/plugins/ie8/prism-ie8.css',\n 'js/prism-mdn/plugins/line-numbering/prism-line-numbering.css',\n 'js/prism-mdn/components/prism-json.css',\n 'redesign/css/wiki-syntax.css',\n ),\n 'promote': (\n 'css/promote.css',\n ),\n 'redesign-main': (\n 'redesign/css/main.css',\n ),\n 'redesign-wiki': (\n 'redesign/css/wiki.css',\n 'redesign/css/zones.css',\n 'redesign/css/diff.css',\n ),\n 'redesign-sphinx': (\n 'redesign/css/wiki.css',\n 'redesign/css/sphinx.css',\n ),\n 'redesign-demos': (\n 'redesign/css/demo-studio.css',\n ),\n 'redesign-err404': (\n 'redesign/css/err404.css',\n ),\n 'calendar': (\n 'redesign/css/calendar.css',\n ),\n 'redesign-profile': (\n 'redesign/css/profile.css',\n ),\n 'redesign-promote': (\n 'redesign/css/promote.css',\n ),\n 'redesign-dashboards': (\n 'redesign/css/dashboards.css',\n 'redesign/css/diff.css',\n 'js/libs/DataTables-1.9.4/media/css/jquery.dataTables.css',\n 'js/libs/DataTables-1.9.4/extras/Scroller/media/css/dataTables.scroller.css',\n ),\n 'newsletter': (\n 'redesign/css/newsletter.css',\n ),\n },\n 'js': {\n 'popup': (\n 'js/libs/jquery-1.9.1.js',\n 'js/jquery-upgrade-compat.js',\n 'js/libs/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js',\n 'js/modal-control.js',\n 'js/init.js',\n ),\n 'profile': (\n 'js/profile.js',\n 'js/moz-jquery-plugins.js',\n ),\n 'events': (\n 'js/libs/jquery.gmap-1.1.0.js',\n 'js/calendar.js',\n ),\n 'demostudio': (\n 'js/libs/jquery.hoverIntent.minified.js',\n 'js/libs/jquery.scrollTo-1.4.2-min.js',\n 'js/demos.js',\n 'js/libs/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js',\n 'js/modal-control.js',\n ),\n 'demostudio_devderby_landing': (\n 'js/demos-devderby-landing.js',\n ),\n 'jquery-ui': (\n 'js/libs/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js',\n 'js/moz-jquery-plugins.js',\n ),\n 'libs/tagit': (\n 'js/libs/tag-it.js',\n ),\n 'search': (\n 'redesign/js/search.js',\n ),\n 'wiki': (\n 'js/main.js',\n 'js/wiki.js',\n ),\n 'wiki-edit': (\n 'js/wiki-edit.js',\n 'js/libs/tag-it.js',\n 'js/wiki-tags-edit.js',\n ),\n 'dashboards': (\n 'js/libs/DataTables-1.9.4/media/js/jquery.dataTables.js',\n 'js/libs/DataTables-1.9.4/extras/Scroller/media/js/dataTables.scroller.js',\n ),\n 'users': (\n 'js/empty.js',\n ),\n 'framebuster': (\n 'js/framebuster.js',\n ),\n 'syntax-prism': (\n 'js/libs/prism/prism.js',\n 'js/prism-mdn/components/prism-json.js',\n 'js/prism-mdn/plugins/line-numbering/prism-line-numbering.js',\n 'js/syntax-prism.js',\n ),\n 'ace-editor': (\n 'js/libs/ace/ace.js',\n 'js/libs/ace/mode-javascript.js',\n 'js/libs/ace/theme-dreamweaver.js',\n 'js/libs/ace/worker-javascript.js',\n ),\n 'redesign-main': (\n 'js/libs/jquery-1.9.1.js',\n 'js/jquery-upgrade-compat.js',\n 'js/init.js',\n\n # Home Page\n # cycle and slideshow only needed on the home page (or any page\n # featuring the slide show widget).\n 'js/libs/jquery.cycle.js',\n 'js/libs/slideshow.js',\n \n 'redesign/js/components.js',\n 'redesign/js/main.js',\n ),\n 'redesign-wiki': (\n 'redesign/js/wiki.js',\n ),\n 'newsletter': (\n 'redesign/js/newsletter.js',\n ),\n },\n}\n\nJAVA_BIN = '/usr/bin/java'\n\n#\n# Session cookies\nSESSION_COOKIE_SECURE = True\nSESSION_COOKIE_HTTPONLY = True\nSESSION_EXPIRE_AT_BROWSER_CLOSE = True\n\n# Cookie prefix from PHPBB settings.\nPHPBB_COOKIE_PREFIX = 'phpbb3_jzxvr'\n\n#\n# Connection information for Sphinx search\nSPHINX_HOST = '127.0.0.1'\nSPHINX_PORT = 3381\nSPHINXQL_PORT = 3382\n\nSPHINX_INDEXER = '/usr/bin/indexer'\nSPHINX_SEARCHD = '/usr/bin/searchd'\nSPHINX_CONFIG_PATH = path('configs/sphinx/sphinx.conf')\n\nTEST_SPHINX_PATH = path('tmp/test/sphinx')\nTEST_SPHINX_PORT = 3416\nTEST_SPHINXQL_PORT = 3418\n\nSEARCH_MAX_RESULTS = 1000\nSEARCH_RESULTS_PER_PAGE = 10\n\n# Search default settings\n# comma-separated tuple of included category IDs. Negative IDs are excluded.\nSEARCH_DEFAULT_CATEGORIES = (10, 20,)\nSEARCH_SUMMARY_LENGTH = 275\n\n# The length for which we would like the user to cache search forms and\n# results, in minutes.\nSEARCH_CACHE_PERIOD = 15\n\n# Maximum length of the filename. Forms should use this and raise\n# ValidationError if the length is exceeded.\n# @see http://code.djangoproject.com/ticket/9893\n# Columns are 250 but this leaves 50 chars for the upload_to prefix\nMAX_FILENAME_LENGTH = 200\nMAX_FILEPATH_LENGTH = 250\n\nATTACHMENT_HOST = 'mdn.mozillademos.org'\n\n# Auth and permissions related constants\nLOGIN_URL = '/users/login'\nLOGOUT_URL = '/users/logout'\nLOGIN_REDIRECT_URL = \"/\"\nLOGOUT_REDIRECT_URL = \"/\"\nREGISTER_URL = '/users/register'\n\n# Video settings, hard coded here for now.\n# TODO: figure out a way that doesn't need these values\nWIKI_VIDEO_WIDTH = 640\nWIKI_VIDEO_HEIGHT = 480\n\nIMAGE_MAX_FILESIZE = 1048576 # 1 megabyte, in bytes\nTHUMBNAIL_SIZE = 120 # Thumbnail size, in pixels\nTHUMBNAIL_UPLOAD_PATH = 'uploads/images/thumbnails/'\nIMAGE_UPLOAD_PATH = 'uploads/images/'\n# A string listing image mime types to accept, comma separated.\n# String must not contain double quotes!\nIMAGE_ALLOWED_MIMETYPES = 'image/jpeg,image/png,image/gif'\n\n# Email\nEMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'\nEMAIL_FILE_PATH = '/tmp/kuma-messages'\n\n# Celery\nimport djcelery\ndjcelery.setup_loader()\n\nBROKER_HOST = 'localhost'\nBROKER_PORT = 5672\nBROKER_USER = 'kuma'\nBROKER_PASSWORD = 'kuma'\nBROKER_VHOST = 'kuma'\nCELERY_RESULT_BACKEND = 'amqp'\nCELERY_IGNORE_RESULT = True\nCELERY_ALWAYS_EAGER = True # For tests. Set to False for use.\nCELERY_SEND_TASK_ERROR_EMAILS = True\nCELERYD_LOG_LEVEL = logging.INFO\nCELERYD_CONCURRENCY = 4\n\nCELERY_IMPORTS = (\n 'wiki.tasks',\n 'search.tasks',\n 'tidings.events',\n 'elasticutils.contrib.django.tasks',\n)\n\nCELERY_ANNOTATIONS = {\n \"elasticutils.contrib.django.tasks.index_objects\": {\n \"rate_limit\": \"100/m\",\n },\n \"elasticutils.contrib.django.tasks.unindex_objects\": {\n \"rate_limit\": \"100/m\",\n }\n}\n\nCELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'\n\n# Wiki rebuild settings\nWIKI_REBUILD_TOKEN = 'sumo:wiki:full-rebuild'\nWIKI_REBUILD_ON_DEMAND = False\n\n# Anonymous user cookie\nANONYMOUS_COOKIE_NAME = 'SUMO_ANONID'\nANONYMOUS_COOKIE_MAX_AGE = 30 * 86400 # Seconds\n\n# Top contributors cache settings\nTOP_CONTRIBUTORS_CACHE_KEY = 'sumo:TopContributors'\nTOP_CONTRIBUTORS_CACHE_TIMEOUT = 60 * 60 * 12\n\n# Do not change this without also deleting all wiki documents:\nWIKI_DEFAULT_LANGUAGE = LANGUAGE_CODE\n\n\nTIDINGS_FROM_ADDRESS = '[email protected]'\nTIDINGS_CONFIRM_ANONYMOUS_WATCHES = True\n\n# recaptcha\nRECAPTCHA_USE_SSL = False\nRECAPTCHA_PRIVATE_KEY = 'SET ME IN SETTINGS_LOCAL'\nRECAPTCHA_PUBLIC_KEY = 'SET ME IN SETTINGS_LOCAL'\n\n# content flagging\nFLAG_REASONS = (\n ('notworking', _('This demo is not working for me')),\n ('inappropriate', _('This demo contains inappropriate content')),\n ('plagarised', _('This demo was not created by the author')),\n)\n\n# bit.ly\nBITLY_API_KEY = \"SET ME IN SETTINGS_LOCAL\"\nBITLY_USERNAME = \"SET ME IN SETTINGS_LOCAL\"\n\nGOOGLE_MAPS_API_KEY = \"ABQIAAAAijZqBZcz-rowoXZC1tt9iRT5rHVQFKUGOHoyfP_4KyrflbHKcRTt9kQJVST5oKMRj8vKTQS2b7oNjQ\"\n\n# demo studio uploads\n# Filesystem path where files uploaded for demos will be written\nDEMO_UPLOADS_ROOT = path('media/uploads/demos')\n# Base URL from where files uploaded for demos will be linked and served\nDEMO_UPLOADS_URL = '/media/uploads/demos/'\n\n# Make sure South stays out of the way during testing\nSOUTH_TESTS_MIGRATE = False\nSKIP_SOUTH_TESTS = True\n\n# Provide migrations for third-party vendor apps\n# TODO: Move migrations for our apps here, rather than living with the app?\nSOUTH_MIGRATION_MODULES = {\n 'taggit': 'migrations.south.taggit',\n # HACK: South treats \"database\" as the name of constance.backends.database\n 'database': 'migrations.south.constance',\n}\n\nCONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'\nCONSTANCE_DATABASE_CACHE_BACKEND = None\n\n# Settings and defaults controllable by Constance in admin\nCONSTANCE_CONFIG = dict(\n\n BROWSERID_REALM_JSON = (\n json.dumps({\n 'realm': ['https://developer.mozilla.org',\n 'https://marketplace.firefox.com']\n }),\n \"Define the other sites belonging to this site's BrowserID realm.\"\n ),\n\n DEMOS_DEVDERBY_CURRENT_CHALLENGE_TAG = (\n \"challenge:2011:september\",\n \"Dev derby current challenge\"\n ),\n\n DEMOS_DEVDERBY_PREVIOUS_WINNER_TAG = (\n \"system:challenge:firstplace:2011:august\",\n \"Tag used to find most recent winner for dev derby\"\n ),\n\n DEMOS_DEVDERBY_CHALLENGE_CHOICE_TAGS = (\n ' '.join([\n \"challenge:2011:september\",\n \"challenge:2011:october\",\n \"challenge:2011:november\",\n ]),\n \"Dev derby choices displayed on submission form (space-separated tags)\"\n ),\n\n DEMOS_DEVDERBY_PREVIOUS_CHALLENGE_TAGS = (\n ' '.join([\n \"challenge:2011:august\",\n \"challenge:2011:july\",\n \"challenge:2011:june\",\n ]),\n \"Dev derby tags for previous challenges (space-separated tags)\"\n ),\n\n DEMOS_DEVDERBY_HOMEPAGE_FEATURED_DEMO = (\n 0,\n 'The ID of the demo which should be featured on the new homepage structure'\n ),\n\n BASKET_RETRIES = (\n 5,\n 'Number of time to retry basket post before giving up.'\n ),\n BASKET_RETRY_WAIT = (\n .5,\n 'How long to wait between basket api request retries. '\n 'We typically multiply this value by the retry number so, e.g., '\n 'the 4th retry waits 4*.5 = 2 seconds.'\n ),\n BASKET_API_KEY = (\n '',\n 'API Key to use for basket requests'\n ),\n\n BETA_GROUP_NAME = (\n 'Beta Testers',\n 'Name of the django.contrib.auth.models.Group to use as beta testers'\n ),\n\n KUMA_DOCUMENT_RENDER_TIMEOUT = (\n 180.0,\n 'Maximum seconds to wait before considering a rendering in progress or '\n 'scheduled as failed and allowing another attempt.'\n ),\n KUMA_DOCUMENT_FORCE_DEFERRED_TIMEOUT = (\n 10.0,\n 'Maximum seconds to allow a document to spend rendering during the '\n 'response cycle before flagging it to be sent to the deferred rendering '\n 'queue for future renders.'\n ),\n\n KUMASCRIPT_TIMEOUT = (\n 0.0,\n 'Maximum seconds to wait for a response from the kumascript service. '\n 'On timeout, the document gets served up as-is and without macro '\n 'evaluation as an attempt at graceful failure. NOTE: a value of 0 '\n 'disables kumascript altogether.'\n ),\n KUMASCRIPT_MAX_AGE = (\n 600,\n 'Maximum acceptable age (in seconds) of a cached response from '\n 'kumascript. Passed along in a Cache-Control: max-age={value} header, '\n 'which tells kumascript whether or not to serve up a cached response.'\n ),\n\n KUMA_CUSTOM_CSS_PATH = (\n '/en-US/docs/Template:CustomCSS',\n 'Path to a wiki document whose raw content will be loaded as a CSS '\n 'stylesheet for the wiki base template. Will also cause the ?raw '\n 'parameter for this path to send a Content-Type: text/css header. Empty '\n 'value disables the feature altogether.',\n ),\n\n KUMA_CUSTOM_SAMPLE_CSS_PATH = (\n '/en-US/docs/Template:CustomSampleCSS',\n 'Path to a wiki document whose raw content will be loaded as a CSS '\n 'stylesheet for live sample template. Will also cause the ?raw '\n 'parameter for this path to send a Content-Type: text/css header. Empty '\n 'value disables the feature altogether.',\n ),\n\n DIFF_CONTEXT_LINES = (\n 0,\n 'Number of lines of context to show in diff display.',\n ),\n\n FEED_DIFF_CONTEXT_LINES = (\n 3,\n 'Number of lines of context to show in feed diff display.',\n ),\n\n WIKI_ATTACHMENT_ALLOWED_TYPES = (\n 'image/gif image/jpeg image/png image/svg+xml text/html image/vnd.adobe.photoshop',\n 'Allowed file types for wiki file attachments',\n ),\n\n KUMA_WIKI_IFRAME_ALLOWED_HOSTS = (\n '^https?\\:\\/\\/(developer-local.allizom.org|developer-dev.allizom.org|developer.allizom.org|mozillademos.org|testserver|localhost\\:8000|(www.)?youtube.com\\/embed\\/(\\.*))',\n 'Regex comprised of domain names that are allowed for IFRAME SRCs'\n ),\n\n GOOGLE_ANALYTICS_ACCOUNT = (\n '0',\n 'Google Analytics Tracking Account Number (0 to disable)',\n ),\n\n OPTIMIZELY_PROJECT_ID = (\n '',\n 'The ID value for optimizely Project Code script'\n ),\n\n BLEACH_ALLOWED_TAGS = (\n json.dumps([\n 'a', 'p', 'div',\n ]),\n \"JSON array of tags allowed through Bleach\",\n ),\n\n BLEACH_ALLOWED_ATTRIBUTES = (\n json.dumps({\n '*': ['id', 'class', 'style'],\n }),\n \"JSON object associating tags with lists of allowed attributes\",\n ),\n\n BLEACH_ALLOWED_STYLES = (\n json.dumps([\n 'font-size', 'text-align',\n ]),\n \"JSON array listing CSS styles allowed on tags\",\n ),\n\n WIKI_DOCUMENT_TAG_SUGGESTIONS = (\n json.dumps([\n \"Accessibility\", \"AJAX\", \"API\", \"Apps\",\n \"Canvas\", \"CSS\", \"Device\", \"DOM\", \"Events\",\n \"Extensions\", \"Firefox\", \"Firefox OS\", \"Games\",\n \"Gecko\", \"Graphics\", \"Internationalization\", \"History\", \"HTML\", \"HTTP\", \"JavaScript\", \"Layout\",\n \"Localization\", \"MDN\", \"Mobile\", \"Mozilla\",\n \"Networking\", \"Persona\", \"Places\", \"Plugins\", \"Protocols\",\n\n \"Reference\", \"Tutorial\", \"Landing\",\n\n \"junk\", \"NeedsMarkupWork\", \"NeedsContent\", \"NeedsExample\",\n ]),\n \"JSON array listing tag suggestions for documents\"\n ),\n\n SEARCH_FILTER_TAG_OPTIONS = (\n json.dumps([\n \"Accessibility\", \"AJAX\", \"API\", \"Apps\",\n \"Canvas\", \"CSS\", \"Device\", \"DOM\", \"Events\",\n \"Extensions\", \"Firefox\", \"Firefox OS\", \"Games\",\n \"Gecko\", \"Graphics\", \"Internationalization\", \"History\", \"HTML\", \"HTTP\", \"JavaScript\", \"Layout\",\n \"Localization\", \"MDN\", \"Mobile\", \"Mozilla\",\n \"Networking\", \"Persona\", \"Places\", \"Plugins\", \"Protocols\",\n\n \"Reference\", \"Tutorial\", \"Landing\",\n\n \"junk\", \"NeedsMarkupWork\", \"NeedsContent\", \"NeedsExample\",\n ]),\n \"JSON array of tags that are enabled for search faceting\"\n ),\n\n EXTERNAL_SIGNUP_EMAIL = (\n '',\n 'The email address to receive external docs signup emails.'\n ),\n)\n\nBROWSERID_VERIFICATION_URL = 'https://verifier.login.persona.org/verify'\n\nLOGIN_REDIRECT_URL = '/'\nLOGIN_REDIRECT_URL_FAILURE = '/'\n\nBASKET_URL = 'https://basket.mozilla.com'\nBASKET_APPS_NEWSLETTER = 'app-dev'\n\nKUMASCRIPT_URL_TEMPLATE = 'http://developer.mozilla.org:9080/docs/{path}'\n\nSTATSD_CLIENT = 'django_statsd.clients.normal'\nSTATSD_HOST = 'localhost'\nSTATSD_PORT = 8125\nSTATSD_PREFIX = 'developer'\n\nGRAPHITE_HOST = 'localhost'\nGRAPHITE_PORT = 2003\nGRAPHITE_PREFIX = 'devmo'\nGRAPHITE_TIMEOUT = 1\n\nES_DISABLED = True\nES_LIVE_INDEX = False\n\nLOG_LEVEL = logging.WARN\nSYSLOG_TAG = 'http_app_kuma'\n\nLOGGING = {\n 'version': 1,\n 'disable_existing_loggers': False,\n 'filters': {\n 'require_debug_false': {\n '()': 'django.utils.log.RequireDebugFalse',\n },\n 'require_debug_true': {\n # use from devmo.helpers until we upgrade to django 1.5\n '()': 'devmo.future.filters.RequireDebugTrue',\n },\n },\n 'formatters': {\n 'default': {\n 'format': '{0}: %(asctime)s %(name)s:%(levelname)s %(message)s: '\n '%(pathname)s:%(lineno)s'.format(SYSLOG_TAG),\n }\n },\n 'handlers': {\n 'console': {\n 'class': 'logging.StreamHandler',\n 'filters': ['require_debug_true'],\n 'level': LOG_LEVEL,\n },\n 'mail_admins': {\n 'class': 'django.utils.log.AdminEmailHandler',\n 'filters': ['require_debug_false'],\n 'level': logging.ERROR,\n },\n },\n 'loggers': {\n 'mdn': {\n 'handlers': ['console'],\n 'propagate': True,\n # Use the most permissive setting. It is filtered in the handlers.\n 'level': logging.DEBUG,\n },\n 'django.request': {\n 'handlers': ['console'],\n 'propagate': True,\n # Use the most permissive setting. It is filtered in the handlers.\n 'level': logging.DEBUG,\n },\n },\n}\n\n\nCSRF_COOKIE_SECURE = True\nX_FRAME_OPTIONS = 'DENY'\n\nSENTRY_DSN = 'set this in settings_local.py'\nTEAMWORK_BASE_POLICIES = {\n 'anonymous': (\n 'wiki.view_document',),\n 'authenticated': (\n 'wiki.view_document', 'wiki.add_document', 'wiki.add_revision'),\n}\n\nGRAPPELLI_ADMIN_TITLE = 'Mozilla Developer Network - Admin'\nGRAPPELLI_INDEX_DASHBOARD = 'admin_dashboard.CustomIndexDashboard'\n\nDBGETTEXT_PATH = 'apps/'\nDBGETTEXT_ROOT = 'translations'\n", "path": "settings.py" } ]
diff --git a/settings.py b/settings.py index 6fa7134e856..38ca2637afc 100644 --- a/settings.py +++ b/settings.py @@ -319,6 +319,7 @@ def lazy_language_deki_map(): 'admindocs', 'registration', 'grappelli', + 'waffle' ) TEMPLATE_CONTEXT_PROCESSORS = ( diff --git a/templates/includes/config.html b/templates/includes/config.html index f1cd957eaed..83181e4150e 100644 --- a/templates/includes/config.html +++ b/templates/includes/config.html @@ -1,4 +1,5 @@ <script type="text/javascript"> + {{ waffle.wafflejs() }} // This represents the site configuration window.mdn = { build: '{{ BUILD_ID_JS }}', @@ -15,4 +16,4 @@ autosuggestTitleUrl: '{{ url('wiki.autosuggest_documents') }}' } }; -</script> \ No newline at end of file +</script> diff --git a/vendor b/vendor index d58975d9f9c..8f91262c89e 160000 --- a/vendor +++ b/vendor @@ -1 +1 @@ -Subproject commit d58975d9f9ce200eac2d8c2ee1ae81aa939f0705 +Subproject commit 8f91262c89e41d8c8d9187fd10bda610d8efb46f
librosa__librosa-1738
Release new version to fix scipy tests https://github.com/librosa/librosa/commit/12dee8eabed7df14c5622b52c05393ddfeb11f4b fixed compatibility with scipy in tests but it's not included in any release. We rely as downstream packagers on tests to ensure all python dependencies play well together.
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Version info\"\"\"\n\nimport sys\nimport importlib\n\nshort_version = \"0.10\"\nversion = \"0.10.1dev\"\n\n\ndef __get_mod_version(modname):\n try:\n if modname in sys.modules:\n mod = sys.modules[modname]\n else:\n mod = importlib.import_module(modname)\n try:\n return mod.__version__\n except AttributeError:\n return \"installed, no version number available\"\n\n except ImportError:\n return None\n\n\ndef show_versions() -> None:\n \"\"\"Return the version information for all librosa dependencies.\"\"\"\n core_deps = [\n \"audioread\",\n \"numpy\",\n \"scipy\",\n \"sklearn\",\n \"joblib\",\n \"decorator\",\n \"numba\",\n \"soundfile\",\n \"pooch\",\n \"soxr\",\n \"typing_extensions\",\n \"lazy_loader\",\n \"msgpack\",\n ]\n\n extra_deps = [\n \"numpydoc\",\n \"sphinx\",\n \"sphinx_rtd_theme\",\n \"matplotlib\",\n \"sphinx_multiversion\",\n \"sphinx_gallery\",\n \"mir_eval\",\n \"ipython\",\n \"sphinxcontrib.rsvgconverter\",\n \"pytest\",\n \"pytest_mpl\",\n \"pytest_cov\",\n \"samplerate\",\n \"resampy\",\n \"presets\",\n \"packaging\",\n ]\n\n print(\"INSTALLED VERSIONS\")\n print(\"------------------\")\n print(f\"python: {sys.version}\\n\")\n print(f\"librosa: {version}\\n\")\n for dep in core_deps:\n print(\"{}: {}\".format(dep, __get_mod_version(dep)))\n print(\"\")\n for dep in extra_deps:\n print(\"{}: {}\".format(dep, __get_mod_version(dep)))\n", "path": "librosa/version.py" } ]
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Version info\"\"\"\n\nimport sys\nimport importlib\n\nshort_version = \"0.10\"\nversion = \"0.10.1\"\n\n\ndef __get_mod_version(modname):\n try:\n if modname in sys.modules:\n mod = sys.modules[modname]\n else:\n mod = importlib.import_module(modname)\n try:\n return mod.__version__\n except AttributeError:\n return \"installed, no version number available\"\n\n except ImportError:\n return None\n\n\ndef show_versions() -> None:\n \"\"\"Return the version information for all librosa dependencies.\"\"\"\n core_deps = [\n \"audioread\",\n \"numpy\",\n \"scipy\",\n \"sklearn\",\n \"joblib\",\n \"decorator\",\n \"numba\",\n \"soundfile\",\n \"pooch\",\n \"soxr\",\n \"typing_extensions\",\n \"lazy_loader\",\n \"msgpack\",\n ]\n\n extra_deps = [\n \"numpydoc\",\n \"sphinx\",\n \"sphinx_rtd_theme\",\n \"matplotlib\",\n \"sphinx_multiversion\",\n \"sphinx_gallery\",\n \"mir_eval\",\n \"ipython\",\n \"sphinxcontrib.rsvgconverter\",\n \"pytest\",\n \"pytest_mpl\",\n \"pytest_cov\",\n \"samplerate\",\n \"resampy\",\n \"presets\",\n \"packaging\",\n ]\n\n print(\"INSTALLED VERSIONS\")\n print(\"------------------\")\n print(f\"python: {sys.version}\\n\")\n print(f\"librosa: {version}\\n\")\n for dep in core_deps:\n print(\"{}: {}\".format(dep, __get_mod_version(dep)))\n print(\"\")\n for dep in extra_deps:\n print(\"{}: {}\".format(dep, __get_mod_version(dep)))\n", "path": "librosa/version.py" } ]
diff --git a/AUTHORS.md b/AUTHORS.md index 46f350e5d1..ac1b32471f 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -101,6 +101,8 @@ Contributors * Fabian Keller <https://github.com/bluenote10> * BdeGraff <https://github.com/BdeGraff> * Jon Petter Åsen <https://github.com/jpaasen> +* Shin Hyun <https://github.com/kyaryunha> +* Iliya S <https://github.com/zenitismus> Some feature extraction code was based on <https://github.com/ronw/frontend> by Ron Weiss. diff --git a/docs/changelog.rst b/docs/changelog.rst index f7529d3618..15b843471f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,6 +5,49 @@ Changelog v0.10 ===== +v0.10.1 +------- +2023-08-16 + +This release consists primarily of corrections to documentation and updates to tests and development +environment specifications. + + +Bug fixes + - `#1677`_ Correct handling of octave boundaries in Variable-Q transform. *Brian McFee* + - `#1693`_ Stricter checks on yin and pyin parameters. *Brian McFee* + - `#1726`_ Enforce consistency of time-to-sample unit conversion. *Brian McFee* + + +Documentation + - `#1699`_ Update the documentation to support sphinx 6.x. *Brian McFee* + - `#1703`_ Corrected `pitch_shift` documentation for `bins_per_octave`. *Shin Hyun* + - `#1706`_ Corrected typo on README.md. *Iliya S.* + - `#1713`_ Multiple minor documentation updates. *Brian McFee* + - `#1718`_ Added continuous integration action for documentation builds. *Brian McFee* + - `#1719`_ Added advanced example for patch generation. *Brian McFee* + +Other changes + - `#1704`_ Added `scale=` parameter to `effects.pitch_shift`. *Shin Hyun* + - `#1722`_ Restructured `lazy_loader` usage of matplotlib. *Brian McFee* + - `#1727`_ Support `pooch>=1.7.0`. *Brian McFee* + - `#1731`_ Update test suite to support `scipy>=1.11`. *Brian McFee* + +.. _#1677: https://github.com/librosa/librosa/issues/1677 +.. _#1693: https://github.com/librosa/librosa/issues/1693 +.. _#1726: https://github.com/librosa/librosa/issues/1726 +.. _#1699: https://github.com/librosa/librosa/issues/1699 +.. _#1703: https://github.com/librosa/librosa/issues/1703 +.. _#1706: https://github.com/librosa/librosa/issues/1706 +.. _#1713: https://github.com/librosa/librosa/issues/1713 +.. _#1718: https://github.com/librosa/librosa/issues/1718 +.. _#1719: https://github.com/librosa/librosa/issues/1719 +.. _#1704: https://github.com/librosa/librosa/issues/1704 +.. _#1722: https://github.com/librosa/librosa/issues/1722 +.. _#1727: https://github.com/librosa/librosa/issues/1727 +.. _#1731: https://github.com/librosa/librosa/issues/1731 + + v0.10.0.post2 ------------- 2023-03-17 @@ -317,7 +360,7 @@ Documentation Other changes - `#1312`_ `librosa.display.specshow` can now automatically sets the aspect ratio of a plot if the axes are of the same type and shape. *N. Dorukhan Sergin* - - `#1323`_, `#1317_`, `#1308`_ simplified testing framework and migrated to GitHub Actions. *Brian McFee* + - `#1323`_, `#1317`_, `#1308`_ simplified testing framework and migrated to GitHub Actions. *Brian McFee* - `#1324`_ `librosa.display.specshow` is now future-proofed for matplotlib 3.5. *Brian McFee* - `#1334`_ `librosa.display.specshow` now supports HTK-style Mel scaling. *Brian McFee* - `#1335`_, `#1336`_ `librosa.display.specshow` now supports pitch notation diff --git a/librosa/version.py b/librosa/version.py index 7c56fad5a9..c6b32858c7 100644 --- a/librosa/version.py +++ b/librosa/version.py @@ -6,7 +6,7 @@ import importlib short_version = "0.10" -version = "0.10.1dev" +version = "0.10.1" def __get_mod_version(modname):
pulp__pulpcore-4449
As a user I can list repos whose name match a regex I'd like to be able to hit the `/pulp/api/v3/repositories/` endpoint with a filter like `name__regex` or `name__iregex` to list repos whose name match a particular regex. We have hundreds of repos so this would be a much welcome feature. https://docs.djangoproject.com/en/4.2/ref/models/querysets/#regex https://docs.djangoproject.com/en/4.2/ref/models/querysets/#iregex
[ { "content": "import warnings\nfrom gettext import gettext as _\nfrom urllib.parse import urlparse\n\nfrom django.conf import settings\nfrom django.db import transaction\nfrom django.db.models.expressions import RawSQL\nfrom django.core.exceptions import FieldError, ValidationError\nfrom django.urls import Resolver404, resolve\nfrom django.contrib.contenttypes.models import ContentType\nfrom drf_spectacular.utils import extend_schema, inline_serializer\nfrom rest_framework import viewsets\nfrom rest_framework.decorators import action\nfrom rest_framework.generics import get_object_or_404\nfrom rest_framework.response import Response\nfrom pulpcore.openapi import PulpAutoSchema\nfrom rest_framework.serializers import ValidationError as DRFValidationError, ListField, CharField\n\nfrom pulpcore.app import tasks\nfrom pulpcore.app.models import MasterModel\nfrom pulpcore.app.models.role import GroupRole, UserRole\nfrom pulpcore.app.response import OperationPostponedResponse\nfrom pulpcore.app.role_util import get_objects_for_user\nfrom pulpcore.app.serializers import (\n AsyncOperationResponseSerializer,\n NestedRoleSerializer,\n SetLabelSerializer,\n UnsetLabelSerializer,\n)\nfrom pulpcore.app.util import get_viewset_for_model\nfrom pulpcore.tasking.tasks import dispatch\n\n# These should be used to prevent duplication and keep things consistent\nNAME_FILTER_OPTIONS = [\n \"exact\",\n \"iexact\",\n \"in\",\n \"contains\",\n \"icontains\",\n \"startswith\",\n \"istartswith\",\n]\n# e.g.\n# /?name=foo\n# /?name__in=foo,bar\nDATETIME_FILTER_OPTIONS = [\"exact\", \"lt\", \"lte\", \"gt\", \"gte\", \"range\"]\n# e.g.\n# /?pulp_created__gte=2018-04-12T19:45:52\n# /?pulp_created__range=2018-04-12T19:45:52,2018-04-13T19:45:52\nNULLABLE_NUMERIC_FILTER_OPTIONS = [\"exact\", \"ne\", \"lt\", \"lte\", \"gt\", \"gte\", \"range\", \"isnull\"]\n\n\nclass DefaultSchema(PulpAutoSchema):\n \"\"\"\n Overrides _allows_filters method to include filter fields only for read actions.\n\n Schema can be customised per view(set). Override this class and set it as a ``schema``\n attribute of a view(set) of interest.\n \"\"\"\n\n def _allows_filters(self):\n \"\"\"\n Include filter fields only for read actions, or GET requests.\n\n Returns:\n bool: True if filter fields should be included into the schema, False otherwise.\n \"\"\"\n if getattr(self.view, \"filter_backends\", None) is None:\n return False\n\n if hasattr(self.view, \"action\"):\n return self.view.action in [\"list\"]\n\n return self.method.lower() in [\"get\"]\n\n\nclass NamedModelViewSet(viewsets.GenericViewSet):\n \"\"\"\n A customized named ModelViewSet that knows how to register itself with the Pulp API router.\n\n This viewset is discoverable by its name.\n \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method.\n\n Attributes:\n lookup_field (str): The name of the field by which an object should be looked up, in\n addition to any parent lookups if this ViewSet is nested. Defaults to 'pk'\n endpoint_name (str): The name of the final path segment that should identify the ViewSet's\n collection endpoint.\n nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must\n correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin.\n None indicates this ViewSet should not be nested.\n parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs\n to django model filter expressions that can be used with the corresponding value from\n self.kwargs, used only by a nested ViewSet to filter based on the parent object's\n identity.\n schema (DefaultSchema): The schema class to use by default in a viewset.\n \"\"\"\n\n endpoint_name = None\n nest_prefix = None\n parent_viewset = None\n parent_lookup_kwargs = {}\n schema = DefaultSchema()\n\n def get_serializer_class(self):\n \"\"\"\n Fetch the serializer class to use for the request.\n\n The default behavior is to use the \"serializer_class\" attribute on the viewset.\n We override that for the case where a \"minimal_serializer_class\" attribute is defined\n and where the request contains a query parameter of \"minimal=True\".\n\n The intention is that ViewSets can define a second, more minimal serializer with only\n the most important fields.\n \"\"\"\n assert self.serializer_class is not None, (\n \"'{}' should either include a `serializer_class` attribute, or override the \"\n \"`get_serializer_class()` method.\"\n ).format(self.__class__.__name__)\n minimal_serializer_class = getattr(self, \"minimal_serializer_class\", None)\n\n if minimal_serializer_class:\n if getattr(self, \"request\", None):\n if \"minimal\" in self.request.query_params:\n # the query param is a string, and non-empty strings evaluate True,\n # so we need to do an actual string comparison to 'true'\n if self.request.query_params[\"minimal\"].lower() == \"true\":\n return minimal_serializer_class\n\n return self.serializer_class\n\n @staticmethod\n def get_resource_model(uri):\n \"\"\"\n Resolve a resource URI to the model for the resource.\n\n Provides a means to resolve an href passed in a POST body to an\n model for the resource.\n\n Args:\n uri (str): A resource URI.\n\n Returns:\n django.models.Model: The model for the specified URI.\n\n Raises:\n rest_framework.exceptions.ValidationError: on invalid URI.\n \"\"\"\n try:\n match = resolve(urlparse(uri).path)\n except Resolver404:\n raise DRFValidationError(detail=_(\"URI not valid: {u}\").format(u=uri))\n\n return match.func.cls.queryset.model\n\n @staticmethod\n def get_resource(uri, model=None):\n \"\"\"\n Resolve a resource URI to an instance of the resource.\n\n Provides a means to resolve an href passed in a POST body to an\n instance of the resource.\n\n Args:\n uri (str): A resource URI.\n model (django.models.Model): A model class. If not provided, the method automatically\n determines the used model from the resource URI.\n\n Returns:\n django.models.Model: The resource fetched from the DB.\n\n Raises:\n rest_framework.exceptions.ValidationError: on invalid URI or resource not found.\n \"\"\"\n try:\n match = resolve(urlparse(uri).path)\n except Resolver404:\n raise DRFValidationError(detail=_(\"URI not valid: {u}\").format(u=uri))\n\n if model is None:\n model = match.func.cls.queryset.model\n\n if \"pk\" in match.kwargs:\n kwargs = {\"pk\": match.kwargs[\"pk\"]}\n else:\n kwargs = {}\n for key, value in match.kwargs.items():\n if key.endswith(\"_pk\"):\n kwargs[\"{}__pk\".format(key[:-3])] = value\n elif key == \"pulp_domain\":\n if hasattr(model, \"pulp_domain\"):\n kwargs[\"pulp_domain__name\"] = value\n else:\n kwargs[key] = value\n\n try:\n return model.objects.get(**kwargs)\n except model.MultipleObjectsReturned:\n raise DRFValidationError(\n detail=_(\"URI {u} matches more than one {m}.\").format(\n u=uri, m=model._meta.model_name\n )\n )\n except model.DoesNotExist:\n raise DRFValidationError(\n detail=_(\"URI {u} not found for {m}.\").format(u=uri, m=model._meta.model_name)\n )\n except ValidationError:\n raise DRFValidationError(detail=_(\"ID invalid: {u}\").format(u=kwargs[\"pk\"]))\n except FieldError:\n raise DRFValidationError(\n detail=_(\"URI {u} is not a valid {m}.\").format(u=uri, m=model._meta.model_name)\n )\n\n @classmethod\n def is_master_viewset(cls):\n # ViewSet isn't related to a model, so it can't represent a master model\n if getattr(cls, \"queryset\", None) is None:\n return False\n\n # ViewSet is related to a MasterModel subclass that doesn't have its own related\n # master model, which makes this viewset a master viewset.\n if (\n issubclass(cls.queryset.model, MasterModel)\n and cls.queryset.model._meta.master_model is None\n ):\n return True\n\n return False\n\n @classmethod\n def routable(cls) -> bool:\n # Determines if ViewSet should be added to router\n return not cls.is_master_viewset()\n\n @classmethod\n def view_name(cls):\n return \"-\".join(cls.endpoint_pieces())\n\n @classmethod\n def urlpattern(cls):\n return \"/\".join(cls.endpoint_pieces())\n\n @classmethod\n def endpoint_pieces(cls):\n # This is a core ViewSet, not Master/Detail. We can use the endpoint as is.\n if cls.queryset.model._meta.master_model is None:\n return [cls.endpoint_name]\n else:\n # Model is a Detail model. Go through its ancestry (via MRO) to find its\n # eldest superclass with a declared name, representing the Master ViewSet\n master_endpoint_name = None\n # first item in method resolution is the viewset we're starting with,\n # so start finding parents at the second item, index 1.\n for eldest in reversed(cls.mro()):\n try:\n if eldest is not cls and eldest.endpoint_name is not None:\n master_endpoint_name = eldest.endpoint_name\n break\n except AttributeError:\n # no endpoint_name defined, need to get more specific in the MRO\n continue\n\n # if there is no master viewset or master endpoint name, just use endpoint_name\n if master_endpoint_name is None:\n return [cls.endpoint_name]\n\n # prepend endpoint of a plugin model with its Django app label\n app_label = cls.queryset.model._meta.app_label\n detail_endpoint_name = \"{app_label}/{plugin_endpoint_name}\".format(\n app_label=app_label, plugin_endpoint_name=cls.endpoint_name\n )\n\n pieces = [master_endpoint_name, detail_endpoint_name]\n\n # ensure that neither piece is None/empty and that they are not equal.\n if not all(pieces) or pieces[0] == pieces[1]:\n # unable to register; warn and return\n msg = (\n \"Unable to determine viewset inheritance path for master/detail \"\n \"relationship represented by viewset {}. Does the Detail ViewSet \"\n \"correctly subclass the Master ViewSet, and do both have endpoint_name \"\n \"set to different values?\"\n ).format(cls.__name__)\n warnings.warn(msg, RuntimeWarning)\n return []\n return pieces\n\n def initial(self, request, *args, **kwargs):\n \"\"\"\n Runs anything that needs to occur prior to calling the method handler.\n\n For nested ViewSets, it checks that the parent object exists, otherwise return 404.\n For non-nested Viewsets, this does nothing.\n \"\"\"\n if self.parent_lookup_kwargs:\n self.get_parent_field_and_object()\n super().initial(request, *args, **kwargs)\n\n def get_queryset(self):\n \"\"\"\n Gets a QuerySet based on the current request.\n\n For nested ViewSets, this adds parent filters to the result returned by the superclass. For\n non-nested ViewSets, this returns the original QuerySet unchanged.\n\n Additional permissions-based filtering can be performed if enabled by the permission class\n and ViewSet. The default permission class AccessPolicyFromDB will see if a queryset_scoping\n method is defined and call that method to further scope the queryset on user permissions.\n\n Returns:\n django.db.models.query.QuerySet: The queryset returned by the superclass with additional\n filters applied that match self.parent_lookup_kwargs, to scope the results to only\n those associated with the parent object. Additional queryset filtering could be\n performed if queryset_scoping is enabled.\n \"\"\"\n qs = super().get_queryset()\n\n if self.parent_lookup_kwargs and self.kwargs:\n filters = {}\n for key, lookup in self.parent_lookup_kwargs.items():\n filters[lookup] = self.kwargs[key]\n qs = qs.filter(**filters)\n\n if request := getattr(self, \"request\", None):\n if settings.DOMAIN_ENABLED:\n if hasattr(qs.model, \"pulp_domain\"):\n qs = qs.filter(pulp_domain=request.pulp_domain)\n\n for permission_class in self.get_permissions():\n if hasattr(permission_class, \"scope_queryset\"):\n qs = permission_class.scope_queryset(self, qs)\n\n return qs\n\n def scope_queryset(self, qs):\n \"\"\"\n A default queryset scoping method implementation for all NamedModelViewSets.\n\n If the ViewSet is not a Master ViewSet, then it'll perform scoping based on the ViewSet's\n `queryset_filtering_required_permission` attribute if present.\n Else it will call each child's view `get_queryset()` method to determine what objects the\n user can see.\n\n This method is intended to be overriden by subclasses if different behavior is desired.\n \"\"\"\n if not self.request.user.is_superuser:\n if not self.is_master_viewset():\n # subclass so use default scope_queryset implementation\n permission_name = getattr(self, \"queryset_filtering_required_permission\", None)\n if permission_name:\n user = self.request.user\n qs = get_objects_for_user(user, permission_name, qs)\n else:\n # master view so loop through each subclass to find scoped objects\n pks = []\n for model in self.queryset.model.__subclasses__():\n if viewset_model := get_viewset_for_model(model, ignore_error=True):\n viewset = viewset_model()\n setattr(viewset, \"request\", self.request)\n pks.extend(viewset.get_queryset().values_list(\"pk\", flat=True))\n qs = qs.filter(pk__in=pks)\n return qs\n\n @classmethod\n def _get_nest_depth(cls):\n \"\"\"Return the depth that this ViewSet is nested.\"\"\"\n if not cls.parent_lookup_kwargs:\n return 1\n return max([len(v.split(\"__\")) for k, v in cls.parent_lookup_kwargs.items()])\n\n def get_parent_field_and_object(self):\n \"\"\"\n For nested ViewSets, retrieve the nested parent implied by the url.\n\n Returns:\n tuple: (parent field name, parent)\n Raises:\n django.http.Http404: When the parent implied by the url does not exist. Synchronous\n use should allow this to bubble up and return a 404.\n \"\"\"\n parent_field = None\n filters = {}\n if self.parent_lookup_kwargs:\n # Use the parent_lookup_kwargs and the url kwargs (self.kwargs) to retrieve the object\n for key, lookup in self.parent_lookup_kwargs.items():\n parent_field, _, parent_lookup = lookup.partition(\"__\")\n filters[parent_lookup] = self.kwargs[key]\n return parent_field, get_object_or_404(self.parent_viewset.queryset, **filters)\n\n def get_parent_object(self):\n \"\"\"\n For nested ViewSets, retrieve the nested parent implied by the url.\n\n Returns:\n pulpcore.app.models.Model: parent model object\n Raises:\n django.http.Http404: When the parent implied by the url does not exist. Synchronous\n use should allow this to bubble up and return a 404.\n \"\"\"\n return self.get_parent_field_and_object()[1]\n\n\nclass AsyncReservedObjectMixin:\n \"\"\"\n Mixin class providing the default method to compute the resources to reserve in the task.\n\n By default, lock the object instance we are working on.\n \"\"\"\n\n def async_reserved_resources(self, instance):\n \"\"\"\n Return the resources to reserve for the task created by the Async...Mixins.\n\n This default implementation locks the instance being worked on.\n\n .. note::\n\n This does not work for :class:`~pulpcore.app.viewsets.AsyncCreateMixin`\n (as there is no instance). Classes using :class:`~pulpcore.app.viewsets.AsyncCreateMixin`\n must override this method.\n\n Args:\n instance (django.models.Model): The instance that will be worked\n on by the task.\n\n Returns:\n list/str: The resources to put in the task's reservation\n\n Raises:\n AssertionError if instance is None (which happens for creation)\n\n \"\"\"\n assert instance is not None, (\n \"'{}' must not use the default `async_reserved_resources` method \" \"when using create.\"\n ).format(self.__class__.__name__)\n return [instance]\n\n\nclass AsyncCreateMixin:\n \"\"\"\n Provides a create method that dispatches a task with reservation.\n \"\"\"\n\n @extend_schema(\n description=\"Trigger an asynchronous create task\",\n responses={202: AsyncOperationResponseSerializer},\n )\n def create(self, request, *args, **kwargs):\n \"\"\"\n Dispatches a task with reservation for creating an instance.\n \"\"\"\n serializer = self.get_serializer(data=request.data)\n serializer.is_valid(raise_exception=True)\n app_label = self.queryset.model._meta.app_label\n task = dispatch(\n tasks.base.general_create,\n exclusive_resources=self.async_reserved_resources(None),\n args=(app_label, serializer.__class__.__name__),\n kwargs={\"data\": request.data},\n )\n return OperationPostponedResponse(task, request)\n\n\nclass AsyncUpdateMixin(AsyncReservedObjectMixin):\n \"\"\"\n Provides an update method that dispatches a task with reservation\n \"\"\"\n\n ALLOW_NON_BLOCKING_UPDATE = True\n\n @extend_schema(\n description=\"Trigger an asynchronous update task\",\n responses={202: AsyncOperationResponseSerializer},\n )\n def update(self, request, pk, **kwargs):\n partial = kwargs.pop(\"partial\", False)\n instance = self.get_object()\n serializer = self.get_serializer(instance, data=request.data, partial=partial)\n serializer.is_valid(raise_exception=True)\n app_label = instance._meta.app_label\n task = dispatch(\n tasks.base.general_update,\n exclusive_resources=self.async_reserved_resources(instance),\n args=(pk, app_label, serializer.__class__.__name__),\n kwargs={\"data\": request.data, \"partial\": partial},\n immediate=self.ALLOW_NON_BLOCKING_UPDATE,\n )\n return OperationPostponedResponse(task, request)\n\n @extend_schema(\n description=\"Trigger an asynchronous partial update task\",\n responses={202: AsyncOperationResponseSerializer},\n )\n def partial_update(self, request, *args, **kwargs):\n kwargs[\"partial\"] = True\n return self.update(request, *args, **kwargs)\n\n\nclass AsyncRemoveMixin(AsyncReservedObjectMixin):\n \"\"\"\n Provides a delete method that dispatches a task with reservation\n \"\"\"\n\n ALLOW_NON_BLOCKING_DELETE = True\n\n @extend_schema(\n description=\"Trigger an asynchronous delete task\",\n responses={202: AsyncOperationResponseSerializer},\n )\n def destroy(self, request, pk, **kwargs):\n \"\"\"\n Delete a model instance\n \"\"\"\n instance = self.get_object()\n serializer = self.get_serializer(instance)\n app_label = instance._meta.app_label\n task = dispatch(\n tasks.base.general_delete,\n exclusive_resources=self.async_reserved_resources(instance),\n args=(pk, app_label, serializer.__class__.__name__),\n immediate=self.ALLOW_NON_BLOCKING_DELETE,\n )\n return OperationPostponedResponse(task, request)\n\n\nclass RolesMixin:\n @extend_schema(\n summary=\"List roles\",\n description=\"List roles assigned to this object.\",\n responses={\n 200: inline_serializer(\n name=\"ObjectRolesSerializer\",\n fields={\"roles\": ListField(child=NestedRoleSerializer())},\n )\n },\n )\n @action(detail=True, methods=[\"get\"])\n def list_roles(self, request, pk):\n obj = self.get_object()\n obj_type = ContentType.objects.get_for_model(obj)\n user_qs = UserRole.objects.filter(\n content_type_id=obj_type.id, object_id=obj.pk\n ).select_related(\"user\", \"role\")\n group_qs = GroupRole.objects.filter(\n content_type_id=obj_type.id, object_id=obj.pk\n ).select_related(\"group\", \"role\")\n roles = {}\n for user_role in user_qs:\n if user_role.role.name not in roles:\n roles[user_role.role.name] = {\n \"role\": user_role.role.name,\n \"users\": [],\n \"groups\": [],\n }\n roles[user_role.role.name][\"users\"].append(user_role.user.username)\n for group_role in group_qs:\n if group_role.role.name not in roles:\n roles[group_role.role.name] = {\n \"role\": group_role.role.name,\n \"users\": [],\n \"groups\": [],\n }\n roles[group_role.role.name][\"groups\"].append(group_role.group.name)\n result = {\"roles\": list(roles.values())}\n return Response(result)\n\n @extend_schema(\n summary=\"Add a role\",\n description=\"Add a role for this object to users/groups.\",\n responses={201: NestedRoleSerializer},\n )\n @action(detail=True, methods=[\"post\"], serializer_class=NestedRoleSerializer)\n def add_role(self, request, pk):\n obj = self.get_object()\n serializer = NestedRoleSerializer(\n data=request.data, context={\"request\": request, \"content_object\": obj, \"assign\": True}\n )\n serializer.is_valid(raise_exception=True)\n with transaction.atomic():\n if serializer.validated_data[\"users\"]:\n UserRole.objects.bulk_create(\n [\n UserRole(\n content_object=obj,\n user=user,\n role=serializer.validated_data[\"role\"],\n )\n for user in serializer.validated_data[\"users\"]\n ]\n )\n if serializer.validated_data[\"groups\"]:\n GroupRole.objects.bulk_create(\n [\n GroupRole(\n content_object=obj,\n group=group,\n role=serializer.validated_data[\"role\"],\n )\n for group in serializer.validated_data[\"groups\"]\n ]\n )\n return Response(serializer.data, status=201)\n\n @extend_schema(\n summary=\"Remove a role\",\n description=\"Remove a role for this object from users/groups.\",\n responses={201: NestedRoleSerializer},\n )\n @action(detail=True, methods=[\"post\"], serializer_class=NestedRoleSerializer)\n def remove_role(self, request, pk):\n obj = self.get_object()\n serializer = NestedRoleSerializer(\n data=request.data, context={\"request\": request, \"content_object\": obj, \"assign\": False}\n )\n serializer.is_valid(raise_exception=True)\n with transaction.atomic():\n UserRole.objects.filter(pk__in=serializer.user_role_pks).delete()\n GroupRole.objects.filter(pk__in=serializer.group_role_pks).delete()\n return Response(serializer.data, status=201)\n\n @extend_schema(\n summary=\"List user permissions\",\n description=\"List permissions available to the current user on this object.\",\n responses={\n 200: inline_serializer(\n name=\"MyPermissionsSerializer\", fields={\"permissions\": ListField(child=CharField())}\n )\n },\n )\n @action(detail=True, methods=[\"get\"])\n def my_permissions(self, request, pk=None):\n obj = self.get_object()\n app_label = obj._meta.app_label\n permissions = [\n \".\".join((app_label, codename)) for codename in request.user.get_all_permissions(obj)\n ]\n return Response({\"permissions\": permissions})\n\n\nclass LabelsMixin:\n @extend_schema(\n summary=\"Set a label\",\n description=\"Set a single pulp_label on the object to a specific value or null.\",\n )\n @action(detail=True, methods=[\"post\"], serializer_class=SetLabelSerializer)\n def set_label(self, request, pk=None):\n obj = self.get_object()\n serializer = SetLabelSerializer(\n data=request.data, context={\"request\": request, \"content_object\": obj}\n )\n serializer.is_valid(raise_exception=True)\n obj._meta.model.objects.filter(pk=obj.pk).update(\n pulp_labels=RawSQL(\n \"pulp_labels || hstore(%s, %s)\",\n [serializer.validated_data[\"key\"], serializer.validated_data[\"value\"]],\n )\n )\n return Response(serializer.data, status=201)\n\n @extend_schema(\n summary=\"Unset a label\",\n description=\"Unset a single pulp_label on the object.\",\n )\n @action(detail=True, methods=[\"post\"], serializer_class=UnsetLabelSerializer)\n def unset_label(self, request, pk=None):\n obj = self.get_object()\n serializer = UnsetLabelSerializer(\n data=request.data, context={\"request\": request, \"content_object\": obj}\n )\n serializer.is_valid(raise_exception=True)\n obj._meta.model.objects.filter(pk=obj.pk).update(\n pulp_labels=RawSQL(\"pulp_labels - %s::text\", [serializer.validated_data[\"key\"]])\n )\n return Response(serializer.data, status=201)\n", "path": "pulpcore/app/viewsets/base.py" } ]
[ { "content": "import warnings\nfrom gettext import gettext as _\nfrom urllib.parse import urlparse\n\nfrom django.conf import settings\nfrom django.db import transaction\nfrom django.db.models.expressions import RawSQL\nfrom django.core.exceptions import FieldError, ValidationError\nfrom django.urls import Resolver404, resolve\nfrom django.contrib.contenttypes.models import ContentType\nfrom drf_spectacular.utils import extend_schema, inline_serializer\nfrom rest_framework import viewsets\nfrom rest_framework.decorators import action\nfrom rest_framework.generics import get_object_or_404\nfrom rest_framework.response import Response\nfrom pulpcore.openapi import PulpAutoSchema\nfrom rest_framework.serializers import ValidationError as DRFValidationError, ListField, CharField\n\nfrom pulpcore.app import tasks\nfrom pulpcore.app.models import MasterModel\nfrom pulpcore.app.models.role import GroupRole, UserRole\nfrom pulpcore.app.response import OperationPostponedResponse\nfrom pulpcore.app.role_util import get_objects_for_user\nfrom pulpcore.app.serializers import (\n AsyncOperationResponseSerializer,\n NestedRoleSerializer,\n SetLabelSerializer,\n UnsetLabelSerializer,\n)\nfrom pulpcore.app.util import get_viewset_for_model\nfrom pulpcore.tasking.tasks import dispatch\n\n# These should be used to prevent duplication and keep things consistent\nNAME_FILTER_OPTIONS = [\n \"exact\",\n \"iexact\",\n \"in\",\n \"contains\",\n \"icontains\",\n \"startswith\",\n \"istartswith\",\n \"regex\",\n \"iregex\",\n]\n# e.g.\n# /?name=foo\n# /?name__in=foo,bar\nDATETIME_FILTER_OPTIONS = [\"exact\", \"lt\", \"lte\", \"gt\", \"gte\", \"range\"]\n# e.g.\n# /?pulp_created__gte=2018-04-12T19:45:52\n# /?pulp_created__range=2018-04-12T19:45:52,2018-04-13T19:45:52\nNULLABLE_NUMERIC_FILTER_OPTIONS = [\"exact\", \"ne\", \"lt\", \"lte\", \"gt\", \"gte\", \"range\", \"isnull\"]\n\n\nclass DefaultSchema(PulpAutoSchema):\n \"\"\"\n Overrides _allows_filters method to include filter fields only for read actions.\n\n Schema can be customised per view(set). Override this class and set it as a ``schema``\n attribute of a view(set) of interest.\n \"\"\"\n\n def _allows_filters(self):\n \"\"\"\n Include filter fields only for read actions, or GET requests.\n\n Returns:\n bool: True if filter fields should be included into the schema, False otherwise.\n \"\"\"\n if getattr(self.view, \"filter_backends\", None) is None:\n return False\n\n if hasattr(self.view, \"action\"):\n return self.view.action in [\"list\"]\n\n return self.method.lower() in [\"get\"]\n\n\nclass NamedModelViewSet(viewsets.GenericViewSet):\n \"\"\"\n A customized named ModelViewSet that knows how to register itself with the Pulp API router.\n\n This viewset is discoverable by its name.\n \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method.\n\n Attributes:\n lookup_field (str): The name of the field by which an object should be looked up, in\n addition to any parent lookups if this ViewSet is nested. Defaults to 'pk'\n endpoint_name (str): The name of the final path segment that should identify the ViewSet's\n collection endpoint.\n nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must\n correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin.\n None indicates this ViewSet should not be nested.\n parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs\n to django model filter expressions that can be used with the corresponding value from\n self.kwargs, used only by a nested ViewSet to filter based on the parent object's\n identity.\n schema (DefaultSchema): The schema class to use by default in a viewset.\n \"\"\"\n\n endpoint_name = None\n nest_prefix = None\n parent_viewset = None\n parent_lookup_kwargs = {}\n schema = DefaultSchema()\n\n def get_serializer_class(self):\n \"\"\"\n Fetch the serializer class to use for the request.\n\n The default behavior is to use the \"serializer_class\" attribute on the viewset.\n We override that for the case where a \"minimal_serializer_class\" attribute is defined\n and where the request contains a query parameter of \"minimal=True\".\n\n The intention is that ViewSets can define a second, more minimal serializer with only\n the most important fields.\n \"\"\"\n assert self.serializer_class is not None, (\n \"'{}' should either include a `serializer_class` attribute, or override the \"\n \"`get_serializer_class()` method.\"\n ).format(self.__class__.__name__)\n minimal_serializer_class = getattr(self, \"minimal_serializer_class\", None)\n\n if minimal_serializer_class:\n if getattr(self, \"request\", None):\n if \"minimal\" in self.request.query_params:\n # the query param is a string, and non-empty strings evaluate True,\n # so we need to do an actual string comparison to 'true'\n if self.request.query_params[\"minimal\"].lower() == \"true\":\n return minimal_serializer_class\n\n return self.serializer_class\n\n @staticmethod\n def get_resource_model(uri):\n \"\"\"\n Resolve a resource URI to the model for the resource.\n\n Provides a means to resolve an href passed in a POST body to an\n model for the resource.\n\n Args:\n uri (str): A resource URI.\n\n Returns:\n django.models.Model: The model for the specified URI.\n\n Raises:\n rest_framework.exceptions.ValidationError: on invalid URI.\n \"\"\"\n try:\n match = resolve(urlparse(uri).path)\n except Resolver404:\n raise DRFValidationError(detail=_(\"URI not valid: {u}\").format(u=uri))\n\n return match.func.cls.queryset.model\n\n @staticmethod\n def get_resource(uri, model=None):\n \"\"\"\n Resolve a resource URI to an instance of the resource.\n\n Provides a means to resolve an href passed in a POST body to an\n instance of the resource.\n\n Args:\n uri (str): A resource URI.\n model (django.models.Model): A model class. If not provided, the method automatically\n determines the used model from the resource URI.\n\n Returns:\n django.models.Model: The resource fetched from the DB.\n\n Raises:\n rest_framework.exceptions.ValidationError: on invalid URI or resource not found.\n \"\"\"\n try:\n match = resolve(urlparse(uri).path)\n except Resolver404:\n raise DRFValidationError(detail=_(\"URI not valid: {u}\").format(u=uri))\n\n if model is None:\n model = match.func.cls.queryset.model\n\n if \"pk\" in match.kwargs:\n kwargs = {\"pk\": match.kwargs[\"pk\"]}\n else:\n kwargs = {}\n for key, value in match.kwargs.items():\n if key.endswith(\"_pk\"):\n kwargs[\"{}__pk\".format(key[:-3])] = value\n elif key == \"pulp_domain\":\n if hasattr(model, \"pulp_domain\"):\n kwargs[\"pulp_domain__name\"] = value\n else:\n kwargs[key] = value\n\n try:\n return model.objects.get(**kwargs)\n except model.MultipleObjectsReturned:\n raise DRFValidationError(\n detail=_(\"URI {u} matches more than one {m}.\").format(\n u=uri, m=model._meta.model_name\n )\n )\n except model.DoesNotExist:\n raise DRFValidationError(\n detail=_(\"URI {u} not found for {m}.\").format(u=uri, m=model._meta.model_name)\n )\n except ValidationError:\n raise DRFValidationError(detail=_(\"ID invalid: {u}\").format(u=kwargs[\"pk\"]))\n except FieldError:\n raise DRFValidationError(\n detail=_(\"URI {u} is not a valid {m}.\").format(u=uri, m=model._meta.model_name)\n )\n\n @classmethod\n def is_master_viewset(cls):\n # ViewSet isn't related to a model, so it can't represent a master model\n if getattr(cls, \"queryset\", None) is None:\n return False\n\n # ViewSet is related to a MasterModel subclass that doesn't have its own related\n # master model, which makes this viewset a master viewset.\n if (\n issubclass(cls.queryset.model, MasterModel)\n and cls.queryset.model._meta.master_model is None\n ):\n return True\n\n return False\n\n @classmethod\n def routable(cls) -> bool:\n # Determines if ViewSet should be added to router\n return not cls.is_master_viewset()\n\n @classmethod\n def view_name(cls):\n return \"-\".join(cls.endpoint_pieces())\n\n @classmethod\n def urlpattern(cls):\n return \"/\".join(cls.endpoint_pieces())\n\n @classmethod\n def endpoint_pieces(cls):\n # This is a core ViewSet, not Master/Detail. We can use the endpoint as is.\n if cls.queryset.model._meta.master_model is None:\n return [cls.endpoint_name]\n else:\n # Model is a Detail model. Go through its ancestry (via MRO) to find its\n # eldest superclass with a declared name, representing the Master ViewSet\n master_endpoint_name = None\n # first item in method resolution is the viewset we're starting with,\n # so start finding parents at the second item, index 1.\n for eldest in reversed(cls.mro()):\n try:\n if eldest is not cls and eldest.endpoint_name is not None:\n master_endpoint_name = eldest.endpoint_name\n break\n except AttributeError:\n # no endpoint_name defined, need to get more specific in the MRO\n continue\n\n # if there is no master viewset or master endpoint name, just use endpoint_name\n if master_endpoint_name is None:\n return [cls.endpoint_name]\n\n # prepend endpoint of a plugin model with its Django app label\n app_label = cls.queryset.model._meta.app_label\n detail_endpoint_name = \"{app_label}/{plugin_endpoint_name}\".format(\n app_label=app_label, plugin_endpoint_name=cls.endpoint_name\n )\n\n pieces = [master_endpoint_name, detail_endpoint_name]\n\n # ensure that neither piece is None/empty and that they are not equal.\n if not all(pieces) or pieces[0] == pieces[1]:\n # unable to register; warn and return\n msg = (\n \"Unable to determine viewset inheritance path for master/detail \"\n \"relationship represented by viewset {}. Does the Detail ViewSet \"\n \"correctly subclass the Master ViewSet, and do both have endpoint_name \"\n \"set to different values?\"\n ).format(cls.__name__)\n warnings.warn(msg, RuntimeWarning)\n return []\n return pieces\n\n def initial(self, request, *args, **kwargs):\n \"\"\"\n Runs anything that needs to occur prior to calling the method handler.\n\n For nested ViewSets, it checks that the parent object exists, otherwise return 404.\n For non-nested Viewsets, this does nothing.\n \"\"\"\n if self.parent_lookup_kwargs:\n self.get_parent_field_and_object()\n super().initial(request, *args, **kwargs)\n\n def get_queryset(self):\n \"\"\"\n Gets a QuerySet based on the current request.\n\n For nested ViewSets, this adds parent filters to the result returned by the superclass. For\n non-nested ViewSets, this returns the original QuerySet unchanged.\n\n Additional permissions-based filtering can be performed if enabled by the permission class\n and ViewSet. The default permission class AccessPolicyFromDB will see if a queryset_scoping\n method is defined and call that method to further scope the queryset on user permissions.\n\n Returns:\n django.db.models.query.QuerySet: The queryset returned by the superclass with additional\n filters applied that match self.parent_lookup_kwargs, to scope the results to only\n those associated with the parent object. Additional queryset filtering could be\n performed if queryset_scoping is enabled.\n \"\"\"\n qs = super().get_queryset()\n\n if self.parent_lookup_kwargs and self.kwargs:\n filters = {}\n for key, lookup in self.parent_lookup_kwargs.items():\n filters[lookup] = self.kwargs[key]\n qs = qs.filter(**filters)\n\n if request := getattr(self, \"request\", None):\n if settings.DOMAIN_ENABLED:\n if hasattr(qs.model, \"pulp_domain\"):\n qs = qs.filter(pulp_domain=request.pulp_domain)\n\n for permission_class in self.get_permissions():\n if hasattr(permission_class, \"scope_queryset\"):\n qs = permission_class.scope_queryset(self, qs)\n\n return qs\n\n def scope_queryset(self, qs):\n \"\"\"\n A default queryset scoping method implementation for all NamedModelViewSets.\n\n If the ViewSet is not a Master ViewSet, then it'll perform scoping based on the ViewSet's\n `queryset_filtering_required_permission` attribute if present.\n Else it will call each child's view `get_queryset()` method to determine what objects the\n user can see.\n\n This method is intended to be overriden by subclasses if different behavior is desired.\n \"\"\"\n if not self.request.user.is_superuser:\n if not self.is_master_viewset():\n # subclass so use default scope_queryset implementation\n permission_name = getattr(self, \"queryset_filtering_required_permission\", None)\n if permission_name:\n user = self.request.user\n qs = get_objects_for_user(user, permission_name, qs)\n else:\n # master view so loop through each subclass to find scoped objects\n pks = []\n for model in self.queryset.model.__subclasses__():\n if viewset_model := get_viewset_for_model(model, ignore_error=True):\n viewset = viewset_model()\n setattr(viewset, \"request\", self.request)\n pks.extend(viewset.get_queryset().values_list(\"pk\", flat=True))\n qs = qs.filter(pk__in=pks)\n return qs\n\n @classmethod\n def _get_nest_depth(cls):\n \"\"\"Return the depth that this ViewSet is nested.\"\"\"\n if not cls.parent_lookup_kwargs:\n return 1\n return max([len(v.split(\"__\")) for k, v in cls.parent_lookup_kwargs.items()])\n\n def get_parent_field_and_object(self):\n \"\"\"\n For nested ViewSets, retrieve the nested parent implied by the url.\n\n Returns:\n tuple: (parent field name, parent)\n Raises:\n django.http.Http404: When the parent implied by the url does not exist. Synchronous\n use should allow this to bubble up and return a 404.\n \"\"\"\n parent_field = None\n filters = {}\n if self.parent_lookup_kwargs:\n # Use the parent_lookup_kwargs and the url kwargs (self.kwargs) to retrieve the object\n for key, lookup in self.parent_lookup_kwargs.items():\n parent_field, _, parent_lookup = lookup.partition(\"__\")\n filters[parent_lookup] = self.kwargs[key]\n return parent_field, get_object_or_404(self.parent_viewset.queryset, **filters)\n\n def get_parent_object(self):\n \"\"\"\n For nested ViewSets, retrieve the nested parent implied by the url.\n\n Returns:\n pulpcore.app.models.Model: parent model object\n Raises:\n django.http.Http404: When the parent implied by the url does not exist. Synchronous\n use should allow this to bubble up and return a 404.\n \"\"\"\n return self.get_parent_field_and_object()[1]\n\n\nclass AsyncReservedObjectMixin:\n \"\"\"\n Mixin class providing the default method to compute the resources to reserve in the task.\n\n By default, lock the object instance we are working on.\n \"\"\"\n\n def async_reserved_resources(self, instance):\n \"\"\"\n Return the resources to reserve for the task created by the Async...Mixins.\n\n This default implementation locks the instance being worked on.\n\n .. note::\n\n This does not work for :class:`~pulpcore.app.viewsets.AsyncCreateMixin`\n (as there is no instance). Classes using :class:`~pulpcore.app.viewsets.AsyncCreateMixin`\n must override this method.\n\n Args:\n instance (django.models.Model): The instance that will be worked\n on by the task.\n\n Returns:\n list/str: The resources to put in the task's reservation\n\n Raises:\n AssertionError if instance is None (which happens for creation)\n\n \"\"\"\n assert instance is not None, (\n \"'{}' must not use the default `async_reserved_resources` method \" \"when using create.\"\n ).format(self.__class__.__name__)\n return [instance]\n\n\nclass AsyncCreateMixin:\n \"\"\"\n Provides a create method that dispatches a task with reservation.\n \"\"\"\n\n @extend_schema(\n description=\"Trigger an asynchronous create task\",\n responses={202: AsyncOperationResponseSerializer},\n )\n def create(self, request, *args, **kwargs):\n \"\"\"\n Dispatches a task with reservation for creating an instance.\n \"\"\"\n serializer = self.get_serializer(data=request.data)\n serializer.is_valid(raise_exception=True)\n app_label = self.queryset.model._meta.app_label\n task = dispatch(\n tasks.base.general_create,\n exclusive_resources=self.async_reserved_resources(None),\n args=(app_label, serializer.__class__.__name__),\n kwargs={\"data\": request.data},\n )\n return OperationPostponedResponse(task, request)\n\n\nclass AsyncUpdateMixin(AsyncReservedObjectMixin):\n \"\"\"\n Provides an update method that dispatches a task with reservation\n \"\"\"\n\n ALLOW_NON_BLOCKING_UPDATE = True\n\n @extend_schema(\n description=\"Trigger an asynchronous update task\",\n responses={202: AsyncOperationResponseSerializer},\n )\n def update(self, request, pk, **kwargs):\n partial = kwargs.pop(\"partial\", False)\n instance = self.get_object()\n serializer = self.get_serializer(instance, data=request.data, partial=partial)\n serializer.is_valid(raise_exception=True)\n app_label = instance._meta.app_label\n task = dispatch(\n tasks.base.general_update,\n exclusive_resources=self.async_reserved_resources(instance),\n args=(pk, app_label, serializer.__class__.__name__),\n kwargs={\"data\": request.data, \"partial\": partial},\n immediate=self.ALLOW_NON_BLOCKING_UPDATE,\n )\n return OperationPostponedResponse(task, request)\n\n @extend_schema(\n description=\"Trigger an asynchronous partial update task\",\n responses={202: AsyncOperationResponseSerializer},\n )\n def partial_update(self, request, *args, **kwargs):\n kwargs[\"partial\"] = True\n return self.update(request, *args, **kwargs)\n\n\nclass AsyncRemoveMixin(AsyncReservedObjectMixin):\n \"\"\"\n Provides a delete method that dispatches a task with reservation\n \"\"\"\n\n ALLOW_NON_BLOCKING_DELETE = True\n\n @extend_schema(\n description=\"Trigger an asynchronous delete task\",\n responses={202: AsyncOperationResponseSerializer},\n )\n def destroy(self, request, pk, **kwargs):\n \"\"\"\n Delete a model instance\n \"\"\"\n instance = self.get_object()\n serializer = self.get_serializer(instance)\n app_label = instance._meta.app_label\n task = dispatch(\n tasks.base.general_delete,\n exclusive_resources=self.async_reserved_resources(instance),\n args=(pk, app_label, serializer.__class__.__name__),\n immediate=self.ALLOW_NON_BLOCKING_DELETE,\n )\n return OperationPostponedResponse(task, request)\n\n\nclass RolesMixin:\n @extend_schema(\n summary=\"List roles\",\n description=\"List roles assigned to this object.\",\n responses={\n 200: inline_serializer(\n name=\"ObjectRolesSerializer\",\n fields={\"roles\": ListField(child=NestedRoleSerializer())},\n )\n },\n )\n @action(detail=True, methods=[\"get\"])\n def list_roles(self, request, pk):\n obj = self.get_object()\n obj_type = ContentType.objects.get_for_model(obj)\n user_qs = UserRole.objects.filter(\n content_type_id=obj_type.id, object_id=obj.pk\n ).select_related(\"user\", \"role\")\n group_qs = GroupRole.objects.filter(\n content_type_id=obj_type.id, object_id=obj.pk\n ).select_related(\"group\", \"role\")\n roles = {}\n for user_role in user_qs:\n if user_role.role.name not in roles:\n roles[user_role.role.name] = {\n \"role\": user_role.role.name,\n \"users\": [],\n \"groups\": [],\n }\n roles[user_role.role.name][\"users\"].append(user_role.user.username)\n for group_role in group_qs:\n if group_role.role.name not in roles:\n roles[group_role.role.name] = {\n \"role\": group_role.role.name,\n \"users\": [],\n \"groups\": [],\n }\n roles[group_role.role.name][\"groups\"].append(group_role.group.name)\n result = {\"roles\": list(roles.values())}\n return Response(result)\n\n @extend_schema(\n summary=\"Add a role\",\n description=\"Add a role for this object to users/groups.\",\n responses={201: NestedRoleSerializer},\n )\n @action(detail=True, methods=[\"post\"], serializer_class=NestedRoleSerializer)\n def add_role(self, request, pk):\n obj = self.get_object()\n serializer = NestedRoleSerializer(\n data=request.data, context={\"request\": request, \"content_object\": obj, \"assign\": True}\n )\n serializer.is_valid(raise_exception=True)\n with transaction.atomic():\n if serializer.validated_data[\"users\"]:\n UserRole.objects.bulk_create(\n [\n UserRole(\n content_object=obj,\n user=user,\n role=serializer.validated_data[\"role\"],\n )\n for user in serializer.validated_data[\"users\"]\n ]\n )\n if serializer.validated_data[\"groups\"]:\n GroupRole.objects.bulk_create(\n [\n GroupRole(\n content_object=obj,\n group=group,\n role=serializer.validated_data[\"role\"],\n )\n for group in serializer.validated_data[\"groups\"]\n ]\n )\n return Response(serializer.data, status=201)\n\n @extend_schema(\n summary=\"Remove a role\",\n description=\"Remove a role for this object from users/groups.\",\n responses={201: NestedRoleSerializer},\n )\n @action(detail=True, methods=[\"post\"], serializer_class=NestedRoleSerializer)\n def remove_role(self, request, pk):\n obj = self.get_object()\n serializer = NestedRoleSerializer(\n data=request.data, context={\"request\": request, \"content_object\": obj, \"assign\": False}\n )\n serializer.is_valid(raise_exception=True)\n with transaction.atomic():\n UserRole.objects.filter(pk__in=serializer.user_role_pks).delete()\n GroupRole.objects.filter(pk__in=serializer.group_role_pks).delete()\n return Response(serializer.data, status=201)\n\n @extend_schema(\n summary=\"List user permissions\",\n description=\"List permissions available to the current user on this object.\",\n responses={\n 200: inline_serializer(\n name=\"MyPermissionsSerializer\", fields={\"permissions\": ListField(child=CharField())}\n )\n },\n )\n @action(detail=True, methods=[\"get\"])\n def my_permissions(self, request, pk=None):\n obj = self.get_object()\n app_label = obj._meta.app_label\n permissions = [\n \".\".join((app_label, codename)) for codename in request.user.get_all_permissions(obj)\n ]\n return Response({\"permissions\": permissions})\n\n\nclass LabelsMixin:\n @extend_schema(\n summary=\"Set a label\",\n description=\"Set a single pulp_label on the object to a specific value or null.\",\n )\n @action(detail=True, methods=[\"post\"], serializer_class=SetLabelSerializer)\n def set_label(self, request, pk=None):\n obj = self.get_object()\n serializer = SetLabelSerializer(\n data=request.data, context={\"request\": request, \"content_object\": obj}\n )\n serializer.is_valid(raise_exception=True)\n obj._meta.model.objects.filter(pk=obj.pk).update(\n pulp_labels=RawSQL(\n \"pulp_labels || hstore(%s, %s)\",\n [serializer.validated_data[\"key\"], serializer.validated_data[\"value\"]],\n )\n )\n return Response(serializer.data, status=201)\n\n @extend_schema(\n summary=\"Unset a label\",\n description=\"Unset a single pulp_label on the object.\",\n )\n @action(detail=True, methods=[\"post\"], serializer_class=UnsetLabelSerializer)\n def unset_label(self, request, pk=None):\n obj = self.get_object()\n serializer = UnsetLabelSerializer(\n data=request.data, context={\"request\": request, \"content_object\": obj}\n )\n serializer.is_valid(raise_exception=True)\n obj._meta.model.objects.filter(pk=obj.pk).update(\n pulp_labels=RawSQL(\"pulp_labels - %s::text\", [serializer.validated_data[\"key\"]])\n )\n return Response(serializer.data, status=201)\n", "path": "pulpcore/app/viewsets/base.py" } ]
diff --git a/CHANGES/4432.feature b/CHANGES/4432.feature new file mode 100644 index 0000000000..1268f71983 --- /dev/null +++ b/CHANGES/4432.feature @@ -0,0 +1 @@ +Added filters ``name__regex`` and ``name__iregex`` to various endpoints. diff --git a/pulpcore/app/viewsets/base.py b/pulpcore/app/viewsets/base.py index 553816e58e..28e688bb2b 100644 --- a/pulpcore/app/viewsets/base.py +++ b/pulpcore/app/viewsets/base.py @@ -39,6 +39,8 @@ "icontains", "startswith", "istartswith", + "regex", + "iregex", ] # e.g. # /?name=foo diff --git a/pulpcore/tests/functional/api/test_repos.py b/pulpcore/tests/functional/api/test_repos.py index 91d4a518e8..10f6e998e3 100644 --- a/pulpcore/tests/functional/api/test_repos.py +++ b/pulpcore/tests/functional/api/test_repos.py @@ -48,3 +48,22 @@ def test_repository_content_filters( # but not in its latest version anymore results = file_repository_api_client.list(latest_with_content=content.pulp_href).results assert results == [] + + [email protected] +def test_repository_name_regex_filters(file_repository_factory, file_repository_api_client): + """Test repository's name regex filters.""" + uuid = uuid4() + repo = file_repository_factory(name=f"{uuid}-regex-test-repo") + pattern = f"^{uuid}-regex-test.*$" + + results = file_repository_api_client.list(name__regex=pattern).results + assert results == [repo] + + # upper case pattern + results = file_repository_api_client.list(name__regex=pattern.upper()).results + assert repo not in results + + # upper case pattern with iregex + results = file_repository_api_client.list(name__iregex=pattern.upper()).results + assert results == [repo]
pytorch__TensorRT-1896
Upgrade `release/1.4` to Torch 2.0.1 + TensorRT 8.6.1 - Also upgrade `main` to TensorRT 8.6.1 (as a commit to #1852)
[ { "content": "__version__ = \"1.4.0.rc0\"\n__cuda_version__ = \"11.8\"\n__cudnn_version__ = \"8.8\"\n__tensorrt_version__ = \"8.6\"\n", "path": "py/versions.py" } ]
[ { "content": "__version__ = \"1.4.0\"\n__cuda_version__ = \"11.8\"\n__cudnn_version__ = \"8.8\"\n__tensorrt_version__ = \"8.6\"\n", "path": "py/versions.py" } ]
diff --git a/.circleci/config.yml b/.circleci/config.yml index a7d799eb9d..2e4a4d0438 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -203,10 +203,10 @@ commands: default: "8.8.0.121" trt-version-short: type: string - default: "8.6.0" + default: "8.6.1" trt-version-long: type: string - default: "8.6.0.12-1" + default: "8.6.1.6-1" bazel-version: type: string default: "5.2.0" @@ -249,7 +249,7 @@ commands: parameters: trt-version-long: type: string - default: "8.6.0" + default: "8.6.1" cudnn-version-long: type: string default: "8.8.0.121" @@ -270,15 +270,18 @@ commands: torch-build: type: string default: "2.0.1" + torchvision-build: + type: string + default: "0.15.2" torch-build-index: type: string - default: "https://download.pytorch.org/whl/test/cu118" + default: "https://download.pytorch.org/whl/cu118" steps: - run: name: Install Torch command: | pip3 install --upgrade pip - pip3 install torch==<< parameters.torch-build >> torchvision torchaudio --extra-index-url << parameters.torch-build-index >> + pip3 install torch==<< parameters.torch-build >> torchvision==<< parameters.torchvision-build >> --extra-index-url << parameters.torch-build-index >> build-py: description: "Build the torch-tensorrt python release (pre-cxx11-abi)" @@ -300,6 +303,26 @@ commands: mkdir -p /tmp/dist/builds cp dist/* /tmp/dist/builds + build-py-legacy: + description: "Build the torch-tensorrt python legacy release (pre-cxx11-abi)" + parameters: + platform: + type: string + default: "x86_64" + steps: + - run: + name: Build torch-tensorrt python legacy release (pre-cxx11-abi) + command: | + export CUDA_HOME=/usr/local/cuda-11.8/ + mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE + cd py + python3 -m pip install wheel setuptools + python3 -m pip install pybind11==2.6.2 + python3 setup.py bdist_wheel --legacy + python3 setup.py install --legacy + mkdir -p /tmp/dist/builds + cp dist/* /tmp/dist/builds + build-py-cxx11-abi: description: "Build the torch-tensorrt python release (cxx11-abi)" parameters: @@ -544,10 +567,10 @@ commands: - run: name: Run FX converter tests command: | + set -e cd py/torch_tensorrt/fx/test - pushd converters/acc_op/ - pytest --junitxml=/tmp/artifacts/test_results/fx/converters/acc_op/test_results.xml - popd + TESTS_TO_RUN=$(circleci tests glob "converters/acc_op/test_*.py" | circleci tests split --split-by=timings) + pytest --junitxml=/tmp/artifacts/test_results/fx/converters/acc_op/test_results.xml $TESTS_TO_RUN - store_test_results: path: /tmp/artifacts @@ -560,10 +583,10 @@ commands: - run: name: Run FX converter tests command: | + set -e cd py/torch_tensorrt/fx/test - pushd converters/aten_op/ - pytest --junitxml=/tmp/artifacts/test_results/fx/converters/aten_op/test_results.xml - popd + TESTS_TO_RUN=$(circleci tests glob "converters/aten_op/test_*.py" | circleci tests split --split-by=timings) + pytest --junitxml=/tmp/artifacts/test_results/fx/converters/aten_op/test_results.xml $TESTS_TO_RUN - store_test_results: path: /tmp/artifacts @@ -783,6 +806,8 @@ jobs: parameters: torch-build: type: string + torchvision-build: + type: string torch-build-index: type: string python-version: @@ -790,6 +815,9 @@ jobs: cxx11-abi: type: boolean default: false + legacy: + type: boolean + default: false machine: image: linux-cuda-11:2023.02.1 resource_class: gpu.nvidia.small @@ -806,6 +834,7 @@ jobs: bazel-platform: "x86_64" - install-torch-from-index: torch-build: << parameters.torch-build >> + torchvision-build: << parameters.torchvision-build >> torch-build-index: << parameters.torch-build-index >> - when: condition: << parameters.cxx11-abi >> @@ -814,7 +843,14 @@ jobs: - unless: condition: << parameters.cxx11-abi >> steps: - - build-py + - when: + condition: << parameters.legacy >> + steps: + - build-py-legacy + - unless: + condition: << parameters.legacy >> + steps: + - build-py - run: name: Move to build dir command: | @@ -836,6 +872,8 @@ jobs: type: string torch-build-index: type: string + torchvision-build: + type: string trt-version-short: type: string trt-version-long: @@ -861,6 +899,7 @@ jobs: trt-version-long: << parameters.trt-version-long >> - install-torch-from-index: torch-build: << parameters.torch-build >> + torchvision-build: << parameters.torchvision-build >> torch-build-index: << parameters.torch-build-index >> - attach_workspace: at: /tmp/dist @@ -874,6 +913,8 @@ jobs: parameters: torch-build: type: string + torchvision-build: + type: string torch-build-index: type: string trt-version-long: @@ -893,6 +934,7 @@ jobs: at: /tmp/dist - install-torch-from-index: torch-build: << parameters.torch-build >> + torchvision-build: << parameters.torchvision-build >> torch-build-index: << parameters.torch-build-index >> - run: name: "Install torch-tensorrt" @@ -904,12 +946,15 @@ jobs: parameters: torch-build: type: string + torchvision-build: + type: string torch-build-index: type: string trt-version-long: type: string python-version: type: string + parallelism: 8 machine: image: linux-cuda-11:2023.02.1 resource_class: gpu.nvidia.large @@ -921,6 +966,7 @@ jobs: at: /tmp/dist/ - install-torch-from-index: torch-build: << parameters.torch-build >> + torchvision-build: << parameters.torchvision-build >> torch-build-index: << parameters.torch-build-index >> - create-py-env: trt-version-long: << parameters.trt-version-long >> @@ -936,12 +982,15 @@ jobs: parameters: torch-build: type: string + torchvision-build: + type: string torch-build-index: type: string trt-version-long: type: string python-version: type: string + parallelism: 8 machine: image: linux-cuda-11:2023.02.1 resource_class: gpu.nvidia.large @@ -953,6 +1002,7 @@ jobs: at: /tmp/dist/ - install-torch-from-index: torch-build: << parameters.torch-build >> + torchvision-build: << parameters.torchvision-build >> torch-build-index: << parameters.torch-build-index >> - create-py-env: trt-version-long: << parameters.trt-version-long >> @@ -971,6 +1021,8 @@ jobs: parameters: torch-build: type: string + torchvision-build: + type: string torch-build-index: type: string trt-version-long: @@ -988,6 +1040,7 @@ jobs: at: /tmp/dist/ - install-torch-from-index: torch-build: << parameters.torch-build >> + torchvision-build: << parameters.torchvision-build >> torch-build-index: << parameters.torch-build-index >> - create-py-env: trt-version-long: << parameters.trt-version-long >> @@ -1300,24 +1353,33 @@ parameters: torch-build: type: string default: "2.0.1" + torchvision-build: + type: string + default: "0.15.2" torch-build-index: type: string - default: "https://download.pytorch.org/whl/test/cu118" + default: "https://download.pytorch.org/whl/cu118" torch-build-legacy: type: string default: "1.13.1+cu117" + torchvision-build-legacy: + type: string + default: "0.14.1+cu117" torch-build-index-legacy: type: string default: "https://download.pytorch.org/whl/cu117" + enable-legacy: + type: boolean + default: true cudnn-version: type: string default: "8.8.0.121" trt-version-short: type: string - default: "8.6.0" + default: "8.6.1" trt-version-long: type: string - default: "8.6.0" + default: "8.6.1" # Jetson platform config torch-jetson-build: @@ -1364,11 +1426,13 @@ workflows: - build-x86_64-linux: name: build-x86_64-linux torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> python-version: << pipeline.parameters.python-version >> - test-core-cpp-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-short: << pipeline.parameters.trt-version-short >> trt-version-long: << pipeline.parameters.trt-version-long >> @@ -1379,6 +1443,7 @@ workflows: - test-py-ts-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-long: << pipeline.parameters.trt-version-long >> python-version: << pipeline.parameters.python-version >> @@ -1387,6 +1452,7 @@ workflows: - test-py-fx-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-long: << pipeline.parameters.trt-version-long >> python-version: << pipeline.parameters.python-version >> @@ -1395,6 +1461,7 @@ workflows: - test-py-dynamo-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-long: << pipeline.parameters.trt-version-long >> python-version: << pipeline.parameters.python-version >> @@ -1404,12 +1471,15 @@ workflows: - build-x86_64-linux: name: build-x86_64-linux-legacy torch-build: << pipeline.parameters.torch-build-legacy >> + torchvision-build: << pipeline.parameters.torchvision-build-legacy >> torch-build-index: << pipeline.parameters.torch-build-index-legacy >> python-version: << pipeline.parameters.python-version >> + legacy: << pipeline.parameters.enable-legacy >> - test-core-cpp-x86_64-linux: name: test-core-cpp-x86_64-linux-legacy torch-build: << pipeline.parameters.torch-build-legacy >> + torchvision-build: << pipeline.parameters.torchvision-build-legacy >> torch-build-index: << pipeline.parameters.torch-build-index-legacy >> trt-version-short: << pipeline.parameters.trt-version-short >> trt-version-long: << pipeline.parameters.trt-version-long >> @@ -1421,6 +1491,7 @@ workflows: - test-py-ts-x86_64-linux: name: test-py-ts-x86_64-linux-legacy torch-build: << pipeline.parameters.torch-build-legacy >> + torchvision-build: << pipeline.parameters.torchvision-build-legacy >> torch-build-index: << pipeline.parameters.torch-build-index-legacy >> trt-version-long: << pipeline.parameters.trt-version-long >> python-version: << pipeline.parameters.python-version >> @@ -1429,6 +1500,7 @@ workflows: - test-py-fx-x86_64-linux-no-aten: torch-build: << pipeline.parameters.torch-build-legacy >> + torchvision-build: << pipeline.parameters.torchvision-build-legacy >> torch-build-index: << pipeline.parameters.torch-build-index-legacy >> trt-version-long: << pipeline.parameters.trt-version-long >> python-version: << pipeline.parameters.python-version >> @@ -1451,6 +1523,7 @@ workflows: - test-core-cpp-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-short: << pipeline.parameters.trt-version-short >> trt-version-long: << pipeline.parameters.trt-version-long >> @@ -1461,6 +1534,7 @@ workflows: - test-py-ts-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-long: << pipeline.parameters.trt-version-long >> python-version: << pipeline.parameters.python-version >> @@ -1469,6 +1543,7 @@ workflows: - test-py-fx-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-long: << pipeline.parameters.trt-version-long >> python-version: << pipeline.parameters.python-version >> @@ -1477,6 +1552,7 @@ workflows: - test-py-dynamo-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-long: << pipeline.parameters.trt-version-long >> python-version: << pipeline.parameters.python-version >> @@ -1487,11 +1563,13 @@ workflows: jobs: - build-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> python-version: << pipeline.parameters.python-version >> - test-core-cpp-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-short: << pipeline.parameters.trt-version-short >> trt-version-long: << pipeline.parameters.trt-version-long >> @@ -1502,6 +1580,7 @@ workflows: - test-py-ts-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-long: << pipeline.parameters.trt-version-long >> python-version: << pipeline.parameters.python-version >> @@ -1510,6 +1589,7 @@ workflows: - test-py-fx-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-long: << pipeline.parameters.trt-version-long >> python-version: << pipeline.parameters.python-version >> @@ -1518,6 +1598,7 @@ workflows: - test-py-dynamo-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> + torchvision-build: << pipeline.parameters.torchvision-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-long: << pipeline.parameters.trt-version-long >> python-version: << pipeline.parameters.python-version >> diff --git a/README.md b/README.md index 40423e4fdc..8c01a9783f 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ These are the following dependencies used to verify the testcases. Torch-TensorR - Libtorch 2.0.1 (built with CUDA 11.8) - CUDA 11.8 - cuDNN 8.8.0 -- TensorRT 8.6.0 +- TensorRT 8.6.1 ## Prebuilt Binaries and Wheel files diff --git a/WORKSPACE b/WORKSPACE index 5f0c1ffb74..2ceb3bd04b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -51,17 +51,17 @@ new_local_repository( http_archive( name = "libtorch", build_file = "@//third_party/libtorch:BUILD", - sha256 = "c5174f18c0866421a5738d389aaea0c02f32a1a5be5f0747dc8dd0d96034c9b0", + sha256 = "843ad19e769a189758fd6a21bfced9024494b52344f4bc4fb75f75d36e6ea0c7", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/test/cu118/libtorch-cxx11-abi-shared-with-deps-latest.zip"], + urls = ["https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcu118.zip"], ) http_archive( name = "libtorch_pre_cxx11_abi", build_file = "@//third_party/libtorch:BUILD", - sha256 = "cc19b398cf435e0e34f347ef90fc11c2a42703998330a9c4a9fb0d2291737df7", + sha256 = "668a5816ee588e5d96be4803cbbd34263314197cbbb320f43ad25a8c626c02e1", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/test/cu118/libtorch-shared-with-deps-latest.zip"], + urls = ["https://download.pytorch.org/libtorch/cu118/libtorch-shared-with-deps-2.0.1%2Bcu118.zip"], ) # Download these tarballs manually from the NVIDIA website @@ -81,10 +81,10 @@ http_archive( http_archive( name = "tensorrt", build_file = "@//third_party/tensorrt/archive:BUILD", - sha256 = "c1732a1093c57ab79fa0b687f061be369e449c9c17792b660f3663ecd8fa7b63", - strip_prefix = "TensorRT-8.6.0.12", + sha256 = "15bfe6053d45feec45ecc7123a9106076b0b43fa0435f242d89dca0778337759", + strip_prefix = "TensorRT-8.6.1.6", urls = [ - "https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.0/tars/TensorRT-8.6.0.12.Linux.x86_64-gnu.cuda-11.8.tar.gz", + "https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/tars/TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz", ], ) diff --git a/docker/Dockerfile b/docker/Dockerfile index b21f29910b..b942f9a423 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,10 +1,13 @@ # Base image starts with CUDA ARG BASE_IMG=nvidia/cuda:11.8.0-devel-ubuntu22.04 FROM ${BASE_IMG} as base +ENV BASE_IMG=nvidia/cuda:11.8.0-devel-ubuntu22.04 ARG TENSORRT_VERSION +ENV TENSORRT_VERSION=${TENSORRT_VERSION} RUN test -n "$TENSORRT_VERSION" || (echo "No tensorrt version specified, please use --build-arg TENSORRT_VERSION=x.y.z to specify a version." && exit 1) ARG CUDNN_VERSION +ENV CUDNN_VERSION=${CUDNN_VERSION} RUN test -n "$CUDNN_VERSION" || (echo "No cudnn version specified, please use --build-arg CUDNN_VERSION=x.y.z to specify a version." && exit 1) ARG PYTHON_VERSION=3.10 @@ -44,7 +47,7 @@ RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/ RUN add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /" RUN apt-get update -RUN apt-get install -y libnvinfer8=${TENSORRT_VERSION}* libnvinfer-plugin8=${TENSORRT_VERSION}* libnvinfer-dev=${TENSORRT_VERSION}* libnvinfer-plugin-dev=${TENSORRT_VERSION}* libnvonnxparsers8=${TENSORRT_VERSION}-1* libnvonnxparsers-dev=${TENSORRT_VERSION}-1* libnvparsers8=${TENSORRT_VERSION}-1* libnvparsers-dev=${TENSORRT_VERSION}-1* +RUN apt-get install -y libnvinfer8=${TENSORRT_VERSION}.* libnvinfer-plugin8=${TENSORRT_VERSION}.* libnvinfer-dev=${TENSORRT_VERSION}.* libnvinfer-plugin-dev=${TENSORRT_VERSION}.* libnvonnxparsers8=${TENSORRT_VERSION}.* libnvonnxparsers-dev=${TENSORRT_VERSION}.* libnvparsers8=${TENSORRT_VERSION}.* libnvparsers-dev=${TENSORRT_VERSION}.* # Setup Bazel via Bazelisk RUN wget -q https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64 -O /usr/bin/bazel &&\ @@ -71,7 +74,18 @@ WORKDIR /workspace/torch_tensorrt/src RUN cp ./docker/WORKSPACE.docker WORKSPACE # Symlink the path pyenv is using for python with the /opt directory for package sourcing -RUN ln -s "`pyenv which python | xargs dirname | xargs dirname`/lib/python$PYTHON_VERSION/site-packages" "/opt/python3" +RUN mkdir -p "/opt/python3/" &&\ + ln -s "`pyenv which python | xargs dirname | xargs dirname`/lib/python$PYTHON_VERSION/site-packages" "/opt/python3/" + +# Extract base image cuda version (everything after :, before -, before final ., in BASE_IMG) +# Ensure the default cuda folder agrees with the version in the base image +RUN CUDA_BASE_IMG_VERSION_INTERMEDIATE=`echo ${BASE_IMG#*:}` &&\ + CUDA_BASE_IMG_VERSION=`echo ${CUDA_BASE_IMG_VERSION_INTERMEDIATE%%-*}` &&\ + CUDA_MAJOR_MINOR_VERSION=`echo ${CUDA_BASE_IMG_VERSION%.*}` &&\ + rm -fr /usr/local/cuda &&\ + ln -s /usr/local/cuda-${CUDA_MAJOR_MINOR_VERSION} /usr/local/cuda + +ENV CUDA_HOME=/usr/local/cuda # This script builds both libtorchtrt bin/lib/include tarball and the Python wheel, in dist/ RUN bash ./docker/dist-build.sh diff --git a/docker/README.md b/docker/README.md index 34253f20b5..527b7ae2b2 100644 --- a/docker/README.md +++ b/docker/README.md @@ -3,7 +3,7 @@ * Use `Dockerfile` to build a container which provides the exact development environment that our master branch is usually tested against. * The `Dockerfile` currently uses <a href="https://github.com/bazelbuild/bazelisk">Bazelisk</a> to select the Bazel version, and uses the exact library versions of Torch and CUDA listed in <a href="https://github.com/pytorch/TensorRT#dependencies">dependencies</a>. - * The desired versions of CUDNN and TensorRT must be specified as build-args, with major, minor, and patch versions as in: `--build-arg TENSORRT_VERSION=a.b.c --build-arg CUDNN_VERSION=x.y.z` + * The desired versions of CUDNN and TensorRT must be specified as build-args, with major and minor versions as in: `--build-arg TENSORRT_VERSION=a.b --build-arg CUDNN_VERSION=x.y` * [**Optional**] The desired base image be changed by explicitly setting a base image, as in `--build-arg BASE_IMG=nvidia/cuda:11.8.0-devel-ubuntu22.04`, though this is optional * [**Optional**] Additionally, the desired Python version can be changed by explicitly setting a version, as in `--build-arg PYTHON_VERSION=3.10`, though this is optional as well. @@ -17,14 +17,14 @@ Note: By default the container uses the `pre-cxx11-abi` version of Torch + Torch ### Instructions -- The example below uses CUDNN 8.8.0 and TensorRT 8.6.0 +- The example below uses CUDNN 8.8 and TensorRT 8.6 - See <a href="https://github.com/pytorch/TensorRT#dependencies">dependencies</a> for a list of current default dependencies. > From root of Torch-TensorRT repo Build: ``` -DOCKER_BUILDKIT=1 docker build --build-arg TENSORRT_VERSION=8.6.0 --build-arg CUDNN_VERSION=8.8.0 -f docker/Dockerfile -t torch_tensorrt:latest . +DOCKER_BUILDKIT=1 docker build --build-arg TENSORRT_VERSION=8.6 --build-arg CUDNN_VERSION=8.8 -f docker/Dockerfile -t torch_tensorrt:latest . ``` Run: diff --git a/docker/dist-build.sh b/docker/dist-build.sh index ed5b271825..4c0f4d6b7c 100755 --- a/docker/dist-build.sh +++ b/docker/dist-build.sh @@ -3,17 +3,15 @@ TOP_DIR=$(cd $(dirname $0); pwd)/.. if [[ -z "${USE_CXX11}" ]]; then - BUILD_CMD="python3 setup.py bdist_wheel" + BUILD_CMD="python setup.py bdist_wheel" else - BUILD_CMD="python3 setup.py bdist_wheel --use-cxx11-abi" + BUILD_CMD="python setup.py bdist_wheel --use-cxx11-abi" fi cd ${TOP_DIR} \ && mkdir -p dist && cd py \ - && pip install -r requirements.txt - -# Symlink the path pyenv is using for python with the /opt directory for package sourcing -ln -s "`pyenv which python | xargs dirname | xargs dirname`/lib/python$PYTHON_VERSION/site-packages" "/opt/python3" + && pip install -r requirements.txt \ + && pip install wheel # Build Torch-TRT MAX_JOBS=1 LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 ${BUILD_CMD} $* || exit 1 diff --git a/py/requirements.txt b/py/requirements.txt index 795d56714d..d45f03a216 100644 --- a/py/requirements.txt +++ b/py/requirements.txt @@ -1,8 +1,8 @@ numpy packaging pybind11==2.6.2 ---extra-index-url https://download.pytorch.org/whl/test/cu118 +--extra-index-url https://download.pytorch.org/whl/cu118 torch==2.0.1 torchvision==0.15.2 --extra-index-url https://pypi.ngc.nvidia.com -tensorrt==8.6.0 +tensorrt==8.6.1 diff --git a/py/torch_tensorrt/fx/README.md b/py/torch_tensorrt/fx/README.md index 3e7cec9c44..06b86c0a98 100644 --- a/py/torch_tensorrt/fx/README.md +++ b/py/torch_tensorrt/fx/README.md @@ -12,7 +12,7 @@ FX2TRT is merged as FX module in Torch-TensorRT $ conda install pytorch torchvision torchtext cudatoolkit=11.8 -c pytorch-nightly # Install TensorRT python package $ pip3 install nvidia-pyindex - $ pip3 install tensorrt==8.6.0.12 + $ pip3 install tensorrt==8.6.1 $ git clone https://github.com/pytorch/TensorRT.git $ cd TensorRT/py && python setup.py install --fx-only && cd .. $ python -c "import torch_tensorrt.fx" diff --git a/py/versions.py b/py/versions.py index 114e4df5bb..9e4e0a5833 100644 --- a/py/versions.py +++ b/py/versions.py @@ -1,4 +1,4 @@ -__version__ = "1.4.0.rc0" +__version__ = "1.4.0" __cuda_version__ = "11.8" __cudnn_version__ = "8.8" __tensorrt_version__ = "8.6" diff --git a/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel b/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel index 6e1e688b36..1eedb6d752 100644 --- a/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel +++ b/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel @@ -56,17 +56,17 @@ new_local_repository( http_archive( name = "libtorch", build_file = "@//third_party/libtorch:BUILD", - sha256 = "c5174f18c0866421a5738d389aaea0c02f32a1a5be5f0747dc8dd0d96034c9b0", + sha256 = "843ad19e769a189758fd6a21bfced9024494b52344f4bc4fb75f75d36e6ea0c7", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/test/cu118/libtorch-cxx11-abi-shared-with-deps-latest.zip"], + urls = ["https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcu118.zip"], ) http_archive( name = "libtorch_pre_cxx11_abi", build_file = "@//third_party/libtorch:BUILD", - sha256 = "cc19b398cf435e0e34f347ef90fc11c2a42703998330a9c4a9fb0d2291737df7", + sha256 = "668a5816ee588e5d96be4803cbbd34263314197cbbb320f43ad25a8c626c02e1", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/test/cu118/libtorch-shared-with-deps-latest.zip"], + urls = ["https://download.pytorch.org/libtorch/cu118/libtorch-shared-with-deps-2.0.1%2Bcu118.zip"], ) #################################################################################### diff --git a/toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu b/toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu index 6e1e688b36..1eedb6d752 100644 --- a/toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu +++ b/toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu @@ -56,17 +56,17 @@ new_local_repository( http_archive( name = "libtorch", build_file = "@//third_party/libtorch:BUILD", - sha256 = "c5174f18c0866421a5738d389aaea0c02f32a1a5be5f0747dc8dd0d96034c9b0", + sha256 = "843ad19e769a189758fd6a21bfced9024494b52344f4bc4fb75f75d36e6ea0c7", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/test/cu118/libtorch-cxx11-abi-shared-with-deps-latest.zip"], + urls = ["https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcu118.zip"], ) http_archive( name = "libtorch_pre_cxx11_abi", build_file = "@//third_party/libtorch:BUILD", - sha256 = "cc19b398cf435e0e34f347ef90fc11c2a42703998330a9c4a9fb0d2291737df7", + sha256 = "668a5816ee588e5d96be4803cbbd34263314197cbbb320f43ad25a8c626c02e1", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/test/cu118/libtorch-shared-with-deps-latest.zip"], + urls = ["https://download.pytorch.org/libtorch/cu118/libtorch-shared-with-deps-2.0.1%2Bcu118.zip"], ) ####################################################################################
rotki__rotki-4490
Extract SQLCipher and pysqlcipher building to different repo ## Problem Definition We have pinned versions of SQLCipher, and pysqlcipher that we use. The build of SQLCipher happens on every build, docker, windows, macos, linux, arm64. Since we use pinned versions we should create a new repo that builds sqlcipher for all the supported OSes/architectures and maybe publishes the wheels/packages to PyPI We only need to build these dependencies when there is a change in version, otherwise there is no need to build them every single time since this increases the build times everywhere and complicates the windows development part. Ideally, it would be nice to include SQLcipher in the python package to make things easier ### Task - Create a separate repo to handle the building and publishing
[ { "content": "from PyInstaller.utils.hooks import copy_metadata\n\ndatas = copy_metadata(\"pysqlcipher3\")\n", "path": "tools/pyinstaller_hooks/hook-pysqlcipher3.py" } ]
[ { "content": "from PyInstaller.utils.hooks import copy_metadata\n\ndatas = copy_metadata(\"rotki-pysqlcipher3\")\n", "path": "tools/pyinstaller_hooks/hook-pysqlcipher3.py" } ]
diff --git a/.github/workflows/rotki_ci.yml b/.github/workflows/rotki_ci.yml index 673a874771..d05f44d90b 100644 --- a/.github/workflows/rotki_ci.yml +++ b/.github/workflows/rotki_ci.yml @@ -7,24 +7,28 @@ on: - develop - bugfixes +env: + PYTHON_VERSION: 3.9.13 + NODE_VERSION: 16 + PIP_VERSION: 22.1.2 + concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true jobs: check-changes: - strategy: - matrix: - os: [ ubuntu-18.04 ] - node-version: [ 16.x ] - runs-on: ${{ matrix.os }} + name: 'Required job check' + runs-on: ubuntu-18.04 outputs: backend_tasks: ${{ steps.checker.outputs.backend_tasks }} frontend_tasks: ${{ steps.checker.outputs.frontend_tasks }} documentation_tasks: ${{ steps.checker.outputs.documentation_tasks }} steps: - - uses: actions/checkout@v2 - - uses: ./.github/actions/job-checker + - name: Checkout + uses: actions/checkout@v3 + - name: Run check action + uses: ./.github/actions/job-checker id: checker with: token: ${{ secrets.GITHUB_TOKEN }} @@ -40,28 +44,26 @@ jobs: lint-frontend: + name: 'Frontend lint' needs: ['check-changes'] if: ${{ needs.check-changes.outputs.frontend_tasks }} - strategy: - matrix: - os: [ubuntu-18.04] - node-version: [16.x] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 2 - - name: Setup - uses: actions/setup-node@v1 + - name: Setup node + uses: actions/setup-node@v3 with: - node-version: '16.x' - - name: Store npm cache - uses: actions/cache@v2 + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: 'frontend/package-lock.json' + - name: Cache cypress + uses: actions/cache@v3 with: - path: | - ~/.npm - ~/.cache/Cypress - key: ${{ runner.os }}-node--ci-${{ hashFiles('**/app/package-lock.json') }} + path: ~/.cache/Cypress + key: ${{ runner.os }}-node--ci-${{ hashFiles('frontend/package-lock.json') }} - name: Install dependencies working-directory: ./frontend run: | @@ -80,28 +82,26 @@ jobs: run: npm run lint:style unittest-frontend: + name: 'Frontend unit tests' needs: [ 'check-changes' ] if: ${{ needs.check-changes.outputs.frontend_tasks }} - strategy: - matrix: - os: [ ubuntu-18.04 ] - node-version: [ 16.x ] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 2 - - name: Setup - uses: actions/setup-node@v1 + - name: Setup node + uses: actions/setup-node@v3 with: - node-version: '16.x' - - name: Store npm cache - uses: actions/cache@v2 + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: 'frontend/package-lock.json' + - name: Cache cypress + uses: actions/cache@v3 with: - path: | - ~/.npm - ~/.cache/Cypress - key: ${{ runner.os }}-node--ci-${{ hashFiles('**/app/package-lock.json') }} + path: ~/.cache/Cypress + key: ${{ runner.os }}-node--ci-${{ hashFiles('frontend/package-lock.json') }} - name: Install dependencies working-directory: ./frontend run: | @@ -118,21 +118,21 @@ jobs: run: cd ../.. && ./.github/.codecov -F frontend_unit docs: + name: 'Documentation build' needs: [ 'check-changes' ] if: ${{ needs.check-changes.outputs.documentation_tasks }} - strategy: - matrix: - os: [ubuntu-18.04] - python-version: [3.9] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 - - name: Setup - uses: actions/setup-python@v1 + - name: Checkout + uses: actions/checkout@v3 + - name: Setup python + uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' - name: Install dependencies run: | + pip install --upgrade pip==${{ env.PIP_VERSION }} pip install -r requirements_docs.txt pip install -e . git rev-parse HEAD @@ -140,21 +140,21 @@ jobs: run: cd docs && make html lint-backend: + name: 'Backend lint' needs: ['check-changes'] if: ${{ needs.check-changes.outputs.backend_tasks }} - strategy: - matrix: - os: [ubuntu-18.04] - python-version: [3.9] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 - - name: Setup - uses: actions/setup-python@v1 + - name: Checkout + uses: actions/checkout@v3 + - name: Setup python + uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' - name: Install dependencies run: | + pip install --upgrade pip==${{ env.PIP_VERSION }} pip install -r requirements_lint.txt pip install -e . git rev-parse HEAD @@ -162,49 +162,36 @@ jobs: run: make lint test-backend: + name: 'Backend tests' if: ${{ needs.check-changes.outputs.backend_tasks }} needs: ['lint-backend', 'check-changes'] timeout-minutes: 60 env: CI: true - strategy: - matrix: - os: [ubuntu-18.04] - python-version: [3.9] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 2 - - name: Setup SQLCipher - run: | - sudo apt-get update - sudo apt-get install libxml2-utils - ./install_deps.sh - sudo ldconfig - - name: Set up python - uses: actions/setup-python@v1 - with: - python-version: '3.9' - - name: Store python cache - uses: actions/cache@v2 + - name: Setup python + uses: actions/setup-python@v4 with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - - name: Store test dir - uses: actions/cache@v2 + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' + - name: Store test directory + uses: actions/cache@v3 with: path: ~/.cache/.rotkehlchen-test-dir key: ${{ runner.os }}-testdir-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-testdir- + restore-keys: ${{ runner.os }}-testdir- - name: Install dependencies run: | - pip install --upgrade pip==21.3.1 wheel + pip install --upgrade pip==${{ env.PIP_VERSION }} wheel pip install codecov pytest-cov pip install -r requirements_dev.txt pip install -e . - - name: Run Test + - name: Run tests run: | COVERAGE_ARGS='--cov=./' python pytestgeventwrapper.py $COVERAGE_ARGS rotkehlchen/tests @@ -212,61 +199,47 @@ jobs: run: ./.github/.codecov -F backend test-e2e: + name: 'Frontend e2e tests' needs: [ 'check-changes' ] if: | contains(needs.check-changes.outputs.frontend_tasks, true) || contains(needs.check-changes.outputs.backend_tasks, true) - strategy: - matrix: - os: [ubuntu-18.04] - python-version: [3.9] - node-version: [16.x] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 2 - - name: Set up python - uses: actions/setup-python@v1 + - name: Setup python + uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' - name: Setup node - uses: actions/setup-node@v1 - with: - node-version: '16.x' - - name: Store python cache - uses: actions/cache@v2 + uses: actions/setup-node@v3 with: - path: | - ~/.cache/pip - ~/.cache/.rotkehlchen-test-dir - key: ${{ runner.os }}-pip-e2e-${{ hashFiles('**/requirements.txt') }} - - name: Store npm cache - uses: actions/cache@v2 + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: 'frontend/package-lock.json' + - name: Cache Cypress + uses: actions/cache@v3 with: - path: | - ~/.npm - ~/.cache/Cypress - key: ${{ runner.os }}-node--e2e-${{ hashFiles('**/app/package-lock.json') }} + path: ~/.cache/Cypress + key: ${{ runner.os }}-node--e2e-${{ hashFiles('frontend/package-lock.json') }} - name: Store frontend cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/rotki-e2e/price_history ~/rotki-e2e/icons ~/rotki-e2e/global_data - key: ${{ runner.os }}-e2e-cache-${{ hashFiles('**/app/package-lock.json') }} + key: ${{ runner.os }}-e2e-cache-${{ hashFiles('frontend/package-lock.json') }} restore-keys: | ${{ runner.os }}-e2e-cache- - - name: Setup SQLCipher - run: | - sudo apt-get update - sudo apt-get install libxml2-utils - ./install_deps.sh - sudo ldconfig - name: Setup backend run: | - pip install -r requirements_dev.txt + pip install --upgrade pip==${{ env.PIP_VERSION }} + pip install -r requirements.txt pip install -e . - name: Restore dependencies working-directory: ./frontend @@ -276,7 +249,7 @@ jobs: npm ci fi npm run build -w @rotki/common - - name: Run integration tests + - name: Run e2e tests uses: cypress-io/github-action@v2 env: ARGS: "--browser chrome" @@ -287,29 +260,29 @@ jobs: - name: Upload coverage working-directory: ./frontend/app run: cd ../.. && ./.github/.codecov -F frontend_integration - - uses: actions/upload-artifact@v2 + - name: Upload screenshots + uses: actions/upload-artifact@v3 if: failure() with: name: screenshots-${{ runner.os }} path: ./frontend/app/tests/e2e/screenshots - name: Upload backend logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: always() with: name: backend-logs-${{ runner.os }} path: ~/rotki-e2e-logs/*.log - - uses: actions/upload-artifact@v2 + - name: Upload cypress videos + uses: actions/upload-artifact@v3 if: always() with: name: videos-${{ runner.os }} path: ./frontend/app/tests/e2e/videos done: + name: 'Success check' if: ${{ always() }} needs: [ 'check-changes', 'lint-frontend', 'unittest-frontend', 'docs', 'lint-backend', 'test-backend', 'test-e2e' ] - strategy: - matrix: - os: [ubuntu-18.04] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-18.04 steps: - name: Check if any task failed run: | diff --git a/.github/workflows/rotki_nightly.yml b/.github/workflows/rotki_nightly.yml index 68adfba062..75d8d72cf3 100644 --- a/.github/workflows/rotki_nightly.yml +++ b/.github/workflows/rotki_nightly.yml @@ -4,6 +4,11 @@ on: schedule: - cron: "0 0 * * *" +env: + PYTHON_VERSION: 3.9.13 + NODE_VERSION: 16 + PIP_VERSION: 22.1.2 + jobs: test-backend: env: @@ -11,54 +16,31 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-18.04, macos-10.15 ] - python-version: [ 3.9 ] + os: [ ubuntu-18.04, macos-10.5 ] runs-on: ${{ matrix.os }} + name: 'Backend tests on ${{ matrix.os }}' steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 2 - - name: Setup SQLCipher - run: | - if [ ${{ matrix.os }} == 'ubuntu-18.04' ]; - then - sudo apt-get update - sudo apt-get install libxml2-utils - ./install_deps.sh - sudo ldconfig - fi - if [ ${{ matrix.os }} == 'macos-10.15' ]; - then - brew install sqlcipher - fi - - name: Set up python - uses: actions/setup-python@v1 - with: - python-version: '3.9' - - name: Store python Cache (linux) - uses: actions/cache@v2 - if: startsWith(runner.os, 'Linux') + - name: Setup python + uses: actions/setup-python@v4 with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - - name: Store python Cache (macOS) - uses: actions/cache@v2 - if: startsWith(runner.os, 'macOS') - with: - path: ~/Library/Caches/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - - name: Store test dir - uses: actions/cache@v2 + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' + - name: Cache rotkehlchen test directory + uses: actions/cache@v3 with: path: ~/.cache/.rotkehlchen-test-dir key: ${{ runner.os }}-testdir - name: Install dependencies run: | - pip install --upgrade pip==21.3.1 wheel + pip install --upgrade pip==${{ env.PIP_VERSION }} wheel pip install codecov pytest-cov pip install -r requirements_dev.txt pip install -e . - - name: Run Test + - name: Run tests run: | COVERAGE_ARGS='--cov=./' if [ ${{ matrix.os }} == 'macos-10.15' ]; @@ -70,62 +52,40 @@ jobs: run: bash ./.github/.codecov -F backend test-integration: - needs: [ test-backend ] + name: 'Frontend e2e tests' env: CI: true - FILTER: '[ui tests]' - strategy: - matrix: - os: [ ubuntu-18.04 ] - python-version: [ 3.9 ] - node-version: [ 16.x ] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 2 - - name: Set up python - uses: actions/setup-python@v1 + - name: Setup python + uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' - name: Setup node - uses: actions/setup-node@v1 - with: - node-version: '16.x' - - name: Store python cache - uses: actions/cache@v2 - with: - path: | - ~/.cache/pip - ~/.cache/.rotkehlchen-test-dir - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - - name: Store npm cache - uses: actions/cache@v2 - if: contains(steps.check.outputs.ui-tests, true) + uses: actions/setup-node@v3 with: - path: | - ~/.npm - ~/.cache/Cypress - key: ${{ runner.os }}-node-${{ hashFiles('**/requirements.txt') }} + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: 'frontend/package-lock.json' - name: Store frontend cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | + ~/.cache/Cypress ~/rotki-e2e/price_history ~/rotki-e2e/icons ~/rotki-e2e/global_data - key: ${{ runner.os }}-e2e-cache-${{ hashFiles('**/app/package-lock.json') }} + key: ${{ runner.os }}-e2e-cache-${{ hashFiles('frontend/package-lock.json') }} restore-keys: | ${{ runner.os }}-e2e-cache- - - name: Setup SQLCipher - run: | - sudo apt-get update - sudo apt-get install libxml2-utils - ./install_deps.sh - sudo ldconfig - name: Setup backend run: | - pip install --upgrade pip==21.3.1 wheel + pip install --upgrade pip==${{ env.PIP_VERSION }} wheel pip install -r requirements.txt pip install -e . - name: Restore dependencies @@ -136,7 +96,7 @@ jobs: npm ci fi npm run build -w @rotki/common - - name: Run integration tests + - name: Run e2e tests uses: cypress-io/github-action@v2 env: ARGS: "--browser chrome" @@ -147,18 +107,20 @@ jobs: - name: Upload coverage working-directory: ./frontend/app run: cd ../.. && ./.github/.codecov -F frontend_integration - - uses: actions/upload-artifact@v2 + - name: Upload screenshots + uses: actions/upload-artifact@v3 if: failure() with: name: screenshots-${{ runner.os }} path: ./frontend/app/tests/e2e/screenshots - name: Upload backend logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: always() with: name: backend-logs-${{ runner.os }} path: ~/rotki-e2e-logs/*.log - - uses: actions/upload-artifact@v2 + - name: Upload videos + uses: actions/upload-artifact@v3 if: always() with: name: videos-${{ runner.os }} diff --git a/.github/workflows/rotki_nightly_builds.yml b/.github/workflows/rotki_nightly_builds.yml index ee45fa3ebd..943e145d65 100644 --- a/.github/workflows/rotki_nightly_builds.yml +++ b/.github/workflows/rotki_nightly_builds.yml @@ -7,56 +7,52 @@ on: branches: - build -jobs: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +env: + PYTHON_VERSION: 3.9.13 + NODE_VERSION: 16 + PYTHON_MACOS: 10.9 + PIP_VERSION: 22.1.2 +jobs: build-linux: + name: Build linux binary env: CI: true GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - strategy: - matrix: - os: [ ubuntu-18.04 ] - python-version: [ 3.9 ] - node-version: [ 16.x ] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up python - uses: actions/setup-python@v1 + - name: Setup python + uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' - name: Setup node - uses: actions/setup-node@v1 - with: - node-version: '16.x' - - name: pip cache persistence - uses: actions/cache@v2 + uses: actions/setup-node@v3 with: - path: ~/.cache/pip - key: ${{ matrix.os }}-pip-packaging-${{ hashFiles('**/requirements.txt') }} - - name: npm cache persistence - uses: actions/cache@v2 + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: 'frontend/package-lock.json' + - name: Cache cypress + uses: actions/cache@v3 with: - path: | - ~/.npm - ~/cache/Cypress - key: ${{ matrix.os }}-node--packaging-${{ hashFiles('**/app/package-lock.json') }} - - name: Setup SQLCipher - run: | - sudo apt-get update - sudo apt-get install libxml2-utils - ./install_deps.sh - sudo ldconfig + path: ~/cache/Cypress + key: ${{ runner.os }}-node--packaging-${{ hashFiles('frontend/package-lock.json') }} - name: Package id: packaging run: | npm install -g npm@8 - pip3 install --upgrade pip + pip3 install --upgrade pip==${{ env.PIP_VERSION }} ./package.sh - - name: Upload artifact - uses: actions/upload-artifact@v2 + - name: Upload files + uses: actions/upload-artifact@v3 with: name: nightly-linux path: | @@ -74,47 +70,39 @@ jobs: build-macos: + name: 'Build macOS binary' env: CI: true GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} environment: macos_sign - strategy: - matrix: - os: [ macos-10.15 ] - python-version: [ 3.9 ] - node-version: [ 16.x ] - runs-on: ${{ matrix.os }} + runs-on: macos-10.15 steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Cache python pkg + uses: actions/cache@v3 + with: + path: ~/python*.pkg + key: ${{ runner.os }}-python-${{ env.PYTHON_VERSION }}-${{ env.PYTHON_MACOS }} - name: Set up python - run: packaging/setup-osx.sh + run: packaging/setup-macos-python.sh ${{ env.PYTHON_VERSION }} ${{ env.PYTHON_MACOS }} - name: Setup node - uses: actions/setup-node@v1 - with: - node-version: '16.x' - - name: pip cache persistence - uses: actions/cache@v2 + uses: actions/setup-node@v3 with: - path: ~/Library/Caches/pip - key: ${{ matrix.os }}-pip-packaging-${{ hashFiles('**/requirements.txt') }} - - name: npm cache persistence - uses: actions/cache@v2 + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: 'frontend/package-lock.json' + - name: Cache cypress + uses: actions/cache@v3 with: - path: | - ~/.npm - ~/Library/Caches/Cypress - key: ${{ matrix.os }}-node--packaging-${{ hashFiles('**/app/package-lock.json') }} - - name: Setup SQLCipher - run: | - cd "$(brew --repo homebrew/core)" - git checkout 9ad779deb6076d0fc251fddc579ee2eb72acbb99 Formula/sqlcipher.rb #This formula installs 4.5.0 of sqlcipher - brew install sqlcipher + path: ~/Library/Caches/Cypress + key: ${{ runner.os }}-node--packaging-${{ hashFiles('frontend/package-lock.json') }} - name: Package id: packaging run: | - pip3 install --upgrade pip + pip3 install --upgrade pip==${{ env.PIP_VERSION }} pip3 install virtualenv python3 -m virtualenv ~/venv source ~/venv/bin/activate @@ -126,10 +114,10 @@ jobs: IDENTITY: ${{ secrets.IDENTITY }} APPLEID: ${{ secrets.APPLEID }} APPLEIDPASS: ${{ secrets.APPLEIDPASS }} - - name: Upload artifact - uses: actions/upload-artifact@v2 + - name: Upload files + uses: actions/upload-artifact@v3 with: - name: nightly-osx + name: nightly-macos path: | ${{ steps.packaging.outputs.binary }} ${{ steps.packaging.outputs.binary_checksum }} @@ -144,62 +132,47 @@ jobs: }' build-windows: + name: Build windows binary env: CI: true GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SQLCIPHER_VERSION: 'v4.5.0' - PYSQLCIPHER3_VERSION: '1f1b703b9e35205946c820e735f58799e1b72d2d' BUILD_DEPENDENCIES: "build-dependencies" - strategy: - matrix: - os: [ windows-latest ] - python-version: [ 3.9 ] - node-version: [ 16.x ] - runs-on: ${{ matrix.os }} + runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' - name: Setup node - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: '16.x' - - name: pip cache persistence - uses: actions/cache@v2 + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: 'frontend/package-lock.json' + - name: Cache cypress + uses: actions/cache@v3 with: - path: ~\AppData\Local\pip\Cache - key: ${{ matrix.os }}-pip-packaging-${{ hashFiles('**/requirements.txt') }} - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - name: npm cache persistence - uses: actions/cache@v2 - with: - path: | - ${{ steps.npm-cache.outputs.dir }} - ~\AppData\Local\Cypress - key: ${{ matrix.os }}-node--packaging-${{ hashFiles('**/app/package-lock.json') }} + path: ~\AppData\Local\Cypress + key: ${{ runner.os }}-node--packaging-${{ hashFiles('frontend/package-lock.json') }} - name: Persist Build Dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: - path: | - ~\${{ env.BUILD_DEPENDENCIES }}\ - ~\AppData\Local\Temp\chocolatey\ - key: ${{ matrix.os }}-build-dependencies-${{ env.SQLCIPHER_VERSION }}-${{ env.PYSQLCIPHER3_VERSION }} + path: ~\${{ env.BUILD_DEPENDENCIES }}\ + key: ${{ runner.os }}-build-dependencies - name: Build rotki id: packaging run: | npm install -g npm@8 - pip3 install --upgrade pip + pip3 install --upgrade pip==${{ env.PIP_VERSION }} .\package.ps1 shell: powershell - - name: Upload artifact - uses: actions/upload-artifact@v2 + - name: Upload files + uses: actions/upload-artifact@v3 with: name: nightly-windows path: | @@ -215,19 +188,22 @@ jobs: Invoke-RestMethod -Method Post -Uri $uri -ContentType "application/json" -Body $body build-docker: + name: Build docker image runs-on: ubuntu-18.04 environment: docker steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 + with: + platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -252,7 +228,7 @@ jobs: echo "::set-output name=platforms::$PLATFORMS" - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . file: ./Dockerfile diff --git a/.github/workflows/rotki_packaging.yaml b/.github/workflows/rotki_packaging.yaml index a66ca1c4db..b0a48f86ab 100644 --- a/.github/workflows/rotki_packaging.yaml +++ b/.github/workflows/rotki_packaging.yaml @@ -4,6 +4,16 @@ on: tags: - 'v*' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +env: + PYTHON_VERSION: 3.9.13 + NODE_VERSION: 16 + PYTHON_MACOS: 10.9 + PIP_VERSION: 22.1.2 + jobs: create_draft: name: Create Draft @@ -11,8 +21,8 @@ jobs: outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} steps: - - name: Checkout code - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 - name: Get Release Version run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Generate changelog @@ -83,46 +93,33 @@ jobs: draft: true linux: + name: 'Build linux binary' env: CI: true GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - strategy: - matrix: - os: [ubuntu-18.04] - python-version: [3.9] - node-version: [16.x] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-18.04 needs: create_draft steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' - name: Setup node - uses: actions/setup-node@v1 - with: - node-version: '16.x' - - name: pip cache persistence - uses: actions/cache@v2 + uses: actions/setup-node@v3 with: - path: ~/.cache/pip - key: ${{ matrix.os }}-pip-packaging-${{ hashFiles('**/requirements.txt') }} - - name: npm cache persistence - uses: actions/cache@v2 + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: 'frontend/package-lock.json' + - name: Cache cypress + uses: actions/cache@v3 with: - path: | - ~/.npm - ~/cache/Cypress - key: ${{ matrix.os }}-node--packaging-${{ hashFiles('**/app/package-lock.json') }} - - name: Setup SQLCipher - run: | - sudo apt-get update - sudo apt-get install libxml2-utils - ./install_deps.sh - sudo ldconfig + path: ~/cache/Cypress + key: ${{ runner.os }}-node--packaging-${{ hashFiles('frontend/package-lock.json') }} - name: Package id: packaging run: | @@ -175,48 +172,40 @@ jobs: asset_content_type: text/plain macos: + name: 'Build macOS binary' env: CI: true GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} environment: macos_sign - strategy: - matrix: - os: [macos-10.15] - python-version: [3.9] - node-version: [16.x] - runs-on: ${{ matrix.os }} + runs-on: macos-10.15 needs: create_draft steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Cache python pkg + uses: actions/cache@v3 + with: + path: ~/python*.pkg + key: ${{ runner.os }}-python-${{ env.PYTHON_VERSION }}-${{ env.PYTHON_MACOS }} - name: Set up python - run: packaging/setup-osx.sh + run: packaging/setup-macos-python.sh ${{ env.PYTHON_VERSION }} ${{ env.PYTHON_MACOS }} - name: Setup node - uses: actions/setup-node@v1 - with: - node-version: '16.x' - - name: pip cache persistence - uses: actions/cache@v2 + uses: actions/setup-node@v3 with: - path: ~/Library/Caches/pip - key: ${{ matrix.os }}-pip-packaging-${{ hashFiles('**/requirements.txt') }} - - name: npm cache persistence - uses: actions/cache@v2 + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: 'frontend/package-lock.json' + - name: Cache cypress + uses: actions/cache@v3 with: - path: | - ~/.npm - ~/Library/Caches/Cypress - key: ${{ matrix.os }}-node--packaging-${{ hashFiles('**/app/package-lock.json') }} - - name: Setup SQLCipher - run: | - cd "$(brew --repo homebrew/core)" - git checkout 9ad779deb6076d0fc251fddc579ee2eb72acbb99 Formula/sqlcipher.rb #This formula installs 4.5.0 of sqlcipher - brew install sqlcipher + path: ~/Library/Caches/Cypress + key: ${{ runner.os }}-node--packaging-${{ hashFiles('frontend/package-lock.json') }} - name: Package id: packaging run: | - pip3 install --upgrade pip + pip3 install --upgrade pip==${{ env.PIP_VERSION }} pip3 install virtualenv python3 -m virtualenv ~/venv source ~/venv/bin/activate @@ -266,64 +255,44 @@ jobs: asset_content_type: text/plain windows: + name: 'Build windows binary' env: CI: true GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SQLCIPHER_VERSION: 'v4.5.0' - PYSQLCIPHER3_VERSION: '1f1b703b9e35205946c820e735f58799e1b72d2d' BUILD_DEPENDENCIES: "build-dependencies" - strategy: - matrix: - os: [ windows-latest ] - python-version: [ 3.9 ] - node-version: [ 16.x ] - runs-on: ${{ matrix.os }} + runs-on: windows-latest needs: create_draft steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' - name: Setup node - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: '16.x' - - name: pip cache persistence - uses: actions/cache@v2 + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: 'frontend/package-lock.json' + - name: Cache Cypress + uses: actions/cache@v3 with: - path: ~\AppData\Local\pip\Cache - key: ${{ matrix.os }}-pip-packaging-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ matrix.os }}-pip-packaging-${{ hashFiles('**/requirements.txt') }} - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - name: npm cache persistence - uses: actions/cache@v2 - with: - path: | - ${{ steps.npm-cache.outputs.dir }} - ~\AppData\Local\Cypress - key: ${{ matrix.os }}-node--packaging-${{ hashFiles('**/app/package-lock.json') }} - restore-keys: | - ${{ matrix.os }}-node--packaging-${{ hashFiles('**/app/package-lock.json') }} + path: ~\AppData\Local\Cypress + key: ${{ runner.os }}-node--packaging-${{ hashFiles('frontend/package-lock.json') }} - name: Persist Build Dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: - path: | - ~\${{ env.BUILD_DEPENDENCIES }}\ - ~\AppData\Local\Temp\chocolatey\ - key: ${{ matrix.os }}-build-dependencies-${{ env.SQLCIPHER_VERSION }}-${{ env.PYSQLCIPHER3_VERSION }} - restore-keys: | - ${{ matrix.os }}-build-dependencies-${{ env.SQLCIPHER_VERSION }}-${{ env.PYSQLCIPHER3_VERSION }} + path: ~\${{ env.BUILD_DEPENDENCIES }}\ + key: ${{ runner.os }}-build-dependencies - name: Build rotki id: packaging run: | npm install -g npm@8 + pip3 install --upgrade pip==${{ env.PIP_VERSION }} .\package.ps1 shell: powershell - name: Upload exe sha512 checksum file @@ -355,17 +324,20 @@ jobs: asset_content_type: text/plain docker: + name: 'Build docker image' runs-on: ubuntu-18.04 environment: docker steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 + with: + platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -374,7 +346,7 @@ jobs: run: echo "::set-output name=version::${GITHUB_REF#refs/*/}" - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . file: ./Dockerfile diff --git a/frontend/app/components.d.ts b/frontend/app/components.d.ts deleted file mode 100644 index e229638e75..0000000000 --- a/frontend/app/components.d.ts +++ /dev/null @@ -1,369 +0,0 @@ -// generated by unplugin-vue-components -// We suggest you to commit this file into source control -// Read more: https://github.com/vuejs/vue-next/pull/3399 - -declare module 'vue' { - export interface GlobalComponents { - AaveCollateral: typeof import('./src/components/defi/loan/loans/aave/AaveCollateral.vue')['default'] - AaveLending: typeof import('./src/components/defi/loan/loans/AaveLending.vue')['default'] - About: typeof import('./src/components/About.vue')['default'] - AccountAssetBalances: typeof import('./src/components/settings/AccountAssetBalances.vue')['default'] - AccountBalances: typeof import('./src/components/accounts/AccountBalances.vue')['default'] - AccountBalanceTable: typeof import('./src/components/accounts/AccountBalanceTable.vue')['default'] - AccountDisplay: typeof import('./src/components/display/AccountDisplay.vue')['default'] - AccountForm: typeof import('./src/components/accounts/AccountForm.vue')['default'] - AccountGroupHeader: typeof import('./src/components/accounts/AccountGroupHeader.vue')['default'] - AccountingSettingsDisplay: typeof import('./src/components/profitloss/AccountingSettingsDisplay.vue')['default'] - AccountManagement: typeof import('./src/components/AccountManagement.vue')['default'] - ActionStatusIndicator: typeof import('./src/components/error/ActionStatusIndicator.vue')['default'] - ActiveModules: typeof import('./src/components/defi/ActiveModules.vue')['default'] - AdaptiveWrapper: typeof import('./src/components/display/AdaptiveWrapper.vue')['default'] - AddressInput: typeof import('./src/components/accounts/blockchain/AddressInput.vue')['default'] - AmountCurrency: typeof import('./src/components/display/AmountCurrency.vue')['default'] - AmountDisplay: typeof import('./src/components/display/AmountDisplay.vue')['default'] - AmountInput: typeof import('./src/components/inputs/AmountInput.vue')['default'] - ApiKeyBox: typeof import('./src/components/settings/api-keys/ApiKeyBox.vue')['default'] - AppUpdateIndicator: typeof import('./src/components/status/AppUpdateIndicator.vue')['default'] - AppUpdatePopup: typeof import('./src/components/status/update/AppUpdatePopup.vue')['default'] - AssetBalances: typeof import('./src/components/AssetBalances.vue')['default'] - AssetDetails: typeof import('./src/components/helper/AssetDetails.vue')['default'] - AssetDetailsBase: typeof import('./src/components/helper/AssetDetailsBase.vue')['default'] - AssetForm: typeof import('./src/components/asset-manager/AssetForm.vue')['default'] - AssetIcon: typeof import('./src/components/helper/display/icons/AssetIcon.vue')['default'] - AssetLink: typeof import('./src/components/assets/AssetLink.vue')['default'] - AssetLocations: typeof import('./src/components/assets/AssetLocations.vue')['default'] - AssetManagement: typeof import('./src/components/asset-manager/AssetManagement.vue')['default'] - AssetMovementDisplay: typeof import('./src/components/display/AssetMovementDisplay.vue')['default'] - AssetSelect: typeof import('./src/components/inputs/AssetSelect.vue')['default'] - AssetTable: typeof import('./src/components/asset-manager/AssetTable.vue')['default'] - AssetUpdate: typeof import('./src/components/status/update/AssetUpdate.vue')['default'] - AssetValueRow: typeof import('./src/components/assets/AssetValueRow.vue')['default'] - BackButton: typeof import('./src/components/helper/BackButton.vue')['default'] - BackendSettings: typeof import('./src/components/settings/BackendSettings.vue')['default'] - BackendSettingsButton: typeof import('./src/components/helper/BackendSettingsButton.vue')['default'] - BackupManager: typeof import('./src/components/settings/data-security/backups/BackupManager.vue')['default'] - BadgeDisplay: typeof import('./src/components/history/BadgeDisplay.vue')['default'] - BalanceDisplay: typeof import('./src/components/display/BalanceDisplay.vue')['default'] - Balancer: typeof import('./src/components/defi/balancer/Balancer.vue')['default'] - BalancerPoolAsset: typeof import('./src/components/display/icons/BalancerPoolAsset.vue')['default'] - BaseExternalLink: typeof import('./src/components/base/BaseExternalLink.vue')['default'] - BigDialog: typeof import('./src/components/dialogs/BigDialog.vue')['default'] - BinanceImport: typeof import('./src/components/import/BinanceImport.vue')['default'] - BinancePairsSelector: typeof import('./src/components/helper/BinancePairsSelector.vue')['default'] - Bisq: typeof import('./src/components/import/Bisq.vue')['default'] - BlockchainAccountSelector: typeof import('./src/components/helper/BlockchainAccountSelector.vue')['default'] - BlockchainBalanceCardList: typeof import('./src/components/dashboard/BlockchainBalanceCardList.vue')['default'] - BlockchainBalances: typeof import('./src/components/accounts/BlockchainBalances.vue')['default'] - BlockFiImport: typeof import('./src/components/import/BlockFiImport.vue')['default'] - Card: typeof import('./src/components/helper/Card.vue')['default'] - CardTitle: typeof import('./src/components/typography/CardTitle.vue')['default'] - ChainDisplay: typeof import('./src/components/accounts/blockchain/ChainDisplay.vue')['default'] - ChainSelect: typeof import('./src/components/accounts/blockchain/ChainSelect.vue')['default'] - ChangePassword: typeof import('./src/components/settings/data-security/ChangePassword.vue')['default'] - ClosedTrades: typeof import('./src/components/history/ClosedTrades.vue')['default'] - CointrackingImport: typeof import('./src/components/import/CointrackingImport.vue')['default'] - CollapsedPendingTasks: typeof import('./src/components/status/notifications/CollapsedPendingTasks.vue')['default'] - CompoundCollateral: typeof import('./src/components/defi/loan/loans/compound/CompoundCollateral.vue')['default'] - CompoundLending: typeof import('./src/components/defi/loan/loans/CompoundLending.vue')['default'] - ConfirmableReset: typeof import('./src/components/helper/ConfirmableReset.vue')['default'] - ConfirmDialog: typeof import('./src/components/dialogs/ConfirmDialog.vue')['default'] - ConflictDialog: typeof import('./src/components/status/update/ConflictDialog.vue')['default'] - ConflictRow: typeof import('./src/components/status/update/ConflictRow.vue')['default'] - ConnectionFailure: typeof import('./src/components/account-management/ConnectionFailure.vue')['default'] - ConnectionLoading: typeof import('./src/components/account-management/ConnectionLoading.vue')['default'] - CopyButton: typeof import('./src/components/helper/CopyButton.vue')['default'] - CostBasisTable: typeof import('./src/components/profitloss/CostBasisTable.vue')['default'] - CreateAccount: typeof import('./src/components/account-management/CreateAccount.vue')['default'] - CryptoComImport: typeof import('./src/components/import/CryptoComImport.vue')['default'] - CurrencyDropdown: typeof import('./src/components/CurrencyDropdown.vue')['default'] - DashboardAssetTable: typeof import('./src/components/dashboard/DashboardAssetTable.vue')['default'] - DatabaseBackups: typeof import('./src/components/settings/data-security/backups/DatabaseBackups.vue')['default'] - DatabaseInfoDisplay: typeof import('./src/components/settings/data-security/backups/DatabaseInfoDisplay.vue')['default'] - DataManagement: typeof import('./src/components/settings/data-security/DataManagement.vue')['default'] - DataTable: typeof import('./src/components/helper/DataTable.vue')['default'] - DateDisplay: typeof import('./src/components/display/DateDisplay.vue')['default'] - DateInputFormatSelector: typeof import('./src/components/settings/general/DateInputFormatSelector.vue')['default'] - DateTimePicker: typeof import('./src/components/dialogs/DateTimePicker.vue')['default'] - DefiAsset: typeof import('./src/components/defi/DefiAsset.vue')['default'] - DefiProtocolDetails: typeof import('./src/components/helper/DefiProtocolDetails.vue')['default'] - DefiProtocolIcon: typeof import('./src/components/defi/display/DefiProtocolIcon.vue')['default'] - DefiProtocolSelector: typeof import('./src/components/helper/DefiProtocolSelector.vue')['default'] - DefiSelectorItem: typeof import('./src/components/defi/DefiSelectorItem.vue')['default'] - DefiWizard: typeof import('./src/components/defi/wizard/DefiWizard.vue')['default'] - Deposits: typeof import('./src/components/defi/Deposits.vue')['default'] - DexTradeHistory: typeof import('./src/components/defi/dex-trades/DexTradeHistory.vue')['default'] - ErrorScreen: typeof import('./src/components/error/ErrorScreen.vue')['default'] - Eth2Input: typeof import('./src/components/accounts/blockchain/Eth2Input.vue')['default'] - Eth2ValidatorFilter: typeof import('./src/components/helper/filter/Eth2ValidatorFilter.vue')['default'] - Eth2ValidatorLimitRow: typeof import('./src/components/accounts/blockchain/eth2/Eth2ValidatorLimitRow.vue')['default'] - EventTypeDisplay: typeof import('./src/components/display/EventTypeDisplay.vue')['default'] - ExchangeAmountRow: typeof import('./src/components/accounts/exchanges/ExchangeAmountRow.vue')['default'] - ExchangeBalances: typeof import('./src/components/accounts/exchanges/ExchangeBalances.vue')['default'] - ExchangeBox: typeof import('./src/components/dashboard/ExchangeBox.vue')['default'] - ExchangeDisplay: typeof import('./src/components/display/ExchangeDisplay.vue')['default'] - ExchangeKeysForm: typeof import('./src/components/settings/api-keys/ExchangeKeysForm.vue')['default'] - ExchangeSettings: typeof import('./src/components/settings/api-keys/ExchangeSettings.vue')['default'] - Explorers: typeof import('./src/components/settings/explorers/Explorers.vue')['default'] - ExportReportCsv: typeof import('./src/components/profitloss/ExportReportCsv.vue')['default'] - ExportSnapshotDialog: typeof import('./src/components/dashboard/ExportSnapshotDialog.vue')['default'] - ExternalLink: typeof import('./src/components/helper/ExternalLink.vue')['default'] - ExternalServices: typeof import('./src/components/settings/api-keys/ExternalServices.vue')['default'] - ExternalTradeForm: typeof import('./src/components/history/ExternalTradeForm.vue')['default'] - FileUpload: typeof import('./src/components/import/FileUpload.vue')['default'] - FilterEntry: typeof import('./src/components/history/filtering/FilterEntry.vue')['default'] - FrontendSettings: typeof import('./src/components/settings/FrontendSettings.vue')['default'] - FrontendUpdateNotifier: typeof import('./src/components/status/FrontendUpdateNotifier.vue')['default'] - FullSizeContent: typeof import('./src/components/common/FullSizeContent.vue')['default'] - Generate: typeof import('./src/components/profitloss/Generate.vue')['default'] - GeneratedIcon: typeof import('./src/components/helper/display/icons/GeneratedIcon.vue')['default'] - GlobalSearch: typeof import('./src/components/GlobalSearch.vue')['default'] - GroupedImport: typeof import('./src/components/import/GroupedImport.vue')['default'] - HashLink: typeof import('./src/components/helper/HashLink.vue')['default'] - HelpIndicator: typeof import('./src/components/help/HelpIndicator.vue')['default'] - HelpLink: typeof import('./src/components/helper/HelpLink.vue')['default'] - HelpSidebar: typeof import('./src/components/help/HelpSidebar.vue')['default'] - IconLink: typeof import('./src/components/base/IconLink.vue')['default'] - IgnoreButtons: typeof import('./src/components/history/IgnoreButtons.vue')['default'] - ImportSource: typeof import('./src/components/import/ImportSource.vue')['default'] - InfoRow: typeof import('./src/components/defi/display/InfoRow.vue')['default'] - InputModeSelect: typeof import('./src/components/accounts/InputModeSelect.vue')['default'] - KrakenStaking: typeof import('./src/components/staking/kraken/KrakenStaking.vue')['default'] - KrakenStakingEvents: typeof import('./src/components/staking/kraken/KrakenStakingEvents.vue')['default'] - KrakenStakingOverview: typeof import('./src/components/staking/kraken/KrakenStakingOverview.vue')['default'] - KrakenStakingReceived: typeof import('./src/components/staking/kraken/KrakenStakingReceived.vue')['default'] - LabeledAddressDisplay: typeof import('./src/components/display/LabeledAddressDisplay.vue')['default'] - LedgerActionForm: typeof import('./src/components/history/LedgerActionForm.vue')['default'] - LedgerActionSettings: typeof import('./src/components/settings/accounting/LedgerActionSettings.vue')['default'] - LendingAssetTable: typeof import('./src/components/defi/display/LendingAssetTable.vue')['default'] - Liabilities: typeof import('./src/components/defi/Liabilities.vue')['default'] - LiquidityPoolSelector: typeof import('./src/components/helper/LiquidityPoolSelector.vue')['default'] - LiquityCollateral: typeof import('./src/components/defi/loan/loans/liquity/LiquityCollateral.vue')['default'] - LiquityLending: typeof import('./src/components/defi/loan/loans/LiquityLending.vue')['default'] - LiquityLiquidation: typeof import('./src/components/defi/loan/loans/liquity/LiquityLiquidation.vue')['default'] - LiquityStake: typeof import('./src/components/staking/liquity/LiquityStake.vue')['default'] - LiquityStakingDetails: typeof import('./src/components/staking/liquity/LiquityStakingDetails.vue')['default'] - ListItem: typeof import('./src/components/helper/ListItem.vue')['default'] - Loading: typeof import('./src/components/helper/Loading.vue')['default'] - LoanDebt: typeof import('./src/components/defi/loan/LoanDebt.vue')['default'] - LoanHeader: typeof import('./src/components/defi/loan/LoanHeader.vue')['default'] - LoanInfo: typeof import('./src/components/defi/loan/LoanInfo.vue')['default'] - LoanRow: typeof import('./src/components/defi/loan/LoanRow.vue')['default'] - LocationAssets: typeof import('./src/components/locations/LocationAssets.vue')['default'] - LocationDisplay: typeof import('./src/components/history/LocationDisplay.vue')['default'] - LocationIcon: typeof import('./src/components/history/LocationIcon.vue')['default'] - LocationSelector: typeof import('./src/components/helper/LocationSelector.vue')['default'] - LocationValueRow: typeof import('./src/components/locations/LocationValueRow.vue')['default'] - Login: typeof import('./src/components/account-management/Login.vue')['default'] - MacOsVersionUnsupported: typeof import('./src/components/error/MacOsVersionUnsupported.vue')['default'] - MakerDaoVaultCollateral: typeof import('./src/components/defi/loan/loans/makerdao/MakerDaoVaultCollateral.vue')['default'] - MakerDaoVaultDebtDetails: typeof import('./src/components/defi/loan/loans/makerdao/MakerDaoVaultDebtDetails.vue')['default'] - MakerDaoVaultLiquidation: typeof import('./src/components/defi/loan/loans/makerdao/MakerDaoVaultLiquidation.vue')['default'] - MakerDaoVaultLoan: typeof import('./src/components/defi/loan/loans/MakerDaoVaultLoan.vue')['default'] - ManageCustomAssets: typeof import('./src/components/settings/data-security/backups/ManageCustomAssets.vue')['default'] - ManageWatchers: typeof import('./src/components/defi/loan/loans/makerdao/ManageWatchers.vue')['default'] - ManualBalanceCardList: typeof import('./src/components/dashboard/ManualBalanceCardList.vue')['default'] - ManualBalances: typeof import('./src/components/accounts/manual-balances/ManualBalances.vue')['default'] - ManualBalancesForm: typeof import('./src/components/accounts/manual-balances/ManualBalancesForm.vue')['default'] - ManualBalanceTable: typeof import('./src/components/accounts/manual-balances/ManualBalanceTable.vue')['default'] - MenuTooltipButton: typeof import('./src/components/helper/MenuTooltipButton.vue')['default'] - MergeDialog: typeof import('./src/components/asset-manager/MergeDialog.vue')['default'] - MessageDialog: typeof import('./src/components/dialogs/MessageDialog.vue')['default'] - ModuleActivator: typeof import('./src/components/accounts/ModuleActivator.vue')['default'] - ModuleAddressSelector: typeof import('./src/components/defi/wizard/ModuleAddressSelector.vue')['default'] - ModuleNotActive: typeof import('./src/components/defi/ModuleNotActive.vue')['default'] - ModuleQueriedAddress: typeof import('./src/components/defi/wizard/ModuleQueriedAddress.vue')['default'] - ModuleSelector: typeof import('./src/components/defi/wizard/ModuleSelector.vue')['default'] - MovementLinks: typeof import('./src/components/history/MovementLinks.vue')['default'] - NavigationMenu: typeof import('./src/components/NavigationMenu.vue')['default'] - NavigationMenuItem: typeof import('./src/components/NavigationMenuItem.vue')['default'] - NavigatorLink: typeof import('./src/components/helper/NavigatorLink.vue')['default'] - NetWorthChart: typeof import('./src/components/dashboard/NetWorthChart.vue')['default'] - NexoImport: typeof import('./src/components/import/NexoImport.vue')['default'] - NftBalanceTable: typeof import('./src/components/dashboard/NftBalanceTable.vue')['default'] - NftGallery: typeof import('./src/components/nft/NftGallery.vue')['default'] - NftGalleryItem: typeof import('./src/components/nft/NftGalleryItem.vue')['default'] - NoDataScreen: typeof import('./src/components/common/NoDataScreen.vue')['default'] - NodeStatus: typeof import('./src/components/status/NodeStatus.vue')['default'] - NodeStatusIndicator: typeof import('./src/components/status/NodeStatusIndicator.vue')['default'] - NoFilterAvailable: typeof import('./src/components/history/filtering/NoFilterAvailable.vue')['default'] - NonFungibleBalanceEdit: typeof import('./src/components/accounts/balances/NonFungibleBalanceEdit.vue')['default'] - NonFungibleBalances: typeof import('./src/components/accounts/balances/NonFungibleBalances.vue')['default'] - NoPremiumPlaceholder: typeof import('./src/components/premium/NoPremiumPlaceholder.vue')['default'] - NoTasksRunning: typeof import('./src/components/status/notifications/NoTasksRunning.vue')['default'] - NotesDisplay: typeof import('./src/components/helper/table/NotesDisplay.vue')['default'] - Notification: typeof import('./src/components/status/notifications/Notification.vue')['default'] - NotificationIndicator: typeof import('./src/components/status/NotificationIndicator.vue')['default'] - NotificationPopup: typeof import('./src/components/status/notifications/NotificationPopup.vue')['default'] - NotificationSidebar: typeof import('./src/components/status/notifications/NotificationSidebar.vue')['default'] - OpenTrades: typeof import('./src/components/history/OpenTrades.vue')['default'] - OracleCacheManagement: typeof import('./src/components/settings/data-security/OracleCacheManagement.vue')['default'] - OracleEntry: typeof import('./src/components/settings/OracleEntry.vue')['default'] - OverallBalances: typeof import('./src/components/dashboard/OverallBalances.vue')['default'] - Overview: typeof import('./src/components/defi/Overview.vue')['default'] - PaginatedCards: typeof import('./src/components/common/PaginatedCards.vue')['default'] - Pagination: typeof import('./src/components/helper/Pagination.vue')['default'] - PendingTask: typeof import('./src/components/status/notifications/PendingTask.vue')['default'] - PendingTasks: typeof import('./src/components/status/notifications/PendingTasks.vue')['default'] - PercentageDisplay: typeof import('./src/components/display/PercentageDisplay.vue')['default'] - PremiumCard: typeof import('./src/components/display/PremiumCard.vue')['default'] - PremiumCredentials: typeof import('./src/components/account-management/PremiumCredentials.vue')['default'] - PremiumLoading: typeof import('./src/components/premium/PremiumLoading.vue')['default'] - PremiumLoadingError: typeof import('./src/components/premium/PremiumLoadingError.vue')['default'] - PremiumLock: typeof import('./src/components/premium/PremiumLock.vue')['default'] - PremiumReminder: typeof import('./src/components/account-management/PremiumReminder.vue')['default'] - PremiumSettings: typeof import('./src/components/settings/PremiumSettings.vue')['default'] - PriceForm: typeof import('./src/components/price-manager/PriceForm.vue')['default'] - PriceManagement: typeof import('./src/components/price-manager/PriceManagement.vue')['default'] - PriceOracleSelection: typeof import('./src/components/settings/PriceOracleSelection.vue')['default'] - PriceOracleSettings: typeof import('./src/components/settings/PriceOracleSettings.vue')['default'] - PriceRefresh: typeof import('./src/components/helper/PriceRefresh.vue')['default'] - PriceTable: typeof import('./src/components/price-manager/PriceTable.vue')['default'] - PrivacyModeDropdown: typeof import('./src/components/PrivacyModeDropdown.vue')['default'] - PrivacyNotice: typeof import('./src/components/PrivacyNotice.vue')['default'] - ProfitLossEvents: typeof import('./src/components/profitloss/ProfitLossEvents.vue')['default'] - ProfitLossEventType: typeof import('./src/components/profitloss/ProfitLossEventType.vue')['default'] - ProfitLossOverview: typeof import('./src/components/profitloss/ProfitLossOverview.vue')['default'] - ProgressScreen: typeof import('./src/components/helper/ProgressScreen.vue')['default'] - PurgeSelector: typeof import('./src/components/settings/data-security/PurgeSelector.vue')['default'] - QueriedAddressDialog: typeof import('./src/components/defi/QueriedAddressDialog.vue')['default'] - RangeSelector: typeof import('./src/components/helper/date/RangeSelector.vue')['default'] - RefreshButton: typeof import('./src/components/helper/RefreshButton.vue')['default'] - RefreshHeader: typeof import('./src/components/helper/RefreshHeader.vue')['default'] - ReportActionable: typeof import('./src/components/profitloss/ReportActionable.vue')['default'] - ReportHeader: typeof import('./src/components/profitloss/ReportHeader.vue')['default'] - ReportMissingAcquisitions: typeof import('./src/components/profitloss/ReportMissingAcquisitions.vue')['default'] - ReportMissingPrices: typeof import('./src/components/profitloss/ReportMissingPrices.vue')['default'] - ReportPeriodSelector: typeof import('./src/components/profitloss/ReportPeriodSelector.vue')['default'] - ReportsTable: typeof import('./src/components/profitloss/ReportsTable.vue')['default'] - RestoreAssetDbButton: typeof import('./src/components/asset-manager/RestoreAssetDbButton.vue')['default'] - RestoreAssetsDatabase: typeof import('./src/components/settings/data-security/RestoreAssetsDatabase.vue')['default'] - RevealableInput: typeof import('./src/components/inputs/RevealableInput.vue')['default'] - RoundingSelector: typeof import('./src/components/settings/explorers/RoundingSelector.vue')['default'] - RoundingSettings: typeof import('./src/components/settings/explorers/RoundingSettings.vue')['default'] - RowActions: typeof import('./src/components/helper/RowActions.vue')['default'] - RowAppend: typeof import('./src/components/helper/RowAppend.vue')['default'] - RowExpander: typeof import('./src/components/helper/RowExpander.vue')['default'] - ServiceKey: typeof import('./src/components/settings/api-keys/ServiceKey.vue')['default'] - SettingCategory: typeof import('./src/components/settings/SettingCategory.vue')['default'] - ShapeshiftImport: typeof import('./src/components/import/ShapeshiftImport.vue')['default'] - SortingSelector: typeof import('./src/components/helper/SortingSelector.vue')['default'] - StartupErrorScreen: typeof import('./src/components/error/StartupErrorScreen.vue')['default'] - StatCard: typeof import('./src/components/display/StatCard.vue')['default'] - StatCardColumn: typeof import('./src/components/display/StatCardColumn.vue')['default'] - StatCardWide: typeof import('./src/components/display/StatCardWide.vue')['default'] - StatisticsGraphSettings: typeof import('./src/components/settings/StatisticsGraphSettings.vue')['default'] - StatusButton: typeof import('./src/components/settings/data-security/StatusButton.vue')['default'] - SummaryCard: typeof import('./src/components/dashboard/SummaryCard.vue')['default'] - Sushiswap: typeof import('./src/components/defi/sushiswap/Sushiswap.vue')['default'] - SyncButtons: typeof import('./src/components/status/sync/SyncButtons.vue')['default'] - SyncIndicator: typeof import('./src/components/status/sync/SyncIndicator.vue')['default'] - TableExpandContainer: typeof import('./src/components/helper/table/TableExpandContainer.vue')['default'] - TableFilter: typeof import('./src/components/history/filtering/TableFilter.vue')['default'] - TabNavigation: typeof import('./src/components/helper/TabNavigation.vue')['default'] - TagCreator: typeof import('./src/components/tags/TagCreator.vue')['default'] - TagDisplay: typeof import('./src/components/tags/TagDisplay.vue')['default'] - TagFilter: typeof import('./src/components/inputs/TagFilter.vue')['default'] - TagIcon: typeof import('./src/components/tags/TagIcon.vue')['default'] - TagInput: typeof import('./src/components/inputs/TagInput.vue')['default'] - TagManager: typeof import('./src/components/tags/TagManager.vue')['default'] - ThemeManagerLock: typeof import('./src/components/premium/ThemeManagerLock.vue')['default'] - ThemeSwitchLock: typeof import('./src/components/premium/ThemeSwitchLock.vue')['default'] - TimeframeSelector: typeof import('./src/components/helper/TimeframeSelector.vue')['default'] - TimeFrameSettings: typeof import('./src/components/settings/general/TimeFrameSettings.vue')['default'] - TradeDetails: typeof import('./src/components/history/TradeDetails.vue')['default'] - TradeLocationSelector: typeof import('./src/components/history/TradeLocationSelector.vue')['default'] - TransactionDetail: typeof import('./src/components/history/transactions/TransactionDetail.vue')['default'] - TransactionEventAsset: typeof import('./src/components/history/transactions/TransactionEventAsset.vue')['default'] - TransactionEventForm: typeof import('./src/components/history/TransactionEventForm.vue')['default'] - TransactionEventNote: typeof import('./src/components/history/transactions/TransactionEventNote.vue')['default'] - TransactionEvents: typeof import('./src/components/history/transactions/TransactionEvents.vue')['default'] - TransactionEventType: typeof import('./src/components/history/transactions/TransactionEventType.vue')['default'] - UnderlyingTokenManager: typeof import('./src/components/asset-manager/UnderlyingTokenManager.vue')['default'] - Uniswap: typeof import('./src/components/defi/uniswap/Uniswap.vue')['default'] - UniswapPoolAsset: typeof import('./src/components/display/icons/UniswapPoolAsset.vue')['default'] - UniswapPoolDetails: typeof import('./src/components/defi/uniswap/UniswapPoolDetails.vue')['default'] - UniswapPoolFilter: typeof import('./src/components/defi/uniswap/UniswapPoolFilter.vue')['default'] - UpgradeRow: typeof import('./src/components/history/UpgradeRow.vue')['default'] - UpholdImport: typeof import('./src/components/import/UpholdImport.vue')['default'] - UserDropdown: typeof import('./src/components/UserDropdown.vue')['default'] - VAlert: typeof import('vuetify/lib')['VAlert'] - ValidatorDisplay: typeof import('./src/components/helper/display/icons/ValidatorDisplay.vue')['default'] - ValidatorFilterInput: typeof import('./src/components/helper/filter/ValidatorFilterInput.vue')['default'] - ValueAccuracyHint: typeof import('./src/components/helper/hint/ValueAccuracyHint.vue')['default'] - VApp: typeof import('vuetify/lib')['VApp'] - VAppBar: typeof import('vuetify/lib')['VAppBar'] - VAppBarNavIcon: typeof import('vuetify/lib')['VAppBarNavIcon'] - VAutocomplete: typeof import('vuetify/lib')['VAutocomplete'] - VAvatar: typeof import('vuetify/lib')['VAvatar'] - VBadge: typeof import('vuetify/lib')['VBadge'] - VBottomSheet: typeof import('vuetify/lib')['VBottomSheet'] - VBtn: typeof import('vuetify/lib')['VBtn'] - VBtnToggle: typeof import('vuetify/lib')['VBtnToggle'] - VCard: typeof import('vuetify/lib')['VCard'] - VCardActions: typeof import('vuetify/lib')['VCardActions'] - VCardSubtitle: typeof import('vuetify/lib')['VCardSubtitle'] - VCardText: typeof import('vuetify/lib')['VCardText'] - VCardTitle: typeof import('vuetify/lib')['VCardTitle'] - VCheckbox: typeof import('vuetify/lib')['VCheckbox'] - VChip: typeof import('vuetify/lib')['VChip'] - VChipGroup: typeof import('vuetify/lib')['VChipGroup'] - VCol: typeof import('vuetify/lib')['VCol'] - VCombobox: typeof import('vuetify/lib')['VCombobox'] - VContainer: typeof import('vuetify/lib')['VContainer'] - VDataFooter: typeof import('vuetify/lib')['VDataFooter'] - VDataTable: typeof import('vuetify/lib')['VDataTable'] - VDatePicker: typeof import('vuetify/lib')['VDatePicker'] - VDialog: typeof import('vuetify/lib')['VDialog'] - VDialogTransition: typeof import('vuetify/lib')['VDialogTransition'] - VDivider: typeof import('vuetify/lib')['VDivider'] - VExpansionPanel: typeof import('vuetify/lib')['VExpansionPanel'] - VExpansionPanelContent: typeof import('vuetify/lib')['VExpansionPanelContent'] - VExpansionPanelHeader: typeof import('vuetify/lib')['VExpansionPanelHeader'] - VExpansionPanels: typeof import('vuetify/lib')['VExpansionPanels'] - VFadeTransition: typeof import('vuetify/lib')['VFadeTransition'] - VForm: typeof import('vuetify/lib')['VForm'] - VIcon: typeof import('vuetify/lib')['VIcon'] - VImg: typeof import('vuetify/lib')['VImg'] - VisibleColumnsSelector: typeof import('./src/components/dashboard/VisibleColumnsSelector.vue')['default'] - VList: typeof import('vuetify/lib')['VList'] - VListGroup: typeof import('vuetify/lib')['VListGroup'] - VListItem: typeof import('vuetify/lib')['VListItem'] - VListItemAction: typeof import('vuetify/lib')['VListItemAction'] - VListItemAvatar: typeof import('vuetify/lib')['VListItemAvatar'] - VListItemContent: typeof import('vuetify/lib')['VListItemContent'] - VListItemGroup: typeof import('vuetify/lib')['VListItemGroup'] - VListItemIcon: typeof import('vuetify/lib')['VListItemIcon'] - VListItemSubtitle: typeof import('vuetify/lib')['VListItemSubtitle'] - VListItemTitle: typeof import('vuetify/lib')['VListItemTitle'] - VMain: typeof import('vuetify/lib')['VMain'] - VMenu: typeof import('vuetify/lib')['VMenu'] - VNavigationDrawer: typeof import('vuetify/lib')['VNavigationDrawer'] - VOverlay: typeof import('vuetify/lib')['VOverlay'] - VPagination: typeof import('vuetify/lib')['VPagination'] - VProgressCircular: typeof import('vuetify/lib')['VProgressCircular'] - VProgressLinear: typeof import('vuetify/lib')['VProgressLinear'] - VRow: typeof import('vuetify/lib')['VRow'] - VSelect: typeof import('vuetify/lib')['VSelect'] - VSheet: typeof import('vuetify/lib')['VSheet'] - VSkeletonLoader: typeof import('vuetify/lib')['VSkeletonLoader'] - VSlider: typeof import('vuetify/lib')['VSlider'] - VSlideYTransition: typeof import('vuetify/lib')['VSlideYTransition'] - VSnackbar: typeof import('vuetify/lib')['VSnackbar'] - VSpacer: typeof import('vuetify/lib')['VSpacer'] - VStepper: typeof import('vuetify/lib')['VStepper'] - VStepperContent: typeof import('vuetify/lib')['VStepperContent'] - VStepperHeader: typeof import('vuetify/lib')['VStepperHeader'] - VStepperItems: typeof import('vuetify/lib')['VStepperItems'] - VStepperStep: typeof import('vuetify/lib')['VStepperStep'] - VSwitch: typeof import('vuetify/lib')['VSwitch'] - VTextField: typeof import('vuetify/lib')['VTextField'] - VTimePicker: typeof import('vuetify/lib')['VTimePicker'] - VTooltip: typeof import('vuetify/lib')['VTooltip'] - VVirtualScroll: typeof import('vuetify/lib')['VVirtualScroll'] - WatcherDialog: typeof import('./src/components/dialogs/WatcherDialog.vue')['default'] - XpubInput: typeof import('./src/components/accounts/blockchain/XpubInput.vue')['default'] - YearnAssetsTable: typeof import('./src/components/defi/yearn/YearnAssetsTable.vue')['default'] - } -} - -export { } diff --git a/install_deps.sh b/install_deps.sh deleted file mode 100755 index df30a0d893..0000000000 --- a/install_deps.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash - -# the directory of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -# omit the -p parameter to create a temporal directory in the default location -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" - echo "Deleted temp working directory $WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - - -# Only use this option if you can't install libsqlcipher -# through your system's package manager -# NOTE: This will add the lib to /usr/local/lib so make sure -# that ldconfig also searches that directory for libraries by editing -# /etc/ld.so.conf -SQLCIPHER_EXISTS=$(ldconfig -p | grep libsqlcipher) - -echo "SQLCIPHER_EXISTS: $SQLCIPHER_EXISTS"; -if [[ $SQLCIPHER_EXISTS == "" ]]; then - echo "Downloading and compiling sqlcipher"; - # Go into the directory and build sqlcipher - cd "$WORK_DIR" || exit 1 - git clone https://github.com/sqlcipher/sqlcipher - cd sqlcipher || exit 1 - git checkout v4.5.0 - ./configure \ - --enable-tempstore=yes \ - CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS" \ - LDFLAGS="-lcrypto" - make - sudo make install - - cd "$DIR" || exit 1 -fi diff --git a/package.ps1 b/package.ps1 index 8b29716b86..872ec00a15 100644 --- a/package.ps1 +++ b/package.ps1 @@ -1,13 +1,11 @@ $PYINSTALLER_VERSION = if ($env:PYINSTALLER_VERSION) { $env:PYINSTALLER_VERSION } else { '4.8' } -$SQLCIPHER_VERSION = if ($env:SQLCIPHER_VERSION) { $env:SQLCIPHER_VERSION } else { 'v4.5.0' } -$PYSQLCIPHER3_VERSION = if ($env:PYSQLCIPHER3_VERSION) { $env:PYSQLCIPHER3_VERSION } else { '1f1b703b9e35205946c820e735f58799e1b72d2d' } $BUILD_DEPENDENCIES = if ($env:BUILD_DEPENDENCIES) { $env:BUILD_DEPENDENCIES } else { 'rotki-build-dependencies' } # Setup constants $MINIMUM_NPM_VERSION = "8.0.0" $TCLTK='tcltk85-8.5.19-17.tcl85.Win10.x86_64' -echo "`nStarting rotki build process with SQLCipher $SQLCIPHER_VERSION and pysqlcipher3 $PYSQLCIPHER3_VERSION`n" +echo "`nStarting rotki build process`n" $PROJECT_DIR = $PWD @@ -54,125 +52,8 @@ if ($Env:CI) { if ($Env:CI) { echo "::endgroup::" - echo "::group::Build SQLCipher" } -if (-not (Test-Path sqlcipher -PathType Container)) { - echo "Cloning SQLCipher" - git clone https://github.com/sqlcipher/sqlcipher - ExitOnFailure("Failed to clone SQLCipher") -} - -cd sqlcipher -$SQLCIPHER_DIR = $PWD - -$tag = git name-rev --tags --name-only $(git rev-parse HEAD) - -if (-not ($tag -match $SQLCIPHER_VERSION)) { - echo "Checking out SQLCipher $SQLCIPHER_VERSION" - git checkout $SQLCIPHER_VERSION - ExitOnFailure("Failed to checkout SQLCipher $SQLCIPHER_VERSION") -} - -if (-not (git status --porcelain)) { - echo "Applying Makefile patch for SQLCipher" - git apply $PROJECT_DIR\packaging\sqlcipher_win.diff - ExitOnFailure("Failed to apply the Makefile patch for SQLCipher") -} - - -$OPENSSL_PATH = (Join-Path ${env:ProgramFiles} "OpenSSL-Win64") - -if (-not(Test-Path "$OPENSSL_PATH" -PathType Container)) -{ - echo "Installing OpenSSL 1.1.1.8" - choco install -y openssl --version 1.1.1.800 --no-progress - ExitOnFailure("Installation of OpenSSL Failed") -} - -echo "`nSetting up Visual Studio Dev Shell`n" - -$BACKUP_ENV = @() -Get-Childitem -Path Env:* | Foreach-Object { - $BACKUP_ENV += $_ -} - -$vsPath = &(Join-Path ${env:ProgramFiles(x86)} "\Microsoft Visual Studio\Installer\vswhere.exe") -version '[16.0,)' -property installationpath -Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") - -$arch = 64 -$vc_env = "vcvars$arch.bat" -echo "Load MSVC environment $vc_env" -$build = (Join-Path $vsPath "VC\Auxiliary\Build") -$env:Path += ";$build" - -Enter-VsDevShell -VsInstallPath $vsPath -DevCmdArguments -arch=x64 -if (Get-Command "$vc_env" -errorAction SilentlyContinue) -{ - ## Store the output of cmd.exe. We also ask cmd.exe to output - ## the environment table after the batch file completes - ## Go through the environment variables in the temp file. - ## For each of them, set the variable in our local environment. - cmd /Q /c "$vc_env && set" 2>&1 | Foreach-Object { - if ($_ -match "^(.*?)=(.*)$") - { - Set-Content "env:\$( $matches[1] )" $matches[2] - } - } - - echo "Environment successfully set" -} - -if (-not (Test-Path sqlcipher.dll -PathType Leaf)) -{ - cd $SQLCIPHER_DIR - nmake /f Makefile.msc - ExitOnFailure("Failed to build SQLCipher") - -} - -# Reset the environment ** -Get-Childitem -Path Env:* | Foreach-Object { - Remove-Item "env:\$($_.Name)" -} - -$BACKUP_ENV | Foreach-Object { - Set-Content "env:\$($_.Name)" $_.Value -} - -$env:Path += ";$SQLCIPHER_DIR" - -if ($Env:CI) { - echo "::endgroup::" - echo "::group::Setup PySQLCipher" -} - -cd $BUILD_DEPS_DIR - -if (-not (Test-Path pysqlcipher3 -PathType Container)) { - echo "Cloning pysqlcipher3" - git clone https://github.com/rigglemania/pysqlcipher3.git - ExitOnFailure("Failed to clone pysqlcipher3") -} - -cd pysqlcipher3 -$PYSQLCIPHER3_DIR = $PWD - -if (-not ((git rev-parse HEAD) -match $PYSQLCIPHER3_VERSION)) { - echo "Checking out PySQLCipher3 $PYSQLCIPHER3_VERSION" - git checkout $PYSQLCIPHER3_VERSION - ExitOnFailure("Failed to checkout pysqlcipher3 $PYSQLCIPHER3_VERSION") -} - -if (-not (git status --porcelain)) { - echo "Applying setup patch" - git apply $PROJECT_DIR\packaging\pysqlcipher3_win.diff - ExitOnFailure("Failed to apply pysqlcipher3 patch") -} - -if ($Env:CI) { - echo "::endgroup::" -} if ((-not ($env:VIRTUAL_ENV)) -and (-not ($Env:CI))) { if ((-not (Test-Path "$BUILD_DEPS_DIR\.venv" -PathType Container))) { @@ -244,23 +125,6 @@ pip install pyinstaller==$PYINSTALLER_VERSION pip install -r requirements.txt pip install -e. -echo "`nBuilding pysqlcipher3`n" - -cd $PYSQLCIPHER3_DIR - -if (-not (Test-Path sqlcipher.dll -PathType Leaf)) { - echo "Copying sqlcipher.dll to $PWD" - Copy-Item "$SQLCIPHER_DIR\sqlcipher.dll" .\ -} - -if (-not (Test-Path libcrypto-1_1-x64.dll -PathType Leaf)) { - echo "Copying libcrypto-1_1-x64.dll to $PWD" - Copy-Item "$OPENSSL_PATH\bin\libcrypto-1_1-x64.dll" .\ -} - -python setup.py build -python setup.py install - cd $PROJECT_DIR echo "`nVerifying pysqlcipher3`n" diff --git a/package.sh b/package.sh index e52f55d45a..e2e5bc7047 100755 --- a/package.sh +++ b/package.sh @@ -3,18 +3,42 @@ : "${PYINSTALLER_VERSION:=4.8}" WORKDIR=$PWD BACKEND_DIST_DIR="rotkehlchen_py_dist" + + +# Get the arch +ARCH=$(uname -m) +if [[ "$ARCH" != 'x86_64' ]] && [[ "$ARCH" != 'arm64' ]] && [[ "$ARCH" == 'aarch64' ]]; then + echo "package.sh - ERROR: Unsupported architecture '${ARCH}'" + exit 1 +fi + +# Get the platform +if [[ "$OSTYPE" == "linux-gnu" ]]; then + PLATFORM='linux' +elif [[ "$OSTYPE" == "darwin"* ]]; then + PLATFORM='darwin' + export ONEFILE=0 +elif [[ "$OSTYPE" == "win32" ]]; then + PLATFORM='win32' +elif [[ "$OSTYPE" == "freebsd"* ]]; then + PLATFORM='freebsd' +else + echo "package.sh - ERROR: Unsupported platform '${OSTYPE}'" + exit 1 +fi + # cleanup before starting to package stuff make clean source tools/scripts/check_unmerged.sh noforce if [[ -n "${CI-}" ]]; then - echo "::group::Pip install" + echo "::group::Pip install" fi if [[ -z "${CI+x}" ]] && [[ -z "${VIRTUAL_ENV}" ]]; then - echo 'The script should not run outside a virtual environment if not on CI' - exit 1 + echo 'The script should not run outside a virtual environment if not on CI' + exit 1 fi # Perform sanity checks before pip install @@ -28,53 +52,52 @@ fi # Install the rotki package and pyinstaller. Needed by the pyinstaller pip install -e . -pip install pyinstaller==${PYINSTALLER_VERSION} + +if [[ $ARCH == 'x86_64' ]];then + pip install pyinstaller==${PYINSTALLER_VERSION} +else + mkdir build + cd build || exit + git clone https://github.com/pyinstaller/pyinstaller.git + cd pyinstaller || exit 1 + git checkout v${PYINSTALLER_VERSION} + cd bootloader || exit 1 + ./waf all --target-arch "${ARCH}" + cd .. + python setup.py install; + cd "$WORKDIR" || exit 1 +fi + if [[ -n "${CI-}" ]]; then - echo "::endgroup::" + echo "::endgroup::" fi # Perform sanity checks that need pip install python -c "import sys;from rotkehlchen.db.dbhandler import detect_sqlcipher_version; version = detect_sqlcipher_version();sys.exit(0) if version == 4 else sys.exit(1)" if [[ $? -ne 0 ]]; then - echo "package.sh - ERROR: The packaging system's sqlcipher version is not >= v4" - exit 1 + if [[ "$ARCH" == 'arm64' ]] && [[ -z "${CI+x}" ]]; then + read -p "There was an error during the sanity check, do you wish to continue y/N? " -n 1 -r + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + exit 1 + fi + else + echo "package.sh - ERROR: The packaging system's sqlcipher version is not >= v4" + exit 1 + fi fi -# Get the arch -ARCH=$(uname -m) -if [[ "$ARCH" == 'x86_64' ]]; then - ARCH='x64' -else - echo "package.sh - ERROR: Unsupported architecture '${ARCH}'" - exit 1 -fi - -# Get the platform -if [[ "$OSTYPE" == "linux-gnu" ]]; then - PLATFORM='linux' -elif [[ "$OSTYPE" == "darwin"* ]]; then - PLATFORM='darwin' - export ONEFILE=0 -elif [[ "$OSTYPE" == "win32" ]]; then - PLATFORM='win32' -elif [[ "$OSTYPE" == "freebsd"* ]]; then - PLATFORM='freebsd' -else - echo "package.sh - ERROR: Unsupported platform '${OSTYPE}'" - exit 1 -fi - if [[ -n "${CI-}" ]]; then - echo "::group::PyInstaller" + echo "::group::PyInstaller" fi # Use pyinstaller to package the python app rm -rf build "${BACKEND_DIST_DIR}" pyinstaller --noconfirm --clean --distpath "${BACKEND_DIST_DIR}" rotkehlchen.spec if [[ -n "${CI-}" ]]; then - echo "::endgroup::" + echo "::endgroup::" fi ROTKEHLCHEN_VERSION=$(python setup.py --version) @@ -89,12 +112,12 @@ fi echo 'Checking binary' if [[ "$PLATFORM" == "darwin" ]]; then - PYINSTALLER_GENERATED_EXECUTABLE=$(find ./${BACKEND_DIST_DIR}/rotkehlchen -name "rotkehlchen-*-macos") - ./${BACKEND_DIST_DIR}/rotkehlchen/"${PYINSTALLER_GENERATED_EXECUTABLE##*/}" version + PYINSTALLER_GENERATED_EXECUTABLE=$(find ./${BACKEND_DIST_DIR}/rotkehlchen -name "rotkehlchen-*-macos") + ./${BACKEND_DIST_DIR}/rotkehlchen/"${PYINSTALLER_GENERATED_EXECUTABLE##*/}" version else - # Sanity check that the generated python executable works - PYINSTALLER_GENERATED_EXECUTABLE=$(find ./${BACKEND_DIST_DIR} -name "rotkehlchen-*-linux") - ./${BACKEND_DIST_DIR}/"${PYINSTALLER_GENERATED_EXECUTABLE##*/}" version + # Sanity check that the generated python executable works + PYINSTALLER_GENERATED_EXECUTABLE=$(find ./${BACKEND_DIST_DIR} -name "rotkehlchen-*-linux") + ./${BACKEND_DIST_DIR}/"${PYINSTALLER_GENERATED_EXECUTABLE##*/}" version fi @@ -104,36 +127,38 @@ if [[ $? -ne 0 ]]; then fi if [[ -n "${CI-}" ]] && [[ "$PLATFORM" == "darwin" ]] && [[ -n "${CERTIFICATE_OSX_APPLICATION-}" ]]; then - echo "Preparing to sign backend binary for macos" - KEY_CHAIN=rotki-build.keychain - CSC_LINK=/tmp/certificate.p12 - export CSC_LINK - # Recreate the certificate from the secure environment variable - echo $CERTIFICATE_OSX_APPLICATION | base64 --decode > $CSC_LINK - #create a keychain - security create-keychain -p actions $KEY_CHAIN - # Make the keychain the default so identities are found - security default-keychain -s $KEY_CHAIN - # Unlock the keychains - security unlock-keychain -p actions $KEY_CHAIN - security import $CSC_LINK -k $KEY_CHAIN -P $CSC_KEY_PASSWORD -T /usr/bin/codesign; - security set-key-partition-list -S apple-tool:,apple: -s -k actions $KEY_CHAIN - - echo "::group::Preparing to sign" - files=(`find ./${BACKEND_DIST_DIR} -type f -exec ls -dl \{\} \; | awk '{ print $9 }'`) - for i in "${files[@]}" - do - echo "Signing $i" - codesign --force --options runtime --entitlements ./packaging/entitlements.plist --sign $IDENTITY $i --timestamp || exit 1 - codesign --verify --verbose $i || exit 1 - done - echo "::endgroup::" + echo "Preparing to sign backend binary for macos" + KEY_CHAIN=rotki-build.keychain + CSC_LINK=/tmp/certificate.p12 + export CSC_LINK + # Recreate the certificate from the secure environment variable + echo $CERTIFICATE_OSX_APPLICATION | base64 --decode > $CSC_LINK + #create a keychain + security create-keychain -p actions $KEY_CHAIN + # Make the keychain the default so identities are found + security default-keychain -s $KEY_CHAIN + # Unlock the keychains + security unlock-keychain -p actions $KEY_CHAIN + security import $CSC_LINK -k $KEY_CHAIN -P $CSC_KEY_PASSWORD -T /usr/bin/codesign; + security set-key-partition-list -S apple-tool:,apple: -s -k actions $KEY_CHAIN + + echo "::group::Preparing to sign" + files=(`find ./${BACKEND_DIST_DIR} -type f -exec ls -dl \{\} \; | awk '{ print $9 }'`) + for i in "${files[@]}" + do + echo "Signing $i" + codesign --force --options runtime --entitlements ./packaging/entitlements.plist --sign $IDENTITY $i --timestamp || exit 1 + codesign --verify --verbose $i || exit 1 + done + echo "::endgroup::" fi if [[ "$PLATFORM" == "darwin" ]]; then - cd ${BACKEND_DIST_DIR} || exit 1 - zip -vr "rotkehlchen-backend-${ROTKEHLCHEN_VERSION}-macos.zip" rotkehlchen/ -x "*.DS_Store" - cd "$WORKDIR" || exit 1 + cd ${BACKEND_DIST_DIR} || exit 1 + zip -vr "rotkehlchen-backend-${ROTKEHLCHEN_VERSION}-macos.zip" rotkehlchen/ -x "*.DS_Store" + mkdir "$WORKDIR/build" + mv "rotkehlchen-backend-${ROTKEHLCHEN_VERSION}-macos.zip" "$WORKDIR/build" + cd "$WORKDIR" || exit 1 fi @@ -141,7 +166,7 @@ fi cd frontend || exit 1 if [[ -n "${CI-}" ]]; then - echo "::group::npm ci" + echo "::group::npm ci" fi # Let's make sure all npm dependencies are installed. echo "Installing node dependencies" @@ -152,17 +177,17 @@ if [[ $? -ne 0 ]]; then echo "Attempting node installation again" npm ci if [[ $? -ne 0 ]]; then - echo "package.sh - ERROR: npm ci step failed" - exit 1 + echo "package.sh - ERROR: npm ci step failed" + exit 1 fi fi if [[ -n "${CI-}" ]]; then - echo "::endgroup::" + echo "::endgroup::" fi if [[ -n "${CI-}" ]]; then - echo "::group::electron:build" + echo "::group::electron:build" fi # Finally run the packaging echo "Packaging rotki ${ROTKEHLCHEN_VERSION}" @@ -173,12 +198,12 @@ if [[ $? -ne 0 ]]; then fi if [[ -n "${CI-}" ]]; then - echo "::endgroup::" + echo "::endgroup::" fi if [[ -n "${CI-}" ]] && [[ "$OSTYPE" == "darwin"* ]]; then - # remove certs - rm -fr /tmp/*.p12 + # remove certs + rm -fr /tmp/*.p12 fi echo "Packaging finished for rotki ${ROTKEHLCHEN_VERSION}" @@ -200,12 +225,12 @@ function generate_checksum() { echo "Generating sha512 sum for $file" if [[ "$platform" == "linux" ]]; then - sha512sum "$file" > "$checksum_file" + sha512sum "$file" > "$checksum_file" elif [[ "$platform" == "darwin" ]]; then - shasum -a 512 "$file" > "$checksum_file" + shasum -a 512 "$file" > "$checksum_file" else - echo "$platform not supported" - exit 1; + echo "$platform not supported" + exit 1; fi eval "$3='$(pwd)/$checksum_file'" @@ -214,54 +239,54 @@ function generate_checksum() { cd frontend/app/electron-build || exit 1 if [[ "$PLATFORM" == "linux" ]]; then - GENERATED_APPIMAGE=$(find "$(pwd)" -name "rotki-linux*.AppImage" | head -n 1) - generate_checksum "$PLATFORM" "rotki-linux*.AppImage" APPIMAGE_CHECKSUM - generate_checksum "$PLATFORM" "rotki-linux*.tar.xz" TAR_CHECKSUM - generate_checksum "$PLATFORM" "rotki-linux*.deb" DEB_CHECKSUM - cd "$WORKDIR/${BACKEND_DIST_DIR}" || exit 1 - BACKEND_BINARY=$(find "$(pwd)" -name "rotkehlchen-*-linux" | head -n 1) - generate_checksum "$PLATFORM" "rotkehlchen-*-linux" BACKEND_CHECKSUM - - - if [[ -n "${CI-}" ]]; then - echo "::set-output name=binary::$GENERATED_APPIMAGE" - echo "::set-output name=binary_name::${GENERATED_APPIMAGE##*/}" - echo "::set-output name=binary_checksum::$APPIMAGE_CHECKSUM" - echo "::set-output name=binary_checksum_name::${APPIMAGE_CHECKSUM##*/}" - echo "::set-output name=archive_checksum::$TAR_CHECKSUM" - echo "::set-output name=archive_checksum_name::${TAR_CHECKSUM##*/}" - echo "::set-output name=deb_checksum::$DEB_CHECKSUM" - echo "::set-output name=deb_checksum_name::${DEB_CHECKSUM##*/}" - echo "::set-output name=backend_binary::${BACKEND_BINARY}" - echo "::set-output name=backend_binary_name::${BACKEND_BINARY##*/}" - echo "::set-output name=backend_binary_checksum::${BACKEND_CHECKSUM}" - echo "::set-output name=backend_binary_checksum_name::${BACKEND_CHECKSUM##*/}" - fi - - export APPIMAGE_CHECKSUM - export TAR_CHECKSUM + GENERATED_APPIMAGE=$(find "$(pwd)" -name "rotki-linux*.AppImage" | head -n 1) + generate_checksum "$PLATFORM" "rotki-linux*.AppImage" APPIMAGE_CHECKSUM + generate_checksum "$PLATFORM" "rotki-linux*.tar.xz" TAR_CHECKSUM + generate_checksum "$PLATFORM" "rotki-linux*.deb" DEB_CHECKSUM + cd "$WORKDIR/${BACKEND_DIST_DIR}" || exit 1 + BACKEND_BINARY=$(find "$(pwd)" -name "rotkehlchen-*-linux" | head -n 1) + generate_checksum "$PLATFORM" "rotkehlchen-*-linux" BACKEND_CHECKSUM + + + if [[ -n "${CI-}" ]]; then + echo "::set-output name=binary::$GENERATED_APPIMAGE" + echo "::set-output name=binary_name::${GENERATED_APPIMAGE##*/}" + echo "::set-output name=binary_checksum::$APPIMAGE_CHECKSUM" + echo "::set-output name=binary_checksum_name::${APPIMAGE_CHECKSUM##*/}" + echo "::set-output name=archive_checksum::$TAR_CHECKSUM" + echo "::set-output name=archive_checksum_name::${TAR_CHECKSUM##*/}" + echo "::set-output name=deb_checksum::$DEB_CHECKSUM" + echo "::set-output name=deb_checksum_name::${DEB_CHECKSUM##*/}" + echo "::set-output name=backend_binary::${BACKEND_BINARY}" + echo "::set-output name=backend_binary_name::${BACKEND_BINARY##*/}" + echo "::set-output name=backend_binary_checksum::${BACKEND_CHECKSUM}" + echo "::set-output name=backend_binary_checksum_name::${BACKEND_CHECKSUM##*/}" + fi + + export APPIMAGE_CHECKSUM + export TAR_CHECKSUM elif [[ "$PLATFORM" == "darwin" ]]; then - DMG=$(find "$(pwd)" -name "rotki-darwin*.dmg" | head -n 1) - generate_checksum "$PLATFORM" "rotki-darwin*.dmg" DMG_CHECKSUM - generate_checksum "$PLATFORM" "rotki-darwin*.zip" ZIP_CHECKSUM - # Creates checksum for the backend archive - cd "$WORKDIR/${BACKEND_DIST_DIR}" || exit 1 - BACKEND=$(find "$(pwd)" -name "rotkehlchen-backend*-macos.zip" | head -n 1) - generate_checksum "$PLATFORM" "rotkehlchen-backend-*-macos.zip" BACKEND_CHECKSUM - - if [[ -n "${CI-}" ]]; then - echo "::set-output name=binary::$DMG" - echo "::set-output name=binary_name::${DMG##*/}" - echo "::set-output name=binary_checksum::$DMG_CHECKSUM" - echo "::set-output name=binary_checksum_name::${DMG_CHECKSUM##*/}" - echo "::set-output name=archive_checksum::$ZIP_CHECKSUM" - echo "::set-output name=archive_checksum_name::${ZIP_CHECKSUM##*/}" - echo "::set-output name=backend_binary::${BACKEND}" - echo "::set-output name=backend_binary_name::${BACKEND##*/}" - echo "::set-output name=backend_binary_checksum::${BACKEND_CHECKSUM}" - echo "::set-output name=backend_binary_checksum_name::${BACKEND_CHECKSUM##*/}" - fi - - export DMG_CHECKSUM - export ZIP_CHECKSUM + DMG=$(find "$(pwd)" -name "rotki-darwin*.dmg" | head -n 1) + generate_checksum "$PLATFORM" "rotki-darwin*.dmg" DMG_CHECKSUM + generate_checksum "$PLATFORM" "rotki-darwin*.zip" ZIP_CHECKSUM + # Creates checksum for the backend archive + cd "$WORKDIR/build" || exit 1 + BACKEND=$(find "$(pwd)" -name "rotkehlchen-backend*-macos.zip" | head -n 1) + generate_checksum "$PLATFORM" "rotkehlchen-backend-*-macos.zip" BACKEND_CHECKSUM + + if [[ -n "${CI-}" ]]; then + echo "::set-output name=binary::$DMG" + echo "::set-output name=binary_name::${DMG##*/}" + echo "::set-output name=binary_checksum::$DMG_CHECKSUM" + echo "::set-output name=binary_checksum_name::${DMG_CHECKSUM##*/}" + echo "::set-output name=archive_checksum::$ZIP_CHECKSUM" + echo "::set-output name=archive_checksum_name::${ZIP_CHECKSUM##*/}" + echo "::set-output name=backend_binary::${BACKEND}" + echo "::set-output name=backend_binary_name::${BACKEND##*/}" + echo "::set-output name=backend_binary_checksum::${BACKEND_CHECKSUM}" + echo "::set-output name=backend_binary_checksum_name::${BACKEND_CHECKSUM##*/}" + fi + + export DMG_CHECKSUM + export ZIP_CHECKSUM fi diff --git a/packaging/pysqlcipher3_win.diff b/packaging/pysqlcipher3_win.diff deleted file mode 100644 index 4cfdf9017b..0000000000 --- a/packaging/pysqlcipher3_win.diff +++ /dev/null @@ -1,31 +0,0 @@ -gdiff --git a/setup.py b/setup.py ---- a/setup.py (revision 1f1b703b9e35205946c820e735f58799e1b72d2d) -+++ b/setup.py (date 1643291122131) -@@ -66,10 +66,10 @@ - - - def quote_argument(arg): -- quote = '"' if sys.platform != 'win32' else '\\"' -+ quote = '"' - return quote + arg + quote - --define_macros = [('MODULE_NAME', quote_argument(PACKAGE_NAME + '.dbapi2'))] -+define_macros = [('MODULE_NAME', quote_argument(f'{PACKAGE_NAME}.dbapi2'))] - - - class SystemLibSQLCipherBuilder(build_ext): -@@ -162,9 +162,14 @@ - url="https://github.com/rigglemania/pysqlcipher3", - package_dir={PACKAGE_NAME: "lib"}, - packages=packages, -+ data_files=[ -+ (PACKAGE_NAME, ['sqlcipher.dll', 'libcrypto-1_1-x64.dll']) -+ ], - ext_modules=[Extension( - name=PACKAGE_NAME + EXTENSION_MODULE_NAME, - sources=sources, -+ library_dirs=[r'../sqlcipher'], -+ include_dirs=[r'../'], - define_macros=define_macros) - ], - classifiers=[ diff --git a/packaging/setup-osx.sh b/packaging/setup-macos-python.sh similarity index 75% rename from packaging/setup-osx.sh rename to packaging/setup-macos-python.sh index a59baf773d..2fb9f48532 100755 --- a/packaging/setup-osx.sh +++ b/packaging/setup-macos-python.sh @@ -34,10 +34,24 @@ function install_mac_cpython { local py_inst py_version="$1" py_stripped=$(strip_ver_suffix "$py_version") - py_inst=python-${py_version}-macosx${py_osx_ver}.pkg - local inst_path=$DOWNLOADS_SDIR/$py_inst + + local postfix + if [[ ${py_osx_ver} == 11 ]]; then + postfix="macos" + else + postfix="macosx" + fi + + py_inst=python-${py_version}-${postfix}${py_osx_ver}.pkg + local inst_path=$DOWNLOADS_SDIR$py_inst mkdir -p "$DOWNLOADS_SDIR" - curl $MACPYTHON_URL/"$py_stripped"/"${py_inst}" > "$inst_path" + DOWNLOAD_URL=$MACPYTHON_URL/"$py_stripped"/"${py_inst}" + if [[ ! -f $inst_path ]]; then + echo downloading "$DOWNLOAD_URL" + curl "$DOWNLOAD_URL" > "$inst_path" + else + echo "Using cached $inst_path" + fi sudo installer -pkg "$inst_path" -target / local py_mm=${py_version:0:3} export PYTHON_EXE=$MACPYTHON_PY_PREFIX/$py_mm/bin/python$py_mm @@ -51,5 +65,5 @@ function install_mac_cpython { codesign --remove-signature "$PYTHON_DIR/Python" } -install_mac_cpython "3.9.10" "10.9" +install_mac_cpython "$1" "$2" echo "PATH=$PYTHON_DIR:$PYTHON_DIR/bin:$PATH" >> $GITHUB_ENV \ No newline at end of file diff --git a/packaging/sqlcipher_win.diff b/packaging/sqlcipher_win.diff deleted file mode 100644 index c9fe88ab49..0000000000 --- a/packaging/sqlcipher_win.diff +++ /dev/null @@ -1,114 +0,0 @@ -diff --git a/Makefile.msc b/Makefile.msc -index d59ca46..5325383 100644 ---- a/Makefile.msc -+++ b/Makefile.msc -@@ -276,9 +276,9 @@ SQLITE3H = sqlite3.h - # - !IFNDEF SQLITE3DLL - !IF $(FOR_WIN10)!=0 --SQLITE3DLL = winsqlite3.dll -+SQLITE3DLL = sqlcipher.dll - !ELSE --SQLITE3DLL = sqlite3.dll -+SQLITE3DLL = sqlcipher.dll - !ENDIF - !ENDIF - -@@ -286,9 +286,9 @@ SQLITE3DLL = sqlite3.dll - # - !IFNDEF SQLITE3LIB - !IF $(FOR_WIN10)!=0 --SQLITE3LIB = winsqlite3.lib -+SQLITE3LIB = sqlcipher.lib - !ELSE --SQLITE3LIB = sqlite3.lib -+SQLITE3LIB = sqlcipher.lib - !ENDIF - !ENDIF - -@@ -296,9 +296,9 @@ SQLITE3LIB = sqlite3.lib - # - !IFNDEF SQLITE3EXE - !IF $(FOR_WIN10)!=0 --SQLITE3EXE = winsqlite3shell.exe -+SQLITE3EXE = sqlcipher.exe - !ELSE --SQLITE3EXE = sqlite3.exe -+SQLITE3EXE = sqlcipher.exe - !ENDIF - !ENDIF - -@@ -309,7 +309,7 @@ SQLITE3EXE = sqlite3.exe - !IF $(FOR_WIN10)!=0 - SQLITE3EXEPDB = - !ELSE --SQLITE3EXEPDB = /pdb:sqlite3sh.pdb -+SQLITE3EXEPDB = /pdb:sqlciphersh.pdb - !ENDIF - !ENDIF - -@@ -612,7 +612,7 @@ CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) - !IF $(DYNAMIC_SHELL)!=0 - CORE_LINK_DEP = - !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86" --CORE_LINK_DEP = sqlite3.def -+CORE_LINK_DEP = sqlcipher.def - !ELSE - CORE_LINK_DEP = - !ENDIF -@@ -624,7 +624,7 @@ CORE_LINK_DEP = - !IF $(DYNAMIC_SHELL)!=0 - CORE_LINK_OPTS = - !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86" --CORE_LINK_OPTS = /DEF:sqlite3.def -+CORE_LINK_OPTS = /DEF:sqlcipher.def - !ELSE - CORE_LINK_OPTS = - !ENDIF -@@ -998,8 +998,16 @@ TLIBS = - # default to file, 2 to default to memory, and 3 to force temporary - # tables to always be in memory. - # --TCC = $(TCC) -DSQLITE_TEMP_STORE=1 --RCC = $(RCC) -DSQLITE_TEMP_STORE=1 -+TCC = $(TCC) -DSQLITE_TEMP_STORE=2 -+RCC = $(RCC) -DSQLITE_TEMP_STORE=2 -+ -+# Add -DSQLITE_HAS_CODEC to TCC and RCC as per https://github.com/sqlitebrowser/sqlitebrowser/wiki/Win64-setup-%E2%80%94-Compiling-SQLCipher -+TCC = $(TCC) -DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -+RCC = $(RCC) -DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -+ -+# Add OpenSSL Include path to TCC and RCC as per same tutorial -+TCC = $(TCC) -I"C:\Program Files\OpenSSL-Win64\include" -+RCC = $(RCC) -I"C:\Program Files\OpenSSL-Win64\include" - - # Enable/disable loadable extensions, and other optional features - # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*). -@@ -1219,6 +1227,12 @@ LTLIBS = $(LTLIBS) $(LIBICU) - !ENDIF - # <</mark>> - -+# Add options to LTLIBPATHS -+LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:"C:\Program Files\OpenSSL-Win64\lib" /LIBPATH:"C:\Program Files\OpenSSL-Win64\lib\VC" -+ -+# Add all lis under OpenSSL\lib to LTLIBS -+LTLIBS = $(LTLIBS) capi.lib dasync.lib libapps.lib libcrypto.lib libcrypto_static.lib libssl.lib libssl_static.lib libtestutil.lib openssl.lib ossltest.lib padlock.lib uitest.lib -+ - # You should not have to change anything below this line - ############################################################################### - -@@ -1760,11 +1774,11 @@ $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP) - $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) - - # <<block2>> --sqlite3.def: libsqlite3.lib -- echo EXPORTS > sqlite3.def -+sqlcipher.def: libsqlite3.lib -+ echo EXPORTS > sqlcipher.def - dumpbin /all libsqlite3.lib \ - | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@]*)(?:@\d+)?$$" \1 \ -- | sort >> sqlite3.def -+ | sort >> sqlcipher.def - # <</block2>> - - $(SQLITE3EXE): shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H) diff --git a/requirements.txt b/requirements.txt index 6ae51aac53..15b31eccee 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ greenlet==1.1.2 gevent-websocket==0.10.1 wsaccel==0.6.3 # recommended for acceleration of gevent-websocket. But abandoned. web3==5.29.1 -pysqlcipher3==1.0.4 +rotki-pysqlcipher3==2022.6.1 requests==2.27.1 urllib3==1.26.9 coincurve==17.0.0 diff --git a/sqlcipher_ubuntu.sh b/sqlcipher_ubuntu.sh deleted file mode 100644 index 52f661b56c..0000000000 --- a/sqlcipher_ubuntu.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -# the directory of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -# omit the -p parameter to create a temporal directory in the default location -WORK_DIR=$(mktemp -d -p "$DIR") -SQLCIPHER_DIR="$DIR/.sqlcipher" - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" - echo "Deleted temp working directory $WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -# check if SQLCIPHER_DIR exists -[ -d "$SQLCIPHER_DIR" ] && SQLCIPHER_EXISTS=true || SQLCIPHER_EXISTS=false - -# Ask user what to do if directory exists -if [[ $SQLCIPHER_EXISTS == true ]]; then - echo "Looks like you already have sqlcipher installed (in $SQLCIPHER_DIR directory). Would you like to reinstall it (yes/no)?" - read -r WANTS_TO_REINSTALL - if [[ $WANTS_TO_REINSTALL == "yes" ]]; then - sudo rm -r "$SQLCIPHER_DIR" - else - exit 1 - fi -fi - -echo "Downloading and compiling sqlcipher"; -# Go into the directory and build sqlcipher -cd "$WORK_DIR" || exit 1 -git clone https://github.com/sqlcipher/sqlcipher -cd sqlcipher || exit 1 -git checkout v4.5.0 -./configure \ ---enable-tempstore=yes \ -CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS" \ -LDFLAGS="-lcrypto" \ -prefix="$SQLCIPHER_DIR" -make -sudo make install - -cd "$DIR" || exit 1 - -# We need to set LD_LIBRARY_PATH to use local version of sqlcipher -echo "LD_LIBRARY_PATH=$SQLCIPHER_DIR/lib" > "$DIR/sqlcipher.env" \ No newline at end of file diff --git a/tools/pyinstaller_hooks/hook-pysqlcipher3.py b/tools/pyinstaller_hooks/hook-pysqlcipher3.py index c84a17c170..efa5e69300 100644 --- a/tools/pyinstaller_hooks/hook-pysqlcipher3.py +++ b/tools/pyinstaller_hooks/hook-pysqlcipher3.py @@ -1,3 +1,3 @@ from PyInstaller.utils.hooks import copy_metadata -datas = copy_metadata("pysqlcipher3") +datas = copy_metadata("rotki-pysqlcipher3")
XanaduAI__strawberryfields-581
Dependency versions error #### Issue description I made a fork of this project and tried to setup a new virtual environment. ``` python -m venv sf-venv source sf-venv/bin/active.fish pip install -r requirements.txt ``` However, I got the following error ``` ERROR: Cannot install -r requirements.txt (line 4) and numpy>=1.20 because these package versions have conflicting dependencies. The conflict is caused by: The user requested numpy>=1.20 tensorflow 2.5.0 depends on numpy~=1.19.2 To fix this you could try to: 1. loosen the range of package versions you've specified 2. remove package versions to allow pip attempt to solve the dependency conflict ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies ``` #### Additional information If it helps, I am using Python 3.9.4 and pip 21.1.1. A quick fix would be to downgrade the version of numpy in requirements.txt and solve the issue, but I am not sure it is the best way to go.
[ { "content": "# Copyright 2019 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nimport os\nimport sys\n\nfrom setuptools import setup, find_packages\n\n\nwith open(\"strawberryfields/_version.py\") as f:\n version = f.readlines()[-1].split()[-1].strip(\"\\\"'\")\n\n\nrequirements = [\n \"numpy>=1.17.4\",\n \"scipy>=1.0.0\",\n \"sympy>=1.5\",\n \"networkx>=2.0\",\n \"quantum-blackbird>=0.3.0\",\n \"python-dateutil>=2.8.0\",\n \"thewalrus>=0.15.0\",\n \"numba\",\n \"toml\",\n \"appdirs\",\n \"requests>=2.22.0\",\n \"urllib3>=1.25.3\",\n]\n\ninfo = {\n \"name\": \"StrawberryFields\",\n \"version\": version,\n \"maintainer\": \"Xanadu Inc.\",\n \"maintainer_email\": \"[email protected]\",\n \"url\": \"https://github.com/XanaduAI/StrawberryFields\",\n \"license\": \"Apache License 2.0\",\n \"packages\": find_packages(where=\".\"),\n \"package_data\": {\"strawberryfields\": [\"backends/data/*\", \"apps/data/feature_data/*\",\n \"apps/data/sample_data/*\"]},\n \"include_package_data\": True,\n \"entry_points\" : {\n 'console_scripts': [\n 'sf=strawberryfields.cli:main'\n ]\n },\n \"description\": \"Open source library for continuous-variable quantum computation\",\n \"long_description\": open(\"README.rst\", encoding=\"utf-8\").read(),\n \"long_description_content_type\": \"text/x-rst\",\n \"provides\": [\"strawberryfields\"],\n \"install_requires\": requirements,\n # 'extras_require': extra_requirements,\n \"command_options\": {\n \"build_sphinx\": {\"version\": (\"setup.py\", version), \"release\": (\"setup.py\", version)}\n },\n}\n\nclassifiers = [\n \"Development Status :: 4 - Beta\",\n \"Environment :: Console\",\n \"Intended Audience :: Science/Research\",\n \"License :: OSI Approved :: Apache Software License\",\n \"Natural Language :: English\",\n \"Operating System :: POSIX\",\n \"Operating System :: MacOS :: MacOS X\",\n \"Operating System :: POSIX :: Linux\",\n \"Operating System :: Microsoft :: Windows\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Topic :: Scientific/Engineering :: Physics\",\n]\n\nsetup(classifiers=classifiers, **(info))\n", "path": "setup.py" } ]
[ { "content": "# Copyright 2019 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nimport os\nimport sys\n\nfrom setuptools import setup, find_packages\n\n\nwith open(\"strawberryfields/_version.py\") as f:\n version = f.readlines()[-1].split()[-1].strip(\"\\\"'\")\n\n\nrequirements = [\n \"numpy>=1.19.2\",\n \"scipy>=1.0.0\",\n \"sympy>=1.5\",\n \"networkx>=2.0\",\n \"quantum-blackbird>=0.3.0\",\n \"python-dateutil>=2.8.0\",\n \"thewalrus>=0.15.0\",\n \"numba\",\n \"toml\",\n \"appdirs\",\n \"requests>=2.22.0\",\n \"urllib3>=1.25.3\",\n]\n\ninfo = {\n \"name\": \"StrawberryFields\",\n \"version\": version,\n \"maintainer\": \"Xanadu Inc.\",\n \"maintainer_email\": \"[email protected]\",\n \"url\": \"https://github.com/XanaduAI/StrawberryFields\",\n \"license\": \"Apache License 2.0\",\n \"packages\": find_packages(where=\".\"),\n \"package_data\": {\"strawberryfields\": [\"backends/data/*\", \"apps/data/feature_data/*\",\n \"apps/data/sample_data/*\"]},\n \"include_package_data\": True,\n \"entry_points\" : {\n 'console_scripts': [\n 'sf=strawberryfields.cli:main'\n ]\n },\n \"description\": \"Open source library for continuous-variable quantum computation\",\n \"long_description\": open(\"README.rst\", encoding=\"utf-8\").read(),\n \"long_description_content_type\": \"text/x-rst\",\n \"provides\": [\"strawberryfields\"],\n \"install_requires\": requirements,\n # 'extras_require': extra_requirements,\n \"command_options\": {\n \"build_sphinx\": {\"version\": (\"setup.py\", version), \"release\": (\"setup.py\", version)}\n },\n}\n\nclassifiers = [\n \"Development Status :: 4 - Beta\",\n \"Environment :: Console\",\n \"Intended Audience :: Science/Research\",\n \"License :: OSI Approved :: Apache Software License\",\n \"Natural Language :: English\",\n \"Operating System :: POSIX\",\n \"Operating System :: MacOS :: MacOS X\",\n \"Operating System :: POSIX :: Linux\",\n \"Operating System :: Microsoft :: Windows\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Topic :: Scientific/Engineering :: Physics\",\n]\n\nsetup(classifiers=classifiers, **(info))\n", "path": "setup.py" } ]
diff --git a/doc/requirements.txt b/doc/requirements.txt index fa84097fa..df4c7bce0 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -4,7 +4,7 @@ ipykernel sphinx==2.2.2 m2r networkx>=2.0 -numpy>=1.20 +numpy>=1.19.2 plotly quantum-blackbird scipy>=1.0.0 diff --git a/requirements.txt b/requirements.txt index 467451b9a..bbeeed304 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -numpy>=1.20 +numpy>=1.19.2 scipy sympy>=1.5 tensorflow>=2.0 diff --git a/setup.py b/setup.py index c98c80a2b..eeda8d635 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ requirements = [ - "numpy>=1.17.4", + "numpy>=1.19.2", "scipy>=1.0.0", "sympy>=1.5", "networkx>=2.0",
ResonantGeoData__ResonantGeoData-455
Improve VTK.js 3D Viewer After #406 is merged, we should improve the 3D viewer. Basically, use [this example](https://kitware.github.io/vtk-js/examples/GeometryViewer.html) Things we should have: - [x] drop-down menu to change the scalar array - [x] Scalar bar - [x] Representation style - [x] Better background color choice (likely black) - [x] Point size slider - [x] Support RGB colors
[ { "content": "from rgd_testing_utils.settings import * # noqa\n\nINSTALLED_APPS += [ # noqa\n 'rgd_3d',\n 'rgd_fmv',\n 'rgd_geometry',\n 'rgd_imagery',\n # Swagger\n 'drf_yasg',\n 'django_extensions',\n]\n\nROOT_URLCONF = 'rgd_example.urls'\nWSGI_APPLICATION = 'rgd_example.wsgi.application'\n\n\n# Swagger\nREFETCH_SCHEMA_WITH_AUTH = True\nREFETCH_SCHEMA_ON_LOGOUT = True\nOPERATIONS_SORTER = 'alpha'\nDEEP_LINKING = True\n", "path": "example_project/rgd_example/settings.py" } ]
[ { "content": "from rgd_testing_utils.settings import * # noqa\n\nINSTALLED_APPS += [ # noqa\n 'rgd_3d',\n 'rgd_fmv',\n 'rgd_geometry',\n 'rgd_imagery',\n # Swagger\n 'drf_yasg',\n 'django_extensions',\n]\n\nROOT_URLCONF = 'rgd_example.urls'\nWSGI_APPLICATION = 'rgd_example.wsgi.application'\n\n\n# Swagger\nREFETCH_SCHEMA_WITH_AUTH = True\nREFETCH_SCHEMA_ON_LOGOUT = True\nOPERATIONS_SORTER = 'alpha'\nDEEP_LINKING = True\n\nSTATIC_URL = '/static/'\n", "path": "example_project/rgd_example/settings.py" } ]
diff --git a/.dockerignore b/.dockerignore index ef0db6bbb..a6f1ac15a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,3 +4,4 @@ *.egg-info build .mypy_cache +**/node_modules diff --git a/.gitignore b/.gitignore index 7707361fb..e81d36831 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,5 @@ files/ docker-compose.local.yml .mypy_cache + +**/node_modules diff --git a/django-rgd-3d/.DS_Store b/django-rgd-3d/.DS_Store new file mode 100644 index 000000000..b2ad692d1 Binary files /dev/null and b/django-rgd-3d/.DS_Store differ diff --git a/django-rgd-3d/rgd_3d/static/rgd_3d/vtkjs_viewer.js b/django-rgd-3d/rgd_3d/static/rgd_3d/vtkjs_viewer.js new file mode 100644 index 000000000..acc0e6402 --- /dev/null +++ b/django-rgd-3d/rgd_3d/static/rgd_3d/vtkjs_viewer.js @@ -0,0 +1,3562 @@ +/* + * 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 <[email protected]> <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 <[email protected]>, 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 <[email protected]>\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,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABGdBTUEAALGPC/xhBQAAGXRJREFUeAHtXQl8VEWaf/W6051AEm5QSUjkUo64RkTAEQIzu1zisePiMeMq4Kx4IHcywOBuOxoICeFa0EGGxQNdBV11WOUYL8CDAVEkRgbkCElGEAKahIT09d78v5d09+vu96peE2hnd/J+v9BV3/fVV1XfV/XVV1/Ve0hSy9MigRYJtEigRQItEmiRwI8iAUa1Ll68eJTK1PGfHnU/ueebusdFLQHtucqtBdNFdC14sQTsRKKqqhd/DwzJdL61+/C52yRV6sgtqkpS91tcS45ucpVz6VqQQgnIRJGamrqLMeZFchhTpZ3CUiDweTzDrdC10PAloClg8uTJ9Rj1n8G0DJNk2ZICVEnJ4bNuwVqRgKYAjVCWdkAJ17VPYXusFATtcEt0LURcCQQVwFS2HZT2ewa1a43fOm4pIGkZ6DnGlSaia8HzJRBUgMPh+BikiiwpN2E9+IRfrBHrUVvWASty4tFoXhARTJ06taawqHAfk9gwjO73APonXkENp2rrwHohnY4ALu+DlJ09e/az3UbPuxdzqb0ObZxk0t7yzQs/Th895xFJZf2NiZoPVVXJ2yUzc/apsuNPSExNBUeVMUlVFEx4pqqQjUouo+2KxHllz7kaAjWiT48gfXVSUtK8grcqpkmMdQ3gzH4xyF8v37LgvaACiBAV7MDPw8kOW/45t8+sbBCOVg0PZiwkClcVXqbUK8ttsm18+s3z+ite5QUU0/YivOKYpten3+q6QnK7l6L/Dh5tc3AQyrpTFcdGYADOJRtLD5TS+OAX0keanYHwZzZBpaKiouGAr0QvCha+VXEb4E+FCgWown8h52MpqY48ggZNkEZik3agg857BqdA2xK5pdwHtD01wXCpQkh2ns1E5Ydmzpz5NvOrc4ARCh9C2Vq+rWAvc7unXUrhoyV+CHKBqkD4vIepJQH02rVrISh1Hcp9/fLHP6xGW1cEcJxfFQNwUulG1zmiCVMAU9hOMFFbO22DoOu9HCZBlOq2tg4sWbKETM3DsiwvyLz18UxM67uCTPiJfCz2qWjPQ3yy5mFlxl6xy7aOGOTDeZxAF1TA2bNnizGg0mVJnni6TlmJASI0p7LMVpZteerDQB1hCoBdrgLigCIpw4CwtB+AhcwJMOP9+v3+qWjgCYz+jYrHn4sJHWb+jMpiMOys2LpwZ4PifghlySZfmodh6Nls+X5F4Y9+ql2VNAUULikcjZH/b5g5hcvfPdsPZmecqHHoz5FOCU6a+cEnTAEEBdMd0OoQh1PzioKEpgkmXgdWrVqVjIY+hqlX0P2233RCJRNN+ekQZBL6jXc5sP5N04EvehJ28DUMOhuUfIuIuWyT9i9durQtVPZ79Kn0xV3VayRFWSYqh4VZAc3EvZtc9XraKAXQfgANSb79H1JoL0CrDv9R1d6ZY12X8Yjq6+sfBr4uOTn5Ra9HnQ7BJvLoCQeh7EXAb0tNtedeNOIKEX0z8KqdsXyLa5LaurWz1Kf4aLRfZpftE76v8T+N9rUR1Y9BtJxmcyRdlAJsNptG1Lmdei1mQmlkAaO8XzFfB9atW0fCngmhFy169/tWcOTIZRM+sJULMBAwHlSYq0v3wCy8pSTItVbWJAyKY7R4olFZ6M+iJVurrkUbRwtbx9ghtU3n3xjRRdlh2Oi/wLU6grE/DNPmI9g2sd+tSrQOvGJUwZkzZyZhOMsYLb/31Z6aDrdOaMvR0QNlmxe80WvsE11lVd0EvvQX9iiMXYe2/SwMGJlh0kFZYq8SGC4zPHpy7vBA6oAgj4Ssrsea9Cvko2Sh0er/YY32H8Jnr+5x/xf2rV/o0YZpmB4bkyYc3zjzvBHeuFKmuaO3YxQ+5veLvQ80aLgR8w8++MD+2d7P8oBfumJ/DW1oLJ0hQCwL8UfmrxJ/mr9M/AtXFPZgbpaUm5v7VfqoucUg4CoAHN4p37bwP6hs5AOv7Hq73X4SG9DKtJFzsiPxhnm10QNKdCYuO/XDmeeh1RRDOh0QA6j4+NaCT3WgsGSUCSIspv0O/LS7uX/y6TBqs4yqXn3lrfO6RKL3fL4HO12pTaIj8Wn/yYZJSHeOpInMw+wd6z7E+d+RcMpD+L9D255swmUZ0YTBdC6jHr569epWPr/vT26vewzBUec1erxZGoOi0QPa9O1tmMn/aEYXhDP2Z/mKxH8P5g0ShgpIkBNIAVJmF9tVmK7HDcpFgfxuzQwF4bCNCCtJczD6V/7P2bMU7rZky5ksLfrQ5TLchkP4WbC/mhAwTMQKsMlNtMFmaYna2tp+SMjw30u63TynHdooDB1QQYzm/Rm3zL8SM69QY8T7Bxs7lLhfH7IwIjdUwIwZM45C23/ByBgGu6ktykaF9TCMiBx9vmhJ0R3I0yZl+dFdnruBz9TjjdIwzN862OXPGeFWrFhB7msXVVZLrv7nuR3Aj+t5YeAonW0JXxvxQt+yyMS1bdu2FJEdsSIbmaiKTeqP9eJ5KD/ZiG8YjLGiyq35u8NgBhlDBRAdRsUO/A0FgSUFIE41XM8ffvI8zO3Vs2bNOqMq6q/1ONO0zIoPb57qNsJ7vV7NTMiqXHK+3pLJOBzpcwf4KopCQi974IEHalW/35L5AT1T/OpGzOyhAT5mv1jiSxPZ5S4zvB5uqgCMkO004ob2TanQFzBLo2F9e46Z24nw8KJuhvL6wvMpzhg7fxzSYk8KQa52ndqvNuOPjRIJraFbt27fkCkyowvBQzGbEKwpxaRr0KZG86RKFnhFceAAmA+L//1mAymyoKkCILwdRHxtuiMNyj8TWdAo75GazBCTaPQ/Ry4tRpt4ew9msP3L9r+YW2fEl2BQMJmNA3feeacfGbHQmkIGJvz6h9YSyeoMMGEVDoYZLaDgYTjUPGeqAKwDB1DsNBbSYTCXH5mzCGEQScyBoNAGqWeCLWFR2pi5ORDWkBCFcQqCrbElOlcaYxuhWI+yMCO1UatgI8SjJZxNDizW4ZTLli3rgjZ2RlCwRGsrk2hBvjgPvJ7OmZm/jYWZqQKICQSzE1N1GFZza+sAIokoAw2wR7WFXBTabWopCjxd9qbrB7OGQ1BwQNR+tABrQpPEQrPZbYYekFf1asoDnxKKykKpKWb1xgpHuEHd++xkYRhfz5evgMYDmm5Z6c7D+kJmaSirX+9bXB0RVX0tY8zj2WjPKDPaABzT5bwzybk0kDf6hQfUA/BWtABrQhN5IYzV33e9/YgRL+bXPCD3gAEDDike9aKaH7infQLroFHdRjC+Aph2QiYN7ZPUDtMhLIpnxAwwhs0NZgw26YovLOxqQo8ByNYcecN1ygxPcHhA2qh1Op0litcvND9QaqnL5VKMeGKQkCk7MGLECB/8GiEvIx48mFeRtf7zaPQ4rgKwiH4J4mq7xG7Cr+l2Ws/Qj3Wg+7j5vTAa/kUPN0rDXHkSbc4iI5wepm3AGDv72GOPfSspFhbggIejZ9KUxqzMgoNwiTwgCcdqysVTAAREo+hj+PGWN2To3HCf15eHxZerXE0eqvTi4c0uivfwH0XKIputEWETxSfGNJSMF2DwwIEWw+FJIKhm0QNi7D3UuV5Ub2P71LANqaiMWEhM2g4mva683PGViJmGxwiDWblPSEtnsEwtENIRAZOyWMirESoA5tJwAUYArieUkKTasABPcCFMrvayUj8W1zWSw2bJpKKxWZm3u9pa4Us0QgXYmG0HEY66qnUrMPdRWvCQMyC8uYBRugEHLsLFHUJLAr+e5LfT6RhCEL0F9UsJSQ5DBfilxvXDLtlL1BOevpgJNhEvwssJ9v2V/5tPoZljQnrMMsXtFe6WA3yECsAp1l4Q1yc6bIOwxf48ULCZvwjB2Bda5KEFzmjU1tf4+2DU2nnlIKTvzBZ1hEdo9nxPG0Rru2nNnDX8vHf7sqY6tcHIq59wagzrgFABuLjrhQn4FN4DbJu1wJyogbDDmyrfedJwlEaWxWG+Fjhrn9r+K/jw4pCG7tpIJC/NlDWZJ8wqsSlrZPBVerp0PS5fZWBVs7ofsrwOCBVAbUBEkzTfr1OKQ3wC1Nho7r+qJOdzCXRIGqlQ/nEKnJEAdSjjJCcEoQmdSfsbC1oK6GEKqPt9qo8Uf5PDogJgJrNhLsURUzC1pAA0fAf+2M3ZrSjMoDZ24ML+hRl710qYNsAdtj8r6NVYCEFwFuAk8OwRigFZmwGYrV+iTH/0f+jRdxYeIhMXaJv5r2qvqfX8xBwfwlhSQMeOHXehiCfVYctGgyhGdMGPjdktj36tEn3k0soMMDmEAa/gWkK7deF5QlMPFSbRXqgvZp+2sGL0WTRDFMIRP5YUMHHixAZofg9MAfYDFhtgVDeTPtHfCjMi0cMQ1u6MkdeZRm338QVtsLql6/FRaexb1NYdSqPgAOjXErfPZzkEIcsqmawK/PVZuXJlB9gkMsfiJ+KAyqyAJQVQYdji7Rj92W1a2faYMRPBbZK8QESjxyNiqdl8XJUp8dXWiu2/JB2uNLl9AL50BqCtJbgdYIUXZM0qyt8u+B6DTzPBbrf7J3a7xQHIpIFp45eQ2eM+lhVACzFGo21kVrLhiRW3Fg3J9h3fuuBtMV2IoukQxpOdnX3QmtDMD2FoMQ+sJXi9yuIM0Ea/lJCQQJtRxLeUoRNucOzHQlgdaqVxCrJy2GqqBhtjQ1DLCmjXrt0nmAH+y9rIfWhkhFhYS2EqxzT6iSs6QUL7c2PgrHkeEPiQN9Xk+orDGVQ/ypD9l6ZNm/YN0iehxJsoyIed/scEFz1W4kKWFaCdn6rqF7DHORgB1haiQAtxQWrS4MTXA1nLvyrMRsivF+4BzA5h9GsJBChjIaUFWfgEFKAR4q4U8gPoSguEZq3/jAn3A5YVQI1AA+igfmCSU7YUGQ30ENfPCszCwwGayF+Mfmpb36DbaOHs1o9rI5F8KB9YSzCD97/wma8HphbCKuIHp0BBfhgIZIITzp07NwgBDEsKQExmMIVPeDVxt/VRBROk53GgcbZvV+ene4+dXxyFNwBgtPl6DHasr9higOSANm7caMdt6rvw7trn48dvsO2u2fdzGgK8Z+IQx1HX1mgK8DiABXQkDvQP+tSqVKxnI6OpoiETbnQccm1rhCOMsR2Dj8zi0JRkZ0FNtbsBOQT0zB/0Pan2nHsgKExNFr9H5rz/7jAQPFtcvLgKQt+bNztvZPrIuR8iLTYxsjSvfEuBadwrJhP0dyd1XYdhviBvaSfM8JANGzbY4Ijs0KFNk9AbV0ktCjAVnQECL7NjJiRXVlZmQx2W1gFo7UYyoQbcNND/awWQx0J/Zp2PFQ6HYDuV8av+m1LaOOCIWDgfwa2LXbWfX2dWV2yLsBmXGOA0fTGCLuMVadOmTY0W/eQR6XBkn4uLi4fCU8mBmaAgGAXPOlTXVGuLJN5/roUJOQH4EZiQrUhvxpXJQzoWlpJYxPeVHS+rRR1D8aLGMlyR/wIxJVpk+Y+qHdQbRhDiroCKioqBfsXPdWPx9uEk9Ggdv1eShOsqqQ3ehgcRq38IUx3upWmJFCgkBdjeoBsDumVFi4u+hsJcuTNzX9Psu2nREIJu5WFPQR4NXVKgh8yQBQVoLzIWayUi/om7CWoKL0Q0IzxLsZ9wSHQOQr+9wd1wADf3ijThR5NwIVBIX5TdAM9mL4Q6iEscjqR1oDNmXG8o0tI6AO+ZdtCGso77DEBfRDtauolRGt7nUA6dZxD+KkVVHg5BLzwFftko/T5eO70jb2aecLeSkZFRWFdXt3TChAmelz98ovKM1zfCSu0bSyWSNa7Phj9x3wcULi58HyOH1+iDebl5V4c3szEHYckYeWsh/AlG+GbCPE6Hsz/FfZrJJ6bihtMiJg6xEquCGRA8MoxmDOFPu0TC92FxfijewqcexlUB9LEO1NkpWrQhCMIEwfhLCCpJ2p0eSbV8mta0sJ4GjwY9n8g06M7JTB6HF/+Ei35k2YuRj6sC5PONByy8hkMghgrAy9G/hgniHnCQ0PH3GgSaA3OSBFPWGX9Jdps9DbBHgQtzPTHqTwKXg8vEBhEkXisvHi7ei7BoAaZDjygPiF72Pl11eryo23ArH82blfdMJB3dAwLsabita3F5uBBXLacifxCvqY7GNfqySPp45uM6A+Auio4CazEaowSCl71zIBTu5wAwwlcZCV8vTLwT7M6dlTsNtNMx8m/8sYVPbYvrDIAJ4SoAJqKEzIheaJTGyM7kbLI0csT8X40sZ5aHkpeb4eINj9sMIBcSnevL6yBmiKH9R9k0Xrkm3AWeVVvgfAlJ4qaAwFsu3L6YuKC0tHLLAYlrJ7y9haj4j4aPmwI8fo9wAaZXkEwkccoEHgIz6QnskEeFAP83UnFTQNPNZK5UUlJSDBWAdUF4KxtmyolN2hbstNdjz2Dp0J3bmDgh47YIizwgCPk4bmIb3rdBGPjTsvKy77AQdxHKRZV+iQ9x/BIh6O3wdtZ06NDhdbrZJyz3IxHEbQaIPCD033ABJrloL2fjk2cxyigHM2J91ZmqE0XFRQuwBnF34DHyvmjkwsXtYtREGykI4hyUYHo0h11pPsIB83n1IWz8EmbSL3g0HFw96ngKX4pfrL3zwCGMFUUvJeK9uAzMYofE7CeuHGQr+dDkiy+RvOMyA3DA0ocnfGoUvbke2bjIfOvWraegkx9Fwi3mW0F5C2pqa/6EoB7/kq8Fhtf8a1FrnIjNSx8155jH4zuE63J/9Cvq236/9/MjnzRUAb42c7QrU8QqLgoIvJvFawwUYGqCAuUeeeSR72fPmp2DA465UERMb6QHeGAgZMM0kRJ6B2Cx/maMmnfd2VNnD4BXPo4kMyPLYyfZBvBJftV9MG3UvF9F4vX5uCjAggfU0LVr17BAmb6R+jQEr+BeTgEubQ1A+kX8xbwBg+Aux7HoH7AupOp5W0nj+9UD8bWQncKr8mCGehz4ruoa3CGabcY7LgrAiOWGINC4r7WF1qyVBnAE2EpyZ+feB7uehr88/B0xIOOBrvJ4PHN5BJE4+roWjjHftHq1MVAe38JYhFljuFGMiwIwErgKgLsoND+BzkT+Iq5ThcW7CL+9wGckZsTmSBqzPNaEadpHZc0IIuCKn+EDhBfwDVOEYfySUgw5RDk9l1wB2BS1Rz+uiOhLZPaCFRBgBMGrUMIfMSvG4vLsGOQpBM19IJCkenf9z7hETUi6XIXLtpOt0BrS4MW9zFHzh0TiLrkCUCF39FOD6B3gyIY1J68drqvSaPAw3NiF8fZLA8LyJpndtV/cgIW1nQnaElhh0R95veQKQJBsMK91GKn+1FaphpeWeOVEOPq2KHi/JKIDXvgpTeIBF7O7BV5cEkzSKB6XXAFo0XBuqyRpn1kIQlBOjMb/DCUigpJ8IhrCQ1CtrdDxaHASF3VN8oJjQdiV9ker7oAd7QO38G6jiunzYF6fdwT3MEXVPgZiVDwII3cRN+Bux4nXC0GghQQOcpK5dYMH2l9hgZWE76ycxKdyrJCa0zD5u0hkTDMAn22/DtHGfFzrOwgPogQadaGDd2nKiOSMvNfvnYEOOg1QQRA2YNuDGYPE8uXLe+EG3C64f88j3DzNgMQQhHpxiMDuNETqgJgBlbqsadImO3cD2SwNwATtiqwgyi2KJCA3re58nQvwO1B9ZiSe8ujEF/gIzNi8R/NOBvAIgE2Ggp5GnqdkT4I9oQvOZg2/F0fxfSj6FQgz+PkX1LUBZaZOnz49ajQF6qZfDJRn0N6H9DCDtIINXSYu6lqaBQg90LXEoQZ8hCAI+nySM7HboU2uKj2xUAF0m/l4+fFTqJjcSdMHgjkLJN1682DjdT3ohVt9lHkFbuM9Rkwh/FkQ/iLwiQrgoVwd6nkD3tNLSQlJ+6dMmXLy2WeftTU0NFzu9rl/CtzD+LvBiK8eBj5vo/5xehgvnTFm/k/9ft97PBozHL53tLhiy8LcSLxQAVQAJuc5COL+yMLNzeNmwnDsaLfr+WiR06qqNRD+vXo4Lw1BUlzIjjZa6k+Ql00aBZd1WzBvIYFZ8J+oZ4oF0hAJ7jq179z+RqPvovLMQ5ABpmkROtks+xdkFkgw6c1I4ROqqqpqRSzCpzIQSEKswsf68Eyswqe6egxxzsBn/a24t0QO8yyVOlV5nJHwCW9JARBUKab076jARXqq8SUuuhwV9eDLiBS42hmFuJgAJu1GPTMuhCXF+cu3LLwXX/p9FNKlq4+GD6aiF4P2mVbOdkOObMs3XWMsT9mmQxVahAYa1mgdWI+YzSiEDUzj+vSZMkQrX0ddY6yztUYJoWzCYLoHG7U6ayXMqa66dVHKeU/1bYqqjkSYIgMmwgGBnpBk9pFdll8/9k7+cfPSjRjLCiByzR93N/wByZzG4rH9i86faur8+6KSEL68eMniX4D+t0hfKaK3gK+F2VkIxS9CO+gdhL+JJyYFUIvJKyovL58KO+2CYCzF09FhhFHUl1sltpoGj+VMLD3HS3YJ1eeqH8TdoCmo7+pYyjbRnoZX9jLKL8CoF19vuYAKmlMkZgUEKsPmi7bmd6NzY/E7CMLpGsBB4DizwIe/mXQUu9E3bJLtVau+doCH0S9c0wzAaW9Af1dhRNMtiQ6oW+uHpmhVrQL8S8D3Ib8NNyrej/WswajuSwW7YAVENohGKj4H0BZ/DNO8Cp2PyzSn/yho3759naAEd1paWvXfsrAjZdaSb5FAiwRaJNAigRYJtEjgR5TAXwGHqq6EoyI62gAAAABJRU5ErkJggg==\");\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"); +/******/ +/******/ })() +; \ No newline at end of file diff --git a/django-rgd-3d/rgd_3d/templates/rgd_3d/_include/vtkjs_viewer.html b/django-rgd-3d/rgd_3d/templates/rgd_3d/_include/vtkjs_viewer.html index 59bb7a00f..81cf1a46b 100644 --- a/django-rgd-3d/rgd_3d/templates/rgd_3d/_include/vtkjs_viewer.html +++ b/django-rgd-3d/rgd_3d/templates/rgd_3d/_include/vtkjs_viewer.html @@ -1,20 +1,60 @@ {% block vtkjs_viewer %} + {% load static %} + <style> + .displayContent { + width: 100%; + height: 100%; + position: relative; + } - <script type="text/javascript" src="https://unpkg.com/@babel/[email protected]/dist/polyfill.js"></script> - <script type="text/javascript" src="https://unpkg.com/vtk.js"></script> + .progress { + color: black; + z-index: 100; + background: rgba(128,128,128,.5); + padding: 100px; + border-radius: 10px; + user-select: none; + width: 25%; + text-align: center; + margin: 20% auto; + position: relative; + } + </style> - <div id="vtkContainer"></div> + <div class="displayContent"> + <div id="vtkContainer"> + </div> + <div class="progress" id="progressContainer"> + <h1>Loading...</h1> + </div> + </div> + + <script src="{% static 'rgd_3d/vtkjs_viewer.js' %}"></script> <script type="text/javascript"> + const progressContainer = document.getElementById('progressContainer'); + progressContainer.innerHTML = 'Loading...'; + // console.log(vtk.Rendering.OpenGL.vtkRenderWindow.newInstance().getGLInformations()) const vtkContainer = document.getElementById("vtkContainer") - var fullScreenRenderer = vtk.Rendering.Misc.vtkFullScreenRenderWindow.newInstance({ - rootContainer: vtkContainer, - containerStyle: { height: "calc(100vh - 140px)", width: "75%", position: "absolute"} - }); - var renderWindow = fullScreenRenderer.getRenderWindow(); - var renderer = fullScreenRenderer.getRenderer(); + function load (container, url) { + emptyContainer(container); + + if (url) { + createViewer(container); + fetch(url) + .then((resp) => resp.json()) + .then(function(data) { + createPipeline(data.vtp_data) + progressContainer.style.display = 'none' + updateCamera(renderer.getActiveCamera()); + }); + } + + } + + </script> {% endblock %} diff --git a/django-rgd-3d/rgd_3d/templates/rgd_3d/pointcloudmeta_detail.html b/django-rgd-3d/rgd_3d/templates/rgd_3d/pointcloudmeta_detail.html index 85f407f04..6f0b5daf7 100644 --- a/django-rgd-3d/rgd_3d/templates/rgd_3d/pointcloudmeta_detail.html +++ b/django-rgd-3d/rgd_3d/templates/rgd_3d/pointcloudmeta_detail.html @@ -39,59 +39,10 @@ {% include 'rgd_3d/_include/vtkjs_viewer.html' %} - <style> - .progress { - color: black; - z-index: 100; - background: rgba(128,128,128,.5); - padding: 100px; - border-radius: 10px; - user-select: none; - width: 25%; - text-align: center; - margin: 20% auto; - position: relative; - } - </style> - - <div class="progress" id="progressContainer"> - <h1>Loading...</h1> - </div> - <script> - const reader = vtk.IO.XML.vtkXMLPolyDataReader.newInstance(); - - function loadBase64Content (contentToLoad) { - var buffer = vtk.Common.Core.vtkBase64.toArrayBuffer(contentToLoad); - reader.parseAsArrayBuffer(buffer); - return reader.getOutputData(0); - } - - const progressContainer = document.getElementById('progressContainer'); - progressContainer.innerHTML = 'Loading...'; - - fetch(`{% url 'point-cloud-entry-data' object.id %}`) - .then((resp) => resp.json()) - .then(function(data) { - const contentToLoad = data.vtp_data; - - const polydata = loadBase64Content(contentToLoad); - - var actor = vtk.Rendering.Core.vtkActor.newInstance(); - var mapper = vtk.Rendering.Core.vtkMapper.newInstance(); - - actor.setMapper(mapper); - mapper.setInputData(polydata); - renderer.addActor(actor); - renderer.resetCamera(); - renderWindow.render(); + load(vtkContainer, `{% url 'point-cloud-entry-data' object.id %}`) - progressContainer.style.display = 'none' - }) - .catch(function(error) { - console.log(`Error loading data: ${error}`) - }); </script> {% endblock %} diff --git a/django-rgd-3d/vtkjs_viewer/package-lock.json b/django-rgd-3d/vtkjs_viewer/package-lock.json new file mode 100644 index 000000000..9b9d310b1 --- /dev/null +++ b/django-rgd-3d/vtkjs_viewer/package-lock.json @@ -0,0 +1,19420 @@ +{ + "name": "vtkjs_viewer", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.14.5" + } + }, + "@babel/compat-data": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.7.tgz", + "integrity": "sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw==", + "dev": true + }, + "@babel/core": { + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", + "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.9", + "@babel/types": "^7.12.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.5.tgz", + "integrity": "sha512-y3rlP+/G25OIX3mYKKIOlQRcqj7YgrvHxOLbVmyLJ9bPmi5ttvUmpydVjcFjZphOktWuA7ovbx91ECloWTfjIA==", + "dev": true, + "requires": { + "@babel/types": "^7.14.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz", + "integrity": "sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA==", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz", + "integrity": "sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz", + "integrity": "sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "browserslist": "^4.16.6", + "semver": "^6.3.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.6.tgz", + "integrity": "sha512-Z6gsfGofTxH/+LQXqYEK45kxmcensbzmk/oi8DmaQytlQCgqNZt9XQF8iqlI/SeXWVjaMNxvYvzaYw+kh42mDg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-member-expression-to-functions": "^7.14.5", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5", + "@babel/helper-split-export-declaration": "^7.14.5" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz", + "integrity": "sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ==", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-function-name": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz", + "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.14.5", + "@babel/template": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz", + "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz", + "integrity": "sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.14.7.tgz", + "integrity": "sha512-TMUt4xKxJn6ccjcOW7c4hlwyJArizskAhoSTOCkA0uZ+KghIaci0Qg9R043kUMWI9mtQfgny+NQ5QATnZ+paaA==", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-module-imports": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz", + "integrity": "sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-module-transforms": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.5.tgz", + "integrity": "sha512-iXpX4KW8LVODuAieD7MzhNjmM6dzYY5tfRqT+R9HDXWl0jPn/djKmA+G9s/2C2T9zggw5tK1QNqZ70USfedOwA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5", + "@babel/helper-simple-access": "^7.14.5", + "@babel/helper-split-export-declaration": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.5", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz", + "integrity": "sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", + "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz", + "integrity": "sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-wrap-function": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-replace-supers": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.14.5.tgz", + "integrity": "sha512-3i1Qe9/8x/hCHINujn+iuHy+mMRLoc77b2nI9TB0zjH1hvn9qGlXjWlggdwUcju36PkPCy/lpM7LLUdcTyH4Ow==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.14.5", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/traverse": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-simple-access": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz", + "integrity": "sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw==", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz", + "integrity": "sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ==", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz", + "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz", + "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", + "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz", + "integrity": "sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.14.5", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/helpers": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.6.tgz", + "integrity": "sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA==", + "dev": true, + "requires": { + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.7.tgz", + "integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==", + "dev": true + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.7.tgz", + "integrity": "sha512-RK8Wj7lXLY3bqei69/cc25gwS5puEc3dknoFPFbqfy3XxYQBQFvu4ioWpafMBAB+L9NyptQK4nMOa5Xz16og8Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", + "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", + "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz", + "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", + "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz", + "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", + "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", + "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.7.tgz", + "integrity": "sha512-082hsZz+sVabfmDWo1Oct1u1AgbKbUAyVgmX4otIc7bdsRgHBXwTwb3DpDmD4Eyyx6DNiuz5UAATT655k+kL5g==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.14.7", + "@babel/helper-compilation-targets": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.14.5" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", + "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", + "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", + "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", + "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-flow": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.14.5.tgz", + "integrity": "sha512-9WK5ZwKCdWHxVuU13XNT6X73FGmutAXeor5lGFq6qhOFtMFUF4jkbijuyUdZZlpYq6E2hZeZf/u3959X9wsv0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-jsx": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz", + "integrity": "sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.14.5.tgz", + "integrity": "sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", + "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", + "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", + "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.5.tgz", + "integrity": "sha512-LBYm4ZocNgoCqyxMLoOnwpsmQ18HWTQvql64t3GvMUzLQrNoV1BDG0lNftC8QKYERkZgCCT/7J5xWGObGAyHDw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.5.tgz", + "integrity": "sha512-J4VxKAMykM06K/64z9rwiL6xnBHgB1+FVspqvlgCdwD1KUbQNfszeKVVOMh59w3sztHYIZDgnhOC4WbdEfHFDA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5", + "@babel/helper-split-export-declaration": "^7.14.5", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", + "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", + "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", + "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", + "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", + "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-flow-strip-types": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.14.5.tgz", + "integrity": "sha512-KhcolBKfXbvjwI3TV7r7TkYm8oNXHNBqGOy6JDVwtecFaRoKYsUUqJdS10q0YDKW1c6aZQgO+Ys3LfGkox8pXA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-flow": "^7.14.5" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz", + "integrity": "sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", + "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", + "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", + "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", + "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.5.tgz", + "integrity": "sha512-en8GfBtgnydoao2PS+87mKyw62k02k7kJ9ltbKe0fXTHrQmG6QZZflYuGI1VVG7sVpx4E1n7KBpNlPb8m78J+A==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-simple-access": "^7.14.5", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz", + "integrity": "sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.14.5", + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.5", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", + "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.7.tgz", + "integrity": "sha512-DTNOTaS7TkW97xsDMrp7nycUVh6sn/eq22VaxWfEdzuEbRsiaOU0pqU7DlyUGHVsbQbSghvjKRpEl+nUCKGQSg==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", + "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", + "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz", + "integrity": "sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", + "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-react-display-name": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.14.5.tgz", + "integrity": "sha512-07aqY1ChoPgIxsuDviptRpVkWCSbXWmzQqcgy65C6YSFOfPFvb/DX3bBRHh7pCd/PMEEYHYWUTSVkCbkVainYQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-react-jsx": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.5.tgz", + "integrity": "sha512-7RylxNeDnxc1OleDm0F5Q/BSL+whYRbOAR+bwgCxIr0L32v7UFh/pz1DLMZideAUxKT6eMoS2zQH6fyODLEi8Q==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-jsx": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/plugin-transform-react-jsx-development": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.14.5.tgz", + "integrity": "sha512-rdwG/9jC6QybWxVe2UVOa7q6cnTpw8JRRHOxntG/h6g/guAOe6AhtQHJuJh5FwmnXIT1bdm5vC2/5huV8ZOorQ==", + "dev": true, + "requires": { + "@babel/plugin-transform-react-jsx": "^7.14.5" + } + }, + "@babel/plugin-transform-react-jsx-self": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.14.5.tgz", + "integrity": "sha512-M/fmDX6n0cfHK/NLTcPmrfVAORKDhK8tyjDhyxlUjYyPYYO8FRWwuxBA3WBx8kWN/uBUuwGa3s/0+hQ9JIN3Tg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-react-jsx-source": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.14.5.tgz", + "integrity": "sha512-1TpSDnD9XR/rQ2tzunBVPThF5poaYT9GqP+of8fAtguYuI/dm2RkrMBDemsxtY0XBzvW7nXjYM0hRyKX9QYj7Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-react-pure-annotations": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.14.5.tgz", + "integrity": "sha512-3X4HpBJimNxW4rhUy/SONPyNQHp5YRr0HhJdT2OH1BRp0of7u3Dkirc7x9FRJMKMqTBI079VZ1hzv7Ouuz///g==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", + "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", + "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-runtime": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.1.tgz", + "integrity": "sha512-Ac/H6G9FEIkS2tXsZjL4RAdS3L3WHxci0usAnz7laPWUmFiGtj7tIASChqKZMHTSQTQY6xDbOq+V1/vIq3QrWg==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "resolve": "^1.8.1", + "semver": "^5.5.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", + "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", + "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", + "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", + "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", + "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-typescript": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.14.6.tgz", + "integrity": "sha512-XlTdBq7Awr4FYIzqhmYY80WN0V0azF74DMPyFqVHBvf81ZUgc4X7ZOpx6O8eLDK6iM5cCQzeyJw0ynTaefixRA==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.6", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-typescript": "^7.14.5" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", + "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", + "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/preset-env": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.7.tgz", + "integrity": "sha512-OnNdfAr1FUQg7ksb7bmbKoby4qFOHw6DKWWUNB9KqnnCldxhxJlP+21dpyaWFmf2h0rTbOkXJtAGevY3XW1eew==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.12.7", + "@babel/helper-compilation-targets": "^7.12.5", + "@babel/helper-module-imports": "^7.12.5", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-validator-option": "^7.12.1", + "@babel/plugin-proposal-async-generator-functions": "^7.12.1", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-dynamic-import": "^7.12.1", + "@babel/plugin-proposal-export-namespace-from": "^7.12.1", + "@babel/plugin-proposal-json-strings": "^7.12.1", + "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", + "@babel/plugin-proposal-numeric-separator": "^7.12.7", + "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.12.7", + "@babel/plugin-proposal-private-methods": "^7.12.1", + "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-class-properties": "^7.12.1", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.12.1", + "@babel/plugin-transform-arrow-functions": "^7.12.1", + "@babel/plugin-transform-async-to-generator": "^7.12.1", + "@babel/plugin-transform-block-scoped-functions": "^7.12.1", + "@babel/plugin-transform-block-scoping": "^7.12.1", + "@babel/plugin-transform-classes": "^7.12.1", + "@babel/plugin-transform-computed-properties": "^7.12.1", + "@babel/plugin-transform-destructuring": "^7.12.1", + "@babel/plugin-transform-dotall-regex": "^7.12.1", + "@babel/plugin-transform-duplicate-keys": "^7.12.1", + "@babel/plugin-transform-exponentiation-operator": "^7.12.1", + "@babel/plugin-transform-for-of": "^7.12.1", + "@babel/plugin-transform-function-name": "^7.12.1", + "@babel/plugin-transform-literals": "^7.12.1", + "@babel/plugin-transform-member-expression-literals": "^7.12.1", + "@babel/plugin-transform-modules-amd": "^7.12.1", + "@babel/plugin-transform-modules-commonjs": "^7.12.1", + "@babel/plugin-transform-modules-systemjs": "^7.12.1", + "@babel/plugin-transform-modules-umd": "^7.12.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", + "@babel/plugin-transform-new-target": "^7.12.1", + "@babel/plugin-transform-object-super": "^7.12.1", + "@babel/plugin-transform-parameters": "^7.12.1", + "@babel/plugin-transform-property-literals": "^7.12.1", + "@babel/plugin-transform-regenerator": "^7.12.1", + "@babel/plugin-transform-reserved-words": "^7.12.1", + "@babel/plugin-transform-shorthand-properties": "^7.12.1", + "@babel/plugin-transform-spread": "^7.12.1", + "@babel/plugin-transform-sticky-regex": "^7.12.7", + "@babel/plugin-transform-template-literals": "^7.12.1", + "@babel/plugin-transform-typeof-symbol": "^7.12.1", + "@babel/plugin-transform-unicode-escapes": "^7.12.1", + "@babel/plugin-transform-unicode-regex": "^7.12.1", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.12.7", + "core-js-compat": "^3.7.0", + "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@babel/preset-flow": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.12.1.tgz", + "integrity": "sha512-UAoyMdioAhM6H99qPoKvpHMzxmNVXno8GYU/7vZmGaHk6/KqfDYL1W0NxszVbJ2EP271b7e6Ox+Vk2A9QsB3Sw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-transform-flow-strip-types": "^7.12.1" + } + }, + "@babel/preset-modules": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/preset-react": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.12.7.tgz", + "integrity": "sha512-wKeTdnGUP5AEYCYQIMeXMMwU7j+2opxrG0WzuZfxuuW9nhKvvALBjl67653CWamZJVefuJGI219G591RSldrqQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-transform-react-display-name": "^7.12.1", + "@babel/plugin-transform-react-jsx": "^7.12.7", + "@babel/plugin-transform-react-jsx-development": "^7.12.7", + "@babel/plugin-transform-react-jsx-self": "^7.12.1", + "@babel/plugin-transform-react-jsx-source": "^7.12.1", + "@babel/plugin-transform-react-pure-annotations": "^7.12.1" + } + }, + "@babel/preset-typescript": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.12.7.tgz", + "integrity": "sha512-nOoIqIqBmHBSEgBXWR4Dv/XBehtIFcw9PqZw6rFYuKrzsZmOQm3PR5siLBnKZFEsDb03IegG8nSjU/iXXXYRmw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-validator-option": "^7.12.1", + "@babel/plugin-transform-typescript": "^7.12.1" + } + }, + "@babel/register": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.12.1.tgz", + "integrity": "sha512-XWcmseMIncOjoydKZnWvWi0/5CUCD+ZYKhRwgYlWOrA8fGZ/FjuLRpqtIhLOVD/fvR1b9DQHtZPn68VvhpYf+Q==", + "dev": true, + "requires": { + "find-cache-dir": "^2.0.0", + "lodash": "^4.17.19", + "make-dir": "^2.1.0", + "pirates": "^4.0.0", + "source-map-support": "^0.5.16" + } + }, + "@babel/runtime": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz", + "integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/runtime-corejs3": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.14.7.tgz", + "integrity": "sha512-Wvzcw4mBYbTagyBVZpAJWI06auSIj033T/yNE0Zn1xcup83MieCddZA7ls3kme17L4NOGBrQ09Q+nKB41RLWBA==", + "dev": true, + "requires": { + "core-js-pure": "^3.15.0", + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", + "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/parser": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/traverse": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.7.tgz", + "integrity": "sha512-9vDr5NzHu27wgwejuKL7kIOm4bwEtaPQ4Z6cpCmjSuaRqpH/7xc4qcGEscwMqlkwgcXl6MvqoAjZkQ24uSdIZQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.14.5", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-hoist-variables": "^7.14.5", + "@babel/helper-split-export-declaration": "^7.14.5", + "@babel/parser": "^7.14.7", + "@babel/types": "^7.14.5", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz", + "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.5", + "to-fast-properties": "^2.0.0" + } + }, + "@commitlint/execute-rule": { + "version": "12.1.4", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-12.1.4.tgz", + "integrity": "sha512-h2S1j8SXyNeABb27q2Ok2vD1WfxJiXvOttKuRA9Or7LN6OQoC/KtT3844CIhhWNteNMu/wE0gkTqGxDVAnJiHg==", + "dev": true, + "optional": true + }, + "@commitlint/load": { + "version": "12.1.4", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-12.1.4.tgz", + "integrity": "sha512-Keszi0IOjRzKfxT+qES/n+KZyLrxy79RQz8wWgssCboYjKEp+wC+fLCgbiMCYjI5k31CIzIOq/16J7Ycr0C0EA==", + "dev": true, + "optional": true, + "requires": { + "@commitlint/execute-rule": "^12.1.4", + "@commitlint/resolve-extends": "^12.1.4", + "@commitlint/types": "^12.1.4", + "chalk": "^4.0.0", + "cosmiconfig": "^7.0.0", + "lodash": "^4.17.19", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@commitlint/resolve-extends": { + "version": "12.1.4", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-12.1.4.tgz", + "integrity": "sha512-R9CoUtsXLd6KSCfsZly04grsH6JVnWFmVtWgWs1KdDpdV+G3TSs37tColMFqglpkx3dsWu8dsPD56+D9YnJfqg==", + "dev": true, + "optional": true, + "requires": { + "import-fresh": "^3.0.0", + "lodash": "^4.17.19", + "resolve-from": "^5.0.0", + "resolve-global": "^1.0.0" + } + }, + "@commitlint/types": { + "version": "12.1.4", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-12.1.4.tgz", + "integrity": "sha512-KRIjdnWNUx6ywz+SJvjmNCbQKcKP6KArhjZhY2l+CWKxak0d77SOjggkMwFTiSgLODOwmuLTbarR2ZfWPiPMlw==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@discoveryjs/json-ext": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz", + "integrity": "sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz", + "integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + } + } + }, + "@hapi/address": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", + "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==", + "dev": true + }, + "@hapi/formula": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-1.2.0.tgz", + "integrity": "sha512-UFbtbGPjstz0eWHb+ga/GM3Z9EzqKXFWIbSOFURU0A/Gku0Bky4bCk9/h//K2Xr3IrCfjFNhMm4jyZ5dbCewGA==", + "dev": true + }, + "@hapi/hoek": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", + "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==", + "dev": true + }, + "@hapi/joi": { + "version": "16.1.8", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.8.tgz", + "integrity": "sha512-wAsVvTPe+FwSrsAurNt5vkg3zo+TblvC5Bb1zMVK6SJzZqw9UrJnexxR+76cpePmtUZKHAPxcQ2Bf7oVHyahhg==", + "dev": true, + "requires": { + "@hapi/address": "^2.1.2", + "@hapi/formula": "^1.2.0", + "@hapi/hoek": "^8.2.4", + "@hapi/pinpoint": "^1.0.2", + "@hapi/topo": "^3.1.3" + } + }, + "@hapi/pinpoint": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-1.0.2.tgz", + "integrity": "sha512-dtXC/WkZBfC5vxscazuiJ6iq4j9oNx1SHknmIr8hofarpKUZKmlUVYVIhNVzIEgK5Wrc4GMHL5lZtt1uS2flmQ==", + "dev": true + }, + "@hapi/topo": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz", + "integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==", + "dev": true, + "requires": { + "@hapi/hoek": "^8.3.0" + } + }, + "@kitware/vtk.js": { + "version": "18.4.1", + "resolved": "https://registry.npmjs.org/@kitware/vtk.js/-/vtk.js-18.4.1.tgz", + "integrity": "sha512-cNgFy45Wdv92V1lEIbdkbCi2PwAGE0tDLqbXrfA7/YNxGLCeYFga018hmSldrhRYOJOQqTr6IX1W9ZDXj1JrdQ==", + "requires": { + "@babel/runtime": "7.13.10", + "blueimp-md5": "2.18.0", + "commander": "6.2.1", + "d3-scale": "3.2.4", + "gl-matrix": "3.3.0", + "jszip": "3.2.0", + "pako": "2.0.3", + "seedrandom": "3.0.5", + "shader-loader": "1.3.1", + "shelljs": "0.8.4", + "stream-browserify": "3.0.0", + "webworker-promise": "0.4.2", + "worker-loader": "3.0.8", + "xmlbuilder2": "2.4.1" + } + }, + "@most/multicast": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@most/multicast/-/multicast-1.3.0.tgz", + "integrity": "sha512-DWH8AShgp5bXn+auGzf5tzPxvpmEvQJd0CNsApOci1LDF4eAEcnw4HQOr2Jaa+L92NbDYFKBSXxll+i7r1ikvw==", + "dev": true, + "requires": { + "@most/prelude": "^1.4.0" + } + }, + "@most/prelude": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@most/prelude/-/prelude-1.8.0.tgz", + "integrity": "sha512-t1CcURpZzfmBA6fEWwqmCqeNzWAj1w2WqEmCk/2yXMe/p8Ut000wFmVKMy8A1Rl9VVxZEZ5nBHd/pU0dR4bv/w==", + "dev": true + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.7.tgz", + "integrity": "sha512-BTIhocbPBSrRmHxOAJFtR18oLhxTtAFDAvL8hY1S3iU8k+E60W/YFs4jrixGzQjMpF4qPXxIQHcjVD9dz1C2QA==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "dev": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "@octokit/auth-token": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", + "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==", + "dev": true, + "requires": { + "@octokit/types": "^6.0.3" + } + }, + "@octokit/core": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.5.1.tgz", + "integrity": "sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw==", + "dev": true, + "requires": { + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.6.0", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/endpoint": { + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", + "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "dev": true, + "requires": { + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "dependencies": { + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true + } + } + }, + "@octokit/graphql": { + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.4.tgz", + "integrity": "sha512-SWTdXsVheRmlotWNjKzPOb6Js6tjSqA2a8z9+glDJng0Aqjzti8MEWOtuT8ZSu6wHnci7LZNuarE87+WJBG4vg==", + "dev": true, + "requires": { + "@octokit/request": "^5.6.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/openapi-types": { + "version": "8.1.4", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-8.1.4.tgz", + "integrity": "sha512-NnGr4NNDqO5wjSDJo5nxrGtzZUwoT23YasqK2H4Pav/6vSgeVTxuqCL9Aeh+cWfTxDomj1M4Os5BrXFsvl7qiQ==", + "dev": true + }, + "@octokit/plugin-paginate-rest": { + "version": "2.13.6", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.13.6.tgz", + "integrity": "sha512-ai7TNKLi8tGkDvLM7fm0X1fbIP9u1nfXnN49ZAw2PgSoQou9yixKn5c3m0awuLacbuX2aXEvJpv1gKm3jboabg==", + "dev": true, + "requires": { + "@octokit/types": "^6.17.3" + } + }, + "@octokit/plugin-request-log": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", + "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", + "dev": true + }, + "@octokit/plugin-rest-endpoint-methods": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.3.7.tgz", + "integrity": "sha512-LAgTLOsJ86ig2wYSpcSx+UWt7aQYYsEZ/Tf/pksAVQWKNcGuTVCDl9OUiPhQ7DZelNozYVWTO9Iyjd/soe4tug==", + "dev": true, + "requires": { + "@octokit/types": "^6.17.4", + "deprecation": "^2.3.1" + } + }, + "@octokit/request": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.0.tgz", + "integrity": "sha512-4cPp/N+NqmaGQwbh3vUsYqokQIzt7VjsgTYVXiwpUP2pxd5YiZB2XuTedbb0SPtv9XS7nzAKjAuQxmY8/aZkiA==", + "dev": true, + "requires": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.1", + "universal-user-agent": "^6.0.0" + }, + "dependencies": { + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true + } + } + }, + "@octokit/request-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", + "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "dev": true, + "requires": { + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "@octokit/rest": { + "version": "18.6.6", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.6.6.tgz", + "integrity": "sha512-kCLvz8MSh+KToXySdqUp80caBom1ZQmsX3gbT3osfbJy6fD86QObUjzAOD3D3Awz3X7ng24+lB+imvSr5EnM7g==", + "dev": true, + "requires": { + "@octokit/core": "^3.5.0", + "@octokit/plugin-paginate-rest": "^2.6.2", + "@octokit/plugin-request-log": "^1.0.2", + "@octokit/plugin-rest-endpoint-methods": "5.3.7" + } + }, + "@octokit/types": { + "version": "6.17.4", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.17.4.tgz", + "integrity": "sha512-Ghk/JC4zC/1al1GwH6p8jVX6pLdypSWmbnx6h79C/yo3DeaDd6MsNsBFlHu22KbkFh+CdcAzFqdP7UdPaPPmmA==", + "dev": true, + "requires": { + "@octokit/openapi-types": "^8.1.4" + } + }, + "@oozcitak/dom": { + "version": "1.15.8", + "resolved": "https://registry.npmjs.org/@oozcitak/dom/-/dom-1.15.8.tgz", + "integrity": "sha512-MoOnLBNsF+ok0HjpAvxYxR4piUhRDCEWK0ot3upwOOHYudJd30j6M+LNcE8RKpwfnclAX9T66nXXzkytd29XSw==", + "requires": { + "@oozcitak/infra": "1.0.8", + "@oozcitak/url": "1.0.4", + "@oozcitak/util": "8.3.8" + } + }, + "@oozcitak/infra": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@oozcitak/infra/-/infra-1.0.8.tgz", + "integrity": "sha512-JRAUc9VR6IGHOL7OGF+yrvs0LO8SlqGnPAMqyzOuFZPSZSXI7Xf2O9+awQPSMXgIWGtgUf/dA6Hs6X6ySEaWTg==", + "requires": { + "@oozcitak/util": "8.3.8" + } + }, + "@oozcitak/url": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@oozcitak/url/-/url-1.0.4.tgz", + "integrity": "sha512-kDcD8y+y3FCSOvnBI6HJgl00viO/nGbQoCINmQ0h98OhnGITrWR3bOGfwYCthgcrV8AnTJz8MzslTQbC3SOAmw==", + "requires": { + "@oozcitak/infra": "1.0.8", + "@oozcitak/util": "8.3.8" + } + }, + "@oozcitak/util": { + "version": "8.3.8", + "resolved": "https://registry.npmjs.org/@oozcitak/util/-/util-8.3.8.tgz", + "integrity": "sha512-T8TbSnGsxo6TDBJx/Sgv/BlVJL3tshxZP7Aq5R1mSnM5OcHY2dQaxLMu2+E8u3gN0MLOzdjurqN4ZRVuzQycOQ==" + }, + "@rollup/plugin-babel": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.0.tgz", + "integrity": "sha512-9uIC8HZOnVLrLHxayq/PTzw+uS25E14KPUBh5ktF+18Mjo5yK0ToMMx6epY0uEgkjwJw0aBW4x2horYXh8juWw==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.10.4", + "@rollup/pluginutils": "^3.1.0" + } + }, + "@rollup/plugin-node-resolve": { + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz", + "integrity": "sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "builtin-modules": "^3.1.0", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + }, + "dependencies": { + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + } + } + }, + "@rollup/plugin-replace": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.4.2.tgz", + "integrity": "sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "magic-string": "^0.25.7" + } + }, + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "dependencies": { + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + } + } + }, + "@semantic-release/commit-analyzer": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-8.0.1.tgz", + "integrity": "sha512-5bJma/oB7B4MtwUkZC2Bf7O1MHfi4gWe4mA+MIQ3lsEV0b422Bvl1z5HRpplDnMLHH3EXMoRdEng6Ds5wUqA3A==", + "dev": true, + "requires": { + "conventional-changelog-angular": "^5.0.0", + "conventional-commits-filter": "^2.0.0", + "conventional-commits-parser": "^3.0.7", + "debug": "^4.0.0", + "import-from": "^3.0.0", + "lodash": "^4.17.4", + "micromatch": "^4.0.2" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "@semantic-release/error": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@semantic-release/error/-/error-2.2.0.tgz", + "integrity": "sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg==", + "dev": true + }, + "@semantic-release/github": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-7.2.3.tgz", + "integrity": "sha512-lWjIVDLal+EQBzy697ayUNN8MoBpp+jYIyW2luOdqn5XBH4d9bQGfTnjuLyzARZBHejqh932HVjiH/j4+R7VHw==", + "dev": true, + "requires": { + "@octokit/rest": "^18.0.0", + "@semantic-release/error": "^2.2.0", + "aggregate-error": "^3.0.0", + "bottleneck": "^2.18.1", + "debug": "^4.0.0", + "dir-glob": "^3.0.0", + "fs-extra": "^10.0.0", + "globby": "^11.0.0", + "http-proxy-agent": "^4.0.0", + "https-proxy-agent": "^5.0.0", + "issue-parser": "^6.0.0", + "lodash": "^4.17.4", + "mime": "^2.4.3", + "p-filter": "^2.0.0", + "p-retry": "^4.0.0", + "url-join": "^4.0.0" + }, + "dependencies": { + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "fs-extra": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "mime": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", + "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", + "dev": true + }, + "p-retry": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.0.tgz", + "integrity": "sha512-SAHbQEwg3X5DRNaLmWjT+DlGc93ba5i+aP3QLfVNDncQEQO4xjbYW4N/lcVTSuP0aJietGfx2t94dJLzfBMpXw==", + "dev": true, + "requires": { + "@types/retry": "^0.12.0", + "retry": "^0.13.1" + } + }, + "retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "dev": true + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + } + } + }, + "@semantic-release/npm": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-7.1.3.tgz", + "integrity": "sha512-x52kQ/jR09WjuWdaTEHgQCvZYMOTx68WnS+TZ4fya5ZAJw4oRtJETtrvUw10FdfM28d/keInQdc66R1Gw5+OEQ==", + "dev": true, + "requires": { + "@semantic-release/error": "^2.2.0", + "aggregate-error": "^3.0.0", + "execa": "^5.0.0", + "fs-extra": "^10.0.0", + "lodash": "^4.17.15", + "nerf-dart": "^1.0.0", + "normalize-url": "^6.0.0", + "npm": "^7.0.0", + "rc": "^1.2.8", + "read-pkg": "^5.0.0", + "registry-auth-token": "^4.0.0", + "semver": "^7.1.2", + "tempy": "^1.0.0" + }, + "dependencies": { + "fs-extra": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + } + } + }, + "@semantic-release/release-notes-generator": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/@semantic-release/release-notes-generator/-/release-notes-generator-9.0.3.tgz", + "integrity": "sha512-hMZyddr0u99OvM2SxVOIelHzly+PP3sYtJ8XOLHdMp8mrluN5/lpeTnIO27oeCYdupY/ndoGfvrqDjHqkSyhVg==", + "dev": true, + "requires": { + "conventional-changelog-angular": "^5.0.0", + "conventional-changelog-writer": "^4.0.0", + "conventional-commits-filter": "^2.0.0", + "conventional-commits-parser": "^3.0.0", + "debug": "^4.0.0", + "get-stream": "^6.0.0", + "import-from": "^3.0.0", + "into-stream": "^6.0.0", + "lodash": "^4.17.4", + "read-pkg-up": "^7.0.0" + }, + "dependencies": { + "into-stream": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz", + "integrity": "sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==", + "dev": true, + "requires": { + "from2": "^2.3.0", + "p-is-promise": "^3.0.0" + } + }, + "p-is-promise": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-3.0.0.tgz", + "integrity": "sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==", + "dev": true + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + } + } + } + }, + "@sindresorhus/is": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", + "dev": true + }, + "@surma/rollup-plugin-off-main-thread": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-1.4.2.tgz", + "integrity": "sha512-yBMPqmd1yEJo/280PAMkychuaALyQ9Lkb5q1ck3mjJrFuEobIfhnQ4J3mbvBoISmR3SWMWV+cGB/I0lCQee79A==", + "dev": true, + "requires": { + "ejs": "^2.6.1", + "magic-string": "^0.25.0" + } + }, + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true + }, + "@types/eslint": { + "version": "7.2.13", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.13.tgz", + "integrity": "sha512-LKmQCWAlnVHvvXq4oasNUMTJJb2GwSyTY8+1C7OH5ILR8mPLaljv1jxL1bXW3xB3jFbQxTKxJAvI8PyjB09aBg==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.0.tgz", + "integrity": "sha512-O/ql2+rrCUe2W2rs7wMR+GqPRcgB6UiqN5RhrR5xruFlY7l9YLMn0ZkDzjoHLeiFkR8MCQZVudUuuvQ2BLC9Qw==", + "dev": true, + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "@types/estree": { + "version": "0.0.48", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.48.tgz", + "integrity": "sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew==", + "dev": true + }, + "@types/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/html-minifier-terser": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz", + "integrity": "sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", + "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==" + }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, + "@types/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==", + "dev": true + }, + "@types/minimist": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", + "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", + "dev": true + }, + "@types/node": { + "version": "15.14.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.0.tgz", + "integrity": "sha512-um/+/ip3QZmwLfIkWZSNtQIJNVAqrJ92OkLMeuZrjZMTAJniI7fh8N8OICyDhAJ2mzgk/fmYFo72jRr5HyZ1EQ==" + }, + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "dev": true + }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "@types/q": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==", + "dev": true + }, + "@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", + "dev": true + }, + "@types/source-list-map": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", + "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==", + "dev": true + }, + "@types/tapable": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.7.tgz", + "integrity": "sha512-0VBprVqfgFD7Ehb2vd8Lh9TG3jP98gvr8rgehQqzztZNI7o8zS8Ad4jyZneKELphpuE212D8J70LnSNQSyO6bQ==", + "dev": true + }, + "@types/uglify-js": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.13.1.tgz", + "integrity": "sha512-O3MmRAk6ZuAKa9CHgg0Pr0+lUOqoMLpc9AS4R8ano2auvsg7IE8syF3Xh/NPr26TWklxYcqoEEFdzLLs1fV9PQ==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + } + }, + "@types/webpack": { + "version": "4.41.30", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.30.tgz", + "integrity": "sha512-GUHyY+pfuQ6haAfzu4S14F+R5iGRwN6b2FRNJY7U0NilmFAqbsOfK6j1HwuLBAqwRIT+pVdNDJGJ6e8rpp0KHA==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/tapable": "^1", + "@types/uglify-js": "*", + "@types/webpack-sources": "*", + "anymatch": "^3.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + } + } + }, + "@types/webpack-sources": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-2.1.1.tgz", + "integrity": "sha512-MjM1R6iuw8XaVbtkCBz0N349cyqBjJHCbQiOeppe3VBeFvxqs74RKHAVt9LkxTnUWc7YLZOEsUfPUnmK6SBPKQ==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/source-list-map": "*", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "@webassemblyjs/ast": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.0.tgz", + "integrity": "sha512-kX2W49LWsbthrmIRMbQZuQDhGtjyqXfEmmHyEi4XWnSZtPmxY0+3anPIzsnRb45VH/J55zlOfWvZuY47aJZTJg==", + "dev": true, + "requires": { + "@webassemblyjs/helper-numbers": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.0.tgz", + "integrity": "sha512-Q/aVYs/VnPDVYvsCBL/gSgwmfjeCb4LW8+TMrO3cSzJImgv8lxxEPM2JA5jMrivE7LSz3V+PFqtMbls3m1exDA==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.0.tgz", + "integrity": "sha512-baT/va95eXiXb2QflSx95QGT5ClzWpGaa8L7JnJbgzoYeaA27FCvuBXU758l+KXWRndEmUXjP0Q5fibhavIn8w==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.0.tgz", + "integrity": "sha512-u9HPBEl4DS+vA8qLQdEQ6N/eJQ7gT7aNvMIo8AAWvAl/xMrcOSiI2M0MAnMCy3jIFke7bEee/JwdX1nUpCtdyA==", + "dev": true + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.9.0" + }, + "dependencies": { + "@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", + "dev": true + }, + "@webassemblyjs/wast-printer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", + "@xtuc/long": "4.2.2" + } + } + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0" + }, + "dependencies": { + "@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", + "dev": true + } + } + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.0.tgz", + "integrity": "sha512-DhRQKelIj01s5IgdsOJMKLppI+4zpmcMQ3XboFPLwCpSNH6Hqo1ritgHgD0nqHeSYqofA6aBN/NmXuGjM1jEfQ==", + "dev": true, + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.0", + "@webassemblyjs/helper-api-error": "1.11.0", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.0.tgz", + "integrity": "sha512-MbmhvxXExm542tWREgSFnOVo07fDpsBJg3sIl6fSp9xuu75eGz5lz31q7wTLffwL3Za7XNRCMZy210+tnsUSEA==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.0.tgz", + "integrity": "sha512-3Eb88hcbfY/FCukrg6i3EH8H2UsD7x8Vy47iVJrP967A9JGqgBVL9aH71SETPx1JrGsOUVLo0c7vMCN22ytJew==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-buffer": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0", + "@webassemblyjs/wasm-gen": "1.11.0" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.0.tgz", + "integrity": "sha512-KXzOqpcYQwAfeQ6WbF6HXo+0udBNmw0iXDmEK5sFlmQdmND+tr773Ti8/5T/M6Tl/413ArSJErATd8In3B+WBA==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.0.tgz", + "integrity": "sha512-aqbsHa1mSQAbeeNcl38un6qVY++hh8OpCOzxhixSYgbRfNWcxJNJQwe2rezK9XEcssJbbWIkblaJRwGMS9zp+g==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.0.tgz", + "integrity": "sha512-A/lclGxH6SpSLSyFowMzO/+aDEPU4hvEiooCMXQPcQFPPJaYcPQNKGOCLUySJsYJ4trbpr+Fs08n4jelkVTGVw==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.0.tgz", + "integrity": "sha512-JHQ0damXy0G6J9ucyKVXO2j08JVJ2ntkdJlq1UTiUrIgfGMmA7Ik5VdC/L8hBK46kVJgujkBIoMtT8yVr+yVOQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-buffer": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0", + "@webassemblyjs/helper-wasm-section": "1.11.0", + "@webassemblyjs/wasm-gen": "1.11.0", + "@webassemblyjs/wasm-opt": "1.11.0", + "@webassemblyjs/wasm-parser": "1.11.0", + "@webassemblyjs/wast-printer": "1.11.0" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.0.tgz", + "integrity": "sha512-BEUv1aj0WptCZ9kIS30th5ILASUnAPEvE3tVMTrItnZRT9tXCLW2LEXT8ezLw59rqPP9klh9LPmpU+WmRQmCPQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0", + "@webassemblyjs/ieee754": "1.11.0", + "@webassemblyjs/leb128": "1.11.0", + "@webassemblyjs/utf8": "1.11.0" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.0.tgz", + "integrity": "sha512-tHUSP5F4ywyh3hZ0+fDQuWxKx3mJiPeFufg+9gwTpYp324mPCQgnuVKwzLTZVqj0duRDovnPaZqDwoyhIO8kYg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-buffer": "1.11.0", + "@webassemblyjs/wasm-gen": "1.11.0", + "@webassemblyjs/wasm-parser": "1.11.0" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.0.tgz", + "integrity": "sha512-6L285Sgu9gphrcpDXINvm0M9BskznnzJTE7gYkjDbxET28shDqp27wpruyx3C2S/dvEwiigBwLA1cz7lNUi0kw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-api-error": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0", + "@webassemblyjs/ieee754": "1.11.0", + "@webassemblyjs/leb128": "1.11.0", + "@webassemblyjs/utf8": "1.11.0" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/floating-point-hex-parser": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-code-frame": "1.9.0", + "@webassemblyjs/helper-fsm": "1.9.0", + "@xtuc/long": "4.2.2" + }, + "dependencies": { + "@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", + "dev": true + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", + "dev": true + } + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.0.tgz", + "integrity": "sha512-Fg5OX46pRdTgB7rKIUojkh9vXaVN6sGYCnEiJN1GYkb0RPwShZXp6KTDqmoMdQPKhcroOXh3fEzmkWmCYaKYhQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.0", + "@xtuc/long": "4.2.2" + } + }, + "@webpack-cli/configtest": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.4.tgz", + "integrity": "sha512-cs3XLy+UcxiP6bj0A6u7MLLuwdXJ1c3Dtc0RkKg+wiI1g/Ti1om8+/2hc2A2B60NbBNAbMgyBMHvyymWm/j4wQ==", + "dev": true + }, + "@webpack-cli/info": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.3.0.tgz", + "integrity": "sha512-ASiVB3t9LOKHs5DyVUcxpraBXDOKubYu/ihHhU+t1UPpxsivg6Od2E2qU4gJCekfEddzRBzHhzA/Acyw/mlK/w==", + "dev": true, + "requires": { + "envinfo": "^7.7.3" + } + }, + "@webpack-cli/serve": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.1.tgz", + "integrity": "sha512-4vSVUiOPJLmr45S8rMGy7WDvpWxfFxfP/Qx/cxZFCfvoypTYpPPL1X8VIZMe0WTA+Jr7blUxwUSEZNkjoMTgSw==", + "dev": true + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "acorn": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", + "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true + }, + "acorn-walk": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.1.tgz", + "integrity": "sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w==", + "dev": true + }, + "after": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", + "dev": true + }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "dev": true + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" + }, + "ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "dev": true + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-html": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "ansicolors": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", + "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "archive-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", + "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", + "dev": true, + "requires": { + "file-type": "^4.2.0" + }, + "dependencies": { + "file-type": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", + "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=", + "dev": true + } + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "argv-formatter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/argv-formatter/-/argv-formatter-1.0.0.tgz", + "integrity": "sha1-oMoMvCmltz6Dbuvhy/bF4OTrgvk=", + "dev": true + }, + "aria-query": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", + "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.10.2", + "@babel/runtime-corejs3": "^7.10.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true + }, + "array-find": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz", + "integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=", + "dev": true + }, + "array-flatten": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", + "dev": true + }, + "array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", + "dev": true + }, + "array-includes": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.5" + } + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "array.prototype.flat": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + } + }, + "array.prototype.flatmap": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.4.tgz", + "integrity": "sha512-r9Z0zYoxqHz60vvQbWEdXIEtCwHF0yxaWfno9qzXeNHvfyl3BZqygmGzb84dsubyaXLH4husF+NFgMSdpZhk2Q==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "function-bind": "^1.1.1" + } + }, + "arraybuffer.slice": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "ast-types-flow": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", + "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "autoprefixer": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.0.4.tgz", + "integrity": "sha512-hmjYejN/WTyPP9cdNmiwtwqM8/ACVJPD5ExtwoOceQohNbgnFNiwpL2+U4bXS8aXozBL00WvH6WhqbuHf0Fgfg==", + "dev": true, + "requires": { + "browserslist": "^4.14.7", + "caniuse-lite": "^1.0.30001161", + "colorette": "^1.2.1", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss-value-parser": "^4.1.0" + } + }, + "axe-core": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.2.3.tgz", + "integrity": "sha512-pXnVMfJKSIWU2Ml4JHP7pZEPIrgBO1Fd3WGx+fPBsS+KRGhE4vxooD8XBGWbQOIVSZsVK7pUDBBkCicNu80yzQ==", + "dev": true + }, + "axobject-query": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", + "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", + "dev": true + }, + "babel-eslint": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", + "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0", + "eslint-visitor-keys": "^1.0.0", + "resolve": "^1.12.0" + } + }, + "babel-loader": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz", + "integrity": "sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g==", + "dev": true, + "requires": { + "find-cache-dir": "^3.3.1", + "loader-utils": "^1.4.0", + "make-dir": "^3.1.0", + "schema-utils": "^2.6.5" + }, + "dependencies": { + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + } + } + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-arraybuffer": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", + "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "base64id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", + "dev": true + }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "before-after-hook": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", + "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==", + "dev": true + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "blob": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", + "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "blueimp-md5": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.18.0.tgz", + "integrity": "sha512-vE52okJvzsVWhcgUHOv+69OG3Mdg151xyn41aVQN/5W5S+S43qZhxECtYLAEHMSFWX6Mv5IZrzj3T5+JqXfj5Q==" + }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "dependencies": { + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "bonjour": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "dev": true, + "requires": { + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "bottleneck": { + "version": "2.19.5", + "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", + "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dev": true, + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + }, + "dependencies": { + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + } + } + }, + "browserslist": { + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", + "escalade": "^3.1.1", + "node-releases": "^1.1.71" + } + }, + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-indexof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "cacache": { + "version": "15.2.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.2.0.tgz", + "integrity": "sha512-uKoJSHmnrqXgthDFx/IU6ED/5xd+NNGe+Bb+kLZy7Ku4P+BaiWEUflAKPZ7eAzsYGcsAGASJZsybXp+quEcHTw==", + "dev": true, + "requires": { + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "cacheable-request": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", + "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "dev": true, + "requires": { + "clone-response": "1.0.2", + "get-stream": "3.0.0", + "http-cache-semantics": "3.8.1", + "keyv": "3.0.0", + "lowercase-keys": "1.0.0", + "normalize-url": "2.0.1", + "responselike": "1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + } + } + }, + "cachedir": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.2.0.tgz", + "integrity": "sha512-VvxA0xhNqIIfg0V9AmJkDg91DaJwryutH5rVEZAhcNi4iJFj9f+QxmAjgK1LT9I8OgToX27fypX6/MeCXVbBjQ==", + "dev": true + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camel-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", + "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", + "dev": true, + "requires": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "dev": true + } + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + } + }, + "caniuse-lite": { + "version": "1.0.30001241", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001241.tgz", + "integrity": "sha512-1uoSZ1Pq1VpH0WerIMqwptXHNNGfdl7d1cJUFs80CwQ/lVzdhTvsFZCeNFslze7AjsQnb4C85tzclPa1VShbeQ==", + "dev": true + }, + "cardinal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", + "integrity": "sha1-fMEFXYItISlU0HsIXeolHMe8VQU=", + "dev": true, + "requires": { + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" + } + }, + "caw": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", + "integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", + "dev": true, + "requires": { + "get-proxy": "^2.0.0", + "isurl": "^1.0.0-alpha5", + "tunnel-agent": "^0.6.0", + "url-to-options": "^1.0.1" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true + }, + "ci-job-number": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ci-job-number/-/ci-job-number-1.2.2.tgz", + "integrity": "sha512-CLOGsVDrVamzv8sXJGaILUVI6dsuAkouJP/n6t+OxLPeeA4DDby7zn9SB6EUpa1H7oIKoE+rMmkW80zYsFfUjA==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-css": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", + "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", + "dev": true, + "requires": { + "source-map": "~0.6.0" + } + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "clean-webpack-plugin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-3.0.0.tgz", + "integrity": "sha512-MciirUH5r+cYLGCOL5JX/ZLzOZbVr1ot3Fw+KcvbhUb6PM+yycqd9ZhIlcigQ5gl+XhppNmw3bEFuaaMNyLj3A==", + "dev": true, + "requires": { + "@types/webpack": "^4.4.31", + "del": "^4.1.1" + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-spinners": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.0.tgz", + "integrity": "sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q==", + "dev": true + }, + "cli-table": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.6.tgz", + "integrity": "sha512-ZkNZbnZjKERTY5NwC2SeMeLeifSPq/pubeRoTpdr3WchLlnZg6hEgvHkK5zL7KNFdd9PmHN8lxrENUwI3cE8vQ==", + "dev": true, + "requires": { + "colors": "1.0.3" + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "coa": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", + "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", + "dev": true, + "requires": { + "@types/q": "^1.5.1", + "chalk": "^2.4.1", + "q": "^1.1.2" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "command-line-usage": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.1.tgz", + "integrity": "sha512-F59pEuAR9o1SF/bD0dQBDluhpT4jJQNWUHEuVBqpDmCUo6gPjCi+m9fCWnWZVR/oG6cMTUms4h+3NPl74wGXvA==", + "dev": true, + "requires": { + "array-back": "^4.0.1", + "chalk": "^2.4.2", + "table-layout": "^1.0.1", + "typical": "^5.2.0" + } + }, + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" + }, + "commitizen": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/commitizen/-/commitizen-4.2.2.tgz", + "integrity": "sha512-uz+E6lGsDBDI2mYA4QfOxFeqdWUYwR1ky11YmLgg2BnEEP3YbeejpT4lxzGjkYqumnXr062qTOGavR9NtX/iwQ==", + "dev": true, + "requires": { + "cachedir": "2.2.0", + "cz-conventional-changelog": "3.3.0", + "dedent": "0.7.0", + "detect-indent": "6.0.0", + "find-node-modules": "2.0.0", + "find-root": "1.1.0", + "fs-extra": "8.1.0", + "glob": "7.1.4", + "inquirer": "6.5.2", + "is-utf8": "^0.2.1", + "lodash": "^4.17.20", + "minimist": "1.2.5", + "strip-bom": "4.0.0", + "strip-json-comments": "3.0.1" + }, + "dependencies": { + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "common-tags": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz", + "integrity": "sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "compare-func": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", + "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", + "dev": true, + "requires": { + "array-ify": "^1.0.0", + "dot-prop": "^5.1.0" + } + }, + "component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", + "dev": true + }, + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "requires": { + "mime-db": ">= 1.43.0 < 2" + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "confusing-browser-globals": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", + "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", + "dev": true + }, + "connect-history-api-fallback": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", + "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", + "dev": true + }, + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "conventional-changelog-angular": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz", + "integrity": "sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw==", + "dev": true, + "requires": { + "compare-func": "^2.0.0", + "q": "^1.5.1" + } + }, + "conventional-changelog-writer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.1.0.tgz", + "integrity": "sha512-WwKcUp7WyXYGQmkLsX4QmU42AZ1lqlvRW9mqoyiQzdD+rJWbTepdWoKJuwXTS+yq79XKnQNa93/roViPQrAQgw==", + "dev": true, + "requires": { + "compare-func": "^2.0.0", + "conventional-commits-filter": "^2.0.7", + "dateformat": "^3.0.0", + "handlebars": "^4.7.6", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "semver": "^6.0.0", + "split": "^1.0.0", + "through2": "^4.0.0" + } + }, + "conventional-commit-types": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-3.0.0.tgz", + "integrity": "sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==", + "dev": true + }, + "conventional-commits-filter": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", + "integrity": "sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==", + "dev": true, + "requires": { + "lodash.ismatch": "^4.4.0", + "modify-values": "^1.0.0" + } + }, + "conventional-commits-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.1.tgz", + "integrity": "sha512-OG9kQtmMZBJD/32NEw5IhN5+HnBqVjy03eC+I71I0oQRFA5rOgA4OtPOYG7mz1GkCfCNxn3gKIX8EiHJYuf1cA==", + "dev": true, + "requires": { + "JSONStream": "^1.0.4", + "is-text-path": "^1.0.1", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "split2": "^3.0.0", + "through2": "^4.0.0", + "trim-off-newlines": "^1.0.0" + } + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "copy-webpack-plugin": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-6.3.2.tgz", + "integrity": "sha512-MgJ1uouLIbDg4ST1GzqrGQyKoXY5iPqi6fghFqarijam7FQcBa/r6Rg0VkoIuzx75Xq8iAMghyOueMkWUQ5OaA==", + "dev": true, + "requires": { + "cacache": "^15.0.5", + "fast-glob": "^3.2.4", + "find-cache-dir": "^3.3.1", + "glob-parent": "^5.1.1", + "globby": "^11.0.1", + "loader-utils": "^2.0.0", + "normalize-path": "^3.0.0", + "p-limit": "^3.0.2", + "schema-utils": "^3.0.0", + "serialize-javascript": "^5.0.1", + "webpack-sources": "^1.4.3" + }, + "dependencies": { + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + } + } + }, + "core-js": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.0.tgz", + "integrity": "sha512-W2VYNB0nwQQE7tKS7HzXd7r2y/y2SVJl4ga6oH/dnaLFzM0o2lB2P3zCkWj5Wc/zyMYjtgd5Hmhk0ObkQFZOIA==", + "dev": true + }, + "core-js-compat": { + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.15.2.tgz", + "integrity": "sha512-Wp+BJVvwopjI+A1EFqm2dwUmWYXrvucmtIB2LgXn/Rb+gWPKYxtmb4GKHGKG/KGF1eK9jfjzT38DITbTOCX/SQ==", + "dev": true, + "requires": { + "browserslist": "^4.16.6", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, + "core-js-pure": { + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.15.2.tgz", + "integrity": "sha512-D42L7RYh1J2grW8ttxoY1+17Y4wXZeKe7uyplAI3FkNQyI5OgBIAjUfFiTPfL1rs0qLpxaabITNbjKl1Sp82tA==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cosmiconfig": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", + "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "create-symlink-webpack-plugin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/create-symlink-webpack-plugin/-/create-symlink-webpack-plugin-1.0.1.tgz", + "integrity": "sha512-8yVR41zT1KqzVFcmy0eDPfqkGKpY0efnxqrdU5gEboVFpi7OySAhcmJr/w9625jI0iIkrcGh+R1jINOrsb4myw==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true + }, + "css-loader": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-5.2.6.tgz", + "integrity": "sha512-0wyN5vXMQZu6BvjbrPdUJvkCzGEO24HC7IS7nW4llc6BBFC+zwR9CKtYGv63Puzsg10L/o12inMY5/2ByzfD6w==", + "dev": true, + "requires": { + "icss-utils": "^5.1.0", + "loader-utils": "^2.0.0", + "postcss": "^8.2.15", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.1.0", + "schema-utils": "^3.0.0", + "semver": "^7.3.5" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "postcss": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.5.tgz", + "integrity": "sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA==", + "dev": true, + "requires": { + "colorette": "^1.2.2", + "nanoid": "^3.1.23", + "source-map-js": "^0.6.2" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "css-select": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", + "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^5.0.0", + "domhandler": "^4.2.0", + "domutils": "^2.6.0", + "nth-check": "^2.0.0" + }, + "dependencies": { + "domhandler": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", + "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "dev": true, + "requires": { + "domelementtype": "^2.2.0" + } + } + } + }, + "css-select-base-adapter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", + "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", + "dev": true + }, + "css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, + "css-what": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", + "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", + "dev": true + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true + }, + "csso": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dev": true, + "requires": { + "css-tree": "^1.1.2" + } + }, + "cyclist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", + "dev": true + }, + "cz-conventional-changelog": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz", + "integrity": "sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==", + "dev": true, + "requires": { + "@commitlint/load": ">6.1.1", + "chalk": "^2.4.1", + "commitizen": "^4.0.3", + "conventional-commit-types": "^3.0.0", + "lodash.map": "^4.5.1", + "longest": "^2.0.1", + "word-wrap": "^1.0.3" + } + }, + "d3-array": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", + "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==", + "requires": { + "internmap": "^1.0.0" + } + }, + "d3-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-2.0.0.tgz", + "integrity": "sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ==" + }, + "d3-format": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-2.0.0.tgz", + "integrity": "sha512-Ab3S6XuE/Q+flY96HXT0jOXcM4EAClYFnRGY5zsjRGNy6qCYrQsMffs7cV5Q9xejb35zxW5hf/guKw34kvIKsA==" + }, + "d3-interpolate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-2.0.1.tgz", + "integrity": "sha512-c5UhwwTs/yybcmTpAVqwSFl6vrQ8JZJoT5F7xNFK9pymv5C0Ymcc9/LIJHtYIggg/yS9YHw8i8O8tgb9pupjeQ==", + "requires": { + "d3-color": "1 - 2" + } + }, + "d3-scale": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.4.tgz", + "integrity": "sha512-PG6gtpbPCFqKbvdBEswQcJcTzHC8VEd/XzezF5e68KlkT4/ggELw/nR1tv863jY6ufKTvDlzCMZvhe06codbbA==", + "requires": { + "d3-array": "^2.3.0", + "d3-format": "1 - 2", + "d3-interpolate": "1.2.0 - 2", + "d3-time": "1 - 2", + "d3-time-format": "2 - 3" + } + }, + "d3-time": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-2.1.1.tgz", + "integrity": "sha512-/eIQe/eR4kCQwq7yxi7z4c6qEXf2IYGcjoWB5OOQy4Tq9Uv39/947qlDcN2TLkiTzQWzvnsuYPB9TrWaNfipKQ==", + "requires": { + "d3-array": "2" + } + }, + "d3-time-format": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-3.0.0.tgz", + "integrity": "sha512-UXJh6EKsHBTjopVqZBhFysQcoXSv/5yLONZvkQ5Kk3qbwiUYkdX17Xa1PT6U1ZWXGGfB1ey5L8dKMlFq2DO0Ag==", + "requires": { + "d3-time": "1 - 2" + } + }, + "damerau-levenshtein": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.7.tgz", + "integrity": "sha512-VvdQIPGdWP0SqFXghj79Wf/5LArmreyMsGLa6FG6iC4t3j7j5s71TrwWmT/4akbDQIqjfACkLZmjXhA7g2oUZw==", + "dev": true + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "decompress": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "dev": true, + "requires": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "dev": true, + "requires": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + }, + "dependencies": { + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + } + } + }, + "decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "dev": true, + "requires": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "dependencies": { + "file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + } + } + }, + "decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "dev": true, + "requires": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + }, + "dependencies": { + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + } + } + }, + "decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "dev": true, + "requires": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "dependencies": { + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", + "dev": true + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "deepmerge": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.3.2.tgz", + "integrity": "sha1-FmNpFinU2/42T6EqKk8KqGqjoFA=", + "dev": true + }, + "default-gateway": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", + "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "ip-regex": "^2.1.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "del": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", + "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "globby": "^6.1.0", + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.3" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "dev": true + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "detect-indent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.0.0.tgz", + "integrity": "sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA==", + "dev": true + }, + "detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", + "dev": true + }, + "dns-packet": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.4.tgz", + "integrity": "sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==", + "dev": true, + "requires": { + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "dev": true, + "requires": { + "buffer-indexof": "^1.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dom-converter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", + "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", + "dev": true, + "requires": { + "utila": "~0.4" + } + }, + "dom-serializer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "dependencies": { + "domhandler": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", + "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "dev": true, + "requires": { + "domelementtype": "^2.2.0" + } + } + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true + }, + "domhandler": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.3.0.tgz", + "integrity": "sha512-J1C5rIANUbuYK+FuFL98650rihynUOEzRLxW+90bKZRWB6A1X1Tf82GxR1qAWLyfNPRvjqfip3Q5tdYlmAa9lA==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1" + } + }, + "domready": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/domready/-/domready-1.0.8.tgz", + "integrity": "sha1-kfJS5Ze2Wvd+dFriTdAYXV4m1Yw=", + "dev": true + }, + "domutils": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.7.0.tgz", + "integrity": "sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==", + "dev": true, + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "dependencies": { + "domhandler": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", + "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "dev": true, + "requires": { + "domelementtype": "^2.2.0" + } + } + } + }, + "dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "dev": true + } + } + }, + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "download": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/download/-/download-7.1.0.tgz", + "integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==", + "dev": true, + "requires": { + "archive-type": "^4.0.0", + "caw": "^2.0.1", + "content-disposition": "^0.5.2", + "decompress": "^4.2.0", + "ext-name": "^5.0.0", + "file-type": "^8.1.0", + "filenamify": "^2.0.0", + "get-stream": "^3.0.0", + "got": "^8.3.1", + "make-dir": "^1.2.0", + "p-event": "^2.1.0", + "pify": "^3.0.0" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "easy-stack": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/easy-stack/-/easy-stack-1.0.1.tgz", + "integrity": "sha512-wK2sCs4feiiJeFXn3zvY0p41mdU5VUgbgs1rNsc/y5ngFUijdWd+iIN8eoyuZHKB8xN6BL4PdWmzqFmxNg6V2w==", + "dev": true + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "ejs": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", + "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.765", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.765.tgz", + "integrity": "sha512-4NhcsfZYlr1x4FehYkK+R9CNNTOZ8vLcIu8Y1uWehxYp5r/jlCGAfBqChIubEfdtX+rBQpXx4yJuX/dzILH/nw==", + "dev": true + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "engine.io": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.5.0.tgz", + "integrity": "sha512-21HlvPUKaitDGE4GXNtQ7PLP0Sz4aWLddMPw2VTyFz1FVZqu/kZsJUO8WNpKuE/OCL7nkfRaOui2ZCJloGznGA==", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.4.1", + "debug": "~4.1.0", + "engine.io-parser": "~2.2.0", + "ws": "~7.4.2" + }, + "dependencies": { + "cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "dev": true + } + } + }, + "engine.io-client": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.2.tgz", + "integrity": "sha512-QEqIp+gJ/kMHeUun7f5Vv3bteRHppHH/FMBQX/esFj/fuYfjyUKWGMo3VCvIP/V8bE9KcjHmRZrhIz2Z9oNsDA==", + "dev": true, + "requires": { + "component-emitter": "~1.3.0", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.2.0", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "ws": "~7.4.2", + "xmlhttprequest-ssl": "~1.6.2", + "yeast": "0.1.2" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "dev": true + } + } + }, + "engine.io-parser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz", + "integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==", + "dev": true, + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.4", + "blob": "0.0.5", + "has-binary2": "~1.0.2" + } + }, + "enhanced-resolve": { + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", + "integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + }, + "dependencies": { + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + } + } + }, + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true + }, + "env-ci": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/env-ci/-/env-ci-5.0.2.tgz", + "integrity": "sha512-Xc41mKvjouTXD3Oy9AqySz1IeyvJvHZ20Twf5ZLYbNpPPIuCnL/qHCmNlD01LoNy0JTunw9HPYVptD19Ac7Mbw==", + "dev": true, + "requires": { + "execa": "^4.0.0", + "java-properties": "^1.0.0" + }, + "dependencies": { + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + } + } + }, + "envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "dev": true + }, + "errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", + "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.10.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + } + }, + "es-module-lexer": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.6.0.tgz", + "integrity": "sha512-f8kcHX1ArhllUtb/wVSyvygoKCznIjnxhLxy7TCvIiMdT7fL4ZDTIKaadMe6eLvOXg6Wk02UeoFgUoZ2EKZZUA==", + "dev": true + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.14.0.tgz", + "integrity": "sha512-5YubdnPXrlrYAFCKybPuHIAH++PINe1pmKNc5wQRB9HSbqIK1ywAnntE3Wwua4giKu0bjligf1gLF6qxMGOYRA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^0.2.1", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.0", + "esquery": "^1.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "eslint-config-airbnb": { + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz", + "integrity": "sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg==", + "dev": true, + "requires": { + "eslint-config-airbnb-base": "^14.2.1", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" + } + }, + "eslint-config-airbnb-base": { + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", + "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", + "dev": true, + "requires": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" + } + }, + "eslint-config-prettier": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz", + "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==", + "dev": true, + "requires": { + "get-stdin": "^6.0.0" + } + }, + "eslint-import-resolver-node": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", + "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.13.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "eslint-import-resolver-webpack": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.0.tgz", + "integrity": "sha512-hZWGcmjaJZK/WSCYGI/y4+FMGQZT+cwW/1E/P4rDwFj2PbanlQHISViw4ccDJ+2wxAqjgwBfxwy3seABbVKDEw==", + "dev": true, + "requires": { + "array-find": "^1.0.0", + "debug": "^2.6.9", + "enhanced-resolve": "^0.9.1", + "find-root": "^1.1.0", + "has": "^1.0.3", + "interpret": "^1.2.0", + "lodash": "^4.17.15", + "node-libs-browser": "^1.0.0 || ^2.0.0", + "resolve": "^1.13.1", + "semver": "^5.7.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "enhanced-resolve": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", + "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.2.0", + "tapable": "^0.1.8" + } + }, + "memory-fs": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", + "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "tapable": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", + "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", + "dev": true + } + } + }, + "eslint-loader": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-4.0.2.tgz", + "integrity": "sha512-EDpXor6lsjtTzZpLUn7KmXs02+nIjGcgees9BYjNkWra3jVq5vVa8IoCKgzT2M7dNNeoMBtaSG83Bd40N3poLw==", + "dev": true, + "requires": { + "find-cache-dir": "^3.3.1", + "fs-extra": "^8.1.0", + "loader-utils": "^2.0.0", + "object-hash": "^2.0.3", + "schema-utils": "^2.6.5" + }, + "dependencies": { + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + } + } + } + }, + "eslint-module-utils": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz", + "integrity": "sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A==", + "dev": true, + "requires": { + "debug": "^3.2.7", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + } + } + }, + "eslint-plugin-import": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", + "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", + "dev": true, + "requires": { + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.1", + "read-pkg-up": "^2.0.0", + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + } + } + }, + "eslint-plugin-jsx-a11y": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz", + "integrity": "sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.11.2", + "aria-query": "^4.2.2", + "array-includes": "^3.1.1", + "ast-types-flow": "^0.0.7", + "axe-core": "^4.0.2", + "axobject-query": "^2.2.0", + "damerau-levenshtein": "^1.0.6", + "emoji-regex": "^9.0.0", + "has": "^1.0.3", + "jsx-ast-utils": "^3.1.0", + "language-tags": "^1.0.5" + }, + "dependencies": { + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + } + } + }, + "eslint-plugin-prettier": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz", + "integrity": "sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-plugin-react": { + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.21.5.tgz", + "integrity": "sha512-8MaEggC2et0wSF6bUeywF7qQ46ER81irOdWS4QWxnnlAEsnzeBevk1sWh7fhpCghPpXb+8Ks7hvaft6L/xsR6g==", + "dev": true, + "requires": { + "array-includes": "^3.1.1", + "array.prototype.flatmap": "^1.2.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "object.entries": "^1.1.2", + "object.fromentries": "^2.0.2", + "object.values": "^1.1.1", + "prop-types": "^15.7.2", + "resolve": "^1.18.1", + "string.prototype.matchall": "^4.0.2" + }, + "dependencies": { + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + } + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "event-pubsub": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/event-pubsub/-/event-pubsub-4.3.0.tgz", + "integrity": "sha512-z7IyloorXvKbFx9Bpie2+vMJKKx1fH1EN5yiTfp8CiLOTptSYy1g8H4yDpGlEdshL1PBiFtBHepF2cNsqeEeFQ==", + "dev": true + }, + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true + }, + "eventsource": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.1.0.tgz", + "integrity": "sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg==", + "dev": true, + "requires": { + "original": "^1.0.0" + } + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "exports-loader": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exports-loader/-/exports-loader-1.1.1.tgz", + "integrity": "sha512-CmyhIR2sJ3KOfVsHjsR0Yvo+0lhRhRMAevCbB8dhTVLHsZPs0lCQTvRmR9YNvBXDBxUuhmCE2f54KqEjZUaFrg==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0", + "source-map": "^0.6.1" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + } + } + }, + "expose-loader": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/expose-loader/-/expose-loader-1.0.3.tgz", + "integrity": "sha512-gP6hs3vYeWIqyoVfsApGQcgCEpbcI1xe+celwI31zeDhXz2q03ycBC1+75IlQUGaYvj6rAloFIe/NIBnEElLsQ==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + } + } + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "dev": true, + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "ext-list": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", + "dev": true, + "requires": { + "mime-db": "^1.28.0" + } + }, + "ext-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", + "dev": true, + "requires": { + "ext-list": "^2.0.0", + "sort-keys-length": "^1.0.0" + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "fast-glob": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.6.tgz", + "integrity": "sha512-GnLuqj/pvQ7pX8/L4J84nijv6sAnlwvSDpMkJi9i7nPmPxGtRPkBSStfvDW5l6nMdX9VWe+pkKWFTgD+vF2QSQ==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", + "dev": true + }, + "fastest-levenshtein": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", + "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", + "dev": true + }, + "fastq": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", + "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "figgy-pudding": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "file-loader": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", + "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + } + } + }, + "file-type": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz", + "integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==", + "dev": true + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, + "filename-reserved-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", + "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", + "dev": true + }, + "filenamify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz", + "integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==", + "dev": true, + "requires": { + "filename-reserved-regex": "^2.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" + } + }, + "filesize": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.4.0.tgz", + "integrity": "sha512-mjFIpOHC4jbfcTfoh4rkWpI31mF7viw9ikj/JyLoKzqlwG/YsefKfvYlYhdYdg/9mtK2z1AzgN/0LvVQ3zdlSQ==", + "dev": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + } + } + }, + "find-node-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-node-modules/-/find-node-modules-2.0.0.tgz", + "integrity": "sha512-8MWIBRgJi/WpjjfVXumjPKCtmQ10B+fjx6zmSA+770GMJirLhWIzg8l763rhjl9xaeaHbnxPNRQKq2mgMhr+aw==", + "dev": true, + "requires": { + "findup-sync": "^3.0.0", + "merge": "^1.2.1" + } + }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "find-versions": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", + "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", + "dev": true, + "requires": { + "semver-regex": "^2.0.0" + } + }, + "findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "follow-redirects": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz", + "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "formidable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz", + "integrity": "sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q==", + "dev": true + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true + }, + "fp-ts": { + "version": "2.10.5", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.10.5.tgz", + "integrity": "sha512-X2KfTIV0cxIk3d7/2Pvp/pxL/xr2MV1WooyEzKtTWYSc1+52VF4YzjBTXqeOlSiZsPCxIBpDGfT9Dyo7WEY0DQ==", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-own-enumerable-property-symbols": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", + "dev": true + }, + "get-proxy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", + "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", + "dev": true, + "requires": { + "npm-conf": "^1.1.0" + } + }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "git-log-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/git-log-parser/-/git-log-parser-1.2.0.tgz", + "integrity": "sha1-LmpMGxP8AAKCB7p5WnrDFme5/Uo=", + "dev": true, + "requires": { + "argv-formatter": "~1.0.0", + "spawn-error-forwarder": "~1.0.0", + "split2": "~1.0.0", + "stream-combiner2": "~1.1.1", + "through2": "~2.0.0", + "traverse": "~0.6.6" + }, + "dependencies": { + "split2": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-1.0.0.tgz", + "integrity": "sha1-UuLiIdiMdfmnP5BVbiY/+WdysxQ=", + "dev": true, + "requires": { + "through2": "~2.0.0" + } + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "gl-matrix": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.3.0.tgz", + "integrity": "sha512-COb7LDz+SXaHtl/h4LeaFcNdJdAQSDeVqjiIihSXNrkWObZLhDI4hIkZC11Aeqp7bcE72clzB0BnDXr2SmslRA==" + }, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "dev": true, + "optional": true, + "requires": { + "ini": "^1.3.4" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "dependencies": { + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "globalthis": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.2.tgz", + "integrity": "sha512-ZQnSFO1la8P7auIOQECnm0sSuoMeaSq0EEdXMBFF2QJO4uNcwbyhSgG3MruWNbFTqCLmxVwGOl7LZ9kASvHdeQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "got": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", + "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.4.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true + }, + "gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "dev": true, + "requires": { + "duplexer": "^0.1.2" + } + }, + "handle-thing": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", + "dev": true + }, + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + } + }, + "hanson": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hanson/-/hanson-1.2.0.tgz", + "integrity": "sha1-LRmNXKA+vM3K63ydnEkuGEBb4AI=", + "dev": true + }, + "hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, + "has-binary2": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", + "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", + "dev": true, + "requires": { + "isarray": "2.0.1" + }, + "dependencies": { + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + } + } + }, + "has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hook-std": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hook-std/-/hook-std-2.0.0.tgz", + "integrity": "sha512-zZ6T5WcuBMIUVh49iPQS9t977t7C0l7OtHrpeMb5uk48JdflRX0NSFvCekfYNmGQETnLq9W/isMyHl69kxGi8g==", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "hson-loader": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hson-loader/-/hson-loader-2.0.0.tgz", + "integrity": "sha1-CKVAj5A67HXr9qJUATcFJXZ2pPk=", + "dev": true, + "requires": { + "hanson": "^1.2.0" + } + }, + "html-entities": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", + "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", + "dev": true + }, + "html-loader": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/html-loader/-/html-loader-1.3.2.tgz", + "integrity": "sha512-DEkUwSd0sijK5PF3kRWspYi56XP7bTNkyg5YWSzBdjaSDmvCufep5c4Vpb3PBf6lUL0YPtLwBfy9fL0t5hBAGA==", + "dev": true, + "requires": { + "html-minifier-terser": "^5.1.1", + "htmlparser2": "^4.1.0", + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + } + } + }, + "html-minifier": { + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", + "integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==", + "dev": true, + "requires": { + "camel-case": "3.0.x", + "clean-css": "4.2.x", + "commander": "2.17.x", + "he": "1.2.x", + "param-case": "2.1.x", + "relateurl": "0.2.x", + "uglify-js": "3.4.x" + }, + "dependencies": { + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "requires": { + "lower-case": "^1.1.1" + } + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "uglify-js": { + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", + "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", + "dev": true, + "requires": { + "commander": "~2.19.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + } + } + } + } + }, + "html-minifier-terser": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz", + "integrity": "sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==", + "dev": true, + "requires": { + "camel-case": "^4.1.1", + "clean-css": "^4.2.3", + "commander": "^4.1.1", + "he": "^1.2.0", + "param-case": "^3.0.3", + "relateurl": "^0.2.7", + "terser": "^4.6.3" + }, + "dependencies": { + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true + }, + "terser": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + } + } + }, + "htmlparser2": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz", + "integrity": "sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^3.0.0", + "domutils": "^2.0.0", + "entities": "^2.0.0" + } + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "dev": true + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", + "dev": true + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "http-parser-js": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz", + "integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==", + "dev": true + }, + "http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dev": true, + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + } + }, + "http-proxy-middleware": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", + "dev": true, + "requires": { + "http-proxy": "^1.17.0", + "is-glob": "^4.0.0", + "lodash": "^4.17.11", + "micromatch": "^3.1.10" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + }, + "ignore-loader": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ignore-loader/-/ignore-loader-0.1.2.tgz", + "integrity": "sha1-2B8kA3bQuk8Nd4lyw60lh0EXpGM=", + "dev": true + }, + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", + "dev": true + }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } + }, + "import-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz", + "integrity": "sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, + "import-local": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "inline-source": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/inline-source/-/inline-source-7.2.0.tgz", + "integrity": "sha512-+LXP9bhABdaxWky6r6MRuxHa93zgmdQcmYKSbWQ9yIWfEg6ebP4QCWnMebcc0EnGPAvBYWyDF7QwoKG82/0I2g==", + "dev": true, + "requires": { + "csso": "^4.0.2", + "htmlparser2": "^4.0.0", + "superagent": "^5.1.0", + "svgo": "^1.3.0", + "terser": "^4.1.0" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "terser": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + } + } + } + }, + "inline-source-cli": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/inline-source-cli/-/inline-source-cli-2.0.0.tgz", + "integrity": "sha512-Z/rhiN73qcyGgnyfNAsYxbwGDz+PnAqdsJALgA9Ha9PlRatDpWBKFwVJstqi3IfBkVhV42Sr8FBj8u3GyqInbQ==", + "dev": true, + "requires": { + "inline-source": "^7.1.0", + "yargs": "^14.2.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "yargs": { + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", + "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^15.0.1" + } + }, + "yargs-parser": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.3.tgz", + "integrity": "sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + } + } + }, + "inspectpack": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/inspectpack/-/inspectpack-4.7.1.tgz", + "integrity": "sha512-XoDJbKSM9I2KA+8+OLFJHm8m4NM2pMEgsDD2hze6swVfynEed9ngCx36mRR+otzOsskwnxIZWXjI23FTW1uHqA==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "fp-ts": "^2.6.1", + "io-ts": "^2.2.13", + "io-ts-reporters": "^1.2.2", + "pify": "^5.0.0", + "semver-compare": "^1.0.0", + "yargs": "^16.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "pify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", + "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", + "dev": true + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true + } + } + }, + "internal-ip": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", + "integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==", + "dev": true, + "requires": { + "default-gateway": "^4.2.0", + "ipaddr.js": "^1.9.0" + } + }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "internmap": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", + "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "into-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", + "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "dev": true, + "requires": { + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" + } + }, + "io-ts": { + "version": "2.2.16", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-2.2.16.tgz", + "integrity": "sha512-y5TTSa6VP6le0hhmIyN0dqEXkrZeJLeC5KApJq6VLci3UEKF80lZ+KuoUs02RhBxNWlrqSNxzfI7otLX1Euv8Q==", + "dev": true + }, + "io-ts-reporters": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/io-ts-reporters/-/io-ts-reporters-1.2.2.tgz", + "integrity": "sha512-igASwWWkDY757OutNcM6zTtdJf/eTZYkoe2ymsX2qpm5bKZLo74FJYjsCtMQOEdY7dRHLLEulCyFQwdN69GBCg==", + "dev": true + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true + }, + "is-absolute-url": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arguments": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-bigint": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", + "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-boolean-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", + "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "dev": true + }, + "is-core-module": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", + "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "requires": { + "has": "^1.0.3" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", + "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", + "dev": true + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-number-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", + "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", + "dev": true + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + }, + "is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", + "dev": true + }, + "is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "dev": true + }, + "is-path-in-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", + "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", + "dev": true, + "requires": { + "is-path-inside": "^2.1.0" + } + }, + "is-path-inside": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", + "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", + "dev": true, + "requires": { + "path-is-inside": "^1.0.2" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-regex": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", + "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.2" + } + }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", + "dev": true + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", + "dev": true + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "is-string": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", + "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==", + "dev": true + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "dev": true, + "requires": { + "text-extensions": "^1.0.0" + } + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "issue-parser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/issue-parser/-/issue-parser-6.0.0.tgz", + "integrity": "sha512-zKa/Dxq2lGsBIXQ7CUZWTHfvxPC2ej0KfO7fIPqLlHB9J2hJ7rGhZ5rilhuufylr4RXYPzJUeFjKxz305OsNlA==", + "dev": true, + "requires": { + "lodash.capitalize": "^4.2.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.uniqby": "^4.7.0" + } + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "java-properties": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/java-properties/-/java-properties-1.0.2.tgz", + "integrity": "sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ==", + "dev": true + }, + "jest-worker": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.6.tgz", + "integrity": "sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "js-base64": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", + "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==", + "dev": true + }, + "js-message": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/js-message/-/js-message-1.0.7.tgz", + "integrity": "sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA==", + "dev": true + }, + "js-queue": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/js-queue/-/js-queue-2.0.2.tgz", + "integrity": "sha512-pbKLsbCfi7kriM3s1J4DDCo7jQkI58zPLHi0heXPzPlj0hjUsm+FesPUbE0DSbIVIK503A36aUBoCN7eMFedkA==", + "dev": true, + "requires": { + "easy-stack": "^1.0.1" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" + } + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json3": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", + "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "jsx-ast-utils": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.0.tgz", + "integrity": "sha512-EIsmt3O3ljsU6sot/J4E1zDRxfBNrhjyf/OKjlydwgEimQuznlM4Wv7U+ueONJMyEn1WRE0K8dhi3dVAXYT24Q==", + "dev": true, + "requires": { + "array-includes": "^3.1.2", + "object.assign": "^4.1.2" + } + }, + "jszip": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.2.0.tgz", + "integrity": "sha512-4WjbsaEtBK/DHeDZOPiPw5nzSGLDEDDreFRDEgnoMwmknPjTqa+23XuYFk6NiGbeiAeZCctiQ/X/z0lQBmDVOQ==", + "requires": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "set-immediate-shim": "~1.0.1" + }, + "dependencies": { + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + } + } + }, + "keyv": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, + "killable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", + "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "klona": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz", + "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==", + "dev": true + }, + "kw-web-suite": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/kw-web-suite/-/kw-web-suite-11.1.0.tgz", + "integrity": "sha512-gaJd8bC6uGN4aUyFpvi4sKLBEu6MLG1t1QM5igALdUXME+OtctFIjglKFmU/ASKyvcaTEwCpL/K72rzHwgoEKQ==", + "dev": true, + "requires": { + "@babel/core": "7.12.9", + "@babel/plugin-transform-runtime": "7.12.1", + "@babel/preset-env": "7.12.7", + "@babel/preset-flow": "7.12.1", + "@babel/preset-react": "7.12.7", + "@babel/preset-typescript": "7.12.7", + "@babel/register": "7.12.1", + "@babel/runtime": "7.12.5", + "autoprefixer": "10.0.4", + "babel-eslint": "10.1.0", + "babel-loader": "8.2.2", + "clean-webpack-plugin": "3.0.0", + "commitizen": "4.2.2", + "copy-webpack-plugin": "6.3.2", + "core-js": "3.8.0", + "create-symlink-webpack-plugin": "1.0.1", + "css-loader": "5.0.1", + "cz-conventional-changelog": "3.3.0", + "eslint": "7.14.0", + "eslint-config-airbnb": "18.2.1", + "eslint-config-prettier": "6.15.0", + "eslint-import-resolver-webpack": "0.13.0", + "eslint-loader": "4.0.2", + "eslint-plugin-import": "2.22.1", + "eslint-plugin-jsx-a11y": "6.4.1", + "eslint-plugin-prettier": "3.1.4", + "eslint-plugin-react": "7.21.5", + "exports-loader": "1.1.1", + "expose-loader": "1.0.3", + "file-loader": "6.2.0", + "hson-loader": "2.0.0", + "html-loader": "1.3.2", + "html-webpack-plugin": "4.5.0", + "ignore-loader": "0.1.2", + "inline-source-cli": "2.0.0", + "normalize.css": "8.0.1", + "parallel-webpack": "2.6.0", + "postcss": "8.1.10", + "postcss-loader": "4.1.0", + "prettier": "2.2.1", + "raw-loader": "4.0.2", + "regenerator-runtime": "0.13.7", + "regexp-replace-loader": "1.0.1", + "save-remote-file-webpack-plugin": "1.0.2", + "semantic-release": "17.3.0", + "shader-loader": "1.3.1", + "shelljs": "0.8.4", + "shx": "0.3.3", + "size-limit": "4.9.0", + "string-replace-loader": "3.0.1", + "style-loader": "2.0.0", + "svg-sprite-loader": "5.0.0", + "symlink-webpack-plugin": "1.0.0", + "terser-webpack-plugin": "5.0.3", + "uglifyjs-webpack-plugin": "2.2.0", + "url-loader": "4.1.1", + "webpack": "5.9.0", + "webpack-bundle-analyzer": "4.2.0", + "webpack-cli": "4.2.0", + "webpack-dashboard": "3.2.1", + "webpack-dev-server": "3.11.0", + "webpack-manifest-plugin": "2.2.0", + "webpack-merge": "5.4.0", + "webpack-notifier": "1.11.0", + "workbox-webpack-plugin": "6.0.0", + "worker-loader": "3.0.5", + "write-file-webpack-plugin": "4.5.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", + "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@types/estree": { + "version": "0.0.45", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.45.tgz", + "integrity": "sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" + } + }, + "@webassemblyjs/helper-api-error": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", + "dev": true + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/helper-wasm-section": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-opt": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + }, + "css-loader": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-5.0.1.tgz", + "integrity": "sha512-cXc2ti9V234cq7rJzFKhirb2L2iPy8ZjALeVJAozXYz9te3r4eqLSixNAbMDJSgJEQywqXzs8gonxaboeKqwiw==", + "dev": true, + "requires": { + "camelcase": "^6.2.0", + "cssesc": "^3.0.0", + "icss-utils": "^5.0.0", + "loader-utils": "^2.0.0", + "postcss": "^8.1.4", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.1.0", + "schema-utils": "^3.0.0", + "semver": "^7.3.2" + } + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "html-webpack-plugin": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.5.0.tgz", + "integrity": "sha512-MouoXEYSjTzCrjIxWwg8gxL5fE2X2WZJLmBYXlaJhQUH5K/b5OrqmV7T4dB7iu0xkmJ6JlUuV6fFVtnqbPopZw==", + "dev": true, + "requires": { + "@types/html-minifier-terser": "^5.0.0", + "@types/tapable": "^1.0.5", + "@types/webpack": "^4.41.8", + "html-minifier-terser": "^5.0.1", + "loader-utils": "^1.2.3", + "lodash": "^4.17.15", + "pretty-error": "^2.1.1", + "tapable": "^1.1.3", + "util.promisify": "1.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + }, + "tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true + } + } + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, + "interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "dev": true + }, + "jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + } + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + }, + "dependencies": { + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + } + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "rechoir": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz", + "integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==", + "dev": true, + "requires": { + "resolve": "^1.9.0" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "sockjs": { + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.20.tgz", + "integrity": "sha512-SpmVOVpdq0DJc0qArhF3E5xsxvaiqGNb73XfgBpK1y3UD5gs8DSo8aCTsuT5pX8rssdc2NDIzANwP9eCAiSdTA==", + "dev": true, + "requires": { + "faye-websocket": "^0.10.0", + "uuid": "^3.4.0", + "websocket-driver": "0.6.5" + } + }, + "sockjs-client": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.4.0.tgz", + "integrity": "sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g==", + "dev": true, + "requires": { + "debug": "^3.2.5", + "eventsource": "^1.0.7", + "faye-websocket": "~0.11.1", + "inherits": "^2.0.3", + "json3": "^3.3.2", + "url-parse": "^1.4.3" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + } + } + }, + "style-loader": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-2.0.0.tgz", + "integrity": "sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "terser-webpack-plugin": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.0.3.tgz", + "integrity": "sha512-zFdGk8Lh9ZJGPxxPE6jwysOlATWB8GMW8HcfGULWA/nPal+3VdATflQvSBSLQJRCmYZnfFJl6vkRTiwJGNgPiQ==", + "dev": true, + "requires": { + "jest-worker": "^26.6.1", + "p-limit": "^3.0.2", + "schema-utils": "^3.0.0", + "serialize-javascript": "^5.0.1", + "source-map": "^0.6.1", + "terser": "^5.3.8" + } + }, + "webpack": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.9.0.tgz", + "integrity": "sha512-YnnqIV/uAS5ZrNpctSv378qV7HmbJ74DL+XfvMxzbX1bV9e7eeT6eEWU4wuUw33CNr/HspBh7R/xQlVjTEyAeA==", + "dev": true, + "requires": { + "@types/eslint-scope": "^3.7.0", + "@types/estree": "^0.0.45", + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "acorn": "^8.0.4", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.3.1", + "eslint-scope": "^5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.4", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^4.1.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "pkg-dir": "^4.2.0", + "schema-utils": "^3.0.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.0.3", + "watchpack": "^2.0.0", + "webpack-sources": "^2.1.1" + } + }, + "webpack-cli": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.2.0.tgz", + "integrity": "sha512-EIl3k88vaF4fSxWSgtAQR+VwicfLMTZ9amQtqS4o+TDPW9HGaEpbFBbAZ4A3ZOT5SOnMxNOzROsSTPiE8tBJPA==", + "dev": true, + "requires": { + "@webpack-cli/info": "^1.1.0", + "@webpack-cli/serve": "^1.1.0", + "colorette": "^1.2.1", + "command-line-usage": "^6.1.0", + "commander": "^6.2.0", + "enquirer": "^2.3.6", + "execa": "^4.1.0", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "leven": "^3.1.0", + "rechoir": "^0.7.0", + "v8-compile-cache": "^2.2.0", + "webpack-merge": "^4.2.2" + }, + "dependencies": { + "webpack-merge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz", + "integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==", + "dev": true, + "requires": { + "lodash": "^4.17.15" + } + } + } + }, + "webpack-dev-server": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz", + "integrity": "sha512-PUxZ+oSTxogFQgkTtFndEtJIPNmml7ExwufBZ9L2/Xyyd5PnOL5UreWe5ZT7IU25DSdykL9p1MLQzmLh2ljSeg==", + "dev": true, + "requires": { + "ansi-html": "0.0.7", + "bonjour": "^3.5.0", + "chokidar": "^2.1.8", + "compression": "^1.7.4", + "connect-history-api-fallback": "^1.6.0", + "debug": "^4.1.1", + "del": "^4.1.1", + "express": "^4.17.1", + "html-entities": "^1.3.1", + "http-proxy-middleware": "0.19.1", + "import-local": "^2.0.0", + "internal-ip": "^4.3.0", + "ip": "^1.1.5", + "is-absolute-url": "^3.0.3", + "killable": "^1.0.1", + "loglevel": "^1.6.8", + "opn": "^5.5.0", + "p-retry": "^3.0.1", + "portfinder": "^1.0.26", + "schema-utils": "^1.0.0", + "selfsigned": "^1.10.7", + "semver": "^6.3.0", + "serve-index": "^1.9.1", + "sockjs": "0.3.20", + "sockjs-client": "1.4.0", + "spdy": "^4.0.2", + "strip-ansi": "^3.0.1", + "supports-color": "^6.1.0", + "url": "^0.11.0", + "webpack-dev-middleware": "^3.7.2", + "webpack-log": "^2.0.0", + "ws": "^6.2.1", + "yargs": "^13.3.2" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "webpack-merge": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.4.0.tgz", + "integrity": "sha512-/scBgu8LVPlHDgqH95Aw1xS+L+PHrpHKOwYVGFaNOQl4Q4wwwWDarwB1WdZAbLQ24SKhY3Awe7VZGYAdp+N+gQ==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + } + }, + "websocket-driver": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", + "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", + "dev": true, + "requires": { + "websocket-extensions": ">=0.1.1" + } + }, + "worker-loader": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-3.0.5.tgz", + "integrity": "sha512-cOh4UqTtvT8eHpyuuTK2C66Fg/G5Pb7g11bwtKm7uyD0vj2hCGY1APlSzVD75V9ciYZt44VPbFPiSFTSLxkQ+w==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + } + } + } + }, + "language-subtag-registry": { + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz", + "integrity": "sha512-L0IqwlIXjilBVVYKFT37X9Ih11Um5NEl9cbJIuU/SwP/zEEAbBPOnEeeuxVMf45ydWQRDQN3Nqc96OgbH1K+Pg==", + "dev": true + }, + "language-tags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", + "integrity": "sha1-0yHbxNowuovzAk4ED6XBRmH5GTo=", + "dev": true, + "requires": { + "language-subtag-registry": "~0.3.2" + } + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "requires": { + "immediate": "~3.0.5" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "loader-runner": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", + "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==", + "dev": true + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true + }, + "lodash.capitalize": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz", + "integrity": "sha1-+CbJtOKoUR2E46yinbBeGk87cqk=", + "dev": true + }, + "lodash.endswith": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.endswith/-/lodash.endswith-4.2.1.tgz", + "integrity": "sha1-/tWawXOO0+I27dcGTsRWRIs3vAk=", + "dev": true + }, + "lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.ismatch": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", + "integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "dev": true + }, + "lodash.map": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=", + "dev": true + }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "dev": true + }, + "lodash.toarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", + "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", + "dev": true + }, + "lodash.uniqby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz", + "integrity": "sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI=", + "dev": true + }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "loglevel": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.1.tgz", + "integrity": "sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==", + "dev": true + }, + "longest": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-2.0.1.tgz", + "integrity": "sha1-eB4YMpaqlPbU2RbcM10NF676I/g=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dev": true, + "requires": { + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "dev": true + } + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", + "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "marked": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.9.tgz", + "integrity": "sha512-H8lIX2SvyitGX+TRdtS06m1jHMijKN/XjfH6Ooii9fvxMlh8QdqBfBDkGUpMWH2kQNrtixjzYUa3SH8ROTgRRw==", + "dev": true + }, + "marked-terminal": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-4.1.1.tgz", + "integrity": "sha512-t7Mdf6T3PvOEyN01c3tYxDzhyKZ8xnkp8Rs6Fohno63L/0pFTJ5Qtwto2AQVuDtbQiWzD+4E5AAu1Z2iLc8miQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.3.1", + "cardinal": "^2.1.1", + "chalk": "^4.1.0", + "cli-table": "^0.3.1", + "node-emoji": "^1.10.0", + "supports-hyperlinks": "^2.1.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + } + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "meow": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", + "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", + "dev": true, + "requires": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "dependencies": { + "hosted-git-info": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", + "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "normalize-package-data": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz", + "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==", + "dev": true, + "requires": { + "hosted-git-info": "^4.0.1", + "resolve": "^1.20.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + } + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true + } + } + }, + "merge": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", + "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==", + "dev": true + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merge-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-1.0.1.tgz", + "integrity": "sha512-iuPV41VWKWBIOpBsjoxjDZw8/GbSfZ2mk7N1453bwMrfzdrIk7EzBd+8UVR6rkw67th7xnk9Dytl3J+lHPdxvg==", + "dev": true, + "requires": { + "is-plain-obj": "^1.1" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "mime-db": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", + "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.31", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", + "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "dev": true, + "requires": { + "mime-db": "1.48.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + } + }, + "minipass": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", + "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + } + }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + }, + "dependencies": { + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "mitt": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-1.1.2.tgz", + "integrity": "sha1-OA5hSA1qYVtmDwertg1R4KTkvtY=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "modify-values": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", + "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", + "dev": true + }, + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==", + "dev": true + }, + "most": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/most/-/most-1.9.0.tgz", + "integrity": "sha512-M7yHMcMGaclzEL6eg8Yh8PlAsaWfL/oSThF4+ZuWKM5CKXcbzmLh+qESwgZFzMKHJ+iVJwb28yFvDEOobI653w==", + "dev": true, + "requires": { + "@most/multicast": "^1.2.5", + "@most/prelude": "^1.4.0", + "globalthis": "^1.0.1", + "symbol-observable": "^2.0.3" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multicast-dns": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", + "dev": true, + "requires": { + "dns-packet": "^1.3.1", + "thunky": "^1.0.2" + } + }, + "multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "dev": true, + "optional": true + }, + "nanoid": { + "version": "3.1.23", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", + "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", + "dev": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "neo-blessed": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/neo-blessed/-/neo-blessed-0.2.0.tgz", + "integrity": "sha512-C2kC4K+G2QnNQFXUIxTQvqmrdSIzGTX1ZRKeDW6ChmvPRw8rTkTEJzbEQHiHy06d36PCl/yMOCjquCRV8SpSQw==", + "dev": true + }, + "nerf-dart": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/nerf-dart/-/nerf-dart-1.0.0.tgz", + "integrity": "sha1-5tq3/r9a2Bbqgc9cYpxaDr3nLBo=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dev": true, + "requires": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "dev": true + } + } + }, + "node-emoji": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.10.0.tgz", + "integrity": "sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw==", + "dev": true, + "requires": { + "lodash.toarray": "^4.4.0" + } + }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "dev": true + }, + "node-forge": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==", + "dev": true + }, + "node-ipc": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/node-ipc/-/node-ipc-9.2.0.tgz", + "integrity": "sha512-m4A/wueUS2PqrhM6Z8rzD1J2qvG4QG8NkKY0v3lgdntQI2NTDDL3YbfU6qkDc0RgUiA9UqZTO9CtIiDAIjrVwA==", + "dev": true, + "requires": { + "event-pubsub": "4.3.0", + "js-message": "1.0.7", + "js-queue": "2.0.2" + } + }, + "node-libs-browser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + } + } + }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true + }, + "node-notifier": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-6.0.0.tgz", + "integrity": "sha512-SVfQ/wMw+DesunOm5cKqr6yDcvUTDl/yc97ybGHMrteNEY6oekXpNpS3lZwgLlwz0FLgHoiW28ZpmBHUDg37cw==", + "dev": true, + "requires": { + "growly": "^1.3.0", + "is-wsl": "^2.1.1", + "semver": "^6.3.0", + "shellwords": "^0.1.1", + "which": "^1.3.1" + }, + "dependencies": { + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "node-releases": { + "version": "1.1.73", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz", + "integrity": "sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "normalize-url": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "dev": true, + "requires": { + "prepend-http": "^2.0.0", + "query-string": "^5.0.1", + "sort-keys": "^2.0.0" + }, + "dependencies": { + "sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + } + } + }, + "normalize.css": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz", + "integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==", + "dev": true + }, + "npm": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/npm/-/npm-7.19.1.tgz", + "integrity": "sha512-aN3hZzGkPzKOyhjXtOhnQTGumorFhgpOU6xfuQsF1nJKh4DhsgfOMG4s/SNx56r4xHPvM5m/sk914wzDgKba3A==", + "dev": true, + "requires": { + "@npmcli/arborist": "^2.6.4", + "@npmcli/ci-detect": "^1.2.0", + "@npmcli/config": "^2.2.0", + "@npmcli/package-json": "^1.0.1", + "@npmcli/run-script": "^1.8.5", + "abbrev": "~1.1.1", + "ansicolors": "~0.3.2", + "ansistyles": "~0.1.3", + "archy": "~1.0.0", + "byte-size": "^7.0.1", + "cacache": "^15.2.0", + "chalk": "^4.1.0", + "chownr": "^2.0.0", + "cli-columns": "^3.1.2", + "cli-table3": "^0.6.0", + "columnify": "~1.5.4", + "glob": "^7.1.7", + "graceful-fs": "^4.2.6", + "hosted-git-info": "^4.0.2", + "ini": "^2.0.0", + "init-package-json": "^2.0.3", + "is-cidr": "^4.0.2", + "json-parse-even-better-errors": "^2.3.1", + "leven": "^3.1.0", + "libnpmaccess": "^4.0.2", + "libnpmdiff": "^2.0.4", + "libnpmexec": "^2.0.0", + "libnpmfund": "^1.1.0", + "libnpmhook": "^6.0.2", + "libnpmorg": "^2.0.2", + "libnpmpack": "^2.0.1", + "libnpmpublish": "^4.0.1", + "libnpmsearch": "^3.1.1", + "libnpmteam": "^2.0.3", + "libnpmversion": "^1.2.1", + "make-fetch-happen": "^9.0.3", + "minipass": "^3.1.3", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "mkdirp-infer-owner": "^2.0.0", + "ms": "^2.1.2", + "node-gyp": "^7.1.2", + "nopt": "^5.0.0", + "npm-audit-report": "^2.1.5", + "npm-package-arg": "^8.1.5", + "npm-pick-manifest": "^6.1.1", + "npm-profile": "^5.0.3", + "npm-registry-fetch": "^11.0.0", + "npm-user-validate": "^1.0.1", + "npmlog": "~4.1.2", + "opener": "^1.5.2", + "pacote": "^11.3.3", + "parse-conflict-json": "^1.1.1", + "qrcode-terminal": "^0.12.0", + "read": "~1.0.7", + "read-package-json": "^3.0.1", + "read-package-json-fast": "^2.0.2", + "readdir-scoped-modules": "^1.1.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "ssri": "^8.0.1", + "tar": "^6.1.0", + "text-table": "~0.2.0", + "tiny-relative-date": "^1.3.0", + "treeverse": "^1.0.4", + "validate-npm-package-name": "~3.0.0", + "which": "^2.0.2", + "write-file-atomic": "^3.0.3" + }, + "dependencies": { + "@npmcli/arborist": { + "version": "2.6.4", + "bundled": true, + "dev": true, + "requires": { + "@npmcli/installed-package-contents": "^1.0.7", + "@npmcli/map-workspaces": "^1.0.2", + "@npmcli/metavuln-calculator": "^1.1.0", + "@npmcli/move-file": "^1.1.0", + "@npmcli/name-from-folder": "^1.0.1", + "@npmcli/node-gyp": "^1.0.1", + "@npmcli/package-json": "^1.0.1", + "@npmcli/run-script": "^1.8.2", + "bin-links": "^2.2.1", + "cacache": "^15.0.3", + "common-ancestor-path": "^1.0.1", + "json-parse-even-better-errors": "^2.3.1", + "json-stringify-nice": "^1.1.4", + "mkdirp-infer-owner": "^2.0.0", + "npm-install-checks": "^4.0.0", + "npm-package-arg": "^8.1.0", + "npm-pick-manifest": "^6.1.0", + "npm-registry-fetch": "^11.0.0", + "pacote": "^11.2.6", + "parse-conflict-json": "^1.1.1", + "proc-log": "^1.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^1.0.1", + "read-package-json-fast": "^2.0.2", + "readdir-scoped-modules": "^1.1.0", + "semver": "^7.3.5", + "tar": "^6.1.0", + "treeverse": "^1.0.4", + "walk-up-path": "^1.0.0" + } + }, + "@npmcli/ci-detect": { + "version": "1.3.0", + "bundled": true, + "dev": true + }, + "@npmcli/config": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "requires": { + "ini": "^2.0.0", + "mkdirp-infer-owner": "^2.0.0", + "nopt": "^5.0.0", + "semver": "^7.3.4", + "walk-up-path": "^1.0.0" + } + }, + "@npmcli/disparity-colors": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "^4.3.0" + } + }, + "@npmcli/git": { + "version": "2.0.9", + "bundled": true, + "dev": true, + "requires": { + "@npmcli/promise-spawn": "^1.3.2", + "lru-cache": "^6.0.0", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^6.1.1", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^2.0.2" + } + }, + "@npmcli/installed-package-contents": { + "version": "1.0.7", + "bundled": true, + "dev": true, + "requires": { + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "@npmcli/map-workspaces": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "@npmcli/name-from-folder": "^1.0.1", + "glob": "^7.1.6", + "minimatch": "^3.0.4", + "read-package-json-fast": "^2.0.1" + } + }, + "@npmcli/metavuln-calculator": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "cacache": "^15.0.5", + "pacote": "^11.1.11", + "semver": "^7.3.2" + } + }, + "@npmcli/move-file": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + } + }, + "@npmcli/name-from-folder": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "@npmcli/node-gyp": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "@npmcli/package-json": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "json-parse-even-better-errors": "^2.3.1" + } + }, + "@npmcli/promise-spawn": { + "version": "1.3.2", + "bundled": true, + "dev": true, + "requires": { + "infer-owner": "^1.0.4" + } + }, + "@npmcli/run-script": { + "version": "1.8.5", + "bundled": true, + "dev": true, + "requires": { + "@npmcli/node-gyp": "^1.0.2", + "@npmcli/promise-spawn": "^1.3.2", + "infer-owner": "^1.0.4", + "node-gyp": "^7.1.0", + "read-package-json-fast": "^2.0.1" + } + }, + "@tootallnate/once": { + "version": "1.1.2", + "bundled": true, + "dev": true + }, + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "agent-base": { + "version": "6.0.2", + "bundled": true, + "dev": true, + "requires": { + "debug": "4" + } + }, + "agentkeepalive": { + "version": "4.1.4", + "bundled": true, + "dev": true, + "requires": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + } + }, + "aggregate-error": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ajv": { + "version": "6.12.6", + "bundled": true, + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "bundled": true, + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "ansicolors": { + "version": "0.3.2", + "bundled": true, + "dev": true + }, + "ansistyles": { + "version": "0.1.3", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "asap": { + "version": "2.0.6", + "bundled": true, + "dev": true + }, + "asn1": { + "version": "0.2.4", + "bundled": true, + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "bundled": true, + "dev": true + }, + "aws4": { + "version": "1.11.0", + "bundled": true, + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bin-links": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "cmd-shim": "^4.0.1", + "mkdirp": "^1.0.3", + "npm-normalize-package-bin": "^1.0.0", + "read-cmd-shim": "^2.0.0", + "rimraf": "^3.0.0", + "write-file-atomic": "^3.0.3" + } + }, + "binary-extensions": { + "version": "2.2.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "builtins": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "byte-size": { + "version": "7.0.1", + "bundled": true, + "dev": true + }, + "cacache": { + "version": "15.2.0", + "bundled": true, + "dev": true, + "requires": { + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + } + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true + }, + "chalk": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "chownr": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "cidr-regex": { + "version": "3.1.1", + "bundled": true, + "dev": true, + "requires": { + "ip-regex": "^4.1.0" + } + }, + "clean-stack": { + "version": "2.2.0", + "bundled": true, + "dev": true + }, + "cli-columns": { + "version": "3.1.2", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^2.0.0", + "strip-ansi": "^3.0.1" + } + }, + "cli-table3": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "requires": { + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "4.2.2", + "bundled": true, + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "bundled": true, + "dev": true + }, + "cmd-shim": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "mkdirp-infer-owner": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "bundled": true, + "dev": true + }, + "colors": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "columnify": { + "version": "1.5.4", + "bundled": true, + "dev": true, + "requires": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + } + }, + "combined-stream": { + "version": "1.0.8", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "common-ancestor-path": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "4.3.1", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "bundled": true, + "dev": true + } + } + }, + "debuglog": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "defaults": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "depd": { + "version": "1.1.2", + "bundled": true, + "dev": true + }, + "dezalgo": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, + "diff": { + "version": "5.0.0", + "bundled": true, + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "emoji-regex": { + "version": "8.0.0", + "bundled": true, + "dev": true + }, + "encoding": { + "version": "0.1.13", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "iconv-lite": "^0.6.2" + } + }, + "env-paths": { + "version": "2.2.1", + "bundled": true, + "dev": true + }, + "err-code": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "extend": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "extsprintf": { + "version": "1.3.0", + "bundled": true, + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "bundled": true, + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true + }, + "fs-minipass": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "dependencies": { + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.7", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.6", + "bundled": true, + "dev": true + }, + "har-schema": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "har-validator": { + "version": "5.1.5", + "bundled": true, + "dev": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "hosted-git-info": { + "version": "4.0.2", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "http-cache-semantics": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, + "http-proxy-agent": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + } + }, + "http-signature": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-proxy-agent": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "humanize-ms": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "ms": "^2.0.0" + } + }, + "iconv-lite": { + "version": "0.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "ignore-walk": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "indent-string": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "infer-owner": { + "version": "1.0.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "bundled": true, + "dev": true + }, + "ini": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "init-package-json": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "requires": { + "glob": "^7.1.1", + "npm-package-arg": "^8.1.2", + "promzard": "^0.3.0", + "read": "~1.0.1", + "read-package-json": "^3.0.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4", + "validate-npm-package-name": "^3.0.0" + } + }, + "ip": { + "version": "1.1.5", + "bundled": true, + "dev": true + }, + "ip-regex": { + "version": "4.3.0", + "bundled": true, + "dev": true + }, + "is-cidr": { + "version": "4.0.2", + "bundled": true, + "dev": true, + "requires": { + "cidr-regex": "^3.1.1" + } + }, + "is-core-module": { + "version": "2.4.0", + "bundled": true, + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-lambda": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "bundled": true, + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "bundled": true, + "dev": true + }, + "json-stringify-nice": { + "version": "1.1.4", + "bundled": true, + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "jsonparse": { + "version": "1.3.1", + "bundled": true, + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "just-diff": { + "version": "3.1.1", + "bundled": true, + "dev": true + }, + "just-diff-apply": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "leven": { + "version": "3.1.0", + "bundled": true, + "dev": true + }, + "libnpmaccess": { + "version": "4.0.3", + "bundled": true, + "dev": true, + "requires": { + "aproba": "^2.0.0", + "minipass": "^3.1.1", + "npm-package-arg": "^8.1.2", + "npm-registry-fetch": "^11.0.0" + } + }, + "libnpmdiff": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "@npmcli/disparity-colors": "^1.0.1", + "@npmcli/installed-package-contents": "^1.0.7", + "binary-extensions": "^2.2.0", + "diff": "^5.0.0", + "minimatch": "^3.0.4", + "npm-package-arg": "^8.1.4", + "pacote": "^11.3.4", + "tar": "^6.1.0" + } + }, + "libnpmexec": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "@npmcli/arborist": "^2.3.0", + "@npmcli/ci-detect": "^1.3.0", + "@npmcli/run-script": "^1.8.4", + "chalk": "^4.1.0", + "mkdirp-infer-owner": "^2.0.0", + "npm-package-arg": "^8.1.2", + "pacote": "^11.3.1", + "proc-log": "^1.0.0", + "read": "^1.0.7", + "read-package-json-fast": "^2.0.2", + "walk-up-path": "^1.0.0" + } + }, + "libnpmfund": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "@npmcli/arborist": "^2.5.0" + } + }, + "libnpmhook": { + "version": "6.0.3", + "bundled": true, + "dev": true, + "requires": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^11.0.0" + } + }, + "libnpmorg": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "requires": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^11.0.0" + } + }, + "libnpmpack": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "@npmcli/run-script": "^1.8.3", + "npm-package-arg": "^8.1.0", + "pacote": "^11.2.6" + } + }, + "libnpmpublish": { + "version": "4.0.2", + "bundled": true, + "dev": true, + "requires": { + "normalize-package-data": "^3.0.2", + "npm-package-arg": "^8.1.2", + "npm-registry-fetch": "^11.0.0", + "semver": "^7.1.3", + "ssri": "^8.0.1" + } + }, + "libnpmsearch": { + "version": "3.1.2", + "bundled": true, + "dev": true, + "requires": { + "npm-registry-fetch": "^11.0.0" + } + }, + "libnpmteam": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^11.0.0" + } + }, + "libnpmversion": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "@npmcli/git": "^2.0.7", + "@npmcli/run-script": "^1.8.4", + "json-parse-even-better-errors": "^2.3.1", + "semver": "^7.3.5", + "stringify-package": "^1.0.1" + } + }, + "lru-cache": { + "version": "6.0.0", + "bundled": true, + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "make-fetch-happen": { + "version": "9.0.3", + "bundled": true, + "dev": true, + "requires": { + "agentkeepalive": "^4.1.3", + "cacache": "^15.2.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^6.0.0", + "minipass": "^3.1.3", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.3.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.2", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^5.0.0", + "ssri": "^8.0.0" + } + }, + "mime-db": { + "version": "1.48.0", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.31", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "1.48.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minipass": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minipass-collect": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-fetch": { + "version": "1.3.3", + "bundled": true, + "dev": true, + "requires": { + "encoding": "^0.1.12", + "minipass": "^3.1.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.0.0" + } + }, + "minipass-flush": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-json-stream": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + } + }, + "minipass-pipeline": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-sized": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minizlib": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "bundled": true, + "dev": true + }, + "mkdirp-infer-owner": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "chownr": "^2.0.0", + "infer-owner": "^1.0.4", + "mkdirp": "^1.0.3" + } + }, + "ms": { + "version": "2.1.3", + "bundled": true, + "dev": true + }, + "mute-stream": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "negotiator": { + "version": "0.6.2", + "bundled": true, + "dev": true + }, + "node-gyp": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.3", + "nopt": "^5.0.0", + "npmlog": "^4.1.2", + "request": "^2.88.2", + "rimraf": "^3.0.2", + "semver": "^7.3.2", + "tar": "^6.0.2", + "which": "^2.0.2" + } + }, + "nopt": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "^4.0.1", + "resolve": "^1.20.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-audit-report": { + "version": "2.1.5", + "bundled": true, + "dev": true, + "requires": { + "chalk": "^4.0.0" + } + }, + "npm-bundled": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-install-checks": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "semver": "^7.1.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "npm-package-arg": { + "version": "8.1.5", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "^4.0.1", + "semver": "^7.3.4", + "validate-npm-package-name": "^3.0.0" + } + }, + "npm-packlist": { + "version": "2.2.2", + "bundled": true, + "dev": true, + "requires": { + "glob": "^7.1.6", + "ignore-walk": "^3.0.3", + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-pick-manifest": { + "version": "6.1.1", + "bundled": true, + "dev": true, + "requires": { + "npm-install-checks": "^4.0.0", + "npm-normalize-package-bin": "^1.0.1", + "npm-package-arg": "^8.1.2", + "semver": "^7.3.4" + } + }, + "npm-profile": { + "version": "5.0.4", + "bundled": true, + "dev": true, + "requires": { + "npm-registry-fetch": "^11.0.0" + } + }, + "npm-registry-fetch": { + "version": "11.0.0", + "bundled": true, + "dev": true, + "requires": { + "make-fetch-happen": "^9.0.1", + "minipass": "^3.1.3", + "minipass-fetch": "^1.3.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.0.0", + "npm-package-arg": "^8.0.0" + } + }, + "npm-user-validate": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "opener": { + "version": "1.5.2", + "bundled": true, + "dev": true + }, + "p-map": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "pacote": { + "version": "11.3.4", + "bundled": true, + "dev": true, + "requires": { + "@npmcli/git": "^2.0.1", + "@npmcli/installed-package-contents": "^1.0.6", + "@npmcli/promise-spawn": "^1.2.0", + "@npmcli/run-script": "^1.8.2", + "cacache": "^15.0.5", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "infer-owner": "^1.0.4", + "minipass": "^3.1.3", + "mkdirp": "^1.0.3", + "npm-package-arg": "^8.0.1", + "npm-packlist": "^2.1.4", + "npm-pick-manifest": "^6.0.0", + "npm-registry-fetch": "^11.0.0", + "promise-retry": "^2.0.1", + "read-package-json-fast": "^2.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.1.0" + } + }, + "parse-conflict-json": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "json-parse-even-better-errors": "^2.3.0", + "just-diff": "^3.0.1", + "just-diff-apply": "^3.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "bundled": true, + "dev": true + }, + "proc-log": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "promise-all-reject-late": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "promise-call-limit": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "promise-retry": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + } + }, + "promzard": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "read": "1" + } + }, + "psl": { + "version": "1.8.0", + "bundled": true, + "dev": true + }, + "punycode": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "qrcode-terminal": { + "version": "0.12.0", + "bundled": true, + "dev": true + }, + "qs": { + "version": "6.5.2", + "bundled": true, + "dev": true + }, + "read": { + "version": "1.0.7", + "bundled": true, + "dev": true, + "requires": { + "mute-stream": "~0.0.4" + } + }, + "read-cmd-shim": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "read-package-json": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "^7.1.1", + "json-parse-even-better-errors": "^2.3.0", + "normalize-package-data": "^3.0.0", + "npm-normalize-package-bin": "^1.0.0" + } + }, + "read-package-json-fast": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "json-parse-even-better-errors": "^2.3.0", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "readable-stream": { + "version": "2.3.7", + "bundled": true, + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdir-scoped-modules": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, + "request": { + "version": "2.88.2", + "bundled": true, + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "form-data": { + "version": "2.3.3", + "bundled": true, + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "tough-cookie": { + "version": "2.5.0", + "bundled": true, + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } + } + }, + "resolve": { + "version": "1.20.0", + "bundled": true, + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "retry": { + "version": "0.12.0", + "bundled": true, + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true + }, + "semver": { + "version": "7.3.5", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "bundled": true, + "dev": true + }, + "smart-buffer": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, + "socks": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "ip": "^1.1.5", + "smart-buffer": "^4.1.0" + } + }, + "socks-proxy-agent": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4", + "socks": "^2.3.3" + } + }, + "spdx-correct": { + "version": "3.1.1", + "bundled": true, + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "bundled": true, + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.9", + "bundled": true, + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "bundled": true, + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "ssri": { + "version": "8.0.1", + "bundled": true, + "dev": true, + "requires": { + "minipass": "^3.1.1" + } + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "stringify-package": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "bundled": true, + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "tar": { + "version": "6.1.0", + "bundled": true, + "dev": true, + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "tiny-relative-date": { + "version": "1.3.0", + "bundled": true, + "dev": true + }, + "treeverse": { + "version": "1.0.4", + "bundled": true, + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "bundled": true, + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "unique-filename": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "uri-js": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "3.4.0", + "bundled": true, + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "builtins": "^1.0.3" + } + }, + "verror": { + "version": "1.10.0", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "walk-up-path": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "wcwidth": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "which": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "yallist": { + "version": "4.0.0", + "bundled": true, + "dev": true + } + } + }, + "npm-conf": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", + "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", + "dev": true, + "requires": { + "config-chain": "^1.1.11", + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "nth-check": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", + "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", + "dev": true, + "requires": { + "boolbase": "^1.0.0" + } + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-hash": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", + "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==", + "dev": true + }, + "object-inspect": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", + "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==", + "dev": true + }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.entries": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.4.tgz", + "integrity": "sha512-h4LWKWE+wKQGhtMjZEBud7uLGhqyLwj8fpHOarZhD2uY3C9cRtk57VQ89ke3moByLXMedqs3XCHzyb4AmA2DjA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.2" + } + }, + "object.fromentries": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.4.tgz", + "integrity": "sha512-EsFBshs5RUUpQEY1D4q/m59kMfz4YJvxuNCJcv/jWwOJr34EaVnG11ZrZa0UHB3wnzV1wx8m58T4hQL8IuNXlQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2", + "has": "^1.0.3" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", + "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "object.values": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", + "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.2" + } + }, + "obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "dev": true + }, + "opn": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", + "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "requires": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "original": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", + "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", + "dev": true, + "requires": { + "url-parse": "^1.4.3" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-cancelable": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", + "dev": true + }, + "p-each-series": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "dev": true + }, + "p-event": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", + "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", + "dev": true, + "requires": { + "p-timeout": "^2.0.1" + } + }, + "p-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", + "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", + "dev": true, + "requires": { + "p-map": "^2.0.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "dev": true + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + }, + "dependencies": { + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + } + } + }, + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true + }, + "p-reduce": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-2.1.0.tgz", + "integrity": "sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw==", + "dev": true + }, + "p-retry": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", + "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", + "dev": true, + "requires": { + "retry": "^0.12.0" + } + }, + "p-timeout": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pako": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.3.tgz", + "integrity": "sha512-WjR1hOeg+kki3ZIOjaf4b5WVcay1jaliKSYiEaB1XzwhMQZJxRdQRv0V31EKBYlxb4T7SK3hjfc/jxyU64BoSw==" + }, + "parallel-transform": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", + "dev": true, + "requires": { + "cyclist": "^1.0.1", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "parallel-webpack": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/parallel-webpack/-/parallel-webpack-2.6.0.tgz", + "integrity": "sha512-aOOLfQ40yWWRt8214F0zNWp0DWbeCs7tJaEur0/XUlYU8Yht1sMTYt+eNrbY4VkM4O/SRSme7cdZJTtIantiOw==", + "dev": true, + "requires": { + "ajv": "^4.9.2", + "bluebird": "^3.0.6", + "chalk": "^1.1.1", + "interpret": "^1.0.1", + "lodash.assign": "^4.0.8", + "lodash.endswith": "^4.0.1", + "lodash.flatten": "^4.2.0", + "minimist": "^1.2.0", + "node-ipc": "^9.1.0", + "pluralize": "^1.2.1", + "supports-color": "^3.1.2", + "worker-farm": "^1.3.1" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" + } + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "param-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", + "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", + "dev": true, + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "dev": true + } + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "parseqs": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", + "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==", + "dev": true + }, + "parseuri": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", + "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==", + "dev": true + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "dev": true + } + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pirates": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "dev": true, + "requires": { + "node-modules-regexp": "^1.0.0" + } + }, + "pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "pluralize": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", + "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", + "dev": true + }, + "portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "dev": true, + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "8.1.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.1.10.tgz", + "integrity": "sha512-iBXEV5VTTYaRRdxiFYzTtuv2lGMQBExqkZKSzkJe+Fl6rvQrA/49UVGKqB+LG54hpW/TtDBMGds8j33GFNW7pg==", + "dev": true, + "requires": { + "colorette": "^1.2.1", + "nanoid": "^3.1.18", + "source-map": "^0.6.1", + "vfile-location": "^3.2.0" + } + }, + "postcss-loader": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-4.1.0.tgz", + "integrity": "sha512-vbCkP70F3Q9PIk6d47aBwjqAMI4LfkXCoyxj+7NPNuVIwfTGdzv2KVQes59/RuxMniIgsYQCFSY42P3+ykJfaw==", + "dev": true, + "requires": { + "cosmiconfig": "^7.0.0", + "klona": "^2.0.4", + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0", + "semver": "^7.3.2" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "dev": true + }, + "postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "dev": true, + "requires": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + } + }, + "postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dev": true, + "requires": { + "postcss-selector-parser": "^6.0.4" + } + }, + "postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "requires": { + "icss-utils": "^5.0.0" + } + }, + "postcss-prefix-selector": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/postcss-prefix-selector/-/postcss-prefix-selector-1.10.0.tgz", + "integrity": "sha512-VcC/zCXVfFdGyn+Fo9+mxnxBu+hT61uMJJBdfWBbIeDrcE6g8s+26SUPTMpz8kc9wfoLpJGAZZ4QwbVqwxpNRA==", + "dev": true, + "requires": { + "postcss": "^8.2.10" + }, + "dependencies": { + "postcss": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.5.tgz", + "integrity": "sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA==", + "dev": true, + "requires": { + "colorette": "^1.2.2", + "nanoid": "^3.1.23", + "source-map-js": "^0.6.2" + } + } + } + }, + "postcss-selector-parser": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", + "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "dev": true + }, + "posthtml": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/posthtml/-/posthtml-0.9.2.tgz", + "integrity": "sha1-9MBtufZ7Yf0XxOJW5+PZUVv3Jv0=", + "dev": true, + "requires": { + "posthtml-parser": "^0.2.0", + "posthtml-render": "^1.0.5" + } + }, + "posthtml-parser": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.2.1.tgz", + "integrity": "sha1-NdUw3jhnQMK6JP8usvrznM3ycd0=", + "dev": true, + "requires": { + "htmlparser2": "^3.8.3", + "isobject": "^2.1.0" + }, + "dependencies": { + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true + }, + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, + "htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "posthtml-rename-id": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/posthtml-rename-id/-/posthtml-rename-id-1.0.12.tgz", + "integrity": "sha512-UKXf9OF/no8WZo9edRzvuMenb6AD5hDLzIepJW+a4oJT+T/Lx7vfMYWT4aWlGNQh0WMhnUx1ipN9OkZ9q+ddEw==", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "posthtml-render": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-1.4.0.tgz", + "integrity": "sha512-W1779iVHGfq0Fvh2PROhCe2QhB8mEErgqzo1wpIt36tCgChafP+hbXIhLDOM8ePJrZcFs0vkNEtdibEWVqChqw==", + "dev": true + }, + "posthtml-svg-mode": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/posthtml-svg-mode/-/posthtml-svg-mode-1.0.3.tgz", + "integrity": "sha512-hEqw9NHZ9YgJ2/0G7CECOeuLQKZi8HjWLkBaSVtOWjygQ9ZD8P7tqeowYs7WrFdKsWEKG7o+IlsPY8jrr0CJpQ==", + "dev": true, + "requires": { + "merge-options": "1.0.1", + "posthtml": "^0.9.2", + "posthtml-parser": "^0.2.1", + "posthtml-render": "^1.0.6" + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, + "prettier": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true + }, + "pretty-error": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.2.tgz", + "integrity": "sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw==", + "dev": true, + "requires": { + "lodash": "^4.17.20", + "renderkid": "^2.0.4" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", + "dev": true + }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "dependencies": { + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + } + } + }, + "raw-loader": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz", + "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + } + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + } + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + }, + "dependencies": { + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + }, + "redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "requires": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + } + }, + "redeyed": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", + "integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=", + "dev": true, + "requires": { + "esprima": "~4.0.0" + } + }, + "reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "dev": true + }, + "regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" + }, + "regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexp-replace-loader": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/regexp-replace-loader/-/regexp-replace-loader-1.0.1.tgz", + "integrity": "sha1-Xa5zvp7oKk2U0JVcL6P8kj4TTX4=", + "dev": true, + "requires": { + "loader-utils": "^1.0.2" + } + }, + "regexp.prototype.flags": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", + "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, + "regexpu-core": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + } + }, + "registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "regjsgen": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "dev": true + }, + "regjsparser": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", + "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "renderkid": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.7.tgz", + "integrity": "sha512-oCcFyxaMrKsKcTY59qnCAtmDVSLfPbrv6A3tVbPdFMMrv5jaK10V6m40cKsoPNhAqN6rmHW9sswW4o3ruSrwUQ==", + "dev": true, + "requires": { + "css-select": "^4.1.3", + "dom-converter": "^0.2.0", + "htmlparser2": "^6.1.0", + "lodash": "^4.17.21", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "domhandler": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", + "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "dev": true, + "requires": { + "domelementtype": "^2.2.0" + } + }, + "htmlparser2": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + } + } + }, + "repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "resolve-global": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-global/-/resolve-global-1.0.0.tgz", + "integrity": "sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==", + "dev": true, + "optional": true, + "requires": { + "global-dirs": "^0.1.1" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + }, + "dependencies": { + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + } + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rollup": { + "version": "2.52.7", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.52.7.tgz", + "integrity": "sha512-55cSH4CCU6MaPr9TAOyrIC+7qFCHscL7tkNsm1MBfIJRRqRbCEY0mmeFn4Wg8FKsHtEH8r389Fz38r/o+kgXLg==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + }, + "dependencies": { + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + } + } + }, + "rollup-plugin-terser": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" + }, + "dependencies": { + "jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + } + }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "save-remote-file-webpack-plugin": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/save-remote-file-webpack-plugin/-/save-remote-file-webpack-plugin-1.0.2.tgz", + "integrity": "sha512-ETZyE2ZaPrQX0fP6faMTdZbyDshh+wNvUTlT4+dq5QjtMiP8OgQCqUseyZdRXKy5K0qX8nqkyCRXG92m3V3J3w==", + "dev": true, + "requires": { + "download": "^7.1.0" + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "schema-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", + "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", + "requires": { + "@types/json-schema": "^7.0.6", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "seedrandom": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", + "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==" + }, + "seek-bzip": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "dev": true, + "requires": { + "commander": "^2.8.1" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", + "dev": true + }, + "selfsigned": { + "version": "1.10.11", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.11.tgz", + "integrity": "sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA==", + "dev": true, + "requires": { + "node-forge": "^0.10.0" + } + }, + "semantic-release": { + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-17.3.0.tgz", + "integrity": "sha512-enhDayMZRP4nWcWAMBFHHB7THRaIcRdUAZv3lxd65pXs2ttzay7IeCvRRrGayRWExtnY0ulwRz5Ycp88Dv/UeQ==", + "dev": true, + "requires": { + "@semantic-release/commit-analyzer": "^8.0.0", + "@semantic-release/error": "^2.2.0", + "@semantic-release/github": "^7.0.0", + "@semantic-release/npm": "^7.0.0", + "@semantic-release/release-notes-generator": "^9.0.0", + "aggregate-error": "^3.0.0", + "cosmiconfig": "^6.0.0", + "debug": "^4.0.0", + "env-ci": "^5.0.0", + "execa": "^4.0.0", + "figures": "^3.0.0", + "find-versions": "^3.0.0", + "get-stream": "^5.0.0", + "git-log-parser": "^1.2.0", + "hook-std": "^2.0.0", + "hosted-git-info": "^3.0.0", + "lodash": "^4.17.15", + "marked": "^1.0.0", + "marked-terminal": "^4.0.0", + "micromatch": "^4.0.2", + "p-each-series": "^2.1.0", + "p-reduce": "^2.0.0", + "read-pkg-up": "^7.0.0", + "resolve-from": "^5.0.0", + "semver": "^7.3.2", + "semver-diff": "^3.1.1", + "signale": "^1.2.1", + "yargs": "^15.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "hosted-git-info": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", + "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true + }, + "semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "requires": { + "semver": "^6.3.0" + } + }, + "semver-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", + "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", + "dev": true + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shader-loader": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/shader-loader/-/shader-loader-1.3.1.tgz", + "integrity": "sha512-dt8F9K0x4rjmaFyHh7rNDfpt4LUiR64zhNIEwp2WbE99B3z4ALuvvmhftkElg93dUD6sTmv/aXa/z9SJiEddcA==", + "requires": { + "loader-utils": "^1.1.0" + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true + }, + "shx": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.3.tgz", + "integrity": "sha512-nZJ3HFWVoTSyyB+evEKjJ1STiixGztlqwKLTUNV5KqMWtGey9fTd4KU1gdZ1X9BV6215pswQ/Jew9NsuS/fNDA==", + "dev": true, + "requires": { + "minimist": "^1.2.3", + "shelljs": "^0.8.4" + } + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "signale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/signale/-/signale-1.4.0.tgz", + "integrity": "sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==", + "dev": true, + "requires": { + "chalk": "^2.3.2", + "figures": "^2.0.0", + "pkg-conf": "^2.1.0" + } + }, + "size-limit": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/size-limit/-/size-limit-4.9.0.tgz", + "integrity": "sha512-nHslMzmeGDPtlHxxGykq3WYbI+tGBJl7DEUfrO0cgDceXMvQ0uTgz2cg+nguUfg/E2EY/wsmExDU5IblpbhmVw==", + "dev": true, + "requires": { + "bytes": "^3.1.0", + "chokidar": "^3.4.3", + "ci-job-number": "^1.2.2", + "colorette": "^1.2.1", + "cosmiconfig": "^7.0.0", + "globby": "^11.0.1", + "ora": "^5.1.0", + "read-pkg-up": "^7.0.1" + }, + "dependencies": { + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + }, + "chokidar": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "socket.io": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.4.1.tgz", + "integrity": "sha512-Si18v0mMXGAqLqCVpTxBa8MGqriHGQh8ccEOhmsmNS3thNCGBwO8WGrwMibANsWtQQ5NStdZwHqZR3naJVFc3w==", + "dev": true, + "requires": { + "debug": "~4.1.0", + "engine.io": "~3.5.0", + "has-binary2": "~1.0.2", + "socket.io-adapter": "~1.1.0", + "socket.io-client": "2.4.0", + "socket.io-parser": "~3.4.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "socket.io-adapter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", + "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", + "dev": true + }, + "socket.io-client": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.4.0.tgz", + "integrity": "sha512-M6xhnKQHuuZd4Ba9vltCLT9oa+YvTsP8j9NcEiLElfIg8KeYPyhWOes6x4t+LTAC8enQbE/995AdTem2uNyKKQ==", + "dev": true, + "requires": { + "backo2": "1.0.2", + "component-bind": "1.0.0", + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "engine.io-client": "~3.5.0", + "has-binary2": "~1.0.2", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "socket.io-parser": "~3.3.0", + "to-array": "0.1.4" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + }, + "socket.io-parser": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.2.tgz", + "integrity": "sha512-FJvDBuOALxdCI9qwRrO/Rfp9yfndRtc1jSgVgV8FDraihmSP/MLGD5PEuJrNfjALvcQ+vMDM/33AWOYP/JSjDg==", + "dev": true, + "requires": { + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "isarray": "2.0.1" + } + } + } + }, + "socket.io-parser": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.1.tgz", + "integrity": "sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "debug": "~4.1.0", + "isarray": "2.0.1" + }, + "dependencies": { + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "sockjs": { + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.21.tgz", + "integrity": "sha512-DhbPFGpxjc6Z3I+uX07Id5ZO2XwYsWOrYjaSeieES78cq+JaJvVe5q/m1uvjIQhXinhIeCFRH6JgXe+mvVMyXw==", + "dev": true, + "requires": { + "faye-websocket": "^0.11.3", + "uuid": "^3.4.0", + "websocket-driver": "^0.7.4" + } + }, + "sockjs-client": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.5.1.tgz", + "integrity": "sha512-VnVAb663fosipI/m6pqRXakEOw7nvd7TUgdr3PlR/8V2I95QIdwT8L4nMxhyU8SmDBHYXU1TOElaKOmKLfYzeQ==", + "dev": true, + "requires": { + "debug": "^3.2.6", + "eventsource": "^1.0.7", + "faye-websocket": "^0.11.3", + "inherits": "^2.0.4", + "json3": "^3.3.3", + "url-parse": "^1.5.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "sort-keys-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", + "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", + "dev": true, + "requires": { + "sort-keys": "^1.0.0" + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", + "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "dev": true + }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, + "spawn-error-forwarder": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spawn-error-forwarder/-/spawn-error-forwarder-1.0.0.tgz", + "integrity": "sha1-Gv2Uc46ZmwNG17n8NzvlXgdXcCk=", + "dev": true + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", + "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", + "dev": true + }, + "spdy": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + } + }, + "spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "dev": true, + "requires": { + "through": "2" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "requires": { + "readable-stream": "^3.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "dev": true, + "requires": { + "minipass": "^3.1.1" + } + }, + "stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "requires": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "dev": true, + "requires": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "dev": true + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, + "string-replace-loader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/string-replace-loader/-/string-replace-loader-3.0.1.tgz", + "integrity": "sha512-G6UD9HX1XaKXnWpKgNHPVc/pYYLtP8+UWfORY5n3GTLSUNUo2hU2ABBnC9B3hg7ATWVSIGTisiP8zGq1DlvTbg==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + } + } + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "string.prototype.matchall": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.5.tgz", + "integrity": "sha512-Z5ZaXO0svs0M2xd/6By3qpeKpLKd9mO4v4q3oMEQrk8Ck4xOD5d5XeBOOjGrmVZZ/AHB1S0CgG4N5r1G9N3E2Q==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.2", + "get-intrinsic": "^1.1.1", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "regexp.prototype.flags": "^1.3.1", + "side-channel": "^1.0.4" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "stringify-object": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "dev": true, + "requires": { + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + }, + "dependencies": { + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, + "strip-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-comments/-/strip-comments-2.0.1.tgz", + "integrity": "sha512-ZprKx+bBLXv067WTCALv8SSz5l2+XhpYCsVtSqlMnkAXMWDq+/ekVbl1ghqP9rUHTzv6sm/DwCOiYutU/yp1fw==", + "dev": true + }, + "strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "dev": true, + "requires": { + "is-natural-number": "^4.0.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "dev": true + }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "style-loader": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.0.0.tgz", + "integrity": "sha512-pqJTDiCtLr8D2eyVWXPiwNkLsAMDuvPHnu+Z/Edo9hu+DzdJwdO5eZv9zUBF6tWI8GJGhAkenWJaVjXI+sHnuQ==", + "dev": true + }, + "superagent": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-5.3.1.tgz", + "integrity": "sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==", + "dev": true, + "requires": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.2", + "debug": "^4.1.1", + "fast-safe-stringify": "^2.0.7", + "form-data": "^3.0.0", + "formidable": "^1.2.2", + "methods": "^1.1.2", + "mime": "^2.4.6", + "qs": "^6.9.4", + "readable-stream": "^3.6.0", + "semver": "^7.3.2" + }, + "dependencies": { + "mime": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", + "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", + "dev": true + }, + "qs": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", + "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-hyperlinks": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "dev": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "svg-baker": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/svg-baker/-/svg-baker-1.7.0.tgz", + "integrity": "sha512-nibslMbkXOIkqKVrfcncwha45f97fGuAOn1G99YwnwTj8kF9YiM6XexPcUso97NxOm6GsP0SIvYVIosBis1xLg==", + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "clone": "^2.1.1", + "he": "^1.1.1", + "image-size": "^0.5.1", + "loader-utils": "^1.1.0", + "merge-options": "1.0.1", + "micromatch": "3.1.0", + "postcss": "^5.2.17", + "postcss-prefix-selector": "^1.6.0", + "posthtml-rename-id": "^1.0", + "posthtml-svg-mode": "^1.0.3", + "query-string": "^4.3.2", + "traverse": "^0.6.6" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + }, + "micromatch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.0.tgz", + "integrity": "sha512-3StSelAE+hnRvMs8IdVW7Uhk8CVed5tp+kLLGlBP6WiRAXS21GPGu/Nat4WNPXj2Eoc24B02SaeoyozPMfj0/g==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.2.2", + "define-property": "^1.0.0", + "extend-shallow": "^2.0.1", + "extglob": "^2.0.2", + "fragment-cache": "^0.2.1", + "kind-of": "^5.0.2", + "nanomatch": "^1.2.1", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "js-base64": "^2.1.9", + "source-map": "^0.5.6", + "supports-color": "^3.2.3" + } + }, + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "svg-baker-runtime": { + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/svg-baker-runtime/-/svg-baker-runtime-1.4.7.tgz", + "integrity": "sha512-Zorfwwj5+lWjk/oxwSMsRdS2sPQQdTmmsvaSpzU+i9ZWi3zugHLt6VckWfnswphQP0LmOel3nggpF5nETbt6xw==", + "dev": true, + "requires": { + "deepmerge": "1.3.2", + "mitt": "1.1.2", + "svg-baker": "^1.7.0" + } + }, + "svg-sprite-loader": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/svg-sprite-loader/-/svg-sprite-loader-5.0.0.tgz", + "integrity": "sha512-/hedkRC2IS0E+kFIb+OUCfqQlbVx72/WEEeRGw2uPsNgOOgJEONXzjfSm+CJ3pB9gOHytlBmPMS8ijMCp5s2Eg==", + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "deepmerge": "1.3.2", + "domready": "1.0.8", + "escape-string-regexp": "1.0.5", + "html-webpack-plugin": "^3.2.0", + "loader-utils": "^1.1.0", + "svg-baker": "^1.5.0", + "svg-baker-runtime": "^1.4.7", + "url-slug": "2.0.0" + }, + "dependencies": { + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "html-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", + "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", + "dev": true, + "requires": { + "html-minifier": "^3.2.3", + "loader-utils": "^0.2.16", + "lodash": "^4.17.3", + "pretty-error": "^2.0.2", + "tapable": "^1.0.0", + "toposort": "^1.0.0", + "util.promisify": "1.0.0" + }, + "dependencies": { + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + } + } + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true + } + } + }, + "svgo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", + "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "coa": "^2.0.2", + "css-select": "^2.0.0", + "css-select-base-adapter": "^0.1.1", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", + "js-yaml": "^3.13.1", + "mkdirp": "~0.5.1", + "object.values": "^1.1.0", + "sax": "~1.2.4", + "stable": "^0.1.8", + "unquote": "~1.1.1", + "util.promisify": "~1.0.0" + }, + "dependencies": { + "css-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^3.2.1", + "domutils": "^1.7.0", + "nth-check": "^1.0.2" + } + }, + "css-tree": { + "version": "1.0.0-alpha.37", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", + "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", + "dev": true, + "requires": { + "mdn-data": "2.0.4", + "source-map": "^0.6.1" + } + }, + "css-what": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", + "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==", + "dev": true + }, + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "mdn-data": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", + "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", + "dev": true + }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dev": true, + "requires": { + "boolbase": "~1.0.0" + } + } + } + }, + "symbol-observable": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-2.0.3.tgz", + "integrity": "sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA==", + "dev": true + }, + "symlink-webpack-plugin": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/symlink-webpack-plugin/-/symlink-webpack-plugin-1.0.0.tgz", + "integrity": "sha512-dw6XfNHXh5oWVgCJ9tV9WpuoO8fnfLuwKAb3ODgq8KxiB8wFMCICIHZwfaERG62wRaNtEvH0DkQLsjDw6ucRmQ==", + "dev": true + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + } + }, + "table-layout": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", + "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", + "dev": true, + "requires": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + } + }, + "tapable": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", + "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", + "dev": true + }, + "tar": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz", + "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==", + "dev": true, + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + } + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, + "temp-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", + "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", + "dev": true + }, + "tempy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tempy/-/tempy-1.0.1.tgz", + "integrity": "sha512-biM9brNqxSc04Ee71hzFbryD11nX7VPhQQY32AdDmjFvodsRFz/3ufeoTZ6uYkRFfGo188tENcASNs3vTdsM0w==", + "dev": true, + "requires": { + "del": "^6.0.0", + "is-stream": "^2.0.0", + "temp-dir": "^2.0.0", + "type-fest": "^0.16.0", + "unique-string": "^2.0.0" + }, + "dependencies": { + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "del": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz", + "integrity": "sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==", + "dev": true, + "requires": { + "globby": "^11.0.1", + "graceful-fs": "^4.2.4", + "is-glob": "^4.0.1", + "is-path-cwd": "^2.2.0", + "is-path-inside": "^3.0.2", + "p-map": "^4.0.0", + "rimraf": "^3.0.2", + "slash": "^3.0.0" + } + }, + "globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "type-fest": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.16.0.tgz", + "integrity": "sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==", + "dev": true + } + } + }, + "terser": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", + "integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz", + "integrity": "sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA==", + "dev": true, + "requires": { + "jest-worker": "^27.0.2", + "p-limit": "^3.1.0", + "schema-utils": "^3.0.0", + "serialize-javascript": "^6.0.0", + "source-map": "^0.6.1", + "terser": "^5.7.0" + } + }, + "text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "requires": { + "readable-stream": "3" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "dev": true + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-array": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", + "dev": true + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true + }, + "toposort": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", + "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", + "dev": true + }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=", + "dev": true + }, + "trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true + }, + "trim-off-newlines": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", + "dev": true + }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "tsconfig-paths": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", + "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true + }, + "uglify-js": { + "version": "3.13.10", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.10.tgz", + "integrity": "sha512-57H3ACYFXeo1IaZ1w02sfA71wI60MGco/IQFjOqK+WtKoprh7Go2/yvd2HPtoJILO2Or84ncLccI4xoHMTSbGg==", + "dev": true + }, + "uglifyjs-webpack-plugin": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-2.2.0.tgz", + "integrity": "sha512-mHSkufBmBuJ+KHQhv5H0MXijtsoA1lynJt1lXOaotja8/I0pR4L9oGaPIZw+bQBOFittXZg9OC1sXSGO9D9ZYg==", + "dev": true, + "requires": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^1.7.0", + "source-map": "^0.6.1", + "uglify-js": "^3.6.0", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + }, + "dependencies": { + "cacache": { + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "serialize-javascript": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", + "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==", + "dev": true + }, + "ssri": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } + }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + }, + "dependencies": { + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + } + } + }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "dev": true + }, + "unidecode": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/unidecode/-/unidecode-0.1.8.tgz", + "integrity": "sha1-77swFTi8RSRqmsjFWdcvAVMFBT4=", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "requires": { + "crypto-random-string": "^2.0.0" + } + }, + "universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", + "dev": true + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unquote": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", + "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-join": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", + "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", + "dev": true + }, + "url-loader": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz", + "integrity": "sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "mime-types": "^2.1.27", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + } + } + }, + "url-parse": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz", + "integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==", + "dev": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + } + }, + "url-slug": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/url-slug/-/url-slug-2.0.0.tgz", + "integrity": "sha1-p4nVrtSZXA2VrzM3etHVxo1NcCc=", + "dev": true, + "requires": { + "unidecode": "0.1.8" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "vfile-location": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", + "dev": true + }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + }, + "watchpack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", + "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", + "dev": true, + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "webpack": { + "version": "5.42.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.42.0.tgz", + "integrity": "sha512-Ln8HL0F831t1x/yPB/qZEUVmZM4w9BnHZ1EQD/sAUHv8m22hthoPniWTXEzFMh/Sf84mhrahut22TX5KxWGuyQ==", + "dev": true, + "requires": { + "@types/eslint-scope": "^3.7.0", + "@types/estree": "^0.0.48", + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/wasm-edit": "1.11.0", + "@webassemblyjs/wasm-parser": "1.11.0", + "acorn": "^8.4.1", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.8.0", + "es-module-lexer": "^0.6.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.4", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.0.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.2.0", + "webpack-sources": "^2.3.0" + } + }, + "webpack-bundle-analyzer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.2.0.tgz", + "integrity": "sha512-gmjpdL/AJeGAftSzA+bjIPiChUffjBelcH2+3woCUiRpQfuwrTJuWRyZuqegiwBAroMJp7gIwcJaGeol039zbQ==", + "dev": true, + "requires": { + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "chalk": "^4.1.0", + "commander": "^6.2.0", + "express": "^4.17.1", + "filesize": "^6.1.0", + "gzip-size": "^6.0.0", + "lodash": "^4.17.20", + "opener": "^1.5.2", + "ws": "^7.3.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "ws": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.1.tgz", + "integrity": "sha512-2c6faOUH/nhoQN6abwMloF7Iyl0ZS2E9HGtsiLrWn0zOOMWlhtDmdf/uihDt6jnuCxgtwGBNy6Onsoy2s2O2Ow==", + "dev": true + } + } + }, + "webpack-cli": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.7.2.tgz", + "integrity": "sha512-mEoLmnmOIZQNiRl0ebnjzQ74Hk0iKS5SiEEnpq3dRezoyR3yPaeQZCMCe+db4524pj1Pd5ghZXjT41KLzIhSLw==", + "dev": true, + "requires": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.0.4", + "@webpack-cli/info": "^1.3.0", + "@webpack-cli/serve": "^1.5.1", + "colorette": "^1.2.1", + "commander": "^7.0.0", + "execa": "^5.0.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "v8-compile-cache": "^2.2.0", + "webpack-merge": "^5.7.3" + }, + "dependencies": { + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true + }, + "interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "dev": true + }, + "rechoir": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz", + "integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==", + "dev": true, + "requires": { + "resolve": "^1.9.0" + } + } + } + }, + "webpack-dashboard": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/webpack-dashboard/-/webpack-dashboard-3.2.1.tgz", + "integrity": "sha512-ICUKmMOiVEqCVMy9QH7uJwpiZ+neJinZBcyLlmKy7PFWgdDccqiyuZtPb56xAg4WQZ2zfhqiNnT/Ekiw5Kz8MQ==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "commander": "^2.15.1", + "cross-spawn": "^6.0.5", + "filesize": "^3.6.1", + "handlebars": "^4.1.2", + "inspectpack": "^4.2.1", + "most": "^1.7.3", + "neo-blessed": "^0.2.0", + "socket.io": "^2.1.1", + "socket.io-client": "^2.1.1" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "filesize": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", + "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "webpack-dev-middleware": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz", + "integrity": "sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ==", + "dev": true, + "requires": { + "memory-fs": "^0.4.1", + "mime": "^2.4.4", + "mkdirp": "^0.5.1", + "range-parser": "^1.2.1", + "webpack-log": "^2.0.0" + }, + "dependencies": { + "mime": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", + "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", + "dev": true + } + } + }, + "webpack-dev-server": { + "version": "3.11.2", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.2.tgz", + "integrity": "sha512-A80BkuHRQfCiNtGBS1EMf2ChTUs0x+B3wGDFmOeT4rmJOHhHTCH2naNxIHhmkr0/UillP4U3yeIyv1pNp+QDLQ==", + "dev": true, + "requires": { + "ansi-html": "0.0.7", + "bonjour": "^3.5.0", + "chokidar": "^2.1.8", + "compression": "^1.7.4", + "connect-history-api-fallback": "^1.6.0", + "debug": "^4.1.1", + "del": "^4.1.1", + "express": "^4.17.1", + "html-entities": "^1.3.1", + "http-proxy-middleware": "0.19.1", + "import-local": "^2.0.0", + "internal-ip": "^4.3.0", + "ip": "^1.1.5", + "is-absolute-url": "^3.0.3", + "killable": "^1.0.1", + "loglevel": "^1.6.8", + "opn": "^5.5.0", + "p-retry": "^3.0.1", + "portfinder": "^1.0.26", + "schema-utils": "^1.0.0", + "selfsigned": "^1.10.8", + "semver": "^6.3.0", + "serve-index": "^1.9.1", + "sockjs": "^0.3.21", + "sockjs-client": "^1.5.0", + "spdy": "^4.0.2", + "strip-ansi": "^3.0.1", + "supports-color": "^6.1.0", + "url": "^0.11.0", + "webpack-dev-middleware": "^3.7.2", + "webpack-log": "^2.0.0", + "ws": "^6.2.1", + "yargs": "^13.3.2" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "webpack-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", + "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", + "dev": true, + "requires": { + "ansi-colors": "^3.0.0", + "uuid": "^3.3.2" + } + }, + "webpack-manifest-plugin": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/webpack-manifest-plugin/-/webpack-manifest-plugin-2.2.0.tgz", + "integrity": "sha512-9S6YyKKKh/Oz/eryM1RyLVDVmy3NSPV0JXMRhZ18fJsq+AwGxUY34X54VNwkzYcEmEkDwNxuEOboCZEebJXBAQ==", + "dev": true, + "requires": { + "fs-extra": "^7.0.0", + "lodash": ">=3.5 <5", + "object.entries": "^1.1.0", + "tapable": "^1.0.0" + }, + "dependencies": { + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true + } + } + }, + "webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + } + }, + "webpack-notifier": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/webpack-notifier/-/webpack-notifier-1.11.0.tgz", + "integrity": "sha512-IhgldCkfrUaLP4dCPlac0pBGdNtBiiQJmcVlg/IgWgbU7O+J83EmvbR1m2LAe/WxgBxV2x+otN46PtL0pTgWkQ==", + "dev": true, + "requires": { + "node-notifier": "^6.0.0", + "object-assign": "^4.1.0", + "strip-ansi": "^3.0.1" + } + }, + "webpack-sources": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.0.tgz", + "integrity": "sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" + } + }, + "websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "requires": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true + }, + "webworker-promise": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/webworker-promise/-/webworker-promise-0.4.2.tgz", + "integrity": "sha512-/se9zS6MpRhyodk+C7YcBZq5mY1apJvKys6Tb6t2NDDeRMGgRuuyYjox38PssylFyPodjPEab/S0WuA20CFu7g==" + }, + "whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "dev": true + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wordwrapjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", + "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", + "dev": true, + "requires": { + "reduce-flatten": "^2.0.0", + "typical": "^5.2.0" + } + }, + "workbox-background-sync": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.1.5.tgz", + "integrity": "sha512-VbUmPLsdz+sLzuNxHvMylzyRTiM4q+q7rwLBk3p2mtRL5NZozI8j/KgoGbno96vs84jx4b9zCZMEOIKEUTPf6w==", + "dev": true, + "requires": { + "workbox-core": "^6.1.5" + } + }, + "workbox-broadcast-update": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-6.1.5.tgz", + "integrity": "sha512-zGrTTs+n4wHpYtqYMqBg6kl/x5j1UrczGCQnODSHTxIDV8GXLb/GtA1BCZdysNxpMmdVSeLmTcgIYAAqWFamrA==", + "dev": true, + "requires": { + "workbox-core": "^6.1.5" + } + }, + "workbox-build": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-6.1.5.tgz", + "integrity": "sha512-P+fakR5QFVqJN9l9xHVXtmafga72gh9I+jM3A9HiB/6UNRmOAejXnDgD+RMegOHgQHPwnB44TalMToFaXKWIyA==", + "dev": true, + "requires": { + "@babel/core": "^7.11.1", + "@babel/preset-env": "^7.11.0", + "@babel/runtime": "^7.11.2", + "@hapi/joi": "^16.1.8", + "@rollup/plugin-babel": "^5.2.0", + "@rollup/plugin-node-resolve": "^11.2.1", + "@rollup/plugin-replace": "^2.4.1", + "@surma/rollup-plugin-off-main-thread": "^1.4.1", + "common-tags": "^1.8.0", + "fast-json-stable-stringify": "^2.1.0", + "fs-extra": "^9.0.1", + "glob": "^7.1.6", + "lodash": "^4.17.20", + "pretty-bytes": "^5.3.0", + "rollup": "^2.43.1", + "rollup-plugin-terser": "^7.0.0", + "source-map": "^0.8.0-beta.0", + "source-map-url": "^0.4.0", + "stringify-object": "^3.3.0", + "strip-comments": "^2.0.1", + "tempy": "^0.6.0", + "upath": "^1.2.0", + "workbox-background-sync": "^6.1.5", + "workbox-broadcast-update": "^6.1.5", + "workbox-cacheable-response": "^6.1.5", + "workbox-core": "^6.1.5", + "workbox-expiration": "^6.1.5", + "workbox-google-analytics": "^6.1.5", + "workbox-navigation-preload": "^6.1.5", + "workbox-precaching": "^6.1.5", + "workbox-range-requests": "^6.1.5", + "workbox-recipes": "^6.1.5", + "workbox-routing": "^6.1.5", + "workbox-strategies": "^6.1.5", + "workbox-streams": "^6.1.5", + "workbox-sw": "^6.1.5", + "workbox-window": "^6.1.5" + }, + "dependencies": { + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "requires": { + "whatwg-url": "^7.0.0" + } + }, + "tempy": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tempy/-/tempy-0.6.0.tgz", + "integrity": "sha512-G13vtMYPT/J8A4X2SjdtBTphZlrp1gKv6hZiOjw14RCWg6GbHuQBGtjlx75xLbYV/wEc0D7G5K4rxKP/cXk8Bw==", + "dev": true, + "requires": { + "is-stream": "^2.0.0", + "temp-dir": "^2.0.0", + "type-fest": "^0.16.0", + "unique-string": "^2.0.0" + } + }, + "type-fest": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.16.0.tgz", + "integrity": "sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==", + "dev": true + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + } + } + }, + "workbox-cacheable-response": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-6.1.5.tgz", + "integrity": "sha512-x8DC71lO/JCgiaJ194l9le8wc8lFPLgUpDkLhp2si7mXV6S/wZO+8Osvw1LLgYa8YYTWGbhbFhFTXIkEMknIIA==", + "dev": true, + "requires": { + "workbox-core": "^6.1.5" + } + }, + "workbox-core": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.1.5.tgz", + "integrity": "sha512-9SOEle7YcJzg3njC0xMSmrPIiFjfsFm9WjwGd5enXmI8Lwk8wLdy63B0nzu5LXoibEmS9k+aWF8EzaKtOWjNSA==", + "dev": true + }, + "workbox-expiration": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-6.1.5.tgz", + "integrity": "sha512-6cN+FVbh8fNq56LFKPMchGNKCJeyboHsDuGBqmhDUPvD4uDjsegQpDQzn52VaE0cpywbSIsDF/BSq9E9Yjh5oQ==", + "dev": true, + "requires": { + "workbox-core": "^6.1.5" + } + }, + "workbox-google-analytics": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-6.1.5.tgz", + "integrity": "sha512-LYsJ/VxTkYVLxM1uJKXZLz4cJdemidY7kPyAYtKVZ6EiDG89noASqis75/5lhqM1m3HwQfp2DtoPrelKSpSDBA==", + "dev": true, + "requires": { + "workbox-background-sync": "^6.1.5", + "workbox-core": "^6.1.5", + "workbox-routing": "^6.1.5", + "workbox-strategies": "^6.1.5" + } + }, + "workbox-navigation-preload": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-6.1.5.tgz", + "integrity": "sha512-hDbNcWlffv0uvS21jCAC/mYk7NzaGRSWOQXv1p7bj2aONAX5l699D2ZK4D27G8TO0BaLHUmW/1A5CZcsvweQdg==", + "dev": true, + "requires": { + "workbox-core": "^6.1.5" + } + }, + "workbox-precaching": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-6.1.5.tgz", + "integrity": "sha512-yhm1kb6wgi141JeM5X7z42XJxCry53tbMLB3NgrxktrZbwbrJF8JILzYy+RFKC9tHC6u2bPmL789GPLT2NCDzw==", + "dev": true, + "requires": { + "workbox-core": "^6.1.5", + "workbox-routing": "^6.1.5", + "workbox-strategies": "^6.1.5" + } + }, + "workbox-range-requests": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-6.1.5.tgz", + "integrity": "sha512-iACChSapzB0yuIum3ascP/+cfBNuZi5DRrE+u4u5mCHigPlwfSWtlaY+y8p+a8EwcDTVTZVtnrGrRnF31SiLqQ==", + "dev": true, + "requires": { + "workbox-core": "^6.1.5" + } + }, + "workbox-recipes": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-recipes/-/workbox-recipes-6.1.5.tgz", + "integrity": "sha512-MD1yabHca6O/oj1hrRdfj9cRwhKA5zqIE53rWOAg/dKMMzWQsf9nyRbXRgzK3a13iQvYKuQzURU4Cx58tdnR+Q==", + "dev": true, + "requires": { + "workbox-cacheable-response": "^6.1.5", + "workbox-core": "^6.1.5", + "workbox-expiration": "^6.1.5", + "workbox-precaching": "^6.1.5", + "workbox-routing": "^6.1.5", + "workbox-strategies": "^6.1.5" + } + }, + "workbox-routing": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.1.5.tgz", + "integrity": "sha512-uC/Ctz+4GXGL42h1WxUNKxqKRik/38uS0NZ6VY/EHqL2F1ObLFqMHUZ4ZYvyQsKdyI82cxusvhJZHOrY0a2fIQ==", + "dev": true, + "requires": { + "workbox-core": "^6.1.5" + } + }, + "workbox-strategies": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.1.5.tgz", + "integrity": "sha512-QhiOn9KT9YGBdbfWOmJT6pXZOIAxaVrs6J6AMYzRpkUegBTEcv36+ZhE/cfHoT0u2fxVtthHnskOQ/snEzaXQw==", + "dev": true, + "requires": { + "workbox-core": "^6.1.5" + } + }, + "workbox-streams": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-6.1.5.tgz", + "integrity": "sha512-OI1kLvRHGFXV+soDvs6aEwfBwdAkvPB0mRryqdh3/K17qUj/1gRXc8QtpgU+83xqx/I/ar2bTCIj0KPzI/ChCQ==", + "dev": true, + "requires": { + "workbox-core": "^6.1.5", + "workbox-routing": "^6.1.5" + } + }, + "workbox-sw": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-6.1.5.tgz", + "integrity": "sha512-IMDiqxYbKzPorZLGMUMacLB6r76iVQbdTzYthIZoPfy+uFURJFUtqiWQJKg1L+RMyuYXwKXTahCIGkgFs4jBeg==", + "dev": true + }, + "workbox-webpack-plugin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-6.0.0.tgz", + "integrity": "sha512-VSiRZhqgXejbIz/dP/bPFsS45QfnZzI0wftFSJrpb6sdMsqlvBTOZpJyUQdhJtt2UbNkoJchFkn2pGNI4KR9CQ==", + "dev": true, + "requires": { + "fast-json-stable-stringify": "^2.1.0", + "pretty-bytes": "^5.4.1", + "source-map-url": "^0.4.0", + "upath": "^1.2.0", + "webpack-sources": "^1.4.3", + "workbox-build": "^6.0.0" + }, + "dependencies": { + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + } + } + }, + "workbox-window": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-6.1.5.tgz", + "integrity": "sha512-akL0X6mAegai2yypnq78RgfazeqvKbsllRtEI4dnbhPcRINEY1NmecFmsQk8SD+zWLK1gw5OdwAOX+zHSRVmeA==", + "dev": true, + "requires": { + "workbox-core": "^6.1.5" + } + }, + "worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, + "worker-loader": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-3.0.8.tgz", + "integrity": "sha512-XQyQkIFeRVC7f7uRhFdNMe/iJOdO6zxAaR3EWbDp45v3mDhrTi+++oswKNxShUNjPC/1xUp5DB29YKLhFo129g==", + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + } + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "write-file-webpack-plugin": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/write-file-webpack-plugin/-/write-file-webpack-plugin-4.5.1.tgz", + "integrity": "sha512-AZ7qJUvhTCBiOtG21aFJUcNuLVo2FFM6JMGKvaUGAH+QDqQAp2iG0nq3GcuXmJOFQR2JjpjhyYkyPrbFKhdjNQ==", + "dev": true, + "requires": { + "chalk": "^2.4.0", + "debug": "^3.1.0", + "filesize": "^3.6.1", + "lodash": "^4.17.13", + "mkdirp": "^0.5.1", + "moment": "^2.22.1", + "write-file-atomic": "^2.3.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "filesize": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", + "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", + "dev": true + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "ws": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + }, + "xmlbuilder2": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/xmlbuilder2/-/xmlbuilder2-2.4.1.tgz", + "integrity": "sha512-vliUplZsk5vJnhxXN/mRcij/AE24NObTUm/Zo4vkLusgayO6s3Et5zLEA14XZnY1c3hX5o1ToR0m0BJOPy0UvQ==", + "requires": { + "@oozcitak/dom": "1.15.8", + "@oozcitak/infra": "1.0.8", + "@oozcitak/util": "8.3.8", + "@types/node": "*", + "js-yaml": "3.14.0" + } + }, + "xmlhttprequest-ssl": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.6.3.tgz", + "integrity": "sha512-3XfeQE/wNkvrIktn2Kf0869fC0BN6UpydVasGIeSm2B1Llihf7/0UfZM+eCkOw3P7bP4+qPgqhm7ZoxuJtFU0Q==", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "yeast": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", + "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + } + } +} diff --git a/django-rgd-3d/vtkjs_viewer/package.json b/django-rgd-3d/vtkjs_viewer/package.json new file mode 100644 index 000000000..2e56b994c --- /dev/null +++ b/django-rgd-3d/vtkjs_viewer/package.json @@ -0,0 +1,25 @@ +{ + "name": "vtkjs_viewer", + "version": "1.0.0", + "description": "VTK.js Viewer", + "main": "index.js", + "scripts": { + "build": "webpack --progress --color --mode development", + "build:release": "webpack --progress --color --mode production", + "start": "webpack-dev-server --content-base ./dist", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Bane Sullivan", + "license": "Apache", + "devDependencies": { + "css-loader": "^5.2.6", + "kw-web-suite": "^11.1.0", + "style-loader": "^3.0.0", + "webpack": "^5.42.0", + "webpack-cli": "^4.7.2", + "webpack-dev-server": "^3.11.2" + }, + "dependencies": { + "@kitware/vtk.js": "^18.4.1" + } +} diff --git a/django-rgd-3d/vtkjs_viewer/src/GeometryViewer.module.css b/django-rgd-3d/vtkjs_viewer/src/GeometryViewer.module.css new file mode 100644 index 000000000..1e0d297bf --- /dev/null +++ b/django-rgd-3d/vtkjs_viewer/src/GeometryViewer.module.css @@ -0,0 +1,108 @@ +.button { + /* position: absolute; */ + right: 5px; + top: 5px; + width: 1em; + z-index: 2; + cursor: pointer; +} + +.rootController { + display: flex; + flex-direction: column; + /* position: absolute; */ + top: 5px; + left: 5px; + right: 5px; + z-index: 1; +} + +.control { + display: flex; + flex-direction: row; + flex: 1; + align-items: center; +} + +.fullScreen { + /* position: absolute; */ + width: 100vw; + height: 100vh; + top: 0; + left: 0; + overflow: hidden; + background: black; + margin: 0; + padding: 0; + z-index: -1; + display: flex; + align-items: center; + justify-content: center; +} + +.fullParentSize { + /* position: absolute; */ + width: 100%; + height: 100%; + top: 0; + left: 0; + overflow: hidden; +} + +.selector { + background: transparent; + border: none; + margin: 5px; + z-index: 1; + max-width: 100px; + min-width: 100px; +} + +label.selector { + font-size: 12px; + text-overflow: ellipsis; + overflow: hidden; +} + +select:focus { + outline: none; + border: none; +} + +.progress { + flex: none; + font-size: 50px; + color: white; + z-index: 1; + background: rgba(128,128,128,.5); + padding: 20px; + border-radius: 10px; + user-select: none; +} + +.dark { + composes: selector; + color: white; +} + +.dark option { + color: black; +} + +.light { + composes: selector; + color: black; +} + +.light option { + color: white; +} + +.fpsMonitor { + /* position: absolute; */ + bottom: 10px; + left: 10px; + background-color: rgba(255, 255, 255, 0.5); + border-radius: 5px; + border: solid 1px gray; +} diff --git a/django-rgd-3d/vtkjs_viewer/src/favicon-96x96.png b/django-rgd-3d/vtkjs_viewer/src/favicon-96x96.png new file mode 100644 index 000000000..4408e2e63 Binary files /dev/null and b/django-rgd-3d/vtkjs_viewer/src/favicon-96x96.png differ diff --git a/django-rgd-3d/vtkjs_viewer/src/index.js b/django-rgd-3d/vtkjs_viewer/src/index.js new file mode 100644 index 000000000..401188e8e --- /dev/null +++ b/django-rgd-3d/vtkjs_viewer/src/index.js @@ -0,0 +1,443 @@ +// Load the rendering pieces we want to use (for both WebGL and WebGPU) +import '@kitware/vtk.js/Rendering/Profiles/Geometry'; + +import { debounce } from '@kitware/vtk.js/macro'; +import vtkActor from '@kitware/vtk.js/Rendering/Core/Actor'; +import vtkDataArray from '@kitware/vtk.js/Common/Core/DataArray'; +import vtkScalarBarActor from '@kitware/vtk.js/Rendering/Core/ScalarBarActor'; +import vtkColorMaps from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps'; +import vtkColorTransferFunction from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction'; +import vtkFullScreenRenderWindow from '@kitware/vtk.js/Rendering/Misc/FullScreenRenderWindow'; +import vtkMapper from '@kitware/vtk.js/Rendering/Core/Mapper'; +import vtkURLExtract from '@kitware/vtk.js/Common/Core/URLExtract'; +import vtkXMLPolyDataReader from '@kitware/vtk.js/IO/XML/XMLPolyDataReader'; +import vtkFPSMonitor from '@kitware/vtk.js/Interaction/UI/FPSMonitor'; +import Base64 from '@kitware/vtk.js/Common/Core/Base64'; + +// Force DataAccessHelper to have access to various data source +import '@kitware/vtk.js/IO/Core/DataAccessHelper/HtmlDataAccessHelper'; +import '@kitware/vtk.js/IO/Core/DataAccessHelper/JSZipDataAccessHelper'; + +import { + ColorMode, + ScalarMode +} from '@kitware/vtk.js/Rendering/Core/Mapper/Constants'; + +import style from './GeometryViewer.module.css'; +import icon from './favicon-96x96.png'; + +let background = [0, 0, 0]; +let renderWindow; +let renderer; +let scalarBarActor; + +global.pipeline = {}; + +// Process arguments from URL +const userParams = vtkURLExtract.extractURLParameters(); + +// Background handling +if (userParams.background) { + background = userParams.background.split(',').map((s) => Number(s)); +} +const selectorClass = + background.length === 3 && background.reduce((a, b) => a + b, 0) < 1.5 + ? style.dark + : style.light; + +// lut +const lutName = userParams.lut || 'erdc_rainbow_bright'; + +// field +const field = userParams.field || ''; + +// camera +function updateCamera (camera) { + ['zoom', 'pitch', 'elevation', 'yaw', 'azimuth', 'roll', 'dolly'].forEach( + (key) => { + if (userParams[key]) { + camera[key](userParams[key]); + } + renderWindow.render(); + } + ); +} +global.updateCamera = updateCamera; + +// ---------------------------------------------------------------------------- +// DOM containers for UI control +// ---------------------------------------------------------------------------- + +const rootControllerContainer = document.createElement('div'); +rootControllerContainer.setAttribute('class', style.rootController); + +const addDataSetButton = document.createElement('img'); +addDataSetButton.setAttribute('class', style.button); +addDataSetButton.setAttribute('src', icon); +addDataSetButton.addEventListener('click', () => { + const isVisible = rootControllerContainer.style.display !== 'none'; + rootControllerContainer.style.display = isVisible ? 'none' : 'flex'; +}); + +const fpsMonitor = vtkFPSMonitor.newInstance(); +const fpsElm = fpsMonitor.getFpsMonitorContainer(); +fpsElm.classList.add(style.fpsMonitor); + +// ---------------------------------------------------------------------------- +// Add class to body if iOS device +// ---------------------------------------------------------------------------- + +const iOS = /iPad|iPhone|iPod/.test(window.navigator.platform); + +if (iOS) { + document.querySelector('body').classList.add('is-ios-device'); +} + +// ---------------------------------------------------------------------------- + +function emptyContainer (container) { + fpsMonitor.setContainer(null); + while (container.firstChild) { + container.removeChild(container.firstChild); + } +} + +global.emptyContainer = emptyContainer; +// ---------------------------------------------------------------------------- + +function createViewer (container) { + const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({ + background, + rootContainer: container, + containerStyle: { height: '100%', width: '100%', position: 'absolute' } + }); + renderer = fullScreenRenderer.getRenderer(); + renderWindow = fullScreenRenderer.getRenderWindow(); + + global.fullScreenRenderer = fullScreenRenderer; + global.renderer = renderer; + global.renderWindow = renderWindow; + + renderWindow.getInteractor().setDesiredUpdateRate(15); + + container.appendChild(rootControllerContainer); + container.appendChild(addDataSetButton); + + scalarBarActor = vtkScalarBarActor.newInstance(); + renderer.addActor(scalarBarActor); + + if (userParams.fps) { + if (Array.isArray(userParams.fps)) { + fpsMonitor.setMonitorVisibility(...userParams.fps); + if (userParams.fps.length === 4) { + fpsMonitor.setOrientation(userParams.fps[3]); + } + } + fpsMonitor.setRenderWindow(renderWindow); + fpsMonitor.setContainer(container); + fullScreenRenderer.setResizeCallback(fpsMonitor.update); + } +} +global.createViewer = createViewer; + +// ---------------------------------------------------------------------------- + +function createPipeline (fileContents, name = undefined) { + // Create UI + const presetSelector = document.createElement('select'); + presetSelector.setAttribute('class', selectorClass); + presetSelector.innerHTML = vtkColorMaps.rgbPresetNames + .map( + (name) => + `<option value="${name}" ${ + lutName === name ? 'selected="selected"' : '' + }>${name}</option>` + ) + .join(''); + + const representationSelector = document.createElement('select'); + representationSelector.setAttribute('class', selectorClass); + representationSelector.innerHTML = [ + 'Hidden', + 'Points', + 'Wireframe', + 'Surface', + 'Surface with Edge' + ] + .map( + (name, idx) => + `<option value="${idx === 0 ? 0 : 1}:${idx < 4 ? idx - 1 : 2}:${ + idx === 4 ? 1 : 0 + }">${name}</option>` + ) + .join(''); + representationSelector.value = '1:2:0'; + + const colorBySelector = document.createElement('select'); + colorBySelector.setAttribute('class', selectorClass); + + const componentSelector = document.createElement('select'); + componentSelector.setAttribute('class', selectorClass); + componentSelector.style.display = 'none'; + + const opacitySelector = document.createElement('input'); + opacitySelector.setAttribute('class', selectorClass); + opacitySelector.setAttribute('type', 'range'); + opacitySelector.setAttribute('value', '100'); + opacitySelector.setAttribute('max', '100'); + opacitySelector.setAttribute('min', '1'); + + const pointSizeSelector = document.createElement('input'); + pointSizeSelector.setAttribute('class', selectorClass); + pointSizeSelector.setAttribute('type', 'range'); + pointSizeSelector.setAttribute('value', '1'); + pointSizeSelector.setAttribute('max', '20'); + pointSizeSelector.setAttribute('min', '1'); + pointSizeSelector.style.display = 'none'; // Deafault hidden + + if (name === undefined) { + name = 'Mesh'; + } + const labelSelector = document.createElement('label'); + labelSelector.setAttribute('class', selectorClass); + labelSelector.innerHTML = name; + + const controlContainer = document.createElement('div'); + controlContainer.setAttribute('class', style.control); + controlContainer.appendChild(labelSelector); + controlContainer.appendChild(representationSelector); + controlContainer.appendChild(presetSelector); + controlContainer.appendChild(colorBySelector); + controlContainer.appendChild(componentSelector); + controlContainer.appendChild(opacitySelector); + controlContainer.appendChild(pointSizeSelector); + rootControllerContainer.appendChild(controlContainer); + + // VTK pipeline + const vtpReader = vtkXMLPolyDataReader.newInstance(); + var buffer = Base64.toArrayBuffer(fileContents); + vtpReader.parseAsArrayBuffer(buffer); + + const lookupTable = vtkColorTransferFunction.newInstance(); + const source = vtpReader.getOutputData(0); + const mapper = vtkMapper.newInstance({ + interpolateScalarsBeforeMapping: false, + useLookupTableScalarRange: true, + lookupTable, + scalarVisibility: false + }); + const actor = vtkActor.newInstance(); + const scalars = source.getPointData().getScalars(); + const dataRange = [].concat(scalars ? scalars.getRange() : [0, 1]); + let activeArray = vtkDataArray; + + // -------------------------------------------------------------------- + // Color handling + // -------------------------------------------------------------------- + + function applyPreset () { + const preset = vtkColorMaps.getPresetByName(presetSelector.value); + lookupTable.applyColorMap(preset); + lookupTable.setMappingRange(dataRange[0], dataRange[1]); + lookupTable.updateRange(); + renderWindow.render(); + } + applyPreset(); + presetSelector.addEventListener('change', applyPreset); + + // -------------------------------------------------------------------- + // Representation handling + // -------------------------------------------------------------------- + + function updateRepresentation (event) { + const [ + visibility, + representation, + edgeVisibility + ] = event.target.value.split(':').map(Number); + actor.getProperty().set({ representation, edgeVisibility }); + actor.setVisibility(!!visibility); + renderWindow.render(); + console.log(representation); + if (representation === 0) { + // Points === 0 + pointSizeSelector.style.display = 'block'; + } else { + pointSizeSelector.style.display = 'none'; + } + } + representationSelector.addEventListener('change', updateRepresentation); + + // -------------------------------------------------------------------- + // Opacity handling + // -------------------------------------------------------------------- + + function updateOpacity (event) { + const opacity = Number(event.target.value) / 100; + actor.getProperty().setOpacity(opacity); + renderWindow.render(); + } + + opacitySelector.addEventListener('input', updateOpacity); + + // -------------------------------------------------------------------- + // Point size handling + // -------------------------------------------------------------------- + + function updatePointSize (event) { + const pointSize = Number(event.target.value); + actor.getProperty().setPointSize(pointSize); + renderWindow.render(); + } + + pointSizeSelector.addEventListener('input', updatePointSize); + + // -------------------------------------------------------------------- + // ColorBy handling + // -------------------------------------------------------------------- + + const colorByOptions = [{ value: ':', label: 'Solid color' }].concat( + source + .getPointData() + .getArrays() + .map((a) => ({ + label: `(p) ${a.getName()}`, + value: `PointData:${a.getName()}` + })), + source + .getCellData() + .getArrays() + .map((a) => ({ + label: `(c) ${a.getName()}`, + value: `CellData:${a.getName()}` + })) + ); + colorBySelector.innerHTML = colorByOptions + .map( + ({ label, value }) => + `<option value="${value}" ${ + field === value ? 'selected="selected"' : '' + }>${label}</option>` + ) + .join(''); + + function updateColorBy (event) { + const [location, colorByArrayName] = event.target.value.split(':'); + const interpolateScalarsBeforeMapping = location === 'PointData'; + let colorMode = ColorMode.DEFAULT; + let scalarMode = ScalarMode.DEFAULT; + const scalarVisibility = location.length > 0; + if (scalarVisibility) { + const newArray = source[`get${location}`]().getArrayByName( + colorByArrayName + ); + activeArray = newArray; + const newDataRange = activeArray.getRange(); + dataRange[0] = newDataRange[0]; + dataRange[1] = newDataRange[1]; + colorMode = ColorMode.MAP_SCALARS; + scalarMode = + location === 'PointData' + ? ScalarMode.USE_POINT_FIELD_DATA + : ScalarMode.USE_CELL_FIELD_DATA; + + const numberOfComponents = activeArray.getNumberOfComponents(); + if (numberOfComponents > 1) { + // always start on magnitude setting + if (mapper.getLookupTable()) { + const lut = mapper.getLookupTable(); + lut.setVectorModeToMagnitude(); + } + componentSelector.style.display = 'block'; + const compOpts = ['Magnitude']; + while (compOpts.length <= numberOfComponents) { + compOpts.push(`Component ${compOpts.length}`); + } + componentSelector.innerHTML = compOpts + .map((t, index) => `<option value="${index - 1}">${t}</option>`) + .join(''); + if (numberOfComponents > 2 && numberOfComponents < 5) { + componentSelector.innerHTML += '<option value="-2">RGB(A)</option>'; + } + } else { + componentSelector.style.display = 'none'; + } + scalarBarActor.setAxisLabel(colorByArrayName); + scalarBarActor.setVisibility(true); + } else { + componentSelector.style.display = 'none'; + scalarBarActor.setVisibility(false); + } + mapper.set({ + colorByArrayName, + colorMode, + interpolateScalarsBeforeMapping, + scalarMode, + scalarVisibility + }); + applyPreset(); + } + colorBySelector.addEventListener('change', updateColorBy); + updateColorBy({ target: colorBySelector }); + + function updateColorByComponent (event) { + if (mapper.getLookupTable()) { + const lut = mapper.getLookupTable(); + const v = Number(event.target.value); + if (v === -1) { + lut.setVectorModeToMagnitude(); + mapper.setColorModeToMapScalars(); + scalarBarActor.setVisibility(true); + } else if (v === -2) { + lut.setVectorModeToRGBColors(); + mapper.setColorModeToDirectScalars(); + scalarBarActor.setVisibility(false); + } else { + lut.setVectorModeToComponent(); + mapper.setColorModeToMapScalars(); + scalarBarActor.setVisibility(true); + lut.setVectorComponent(v); + const newDataRange = activeArray.getRange(v); + dataRange[0] = newDataRange[0]; + dataRange[1] = newDataRange[1]; + lookupTable.setMappingRange(dataRange[0], dataRange[1]); + lut.updateRange(); + } + renderWindow.render(); + } + } + componentSelector.addEventListener('change', updateColorByComponent); + + // -------------------------------------------------------------------- + // Pipeline handling + // -------------------------------------------------------------------- + + actor.setMapper(mapper); + mapper.setInputData(source); + renderer.addActor(actor); + + scalarBarActor.setScalarsToColors(mapper.getLookupTable()); + + // Manage update when lookupTable change + const debouncedRender = debounce(renderWindow.render, 10); + lookupTable.onModified(debouncedRender, -1); + + // First render + renderer.resetCamera(); + renderWindow.render(); + + // global.pipeline[fileName] = { + // actor, + // mapper, + // source, + // lookupTable, + // renderer, + // renderWindow, + // }; + + // Update stats + fpsMonitor.update(); +} + +global.createPipeline = createPipeline; +// ---------------------------------------------------------------------------- diff --git a/django-rgd-3d/vtkjs_viewer/webpack.config.js b/django-rgd-3d/vtkjs_viewer/webpack.config.js new file mode 100644 index 000000000..b83584c0f --- /dev/null +++ b/django-rgd-3d/vtkjs_viewer/webpack.config.js @@ -0,0 +1,29 @@ +var path = require('path'); +var webpack = require('webpack'); +var vtkRules = require('@kitware/vtk.js/Utilities/config/dependency.js').webpack.core.rules; +var cssRules = require('@kitware/vtk.js/Utilities/config/dependency.js').webpack.css.rules; + +var entry = path.join(__dirname, './src/index.js'); +const sourcePath = path.join(__dirname, './src'); +const outputPath = path.join(__dirname, '../rgd_3d/static/rgd_3d/'); + +module.exports = { + entry, + output: { + path: outputPath, + filename: 'vtkjs_viewer.js' + }, + module: { + rules: [ + { test: /\.html$/, loader: 'html-loader' }, + { test: /\.(png|jpg)$/, use: 'url-loader' }, + { test: /\.svg$/, use: [{ loader: 'raw-loader' }] } + ].concat(vtkRules, cssRules) + }, + resolve: { + modules: [ + path.resolve(__dirname, 'node_modules'), + sourcePath + ] + } +}; diff --git a/example_project/rgd_example/settings.py b/example_project/rgd_example/settings.py index 0ad628e4c..afcd8649e 100644 --- a/example_project/rgd_example/settings.py +++ b/example_project/rgd_example/settings.py @@ -19,3 +19,5 @@ REFETCH_SCHEMA_ON_LOGOUT = True OPERATIONS_SORTER = 'alpha' DEEP_LINKING = True + +STATIC_URL = '/static/' diff --git a/pyproject.toml b/pyproject.toml index 6e38a03f6..ba3f2cbee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ line-length = 100 skip-string-normalization = true target-version = ["py38"] -exclude='\.eggs|\.git|\.mypy_cache|\.tox|\.venv|_build|buck-out|build|dist' +exclude='\.eggs|\.git|\.mypy_cache|\.tox|\.venv|_build|buck-out|build|dist|node_modules' [tool.isort] profile = "black"
zulip__zulip-27960
Social links in website footer Discussed here https://chat.zulip.org/#narrow/stream/107-kandra/topic/website.20footer <img width="182" alt="image" src="https://github.com/zulip/zulip/assets/1903309/37ad6196-e5a3-499f-b65c-e035e4901596"> Working demo is on https://terpimost.github.io/zulip-plans/ ```html <div class="footer-social-links"> <a class="social-icon social-icon-mastodon" title="Mastodon" href="https://fosstodon.org/@zulip"></a> <a class="social-icon social-icon-x" title="X (Twitter)" href="https://twitter.com/zulip"></a> <a class="social-icon social-icon-linkedin" title="LinkedIn" href="https://www.linkedin.com/company/zulip-by-kandra-labs/"></a> </div> ``` ```css .footer-social-links{ margin-top: 12px; display: flex; gap: 8px; } .social-icon{ width: 28px; height: 28px; display: inline-block; flex-shrink: 0; background-color: #A3A5F8; mask-position: center; -webkit-mask-position: center; mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-image: var(--icon); -webkit-mask-image: var(--icon); transition: all 150ms ease-out; } .social-icon:hover{ background-color: #D0D1FB; } .social-icon:active{ background-color: #F1F1FE; } .social-icon-mastodon{ --icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none' viewBox='0 0 28 28'%3e%3cg fill='%23A3A5F8'%3e%3cpath d='M18.42 16.43h2.38v-6.02c0-1.23-.3-2.2-.94-2.93a3.27 3.27 0 0 0-2.55-1.1c-1.22 0-2.15.47-2.76 1.41l-.6 1-.58-1a3.07 3.07 0 0 0-2.76-1.4c-1.05 0-1.9.37-2.55 1.1a4.3 4.3 0 0 0-.94 2.92v6.02H9.5v-5.84c0-1.23.52-1.86 1.55-1.86 1.15 0 1.72.74 1.72 2.2v3.2h2.38v-3.2c0-1.46.57-2.2 1.71-2.2 1.04 0 1.56.63 1.56 1.86v5.84Z'/%3e%3cpath fill-rule='evenodd' d='M3 0a3 3 0 0 0-3 3v22a3 3 0 0 0 3 3h22a3 3 0 0 0 3-3V3a3 3 0 0 0-3-3H3Zm18.39 3.6s3.26 1.45 3.26 6.43c0 0 .04 3.66-.46 6.2-.31 1.63-2.81 3.4-5.69 3.74-1.5.18-2.97.34-4.54.27-2.57-.12-4.6-.62-4.6-.62 0 .24.02.48.05.72.33 2.53 2.51 2.68 4.58 2.76 2.09.07 3.94-.52 3.94-.52l.09 1.89s-1.46.78-4.06.92c-1.43.08-3.21-.03-5.28-.58-4.5-1.19-5.27-5.98-5.39-10.84a100.6 100.6 0 0 1-.02-3v-.94c0-4.97 3.27-6.43 3.27-6.43 1.64-.76 4.46-1.07 7.39-1.1H14c2.93.03 5.75.34 7.39 1.1Z' clip-rule='evenodd'/%3e%3c/g%3e%3c/svg%3e"); } .social-icon-x{ --icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none' viewBox='0 0 28 28'%3e%3cg fill='%23A3A5F8' clip-path='url(%23a)'%3e%3cpath d='M18.87 23.69h2.71L9.11 5.36H6.4L18.87 23.7Z'/%3e%3cpath fill-rule='evenodd' d='M3.04.04a3 3 0 0 0-3 3v22a3 3 0 0 0 3 3h22a3 3 0 0 0 3-3v-22a3 3 0 0 0-3-3h-22ZM23.34 4l-7.44 8.89 8.1 12.1h-5.96l-5.45-8.15-6.83 8.15H4l7.8-9.32L4 4h5.96l5.16 7.72L21.58 4h1.77Z' clip-rule='evenodd'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='a'%3e%3crect width='28' height='28' fill='white' rx='3'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"); } .social-icon-linkedin{ --icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none' viewBox='0 0 28 28'%3e%3cg clip-path='url(%23a)'%3e%3cpath fill='%23A3A5F8' d='M28 3a3 3 0 0 0-3-3H3a3 3 0 0 0-3 3v22a3 3 0 0 0 3 3h22a3 3 0 0 0 3-3V3ZM8.27 23.9H4.19V10.5h4.18v13.4h-.1ZM6.17 8.7A2.42 2.42 0 0 1 3.8 6.3c0-1.3 1.1-2.4 2.39-2.4 1.3 0 2.39 1.1 2.39 2.4 0 1.3-1 2.4-2.4 2.4Zm17.65 15.2h-4.09v-6.5c0-1.5 0-3.5-2.2-3.5-2.18 0-2.48 1.7-2.48 3.4v6.6h-4.09V10.5h3.99v1.8h.1c.6-1 1.89-2.2 3.88-2.2 4.19 0 4.98 2.8 4.98 6.4v7.4h-.1Z'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='a'%3e%3cpath fill='white' d='M0 0h28v28H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"); } ```
[ { "content": "import re\nfrom typing import List, Match, Tuple\n\nfrom bs4 import BeautifulSoup\n\n# The phrases in this list will be ignored. The longest phrase is\n# tried first; this removes the chance of smaller phrases changing\n# the text before longer phrases are tried.\n# The errors shown by `tools/check-capitalization` can be added to\n# this list without any modification.\nIGNORED_PHRASES = [\n # Proper nouns and acronyms\n r\"API\",\n r\"APNS\",\n r\"Botserver\",\n r\"Cookie Bot\",\n r\"DevAuthBackend\",\n r\"DSN\",\n r\"GCM\",\n r\"GitHub\",\n r\"Gravatar\",\n r\"Help Center\",\n r\"HTTP\",\n r\"ID\",\n r\"IDs\",\n r\"IP\",\n r\"JSON\",\n r\"Kerberos\",\n r\"LDAP\",\n r\"Markdown\",\n r\"OTP\",\n r\"Pivotal\",\n r\"DM\",\n r\"DMs\",\n r\"Slack\",\n r\"Google\",\n r\"Terms of Service\",\n r\"Tuesday\",\n r\"URL\",\n r\"UUID\",\n r\"Webathena\",\n r\"WordPress\",\n r\"Zephyr\",\n r\"Zoom\",\n r\"Zulip\",\n r\"Zulip Server\",\n r\"Zulip Account Security\",\n r\"Zulip Security\",\n r\"Zulip Cloud\",\n r\"Zulip Cloud Standard\",\n r\"BigBlueButton\",\n # Code things\n r\"\\.zuliprc\",\n # BeautifulSoup will remove <z-user> which is horribly confusing,\n # so we need more of the sentence.\n r\"<z-user></z-user> will have the same role\",\n r\"<z-user></z-user> will have the same properties\",\n # Things using \"I\"\n r\"I understand\",\n r\"I'm\",\n r\"I've\",\n r\"Topics I participate in\",\n r\"Topics I send a message to\",\n r\"Topics I start\",\n # Specific short words\n r\"beta\",\n r\"and\",\n r\"bot\",\n r\"e\\.g\\.\",\n r\"enabled\",\n r\"signups\",\n # Placeholders\n r\"keyword\",\n r\"streamname\",\n r\"user@example\\.com\",\n r\"acme\",\n # Fragments of larger strings\n r\"is …\",\n r\"your subscriptions on your Streams page\",\n r\"Add global time<br />Everyone sees global times in their own time zone\\.\",\n r\"user\",\n r\"an unknown operating system\",\n r\"Go to Settings\",\n # SPECIAL CASES\n # Because topics usually are lower-case, this would look weird if it were capitalized\n r\"more topics\",\n # Used alone in a parenthetical where capitalized looks worse.\n r\"^deprecated$\",\n # We want the similar text in the Private Messages section to have the same capitalization.\n r\"more conversations\",\n r\"back to streams\",\n # Capital 'i' looks weird in reminders popover\n r\"in 1 hour\",\n r\"in 20 minutes\",\n r\"in 3 hours\",\n # these are used as topics\n r\"^new streams$\",\n r\"^stream events$\",\n # These are used as example short names (e.g. an uncapitalized context):\n r\"^marketing$\",\n r\"^cookie$\",\n # Used to refer custom time limits\n r\"\\bN\\b\",\n # Capital c feels obtrusive in clear status option\n r\"clear\",\n r\"group direct messages with \\{recipient\\}\",\n r\"direct messages with \\{recipient\\}\",\n r\"direct messages with yourself\",\n r\"GIF\",\n # Emoji name placeholder\n r\"leafy green vegetable\",\n # Subdomain placeholder\n r\"your-organization-url\",\n # Used in invite modal\n r\"or\",\n # Used in GIPHY integration setting. GIFs Rating.\n r\"rated Y\",\n r\"rated G\",\n r\"rated PG\",\n r\"rated PG13\",\n r\"rated R\",\n # Used in GIPHY popover.\n r\"GIFs\",\n r\"GIPHY\",\n # Used in our case studies\n r\"Technical University of Munich\",\n r\"University of California San Diego\",\n # Used in stream creation form\n r\"email hidden\",\n # Use in compose box.\n r\"to send\",\n r\"to add a new line\",\n # Used in showing Notification Bot read receipts message\n \"Notification Bot\",\n # Used in presence_enabled setting label\n r\"invisible mode off\",\n # Typeahead suggestions for \"Pronouns\" custom field type.\n r\"he/him\",\n r\"she/her\",\n r\"they/them\",\n # Used in message-move-time-limit setting label\n r\"does not apply to moderators and administrators\",\n # Used in message-delete-time-limit setting label\n r\"does not apply to administrators\",\n # Used as indicator with names for guest users.\n r\"guest\",\n # Used in pills for deactivated users.\n r\"deactivated\",\n]\n\n# Sort regexes in descending order of their lengths. As a result, the\n# longer phrases will be ignored first.\nIGNORED_PHRASES.sort(key=lambda regex: len(regex), reverse=True)\n\n# Compile regexes to improve performance. This also extracts the\n# text using BeautifulSoup and then removes extra whitespaces from\n# it. This step enables us to add HTML in our regexes directly.\nCOMPILED_IGNORED_PHRASES = [\n re.compile(\" \".join(BeautifulSoup(regex, \"lxml\").text.split())) for regex in IGNORED_PHRASES\n]\n\nSPLIT_BOUNDARY = \"?.!\" # Used to split string into sentences.\nSPLIT_BOUNDARY_REGEX = re.compile(rf\"[{SPLIT_BOUNDARY}]\")\n\n# Regexes which check capitalization in sentences.\nDISALLOWED = [\n r\"^[a-z](?!\\})\", # Checks if the sentence starts with a lower case character.\n r\"^[A-Z][a-z]+[\\sa-z0-9]+[A-Z]\", # Checks if an upper case character exists\n # after a lower case character when the first character is in upper case.\n]\nDISALLOWED_REGEX = re.compile(r\"|\".join(DISALLOWED))\n\nBANNED_WORDS = {\n \"realm\": \"The term realm should not appear in user-facing strings. Use organization instead.\",\n}\n\n\ndef get_safe_phrase(phrase: str) -> str:\n \"\"\"\n Safe phrase is in lower case and doesn't contain characters which can\n conflict with split boundaries. All conflicting characters are replaced\n with low dash (_).\n \"\"\"\n phrase = SPLIT_BOUNDARY_REGEX.sub(\"_\", phrase)\n return phrase.lower()\n\n\ndef replace_with_safe_phrase(matchobj: Match[str]) -> str:\n \"\"\"\n The idea is to convert IGNORED_PHRASES into safe phrases, see\n `get_safe_phrase()` function. The only exception is when the\n IGNORED_PHRASE is at the start of the text or after a split\n boundary; in this case, we change the first letter of the phrase\n to upper case.\n \"\"\"\n ignored_phrase = matchobj.group(0)\n safe_string = get_safe_phrase(ignored_phrase)\n\n start_index = matchobj.start()\n complete_string = matchobj.string\n\n is_string_start = start_index == 0\n # We expect that there will be one space between split boundary\n # and the next word.\n punctuation = complete_string[max(start_index - 2, 0)]\n is_after_split_boundary = punctuation in SPLIT_BOUNDARY\n if is_string_start or is_after_split_boundary:\n return safe_string.capitalize()\n\n return safe_string\n\n\ndef get_safe_text(text: str) -> str:\n \"\"\"\n This returns text which is rendered by BeautifulSoup and is in the\n form that can be split easily and has all IGNORED_PHRASES processed.\n \"\"\"\n soup = BeautifulSoup(text, \"lxml\")\n text = \" \".join(soup.text.split()) # Remove extra whitespaces.\n for phrase_regex in COMPILED_IGNORED_PHRASES:\n text = phrase_regex.sub(replace_with_safe_phrase, text)\n\n return text\n\n\ndef is_capitalized(safe_text: str) -> bool:\n sentences = SPLIT_BOUNDARY_REGEX.split(safe_text)\n return not any(DISALLOWED_REGEX.search(sentence.strip()) for sentence in sentences)\n\n\ndef check_banned_words(text: str) -> List[str]:\n lower_cased_text = text.lower()\n errors = []\n for word, reason in BANNED_WORDS.items():\n if word in lower_cased_text:\n # Hack: Should move this into BANNED_WORDS framework; for\n # now, just hand-code the skips:\n if \"realm_name\" in lower_cased_text or \"realm_uri\" in lower_cased_text:\n continue\n kwargs = dict(word=word, text=text, reason=reason)\n msg = \"{word} found in '{text}'. {reason}\".format(**kwargs)\n errors.append(msg)\n\n return errors\n\n\ndef check_capitalization(strings: List[str]) -> Tuple[List[str], List[str], List[str]]:\n errors = []\n ignored = []\n banned_word_errors = []\n for text in strings:\n text = \" \".join(text.split()) # Remove extra whitespaces.\n safe_text = get_safe_text(text)\n has_ignored_phrase = text != safe_text\n capitalized = is_capitalized(safe_text)\n if not capitalized:\n errors.append(text)\n elif has_ignored_phrase:\n ignored.append(text)\n\n banned_word_errors.extend(check_banned_words(text))\n\n return sorted(errors), sorted(ignored), sorted(banned_word_errors)\n", "path": "tools/lib/capitalization.py" } ]
[ { "content": "import re\nfrom typing import List, Match, Tuple\n\nfrom bs4 import BeautifulSoup\n\n# The phrases in this list will be ignored. The longest phrase is\n# tried first; this removes the chance of smaller phrases changing\n# the text before longer phrases are tried.\n# The errors shown by `tools/check-capitalization` can be added to\n# this list without any modification.\nIGNORED_PHRASES = [\n # Proper nouns and acronyms\n r\"API\",\n r\"APNS\",\n r\"Botserver\",\n r\"Cookie Bot\",\n r\"DevAuthBackend\",\n r\"DSN\",\n r\"GCM\",\n r\"GitHub\",\n r\"Gravatar\",\n r\"Help Center\",\n r\"HTTP\",\n r\"ID\",\n r\"IDs\",\n r\"IP\",\n r\"JSON\",\n r\"Kerberos\",\n r\"LinkedIn\",\n r\"LDAP\",\n r\"Markdown\",\n r\"OTP\",\n r\"Pivotal\",\n r\"DM\",\n r\"DMs\",\n r\"Slack\",\n r\"Google\",\n r\"Terms of Service\",\n r\"Tuesday\",\n r\"URL\",\n r\"UUID\",\n r\"Webathena\",\n r\"WordPress\",\n r\"Zephyr\",\n r\"Zoom\",\n r\"Zulip\",\n r\"Zulip Server\",\n r\"Zulip Account Security\",\n r\"Zulip Security\",\n r\"Zulip Cloud\",\n r\"Zulip Cloud Standard\",\n r\"BigBlueButton\",\n # Code things\n r\"\\.zuliprc\",\n # BeautifulSoup will remove <z-user> which is horribly confusing,\n # so we need more of the sentence.\n r\"<z-user></z-user> will have the same role\",\n r\"<z-user></z-user> will have the same properties\",\n # Things using \"I\"\n r\"I understand\",\n r\"I'm\",\n r\"I've\",\n r\"Topics I participate in\",\n r\"Topics I send a message to\",\n r\"Topics I start\",\n # Specific short words\n r\"beta\",\n r\"and\",\n r\"bot\",\n r\"e\\.g\\.\",\n r\"enabled\",\n r\"signups\",\n # Placeholders\n r\"keyword\",\n r\"streamname\",\n r\"user@example\\.com\",\n r\"acme\",\n # Fragments of larger strings\n r\"is …\",\n r\"your subscriptions on your Streams page\",\n r\"Add global time<br />Everyone sees global times in their own time zone\\.\",\n r\"user\",\n r\"an unknown operating system\",\n r\"Go to Settings\",\n # SPECIAL CASES\n # Because topics usually are lower-case, this would look weird if it were capitalized\n r\"more topics\",\n # Used alone in a parenthetical where capitalized looks worse.\n r\"^deprecated$\",\n # We want the similar text in the Private Messages section to have the same capitalization.\n r\"more conversations\",\n r\"back to streams\",\n # Capital 'i' looks weird in reminders popover\n r\"in 1 hour\",\n r\"in 20 minutes\",\n r\"in 3 hours\",\n # these are used as topics\n r\"^new streams$\",\n r\"^stream events$\",\n # These are used as example short names (e.g. an uncapitalized context):\n r\"^marketing$\",\n r\"^cookie$\",\n # Used to refer custom time limits\n r\"\\bN\\b\",\n # Capital c feels obtrusive in clear status option\n r\"clear\",\n r\"group direct messages with \\{recipient\\}\",\n r\"direct messages with \\{recipient\\}\",\n r\"direct messages with yourself\",\n r\"GIF\",\n # Emoji name placeholder\n r\"leafy green vegetable\",\n # Subdomain placeholder\n r\"your-organization-url\",\n # Used in invite modal\n r\"or\",\n # Used in GIPHY integration setting. GIFs Rating.\n r\"rated Y\",\n r\"rated G\",\n r\"rated PG\",\n r\"rated PG13\",\n r\"rated R\",\n # Used in GIPHY popover.\n r\"GIFs\",\n r\"GIPHY\",\n # Used in our case studies\n r\"Technical University of Munich\",\n r\"University of California San Diego\",\n # Used in stream creation form\n r\"email hidden\",\n # Use in compose box.\n r\"to send\",\n r\"to add a new line\",\n # Used in showing Notification Bot read receipts message\n \"Notification Bot\",\n # Used in presence_enabled setting label\n r\"invisible mode off\",\n # Typeahead suggestions for \"Pronouns\" custom field type.\n r\"he/him\",\n r\"she/her\",\n r\"they/them\",\n # Used in message-move-time-limit setting label\n r\"does not apply to moderators and administrators\",\n # Used in message-delete-time-limit setting label\n r\"does not apply to administrators\",\n # Used as indicator with names for guest users.\n r\"guest\",\n # Used in pills for deactivated users.\n r\"deactivated\",\n]\n\n# Sort regexes in descending order of their lengths. As a result, the\n# longer phrases will be ignored first.\nIGNORED_PHRASES.sort(key=lambda regex: len(regex), reverse=True)\n\n# Compile regexes to improve performance. This also extracts the\n# text using BeautifulSoup and then removes extra whitespaces from\n# it. This step enables us to add HTML in our regexes directly.\nCOMPILED_IGNORED_PHRASES = [\n re.compile(\" \".join(BeautifulSoup(regex, \"lxml\").text.split())) for regex in IGNORED_PHRASES\n]\n\nSPLIT_BOUNDARY = \"?.!\" # Used to split string into sentences.\nSPLIT_BOUNDARY_REGEX = re.compile(rf\"[{SPLIT_BOUNDARY}]\")\n\n# Regexes which check capitalization in sentences.\nDISALLOWED = [\n r\"^[a-z](?!\\})\", # Checks if the sentence starts with a lower case character.\n r\"^[A-Z][a-z]+[\\sa-z0-9]+[A-Z]\", # Checks if an upper case character exists\n # after a lower case character when the first character is in upper case.\n]\nDISALLOWED_REGEX = re.compile(r\"|\".join(DISALLOWED))\n\nBANNED_WORDS = {\n \"realm\": \"The term realm should not appear in user-facing strings. Use organization instead.\",\n}\n\n\ndef get_safe_phrase(phrase: str) -> str:\n \"\"\"\n Safe phrase is in lower case and doesn't contain characters which can\n conflict with split boundaries. All conflicting characters are replaced\n with low dash (_).\n \"\"\"\n phrase = SPLIT_BOUNDARY_REGEX.sub(\"_\", phrase)\n return phrase.lower()\n\n\ndef replace_with_safe_phrase(matchobj: Match[str]) -> str:\n \"\"\"\n The idea is to convert IGNORED_PHRASES into safe phrases, see\n `get_safe_phrase()` function. The only exception is when the\n IGNORED_PHRASE is at the start of the text or after a split\n boundary; in this case, we change the first letter of the phrase\n to upper case.\n \"\"\"\n ignored_phrase = matchobj.group(0)\n safe_string = get_safe_phrase(ignored_phrase)\n\n start_index = matchobj.start()\n complete_string = matchobj.string\n\n is_string_start = start_index == 0\n # We expect that there will be one space between split boundary\n # and the next word.\n punctuation = complete_string[max(start_index - 2, 0)]\n is_after_split_boundary = punctuation in SPLIT_BOUNDARY\n if is_string_start or is_after_split_boundary:\n return safe_string.capitalize()\n\n return safe_string\n\n\ndef get_safe_text(text: str) -> str:\n \"\"\"\n This returns text which is rendered by BeautifulSoup and is in the\n form that can be split easily and has all IGNORED_PHRASES processed.\n \"\"\"\n soup = BeautifulSoup(text, \"lxml\")\n text = \" \".join(soup.text.split()) # Remove extra whitespaces.\n for phrase_regex in COMPILED_IGNORED_PHRASES:\n text = phrase_regex.sub(replace_with_safe_phrase, text)\n\n return text\n\n\ndef is_capitalized(safe_text: str) -> bool:\n sentences = SPLIT_BOUNDARY_REGEX.split(safe_text)\n return not any(DISALLOWED_REGEX.search(sentence.strip()) for sentence in sentences)\n\n\ndef check_banned_words(text: str) -> List[str]:\n lower_cased_text = text.lower()\n errors = []\n for word, reason in BANNED_WORDS.items():\n if word in lower_cased_text:\n # Hack: Should move this into BANNED_WORDS framework; for\n # now, just hand-code the skips:\n if \"realm_name\" in lower_cased_text or \"realm_uri\" in lower_cased_text:\n continue\n kwargs = dict(word=word, text=text, reason=reason)\n msg = \"{word} found in '{text}'. {reason}\".format(**kwargs)\n errors.append(msg)\n\n return errors\n\n\ndef check_capitalization(strings: List[str]) -> Tuple[List[str], List[str], List[str]]:\n errors = []\n ignored = []\n banned_word_errors = []\n for text in strings:\n text = \" \".join(text.split()) # Remove extra whitespaces.\n safe_text = get_safe_text(text)\n has_ignored_phrase = text != safe_text\n capitalized = is_capitalized(safe_text)\n if not capitalized:\n errors.append(text)\n elif has_ignored_phrase:\n ignored.append(text)\n\n banned_word_errors.extend(check_banned_words(text))\n\n return sorted(errors), sorted(ignored), sorted(banned_word_errors)\n", "path": "tools/lib/capitalization.py" } ]
diff --git a/templates/zerver/footer.html b/templates/zerver/footer.html index df5afbc2cc0bb..cd6b3bc4aa5c1 100644 --- a/templates/zerver/footer.html +++ b/templates/zerver/footer.html @@ -92,9 +92,13 @@ <h3 class="footer__section-title"> <li><a href="/values/">{{ _("Values") }}</a></li> <li><a href="/jobs/">{{ _("Jobs") }}</a></li> <li><a href="https://blog.zulip.com/" target="_blank">{{ _("Blog") }}</a></li> - <li><a href="https://twitter.com/zulip/">Twitter</a></li> <li><a href="https://zulip.com/help/support-zulip-project">{{ _("Support Zulip") }}</a></li> </ul> + <div class="footer-social-links"> + <a class="footer-social-icon footer-social-icon-x" title="{{ _('X (Twitter)') }}" href="https://twitter.com/zulip"></a> + <a class="footer-social-icon footer-social-icon-mastodon" title="{{ _('Mastodon') }}" href="https://fosstodon.org/@zulip"></a> + <a class="footer-social-icon footer-social-icon-linkedin" title="{{ _('LinkedIn') }}" href="https://www.linkedin.com/company/zulip-by-kandra-labs/"></a> + </div> </div> </div> {% endif %} diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.py index 246ffcbf1de3a..1f909e10aaa57 100644 --- a/tools/lib/capitalization.py +++ b/tools/lib/capitalization.py @@ -26,6 +26,7 @@ r"IP", r"JSON", r"Kerberos", + r"LinkedIn", r"LDAP", r"Markdown", r"OTP", diff --git a/web/styles/portico/footer.css b/web/styles/portico/footer.css index 85cbe61aaac7a..58f10a3db42cb 100644 --- a/web/styles/portico/footer.css +++ b/web/styles/portico/footer.css @@ -7,6 +7,19 @@ } } +/* These need to be here so that other pages don't need to import a different library for these icons to work */ +.footer-social-icon-mastodon { + --footer-social-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none' viewBox='0 0 28 28'%3e%3cg fill='%23A3A5F8'%3e%3cpath d='M18.42 16.43h2.38v-6.02c0-1.23-.3-2.2-.94-2.93a3.27 3.27 0 0 0-2.55-1.1c-1.22 0-2.15.47-2.76 1.41l-.6 1-.58-1a3.07 3.07 0 0 0-2.76-1.4c-1.05 0-1.9.37-2.55 1.1a4.3 4.3 0 0 0-.94 2.92v6.02H9.5v-5.84c0-1.23.52-1.86 1.55-1.86 1.15 0 1.72.74 1.72 2.2v3.2h2.38v-3.2c0-1.46.57-2.2 1.71-2.2 1.04 0 1.56.63 1.56 1.86v5.84Z'/%3e%3cpath fill-rule='evenodd' d='M3 0a3 3 0 0 0-3 3v22a3 3 0 0 0 3 3h22a3 3 0 0 0 3-3V3a3 3 0 0 0-3-3H3Zm18.39 3.6s3.26 1.45 3.26 6.43c0 0 .04 3.66-.46 6.2-.31 1.63-2.81 3.4-5.69 3.74-1.5.18-2.97.34-4.54.27-2.57-.12-4.6-.62-4.6-.62 0 .24.02.48.05.72.33 2.53 2.51 2.68 4.58 2.76 2.09.07 3.94-.52 3.94-.52l.09 1.89s-1.46.78-4.06.92c-1.43.08-3.21-.03-5.28-.58-4.5-1.19-5.27-5.98-5.39-10.84a100.6 100.6 0 0 1-.02-3v-.94c0-4.97 3.27-6.43 3.27-6.43 1.64-.76 4.46-1.07 7.39-1.1H14c2.93.03 5.75.34 7.39 1.1Z' clip-rule='evenodd'/%3e%3c/g%3e%3c/svg%3e"); +} + +.footer-social-icon-x { + --footer-social-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none' viewBox='0 0 28 28'%3e%3cg fill='%23A3A5F8' clip-path='url(%23a)'%3e%3cpath d='M18.87 23.69h2.71L9.11 5.36H6.4L18.87 23.7Z'/%3e%3cpath fill-rule='evenodd' d='M3.04.04a3 3 0 0 0-3 3v22a3 3 0 0 0 3 3h22a3 3 0 0 0 3-3v-22a3 3 0 0 0-3-3h-22ZM23.34 4l-7.44 8.89 8.1 12.1h-5.96l-5.45-8.15-6.83 8.15H4l7.8-9.32L4 4h5.96l5.16 7.72L21.58 4h1.77Z' clip-rule='evenodd'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='a'%3e%3crect width='28' height='28' fill='white' rx='3'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"); +} + +.footer-social-icon-linkedin { + --footer-social-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none' viewBox='0 0 28 28'%3e%3cg clip-path='url(%23a)'%3e%3cpath fill='%23A3A5F8' d='M28 3a3 3 0 0 0-3-3H3a3 3 0 0 0-3 3v22a3 3 0 0 0 3 3h22a3 3 0 0 0 3-3V3ZM8.27 23.9H4.19V10.5h4.18v13.4h-.1ZM6.17 8.7A2.42 2.42 0 0 1 3.8 6.3c0-1.3 1.1-2.4 2.39-2.4 1.3 0 2.39 1.1 2.39 2.4 0 1.3-1 2.4-2.4 2.4Zm17.65 15.2h-4.09v-6.5c0-1.5 0-3.5-2.2-3.5-2.18 0-2.48 1.7-2.48 3.4v6.6h-4.09V10.5h3.99v1.8h.1c.6-1 1.89-2.2 3.88-2.2 4.19 0 4.98 2.8 4.98 6.4v7.4h-.1Z'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='a'%3e%3cpath fill='white' d='M0 0h28v28H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"); +} + #footer { background: var(--color-footer-background); box-sizing: border-box; @@ -139,6 +152,32 @@ margin-bottom: 40px; } + .footer-social-links { + margin: -25px 0 20px; + display: flex; + gap: 8px; + } + + .footer-social-icon { + width: 28px; + height: 28px; + display: inline-block; + flex-shrink: 0; + background-color: hsl(238.59deg 85.86% 80.59%); + mask-position: center; + mask-repeat: no-repeat; + mask-image: var(--footer-social-icon); + transition: all 150ms ease-out; + + &:hover { + background-color: hsl(238.6deg 84.31% 90%); + } + + &:active { + background-color: hsl(240deg 86.67% 97.06%); + } + } + /* #footer responsivity and global fixes */ @media (width <= 940px) { .footer__container {
geopandas__geopandas-2958
ENH: link files with .fgb extension to FlatGeobuf driver #### Is your feature request related to a problem? I whish `GeoDataFrame.to_file()` method would recognize `.fgb` file-extensions as FlatGeobuf files and automatically select the corresponding driver. At this moment, it needs to be specified explicitly. #### Describe the solution you'd like The `filename` argument of `GeoDataFrame.to_file()` should recognize `.fgb` extensions as FlatGeobuf files. #### API breaking implications None #### Describe alternatives you've considered Explicitly specify the driver to use. #### Additional context I think that the only thing that needs to be changed is to add an entry ```python ".fgb": "FlatGeobuf" ``` to the `_EXTENSION_TO_DRIVER` dict in `geopandas\io\file.py`
[ { "content": "import os\nfrom packaging.version import Version\nfrom pathlib import Path\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import is_integer_dtype\n\nimport pyproj\nfrom shapely.geometry import mapping\nfrom shapely.geometry.base import BaseGeometry\n\nfrom geopandas import GeoDataFrame, GeoSeries\n\n# Adapted from pandas.io.common\nfrom urllib.parse import urlparse as parse_url\nfrom urllib.parse import uses_netloc, uses_params, uses_relative\nimport urllib.request\n\n\n_VALID_URLS = set(uses_relative + uses_netloc + uses_params)\n_VALID_URLS.discard(\"\")\n# file:// URIs are supported by fiona/pyogrio -> don't already open + read the file here\n_VALID_URLS.discard(\"file\")\n\n\nfiona = None\nfiona_env = None\nfiona_import_error = None\nFIONA_GE_19 = False\n\n\ndef _import_fiona():\n global fiona\n global fiona_env\n global fiona_import_error\n global FIONA_GE_19\n\n if fiona is None:\n try:\n import fiona\n\n # only try to import fiona.Env if the main fiona import succeeded\n # (otherwise you can get confusing \"AttributeError: module 'fiona'\n # has no attribute '_loading'\" / partially initialized module errors)\n try:\n from fiona import Env as fiona_env\n except ImportError:\n try:\n from fiona import drivers as fiona_env\n except ImportError:\n fiona_env = None\n\n FIONA_GE_19 = Version(Version(fiona.__version__).base_version) >= Version(\n \"1.9.0\"\n )\n except ImportError as err:\n fiona = False\n fiona_import_error = str(err)\n\n\npyogrio = None\npyogrio_import_error = None\n\n\ndef _import_pyogrio():\n global pyogrio\n global pyogrio_import_error\n\n if pyogrio is None:\n try:\n import pyogrio\n except ImportError as err:\n pyogrio = False\n pyogrio_import_error = str(err)\n\n\ndef _check_fiona(func):\n if fiona is None:\n raise ImportError(\n f\"the {func} requires the 'fiona' package, but it is not installed or does \"\n f\"not import correctly.\\nImporting fiona resulted in: {fiona_import_error}\"\n )\n\n\ndef _check_pyogrio(func):\n if pyogrio is None:\n raise ImportError(\n f\"the {func} requires the 'pyogrio' package, but it is not installed \"\n \"or does not import correctly.\"\n \"\\nImporting pyogrio resulted in: {pyogrio_import_error}\"\n )\n\n\ndef _check_engine(engine, func):\n # default to \"fiona\" if installed, otherwise try pyogrio\n if engine is None:\n _import_fiona()\n if fiona:\n engine = \"fiona\"\n else:\n _import_pyogrio()\n if pyogrio:\n engine = \"pyogrio\"\n\n if engine == \"fiona\":\n _import_fiona()\n _check_fiona(func)\n elif engine == \"pyogrio\":\n _import_pyogrio()\n _check_pyogrio(func)\n elif engine is None:\n raise ImportError(\n f\"The {func} requires the 'pyogrio' or 'fiona' package, \"\n \"but neither is installed or imports correctly.\"\n f\"\\nImporting fiona resulted in: {fiona_import_error}\"\n f\"\\nImporting pyogrio resulted in: {pyogrio_import_error}\"\n )\n\n return engine\n\n\n_EXTENSION_TO_DRIVER = {\n \".bna\": \"BNA\",\n \".dxf\": \"DXF\",\n \".csv\": \"CSV\",\n \".shp\": \"ESRI Shapefile\",\n \".dbf\": \"ESRI Shapefile\",\n \".json\": \"GeoJSON\",\n \".geojson\": \"GeoJSON\",\n \".geojsonl\": \"GeoJSONSeq\",\n \".geojsons\": \"GeoJSONSeq\",\n \".gpkg\": \"GPKG\",\n \".gml\": \"GML\",\n \".xml\": \"GML\",\n \".gpx\": \"GPX\",\n \".gtm\": \"GPSTrackMaker\",\n \".gtz\": \"GPSTrackMaker\",\n \".tab\": \"MapInfo File\",\n \".mif\": \"MapInfo File\",\n \".mid\": \"MapInfo File\",\n \".dgn\": \"DGN\",\n}\n\n\ndef _expand_user(path):\n \"\"\"Expand paths that use ~.\"\"\"\n if isinstance(path, str):\n path = os.path.expanduser(path)\n elif isinstance(path, Path):\n path = path.expanduser()\n return path\n\n\ndef _is_url(url):\n \"\"\"Check to see if *url* has a valid protocol.\"\"\"\n try:\n return parse_url(url).scheme in _VALID_URLS\n except Exception:\n return False\n\n\ndef _is_zip(path):\n \"\"\"Check if a given path is a zipfile\"\"\"\n parsed = fiona.path.ParsedPath.from_uri(path)\n return (\n parsed.archive.endswith(\".zip\")\n if parsed.archive\n else parsed.path.endswith(\".zip\")\n )\n\n\ndef _read_file(filename, bbox=None, mask=None, rows=None, engine=None, **kwargs):\n \"\"\"\n Returns a GeoDataFrame from a file or URL.\n\n .. versionadded:: 0.7.0 mask, rows\n\n Parameters\n ----------\n filename : str, path object or file-like object\n Either the absolute or relative path to the file or URL to\n be opened, or any object with a read() method (such as an open file\n or StringIO)\n bbox : tuple | GeoDataFrame or GeoSeries | shapely Geometry, default None\n Filter features by given bounding box, GeoSeries, GeoDataFrame or a shapely\n geometry. With engine=\"fiona\", CRS mis-matches are resolved if given a GeoSeries\n or GeoDataFrame. With engine=\"pyogrio\", bbox must be in the same CRS as the\n dataset. Tuple is (minx, miny, maxx, maxy) to match the bounds property of\n shapely geometry objects. Cannot be used with mask.\n mask : dict | GeoDataFrame or GeoSeries | shapely Geometry, default None\n Filter for features that intersect with the given dict-like geojson\n geometry, GeoSeries, GeoDataFrame or shapely geometry.\n CRS mis-matches are resolved if given a GeoSeries or GeoDataFrame.\n Cannot be used with bbox.\n rows : int or slice, default None\n Load in specific rows by passing an integer (first `n` rows) or a\n slice() object.\n engine : str, \"fiona\" or \"pyogrio\"\n The underlying library that is used to read the file. Currently, the\n supported options are \"fiona\" and \"pyogrio\". Defaults to \"fiona\" if\n installed, otherwise tries \"pyogrio\".\n **kwargs :\n Keyword args to be passed to the engine. In case of the \"fiona\" engine,\n the keyword arguments are passed to :func:`fiona.open` or\n :class:`fiona.collection.BytesCollection` when opening the file.\n For more information on possible keywords, type:\n ``import fiona; help(fiona.open)``. In case of the \"pyogrio\" engine,\n the keyword arguments are passed to :func:`pyogrio.read_dataframe`.\n\n\n Examples\n --------\n >>> df = geopandas.read_file(\"nybb.shp\") # doctest: +SKIP\n\n Specifying layer of GPKG:\n\n >>> df = geopandas.read_file(\"file.gpkg\", layer='cities') # doctest: +SKIP\n\n Reading only first 10 rows:\n\n >>> df = geopandas.read_file(\"nybb.shp\", rows=10) # doctest: +SKIP\n\n Reading only geometries intersecting ``mask``:\n\n >>> df = geopandas.read_file(\"nybb.shp\", mask=polygon) # doctest: +SKIP\n\n Reading only geometries intersecting ``bbox``:\n\n >>> df = geopandas.read_file(\"nybb.shp\", bbox=(0, 0, 10, 20)) # doctest: +SKIP\n\n Returns\n -------\n :obj:`geopandas.GeoDataFrame` or :obj:`pandas.DataFrame` :\n If `ignore_geometry=True` a :obj:`pandas.DataFrame` will be returned.\n\n Notes\n -----\n The format drivers will attempt to detect the encoding of your data, but\n may fail. In this case, the proper encoding can be specified explicitly\n by using the encoding keyword parameter, e.g. ``encoding='utf-8'``.\n\n When specifying a URL, geopandas will check if the server supports reading\n partial data and in that case pass the URL as is to the underlying engine,\n which will then use the network file system handler of GDAL to read from\n the URL. Otherwise geopandas will download the data from the URL and pass\n all data in-memory to the underlying engine.\n If you need more control over how the URL is read, you can specify the\n GDAL virtual filesystem manually (e.g. ``/vsicurl/https://...``). See the\n GDAL documentation on filesystems for more details\n (https://gdal.org/user/virtual_file_systems.html#vsicurl-http-https-ftp-files-random-access).\n\n \"\"\"\n engine = _check_engine(engine, \"'read_file' function\")\n\n filename = _expand_user(filename)\n\n from_bytes = False\n if _is_url(filename):\n # if it is a url that supports random access -> pass through to\n # pyogrio/fiona as is (to support downloading only part of the file)\n # otherwise still download manually because pyogrio/fiona don't support\n # all types of urls (https://github.com/geopandas/geopandas/issues/2908)\n with urllib.request.urlopen(filename) as response:\n if not response.headers.get(\"Accept-Ranges\") == \"bytes\":\n filename = response.read()\n from_bytes = True\n\n if engine == \"pyogrio\":\n return _read_file_pyogrio(filename, bbox=bbox, mask=mask, rows=rows, **kwargs)\n\n elif engine == \"fiona\":\n if pd.api.types.is_file_like(filename):\n data = filename.read()\n path_or_bytes = data.encode(\"utf-8\") if isinstance(data, str) else data\n from_bytes = True\n else:\n path_or_bytes = filename\n\n return _read_file_fiona(\n path_or_bytes, from_bytes, bbox=bbox, mask=mask, rows=rows, **kwargs\n )\n\n else:\n raise ValueError(f\"unknown engine '{engine}'\")\n\n\ndef _read_file_fiona(\n path_or_bytes, from_bytes, bbox=None, mask=None, rows=None, where=None, **kwargs\n):\n if where is not None and not FIONA_GE_19:\n raise NotImplementedError(\"where requires fiona 1.9+\")\n\n if not from_bytes:\n # Opening a file via URL or file-like-object above automatically detects a\n # zipped file. In order to match that behavior, attempt to add a zip scheme\n # if missing.\n if _is_zip(str(path_or_bytes)):\n parsed = fiona.parse_path(str(path_or_bytes))\n if isinstance(parsed, fiona.path.ParsedPath):\n # If fiona is able to parse the path, we can safely look at the scheme\n # and update it to have a zip scheme if necessary.\n schemes = (parsed.scheme or \"\").split(\"+\")\n if \"zip\" not in schemes:\n parsed.scheme = \"+\".join([\"zip\"] + schemes)\n path_or_bytes = parsed.name\n elif isinstance(parsed, fiona.path.UnparsedPath) and not str(\n path_or_bytes\n ).startswith(\"/vsi\"):\n # If fiona is unable to parse the path, it might have a Windows drive\n # scheme. Try adding zip:// to the front. If the path starts with \"/vsi\"\n # it is a legacy GDAL path type, so let it pass unmodified.\n path_or_bytes = \"zip://\" + parsed.name\n\n if from_bytes:\n reader = fiona.BytesCollection\n else:\n reader = fiona.open\n\n with fiona_env():\n with reader(path_or_bytes, **kwargs) as features:\n crs = features.crs_wkt\n # attempt to get EPSG code\n try:\n # fiona 1.9+\n epsg = features.crs.to_epsg(confidence_threshold=100)\n if epsg is not None:\n crs = epsg\n except AttributeError:\n # fiona <= 1.8\n try:\n crs = features.crs[\"init\"]\n except (TypeError, KeyError):\n pass\n\n # handle loading the bounding box\n if bbox is not None:\n if isinstance(bbox, (GeoDataFrame, GeoSeries)):\n bbox = tuple(bbox.to_crs(crs).total_bounds)\n elif isinstance(bbox, BaseGeometry):\n bbox = bbox.bounds\n assert len(bbox) == 4\n # handle loading the mask\n elif isinstance(mask, (GeoDataFrame, GeoSeries)):\n mask = mapping(mask.to_crs(crs).unary_union)\n elif isinstance(mask, BaseGeometry):\n mask = mapping(mask)\n\n filters = {}\n if bbox is not None:\n filters[\"bbox\"] = bbox\n if mask is not None:\n filters[\"mask\"] = mask\n if where is not None:\n filters[\"where\"] = where\n\n # setup the data loading filter\n if rows is not None:\n if isinstance(rows, int):\n rows = slice(rows)\n elif not isinstance(rows, slice):\n raise TypeError(\"'rows' must be an integer or a slice.\")\n f_filt = features.filter(rows.start, rows.stop, rows.step, **filters)\n elif filters:\n f_filt = features.filter(**filters)\n else:\n f_filt = features\n # get list of columns\n columns = list(features.schema[\"properties\"])\n datetime_fields = [\n k for (k, v) in features.schema[\"properties\"].items() if v == \"datetime\"\n ]\n if kwargs.get(\"ignore_geometry\", False):\n df = pd.DataFrame(\n [record[\"properties\"] for record in f_filt], columns=columns\n )\n else:\n df = GeoDataFrame.from_features(\n f_filt, crs=crs, columns=columns + [\"geometry\"]\n )\n for k in datetime_fields:\n as_dt = pd.to_datetime(df[k], errors=\"ignore\")\n # if to_datetime failed, try again for mixed timezone offsets\n if as_dt.dtype == \"object\":\n # This can still fail if there are invalid datetimes\n as_dt = pd.to_datetime(df[k], errors=\"ignore\", utc=True)\n # if to_datetime succeeded, round datetimes as\n # fiona only supports up to ms precision (any microseconds are\n # floating point rounding error)\n if not (as_dt.dtype == \"object\"):\n df[k] = as_dt.dt.round(freq=\"ms\")\n return df\n\n\ndef _read_file_pyogrio(path_or_bytes, bbox=None, mask=None, rows=None, **kwargs):\n import pyogrio\n\n if rows is not None:\n if isinstance(rows, int):\n kwargs[\"max_features\"] = rows\n elif isinstance(rows, slice):\n if rows.start is not None:\n kwargs[\"skip_features\"] = rows.start\n if rows.stop is not None:\n kwargs[\"max_features\"] = rows.stop - (rows.start or 0)\n if rows.step is not None:\n raise ValueError(\"slice with step is not supported\")\n else:\n raise TypeError(\"'rows' must be an integer or a slice.\")\n if bbox is not None:\n if isinstance(bbox, (GeoDataFrame, GeoSeries)):\n bbox = tuple(bbox.total_bounds)\n elif isinstance(bbox, BaseGeometry):\n bbox = bbox.bounds\n if len(bbox) != 4:\n raise ValueError(\"'bbox' should be a length-4 tuple.\")\n if mask is not None:\n raise ValueError(\n \"The 'mask' keyword is not supported with the 'pyogrio' engine. \"\n \"You can use 'bbox' instead.\"\n )\n if kwargs.pop(\"ignore_geometry\", False):\n kwargs[\"read_geometry\"] = False\n\n # TODO: if bbox is not None, check its CRS vs the CRS of the file\n return pyogrio.read_dataframe(path_or_bytes, bbox=bbox, **kwargs)\n\n\ndef read_file(*args, **kwargs):\n warnings.warn(\n \"geopandas.io.file.read_file() is intended for internal \"\n \"use only, and will be deprecated. Use geopandas.read_file() instead.\",\n FutureWarning,\n stacklevel=2,\n )\n\n return _read_file(*args, **kwargs)\n\n\ndef to_file(*args, **kwargs):\n warnings.warn(\n \"geopandas.io.file.to_file() is intended for internal \"\n \"use only, and will be deprecated. Use GeoDataFrame.to_file() \"\n \"or GeoSeries.to_file() instead.\",\n FutureWarning,\n stacklevel=2,\n )\n\n return _to_file(*args, **kwargs)\n\n\ndef _detect_driver(path):\n \"\"\"\n Attempt to auto-detect driver based on the extension\n \"\"\"\n try:\n # in case the path is a file handle\n path = path.name\n except AttributeError:\n pass\n try:\n return _EXTENSION_TO_DRIVER[Path(path).suffix.lower()]\n except KeyError:\n # Assume it is a shapefile folder for now. In the future,\n # will likely raise an exception when the expected\n # folder writing behavior is more clearly defined.\n return \"ESRI Shapefile\"\n\n\ndef _to_file(\n df,\n filename,\n driver=None,\n schema=None,\n index=None,\n mode=\"w\",\n crs=None,\n engine=None,\n **kwargs,\n):\n \"\"\"\n Write this GeoDataFrame to an OGR data source\n\n A dictionary of supported OGR providers is available via:\n >>> import fiona\n >>> fiona.supported_drivers # doctest: +SKIP\n\n Parameters\n ----------\n df : GeoDataFrame to be written\n filename : string\n File path or file handle to write to. The path may specify a\n GDAL VSI scheme.\n driver : string, default None\n The OGR format driver used to write the vector file.\n If not specified, it attempts to infer it from the file extension.\n If no extension is specified, it saves ESRI Shapefile to a folder.\n schema : dict, default None\n If specified, the schema dictionary is passed to Fiona to\n better control how the file is written. If None, GeoPandas\n will determine the schema based on each column's dtype.\n Not supported for the \"pyogrio\" engine.\n index : bool, default None\n If True, write index into one or more columns (for MultiIndex).\n Default None writes the index into one or more columns only if\n the index is named, is a MultiIndex, or has a non-integer data\n type. If False, no index is written.\n\n .. versionadded:: 0.7\n Previously the index was not written.\n mode : string, default 'w'\n The write mode, 'w' to overwrite the existing file and 'a' to append;\n when using the pyogrio engine, you can also pass ``append=True``.\n Not all drivers support appending. For the fiona engine, the drivers\n that support appending are listed in fiona.supported_drivers or\n https://github.com/Toblerity/Fiona/blob/master/fiona/drvsupport.py.\n For the pyogrio engine, you should be able to use any driver that\n is available in your installation of GDAL that supports append\n capability; see the specific driver entry at\n https://gdal.org/drivers/vector/index.html for more information.\n crs : pyproj.CRS, default None\n If specified, the CRS is passed to Fiona to\n better control how the file is written. If None, GeoPandas\n will determine the crs based on crs df attribute.\n The value can be anything accepted\n by :meth:`pyproj.CRS.from_user_input() <pyproj.crs.CRS.from_user_input>`,\n such as an authority string (eg \"EPSG:4326\") or a WKT string.\n engine : str, \"fiona\" or \"pyogrio\"\n The underlying library that is used to write the file. Currently, the\n supported options are \"fiona\" and \"pyogrio\". Defaults to \"fiona\" if\n installed, otherwise tries \"pyogrio\".\n **kwargs :\n Keyword args to be passed to the engine, and can be used to write\n to multi-layer data, store data within archives (zip files), etc.\n In case of the \"fiona\" engine, the keyword arguments are passed to\n fiona.open`. For more information on possible keywords, type:\n ``import fiona; help(fiona.open)``. In case of the \"pyogrio\" engine,\n the keyword arguments are passed to `pyogrio.write_dataframe`.\n\n Notes\n -----\n The format drivers will attempt to detect the encoding of your data, but\n may fail. In this case, the proper encoding can be specified explicitly\n by using the encoding keyword parameter, e.g. ``encoding='utf-8'``.\n \"\"\"\n engine = _check_engine(engine, \"'to_file' method\")\n\n filename = _expand_user(filename)\n\n if index is None:\n # Determine if index attribute(s) should be saved to file\n # (only if they are named or are non-integer)\n index = list(df.index.names) != [None] or not is_integer_dtype(df.index.dtype)\n if index:\n df = df.reset_index(drop=False)\n\n if driver is None:\n driver = _detect_driver(filename)\n\n if driver == \"ESRI Shapefile\" and any(len(c) > 10 for c in df.columns.tolist()):\n warnings.warn(\n \"Column names longer than 10 characters will be truncated when saved to \"\n \"ESRI Shapefile.\",\n stacklevel=3,\n )\n\n if (df.dtypes == \"geometry\").sum() > 1:\n raise ValueError(\n \"GeoDataFrame contains multiple geometry columns but GeoDataFrame.to_file \"\n \"supports only a single geometry column. Use a GeoDataFrame.to_parquet or \"\n \"GeoDataFrame.to_feather, drop additional geometry columns or convert them \"\n \"to a supported format like a well-known text (WKT) using \"\n \"`GeoSeries.to_wkt()`.\",\n )\n\n if mode not in (\"w\", \"a\"):\n raise ValueError(f\"'mode' should be one of 'w' or 'a', got '{mode}' instead\")\n\n if engine == \"fiona\":\n _to_file_fiona(df, filename, driver, schema, crs, mode, **kwargs)\n elif engine == \"pyogrio\":\n _to_file_pyogrio(df, filename, driver, schema, crs, mode, **kwargs)\n else:\n raise ValueError(f\"unknown engine '{engine}'\")\n\n\ndef _to_file_fiona(df, filename, driver, schema, crs, mode, **kwargs):\n if schema is None:\n schema = infer_schema(df)\n\n if crs:\n crs = pyproj.CRS.from_user_input(crs)\n else:\n crs = df.crs\n\n with fiona_env():\n crs_wkt = None\n try:\n gdal_version = fiona.env.get_gdal_release_name()\n except AttributeError:\n gdal_version = \"2.0.0\" # just assume it is not the latest\n if Version(gdal_version) >= Version(\"3.0.0\") and crs:\n crs_wkt = crs.to_wkt()\n elif crs:\n crs_wkt = crs.to_wkt(\"WKT1_GDAL\")\n with fiona.open(\n filename, mode=mode, driver=driver, crs_wkt=crs_wkt, schema=schema, **kwargs\n ) as colxn:\n colxn.writerecords(df.iterfeatures())\n\n\ndef _to_file_pyogrio(df, filename, driver, schema, crs, mode, **kwargs):\n import pyogrio\n\n if schema is not None:\n raise ValueError(\n \"The 'schema' argument is not supported with the 'pyogrio' engine.\"\n )\n\n if mode == \"a\":\n kwargs[\"append\"] = True\n\n if crs is not None:\n raise ValueError(\"Passing 'crs' it not supported with the 'pyogrio' engine.\")\n\n # for the fiona engine, this check is done in gdf.iterfeatures()\n if not df.columns.is_unique:\n raise ValueError(\"GeoDataFrame cannot contain duplicated column names.\")\n\n pyogrio.write_dataframe(df, filename, driver=driver, **kwargs)\n\n\ndef infer_schema(df):\n from collections import OrderedDict\n\n # TODO: test pandas string type and boolean type once released\n types = {\n \"Int32\": \"int32\",\n \"int32\": \"int32\",\n \"Int64\": \"int\",\n \"string\": \"str\",\n \"boolean\": \"bool\",\n }\n\n def convert_type(column, in_type):\n if in_type == object:\n return \"str\"\n if in_type.name.startswith(\"datetime64\"):\n # numpy datetime type regardless of frequency\n return \"datetime\"\n if str(in_type) in types:\n out_type = types[str(in_type)]\n else:\n out_type = type(np.zeros(1, in_type).item()).__name__\n if out_type == \"long\":\n out_type = \"int\"\n return out_type\n\n properties = OrderedDict(\n [\n (col, convert_type(col, _type))\n for col, _type in zip(df.columns, df.dtypes)\n if col != df._geometry_column_name\n ]\n )\n\n if df.empty:\n warnings.warn(\n \"You are attempting to write an empty DataFrame to file. \"\n \"For some drivers, this operation may fail.\",\n UserWarning,\n stacklevel=3,\n )\n\n # Since https://github.com/Toblerity/Fiona/issues/446 resolution,\n # Fiona allows a list of geometry types\n geom_types = _geometry_types(df)\n\n schema = {\"geometry\": geom_types, \"properties\": properties}\n\n return schema\n\n\ndef _geometry_types(df):\n \"\"\"\n Determine the geometry types in the GeoDataFrame for the schema.\n \"\"\"\n geom_types_2D = df[~df.geometry.has_z].geometry.geom_type.unique()\n geom_types_2D = [gtype for gtype in geom_types_2D if gtype is not None]\n geom_types_3D = df[df.geometry.has_z].geometry.geom_type.unique()\n geom_types_3D = [\"3D \" + gtype for gtype in geom_types_3D if gtype is not None]\n geom_types = geom_types_3D + geom_types_2D\n\n if len(geom_types) == 0:\n # Default geometry type supported by Fiona\n # (Since https://github.com/Toblerity/Fiona/issues/446 resolution)\n return \"Unknown\"\n\n if len(geom_types) == 1:\n geom_types = geom_types[0]\n\n return geom_types\n", "path": "geopandas/io/file.py" } ]
[ { "content": "import os\nfrom packaging.version import Version\nfrom pathlib import Path\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import is_integer_dtype\n\nimport pyproj\nfrom shapely.geometry import mapping\nfrom shapely.geometry.base import BaseGeometry\n\nfrom geopandas import GeoDataFrame, GeoSeries\n\n# Adapted from pandas.io.common\nfrom urllib.parse import urlparse as parse_url\nfrom urllib.parse import uses_netloc, uses_params, uses_relative\nimport urllib.request\n\n\n_VALID_URLS = set(uses_relative + uses_netloc + uses_params)\n_VALID_URLS.discard(\"\")\n# file:// URIs are supported by fiona/pyogrio -> don't already open + read the file here\n_VALID_URLS.discard(\"file\")\n\n\nfiona = None\nfiona_env = None\nfiona_import_error = None\nFIONA_GE_19 = False\n\n\ndef _import_fiona():\n global fiona\n global fiona_env\n global fiona_import_error\n global FIONA_GE_19\n\n if fiona is None:\n try:\n import fiona\n\n # only try to import fiona.Env if the main fiona import succeeded\n # (otherwise you can get confusing \"AttributeError: module 'fiona'\n # has no attribute '_loading'\" / partially initialized module errors)\n try:\n from fiona import Env as fiona_env\n except ImportError:\n try:\n from fiona import drivers as fiona_env\n except ImportError:\n fiona_env = None\n\n FIONA_GE_19 = Version(Version(fiona.__version__).base_version) >= Version(\n \"1.9.0\"\n )\n except ImportError as err:\n fiona = False\n fiona_import_error = str(err)\n\n\npyogrio = None\npyogrio_import_error = None\n\n\ndef _import_pyogrio():\n global pyogrio\n global pyogrio_import_error\n\n if pyogrio is None:\n try:\n import pyogrio\n except ImportError as err:\n pyogrio = False\n pyogrio_import_error = str(err)\n\n\ndef _check_fiona(func):\n if fiona is None:\n raise ImportError(\n f\"the {func} requires the 'fiona' package, but it is not installed or does \"\n f\"not import correctly.\\nImporting fiona resulted in: {fiona_import_error}\"\n )\n\n\ndef _check_pyogrio(func):\n if pyogrio is None:\n raise ImportError(\n f\"the {func} requires the 'pyogrio' package, but it is not installed \"\n \"or does not import correctly.\"\n \"\\nImporting pyogrio resulted in: {pyogrio_import_error}\"\n )\n\n\ndef _check_engine(engine, func):\n # default to \"fiona\" if installed, otherwise try pyogrio\n if engine is None:\n _import_fiona()\n if fiona:\n engine = \"fiona\"\n else:\n _import_pyogrio()\n if pyogrio:\n engine = \"pyogrio\"\n\n if engine == \"fiona\":\n _import_fiona()\n _check_fiona(func)\n elif engine == \"pyogrio\":\n _import_pyogrio()\n _check_pyogrio(func)\n elif engine is None:\n raise ImportError(\n f\"The {func} requires the 'pyogrio' or 'fiona' package, \"\n \"but neither is installed or imports correctly.\"\n f\"\\nImporting fiona resulted in: {fiona_import_error}\"\n f\"\\nImporting pyogrio resulted in: {pyogrio_import_error}\"\n )\n\n return engine\n\n\n_EXTENSION_TO_DRIVER = {\n \".bna\": \"BNA\",\n \".dxf\": \"DXF\",\n \".csv\": \"CSV\",\n \".shp\": \"ESRI Shapefile\",\n \".dbf\": \"ESRI Shapefile\",\n \".json\": \"GeoJSON\",\n \".geojson\": \"GeoJSON\",\n \".geojsonl\": \"GeoJSONSeq\",\n \".geojsons\": \"GeoJSONSeq\",\n \".gpkg\": \"GPKG\",\n \".gml\": \"GML\",\n \".xml\": \"GML\",\n \".gpx\": \"GPX\",\n \".gtm\": \"GPSTrackMaker\",\n \".gtz\": \"GPSTrackMaker\",\n \".tab\": \"MapInfo File\",\n \".mif\": \"MapInfo File\",\n \".mid\": \"MapInfo File\",\n \".dgn\": \"DGN\",\n \".fgb\": \"FlatGeobuf\",\n}\n\n\ndef _expand_user(path):\n \"\"\"Expand paths that use ~.\"\"\"\n if isinstance(path, str):\n path = os.path.expanduser(path)\n elif isinstance(path, Path):\n path = path.expanduser()\n return path\n\n\ndef _is_url(url):\n \"\"\"Check to see if *url* has a valid protocol.\"\"\"\n try:\n return parse_url(url).scheme in _VALID_URLS\n except Exception:\n return False\n\n\ndef _is_zip(path):\n \"\"\"Check if a given path is a zipfile\"\"\"\n parsed = fiona.path.ParsedPath.from_uri(path)\n return (\n parsed.archive.endswith(\".zip\")\n if parsed.archive\n else parsed.path.endswith(\".zip\")\n )\n\n\ndef _read_file(filename, bbox=None, mask=None, rows=None, engine=None, **kwargs):\n \"\"\"\n Returns a GeoDataFrame from a file or URL.\n\n .. versionadded:: 0.7.0 mask, rows\n\n Parameters\n ----------\n filename : str, path object or file-like object\n Either the absolute or relative path to the file or URL to\n be opened, or any object with a read() method (such as an open file\n or StringIO)\n bbox : tuple | GeoDataFrame or GeoSeries | shapely Geometry, default None\n Filter features by given bounding box, GeoSeries, GeoDataFrame or a shapely\n geometry. With engine=\"fiona\", CRS mis-matches are resolved if given a GeoSeries\n or GeoDataFrame. With engine=\"pyogrio\", bbox must be in the same CRS as the\n dataset. Tuple is (minx, miny, maxx, maxy) to match the bounds property of\n shapely geometry objects. Cannot be used with mask.\n mask : dict | GeoDataFrame or GeoSeries | shapely Geometry, default None\n Filter for features that intersect with the given dict-like geojson\n geometry, GeoSeries, GeoDataFrame or shapely geometry.\n CRS mis-matches are resolved if given a GeoSeries or GeoDataFrame.\n Cannot be used with bbox.\n rows : int or slice, default None\n Load in specific rows by passing an integer (first `n` rows) or a\n slice() object.\n engine : str, \"fiona\" or \"pyogrio\"\n The underlying library that is used to read the file. Currently, the\n supported options are \"fiona\" and \"pyogrio\". Defaults to \"fiona\" if\n installed, otherwise tries \"pyogrio\".\n **kwargs :\n Keyword args to be passed to the engine. In case of the \"fiona\" engine,\n the keyword arguments are passed to :func:`fiona.open` or\n :class:`fiona.collection.BytesCollection` when opening the file.\n For more information on possible keywords, type:\n ``import fiona; help(fiona.open)``. In case of the \"pyogrio\" engine,\n the keyword arguments are passed to :func:`pyogrio.read_dataframe`.\n\n\n Examples\n --------\n >>> df = geopandas.read_file(\"nybb.shp\") # doctest: +SKIP\n\n Specifying layer of GPKG:\n\n >>> df = geopandas.read_file(\"file.gpkg\", layer='cities') # doctest: +SKIP\n\n Reading only first 10 rows:\n\n >>> df = geopandas.read_file(\"nybb.shp\", rows=10) # doctest: +SKIP\n\n Reading only geometries intersecting ``mask``:\n\n >>> df = geopandas.read_file(\"nybb.shp\", mask=polygon) # doctest: +SKIP\n\n Reading only geometries intersecting ``bbox``:\n\n >>> df = geopandas.read_file(\"nybb.shp\", bbox=(0, 0, 10, 20)) # doctest: +SKIP\n\n Returns\n -------\n :obj:`geopandas.GeoDataFrame` or :obj:`pandas.DataFrame` :\n If `ignore_geometry=True` a :obj:`pandas.DataFrame` will be returned.\n\n Notes\n -----\n The format drivers will attempt to detect the encoding of your data, but\n may fail. In this case, the proper encoding can be specified explicitly\n by using the encoding keyword parameter, e.g. ``encoding='utf-8'``.\n\n When specifying a URL, geopandas will check if the server supports reading\n partial data and in that case pass the URL as is to the underlying engine,\n which will then use the network file system handler of GDAL to read from\n the URL. Otherwise geopandas will download the data from the URL and pass\n all data in-memory to the underlying engine.\n If you need more control over how the URL is read, you can specify the\n GDAL virtual filesystem manually (e.g. ``/vsicurl/https://...``). See the\n GDAL documentation on filesystems for more details\n (https://gdal.org/user/virtual_file_systems.html#vsicurl-http-https-ftp-files-random-access).\n\n \"\"\"\n engine = _check_engine(engine, \"'read_file' function\")\n\n filename = _expand_user(filename)\n\n from_bytes = False\n if _is_url(filename):\n # if it is a url that supports random access -> pass through to\n # pyogrio/fiona as is (to support downloading only part of the file)\n # otherwise still download manually because pyogrio/fiona don't support\n # all types of urls (https://github.com/geopandas/geopandas/issues/2908)\n with urllib.request.urlopen(filename) as response:\n if not response.headers.get(\"Accept-Ranges\") == \"bytes\":\n filename = response.read()\n from_bytes = True\n\n if engine == \"pyogrio\":\n return _read_file_pyogrio(filename, bbox=bbox, mask=mask, rows=rows, **kwargs)\n\n elif engine == \"fiona\":\n if pd.api.types.is_file_like(filename):\n data = filename.read()\n path_or_bytes = data.encode(\"utf-8\") if isinstance(data, str) else data\n from_bytes = True\n else:\n path_or_bytes = filename\n\n return _read_file_fiona(\n path_or_bytes, from_bytes, bbox=bbox, mask=mask, rows=rows, **kwargs\n )\n\n else:\n raise ValueError(f\"unknown engine '{engine}'\")\n\n\ndef _read_file_fiona(\n path_or_bytes, from_bytes, bbox=None, mask=None, rows=None, where=None, **kwargs\n):\n if where is not None and not FIONA_GE_19:\n raise NotImplementedError(\"where requires fiona 1.9+\")\n\n if not from_bytes:\n # Opening a file via URL or file-like-object above automatically detects a\n # zipped file. In order to match that behavior, attempt to add a zip scheme\n # if missing.\n if _is_zip(str(path_or_bytes)):\n parsed = fiona.parse_path(str(path_or_bytes))\n if isinstance(parsed, fiona.path.ParsedPath):\n # If fiona is able to parse the path, we can safely look at the scheme\n # and update it to have a zip scheme if necessary.\n schemes = (parsed.scheme or \"\").split(\"+\")\n if \"zip\" not in schemes:\n parsed.scheme = \"+\".join([\"zip\"] + schemes)\n path_or_bytes = parsed.name\n elif isinstance(parsed, fiona.path.UnparsedPath) and not str(\n path_or_bytes\n ).startswith(\"/vsi\"):\n # If fiona is unable to parse the path, it might have a Windows drive\n # scheme. Try adding zip:// to the front. If the path starts with \"/vsi\"\n # it is a legacy GDAL path type, so let it pass unmodified.\n path_or_bytes = \"zip://\" + parsed.name\n\n if from_bytes:\n reader = fiona.BytesCollection\n else:\n reader = fiona.open\n\n with fiona_env():\n with reader(path_or_bytes, **kwargs) as features:\n crs = features.crs_wkt\n # attempt to get EPSG code\n try:\n # fiona 1.9+\n epsg = features.crs.to_epsg(confidence_threshold=100)\n if epsg is not None:\n crs = epsg\n except AttributeError:\n # fiona <= 1.8\n try:\n crs = features.crs[\"init\"]\n except (TypeError, KeyError):\n pass\n\n # handle loading the bounding box\n if bbox is not None:\n if isinstance(bbox, (GeoDataFrame, GeoSeries)):\n bbox = tuple(bbox.to_crs(crs).total_bounds)\n elif isinstance(bbox, BaseGeometry):\n bbox = bbox.bounds\n assert len(bbox) == 4\n # handle loading the mask\n elif isinstance(mask, (GeoDataFrame, GeoSeries)):\n mask = mapping(mask.to_crs(crs).unary_union)\n elif isinstance(mask, BaseGeometry):\n mask = mapping(mask)\n\n filters = {}\n if bbox is not None:\n filters[\"bbox\"] = bbox\n if mask is not None:\n filters[\"mask\"] = mask\n if where is not None:\n filters[\"where\"] = where\n\n # setup the data loading filter\n if rows is not None:\n if isinstance(rows, int):\n rows = slice(rows)\n elif not isinstance(rows, slice):\n raise TypeError(\"'rows' must be an integer or a slice.\")\n f_filt = features.filter(rows.start, rows.stop, rows.step, **filters)\n elif filters:\n f_filt = features.filter(**filters)\n else:\n f_filt = features\n # get list of columns\n columns = list(features.schema[\"properties\"])\n datetime_fields = [\n k for (k, v) in features.schema[\"properties\"].items() if v == \"datetime\"\n ]\n if kwargs.get(\"ignore_geometry\", False):\n df = pd.DataFrame(\n [record[\"properties\"] for record in f_filt], columns=columns\n )\n else:\n df = GeoDataFrame.from_features(\n f_filt, crs=crs, columns=columns + [\"geometry\"]\n )\n for k in datetime_fields:\n as_dt = pd.to_datetime(df[k], errors=\"ignore\")\n # if to_datetime failed, try again for mixed timezone offsets\n if as_dt.dtype == \"object\":\n # This can still fail if there are invalid datetimes\n as_dt = pd.to_datetime(df[k], errors=\"ignore\", utc=True)\n # if to_datetime succeeded, round datetimes as\n # fiona only supports up to ms precision (any microseconds are\n # floating point rounding error)\n if not (as_dt.dtype == \"object\"):\n df[k] = as_dt.dt.round(freq=\"ms\")\n return df\n\n\ndef _read_file_pyogrio(path_or_bytes, bbox=None, mask=None, rows=None, **kwargs):\n import pyogrio\n\n if rows is not None:\n if isinstance(rows, int):\n kwargs[\"max_features\"] = rows\n elif isinstance(rows, slice):\n if rows.start is not None:\n kwargs[\"skip_features\"] = rows.start\n if rows.stop is not None:\n kwargs[\"max_features\"] = rows.stop - (rows.start or 0)\n if rows.step is not None:\n raise ValueError(\"slice with step is not supported\")\n else:\n raise TypeError(\"'rows' must be an integer or a slice.\")\n if bbox is not None:\n if isinstance(bbox, (GeoDataFrame, GeoSeries)):\n bbox = tuple(bbox.total_bounds)\n elif isinstance(bbox, BaseGeometry):\n bbox = bbox.bounds\n if len(bbox) != 4:\n raise ValueError(\"'bbox' should be a length-4 tuple.\")\n if mask is not None:\n raise ValueError(\n \"The 'mask' keyword is not supported with the 'pyogrio' engine. \"\n \"You can use 'bbox' instead.\"\n )\n if kwargs.pop(\"ignore_geometry\", False):\n kwargs[\"read_geometry\"] = False\n\n # TODO: if bbox is not None, check its CRS vs the CRS of the file\n return pyogrio.read_dataframe(path_or_bytes, bbox=bbox, **kwargs)\n\n\ndef read_file(*args, **kwargs):\n warnings.warn(\n \"geopandas.io.file.read_file() is intended for internal \"\n \"use only, and will be deprecated. Use geopandas.read_file() instead.\",\n FutureWarning,\n stacklevel=2,\n )\n\n return _read_file(*args, **kwargs)\n\n\ndef to_file(*args, **kwargs):\n warnings.warn(\n \"geopandas.io.file.to_file() is intended for internal \"\n \"use only, and will be deprecated. Use GeoDataFrame.to_file() \"\n \"or GeoSeries.to_file() instead.\",\n FutureWarning,\n stacklevel=2,\n )\n\n return _to_file(*args, **kwargs)\n\n\ndef _detect_driver(path):\n \"\"\"\n Attempt to auto-detect driver based on the extension\n \"\"\"\n try:\n # in case the path is a file handle\n path = path.name\n except AttributeError:\n pass\n try:\n return _EXTENSION_TO_DRIVER[Path(path).suffix.lower()]\n except KeyError:\n # Assume it is a shapefile folder for now. In the future,\n # will likely raise an exception when the expected\n # folder writing behavior is more clearly defined.\n return \"ESRI Shapefile\"\n\n\ndef _to_file(\n df,\n filename,\n driver=None,\n schema=None,\n index=None,\n mode=\"w\",\n crs=None,\n engine=None,\n **kwargs,\n):\n \"\"\"\n Write this GeoDataFrame to an OGR data source\n\n A dictionary of supported OGR providers is available via:\n >>> import fiona\n >>> fiona.supported_drivers # doctest: +SKIP\n\n Parameters\n ----------\n df : GeoDataFrame to be written\n filename : string\n File path or file handle to write to. The path may specify a\n GDAL VSI scheme.\n driver : string, default None\n The OGR format driver used to write the vector file.\n If not specified, it attempts to infer it from the file extension.\n If no extension is specified, it saves ESRI Shapefile to a folder.\n schema : dict, default None\n If specified, the schema dictionary is passed to Fiona to\n better control how the file is written. If None, GeoPandas\n will determine the schema based on each column's dtype.\n Not supported for the \"pyogrio\" engine.\n index : bool, default None\n If True, write index into one or more columns (for MultiIndex).\n Default None writes the index into one or more columns only if\n the index is named, is a MultiIndex, or has a non-integer data\n type. If False, no index is written.\n\n .. versionadded:: 0.7\n Previously the index was not written.\n mode : string, default 'w'\n The write mode, 'w' to overwrite the existing file and 'a' to append;\n when using the pyogrio engine, you can also pass ``append=True``.\n Not all drivers support appending. For the fiona engine, the drivers\n that support appending are listed in fiona.supported_drivers or\n https://github.com/Toblerity/Fiona/blob/master/fiona/drvsupport.py.\n For the pyogrio engine, you should be able to use any driver that\n is available in your installation of GDAL that supports append\n capability; see the specific driver entry at\n https://gdal.org/drivers/vector/index.html for more information.\n crs : pyproj.CRS, default None\n If specified, the CRS is passed to Fiona to\n better control how the file is written. If None, GeoPandas\n will determine the crs based on crs df attribute.\n The value can be anything accepted\n by :meth:`pyproj.CRS.from_user_input() <pyproj.crs.CRS.from_user_input>`,\n such as an authority string (eg \"EPSG:4326\") or a WKT string.\n engine : str, \"fiona\" or \"pyogrio\"\n The underlying library that is used to write the file. Currently, the\n supported options are \"fiona\" and \"pyogrio\". Defaults to \"fiona\" if\n installed, otherwise tries \"pyogrio\".\n **kwargs :\n Keyword args to be passed to the engine, and can be used to write\n to multi-layer data, store data within archives (zip files), etc.\n In case of the \"fiona\" engine, the keyword arguments are passed to\n fiona.open`. For more information on possible keywords, type:\n ``import fiona; help(fiona.open)``. In case of the \"pyogrio\" engine,\n the keyword arguments are passed to `pyogrio.write_dataframe`.\n\n Notes\n -----\n The format drivers will attempt to detect the encoding of your data, but\n may fail. In this case, the proper encoding can be specified explicitly\n by using the encoding keyword parameter, e.g. ``encoding='utf-8'``.\n \"\"\"\n engine = _check_engine(engine, \"'to_file' method\")\n\n filename = _expand_user(filename)\n\n if index is None:\n # Determine if index attribute(s) should be saved to file\n # (only if they are named or are non-integer)\n index = list(df.index.names) != [None] or not is_integer_dtype(df.index.dtype)\n if index:\n df = df.reset_index(drop=False)\n\n if driver is None:\n driver = _detect_driver(filename)\n\n if driver == \"ESRI Shapefile\" and any(len(c) > 10 for c in df.columns.tolist()):\n warnings.warn(\n \"Column names longer than 10 characters will be truncated when saved to \"\n \"ESRI Shapefile.\",\n stacklevel=3,\n )\n\n if (df.dtypes == \"geometry\").sum() > 1:\n raise ValueError(\n \"GeoDataFrame contains multiple geometry columns but GeoDataFrame.to_file \"\n \"supports only a single geometry column. Use a GeoDataFrame.to_parquet or \"\n \"GeoDataFrame.to_feather, drop additional geometry columns or convert them \"\n \"to a supported format like a well-known text (WKT) using \"\n \"`GeoSeries.to_wkt()`.\",\n )\n\n if mode not in (\"w\", \"a\"):\n raise ValueError(f\"'mode' should be one of 'w' or 'a', got '{mode}' instead\")\n\n if engine == \"fiona\":\n _to_file_fiona(df, filename, driver, schema, crs, mode, **kwargs)\n elif engine == \"pyogrio\":\n _to_file_pyogrio(df, filename, driver, schema, crs, mode, **kwargs)\n else:\n raise ValueError(f\"unknown engine '{engine}'\")\n\n\ndef _to_file_fiona(df, filename, driver, schema, crs, mode, **kwargs):\n if schema is None:\n schema = infer_schema(df)\n\n if crs:\n crs = pyproj.CRS.from_user_input(crs)\n else:\n crs = df.crs\n\n with fiona_env():\n crs_wkt = None\n try:\n gdal_version = fiona.env.get_gdal_release_name()\n except AttributeError:\n gdal_version = \"2.0.0\" # just assume it is not the latest\n if Version(gdal_version) >= Version(\"3.0.0\") and crs:\n crs_wkt = crs.to_wkt()\n elif crs:\n crs_wkt = crs.to_wkt(\"WKT1_GDAL\")\n with fiona.open(\n filename, mode=mode, driver=driver, crs_wkt=crs_wkt, schema=schema, **kwargs\n ) as colxn:\n colxn.writerecords(df.iterfeatures())\n\n\ndef _to_file_pyogrio(df, filename, driver, schema, crs, mode, **kwargs):\n import pyogrio\n\n if schema is not None:\n raise ValueError(\n \"The 'schema' argument is not supported with the 'pyogrio' engine.\"\n )\n\n if mode == \"a\":\n kwargs[\"append\"] = True\n\n if crs is not None:\n raise ValueError(\"Passing 'crs' it not supported with the 'pyogrio' engine.\")\n\n # for the fiona engine, this check is done in gdf.iterfeatures()\n if not df.columns.is_unique:\n raise ValueError(\"GeoDataFrame cannot contain duplicated column names.\")\n\n pyogrio.write_dataframe(df, filename, driver=driver, **kwargs)\n\n\ndef infer_schema(df):\n from collections import OrderedDict\n\n # TODO: test pandas string type and boolean type once released\n types = {\n \"Int32\": \"int32\",\n \"int32\": \"int32\",\n \"Int64\": \"int\",\n \"string\": \"str\",\n \"boolean\": \"bool\",\n }\n\n def convert_type(column, in_type):\n if in_type == object:\n return \"str\"\n if in_type.name.startswith(\"datetime64\"):\n # numpy datetime type regardless of frequency\n return \"datetime\"\n if str(in_type) in types:\n out_type = types[str(in_type)]\n else:\n out_type = type(np.zeros(1, in_type).item()).__name__\n if out_type == \"long\":\n out_type = \"int\"\n return out_type\n\n properties = OrderedDict(\n [\n (col, convert_type(col, _type))\n for col, _type in zip(df.columns, df.dtypes)\n if col != df._geometry_column_name\n ]\n )\n\n if df.empty:\n warnings.warn(\n \"You are attempting to write an empty DataFrame to file. \"\n \"For some drivers, this operation may fail.\",\n UserWarning,\n stacklevel=3,\n )\n\n # Since https://github.com/Toblerity/Fiona/issues/446 resolution,\n # Fiona allows a list of geometry types\n geom_types = _geometry_types(df)\n\n schema = {\"geometry\": geom_types, \"properties\": properties}\n\n return schema\n\n\ndef _geometry_types(df):\n \"\"\"\n Determine the geometry types in the GeoDataFrame for the schema.\n \"\"\"\n geom_types_2D = df[~df.geometry.has_z].geometry.geom_type.unique()\n geom_types_2D = [gtype for gtype in geom_types_2D if gtype is not None]\n geom_types_3D = df[df.geometry.has_z].geometry.geom_type.unique()\n geom_types_3D = [\"3D \" + gtype for gtype in geom_types_3D if gtype is not None]\n geom_types = geom_types_3D + geom_types_2D\n\n if len(geom_types) == 0:\n # Default geometry type supported by Fiona\n # (Since https://github.com/Toblerity/Fiona/issues/446 resolution)\n return \"Unknown\"\n\n if len(geom_types) == 1:\n geom_types = geom_types[0]\n\n return geom_types\n", "path": "geopandas/io/file.py" } ]
diff --git a/CHANGELOG.md b/CHANGELOG.md index a3a450ef2c..c3c18e9cd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ New methods: New features and improvements: - Added ``exclusive`` parameter to ``sjoin_nearest`` method for Shapely >= 2.0 (#2877) +- The ``to_file()`` method will now automatically detect the FlatGeoBuf driver + for files with the `.fgb` extension (#2958) Bug fixes: diff --git a/geopandas/io/file.py b/geopandas/io/file.py index 2e0aa1517a..8b1572b8ff 100644 --- a/geopandas/io/file.py +++ b/geopandas/io/file.py @@ -141,6 +141,7 @@ def _check_engine(engine, func): ".mif": "MapInfo File", ".mid": "MapInfo File", ".dgn": "DGN", + ".fgb": "FlatGeobuf", }
holoviz__panel-3990
Clearing value of a DatetimePicker #### Description of expected behavior and the observed behavior Not sure if this is a bug or a new feature to Panel. Let's say I have a layout consisting of a button named "Edit", a DatetimePicker disabled with no default value, and a button named "Submit". At the time of initialization, the value of DatetimePicker is Null. The way these objects interact is as follows: - Click "Edit" button, DatetimePicker is enabled so user can select a specific time value. - Click "Submit" button, the selected time value will be pushed to the DB, and the DatetimePicker will be disabled and reset back to Null. I have tried several ways with no success in clearing the value of the DatetimePicker. #### Complete, minimal, self-contained example code that reproduces the issue ``` time_widget = pn.widgets.DatetimePicker(disabled=True) time_widget.value = now() # how to set value back to None? time_widget.value = None/pandas.NaT/np.nan => all causes error ```
[ { "content": "from bokeh.core.enums import CalendarPosition\nfrom bokeh.core.properties import (\n Bool, Date, Datetime, Either, Enum, List, Nullable, String, Tuple,\n)\nfrom bokeh.models.widgets.inputs import InputWidget\n\n\nclass DatetimePicker(InputWidget):\n ''' Calendar-based date picker widget.\n\n '''\n\n value = String(help=\"\"\"\n The initial or picked date.\n \"\"\")\n\n min_date = Nullable(Either(Date, Datetime), help=\"\"\"\n Optional earliest allowable date.\n \"\"\")\n\n max_date = Nullable(Either(Date, Datetime), help=\"\"\"\n Optional latest allowable date.\n \"\"\")\n\n disabled_dates = List(Either(Date, Datetime, Tuple(Date, Date), Tuple(Datetime, Datetime)), default=[], help=\"\"\"\n A list of dates of ``(start, end)`` date ranges to make unavailable for\n selection. All other dates will be avalable.\n\n .. note::\n Only one of ``disabled_dates`` and ``enabled_dates`` should be specified.\n \"\"\")\n\n enabled_dates = List(Either(Date, Datetime, Tuple(Date, Date), Tuple(Datetime, Datetime)), default=[], help=\"\"\"\n A list of dates of ``(start, end)`` date ranges to make available for\n selection. All other dates will be unavailable.\n\n .. note::\n Only one of ``disabled_dates`` and ``enabled_dates`` should be specified.\n \"\"\")\n\n position = Enum(CalendarPosition, default=\"auto\", help=\"\"\"\n Where the calendar is rendered relative to the input when ``inline`` is False.\n \"\"\")\n\n inline = Bool(default=False, help=\"\"\"\n Whether the calendar sholud be displayed inline.\n \"\"\")\n\n enable_time = Bool(default=True)\n\n enable_seconds = Bool(default=True)\n\n military_time = Bool(default=True)\n\n date_format = String(\"Y-m-d H:i:S\")\n\n mode = String(default=\"single\", help=\"\"\"\n Should either be \"single\" or \"range\".\"\"\")\n", "path": "panel/models/datetime_picker.py" } ]
[ { "content": "from bokeh.core.enums import CalendarPosition\nfrom bokeh.core.properties import (\n Bool, Date, Datetime, Either, Enum, List, Nullable, String, Tuple,\n)\nfrom bokeh.models.widgets.inputs import InputWidget\n\n\nclass DatetimePicker(InputWidget):\n ''' Calendar-based date picker widget.\n\n '''\n\n value = Nullable(String, help=\"\"\"\n The initial or picked date.\n \"\"\")\n\n min_date = Nullable(Either(Date, Datetime), help=\"\"\"\n Optional earliest allowable date.\n \"\"\")\n\n max_date = Nullable(Either(Date, Datetime), help=\"\"\"\n Optional latest allowable date.\n \"\"\")\n\n disabled_dates = List(Either(Date, Datetime, Tuple(Date, Date), Tuple(Datetime, Datetime)), default=[], help=\"\"\"\n A list of dates of ``(start, end)`` date ranges to make unavailable for\n selection. All other dates will be avalable.\n\n .. note::\n Only one of ``disabled_dates`` and ``enabled_dates`` should be specified.\n \"\"\")\n\n enabled_dates = List(Either(Date, Datetime, Tuple(Date, Date), Tuple(Datetime, Datetime)), default=[], help=\"\"\"\n A list of dates of ``(start, end)`` date ranges to make available for\n selection. All other dates will be unavailable.\n\n .. note::\n Only one of ``disabled_dates`` and ``enabled_dates`` should be specified.\n \"\"\")\n\n position = Enum(CalendarPosition, default=\"auto\", help=\"\"\"\n Where the calendar is rendered relative to the input when ``inline`` is False.\n \"\"\")\n\n inline = Bool(default=False, help=\"\"\"\n Whether the calendar sholud be displayed inline.\n \"\"\")\n\n enable_time = Bool(default=True)\n\n enable_seconds = Bool(default=True)\n\n military_time = Bool(default=True)\n\n date_format = String(\"Y-m-d H:i:S\")\n\n mode = String(default=\"single\", help=\"\"\"\n Should either be \"single\" or \"range\".\"\"\")\n", "path": "panel/models/datetime_picker.py" } ]
diff --git a/panel/models/datetime_picker.py b/panel/models/datetime_picker.py index c73fc7fe79..529fb94ecf 100644 --- a/panel/models/datetime_picker.py +++ b/panel/models/datetime_picker.py @@ -10,7 +10,7 @@ class DatetimePicker(InputWidget): ''' - value = String(help=""" + value = Nullable(String, help=""" The initial or picked date. """) diff --git a/panel/models/datetime_picker.ts b/panel/models/datetime_picker.ts index 944422dd43..8815167fd8 100644 --- a/panel/models/datetime_picker.ts +++ b/panel/models/datetime_picker.ts @@ -36,7 +36,7 @@ export class DatetimePickerView extends InputWidgetView { const {value, min_date, max_date, disabled_dates, enabled_dates, position, inline, enable_time, enable_seconds, military_time, date_format, mode} = this.model.properties - this.connect(value.change, () => this._picker?.setDate(this.model.value)) + this.connect(value.change, () => this.model.value ? this._picker?.setDate(this.model.value) : this._clear()) this.connect(min_date.change, () => this._picker?.set("minDate", this.model.min_date)) this.connect(max_date.change, () => this._picker?.set("maxDate", this.model.max_date)) this.connect(disabled_dates.change, () => this._picker?.set("disable", this.model.disabled_dates)) @@ -68,7 +68,7 @@ export class DatetimePickerView extends InputWidgetView { this.input_el = input({type: "text", class: inputs.input, disabled: this.model.disabled}) this.group_el.appendChild(this.input_el) this._picker = flatpickr(this.input_el, { - defaultDate: this.model.value, + defaultDate: this.model.value!, minDate: this.model.min_date ? new Date(this.model.min_date) : undefined, maxDate: this.model.max_date ? new Date(this.model.max_date) : undefined, inline: this.model.inline, @@ -86,6 +86,11 @@ export class DatetimePickerView extends InputWidgetView { this._picker.minDateHasTime = true } + protected _clear() { + this._picker?.clear() + this.model.value = null + } + protected _on_close(_selected_dates: Date[], date_string: string, _instance: flatpickr.Instance): void { if (this.model.mode == "range" && !date_string.includes("to")) return @@ -98,7 +103,7 @@ export namespace DatetimePicker { export type Attrs = p.AttrsOf<Props> export type Props = InputWidget.Props & { - value: p.Property<string> + value: p.Property<string | null> min_date: p.Property<string | null> max_date: p.Property<string | null> disabled_dates: p.Property<DatesList> @@ -132,7 +137,7 @@ export class DatetimePicker extends InputWidget { const DateStr = String const DatesList = Array(Or(DateStr, Tuple(DateStr, DateStr))) return { - value: [ String ], + value: [ Nullable(String), null ], min_date: [ Nullable(String), null ], max_date: [ Nullable(String), null ], disabled_dates: [ DatesList, [] ], diff --git a/panel/tests/ui/widgets/test_input.py b/panel/tests/ui/widgets/test_input.py index 726a2273ca..bf41cba845 100644 --- a/panel/tests/ui/widgets/test_input.py +++ b/panel/tests/ui/widgets/test_input.py @@ -4,7 +4,8 @@ import pytest from panel.io.server import serve -from panel.widgets import DatetimePicker +from panel.tests.util import wait_until +from panel.widgets import DatetimePicker, DatetimeRangePicker try: from playwright.sync_api import expect @@ -566,3 +567,56 @@ def test_datetimepicker_name(page, port): datetime_picker_with_name = page.locator('.datetimepicker-with-name') expect(datetime_picker_with_name).to_have_text(name) + + +def test_datetimepicker_no_value(page, port, datetime_start_end): + datetime_picker_widget = DatetimePicker() + + serve(datetime_picker_widget, port=port, threaded=True, show=False) + time.sleep(0.2) + page.goto(f"http://localhost:{port}") + + datetime_picker = page.locator('.flatpickr-input') + assert datetime_picker.input_value() == "" + + datetime_picker_widget.value = datetime_start_end[0] + wait_until(lambda: datetime_picker.input_value() == '2021-03-02 00:00:00', page) + + datetime_picker_widget.value = None + wait_until(lambda: datetime_picker.input_value() == '', page) + + +def test_datetimerangepicker_no_value(page, port, datetime_start_end): + datetime_picker_widget = DatetimeRangePicker() + + serve(datetime_picker_widget, port=port, threaded=True, show=False) + time.sleep(0.2) + page.goto(f"http://localhost:{port}") + + datetime_picker = page.locator('.flatpickr-input') + assert datetime_picker.input_value() == "" + + datetime_picker_widget.value = datetime_start_end[:2] + expected = '2021-03-02 00:00:00 to 2021-03-03 00:00:00' + wait_until(lambda: datetime_picker.input_value() == expected, page) + + datetime_picker_widget.value = None + wait_until(lambda: datetime_picker.input_value() == '', page) + + +def test_datetimepicker_remove_value(page, port, datetime_start_end): + datetime_picker_widget = DatetimePicker(value=datetime_start_end[0]) + + serve(datetime_picker_widget, port=port, threaded=True, show=False) + time.sleep(0.2) + page.goto(f"http://localhost:{port}") + + datetime_picker = page.locator('.flatpickr-input') + assert datetime_picker.input_value() == "2021-03-02 00:00:00" + + # Remove values from the browser + datetime_picker.dblclick() + datetime_picker.press("Backspace") + datetime_picker.press("Escape") + + wait_until(lambda: datetime_picker_widget.value is None, page)
googleapis__google-cloud-python-6232
Re-generate library using tasks/synth.py This PR was created by autosynth.
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"This script is used to synthesize generated parts of this library.\"\"\"\n\nimport synthtool as s\nimport synthtool.gcp as gcp\nimport logging\n\nlogging.basicConfig(level=logging.DEBUG)\n\ngapic = gcp.GAPICGenerator()\ncommon = gcp.CommonTemplates()\nexcludes = [\n 'README.rst',\n 'setup.py',\n 'docs/conf.py',\n 'docs/index.rst',\n]\n\nfor version in ['v2beta2', 'v2beta3']:\n library = gapic.py_library(\n 'tasks', version,\n config_path=f'artman_cloudtasks_{version}.yaml')\n\n s.copy(library, excludes=excludes)\n\n # Fix unindentation of bullet list second line\n s.replace(\n f'google/cloud/tasks_{version}/gapic/cloud_tasks_client.py',\n '( \\* .*\\n )([^\\s*])',\n '\\g<1> \\g<2>')\n\n s.replace(\n f'google/cloud/tasks_{version}/gapic/cloud_tasks_client.py',\n '(Google IAM .*?_) ',\n '\\g<1>_ ')\n\n # Issues with Anonymous ('__') links. Change to named.\n s.replace(\n f\"google/cloud/tasks_{version}/proto/*.py\",\n \">`__\",\n \">`_\")\n\n# Issue in v2beta2\ns.replace(\n f'google/cloud/tasks_v2beta2/gapic/cloud_tasks_client.py',\n r'(Sample filter \\\\\"app_engine_http_target: )\\*\\\\\".',\n '\\g<1>\\\\*\\\\\".')\n\n# Wrapped link fails due to space in link (v2beta2)\ns.replace(\n f\"google/cloud/tasks_v2beta2/proto/queue_pb2.py\",\n '(uests in queue.yaml/xml) <\\n\\s+',\n '\\g<1>\\n <')\n", "path": "tasks/synth.py" } ]
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"This script is used to synthesize generated parts of this library.\"\"\"\n\nimport synthtool as s\nimport synthtool.gcp as gcp\nimport logging\n\nlogging.basicConfig(level=logging.DEBUG)\n\ngapic = gcp.GAPICGenerator()\ncommon = gcp.CommonTemplates()\nexcludes = [\n 'README.rst',\n 'setup.py',\n 'nox*.py',\n 'docs/conf.py',\n 'docs/index.rst',\n]\n\nfor version in ['v2beta2', 'v2beta3']:\n library = gapic.py_library(\n 'tasks', version,\n config_path=f'artman_cloudtasks_{version}.yaml')\n\n s.copy(library, excludes=excludes)\n\n # Fix unindentation of bullet list second line\n s.replace(\n f'google/cloud/tasks_{version}/gapic/cloud_tasks_client.py',\n '( \\* .*\\n )([^\\s*])',\n '\\g<1> \\g<2>')\n\n s.replace(\n f'google/cloud/tasks_{version}/gapic/cloud_tasks_client.py',\n '(Google IAM .*?_) ',\n '\\g<1>_ ')\n\n # Issues with Anonymous ('__') links. Change to named.\n s.replace(\n f\"google/cloud/tasks_{version}/proto/*.py\",\n \">`__\",\n \">`_\")\n\n# Issue in v2beta2\ns.replace(\n f'google/cloud/tasks_v2beta2/gapic/cloud_tasks_client.py',\n r'(Sample filter \\\\\"app_engine_http_target: )\\*\\\\\".',\n '\\g<1>\\\\*\\\\\".')\n\n# Wrapped link fails due to space in link (v2beta2)\ns.replace(\n f\"google/cloud/tasks_v2beta2/proto/queue_pb2.py\",\n '(uests in queue.yaml/xml) <\\n\\s+',\n '\\g<1>\\n <')\n", "path": "tasks/synth.py" } ]
diff --git a/tasks/synth.py b/tasks/synth.py index 673a913cd7d3..f986b0e76af8 100644 --- a/tasks/synth.py +++ b/tasks/synth.py @@ -25,6 +25,7 @@ excludes = [ 'README.rst', 'setup.py', + 'nox*.py', 'docs/conf.py', 'docs/index.rst', ]
opsdroid__opsdroid-28
Regex case sensitive The regex match is currently case insensitive. It shouldn't be. https://github.com/opsdroid/opsdroid/blob/master/opsdroid/helper.py#L30
[ { "content": "\"\"\"Helper functions to use within OpsDroid.\"\"\"\n\nimport logging\nimport re\n\n\ndef set_logging_level(logging_level):\n \"\"\"Set the logger level based on the user configuration.\"\"\"\n logger = logging.getLogger()\n if logging_level == 'critical':\n logger.setLevel(logging.CRITICAL)\n elif logging_level == 'error':\n logger.setLevel(logging.ERROR)\n elif logging_level == 'warning':\n logger.setLevel(logging.WARNING)\n elif logging_level == 'info':\n logger.setLevel(logging.INFO)\n elif logging_level == 'debug':\n logger.setLevel(logging.DEBUG)\n # No need to log the others as they'll never be seen\n logging.debug(\"Set log level to debug\")\n else:\n logger.setLevel(logging.INFO)\n logging.warning(\"Log level '\" + logging_level +\n \"' unknown, defaulting to 'info'\")\n\n\ndef match(regex, message):\n \"\"\"Regex match a string.\"\"\"\n return re.match(regex, message, re.M | re.I)\n", "path": "opsdroid/helper.py" } ]
[ { "content": "\"\"\"Helper functions to use within OpsDroid.\"\"\"\n\nimport logging\nimport re\n\n\ndef set_logging_level(logging_level):\n \"\"\"Set the logger level based on the user configuration.\"\"\"\n logger = logging.getLogger()\n if logging_level == 'critical':\n logger.setLevel(logging.CRITICAL)\n elif logging_level == 'error':\n logger.setLevel(logging.ERROR)\n elif logging_level == 'warning':\n logger.setLevel(logging.WARNING)\n elif logging_level == 'info':\n logger.setLevel(logging.INFO)\n elif logging_level == 'debug':\n logger.setLevel(logging.DEBUG)\n # No need to log the others as they'll never be seen\n logging.debug(\"Set log level to debug\")\n else:\n logger.setLevel(logging.INFO)\n logging.warning(\"Log level '\" + logging_level +\n \"' unknown, defaulting to 'info'\")\n\n\ndef match(regex, message):\n \"\"\"Regex match a string.\"\"\"\n return re.match(regex, message)\n", "path": "opsdroid/helper.py" } ]
diff --git a/opsdroid/helper.py b/opsdroid/helper.py index 0b3b108c8..5e52f109c 100644 --- a/opsdroid/helper.py +++ b/opsdroid/helper.py @@ -27,4 +27,4 @@ def set_logging_level(logging_level): def match(regex, message): """Regex match a string.""" - return re.match(regex, message, re.M | re.I) + return re.match(regex, message) diff --git a/tests/test_helper.py b/tests/test_helper.py index 7720cfda5..f6382260e 100644 --- a/tests/test_helper.py +++ b/tests/test_helper.py @@ -33,3 +33,11 @@ def test_match(self): match = helper.match(r"hello (.*)", "hello world") self.assertEqual(match.group(1), "world") + + def test_sensitive_match(self): + """Matches should be case sensitive""" + match = helper.match(r"hello", "hello") + self.assertTrue(match) + + match = helper.match(r"hello", "HELLO") + self.assertFalse(match)
librosa__librosa-1839
librosa 0.10.2 is not compatible with matplotlib <3.5 ***BEFORE POSTING A BUG REPORT*** Please look through [existing issues (both open and closed)](https://github.com/librosa/librosa/issues?q=is%3Aissue) to see if it's already been reported or fixed! **librosa 0.10.2 is not imcompatible with matplotlib.colormap** When I try to user librosa.display, it reports the following error: cannot import name 'colormaps' from 'matplotlib' ![image](https://github.com/librosa/librosa/assets/51704570/d50df74f-c345-48ba-8953-b9b1efec3ff7) **error code** <!-- Example: ``` import librosa.display import matplotlib.pyplot as plt import numpy as np --> **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Software versions*** ![image](https://github.com/librosa/librosa/assets/51704570/957530c7-9656-44f9-8b0e-c1df49c3b61f) **Additional context** I have tried to change the version of matplotlib, but it does not work. And the versions I have tried are: 2.0.0, 3.0.0 librosa 0.10.2 is not compatible with matplotlib <3.5 ***BEFORE POSTING A BUG REPORT*** Please look through [existing issues (both open and closed)](https://github.com/librosa/librosa/issues?q=is%3Aissue) to see if it's already been reported or fixed! **librosa 0.10.2 is not imcompatible with matplotlib.colormap** When I try to user librosa.display, it reports the following error: cannot import name 'colormaps' from 'matplotlib' ![image](https://github.com/librosa/librosa/assets/51704570/d50df74f-c345-48ba-8953-b9b1efec3ff7) **error code** <!-- Example: ``` import librosa.display import matplotlib.pyplot as plt import numpy as np --> **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Software versions*** ![image](https://github.com/librosa/librosa/assets/51704570/957530c7-9656-44f9-8b0e-c1df49c3b61f) **Additional context** I have tried to change the version of matplotlib, but it does not work. And the versions I have tried are: 2.0.0, 3.0.0
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Version info\"\"\"\n\nimport sys\nimport importlib\n\nshort_version = \"0.10\"\nversion = \"0.10.2\"\n\n\ndef __get_mod_version(modname):\n try:\n if modname in sys.modules:\n mod = sys.modules[modname]\n else:\n mod = importlib.import_module(modname)\n try:\n return mod.__version__\n except AttributeError:\n return \"installed, no version number available\"\n\n except ImportError:\n return None\n\n\ndef show_versions() -> None:\n \"\"\"Return the version information for all librosa dependencies.\"\"\"\n core_deps = [\n \"audioread\",\n \"numpy\",\n \"scipy\",\n \"sklearn\",\n \"joblib\",\n \"decorator\",\n \"numba\",\n \"soundfile\",\n \"pooch\",\n \"soxr\",\n \"typing_extensions\",\n \"lazy_loader\",\n \"msgpack\",\n ]\n\n extra_deps = [\n \"numpydoc\",\n \"sphinx\",\n \"sphinx_rtd_theme\",\n \"matplotlib\",\n \"sphinx_multiversion\",\n \"sphinx_gallery\",\n \"mir_eval\",\n \"ipython\",\n \"sphinxcontrib.rsvgconverter\",\n \"pytest\",\n \"pytest_mpl\",\n \"pytest_cov\",\n \"samplerate\",\n \"resampy\",\n \"presets\",\n \"packaging\",\n ]\n\n print(\"INSTALLED VERSIONS\")\n print(\"------------------\")\n print(f\"python: {sys.version}\\n\")\n print(f\"librosa: {version}\\n\")\n for dep in core_deps:\n print(\"{}: {}\".format(dep, __get_mod_version(dep)))\n print(\"\")\n for dep in extra_deps:\n print(\"{}: {}\".format(dep, __get_mod_version(dep)))\n", "path": "librosa/version.py" } ]
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Version info\"\"\"\n\nimport sys\nimport importlib\n\nshort_version = \"0.10\"\nversion = \"0.10.2.post1\"\n\n\ndef __get_mod_version(modname):\n try:\n if modname in sys.modules:\n mod = sys.modules[modname]\n else:\n mod = importlib.import_module(modname)\n try:\n return mod.__version__\n except AttributeError:\n return \"installed, no version number available\"\n\n except ImportError:\n return None\n\n\ndef show_versions() -> None:\n \"\"\"Return the version information for all librosa dependencies.\"\"\"\n core_deps = [\n \"audioread\",\n \"numpy\",\n \"scipy\",\n \"sklearn\",\n \"joblib\",\n \"decorator\",\n \"numba\",\n \"soundfile\",\n \"pooch\",\n \"soxr\",\n \"typing_extensions\",\n \"lazy_loader\",\n \"msgpack\",\n ]\n\n extra_deps = [\n \"numpydoc\",\n \"sphinx\",\n \"sphinx_rtd_theme\",\n \"matplotlib\",\n \"sphinx_multiversion\",\n \"sphinx_gallery\",\n \"mir_eval\",\n \"ipython\",\n \"sphinxcontrib.rsvgconverter\",\n \"pytest\",\n \"pytest_mpl\",\n \"pytest_cov\",\n \"samplerate\",\n \"resampy\",\n \"presets\",\n \"packaging\",\n ]\n\n print(\"INSTALLED VERSIONS\")\n print(\"------------------\")\n print(f\"python: {sys.version}\\n\")\n print(f\"librosa: {version}\\n\")\n for dep in core_deps:\n print(\"{}: {}\".format(dep, __get_mod_version(dep)))\n print(\"\")\n for dep in extra_deps:\n print(\"{}: {}\".format(dep, __get_mod_version(dep)))\n", "path": "librosa/version.py" } ]
diff --git a/.github/environment-ci.yml b/.github/environment-ci.yml index 9dd4e384af..aedf9f5e97 100644 --- a/.github/environment-ci.yml +++ b/.github/environment-ci.yml @@ -21,7 +21,7 @@ dependencies: - typing_extensions>=4.1.1 # optional, but required for testing - - matplotlib>=3.3.0 + - matplotlib>=3.5.0 - pytest-mpl - pytest-cov - pytest diff --git a/.github/environment-minimal.yml b/.github/environment-minimal.yml index 1757f7a67a..c7cf44c7e7 100644 --- a/.github/environment-minimal.yml +++ b/.github/environment-minimal.yml @@ -21,7 +21,7 @@ dependencies: - typing_extensions==4.1.1 # optional, but required for testing - - matplotlib==3.3.0 + - matplotlib==3.5.0 - pytest-mpl - pytest-cov - pytest diff --git a/docs/changelog.rst b/docs/changelog.rst index a3203c00bc..0642e51eda 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,6 +5,18 @@ Changelog v0.10 ===== + +v0.10.2.post1 +------------- +2024-05-14 + +Maintenance + - `#1839`_ Updated minimum matplotlib to 3.5.0. There are no changes to the code in this release, only package metadata and tests. + + +.. _#1839: https://github.com/librosa/librosa/pull/1839 + + v0.10.2 ------- 2024-05-02 @@ -23,7 +35,6 @@ Bug fixes - `#1755`_ Avoid deprecated features in matplotlib and ensure compatibility with mpl 3.8. *Brian McFee* Documentation - - `#1801`_ Improved top-level structure of the documentation site. *Dana Lee* - `#1827`_ Improvements to example code in documentation to include sampling rate parameters whenever necessary. *Brian McFee* - `#1821`_ Added "copy button" to code examples in documentation. *Brian McFee* - `#1789`_ Fixed type annotations for sampling rate parameters. *Brian McFee* @@ -50,7 +61,6 @@ Other changes and maintenance .. _#1784: https://github.com/librosa/librosa/issues/1784 .. _#1733: https://github.com/librosa/librosa/issues/1733 .. _#1755: https://github.com/librosa/librosa/issues/1755 -.. _#1801: https://github.com/librosa/librosa/issues/1801 .. _#1827: https://github.com/librosa/librosa/issues/1827 .. _#1821: https://github.com/librosa/librosa/issues/1821 .. _#1789: https://github.com/librosa/librosa/issues/1789 diff --git a/librosa/version.py b/librosa/version.py index afc53d7345..38726cc6ab 100644 --- a/librosa/version.py +++ b/librosa/version.py @@ -6,7 +6,7 @@ import importlib short_version = "0.10" -version = "0.10.2" +version = "0.10.2.post1" def __get_mod_version(modname): diff --git a/setup.cfg b/setup.cfg index f407d33004..b82079618b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -91,7 +91,7 @@ docs = sphinx != 1.3.1 sphinx_rtd_theme>=1.2.0 numba >= 0.51 - matplotlib >= 3.3.0 + matplotlib >= 3.5.0 sphinx-multiversion >= 0.2.3 sphinx-gallery >= 0.7 mir_eval >= 0.5 @@ -100,7 +100,7 @@ docs = presets sphinx-copybutton >= 0.5.2 tests = - matplotlib >= 3.3.0 + matplotlib >= 3.5.0 packaging >= 20.0 pytest-mpl pytest-cov @@ -109,7 +109,7 @@ tests = resampy >= 0.2.2 types-decorator display = - matplotlib >= 3.3.0 + matplotlib >= 3.5.0 [mypy] diff --git a/tests/test_display.py b/tests/test_display.py index 7a6ed21549..6a7bf73fef 100644 --- a/tests/test_display.py +++ b/tests/test_display.py @@ -16,7 +16,7 @@ import pytest -matplotlib = pytest.importorskip("matplotlib", minversion="3.4") +import matplotlib STYLE = "default"
svthalia__concrexit-1750
Event registration member serializer should be read only ### Describe the bug https://github.com/svthalia/concrexit/blob/4ab37961f50e398cc52422cdc1df66f6ab8ff2ee/website/events/api/v2/serializers/event_registration.py#L34 This serializer should be read-only ### How to reproduce https://staging.thalia.nu/api/v2/events/150/registrations/ shows that you can POST to update the member profile, that should not be the case ### Expected behaviour Be read only
[ { "content": "from rest_framework import serializers\n\nfrom events.models import EventRegistration\nfrom members.api.v2.serializers.member import MemberSerializer\n\n\nclass EventRegistrationSerializer(serializers.ModelSerializer):\n \"\"\"Serializer for event registrations.\"\"\"\n\n def __init__(self, *args, **kwargs):\n # Don't pass the 'fields' arg up to the superclass\n fields = kwargs.pop(\"fields\", {\"pk\", \"member\", \"name\"})\n\n # Instantiate the superclass normally\n super().__init__(*args, **kwargs)\n\n allowed = set(fields)\n existing = set(self.fields.keys())\n for field_name in existing - allowed:\n self.fields.pop(field_name)\n\n class Meta:\n model = EventRegistration\n fields = (\n \"pk\",\n \"present\",\n \"queue_position\",\n \"date\",\n \"payment\",\n \"member\",\n \"name\",\n )\n\n member = MemberSerializer(detailed=False)\n", "path": "website/events/api/v2/serializers/event_registration.py" } ]
[ { "content": "from rest_framework import serializers\n\nfrom events.models import EventRegistration\nfrom members.api.v2.serializers.member import MemberSerializer\n\n\nclass EventRegistrationSerializer(serializers.ModelSerializer):\n \"\"\"Serializer for event registrations.\"\"\"\n\n def __init__(self, *args, **kwargs):\n # Don't pass the 'fields' arg up to the superclass\n fields = kwargs.pop(\"fields\", {\"pk\", \"member\", \"name\"})\n\n # Instantiate the superclass normally\n super().__init__(*args, **kwargs)\n\n allowed = set(fields)\n existing = set(self.fields.keys())\n for field_name in existing - allowed:\n self.fields.pop(field_name)\n\n class Meta:\n model = EventRegistration\n fields = (\n \"pk\",\n \"present\",\n \"queue_position\",\n \"date\",\n \"payment\",\n \"member\",\n \"name\",\n )\n\n member = MemberSerializer(detailed=False, read_only=True)\n", "path": "website/events/api/v2/serializers/event_registration.py" } ]
diff --git a/website/events/api/v2/serializers/event_registration.py b/website/events/api/v2/serializers/event_registration.py index 70f006dcf..ba7a92bb5 100644 --- a/website/events/api/v2/serializers/event_registration.py +++ b/website/events/api/v2/serializers/event_registration.py @@ -31,4 +31,4 @@ class Meta: "name", ) - member = MemberSerializer(detailed=False) + member = MemberSerializer(detailed=False, read_only=True)
scikit-hep__pyhf-1855
Add linkcheck to docs workflows With the addition of [user-defined build jobs in ReadTheDocs](https://twitter.com/readthedocs/status/1519363742869295105?s=11&t=5-u_2BFwXLAj9IyXQLhIVA) I noticed that one of their examples was to [perform a check for broken links]( https://docs.readthedocs.io/en/latest/build-customization.html#perform-a-check-for-broken-links) with `sphinx`'s `linkcheck`. I'm working on adding this both to the ReadTheDocs config and to the docs GHA workflow, but at the moment ```console $ cd docs $ make linkcheck ``` is giving a failure ``` ( babel: line 3) broken cli.html#pyhf-xml2json - ``` on https://github.com/scikit-hep/pyhf/blob/e7996e5ba350a48825d9736ccc81ca8e3009dd3c/docs/babel.rst?plain=1#L5 I'm not quite sure why, as this is a valid link once the source is built, but I think it might be a form of https://github.com/sphinx-doc/sphinx/issues/9383. I have this and other fixes on a branch named `docs/use-read-the-docs-pre-build-job`.
[ { "content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use Path('../relative_path_to_dir').resolve() to make it absolute, like shown here.\n\nfrom pathlib import Path\nimport sys\nfrom pkg_resources import get_distribution\n\nsys.path.insert(0, str(Path('./exts').resolve()))\n\n\ndef setup(app):\n app.add_css_file(\n 'https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.2/gh-fork-ribbon.min.css'\n )\n\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n 'sphinx.ext.autodoc',\n 'sphinx.ext.autosummary',\n 'sphinx.ext.coverage',\n 'sphinx.ext.mathjax',\n 'sphinx.ext.ifconfig',\n 'sphinx.ext.viewcode',\n 'sphinx.ext.githubpages',\n 'sphinx.ext.intersphinx',\n 'sphinxcontrib.bibtex',\n 'sphinx.ext.napoleon',\n 'sphinx_click.ext',\n 'nbsphinx',\n 'sphinx_issues',\n 'sphinx_copybutton',\n 'sphinx_togglebutton',\n 'xref',\n]\nbibtex_bibfiles = [\n \"bib/docs.bib\",\n \"bib/HEPData_likelihoods.bib\",\n \"bib/media.bib\",\n \"bib/posters.bib\",\n \"bib/preferred.bib\",\n \"bib/talks.bib\",\n \"bib/tutorials.bib\",\n \"bib/use_citations.bib\",\n \"bib/general_citations.bib\",\n]\nbibtex_default_style = \"unsrt\"\n\n# external links\nxref_links = {\"arXiv:1007.1727\": (\"[1007.1727]\", \"https://arxiv.org/abs/1007.1727\")}\n\nintersphinx_mapping = {\n 'python': ('https://docs.python.org/3', None),\n 'numpy': ('https://numpy.org/doc/stable/', None),\n 'scipy': ('https://docs.scipy.org/doc/scipy/', None),\n 'matplotlib': ('https://matplotlib.org/stable/', None),\n 'iminuit': ('https://iminuit.readthedocs.io/en/stable/', None),\n 'uproot': ('https://uproot.readthedocs.io/en/latest/', None),\n 'jsonpatch': ('https://python-json-patch.readthedocs.io/en/latest/', None),\n}\n\n# GitHub repo\nissues_github_path = 'scikit-hep/pyhf'\n\n# Generate the API documentation when building\nautosummary_generate = True\nnumpydoc_show_class_members = False\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\nsource_suffix = ['.rst', '.md']\n# source_suffix = '.rst'\n\n# The encoding of source files.\n#\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = 'pyhf'\ncopyright = '2018, Lukas Heinrich, Matthew Feickert, Giordon Stark'\nauthor = 'Lukas Heinrich, Matthew Feickert, Giordon Stark'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n# The full version, including alpha/beta/rc tags.\nrelease = get_distribution('pyhf').version\n# for example take major/minor/patch\nversion = '.'.join(release.split('.')[:3])\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#\n# today = ''\n#\n# Else, today_fmt is used as the format for a strftime call.\n#\n# today_fmt = '%B %d, %Y'\n\nautodoc_mock_imports = [\n 'tensorflow',\n 'torch',\n 'jax',\n 'iminuit',\n 'tensorflow_probability',\n]\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = [\n '_build',\n 'JOSS',\n '**.ipynb_checkpoints',\n 'examples/experiments/edwardpyhf.ipynb',\n 'examples/notebooks/ImpactPlot.ipynb',\n 'examples/notebooks/Recast.ipynb',\n 'examples/notebooks/StatError.ipynb',\n 'examples/notebooks/example-tensorflow.ipynb',\n 'examples/notebooks/histogrammar.ipynb',\n 'examples/notebooks/histosys.ipynb',\n 'examples/notebooks/histosys-pytorch.ipynb',\n 'examples/notebooks/importxml.ipynb',\n 'examples/notebooks/multichannel-coupled-normsys.ipynb',\n 'examples/notebooks/multichannel-normsys.ipynb',\n 'examples/notebooks/normsys.ipynb',\n 'examples/notebooks/pullplot.ipynb',\n 'examples/notebooks/pytorch_tests_onoff.ipynb',\n 'examples/notebooks/tensorflow-limit.ipynb',\n]\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n#\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#\n# show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n# keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages. See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'sphinx_rtd_theme'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further. For a list of options available for each theme, see the\n# documentation.\n#\nhtml_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\nhtml_theme_path = []\n\n# The name for this set of Sphinx documents.\n# \"<project> v<release> documentation\" by default.\n#\n# html_title = u'pyhf v0.3.0'\n\n# A shorter title for the navigation bar. Default is the same as html_title.\n#\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#\n# html_logo = None\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#\n# html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\nhtml_css_files = [\n 'css/custom.css',\n]\n\nhtml_js_files = [\n 'js/custom.js',\n]\n\n# Add any extra paths that contain custom files (such as robots.txt or\n# .htaccess) here, relative to this directory. These files are copied\n# directly to the root of the documentation.\n#\nhtml_extra_path = ['_extras']\n\n# If not None, a 'Last updated on:' timestamp is inserted at every page\n# bottom, using the given strftime format.\n# The empty string is equivalent to '%b %d, %Y'.\n#\n# html_last_updated_fmt = None\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#\n# html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#\n# html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#\n# html_additional_pages = {}\n\n# If false, no module index is generated.\n#\n# html_domain_indices = True\n\n# If false, no index is generated.\n#\n# html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#\n# html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#\n# html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#\n# html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#\n# html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it. The value of this option must be the\n# base URL from which the finished HTML is served.\n#\n# html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n# html_file_suffix = None\n\n# Language to be used for generating the HTML full-text search index.\n# Sphinx supports the following languages:\n# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'\n# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'\n#\n# html_search_language = 'en'\n\n# A dictionary with options for the search language support, empty by default.\n# 'ja' uses this config value.\n# 'zh' user can custom change `jieba` dictionary path.\n#\n# html_search_options = {'type': 'default'}\n\n# The name of a javascript file (relative to the configuration directory) that\n# implements a search results scorer. If empty, the default will be used.\n#\n# html_search_scorer = 'scorer.js'\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'pyhfdoc'\n\n# sphinx-copybutton configuration\ncopybutton_prompt_text = r\">>> |\\.\\.\\. |\\$ \"\ncopybutton_prompt_is_regexp = True\ncopybutton_here_doc_delimiter = \"EOF\"\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n # The paper size ('letterpaper' or 'a4paper').\n #\n # 'papersize': 'letterpaper',\n # The font size ('10pt', '11pt' or '12pt').\n #\n # 'pointsize': '10pt',\n # Additional stuff for the LaTeX preamble.\n #\n # 'preamble': '',\n # Latex figure (float) alignment\n #\n # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n# author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n (\n master_doc,\n 'pyhf.tex',\n 'pyhf Documentation',\n 'Lukas Heinrich, Matthew Feickert, Giordon Stark',\n 'manual',\n )\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#\n# latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#\n# latex_use_parts = False\n\n# If true, show page references after internal links.\n#\n# latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#\n# latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#\n# latex_appendices = []\n\n# It false, will not define \\strong, \\code, \titleref, \\crossref ... but only\n# \\sphinxstrong, ..., \\sphinxtitleref, ... To help avoid clash with user added\n# packages.\n#\n# latex_keep_old_macro_names = True\n\n# If false, no module index is generated.\n#\n# latex_domain_indices = True\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [(master_doc, 'pyhf', 'pyhf Documentation', [author], 1)]\n\n# If true, show URL addresses after external links.\n#\n# man_show_urls = False\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n# dir menu entry, description, category)\ntexinfo_documents = [\n (\n master_doc,\n 'pyhf',\n 'pyhf Documentation',\n author,\n 'pyhf',\n 'One line description of project.',\n 'Miscellaneous',\n )\n]\n\n# Documents to append as an appendix to all manuals.\n#\n# texinfo_appendices = []\n\n# If false, no module index is generated.\n#\n# texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#\n# texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n#\n# texinfo_no_detailmenu = False\n\nmathjax3_config = {\n 'tex2jax': {'inlineMath': [['$', '$'], ['\\\\(', '\\\\)']]},\n 'tex': {\n 'macros': {\n 'bm': [\"\\\\boldsymbol{#1}\", 1], # \\usepackage{bm}, see mathjax/MathJax#1219\n 'HiFa': r'\\texttt{HistFactory}',\n 'Root': r'\\texttt{ROOT}',\n 'RooStats': r'\\texttt{RooStats}',\n 'RooFit': r'\\texttt{RooFit}',\n 'pyhf': r'\\texttt{pyhf}',\n 'CLs': r'\\mathrm{CL}_{s}',\n 'freeset': r'\\bm{\\eta}',\n 'constrset': r'\\bm{\\chi}',\n 'singleconstr': r'\\chi',\n 'channelcounts': r'\\bm{n}',\n 'auxdata': r'\\bm{a}',\n 'poiset': r'\\bm{\\psi}',\n 'nuisset': r'\\bm{\\theta}',\n 'fullset': r'\\bm{\\phi}',\n 'singlefull': r'\\phi',\n 'TeV': r'\\textrm{TeV}',\n }\n },\n}\n", "path": "docs/conf.py" } ]
[ { "content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use Path('../relative_path_to_dir').resolve() to make it absolute, like shown here.\n\nfrom pathlib import Path\nimport sys\nfrom pkg_resources import get_distribution\n\nsys.path.insert(0, str(Path('./exts').resolve()))\n\n\ndef setup(app):\n app.add_css_file(\n 'https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.2/gh-fork-ribbon.min.css'\n )\n\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n 'sphinx.ext.autodoc',\n 'sphinx.ext.autosummary',\n 'sphinx.ext.coverage',\n 'sphinx.ext.mathjax',\n 'sphinx.ext.ifconfig',\n 'sphinx.ext.viewcode',\n 'sphinx.ext.githubpages',\n 'sphinx.ext.intersphinx',\n 'sphinxcontrib.bibtex',\n 'sphinx.ext.napoleon',\n 'sphinx_click.ext',\n 'nbsphinx',\n 'sphinx_issues',\n 'sphinx_copybutton',\n 'sphinx_togglebutton',\n 'xref',\n]\nbibtex_bibfiles = [\n \"bib/docs.bib\",\n \"bib/HEPData_likelihoods.bib\",\n \"bib/media.bib\",\n \"bib/posters.bib\",\n \"bib/preferred.bib\",\n \"bib/talks.bib\",\n \"bib/tutorials.bib\",\n \"bib/use_citations.bib\",\n \"bib/general_citations.bib\",\n]\nbibtex_default_style = \"unsrt\"\n\n# external links\nxref_links = {\"arXiv:1007.1727\": (\"[1007.1727]\", \"https://arxiv.org/abs/1007.1727\")}\n\nintersphinx_mapping = {\n 'python': ('https://docs.python.org/3', None),\n 'numpy': ('https://numpy.org/doc/stable/', None),\n 'scipy': ('https://docs.scipy.org/doc/scipy/', None),\n 'matplotlib': ('https://matplotlib.org/stable/', None),\n 'iminuit': ('https://iminuit.readthedocs.io/en/stable/', None),\n 'uproot': ('https://uproot.readthedocs.io/en/latest/', None),\n 'jsonpatch': ('https://python-json-patch.readthedocs.io/en/latest/', None),\n}\n\n# GitHub repo\nissues_github_path = 'scikit-hep/pyhf'\n\n# Generate the API documentation when building\nautosummary_generate = True\nnumpydoc_show_class_members = False\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\nsource_suffix = ['.rst', '.md']\n# source_suffix = '.rst'\n\n# The encoding of source files.\n#\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = 'pyhf'\ncopyright = '2018, Lukas Heinrich, Matthew Feickert, Giordon Stark'\nauthor = 'Lukas Heinrich, Matthew Feickert, Giordon Stark'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n# The full version, including alpha/beta/rc tags.\nrelease = get_distribution('pyhf').version\n# for example take major/minor/patch\nversion = '.'.join(release.split('.')[:3])\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#\n# today = ''\n#\n# Else, today_fmt is used as the format for a strftime call.\n#\n# today_fmt = '%B %d, %Y'\n\nautodoc_mock_imports = [\n 'tensorflow',\n 'torch',\n 'jax',\n 'iminuit',\n 'tensorflow_probability',\n]\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = [\n '_build',\n 'JOSS',\n '**.ipynb_checkpoints',\n 'examples/experiments/edwardpyhf.ipynb',\n 'examples/notebooks/ImpactPlot.ipynb',\n 'examples/notebooks/Recast.ipynb',\n 'examples/notebooks/StatError.ipynb',\n 'examples/notebooks/example-tensorflow.ipynb',\n 'examples/notebooks/histogrammar.ipynb',\n 'examples/notebooks/histosys.ipynb',\n 'examples/notebooks/histosys-pytorch.ipynb',\n 'examples/notebooks/importxml.ipynb',\n 'examples/notebooks/multichannel-coupled-normsys.ipynb',\n 'examples/notebooks/multichannel-normsys.ipynb',\n 'examples/notebooks/normsys.ipynb',\n 'examples/notebooks/pullplot.ipynb',\n 'examples/notebooks/pytorch_tests_onoff.ipynb',\n 'examples/notebooks/tensorflow-limit.ipynb',\n]\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n#\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#\n# show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n# keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages. See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'sphinx_rtd_theme'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further. For a list of options available for each theme, see the\n# documentation.\n#\nhtml_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\nhtml_theme_path = []\n\n# The name for this set of Sphinx documents.\n# \"<project> v<release> documentation\" by default.\n#\n# html_title = u'pyhf v0.3.0'\n\n# A shorter title for the navigation bar. Default is the same as html_title.\n#\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#\n# html_logo = None\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#\n# html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\nhtml_css_files = [\n 'css/custom.css',\n]\n\nhtml_js_files = [\n 'js/custom.js',\n]\n\n# Add any extra paths that contain custom files (such as robots.txt or\n# .htaccess) here, relative to this directory. These files are copied\n# directly to the root of the documentation.\n#\nhtml_extra_path = ['_extras']\n\n# If not None, a 'Last updated on:' timestamp is inserted at every page\n# bottom, using the given strftime format.\n# The empty string is equivalent to '%b %d, %Y'.\n#\n# html_last_updated_fmt = None\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#\n# html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#\n# html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#\n# html_additional_pages = {}\n\n# If false, no module index is generated.\n#\n# html_domain_indices = True\n\n# If false, no index is generated.\n#\n# html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#\n# html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#\n# html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#\n# html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#\n# html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it. The value of this option must be the\n# base URL from which the finished HTML is served.\n#\n# html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n# html_file_suffix = None\n\n# Language to be used for generating the HTML full-text search index.\n# Sphinx supports the following languages:\n# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'\n# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'\n#\n# html_search_language = 'en'\n\n# A dictionary with options for the search language support, empty by default.\n# 'ja' uses this config value.\n# 'zh' user can custom change `jieba` dictionary path.\n#\n# html_search_options = {'type': 'default'}\n\n# The name of a javascript file (relative to the configuration directory) that\n# implements a search results scorer. If empty, the default will be used.\n#\n# html_search_scorer = 'scorer.js'\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'pyhfdoc'\n\n# sphinx-copybutton configuration\ncopybutton_prompt_text = r\">>> |\\.\\.\\. |\\$ \"\ncopybutton_prompt_is_regexp = True\ncopybutton_here_doc_delimiter = \"EOF\"\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n # The paper size ('letterpaper' or 'a4paper').\n #\n # 'papersize': 'letterpaper',\n # The font size ('10pt', '11pt' or '12pt').\n #\n # 'pointsize': '10pt',\n # Additional stuff for the LaTeX preamble.\n #\n # 'preamble': '',\n # Latex figure (float) alignment\n #\n # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n# author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n (\n master_doc,\n 'pyhf.tex',\n 'pyhf Documentation',\n 'Lukas Heinrich, Matthew Feickert, Giordon Stark',\n 'manual',\n )\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#\n# latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#\n# latex_use_parts = False\n\n# If true, show page references after internal links.\n#\n# latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#\n# latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#\n# latex_appendices = []\n\n# It false, will not define \\strong, \\code, \titleref, \\crossref ... but only\n# \\sphinxstrong, ..., \\sphinxtitleref, ... To help avoid clash with user added\n# packages.\n#\n# latex_keep_old_macro_names = True\n\n# If false, no module index is generated.\n#\n# latex_domain_indices = True\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [(master_doc, 'pyhf', 'pyhf Documentation', [author], 1)]\n\n# If true, show URL addresses after external links.\n#\n# man_show_urls = False\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n# dir menu entry, description, category)\ntexinfo_documents = [\n (\n master_doc,\n 'pyhf',\n 'pyhf Documentation',\n author,\n 'pyhf',\n 'One line description of project.',\n 'Miscellaneous',\n )\n]\n\n# Documents to append as an appendix to all manuals.\n#\n# texinfo_appendices = []\n\n# If false, no module index is generated.\n#\n# texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#\n# texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n#\n# texinfo_no_detailmenu = False\n\nmathjax3_config = {\n 'tex2jax': {'inlineMath': [['$', '$'], ['\\\\(', '\\\\)']]},\n 'tex': {\n 'macros': {\n 'bm': [\"\\\\boldsymbol{#1}\", 1], # \\usepackage{bm}, see mathjax/MathJax#1219\n 'HiFa': r'\\texttt{HistFactory}',\n 'Root': r'\\texttt{ROOT}',\n 'RooStats': r'\\texttt{RooStats}',\n 'RooFit': r'\\texttt{RooFit}',\n 'pyhf': r'\\texttt{pyhf}',\n 'CLs': r'\\mathrm{CL}_{s}',\n 'freeset': r'\\bm{\\eta}',\n 'constrset': r'\\bm{\\chi}',\n 'singleconstr': r'\\chi',\n 'channelcounts': r'\\bm{n}',\n 'auxdata': r'\\bm{a}',\n 'poiset': r'\\bm{\\psi}',\n 'nuisset': r'\\bm{\\theta}',\n 'fullset': r'\\bm{\\phi}',\n 'singlefull': r'\\phi',\n 'TeV': r'\\textrm{TeV}',\n }\n },\n}\n\n# c.f. https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder\nlinkcheck_ignore = ['cli.html#pyhf-xml2json']\nlinkcheck_retries = 50\n", "path": "docs/conf.py" } ]
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 967a8939fd..d25242f51b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -51,6 +51,13 @@ jobs: - name: Verify CITATION.cff schema run: | jsonschema <(curl -sL "https://citation-file-format.github.io/1.2.0/schema.json") --instance <(cat CITATION.cff | yq) + - name: Check for broken links + run: | + pushd docs + make linkcheck + # Don't ship the linkcheck + rm -r _build/linkcheck + popd - name: Test and build docs run: | python -m doctest README.rst diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000000..d71810f28e --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,35 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-20.04 + tools: + python: "3.10" + apt_packages: + - curl + - jq + # https://docs.readthedocs.io/en/latest/build-customization.html + jobs: + pre_build: + - python -m sphinx -b linkcheck docs/ _build/linkcheck + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF and ePub +formats: all + +# python -m pip install .[docs] +python: + install: + - method: pip + path: . + extra_requirements: + - docs + system_packages: true diff --git a/.readthedocs.yml b/.readthedocs.yml deleted file mode 100644 index 382f4f1dc0..0000000000 --- a/.readthedocs.yml +++ /dev/null @@ -1,23 +0,0 @@ -# .readthedocs.yml -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -# Build documentation in the docs/ directory with Sphinx -sphinx: - configuration: docs/conf.py - #fail_on_warning: true - -# Optionally build your docs in additional formats such as PDF and ePub -formats: all - -# python -m pip install .[docs] -python: - version: 3.8 - install: - - method: pip - path: . - extra_requirements: - - docs diff --git a/docs/conf.py b/docs/conf.py index b8e73391df..4ef3e47f77 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -462,3 +462,7 @@ def setup(app): } }, } + +# c.f. https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder +linkcheck_ignore = ['cli.html#pyhf-xml2json'] +linkcheck_retries = 50
cloud-custodian__cloud-custodian-3433
ci - failure around mismatched versions of tabulate Per current ci failures we're getting 0.8.3 of tabulate installed even though azure-cli-core calls out a pin to under 0.8.2. This mirrors the issue we had with fakeredis, where it properly declared a dependency for six == 0.12.0 and we picked up the version pin in requirements.txt. digging around a bit more, pip released a new 19 release series in the last 72hrs, that i'm currently examining for regressions that allowed for installs that ignore package dependencies, when given requirements.
[ { "content": "import os\nfrom io import open\nfrom setuptools import setup, find_packages\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read()\n\n\nsetup(\n name=\"c7n\",\n version='0.8.33.1',\n description=\"Cloud Custodian - Policy Rules Engine\",\n long_description=read('README.rst'),\n classifiers=[\n \"Topic :: System :: Systems Administration\",\n \"Topic :: System :: Distributed Computing\"\n ],\n url=\"https://github.com/capitalone/cloud-custodian\",\n license=\"Apache-2.0\",\n packages=find_packages(),\n entry_points={\n 'console_scripts': [\n 'custodian = c7n.cli:main']},\n install_requires=[\n \"boto3>=1.9.62\",\n \"botocore>=1.12.62\",\n \"python-dateutil>=2.6,<3.0.0\",\n \"pyyaml\",\n \"jsonschema\",\n \"jsonpatch>=1.21\",\n \"argcomplete\",\n \"tabulate\"\n ],\n)\n", "path": "setup.py" } ]
[ { "content": "import os\nfrom io import open\nfrom setuptools import setup, find_packages\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read()\n\n\nsetup(\n name=\"c7n\",\n version='0.8.33.1',\n description=\"Cloud Custodian - Policy Rules Engine\",\n long_description=read('README.rst'),\n classifiers=[\n \"Topic :: System :: Systems Administration\",\n \"Topic :: System :: Distributed Computing\"\n ],\n url=\"https://github.com/capitalone/cloud-custodian\",\n license=\"Apache-2.0\",\n packages=find_packages(),\n entry_points={\n 'console_scripts': [\n 'custodian = c7n.cli:main']},\n install_requires=[\n \"boto3>=1.9.62\",\n \"botocore>=1.12.62\",\n \"python-dateutil>=2.6,<3.0.0\",\n \"pyyaml\",\n \"jsonschema\",\n \"jsonpatch>=1.21\",\n \"argcomplete\",\n \"tabulate==0.8.2\"\n ],\n)\n", "path": "setup.py" } ]
diff --git a/requirements.txt b/requirements.txt index 2f9ec3fc6e5..5dc4629d126 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ boto3>=1.9.62 botocore>=1.12.62 jsonschema>=2.5.1 PyYAML>=3.13 -tabulate>=0.7.7 +tabulate==0.8.2 jsonpatch>=1.2.1 futures>=3.1.1 python-dateutil>=2.6 diff --git a/setup.py b/setup.py index c5f0111bc8d..b66ad750c3d 100644 --- a/setup.py +++ b/setup.py @@ -30,6 +30,6 @@ def read(fname): "jsonschema", "jsonpatch>=1.21", "argcomplete", - "tabulate" + "tabulate==0.8.2" ], )
holoviz__panel-752
panel/examples/apps/django2/ example doesn't work The django2 example doesn't work at least for Django 2.2. The interactive plot doesn't show up and there are no clear error messages either. However, the same example provided by ParamBokeh works fine. But I prefer Panel if this problem can be solved.
[ { "content": "import panel as pn\n\nfrom .sinewave import SineWave\n\ndef app(doc):\n sw = SineWave()\n row = pn.Row(sw.param, sw.plot)\n row._get_root(doc)\n", "path": "examples/apps/django2/sliders/bk_sliders.py" } ]
[ { "content": "import panel as pn\n\nfrom .sinewave import SineWave\n\ndef app(doc):\n sw = SineWave()\n row = pn.Row(sw.param, sw.plot)\n row.server_doc(doc)\n", "path": "examples/apps/django2/sliders/bk_sliders.py" } ]
diff --git a/examples/apps/django2/sliders/bk_sliders.py b/examples/apps/django2/sliders/bk_sliders.py index 7101f3f9ba..3a7097f60f 100644 --- a/examples/apps/django2/sliders/bk_sliders.py +++ b/examples/apps/django2/sliders/bk_sliders.py @@ -5,4 +5,4 @@ def app(doc): sw = SineWave() row = pn.Row(sw.param, sw.plot) - row._get_root(doc) + row.server_doc(doc) diff --git a/examples/user_guide/Django_Apps.ipynb b/examples/user_guide/Django_Apps.ipynb index 4be7bab62a..22eac32989 100644 --- a/examples/user_guide/Django_Apps.ipynb +++ b/examples/user_guide/Django_Apps.ipynb @@ -104,7 +104,7 @@ "def app(doc):\n", " sw = SineWave()\n", " row = pn.Row(sw.param, sw.plot)\n", - " row._get_root(doc)\n", + " row.server_doc(doc)\n", "```" ] },
mkdocs__mkdocs-636
Site description not working Hi, I have the following configuration ``` yml site_name: embed.js site_url: http://embedjs.com site_author: Ritesh Kumar site_description: A jQuery plugin that analyses the string and automatically embeds emojis, media, maps, tweets, code and services. pages: - Home: index.md - Getting Started: gettingStarted.md - How to use ?: usage.md - Documentation: documentation.md - Working Examples: examples.md - Changelogs: history.md theme: readthedocs extra_css: ["custom/custom.css"] site_favicon: img/favicon.ico repo_url: https://github.com/ritz078/embed.js google_analytics: ['UA-60624235-2', 'rkritesh.in/embed.js'] ``` But sadly author and description are not appearing in the served file. other properties are working fine. Any help will be great.
[ { "content": "#!/usr/bin/env python\n# coding: utf-8\n\nfrom __future__ import unicode_literals\nimport logging\nimport click\nimport socket\n\nfrom mkdocs import __version__\nfrom mkdocs import build\nfrom mkdocs import gh_deploy\nfrom mkdocs import new\nfrom mkdocs import serve\nfrom mkdocs import utils\nfrom mkdocs import exceptions\nfrom mkdocs.config import load_config\n\nlog = logging.getLogger(__name__)\n\n\nclass State(object):\n ''' Maintain logging level.'''\n\n def __init__(self, log_name='mkdocs', level=logging.INFO):\n self.logger = logging.getLogger(log_name)\n self.logger.propagate = False\n stream = logging.StreamHandler()\n formatter = logging.Formatter(\"%(levelname)-7s - %(message)s \")\n stream.setFormatter(formatter)\n self.logger.addHandler(stream)\n\n self.logger.setLevel(level)\n\n\npass_state = click.make_pass_decorator(State, ensure=True)\n\n\ndef verbose_option(f):\n def callback(ctx, param, value):\n state = ctx.ensure_object(State)\n if value:\n state.logger.setLevel(logging.DEBUG)\n return click.option('-v', '--verbose',\n is_flag=True,\n expose_value=False,\n help='Enable verbose output',\n callback=callback)(f)\n\n\ndef quiet_option(f):\n def callback(ctx, param, value):\n state = ctx.ensure_object(State)\n if value:\n state.logger.setLevel(logging.ERROR)\n return click.option('-q', '--quiet',\n is_flag=True,\n expose_value=False,\n help='Silence warnings',\n callback=callback)(f)\n\n\ndef common_options(f):\n f = verbose_option(f)\n f = quiet_option(f)\n return f\n\n\nclean_help = \"Remove old files from the site_dir before building\"\nconfig_file_help = \"Provide a specific MkDocs config\"\ndev_addr_help = (\"IP address and port to serve documentation locally (default: \"\n \"localhost:8000)\")\nstrict_help = (\"Enable strict mode. This will cause MkDocs to abort the build \"\n \"on any warnings.\")\ntheme_help = \"The theme to use when building your documentation.\"\ntheme_choices = utils.get_theme_names()\nsite_dir_help = \"The directory to output the result of the documentation build.\"\nreload_help = \"Enable and disable the live reloading in the development server.\"\ncommit_message_help = (\"A commit message to use when commiting to the \"\n \"Github Pages remote branch\")\nremote_branch_help = (\"The remote branch to commit to for Github Pages. This \"\n \"overrides the value specified in config\")\n\n\[email protected](context_settings={'help_option_names': ['-h', '--help']})\[email protected]_option(__version__, '-V', '--version')\n@common_options\ndef cli():\n \"\"\"\n MkDocs - Project documentation with Markdown.\n \"\"\"\n pass\n\n\[email protected](name=\"serve\")\[email protected]('-f', '--config-file', type=click.File('rb'), help=config_file_help)\[email protected]('-a', '--dev-addr', help=dev_addr_help, metavar='<IP:PORT>')\[email protected]('-s', '--strict', is_flag=True, help=strict_help)\[email protected]('-t', '--theme', type=click.Choice(theme_choices), help=theme_help)\[email protected]('--livereload/--no-livereload', default=True, help=reload_help)\n@common_options\ndef serve_command(dev_addr, config_file, strict, theme, livereload):\n \"\"\"Run the builtin development server\"\"\"\n\n logging.getLogger('tornado').setLevel(logging.WARNING)\n\n try:\n serve.serve(\n config_file=config_file,\n dev_addr=dev_addr,\n strict=strict,\n theme=theme,\n livereload=livereload,\n )\n except (exceptions.ConfigurationError, socket.error) as e:\n # Avoid ugly, unhelpful traceback\n raise SystemExit('\\n' + str(e))\n\n\[email protected](name=\"build\")\[email protected]('-c', '--clean', is_flag=True, help=clean_help)\[email protected]('-f', '--config-file', type=click.File('rb'), help=config_file_help)\[email protected]('-s', '--strict', is_flag=True, help=strict_help)\[email protected]('-t', '--theme', type=click.Choice(theme_choices), help=theme_help)\[email protected]('-d', '--site-dir', type=click.Path(), help=site_dir_help)\n@common_options\ndef build_command(clean, config_file, strict, theme, site_dir):\n \"\"\"Build the MkDocs documentation\"\"\"\n try:\n build.build(load_config(\n config_file=config_file,\n strict=strict,\n theme=theme,\n site_dir=site_dir\n ), clean_site_dir=clean)\n except exceptions.ConfigurationError as e:\n # Avoid ugly, unhelpful traceback\n raise SystemExit('\\n' + str(e))\n\n\[email protected](name=\"json\")\[email protected]('-c', '--clean', is_flag=True, help=clean_help)\[email protected]('-f', '--config-file', type=click.File('rb'), help=config_file_help)\[email protected]('-s', '--strict', is_flag=True, help=strict_help)\[email protected]('-d', '--site-dir', type=click.Path(), help=site_dir_help)\n@common_options\ndef json_command(clean, config_file, strict, site_dir):\n \"\"\"Build the MkDocs documentation to JSON files\n\n Rather than building your documentation to HTML pages, this\n outputs each page in a simple JSON format. This command is\n useful if you want to index your documentation in an external\n search engine.\n \"\"\"\n\n log.warning(\"The json command is deprcated and will be removed in a future \"\n \"MkDocs release. For details on updating: \"\n \"http://www.mkdocs.org/about/release-notes/\")\n\n try:\n build.build(load_config(\n config_file=config_file,\n strict=strict,\n site_dir=site_dir\n ), dump_json=True, clean_site_dir=clean)\n except exceptions.ConfigurationError as e:\n # Avoid ugly, unhelpful traceback\n raise SystemExit('\\n' + str(e))\n\n\[email protected](name=\"gh-deploy\")\[email protected]('-c', '--clean', is_flag=True, help=clean_help)\[email protected]('-f', '--config-file', type=click.File('rb'), help=config_file_help)\[email protected]('-m', '--message', help=commit_message_help)\[email protected]('-b', '--remote-branch', help=remote_branch_help)\[email protected]('-r', '--remote-name', help=remote_branch_help)\n@common_options\ndef gh_deploy_command(config_file, clean, message, remote_branch, remote_name):\n \"\"\"Deploy your documentation to GitHub Pages\"\"\"\n try:\n config = load_config(\n config_file=config_file,\n remote_branch=remote_branch,\n remote_name=remote_name\n )\n build.build(config, clean_site_dir=clean)\n gh_deploy.gh_deploy(config, message=message)\n except exceptions.ConfigurationError as e:\n # Avoid ugly, unhelpful traceback\n raise SystemExit('\\n' + str(e))\n\n\[email protected](name=\"new\")\[email protected](\"project_directory\")\n@common_options\ndef new_command(project_directory):\n \"\"\"Create a new MkDocs project\"\"\"\n new.new(project_directory)\n", "path": "mkdocs/cli.py" } ]
[ { "content": "#!/usr/bin/env python\n# coding: utf-8\n\nfrom __future__ import unicode_literals\nimport logging\nimport click\nimport socket\n\nfrom mkdocs import __version__\nfrom mkdocs import build\nfrom mkdocs import gh_deploy\nfrom mkdocs import new\nfrom mkdocs import serve\nfrom mkdocs import utils\nfrom mkdocs import exceptions\nfrom mkdocs.config import load_config\n\nlog = logging.getLogger(__name__)\n\n\nclass State(object):\n ''' Maintain logging level.'''\n\n def __init__(self, log_name='mkdocs', level=logging.INFO):\n self.logger = logging.getLogger(log_name)\n self.logger.propagate = False\n stream = logging.StreamHandler()\n formatter = logging.Formatter(\"%(levelname)-7s - %(message)s \")\n stream.setFormatter(formatter)\n self.logger.addHandler(stream)\n\n self.logger.setLevel(level)\n\n\npass_state = click.make_pass_decorator(State, ensure=True)\n\n\ndef verbose_option(f):\n def callback(ctx, param, value):\n state = ctx.ensure_object(State)\n if value:\n state.logger.setLevel(logging.DEBUG)\n return click.option('-v', '--verbose',\n is_flag=True,\n expose_value=False,\n help='Enable verbose output',\n callback=callback)(f)\n\n\ndef quiet_option(f):\n def callback(ctx, param, value):\n state = ctx.ensure_object(State)\n if value:\n state.logger.setLevel(logging.ERROR)\n return click.option('-q', '--quiet',\n is_flag=True,\n expose_value=False,\n help='Silence warnings',\n callback=callback)(f)\n\n\ndef common_options(f):\n f = verbose_option(f)\n f = quiet_option(f)\n return f\n\n\nclean_help = \"Remove old files from the site_dir before building\"\nconfig_file_help = \"Provide a specific MkDocs config\"\ndev_addr_help = (\"IP address and port to serve documentation locally (default: \"\n \"localhost:8000)\")\nstrict_help = (\"Enable strict mode. This will cause MkDocs to abort the build \"\n \"on any warnings.\")\ntheme_help = \"The theme to use when building your documentation.\"\ntheme_choices = utils.get_theme_names()\nsite_dir_help = \"The directory to output the result of the documentation build.\"\nreload_help = \"Enable and disable the live reloading in the development server.\"\ncommit_message_help = (\"A commit message to use when commiting to the \"\n \"Github Pages remote branch\")\nremote_branch_help = (\"The remote branch to commit to for Github Pages. This \"\n \"overrides the value specified in config\")\n\n\[email protected](context_settings={'help_option_names': ['-h', '--help']})\[email protected]_option(__version__, '-V', '--version')\n@common_options\ndef cli():\n \"\"\"\n MkDocs - Project documentation with Markdown.\n \"\"\"\n\n\[email protected](name=\"serve\")\[email protected]('-f', '--config-file', type=click.File('rb'), help=config_file_help)\[email protected]('-a', '--dev-addr', help=dev_addr_help, metavar='<IP:PORT>')\[email protected]('-s', '--strict', is_flag=True, help=strict_help)\[email protected]('-t', '--theme', type=click.Choice(theme_choices), help=theme_help)\[email protected]('--livereload/--no-livereload', default=True, help=reload_help)\n@common_options\ndef serve_command(dev_addr, config_file, strict, theme, livereload):\n \"\"\"Run the builtin development server\"\"\"\n\n logging.getLogger('tornado').setLevel(logging.WARNING)\n\n try:\n serve.serve(\n config_file=config_file,\n dev_addr=dev_addr,\n strict=strict,\n theme=theme,\n livereload=livereload,\n )\n except (exceptions.ConfigurationError, socket.error) as e:\n # Avoid ugly, unhelpful traceback\n raise SystemExit('\\n' + str(e))\n\n\[email protected](name=\"build\")\[email protected]('-c', '--clean', is_flag=True, help=clean_help)\[email protected]('-f', '--config-file', type=click.File('rb'), help=config_file_help)\[email protected]('-s', '--strict', is_flag=True, help=strict_help)\[email protected]('-t', '--theme', type=click.Choice(theme_choices), help=theme_help)\[email protected]('-d', '--site-dir', type=click.Path(), help=site_dir_help)\n@common_options\ndef build_command(clean, config_file, strict, theme, site_dir):\n \"\"\"Build the MkDocs documentation\"\"\"\n try:\n build.build(load_config(\n config_file=config_file,\n strict=strict,\n theme=theme,\n site_dir=site_dir\n ), clean_site_dir=clean)\n except exceptions.ConfigurationError as e:\n # Avoid ugly, unhelpful traceback\n raise SystemExit('\\n' + str(e))\n\n\[email protected](name=\"json\")\[email protected]('-c', '--clean', is_flag=True, help=clean_help)\[email protected]('-f', '--config-file', type=click.File('rb'), help=config_file_help)\[email protected]('-s', '--strict', is_flag=True, help=strict_help)\[email protected]('-d', '--site-dir', type=click.Path(), help=site_dir_help)\n@common_options\ndef json_command(clean, config_file, strict, site_dir):\n \"\"\"Build the MkDocs documentation to JSON files\n\n Rather than building your documentation to HTML pages, this\n outputs each page in a simple JSON format. This command is\n useful if you want to index your documentation in an external\n search engine.\n \"\"\"\n\n log.warning(\"The json command is deprcated and will be removed in a future \"\n \"MkDocs release. For details on updating: \"\n \"http://www.mkdocs.org/about/release-notes/\")\n\n try:\n build.build(load_config(\n config_file=config_file,\n strict=strict,\n site_dir=site_dir\n ), dump_json=True, clean_site_dir=clean)\n except exceptions.ConfigurationError as e:\n # Avoid ugly, unhelpful traceback\n raise SystemExit('\\n' + str(e))\n\n\[email protected](name=\"gh-deploy\")\[email protected]('-c', '--clean', is_flag=True, help=clean_help)\[email protected]('-f', '--config-file', type=click.File('rb'), help=config_file_help)\[email protected]('-m', '--message', help=commit_message_help)\[email protected]('-b', '--remote-branch', help=remote_branch_help)\[email protected]('-r', '--remote-name', help=remote_branch_help)\n@common_options\ndef gh_deploy_command(config_file, clean, message, remote_branch, remote_name):\n \"\"\"Deploy your documentation to GitHub Pages\"\"\"\n try:\n config = load_config(\n config_file=config_file,\n remote_branch=remote_branch,\n remote_name=remote_name\n )\n build.build(config, clean_site_dir=clean)\n gh_deploy.gh_deploy(config, message=message)\n except exceptions.ConfigurationError as e:\n # Avoid ugly, unhelpful traceback\n raise SystemExit('\\n' + str(e))\n\n\[email protected](name=\"new\")\[email protected](\"project_directory\")\n@common_options\ndef new_command(project_directory):\n \"\"\"Create a new MkDocs project\"\"\"\n new.new(project_directory)\n", "path": "mkdocs/cli.py" } ]
diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index f6fef6a5be..fcf20b409b 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -17,6 +17,12 @@ You can determine your currently installed version using `mkdocs --version`: ## Version 0.15.0 (2015-??-??) * Fix issues when using absolute links to Markdown files. (#628) +* Add support for [site_description] and [site_author] to the [ReadTheDocs] + theme. (#631) + +[site_description]: /user-guide/configuration.md#site_description +[site_author]: /user-guide/configuration.md#site_author +[ReadTheDocs]: /user-guide/styling-your-docs.md#read-the-docs ## Version 0.14.0 (2015-06-09) diff --git a/mkdocs.yml b/mkdocs.yml index d5736eeb34..46bab44715 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,7 @@ site_name: MkDocs site_url: http://www.mkdocs.org site_description: Project documentation with Markdown. +site_author: Tom Christie & Dougal Matthews repo_url: https://github.com/mkdocs/mkdocs/ diff --git a/mkdocs/cli.py b/mkdocs/cli.py index 3324db66b8..09d90310e3 100644 --- a/mkdocs/cli.py +++ b/mkdocs/cli.py @@ -88,7 +88,6 @@ def cli(): """ MkDocs - Project documentation with Markdown. """ - pass @cli.command(name="serve") diff --git a/mkdocs/themes/readthedocs/base.html b/mkdocs/themes/readthedocs/base.html index 042b00aacb..1ab2fa76b2 100644 --- a/mkdocs/themes/readthedocs/base.html +++ b/mkdocs/themes/readthedocs/base.html @@ -4,6 +4,8 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> + {% if page_description %}<meta name="description" content="{{ page_description }}">{% endif %} + {% if site_author %}<meta name="author" content="{{ site_author }}">{% endif %} {% block htmltitle %} <title>{% if page_title %}{{ page_title }} - {% endif %}{{ site_name }}</title> {% endblock %}
encode__httpx-691
Version 0.10.0 Let's get squared away what we need for Version 0.10.0. The key here is we need to make sure we've sorted out any API that'd block us from reintroducing the sync API, so... * [x] Let's drop `.read()` from `Request` - It's not documented anywhere, not *actually* required by users, and the content is available on `request.stream` if absolutely needed. #679 * [x] We need `Response.read()` and `Response.close()` to be `Response.aread()` and `Response.aclose()`. The only point where this is relevant is users performing conditional reads inside a `with httpx.stream(method, url) as response` block. #674 * [x] We ought to have `Client.close()` become `Client.aclose()` for consistency. #675 * [x] Good point to get #617 in. * [x] We'll need to change `response.next()`. We could *either* underspecify the return type, and allow it to be either sync or async depending on the context, *or* we use `response.anext()` and `response.next()`. #676 * [ ] ~Good point to address~ #656. * [x] *Potentially* we could introduce an `httpx.AsyncClient` synonm for `httpx.Client`, and advise our users to switch towards that usage, so that there's no breaking changes for them once we fully reintroduce a sync API all the way through. #680
[ { "content": "__title__ = \"httpx\"\n__description__ = \"A next generation HTTP client, for Python 3.\"\n__version__ = \"0.9.5\"\n", "path": "httpx/__version__.py" } ]
[ { "content": "__title__ = \"httpx\"\n__description__ = \"A next generation HTTP client, for Python 3.\"\n__version__ = \"0.10.0\"\n", "path": "httpx/__version__.py" } ]
diff --git a/CHANGELOG.md b/CHANGELOG.md index bdb16660dc..cfb96504ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,32 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.10.0 (December 29th, 2019) + +The 0.10.0 release makes some changes that will allow us to support both sync and async interfaces. + +In particular with streaming responses the `response.read()` method becomes `response.aread()`, and the `response.close()` method becomes `response.aclose()`. + +If following redirects explicitly the `response.next()` method becomes `response.anext()`. + +### Fixed + +- End HTTP/2 streams immediately on no-body requests, rather than sending an empty body message. (Pull #682) +- Improve typing for `Response.request`: switch from `Optional[Request]` to `Request`. (Pull #666) +- `Response.elapsed` now reflects the entire download time. (Pull #687, #692) + +### Changed + +- Added `AsyncClient` as a synonym for `Client`. (Pull #680) +- Switch to `response.aread()` for conditionally reading streaming responses. (Pull #674) +- Switch to `response.aclose()` and `client.aclose()` for explicit closing. (Pull #674, #675) +- Switch to `response.anext()` for resolving the next redirect response. (Pull #676) + +### Removed + +- When using a client instance, the per-request usage of `verify`, `cert`, and `trust_env` have now escalated from raising a warning to raising an error. You should set these arguments on the client instead. (Pull #617) +- Removed the undocumented `request.read()`, since end users should not require it. + ## 0.9.5 (December 20th, 2019) ### Fixed diff --git a/README.md b/README.md index d8dbf85273..b0e213760d 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ or trio, and is able to support making large numbers of requests concurrently. **Note**: *HTTPX should still be considered in alpha. We'd love early users and feedback, but would strongly recommend pinning your dependencies to the latest median release, so that you're able to properly review API changes between package -updates. Currently you should be using `httpx==0.9.*`.* +updates. Currently you should be using `httpx==0.10.*`.* *In particular, the 0.8 release switched HTTPX into focusing exclusively on providing an async client, in order to move the project forward, and help diff --git a/docs/index.md b/docs/index.md index 819b28cdeb..61c076b382 100644 --- a/docs/index.md +++ b/docs/index.md @@ -33,7 +33,7 @@ or trio, and is able to support making large numbers of concurrent requests. HTTPX should currently be considered in alpha. We'd love early users and feedback, but would strongly recommend pinning your dependencies to the latest median release, so that you're able to properly review API changes between package - updates. Currently you should be using `httpx==0.9.*`. + updates. Currently you should be using `httpx==0.10.*`. In particular, the 0.8 release switched HTTPX into focusing exclusively on providing an async client, in order to move the project forward, and help diff --git a/httpx/__version__.py b/httpx/__version__.py index 735fa8f047..919a040e06 100644 --- a/httpx/__version__.py +++ b/httpx/__version__.py @@ -1,3 +1,3 @@ __title__ = "httpx" __description__ = "A next generation HTTP client, for Python 3." -__version__ = "0.9.5" +__version__ = "0.10.0"
inventree__InvenTree-2404
It would be great to be able to search by MPN. It would be great to be able to search by MPN. _Originally posted by @r0l1 in https://github.com/inventree/InvenTree/issues/2384#issuecomment-982929233_
[ { "content": "\"\"\"\nProvides a JSON API for the Part app\n\"\"\"\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.conf.urls import url, include\nfrom django.http import JsonResponse\nfrom django.db.models import Q, F, Count, Min, Max, Avg\nfrom django.db import transaction\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom rest_framework import status\nfrom rest_framework.response import Response\nfrom rest_framework import filters, serializers\nfrom rest_framework import generics\nfrom rest_framework.exceptions import ValidationError\n\nfrom django_filters.rest_framework import DjangoFilterBackend\nfrom django_filters import rest_framework as rest_filters\n\nfrom djmoney.money import Money\nfrom djmoney.contrib.exchange.models import convert_money\nfrom djmoney.contrib.exchange.exceptions import MissingRate\n\nfrom decimal import Decimal, InvalidOperation\n\nfrom .models import Part, PartCategory, PartRelated\nfrom .models import BomItem, BomItemSubstitute\nfrom .models import PartParameter, PartParameterTemplate\nfrom .models import PartAttachment, PartTestTemplate\nfrom .models import PartSellPriceBreak, PartInternalPriceBreak\nfrom .models import PartCategoryParameterTemplate\n\nfrom company.models import Company, ManufacturerPart, SupplierPart\n\nfrom stock.models import StockItem, StockLocation\n\nfrom common.models import InvenTreeSetting\nfrom build.models import Build\n\nfrom . import serializers as part_serializers\n\nfrom InvenTree.helpers import str2bool, isNull, increment\nfrom InvenTree.api import AttachmentMixin\n\nfrom InvenTree.status_codes import BuildStatus\n\n\nclass CategoryList(generics.ListCreateAPIView):\n \"\"\" API endpoint for accessing a list of PartCategory objects.\n\n - GET: Return a list of PartCategory objects\n - POST: Create a new PartCategory object\n \"\"\"\n\n queryset = PartCategory.objects.all()\n serializer_class = part_serializers.CategorySerializer\n\n def get_serializer_context(self):\n\n ctx = super().get_serializer_context()\n\n try:\n ctx['starred_categories'] = [star.category for star in self.request.user.starred_categories.all()]\n except AttributeError:\n # Error is thrown if the view does not have an associated request\n ctx['starred_categories'] = []\n\n return ctx\n\n def filter_queryset(self, queryset):\n \"\"\"\n Custom filtering:\n - Allow filtering by \"null\" parent to retrieve top-level part categories\n \"\"\"\n\n queryset = super().filter_queryset(queryset)\n\n params = self.request.query_params\n\n cat_id = params.get('parent', None)\n\n cascade = str2bool(params.get('cascade', False))\n\n # Do not filter by category\n if cat_id is None:\n pass\n # Look for top-level categories\n elif isNull(cat_id):\n\n if not cascade:\n queryset = queryset.filter(parent=None)\n\n else:\n try:\n category = PartCategory.objects.get(pk=cat_id)\n\n if cascade:\n parents = category.get_descendants(include_self=True)\n parent_ids = [p.id for p in parents]\n\n queryset = queryset.filter(parent__in=parent_ids)\n else:\n queryset = queryset.filter(parent=category)\n\n except (ValueError, PartCategory.DoesNotExist):\n pass\n\n # Exclude PartCategory tree\n exclude_tree = params.get('exclude_tree', None)\n\n if exclude_tree is not None:\n try:\n cat = PartCategory.objects.get(pk=exclude_tree)\n\n queryset = queryset.exclude(\n pk__in=[c.pk for c in cat.get_descendants(include_self=True)]\n )\n\n except (ValueError, PartCategory.DoesNotExist):\n pass\n\n # Filter by \"starred\" status\n starred = params.get('starred', None)\n\n if starred is not None:\n starred = str2bool(starred)\n starred_categories = [star.category.pk for star in self.request.user.starred_categories.all()]\n\n if starred:\n queryset = queryset.filter(pk__in=starred_categories)\n else:\n queryset = queryset.exclude(pk__in=starred_categories)\n\n return queryset\n\n filter_backends = [\n DjangoFilterBackend,\n filters.SearchFilter,\n filters.OrderingFilter,\n ]\n\n filter_fields = [\n ]\n\n ordering_fields = [\n 'name',\n 'level',\n 'tree_id',\n 'lft',\n ]\n\n # Use hierarchical ordering by default\n ordering = [\n 'tree_id',\n 'lft',\n 'name'\n ]\n\n search_fields = [\n 'name',\n 'description',\n ]\n\n\nclass CategoryDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\"\n API endpoint for detail view of a single PartCategory object\n \"\"\"\n\n serializer_class = part_serializers.CategorySerializer\n queryset = PartCategory.objects.all()\n\n def get_serializer_context(self):\n\n ctx = super().get_serializer_context()\n\n try:\n ctx['starred_categories'] = [star.category for star in self.request.user.starred_categories.all()]\n except AttributeError:\n # Error is thrown if the view does not have an associated request\n ctx['starred_categories'] = []\n\n return ctx\n\n def update(self, request, *args, **kwargs):\n\n if 'starred' in request.data:\n starred = str2bool(request.data.get('starred', False))\n\n self.get_object().set_starred(request.user, starred)\n\n response = super().update(request, *args, **kwargs)\n\n return response\n\n\nclass CategoryParameterList(generics.ListAPIView):\n \"\"\" API endpoint for accessing a list of PartCategoryParameterTemplate objects.\n\n - GET: Return a list of PartCategoryParameterTemplate objects\n \"\"\"\n\n queryset = PartCategoryParameterTemplate.objects.all()\n serializer_class = part_serializers.CategoryParameterTemplateSerializer\n\n def get_queryset(self):\n \"\"\"\n Custom filtering:\n - Allow filtering by \"null\" parent to retrieve all categories parameter templates\n - Allow filtering by category\n - Allow traversing all parent categories\n \"\"\"\n\n queryset = super().get_queryset()\n\n params = self.request.query_params\n\n category = params.get('category', None)\n\n if category is not None:\n try:\n\n category = PartCategory.objects.get(pk=category)\n\n fetch_parent = str2bool(params.get('fetch_parent', True))\n\n if fetch_parent:\n parents = category.get_ancestors(include_self=True)\n queryset = queryset.filter(category__in=[cat.pk for cat in parents])\n else:\n queryset = queryset.filter(category=category)\n\n except (ValueError, PartCategory.DoesNotExist):\n pass\n\n return queryset\n\n\nclass PartSalePriceList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for list view of PartSalePriceBreak model\n \"\"\"\n\n queryset = PartSellPriceBreak.objects.all()\n serializer_class = part_serializers.PartSalePriceSerializer\n\n filter_backends = [\n DjangoFilterBackend\n ]\n\n filter_fields = [\n 'part',\n ]\n\n\nclass PartInternalPriceList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for list view of PartInternalPriceBreak model\n \"\"\"\n\n queryset = PartInternalPriceBreak.objects.all()\n serializer_class = part_serializers.PartInternalPriceSerializer\n permission_required = 'roles.sales_order.show'\n\n filter_backends = [\n DjangoFilterBackend\n ]\n\n filter_fields = [\n 'part',\n ]\n\n\nclass PartAttachmentList(generics.ListCreateAPIView, AttachmentMixin):\n \"\"\"\n API endpoint for listing (and creating) a PartAttachment (file upload).\n \"\"\"\n\n queryset = PartAttachment.objects.all()\n serializer_class = part_serializers.PartAttachmentSerializer\n\n filter_backends = [\n DjangoFilterBackend,\n ]\n\n filter_fields = [\n 'part',\n ]\n\n\nclass PartAttachmentDetail(generics.RetrieveUpdateDestroyAPIView, AttachmentMixin):\n \"\"\"\n Detail endpoint for PartAttachment model\n \"\"\"\n\n queryset = PartAttachment.objects.all()\n serializer_class = part_serializers.PartAttachmentSerializer\n\n\nclass PartTestTemplateDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\"\n Detail endpoint for PartTestTemplate model\n \"\"\"\n\n queryset = PartTestTemplate.objects.all()\n serializer_class = part_serializers.PartTestTemplateSerializer\n\n\nclass PartTestTemplateList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for listing (and creating) a PartTestTemplate.\n \"\"\"\n\n queryset = PartTestTemplate.objects.all()\n serializer_class = part_serializers.PartTestTemplateSerializer\n\n def filter_queryset(self, queryset):\n \"\"\"\n Filter the test list queryset.\n\n If filtering by 'part', we include results for any parts \"above\" the specified part.\n \"\"\"\n\n queryset = super().filter_queryset(queryset)\n\n params = self.request.query_params\n\n part = params.get('part', None)\n\n # Filter by part\n if part:\n try:\n part = Part.objects.get(pk=part)\n queryset = queryset.filter(part__in=part.get_ancestors(include_self=True))\n except (ValueError, Part.DoesNotExist):\n pass\n\n # Filter by 'required' status\n required = params.get('required', None)\n\n if required is not None:\n queryset = queryset.filter(required=required)\n\n return queryset\n\n filter_backends = [\n DjangoFilterBackend,\n filters.OrderingFilter,\n filters.SearchFilter,\n ]\n\n\nclass PartThumbs(generics.ListAPIView):\n \"\"\"\n API endpoint for retrieving information on available Part thumbnails\n \"\"\"\n\n queryset = Part.objects.all()\n serializer_class = part_serializers.PartThumbSerializer\n\n def get_queryset(self):\n\n queryset = super().get_queryset()\n\n # Get all Parts which have an associated image\n queryset = queryset.exclude(image='')\n\n return queryset\n\n def list(self, request, *args, **kwargs):\n \"\"\"\n Serialize the available Part images.\n - Images may be used for multiple parts!\n \"\"\"\n\n queryset = self.filter_queryset(self.get_queryset())\n\n # Return the most popular parts first\n data = queryset.values(\n 'image',\n ).annotate(count=Count('image')).order_by('-count')\n\n return Response(data)\n\n filter_backends = [\n filters.SearchFilter,\n ]\n\n search_fields = [\n 'name',\n 'description',\n 'IPN',\n 'revision',\n 'keywords',\n 'category__name',\n ]\n\n\nclass PartThumbsUpdate(generics.RetrieveUpdateAPIView):\n \"\"\" API endpoint for updating Part thumbnails\"\"\"\n\n queryset = Part.objects.all()\n serializer_class = part_serializers.PartThumbSerializerUpdate\n\n filter_backends = [\n DjangoFilterBackend\n ]\n\n\nclass PartSerialNumberDetail(generics.RetrieveAPIView):\n \"\"\"\n API endpoint for returning extra serial number information about a particular part\n \"\"\"\n\n queryset = Part.objects.all()\n\n def retrieve(self, request, *args, **kwargs):\n\n part = self.get_object()\n\n # Calculate the \"latest\" serial number\n latest = part.getLatestSerialNumber()\n\n data = {\n 'latest': latest,\n }\n\n if latest is not None:\n next = increment(latest)\n\n if next != increment:\n data['next'] = next\n\n return Response(data)\n\n\nclass PartDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\" API endpoint for detail view of a single Part object \"\"\"\n\n queryset = Part.objects.all()\n serializer_class = part_serializers.PartSerializer\n\n starred_parts = None\n\n def get_queryset(self, *args, **kwargs):\n queryset = super().get_queryset(*args, **kwargs)\n\n queryset = part_serializers.PartSerializer.annotate_queryset(queryset)\n\n return queryset\n\n def get_serializer(self, *args, **kwargs):\n\n # By default, include 'category_detail' information in the detail view\n try:\n kwargs['category_detail'] = str2bool(self.request.query_params.get('category_detail', True))\n except AttributeError:\n pass\n\n # Ensure the request context is passed through\n kwargs['context'] = self.get_serializer_context()\n\n # Pass a list of \"starred\" parts of the current user to the serializer\n # We do this to reduce the number of database queries required!\n if self.starred_parts is None and self.request is not None:\n self.starred_parts = [star.part for star in self.request.user.starred_parts.all()]\n\n kwargs['starred_parts'] = self.starred_parts\n\n return self.serializer_class(*args, **kwargs)\n\n def destroy(self, request, *args, **kwargs):\n # Retrieve part\n part = Part.objects.get(pk=int(kwargs['pk']))\n # Check if inactive\n if not part.active:\n # Delete\n return super(PartDetail, self).destroy(request, *args, **kwargs)\n else:\n # Return 405 error\n message = f'Part \\'{part.name}\\' (pk = {part.pk}) is active: cannot delete'\n return Response(status=status.HTTP_405_METHOD_NOT_ALLOWED, data=message)\n\n def update(self, request, *args, **kwargs):\n \"\"\"\n Custom update functionality for Part instance.\n\n - If the 'starred' field is provided, update the 'starred' status against current user\n \"\"\"\n\n if 'starred' in request.data:\n starred = str2bool(request.data.get('starred', False))\n\n self.get_object().set_starred(request.user, starred)\n\n response = super().update(request, *args, **kwargs)\n\n return response\n\n\nclass PartFilter(rest_filters.FilterSet):\n \"\"\"\n Custom filters for the PartList endpoint.\n Uses the django_filters extension framework\n \"\"\"\n\n # Filter by parts which have (or not) an IPN value\n has_ipn = rest_filters.BooleanFilter(label='Has IPN', method='filter_has_ipn')\n\n def filter_has_ipn(self, queryset, name, value):\n\n value = str2bool(value)\n\n if value:\n queryset = queryset.exclude(IPN='')\n else:\n queryset = queryset.filter(IPN='')\n\n return queryset\n\n # Regex filter for name\n name_regex = rest_filters.CharFilter(label='Filter by name (regex)', field_name='name', lookup_expr='iregex')\n\n # Exact match for IPN\n IPN = rest_filters.CharFilter(\n label='Filter by exact IPN (internal part number)',\n field_name='IPN',\n lookup_expr=\"iexact\"\n )\n\n # Regex match for IPN\n IPN_regex = rest_filters.CharFilter(label='Filter by regex on IPN (internal part number)', field_name='IPN', lookup_expr='iregex')\n\n # low_stock filter\n low_stock = rest_filters.BooleanFilter(label='Low stock', method='filter_low_stock')\n\n def filter_low_stock(self, queryset, name, value):\n \"\"\"\n Filter by \"low stock\" status\n \"\"\"\n\n value = str2bool(value)\n\n if value:\n # Ignore any parts which do not have a specified 'minimum_stock' level\n queryset = queryset.exclude(minimum_stock=0)\n # Filter items which have an 'in_stock' level lower than 'minimum_stock'\n queryset = queryset.filter(Q(in_stock__lt=F('minimum_stock')))\n else:\n # Filter items which have an 'in_stock' level higher than 'minimum_stock'\n queryset = queryset.filter(Q(in_stock__gte=F('minimum_stock')))\n\n return queryset\n\n # has_stock filter\n has_stock = rest_filters.BooleanFilter(label='Has stock', method='filter_has_stock')\n\n def filter_has_stock(self, queryset, name, value):\n\n value = str2bool(value)\n\n if value:\n queryset = queryset.filter(Q(in_stock__gt=0))\n else:\n queryset = queryset.filter(Q(in_stock__lte=0))\n\n return queryset\n\n is_template = rest_filters.BooleanFilter()\n\n assembly = rest_filters.BooleanFilter()\n\n component = rest_filters.BooleanFilter()\n\n trackable = rest_filters.BooleanFilter()\n\n purchaseable = rest_filters.BooleanFilter()\n\n salable = rest_filters.BooleanFilter()\n\n active = rest_filters.BooleanFilter()\n\n\nclass PartList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for accessing a list of Part objects\n\n - GET: Return list of objects\n - POST: Create a new Part object\n\n The Part object list can be filtered by:\n - category: Filter by PartCategory reference\n - cascade: If true, include parts from sub-categories\n - starred: Is the part \"starred\" by the current user?\n - is_template: Is the part a template part?\n - variant_of: Filter by variant_of Part reference\n - assembly: Filter by assembly field\n - component: Filter by component field\n - trackable: Filter by trackable field\n - purchaseable: Filter by purcahseable field\n - salable: Filter by salable field\n - active: Filter by active field\n - ancestor: Filter parts by 'ancestor' (template / variant tree)\n \"\"\"\n\n serializer_class = part_serializers.PartSerializer\n queryset = Part.objects.all()\n filterset_class = PartFilter\n\n starred_parts = None\n\n def get_serializer(self, *args, **kwargs):\n\n # Ensure the request context is passed through\n kwargs['context'] = self.get_serializer_context()\n\n # Pass a list of \"starred\" parts fo the current user to the serializer\n # We do this to reduce the number of database queries required!\n if self.starred_parts is None and self.request is not None:\n self.starred_parts = [star.part for star in self.request.user.starred_parts.all()]\n\n kwargs['starred_parts'] = self.starred_parts\n\n return self.serializer_class(*args, **kwargs)\n\n def list(self, request, *args, **kwargs):\n \"\"\"\n Overide the 'list' method, as the PartCategory objects are\n very expensive to serialize!\n\n So we will serialize them first, and keep them in memory,\n so that they do not have to be serialized multiple times...\n \"\"\"\n\n queryset = self.filter_queryset(self.get_queryset())\n\n page = self.paginate_queryset(queryset)\n\n if page is not None:\n serializer = self.get_serializer(page, many=True)\n else:\n serializer = self.get_serializer(queryset, many=True)\n\n data = serializer.data\n\n # Do we wish to include PartCategory detail?\n if str2bool(request.query_params.get('category_detail', False)):\n\n # Work out which part categories we need to query\n category_ids = set()\n\n for part in data:\n cat_id = part['category']\n\n if cat_id is not None:\n category_ids.add(cat_id)\n\n # Fetch only the required PartCategory objects from the database\n categories = PartCategory.objects.filter(pk__in=category_ids).prefetch_related(\n 'parts',\n 'parent',\n 'children',\n )\n\n category_map = {}\n\n # Serialize each PartCategory object\n for category in categories:\n category_map[category.pk] = part_serializers.CategorySerializer(category).data\n\n for part in data:\n cat_id = part['category']\n\n if cat_id is not None and cat_id in category_map.keys():\n detail = category_map[cat_id]\n else:\n detail = None\n\n part['category_detail'] = detail\n\n \"\"\"\n Determine the response type based on the request.\n a) For HTTP requests (e.g. via the browseable API) return a DRF response\n b) For AJAX requests, simply return a JSON rendered response.\n \"\"\"\n if page is not None:\n return self.get_paginated_response(data)\n elif request.is_ajax():\n return JsonResponse(data, safe=False)\n else:\n return Response(data)\n\n @transaction.atomic\n def create(self, request, *args, **kwargs):\n \"\"\"\n We wish to save the user who created this part!\n\n Note: Implementation copied from DRF class CreateModelMixin\n \"\"\"\n\n # TODO: Unit tests for this function!\n\n serializer = self.get_serializer(data=request.data)\n serializer.is_valid(raise_exception=True)\n\n part = serializer.save()\n part.creation_user = self.request.user\n\n # Optionally copy templates from category or parent category\n copy_templates = {\n 'main': str2bool(request.data.get('copy_category_templates', False)),\n 'parent': str2bool(request.data.get('copy_parent_templates', False))\n }\n\n part.save(**{'add_category_templates': copy_templates})\n\n # Optionally copy data from another part (e.g. when duplicating)\n copy_from = request.data.get('copy_from', None)\n\n if copy_from is not None:\n\n try:\n original = Part.objects.get(pk=copy_from)\n\n copy_bom = str2bool(request.data.get('copy_bom', False))\n copy_parameters = str2bool(request.data.get('copy_parameters', False))\n copy_image = str2bool(request.data.get('copy_image', True))\n\n # Copy image?\n if copy_image:\n part.image = original.image\n part.save()\n\n # Copy BOM?\n if copy_bom:\n part.copy_bom_from(original)\n\n # Copy parameter data?\n if copy_parameters:\n part.copy_parameters_from(original)\n\n except (ValueError, Part.DoesNotExist):\n pass\n\n # Optionally create initial stock item\n initial_stock = str2bool(request.data.get('initial_stock', False))\n\n if initial_stock:\n try:\n\n initial_stock_quantity = Decimal(request.data.get('initial_stock_quantity', ''))\n\n if initial_stock_quantity <= 0:\n raise ValidationError({\n 'initial_stock_quantity': [_('Must be greater than zero')],\n })\n except (ValueError, InvalidOperation): # Invalid quantity provided\n raise ValidationError({\n 'initial_stock_quantity': [_('Must be a valid quantity')],\n })\n\n initial_stock_location = request.data.get('initial_stock_location', None)\n\n try:\n initial_stock_location = StockLocation.objects.get(pk=initial_stock_location)\n except (ValueError, StockLocation.DoesNotExist):\n initial_stock_location = None\n\n if initial_stock_location is None:\n if part.default_location is not None:\n initial_stock_location = part.default_location\n else:\n raise ValidationError({\n 'initial_stock_location': [_('Specify location for initial part stock')],\n })\n\n stock_item = StockItem(\n part=part,\n quantity=initial_stock_quantity,\n location=initial_stock_location,\n )\n\n stock_item.save(user=request.user)\n\n # Optionally add manufacturer / supplier data to the part\n if part.purchaseable and str2bool(request.data.get('add_supplier_info', False)):\n\n try:\n manufacturer = Company.objects.get(pk=request.data.get('manufacturer', None))\n except:\n manufacturer = None\n\n try:\n supplier = Company.objects.get(pk=request.data.get('supplier', None))\n except:\n supplier = None\n\n mpn = str(request.data.get('MPN', '')).strip()\n sku = str(request.data.get('SKU', '')).strip()\n\n # Construct a manufacturer part\n if manufacturer or mpn:\n if not manufacturer:\n raise ValidationError({\n 'manufacturer': [_(\"This field is required\")]\n })\n if not mpn:\n raise ValidationError({\n 'MPN': [_(\"This field is required\")]\n })\n\n manufacturer_part = ManufacturerPart.objects.create(\n part=part,\n manufacturer=manufacturer,\n MPN=mpn\n )\n else:\n # No manufacturer part data specified\n manufacturer_part = None\n\n if supplier or sku:\n if not supplier:\n raise ValidationError({\n 'supplier': [_(\"This field is required\")]\n })\n if not sku:\n raise ValidationError({\n 'SKU': [_(\"This field is required\")]\n })\n\n SupplierPart.objects.create(\n part=part,\n supplier=supplier,\n SKU=sku,\n manufacturer_part=manufacturer_part,\n )\n\n headers = self.get_success_headers(serializer.data)\n\n return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers)\n\n def get_queryset(self, *args, **kwargs):\n\n queryset = super().get_queryset(*args, **kwargs)\n queryset = part_serializers.PartSerializer.annotate_queryset(queryset)\n\n return queryset\n\n def filter_queryset(self, queryset):\n \"\"\"\n Perform custom filtering of the queryset.\n We overide the DRF filter_fields here because\n \"\"\"\n\n params = self.request.query_params\n\n queryset = super().filter_queryset(queryset)\n\n # Exclude specific part ID values?\n exclude_id = []\n\n for key in ['exclude_id', 'exclude_id[]']:\n if key in params:\n exclude_id += params.getlist(key, [])\n\n if exclude_id:\n\n id_values = []\n\n for val in exclude_id:\n try:\n # pk values must be integer castable\n val = int(val)\n id_values.append(val)\n except ValueError:\n pass\n\n queryset = queryset.exclude(pk__in=id_values)\n\n # Exclude part variant tree?\n exclude_tree = params.get('exclude_tree', None)\n\n if exclude_tree is not None:\n try:\n top_level_part = Part.objects.get(pk=exclude_tree)\n\n queryset = queryset.exclude(\n pk__in=[prt.pk for prt in top_level_part.get_descendants(include_self=True)]\n )\n\n except (ValueError, Part.DoesNotExist):\n pass\n\n # Filter by 'ancestor'?\n ancestor = params.get('ancestor', None)\n\n if ancestor is not None:\n # If an 'ancestor' part is provided, filter to match only children\n try:\n ancestor = Part.objects.get(pk=ancestor)\n descendants = ancestor.get_descendants(include_self=False)\n queryset = queryset.filter(pk__in=[d.pk for d in descendants])\n except (ValueError, Part.DoesNotExist):\n pass\n\n # Filter by whether the BOM has been validated (or not)\n bom_valid = params.get('bom_valid', None)\n\n # TODO: Querying bom_valid status may be quite expensive\n # TODO: (It needs to be profiled!)\n # TODO: It might be worth caching the bom_valid status to a database column\n\n if bom_valid is not None:\n\n bom_valid = str2bool(bom_valid)\n\n # Limit queryset to active assemblies\n queryset = queryset.filter(active=True, assembly=True)\n\n pks = []\n\n for part in queryset:\n if part.is_bom_valid() == bom_valid:\n pks.append(part.pk)\n\n queryset = queryset.filter(pk__in=pks)\n\n # Filter by 'related' parts?\n related = params.get('related', None)\n exclude_related = params.get('exclude_related', None)\n\n if related is not None or exclude_related is not None:\n try:\n pk = related if related is not None else exclude_related\n pk = int(pk)\n\n related_part = Part.objects.get(pk=pk)\n\n part_ids = set()\n\n # Return any relationship which points to the part in question\n relation_filter = Q(part_1=related_part) | Q(part_2=related_part)\n\n for relation in PartRelated.objects.filter(relation_filter):\n\n if relation.part_1.pk != pk:\n part_ids.add(relation.part_1.pk)\n\n if relation.part_2.pk != pk:\n part_ids.add(relation.part_2.pk)\n\n if related is not None:\n # Only return related results\n queryset = queryset.filter(pk__in=[pk for pk in part_ids])\n elif exclude_related is not None:\n # Exclude related results\n queryset = queryset.exclude(pk__in=[pk for pk in part_ids])\n\n except (ValueError, Part.DoesNotExist):\n pass\n\n # Filter by 'starred' parts?\n starred = params.get('starred', None)\n\n if starred is not None:\n starred = str2bool(starred)\n starred_parts = [star.part.pk for star in self.request.user.starred_parts.all()]\n\n if starred:\n queryset = queryset.filter(pk__in=starred_parts)\n else:\n queryset = queryset.exclude(pk__in=starred_parts)\n\n # Cascade? (Default = True)\n cascade = str2bool(params.get('cascade', True))\n\n # Does the user wish to filter by category?\n cat_id = params.get('category', None)\n\n if cat_id is None:\n # No category filtering if category is not specified\n pass\n\n else:\n # Category has been specified!\n if isNull(cat_id):\n # A 'null' category is the top-level category\n if cascade is False:\n # Do not cascade, only list parts in the top-level category\n queryset = queryset.filter(category=None)\n\n else:\n try:\n category = PartCategory.objects.get(pk=cat_id)\n\n # If '?cascade=true' then include parts which exist in sub-categories\n if cascade:\n queryset = queryset.filter(category__in=category.getUniqueChildren())\n # Just return parts directly in the requested category\n else:\n queryset = queryset.filter(category=cat_id)\n except (ValueError, PartCategory.DoesNotExist):\n pass\n\n # Filer by 'depleted_stock' status -> has no stock and stock items\n depleted_stock = params.get('depleted_stock', None)\n\n if depleted_stock is not None:\n depleted_stock = str2bool(depleted_stock)\n\n if depleted_stock:\n queryset = queryset.filter(Q(in_stock=0) & ~Q(stock_item_count=0))\n\n # Filter by \"parts which need stock to complete build\"\n stock_to_build = params.get('stock_to_build', None)\n\n # TODO: This is super expensive, database query wise...\n # TODO: Need to figure out a cheaper way of making this filter query\n\n if stock_to_build is not None:\n # Get active builds\n builds = Build.objects.filter(status__in=BuildStatus.ACTIVE_CODES)\n # Store parts with builds needing stock\n parts_needed_to_complete_builds = []\n # Filter required parts\n for build in builds:\n parts_needed_to_complete_builds += [part.pk for part in build.required_parts_to_complete_build]\n\n queryset = queryset.filter(pk__in=parts_needed_to_complete_builds)\n\n # Optionally limit the maximum number of returned results\n # e.g. for displaying \"recent part\" list\n max_results = params.get('max_results', None)\n\n if max_results is not None:\n try:\n max_results = int(max_results)\n\n if max_results > 0:\n queryset = queryset[:max_results]\n\n except (ValueError):\n pass\n\n return queryset\n\n filter_backends = [\n DjangoFilterBackend,\n filters.SearchFilter,\n filters.OrderingFilter,\n ]\n\n filter_fields = [\n 'variant_of',\n ]\n\n ordering_fields = [\n 'name',\n 'creation_date',\n 'IPN',\n 'in_stock',\n 'category',\n ]\n\n # Default ordering\n ordering = 'name'\n\n search_fields = [\n 'name',\n 'description',\n 'IPN',\n 'revision',\n 'keywords',\n 'category__name',\n ]\n\n\nclass PartRelatedList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for accessing a list of PartRelated objects\n \"\"\"\n\n queryset = PartRelated.objects.all()\n serializer_class = part_serializers.PartRelationSerializer\n\n def filter_queryset(self, queryset):\n\n queryset = super().filter_queryset(queryset)\n\n params = self.request.query_params\n\n # Add a filter for \"part\" - we can filter either part_1 or part_2\n part = params.get('part', None)\n\n if part is not None:\n try:\n part = Part.objects.get(pk=part)\n\n queryset = queryset.filter(Q(part_1=part) | Q(part_2=part))\n\n except (ValueError, Part.DoesNotExist):\n pass\n\n return queryset\n\n\nclass PartRelatedDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\"\n API endpoint for accessing detail view of a PartRelated object\n \"\"\"\n\n queryset = PartRelated.objects.all()\n serializer_class = part_serializers.PartRelationSerializer\n\n\nclass PartParameterTemplateList(generics.ListCreateAPIView):\n \"\"\" API endpoint for accessing a list of PartParameterTemplate objects.\n\n - GET: Return list of PartParameterTemplate objects\n - POST: Create a new PartParameterTemplate object\n \"\"\"\n\n queryset = PartParameterTemplate.objects.all()\n serializer_class = part_serializers.PartParameterTemplateSerializer\n\n filter_backends = [\n DjangoFilterBackend,\n filters.OrderingFilter,\n filters.SearchFilter,\n ]\n\n filter_fields = [\n 'name',\n ]\n\n search_fields = [\n 'name',\n ]\n\n\nclass PartParameterList(generics.ListCreateAPIView):\n \"\"\" API endpoint for accessing a list of PartParameter objects\n\n - GET: Return list of PartParameter objects\n - POST: Create a new PartParameter object\n \"\"\"\n\n queryset = PartParameter.objects.all()\n serializer_class = part_serializers.PartParameterSerializer\n\n filter_backends = [\n DjangoFilterBackend\n ]\n\n filter_fields = [\n 'part',\n 'template',\n ]\n\n\nclass PartParameterDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\"\n API endpoint for detail view of a single PartParameter object\n \"\"\"\n\n queryset = PartParameter.objects.all()\n serializer_class = part_serializers.PartParameterSerializer\n\n\nclass BomFilter(rest_filters.FilterSet):\n \"\"\"\n Custom filters for the BOM list\n \"\"\"\n\n # Boolean filters for BOM item\n optional = rest_filters.BooleanFilter(label='BOM line is optional')\n inherited = rest_filters.BooleanFilter(label='BOM line is inherited')\n allow_variants = rest_filters.BooleanFilter(label='Variants are allowed')\n\n # Filters for linked 'part'\n part_active = rest_filters.BooleanFilter(label='Master part is active', field_name='part__active')\n part_trackable = rest_filters.BooleanFilter(label='Master part is trackable', field_name='part__trackable')\n\n # Filters for linked 'sub_part'\n sub_part_trackable = rest_filters.BooleanFilter(label='Sub part is trackable', field_name='sub_part__trackable')\n sub_part_assembly = rest_filters.BooleanFilter(label='Sub part is an assembly', field_name='sub_part__assembly')\n\n validated = rest_filters.BooleanFilter(label='BOM line has been validated', method='filter_validated')\n\n def filter_validated(self, queryset, name, value):\n\n # Work out which lines have actually been validated\n pks = []\n\n value = str2bool(value)\n\n # Shortcut for quicker filtering - BomItem with empty 'checksum' values are not validated\n if value:\n queryset = queryset.exclude(checksum=None).exclude(checksum='')\n\n for bom_item in queryset.all():\n if bom_item.is_line_valid:\n pks.append(bom_item.pk)\n\n if value:\n queryset = queryset.filter(pk__in=pks)\n else:\n queryset = queryset.exclude(pk__in=pks)\n\n return queryset\n\n\nclass BomList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for accessing a list of BomItem objects.\n\n - GET: Return list of BomItem objects\n - POST: Create a new BomItem object\n \"\"\"\n\n serializer_class = part_serializers.BomItemSerializer\n queryset = BomItem.objects.all()\n filterset_class = BomFilter\n\n def list(self, request, *args, **kwargs):\n\n queryset = self.filter_queryset(self.get_queryset())\n\n page = self.paginate_queryset(queryset)\n\n if page is not None:\n serializer = self.get_serializer(page, many=True)\n else:\n serializer = self.get_serializer(queryset, many=True)\n\n data = serializer.data\n\n \"\"\"\n Determine the response type based on the request.\n a) For HTTP requests (e.g. via the browseable API) return a DRF response\n b) For AJAX requests, simply return a JSON rendered response.\n \"\"\"\n if page is not None:\n return self.get_paginated_response(data)\n elif request.is_ajax():\n return JsonResponse(data, safe=False)\n else:\n return Response(data)\n\n def get_serializer(self, *args, **kwargs):\n\n # Do we wish to include extra detail?\n try:\n kwargs['part_detail'] = str2bool(self.request.GET.get('part_detail', None))\n except AttributeError:\n pass\n\n try:\n kwargs['sub_part_detail'] = str2bool(self.request.GET.get('sub_part_detail', None))\n except AttributeError:\n pass\n\n try:\n # Include or exclude pricing information in the serialized data\n kwargs['include_pricing'] = self.include_pricing()\n except AttributeError:\n pass\n\n # Ensure the request context is passed through!\n kwargs['context'] = self.get_serializer_context()\n\n return self.serializer_class(*args, **kwargs)\n\n def get_queryset(self, *args, **kwargs):\n\n queryset = BomItem.objects.all()\n\n queryset = self.get_serializer_class().setup_eager_loading(queryset)\n\n return queryset\n\n def filter_queryset(self, queryset):\n\n queryset = super().filter_queryset(queryset)\n\n params = self.request.query_params\n\n # Filter by part?\n part = params.get('part', None)\n\n if part is not None:\n \"\"\"\n If we are filtering by \"part\", there are two cases to consider:\n\n a) Bom items which are defined for *this* part\n b) Inherited parts which are defined for a *parent* part\n\n So we need to construct two queries!\n \"\"\"\n\n # First, check that the part is actually valid!\n try:\n part = Part.objects.get(pk=part)\n\n queryset = queryset.filter(part.get_bom_item_filter())\n\n except (ValueError, Part.DoesNotExist):\n pass\n\n \"\"\"\n Filter by 'uses'?\n\n Here we pass a part ID and return BOM items for any assemblies which \"use\" (or \"require\") that part.\n\n There are multiple ways that an assembly can \"use\" a sub-part:\n\n A) Directly specifying the sub_part in a BomItem field\n B) Specifing a \"template\" part with inherited=True\n C) Allowing variant parts to be substituted\n D) Allowing direct substitute parts to be specified\n\n - BOM items which are \"inherited\" by parts which are variants of the master BomItem\n \"\"\"\n uses = params.get('uses', None)\n\n if uses is not None:\n\n try:\n # Extract the part we are interested in\n uses_part = Part.objects.get(pk=uses)\n\n # Construct the database query in multiple parts\n\n # A) Direct specification of sub_part\n q_A = Q(sub_part=uses_part)\n\n # B) BomItem is inherited and points to a \"parent\" of this part\n parents = uses_part.get_ancestors(include_self=False)\n\n q_B = Q(\n inherited=True,\n sub_part__in=parents\n )\n\n # C) Substitution of variant parts\n # TODO\n\n # D) Specification of individual substitutes\n # TODO\n\n q = q_A | q_B\n\n queryset = queryset.filter(q)\n\n except (ValueError, Part.DoesNotExist):\n pass\n\n if self.include_pricing():\n queryset = self.annotate_pricing(queryset)\n\n return queryset\n\n def include_pricing(self):\n \"\"\"\n Determine if pricing information should be included in the response\n \"\"\"\n pricing_default = InvenTreeSetting.get_setting('PART_SHOW_PRICE_IN_BOM')\n\n return str2bool(self.request.query_params.get('include_pricing', pricing_default))\n\n def annotate_pricing(self, queryset):\n \"\"\"\n Add part pricing information to the queryset\n \"\"\"\n\n # Annotate with purchase prices\n queryset = queryset.annotate(\n purchase_price_min=Min('sub_part__stock_items__purchase_price'),\n purchase_price_max=Max('sub_part__stock_items__purchase_price'),\n purchase_price_avg=Avg('sub_part__stock_items__purchase_price'),\n )\n\n # Get values for currencies\n currencies = queryset.annotate(\n purchase_price=F('sub_part__stock_items__purchase_price'),\n purchase_price_currency=F('sub_part__stock_items__purchase_price_currency'),\n ).values('pk', 'sub_part', 'purchase_price', 'purchase_price_currency')\n\n def convert_price(price, currency, decimal_places=4):\n \"\"\" Convert price field, returns Money field \"\"\"\n\n price_adjusted = None\n\n # Get default currency from settings\n default_currency = InvenTreeSetting.get_setting('INVENTREE_DEFAULT_CURRENCY')\n\n if price:\n if currency and default_currency:\n try:\n # Get adjusted price\n price_adjusted = convert_money(Money(price, currency), default_currency)\n except MissingRate:\n # No conversion rate set\n price_adjusted = Money(price, currency)\n else:\n # Currency exists\n if currency:\n price_adjusted = Money(price, currency)\n # Default currency exists\n if default_currency:\n price_adjusted = Money(price, default_currency)\n\n if price_adjusted and decimal_places:\n price_adjusted.decimal_places = decimal_places\n\n return price_adjusted\n\n # Convert prices to default currency (using backend conversion rates)\n for bom_item in queryset:\n # Find associated currency (select first found)\n purchase_price_currency = None\n for currency_item in currencies:\n if currency_item['pk'] == bom_item.pk and currency_item['sub_part'] == bom_item.sub_part.pk and currency_item['purchase_price']:\n purchase_price_currency = currency_item['purchase_price_currency']\n break\n # Convert prices\n bom_item.purchase_price_min = convert_price(bom_item.purchase_price_min, purchase_price_currency)\n bom_item.purchase_price_max = convert_price(bom_item.purchase_price_max, purchase_price_currency)\n bom_item.purchase_price_avg = convert_price(bom_item.purchase_price_avg, purchase_price_currency)\n\n return queryset\n\n filter_backends = [\n DjangoFilterBackend,\n filters.SearchFilter,\n filters.OrderingFilter,\n ]\n\n filter_fields = [\n ]\n\n\nclass BomDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\" API endpoint for detail view of a single BomItem object \"\"\"\n\n queryset = BomItem.objects.all()\n serializer_class = part_serializers.BomItemSerializer\n\n\nclass BomItemValidate(generics.UpdateAPIView):\n \"\"\" API endpoint for validating a BomItem \"\"\"\n\n # Very simple serializers\n class BomItemValidationSerializer(serializers.Serializer):\n\n valid = serializers.BooleanField(default=False)\n\n queryset = BomItem.objects.all()\n serializer_class = BomItemValidationSerializer\n\n def update(self, request, *args, **kwargs):\n \"\"\" Perform update request \"\"\"\n\n partial = kwargs.pop('partial', False)\n\n valid = request.data.get('valid', False)\n\n instance = self.get_object()\n\n serializer = self.get_serializer(instance, data=request.data, partial=partial)\n serializer.is_valid(raise_exception=True)\n\n if type(instance) == BomItem:\n instance.validate_hash(valid)\n\n return Response(serializer.data)\n\n\nclass BomItemSubstituteList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for accessing a list of BomItemSubstitute objects\n \"\"\"\n\n serializer_class = part_serializers.BomItemSubstituteSerializer\n queryset = BomItemSubstitute.objects.all()\n\n filter_backends = [\n DjangoFilterBackend,\n filters.SearchFilter,\n filters.OrderingFilter,\n ]\n\n filter_fields = [\n 'part',\n 'bom_item',\n ]\n\n\nclass BomItemSubstituteDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\"\n API endpoint for detail view of a single BomItemSubstitute object\n \"\"\"\n\n queryset = BomItemSubstitute.objects.all()\n serializer_class = part_serializers.BomItemSubstituteSerializer\n\n\npart_api_urls = [\n\n # Base URL for PartCategory API endpoints\n url(r'^category/', include([\n url(r'^parameters/', CategoryParameterList.as_view(), name='api-part-category-parameter-list'),\n\n url(r'^(?P<pk>\\d+)/?', CategoryDetail.as_view(), name='api-part-category-detail'),\n url(r'^$', CategoryList.as_view(), name='api-part-category-list'),\n ])),\n\n # Base URL for PartTestTemplate API endpoints\n url(r'^test-template/', include([\n url(r'^(?P<pk>\\d+)/', PartTestTemplateDetail.as_view(), name='api-part-test-template-detail'),\n url(r'^$', PartTestTemplateList.as_view(), name='api-part-test-template-list'),\n ])),\n\n # Base URL for PartAttachment API endpoints\n url(r'^attachment/', include([\n url(r'^(?P<pk>\\d+)/', PartAttachmentDetail.as_view(), name='api-part-attachment-detail'),\n url(r'^$', PartAttachmentList.as_view(), name='api-part-attachment-list'),\n ])),\n\n # Base URL for part sale pricing\n url(r'^sale-price/', include([\n url(r'^.*$', PartSalePriceList.as_view(), name='api-part-sale-price-list'),\n ])),\n\n # Base URL for part internal pricing\n url(r'^internal-price/', include([\n url(r'^.*$', PartInternalPriceList.as_view(), name='api-part-internal-price-list'),\n ])),\n\n # Base URL for PartRelated API endpoints\n url(r'^related/', include([\n url(r'^(?P<pk>\\d+)/', PartRelatedDetail.as_view(), name='api-part-related-detail'),\n url(r'^.*$', PartRelatedList.as_view(), name='api-part-related-list'),\n ])),\n\n # Base URL for PartParameter API endpoints\n url(r'^parameter/', include([\n url(r'^template/$', PartParameterTemplateList.as_view(), name='api-part-parameter-template-list'),\n\n url(r'^(?P<pk>\\d+)/', PartParameterDetail.as_view(), name='api-part-parameter-detail'),\n url(r'^.*$', PartParameterList.as_view(), name='api-part-parameter-list'),\n ])),\n\n url(r'^thumbs/', include([\n url(r'^$', PartThumbs.as_view(), name='api-part-thumbs'),\n url(r'^(?P<pk>\\d+)/?', PartThumbsUpdate.as_view(), name='api-part-thumbs-update'),\n ])),\n\n url(r'^(?P<pk>\\d+)/', include([\n\n # Endpoint for extra serial number information\n url(r'^serial-numbers/', PartSerialNumberDetail.as_view(), name='api-part-serial-number-detail'),\n\n # Part detail endpoint\n url(r'^.*$', PartDetail.as_view(), name='api-part-detail'),\n ])),\n\n url(r'^.*$', PartList.as_view(), name='api-part-list'),\n]\n\nbom_api_urls = [\n\n url(r'^substitute/', include([\n\n # Detail view\n url(r'^(?P<pk>\\d+)/', BomItemSubstituteDetail.as_view(), name='api-bom-substitute-detail'),\n\n # Catch all\n url(r'^.*$', BomItemSubstituteList.as_view(), name='api-bom-substitute-list'),\n ])),\n\n # BOM Item Detail\n url(r'^(?P<pk>\\d+)/', include([\n url(r'^validate/?', BomItemValidate.as_view(), name='api-bom-item-validate'),\n url(r'^.*$', BomDetail.as_view(), name='api-bom-item-detail'),\n ])),\n\n # Catch-all\n url(r'^.*$', BomList.as_view(), name='api-bom-list'),\n]\n", "path": "InvenTree/part/api.py" } ]
[ { "content": "\"\"\"\nProvides a JSON API for the Part app\n\"\"\"\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.conf.urls import url, include\nfrom django.http import JsonResponse\nfrom django.db.models import Q, F, Count, Min, Max, Avg\nfrom django.db import transaction\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom rest_framework import status\nfrom rest_framework.response import Response\nfrom rest_framework import filters, serializers\nfrom rest_framework import generics\nfrom rest_framework.exceptions import ValidationError\n\nfrom django_filters.rest_framework import DjangoFilterBackend\nfrom django_filters import rest_framework as rest_filters\n\nfrom djmoney.money import Money\nfrom djmoney.contrib.exchange.models import convert_money\nfrom djmoney.contrib.exchange.exceptions import MissingRate\n\nfrom decimal import Decimal, InvalidOperation\n\nfrom .models import Part, PartCategory, PartRelated\nfrom .models import BomItem, BomItemSubstitute\nfrom .models import PartParameter, PartParameterTemplate\nfrom .models import PartAttachment, PartTestTemplate\nfrom .models import PartSellPriceBreak, PartInternalPriceBreak\nfrom .models import PartCategoryParameterTemplate\n\nfrom company.models import Company, ManufacturerPart, SupplierPart\n\nfrom stock.models import StockItem, StockLocation\n\nfrom common.models import InvenTreeSetting\nfrom build.models import Build\n\nfrom . import serializers as part_serializers\n\nfrom InvenTree.helpers import str2bool, isNull, increment\nfrom InvenTree.api import AttachmentMixin\n\nfrom InvenTree.status_codes import BuildStatus\n\n\nclass CategoryList(generics.ListCreateAPIView):\n \"\"\" API endpoint for accessing a list of PartCategory objects.\n\n - GET: Return a list of PartCategory objects\n - POST: Create a new PartCategory object\n \"\"\"\n\n queryset = PartCategory.objects.all()\n serializer_class = part_serializers.CategorySerializer\n\n def get_serializer_context(self):\n\n ctx = super().get_serializer_context()\n\n try:\n ctx['starred_categories'] = [star.category for star in self.request.user.starred_categories.all()]\n except AttributeError:\n # Error is thrown if the view does not have an associated request\n ctx['starred_categories'] = []\n\n return ctx\n\n def filter_queryset(self, queryset):\n \"\"\"\n Custom filtering:\n - Allow filtering by \"null\" parent to retrieve top-level part categories\n \"\"\"\n\n queryset = super().filter_queryset(queryset)\n\n params = self.request.query_params\n\n cat_id = params.get('parent', None)\n\n cascade = str2bool(params.get('cascade', False))\n\n # Do not filter by category\n if cat_id is None:\n pass\n # Look for top-level categories\n elif isNull(cat_id):\n\n if not cascade:\n queryset = queryset.filter(parent=None)\n\n else:\n try:\n category = PartCategory.objects.get(pk=cat_id)\n\n if cascade:\n parents = category.get_descendants(include_self=True)\n parent_ids = [p.id for p in parents]\n\n queryset = queryset.filter(parent__in=parent_ids)\n else:\n queryset = queryset.filter(parent=category)\n\n except (ValueError, PartCategory.DoesNotExist):\n pass\n\n # Exclude PartCategory tree\n exclude_tree = params.get('exclude_tree', None)\n\n if exclude_tree is not None:\n try:\n cat = PartCategory.objects.get(pk=exclude_tree)\n\n queryset = queryset.exclude(\n pk__in=[c.pk for c in cat.get_descendants(include_self=True)]\n )\n\n except (ValueError, PartCategory.DoesNotExist):\n pass\n\n # Filter by \"starred\" status\n starred = params.get('starred', None)\n\n if starred is not None:\n starred = str2bool(starred)\n starred_categories = [star.category.pk for star in self.request.user.starred_categories.all()]\n\n if starred:\n queryset = queryset.filter(pk__in=starred_categories)\n else:\n queryset = queryset.exclude(pk__in=starred_categories)\n\n return queryset\n\n filter_backends = [\n DjangoFilterBackend,\n filters.SearchFilter,\n filters.OrderingFilter,\n ]\n\n filter_fields = [\n ]\n\n ordering_fields = [\n 'name',\n 'level',\n 'tree_id',\n 'lft',\n ]\n\n # Use hierarchical ordering by default\n ordering = [\n 'tree_id',\n 'lft',\n 'name'\n ]\n\n search_fields = [\n 'name',\n 'description',\n ]\n\n\nclass CategoryDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\"\n API endpoint for detail view of a single PartCategory object\n \"\"\"\n\n serializer_class = part_serializers.CategorySerializer\n queryset = PartCategory.objects.all()\n\n def get_serializer_context(self):\n\n ctx = super().get_serializer_context()\n\n try:\n ctx['starred_categories'] = [star.category for star in self.request.user.starred_categories.all()]\n except AttributeError:\n # Error is thrown if the view does not have an associated request\n ctx['starred_categories'] = []\n\n return ctx\n\n def update(self, request, *args, **kwargs):\n\n if 'starred' in request.data:\n starred = str2bool(request.data.get('starred', False))\n\n self.get_object().set_starred(request.user, starred)\n\n response = super().update(request, *args, **kwargs)\n\n return response\n\n\nclass CategoryParameterList(generics.ListAPIView):\n \"\"\" API endpoint for accessing a list of PartCategoryParameterTemplate objects.\n\n - GET: Return a list of PartCategoryParameterTemplate objects\n \"\"\"\n\n queryset = PartCategoryParameterTemplate.objects.all()\n serializer_class = part_serializers.CategoryParameterTemplateSerializer\n\n def get_queryset(self):\n \"\"\"\n Custom filtering:\n - Allow filtering by \"null\" parent to retrieve all categories parameter templates\n - Allow filtering by category\n - Allow traversing all parent categories\n \"\"\"\n\n queryset = super().get_queryset()\n\n params = self.request.query_params\n\n category = params.get('category', None)\n\n if category is not None:\n try:\n\n category = PartCategory.objects.get(pk=category)\n\n fetch_parent = str2bool(params.get('fetch_parent', True))\n\n if fetch_parent:\n parents = category.get_ancestors(include_self=True)\n queryset = queryset.filter(category__in=[cat.pk for cat in parents])\n else:\n queryset = queryset.filter(category=category)\n\n except (ValueError, PartCategory.DoesNotExist):\n pass\n\n return queryset\n\n\nclass PartSalePriceList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for list view of PartSalePriceBreak model\n \"\"\"\n\n queryset = PartSellPriceBreak.objects.all()\n serializer_class = part_serializers.PartSalePriceSerializer\n\n filter_backends = [\n DjangoFilterBackend\n ]\n\n filter_fields = [\n 'part',\n ]\n\n\nclass PartInternalPriceList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for list view of PartInternalPriceBreak model\n \"\"\"\n\n queryset = PartInternalPriceBreak.objects.all()\n serializer_class = part_serializers.PartInternalPriceSerializer\n permission_required = 'roles.sales_order.show'\n\n filter_backends = [\n DjangoFilterBackend\n ]\n\n filter_fields = [\n 'part',\n ]\n\n\nclass PartAttachmentList(generics.ListCreateAPIView, AttachmentMixin):\n \"\"\"\n API endpoint for listing (and creating) a PartAttachment (file upload).\n \"\"\"\n\n queryset = PartAttachment.objects.all()\n serializer_class = part_serializers.PartAttachmentSerializer\n\n filter_backends = [\n DjangoFilterBackend,\n ]\n\n filter_fields = [\n 'part',\n ]\n\n\nclass PartAttachmentDetail(generics.RetrieveUpdateDestroyAPIView, AttachmentMixin):\n \"\"\"\n Detail endpoint for PartAttachment model\n \"\"\"\n\n queryset = PartAttachment.objects.all()\n serializer_class = part_serializers.PartAttachmentSerializer\n\n\nclass PartTestTemplateDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\"\n Detail endpoint for PartTestTemplate model\n \"\"\"\n\n queryset = PartTestTemplate.objects.all()\n serializer_class = part_serializers.PartTestTemplateSerializer\n\n\nclass PartTestTemplateList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for listing (and creating) a PartTestTemplate.\n \"\"\"\n\n queryset = PartTestTemplate.objects.all()\n serializer_class = part_serializers.PartTestTemplateSerializer\n\n def filter_queryset(self, queryset):\n \"\"\"\n Filter the test list queryset.\n\n If filtering by 'part', we include results for any parts \"above\" the specified part.\n \"\"\"\n\n queryset = super().filter_queryset(queryset)\n\n params = self.request.query_params\n\n part = params.get('part', None)\n\n # Filter by part\n if part:\n try:\n part = Part.objects.get(pk=part)\n queryset = queryset.filter(part__in=part.get_ancestors(include_self=True))\n except (ValueError, Part.DoesNotExist):\n pass\n\n # Filter by 'required' status\n required = params.get('required', None)\n\n if required is not None:\n queryset = queryset.filter(required=required)\n\n return queryset\n\n filter_backends = [\n DjangoFilterBackend,\n filters.OrderingFilter,\n filters.SearchFilter,\n ]\n\n\nclass PartThumbs(generics.ListAPIView):\n \"\"\"\n API endpoint for retrieving information on available Part thumbnails\n \"\"\"\n\n queryset = Part.objects.all()\n serializer_class = part_serializers.PartThumbSerializer\n\n def get_queryset(self):\n\n queryset = super().get_queryset()\n\n # Get all Parts which have an associated image\n queryset = queryset.exclude(image='')\n\n return queryset\n\n def list(self, request, *args, **kwargs):\n \"\"\"\n Serialize the available Part images.\n - Images may be used for multiple parts!\n \"\"\"\n\n queryset = self.filter_queryset(self.get_queryset())\n\n # Return the most popular parts first\n data = queryset.values(\n 'image',\n ).annotate(count=Count('image')).order_by('-count')\n\n return Response(data)\n\n filter_backends = [\n filters.SearchFilter,\n ]\n\n search_fields = [\n 'name',\n 'description',\n 'IPN',\n 'revision',\n 'keywords',\n 'category__name',\n ]\n\n\nclass PartThumbsUpdate(generics.RetrieveUpdateAPIView):\n \"\"\" API endpoint for updating Part thumbnails\"\"\"\n\n queryset = Part.objects.all()\n serializer_class = part_serializers.PartThumbSerializerUpdate\n\n filter_backends = [\n DjangoFilterBackend\n ]\n\n\nclass PartSerialNumberDetail(generics.RetrieveAPIView):\n \"\"\"\n API endpoint for returning extra serial number information about a particular part\n \"\"\"\n\n queryset = Part.objects.all()\n\n def retrieve(self, request, *args, **kwargs):\n\n part = self.get_object()\n\n # Calculate the \"latest\" serial number\n latest = part.getLatestSerialNumber()\n\n data = {\n 'latest': latest,\n }\n\n if latest is not None:\n next = increment(latest)\n\n if next != increment:\n data['next'] = next\n\n return Response(data)\n\n\nclass PartDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\" API endpoint for detail view of a single Part object \"\"\"\n\n queryset = Part.objects.all()\n serializer_class = part_serializers.PartSerializer\n\n starred_parts = None\n\n def get_queryset(self, *args, **kwargs):\n queryset = super().get_queryset(*args, **kwargs)\n\n queryset = part_serializers.PartSerializer.annotate_queryset(queryset)\n\n return queryset\n\n def get_serializer(self, *args, **kwargs):\n\n # By default, include 'category_detail' information in the detail view\n try:\n kwargs['category_detail'] = str2bool(self.request.query_params.get('category_detail', True))\n except AttributeError:\n pass\n\n # Ensure the request context is passed through\n kwargs['context'] = self.get_serializer_context()\n\n # Pass a list of \"starred\" parts of the current user to the serializer\n # We do this to reduce the number of database queries required!\n if self.starred_parts is None and self.request is not None:\n self.starred_parts = [star.part for star in self.request.user.starred_parts.all()]\n\n kwargs['starred_parts'] = self.starred_parts\n\n return self.serializer_class(*args, **kwargs)\n\n def destroy(self, request, *args, **kwargs):\n # Retrieve part\n part = Part.objects.get(pk=int(kwargs['pk']))\n # Check if inactive\n if not part.active:\n # Delete\n return super(PartDetail, self).destroy(request, *args, **kwargs)\n else:\n # Return 405 error\n message = f'Part \\'{part.name}\\' (pk = {part.pk}) is active: cannot delete'\n return Response(status=status.HTTP_405_METHOD_NOT_ALLOWED, data=message)\n\n def update(self, request, *args, **kwargs):\n \"\"\"\n Custom update functionality for Part instance.\n\n - If the 'starred' field is provided, update the 'starred' status against current user\n \"\"\"\n\n if 'starred' in request.data:\n starred = str2bool(request.data.get('starred', False))\n\n self.get_object().set_starred(request.user, starred)\n\n response = super().update(request, *args, **kwargs)\n\n return response\n\n\nclass PartFilter(rest_filters.FilterSet):\n \"\"\"\n Custom filters for the PartList endpoint.\n Uses the django_filters extension framework\n \"\"\"\n\n # Filter by parts which have (or not) an IPN value\n has_ipn = rest_filters.BooleanFilter(label='Has IPN', method='filter_has_ipn')\n\n def filter_has_ipn(self, queryset, name, value):\n\n value = str2bool(value)\n\n if value:\n queryset = queryset.exclude(IPN='')\n else:\n queryset = queryset.filter(IPN='')\n\n return queryset\n\n # Regex filter for name\n name_regex = rest_filters.CharFilter(label='Filter by name (regex)', field_name='name', lookup_expr='iregex')\n\n # Exact match for IPN\n IPN = rest_filters.CharFilter(\n label='Filter by exact IPN (internal part number)',\n field_name='IPN',\n lookup_expr=\"iexact\"\n )\n\n # Regex match for IPN\n IPN_regex = rest_filters.CharFilter(label='Filter by regex on IPN (internal part number)', field_name='IPN', lookup_expr='iregex')\n\n # low_stock filter\n low_stock = rest_filters.BooleanFilter(label='Low stock', method='filter_low_stock')\n\n def filter_low_stock(self, queryset, name, value):\n \"\"\"\n Filter by \"low stock\" status\n \"\"\"\n\n value = str2bool(value)\n\n if value:\n # Ignore any parts which do not have a specified 'minimum_stock' level\n queryset = queryset.exclude(minimum_stock=0)\n # Filter items which have an 'in_stock' level lower than 'minimum_stock'\n queryset = queryset.filter(Q(in_stock__lt=F('minimum_stock')))\n else:\n # Filter items which have an 'in_stock' level higher than 'minimum_stock'\n queryset = queryset.filter(Q(in_stock__gte=F('minimum_stock')))\n\n return queryset\n\n # has_stock filter\n has_stock = rest_filters.BooleanFilter(label='Has stock', method='filter_has_stock')\n\n def filter_has_stock(self, queryset, name, value):\n\n value = str2bool(value)\n\n if value:\n queryset = queryset.filter(Q(in_stock__gt=0))\n else:\n queryset = queryset.filter(Q(in_stock__lte=0))\n\n return queryset\n\n is_template = rest_filters.BooleanFilter()\n\n assembly = rest_filters.BooleanFilter()\n\n component = rest_filters.BooleanFilter()\n\n trackable = rest_filters.BooleanFilter()\n\n purchaseable = rest_filters.BooleanFilter()\n\n salable = rest_filters.BooleanFilter()\n\n active = rest_filters.BooleanFilter()\n\n\nclass PartList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for accessing a list of Part objects\n\n - GET: Return list of objects\n - POST: Create a new Part object\n\n The Part object list can be filtered by:\n - category: Filter by PartCategory reference\n - cascade: If true, include parts from sub-categories\n - starred: Is the part \"starred\" by the current user?\n - is_template: Is the part a template part?\n - variant_of: Filter by variant_of Part reference\n - assembly: Filter by assembly field\n - component: Filter by component field\n - trackable: Filter by trackable field\n - purchaseable: Filter by purcahseable field\n - salable: Filter by salable field\n - active: Filter by active field\n - ancestor: Filter parts by 'ancestor' (template / variant tree)\n \"\"\"\n\n serializer_class = part_serializers.PartSerializer\n queryset = Part.objects.all()\n filterset_class = PartFilter\n\n starred_parts = None\n\n def get_serializer(self, *args, **kwargs):\n\n # Ensure the request context is passed through\n kwargs['context'] = self.get_serializer_context()\n\n # Pass a list of \"starred\" parts fo the current user to the serializer\n # We do this to reduce the number of database queries required!\n if self.starred_parts is None and self.request is not None:\n self.starred_parts = [star.part for star in self.request.user.starred_parts.all()]\n\n kwargs['starred_parts'] = self.starred_parts\n\n return self.serializer_class(*args, **kwargs)\n\n def list(self, request, *args, **kwargs):\n \"\"\"\n Overide the 'list' method, as the PartCategory objects are\n very expensive to serialize!\n\n So we will serialize them first, and keep them in memory,\n so that they do not have to be serialized multiple times...\n \"\"\"\n\n queryset = self.filter_queryset(self.get_queryset())\n\n page = self.paginate_queryset(queryset)\n\n if page is not None:\n serializer = self.get_serializer(page, many=True)\n else:\n serializer = self.get_serializer(queryset, many=True)\n\n data = serializer.data\n\n # Do we wish to include PartCategory detail?\n if str2bool(request.query_params.get('category_detail', False)):\n\n # Work out which part categories we need to query\n category_ids = set()\n\n for part in data:\n cat_id = part['category']\n\n if cat_id is not None:\n category_ids.add(cat_id)\n\n # Fetch only the required PartCategory objects from the database\n categories = PartCategory.objects.filter(pk__in=category_ids).prefetch_related(\n 'parts',\n 'parent',\n 'children',\n )\n\n category_map = {}\n\n # Serialize each PartCategory object\n for category in categories:\n category_map[category.pk] = part_serializers.CategorySerializer(category).data\n\n for part in data:\n cat_id = part['category']\n\n if cat_id is not None and cat_id in category_map.keys():\n detail = category_map[cat_id]\n else:\n detail = None\n\n part['category_detail'] = detail\n\n \"\"\"\n Determine the response type based on the request.\n a) For HTTP requests (e.g. via the browseable API) return a DRF response\n b) For AJAX requests, simply return a JSON rendered response.\n \"\"\"\n if page is not None:\n return self.get_paginated_response(data)\n elif request.is_ajax():\n return JsonResponse(data, safe=False)\n else:\n return Response(data)\n\n @transaction.atomic\n def create(self, request, *args, **kwargs):\n \"\"\"\n We wish to save the user who created this part!\n\n Note: Implementation copied from DRF class CreateModelMixin\n \"\"\"\n\n # TODO: Unit tests for this function!\n\n serializer = self.get_serializer(data=request.data)\n serializer.is_valid(raise_exception=True)\n\n part = serializer.save()\n part.creation_user = self.request.user\n\n # Optionally copy templates from category or parent category\n copy_templates = {\n 'main': str2bool(request.data.get('copy_category_templates', False)),\n 'parent': str2bool(request.data.get('copy_parent_templates', False))\n }\n\n part.save(**{'add_category_templates': copy_templates})\n\n # Optionally copy data from another part (e.g. when duplicating)\n copy_from = request.data.get('copy_from', None)\n\n if copy_from is not None:\n\n try:\n original = Part.objects.get(pk=copy_from)\n\n copy_bom = str2bool(request.data.get('copy_bom', False))\n copy_parameters = str2bool(request.data.get('copy_parameters', False))\n copy_image = str2bool(request.data.get('copy_image', True))\n\n # Copy image?\n if copy_image:\n part.image = original.image\n part.save()\n\n # Copy BOM?\n if copy_bom:\n part.copy_bom_from(original)\n\n # Copy parameter data?\n if copy_parameters:\n part.copy_parameters_from(original)\n\n except (ValueError, Part.DoesNotExist):\n pass\n\n # Optionally create initial stock item\n initial_stock = str2bool(request.data.get('initial_stock', False))\n\n if initial_stock:\n try:\n\n initial_stock_quantity = Decimal(request.data.get('initial_stock_quantity', ''))\n\n if initial_stock_quantity <= 0:\n raise ValidationError({\n 'initial_stock_quantity': [_('Must be greater than zero')],\n })\n except (ValueError, InvalidOperation): # Invalid quantity provided\n raise ValidationError({\n 'initial_stock_quantity': [_('Must be a valid quantity')],\n })\n\n initial_stock_location = request.data.get('initial_stock_location', None)\n\n try:\n initial_stock_location = StockLocation.objects.get(pk=initial_stock_location)\n except (ValueError, StockLocation.DoesNotExist):\n initial_stock_location = None\n\n if initial_stock_location is None:\n if part.default_location is not None:\n initial_stock_location = part.default_location\n else:\n raise ValidationError({\n 'initial_stock_location': [_('Specify location for initial part stock')],\n })\n\n stock_item = StockItem(\n part=part,\n quantity=initial_stock_quantity,\n location=initial_stock_location,\n )\n\n stock_item.save(user=request.user)\n\n # Optionally add manufacturer / supplier data to the part\n if part.purchaseable and str2bool(request.data.get('add_supplier_info', False)):\n\n try:\n manufacturer = Company.objects.get(pk=request.data.get('manufacturer', None))\n except:\n manufacturer = None\n\n try:\n supplier = Company.objects.get(pk=request.data.get('supplier', None))\n except:\n supplier = None\n\n mpn = str(request.data.get('MPN', '')).strip()\n sku = str(request.data.get('SKU', '')).strip()\n\n # Construct a manufacturer part\n if manufacturer or mpn:\n if not manufacturer:\n raise ValidationError({\n 'manufacturer': [_(\"This field is required\")]\n })\n if not mpn:\n raise ValidationError({\n 'MPN': [_(\"This field is required\")]\n })\n\n manufacturer_part = ManufacturerPart.objects.create(\n part=part,\n manufacturer=manufacturer,\n MPN=mpn\n )\n else:\n # No manufacturer part data specified\n manufacturer_part = None\n\n if supplier or sku:\n if not supplier:\n raise ValidationError({\n 'supplier': [_(\"This field is required\")]\n })\n if not sku:\n raise ValidationError({\n 'SKU': [_(\"This field is required\")]\n })\n\n SupplierPart.objects.create(\n part=part,\n supplier=supplier,\n SKU=sku,\n manufacturer_part=manufacturer_part,\n )\n\n headers = self.get_success_headers(serializer.data)\n\n return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers)\n\n def get_queryset(self, *args, **kwargs):\n\n queryset = super().get_queryset(*args, **kwargs)\n queryset = part_serializers.PartSerializer.annotate_queryset(queryset)\n\n return queryset\n\n def filter_queryset(self, queryset):\n \"\"\"\n Perform custom filtering of the queryset.\n We overide the DRF filter_fields here because\n \"\"\"\n\n params = self.request.query_params\n\n queryset = super().filter_queryset(queryset)\n\n # Exclude specific part ID values?\n exclude_id = []\n\n for key in ['exclude_id', 'exclude_id[]']:\n if key in params:\n exclude_id += params.getlist(key, [])\n\n if exclude_id:\n\n id_values = []\n\n for val in exclude_id:\n try:\n # pk values must be integer castable\n val = int(val)\n id_values.append(val)\n except ValueError:\n pass\n\n queryset = queryset.exclude(pk__in=id_values)\n\n # Exclude part variant tree?\n exclude_tree = params.get('exclude_tree', None)\n\n if exclude_tree is not None:\n try:\n top_level_part = Part.objects.get(pk=exclude_tree)\n\n queryset = queryset.exclude(\n pk__in=[prt.pk for prt in top_level_part.get_descendants(include_self=True)]\n )\n\n except (ValueError, Part.DoesNotExist):\n pass\n\n # Filter by 'ancestor'?\n ancestor = params.get('ancestor', None)\n\n if ancestor is not None:\n # If an 'ancestor' part is provided, filter to match only children\n try:\n ancestor = Part.objects.get(pk=ancestor)\n descendants = ancestor.get_descendants(include_self=False)\n queryset = queryset.filter(pk__in=[d.pk for d in descendants])\n except (ValueError, Part.DoesNotExist):\n pass\n\n # Filter by whether the BOM has been validated (or not)\n bom_valid = params.get('bom_valid', None)\n\n # TODO: Querying bom_valid status may be quite expensive\n # TODO: (It needs to be profiled!)\n # TODO: It might be worth caching the bom_valid status to a database column\n\n if bom_valid is not None:\n\n bom_valid = str2bool(bom_valid)\n\n # Limit queryset to active assemblies\n queryset = queryset.filter(active=True, assembly=True)\n\n pks = []\n\n for part in queryset:\n if part.is_bom_valid() == bom_valid:\n pks.append(part.pk)\n\n queryset = queryset.filter(pk__in=pks)\n\n # Filter by 'related' parts?\n related = params.get('related', None)\n exclude_related = params.get('exclude_related', None)\n\n if related is not None or exclude_related is not None:\n try:\n pk = related if related is not None else exclude_related\n pk = int(pk)\n\n related_part = Part.objects.get(pk=pk)\n\n part_ids = set()\n\n # Return any relationship which points to the part in question\n relation_filter = Q(part_1=related_part) | Q(part_2=related_part)\n\n for relation in PartRelated.objects.filter(relation_filter):\n\n if relation.part_1.pk != pk:\n part_ids.add(relation.part_1.pk)\n\n if relation.part_2.pk != pk:\n part_ids.add(relation.part_2.pk)\n\n if related is not None:\n # Only return related results\n queryset = queryset.filter(pk__in=[pk for pk in part_ids])\n elif exclude_related is not None:\n # Exclude related results\n queryset = queryset.exclude(pk__in=[pk for pk in part_ids])\n\n except (ValueError, Part.DoesNotExist):\n pass\n\n # Filter by 'starred' parts?\n starred = params.get('starred', None)\n\n if starred is not None:\n starred = str2bool(starred)\n starred_parts = [star.part.pk for star in self.request.user.starred_parts.all()]\n\n if starred:\n queryset = queryset.filter(pk__in=starred_parts)\n else:\n queryset = queryset.exclude(pk__in=starred_parts)\n\n # Cascade? (Default = True)\n cascade = str2bool(params.get('cascade', True))\n\n # Does the user wish to filter by category?\n cat_id = params.get('category', None)\n\n if cat_id is None:\n # No category filtering if category is not specified\n pass\n\n else:\n # Category has been specified!\n if isNull(cat_id):\n # A 'null' category is the top-level category\n if cascade is False:\n # Do not cascade, only list parts in the top-level category\n queryset = queryset.filter(category=None)\n\n else:\n try:\n category = PartCategory.objects.get(pk=cat_id)\n\n # If '?cascade=true' then include parts which exist in sub-categories\n if cascade:\n queryset = queryset.filter(category__in=category.getUniqueChildren())\n # Just return parts directly in the requested category\n else:\n queryset = queryset.filter(category=cat_id)\n except (ValueError, PartCategory.DoesNotExist):\n pass\n\n # Filer by 'depleted_stock' status -> has no stock and stock items\n depleted_stock = params.get('depleted_stock', None)\n\n if depleted_stock is not None:\n depleted_stock = str2bool(depleted_stock)\n\n if depleted_stock:\n queryset = queryset.filter(Q(in_stock=0) & ~Q(stock_item_count=0))\n\n # Filter by \"parts which need stock to complete build\"\n stock_to_build = params.get('stock_to_build', None)\n\n # TODO: This is super expensive, database query wise...\n # TODO: Need to figure out a cheaper way of making this filter query\n\n if stock_to_build is not None:\n # Get active builds\n builds = Build.objects.filter(status__in=BuildStatus.ACTIVE_CODES)\n # Store parts with builds needing stock\n parts_needed_to_complete_builds = []\n # Filter required parts\n for build in builds:\n parts_needed_to_complete_builds += [part.pk for part in build.required_parts_to_complete_build]\n\n queryset = queryset.filter(pk__in=parts_needed_to_complete_builds)\n\n # Optionally limit the maximum number of returned results\n # e.g. for displaying \"recent part\" list\n max_results = params.get('max_results', None)\n\n if max_results is not None:\n try:\n max_results = int(max_results)\n\n if max_results > 0:\n queryset = queryset[:max_results]\n\n except (ValueError):\n pass\n\n return queryset\n\n filter_backends = [\n DjangoFilterBackend,\n filters.SearchFilter,\n filters.OrderingFilter,\n ]\n\n filter_fields = [\n 'variant_of',\n ]\n\n ordering_fields = [\n 'name',\n 'creation_date',\n 'IPN',\n 'in_stock',\n 'category',\n ]\n\n # Default ordering\n ordering = 'name'\n\n search_fields = [\n 'name',\n 'description',\n 'IPN',\n 'revision',\n 'keywords',\n 'category__name',\n 'manufacturer_parts__MPN',\n ]\n\n\nclass PartRelatedList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for accessing a list of PartRelated objects\n \"\"\"\n\n queryset = PartRelated.objects.all()\n serializer_class = part_serializers.PartRelationSerializer\n\n def filter_queryset(self, queryset):\n\n queryset = super().filter_queryset(queryset)\n\n params = self.request.query_params\n\n # Add a filter for \"part\" - we can filter either part_1 or part_2\n part = params.get('part', None)\n\n if part is not None:\n try:\n part = Part.objects.get(pk=part)\n\n queryset = queryset.filter(Q(part_1=part) | Q(part_2=part))\n\n except (ValueError, Part.DoesNotExist):\n pass\n\n return queryset\n\n\nclass PartRelatedDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\"\n API endpoint for accessing detail view of a PartRelated object\n \"\"\"\n\n queryset = PartRelated.objects.all()\n serializer_class = part_serializers.PartRelationSerializer\n\n\nclass PartParameterTemplateList(generics.ListCreateAPIView):\n \"\"\" API endpoint for accessing a list of PartParameterTemplate objects.\n\n - GET: Return list of PartParameterTemplate objects\n - POST: Create a new PartParameterTemplate object\n \"\"\"\n\n queryset = PartParameterTemplate.objects.all()\n serializer_class = part_serializers.PartParameterTemplateSerializer\n\n filter_backends = [\n DjangoFilterBackend,\n filters.OrderingFilter,\n filters.SearchFilter,\n ]\n\n filter_fields = [\n 'name',\n ]\n\n search_fields = [\n 'name',\n ]\n\n\nclass PartParameterList(generics.ListCreateAPIView):\n \"\"\" API endpoint for accessing a list of PartParameter objects\n\n - GET: Return list of PartParameter objects\n - POST: Create a new PartParameter object\n \"\"\"\n\n queryset = PartParameter.objects.all()\n serializer_class = part_serializers.PartParameterSerializer\n\n filter_backends = [\n DjangoFilterBackend\n ]\n\n filter_fields = [\n 'part',\n 'template',\n ]\n\n\nclass PartParameterDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\"\n API endpoint for detail view of a single PartParameter object\n \"\"\"\n\n queryset = PartParameter.objects.all()\n serializer_class = part_serializers.PartParameterSerializer\n\n\nclass BomFilter(rest_filters.FilterSet):\n \"\"\"\n Custom filters for the BOM list\n \"\"\"\n\n # Boolean filters for BOM item\n optional = rest_filters.BooleanFilter(label='BOM line is optional')\n inherited = rest_filters.BooleanFilter(label='BOM line is inherited')\n allow_variants = rest_filters.BooleanFilter(label='Variants are allowed')\n\n # Filters for linked 'part'\n part_active = rest_filters.BooleanFilter(label='Master part is active', field_name='part__active')\n part_trackable = rest_filters.BooleanFilter(label='Master part is trackable', field_name='part__trackable')\n\n # Filters for linked 'sub_part'\n sub_part_trackable = rest_filters.BooleanFilter(label='Sub part is trackable', field_name='sub_part__trackable')\n sub_part_assembly = rest_filters.BooleanFilter(label='Sub part is an assembly', field_name='sub_part__assembly')\n\n validated = rest_filters.BooleanFilter(label='BOM line has been validated', method='filter_validated')\n\n def filter_validated(self, queryset, name, value):\n\n # Work out which lines have actually been validated\n pks = []\n\n value = str2bool(value)\n\n # Shortcut for quicker filtering - BomItem with empty 'checksum' values are not validated\n if value:\n queryset = queryset.exclude(checksum=None).exclude(checksum='')\n\n for bom_item in queryset.all():\n if bom_item.is_line_valid:\n pks.append(bom_item.pk)\n\n if value:\n queryset = queryset.filter(pk__in=pks)\n else:\n queryset = queryset.exclude(pk__in=pks)\n\n return queryset\n\n\nclass BomList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for accessing a list of BomItem objects.\n\n - GET: Return list of BomItem objects\n - POST: Create a new BomItem object\n \"\"\"\n\n serializer_class = part_serializers.BomItemSerializer\n queryset = BomItem.objects.all()\n filterset_class = BomFilter\n\n def list(self, request, *args, **kwargs):\n\n queryset = self.filter_queryset(self.get_queryset())\n\n page = self.paginate_queryset(queryset)\n\n if page is not None:\n serializer = self.get_serializer(page, many=True)\n else:\n serializer = self.get_serializer(queryset, many=True)\n\n data = serializer.data\n\n \"\"\"\n Determine the response type based on the request.\n a) For HTTP requests (e.g. via the browseable API) return a DRF response\n b) For AJAX requests, simply return a JSON rendered response.\n \"\"\"\n if page is not None:\n return self.get_paginated_response(data)\n elif request.is_ajax():\n return JsonResponse(data, safe=False)\n else:\n return Response(data)\n\n def get_serializer(self, *args, **kwargs):\n\n # Do we wish to include extra detail?\n try:\n kwargs['part_detail'] = str2bool(self.request.GET.get('part_detail', None))\n except AttributeError:\n pass\n\n try:\n kwargs['sub_part_detail'] = str2bool(self.request.GET.get('sub_part_detail', None))\n except AttributeError:\n pass\n\n try:\n # Include or exclude pricing information in the serialized data\n kwargs['include_pricing'] = self.include_pricing()\n except AttributeError:\n pass\n\n # Ensure the request context is passed through!\n kwargs['context'] = self.get_serializer_context()\n\n return self.serializer_class(*args, **kwargs)\n\n def get_queryset(self, *args, **kwargs):\n\n queryset = BomItem.objects.all()\n\n queryset = self.get_serializer_class().setup_eager_loading(queryset)\n\n return queryset\n\n def filter_queryset(self, queryset):\n\n queryset = super().filter_queryset(queryset)\n\n params = self.request.query_params\n\n # Filter by part?\n part = params.get('part', None)\n\n if part is not None:\n \"\"\"\n If we are filtering by \"part\", there are two cases to consider:\n\n a) Bom items which are defined for *this* part\n b) Inherited parts which are defined for a *parent* part\n\n So we need to construct two queries!\n \"\"\"\n\n # First, check that the part is actually valid!\n try:\n part = Part.objects.get(pk=part)\n\n queryset = queryset.filter(part.get_bom_item_filter())\n\n except (ValueError, Part.DoesNotExist):\n pass\n\n \"\"\"\n Filter by 'uses'?\n\n Here we pass a part ID and return BOM items for any assemblies which \"use\" (or \"require\") that part.\n\n There are multiple ways that an assembly can \"use\" a sub-part:\n\n A) Directly specifying the sub_part in a BomItem field\n B) Specifing a \"template\" part with inherited=True\n C) Allowing variant parts to be substituted\n D) Allowing direct substitute parts to be specified\n\n - BOM items which are \"inherited\" by parts which are variants of the master BomItem\n \"\"\"\n uses = params.get('uses', None)\n\n if uses is not None:\n\n try:\n # Extract the part we are interested in\n uses_part = Part.objects.get(pk=uses)\n\n # Construct the database query in multiple parts\n\n # A) Direct specification of sub_part\n q_A = Q(sub_part=uses_part)\n\n # B) BomItem is inherited and points to a \"parent\" of this part\n parents = uses_part.get_ancestors(include_self=False)\n\n q_B = Q(\n inherited=True,\n sub_part__in=parents\n )\n\n # C) Substitution of variant parts\n # TODO\n\n # D) Specification of individual substitutes\n # TODO\n\n q = q_A | q_B\n\n queryset = queryset.filter(q)\n\n except (ValueError, Part.DoesNotExist):\n pass\n\n if self.include_pricing():\n queryset = self.annotate_pricing(queryset)\n\n return queryset\n\n def include_pricing(self):\n \"\"\"\n Determine if pricing information should be included in the response\n \"\"\"\n pricing_default = InvenTreeSetting.get_setting('PART_SHOW_PRICE_IN_BOM')\n\n return str2bool(self.request.query_params.get('include_pricing', pricing_default))\n\n def annotate_pricing(self, queryset):\n \"\"\"\n Add part pricing information to the queryset\n \"\"\"\n\n # Annotate with purchase prices\n queryset = queryset.annotate(\n purchase_price_min=Min('sub_part__stock_items__purchase_price'),\n purchase_price_max=Max('sub_part__stock_items__purchase_price'),\n purchase_price_avg=Avg('sub_part__stock_items__purchase_price'),\n )\n\n # Get values for currencies\n currencies = queryset.annotate(\n purchase_price=F('sub_part__stock_items__purchase_price'),\n purchase_price_currency=F('sub_part__stock_items__purchase_price_currency'),\n ).values('pk', 'sub_part', 'purchase_price', 'purchase_price_currency')\n\n def convert_price(price, currency, decimal_places=4):\n \"\"\" Convert price field, returns Money field \"\"\"\n\n price_adjusted = None\n\n # Get default currency from settings\n default_currency = InvenTreeSetting.get_setting('INVENTREE_DEFAULT_CURRENCY')\n\n if price:\n if currency and default_currency:\n try:\n # Get adjusted price\n price_adjusted = convert_money(Money(price, currency), default_currency)\n except MissingRate:\n # No conversion rate set\n price_adjusted = Money(price, currency)\n else:\n # Currency exists\n if currency:\n price_adjusted = Money(price, currency)\n # Default currency exists\n if default_currency:\n price_adjusted = Money(price, default_currency)\n\n if price_adjusted and decimal_places:\n price_adjusted.decimal_places = decimal_places\n\n return price_adjusted\n\n # Convert prices to default currency (using backend conversion rates)\n for bom_item in queryset:\n # Find associated currency (select first found)\n purchase_price_currency = None\n for currency_item in currencies:\n if currency_item['pk'] == bom_item.pk and currency_item['sub_part'] == bom_item.sub_part.pk and currency_item['purchase_price']:\n purchase_price_currency = currency_item['purchase_price_currency']\n break\n # Convert prices\n bom_item.purchase_price_min = convert_price(bom_item.purchase_price_min, purchase_price_currency)\n bom_item.purchase_price_max = convert_price(bom_item.purchase_price_max, purchase_price_currency)\n bom_item.purchase_price_avg = convert_price(bom_item.purchase_price_avg, purchase_price_currency)\n\n return queryset\n\n filter_backends = [\n DjangoFilterBackend,\n filters.SearchFilter,\n filters.OrderingFilter,\n ]\n\n filter_fields = [\n ]\n\n\nclass BomDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\" API endpoint for detail view of a single BomItem object \"\"\"\n\n queryset = BomItem.objects.all()\n serializer_class = part_serializers.BomItemSerializer\n\n\nclass BomItemValidate(generics.UpdateAPIView):\n \"\"\" API endpoint for validating a BomItem \"\"\"\n\n # Very simple serializers\n class BomItemValidationSerializer(serializers.Serializer):\n\n valid = serializers.BooleanField(default=False)\n\n queryset = BomItem.objects.all()\n serializer_class = BomItemValidationSerializer\n\n def update(self, request, *args, **kwargs):\n \"\"\" Perform update request \"\"\"\n\n partial = kwargs.pop('partial', False)\n\n valid = request.data.get('valid', False)\n\n instance = self.get_object()\n\n serializer = self.get_serializer(instance, data=request.data, partial=partial)\n serializer.is_valid(raise_exception=True)\n\n if type(instance) == BomItem:\n instance.validate_hash(valid)\n\n return Response(serializer.data)\n\n\nclass BomItemSubstituteList(generics.ListCreateAPIView):\n \"\"\"\n API endpoint for accessing a list of BomItemSubstitute objects\n \"\"\"\n\n serializer_class = part_serializers.BomItemSubstituteSerializer\n queryset = BomItemSubstitute.objects.all()\n\n filter_backends = [\n DjangoFilterBackend,\n filters.SearchFilter,\n filters.OrderingFilter,\n ]\n\n filter_fields = [\n 'part',\n 'bom_item',\n ]\n\n\nclass BomItemSubstituteDetail(generics.RetrieveUpdateDestroyAPIView):\n \"\"\"\n API endpoint for detail view of a single BomItemSubstitute object\n \"\"\"\n\n queryset = BomItemSubstitute.objects.all()\n serializer_class = part_serializers.BomItemSubstituteSerializer\n\n\npart_api_urls = [\n\n # Base URL for PartCategory API endpoints\n url(r'^category/', include([\n url(r'^parameters/', CategoryParameterList.as_view(), name='api-part-category-parameter-list'),\n\n url(r'^(?P<pk>\\d+)/?', CategoryDetail.as_view(), name='api-part-category-detail'),\n url(r'^$', CategoryList.as_view(), name='api-part-category-list'),\n ])),\n\n # Base URL for PartTestTemplate API endpoints\n url(r'^test-template/', include([\n url(r'^(?P<pk>\\d+)/', PartTestTemplateDetail.as_view(), name='api-part-test-template-detail'),\n url(r'^$', PartTestTemplateList.as_view(), name='api-part-test-template-list'),\n ])),\n\n # Base URL for PartAttachment API endpoints\n url(r'^attachment/', include([\n url(r'^(?P<pk>\\d+)/', PartAttachmentDetail.as_view(), name='api-part-attachment-detail'),\n url(r'^$', PartAttachmentList.as_view(), name='api-part-attachment-list'),\n ])),\n\n # Base URL for part sale pricing\n url(r'^sale-price/', include([\n url(r'^.*$', PartSalePriceList.as_view(), name='api-part-sale-price-list'),\n ])),\n\n # Base URL for part internal pricing\n url(r'^internal-price/', include([\n url(r'^.*$', PartInternalPriceList.as_view(), name='api-part-internal-price-list'),\n ])),\n\n # Base URL for PartRelated API endpoints\n url(r'^related/', include([\n url(r'^(?P<pk>\\d+)/', PartRelatedDetail.as_view(), name='api-part-related-detail'),\n url(r'^.*$', PartRelatedList.as_view(), name='api-part-related-list'),\n ])),\n\n # Base URL for PartParameter API endpoints\n url(r'^parameter/', include([\n url(r'^template/$', PartParameterTemplateList.as_view(), name='api-part-parameter-template-list'),\n\n url(r'^(?P<pk>\\d+)/', PartParameterDetail.as_view(), name='api-part-parameter-detail'),\n url(r'^.*$', PartParameterList.as_view(), name='api-part-parameter-list'),\n ])),\n\n url(r'^thumbs/', include([\n url(r'^$', PartThumbs.as_view(), name='api-part-thumbs'),\n url(r'^(?P<pk>\\d+)/?', PartThumbsUpdate.as_view(), name='api-part-thumbs-update'),\n ])),\n\n url(r'^(?P<pk>\\d+)/', include([\n\n # Endpoint for extra serial number information\n url(r'^serial-numbers/', PartSerialNumberDetail.as_view(), name='api-part-serial-number-detail'),\n\n # Part detail endpoint\n url(r'^.*$', PartDetail.as_view(), name='api-part-detail'),\n ])),\n\n url(r'^.*$', PartList.as_view(), name='api-part-list'),\n]\n\nbom_api_urls = [\n\n url(r'^substitute/', include([\n\n # Detail view\n url(r'^(?P<pk>\\d+)/', BomItemSubstituteDetail.as_view(), name='api-bom-substitute-detail'),\n\n # Catch all\n url(r'^.*$', BomItemSubstituteList.as_view(), name='api-bom-substitute-list'),\n ])),\n\n # BOM Item Detail\n url(r'^(?P<pk>\\d+)/', include([\n url(r'^validate/?', BomItemValidate.as_view(), name='api-bom-item-validate'),\n url(r'^.*$', BomDetail.as_view(), name='api-bom-item-detail'),\n ])),\n\n # Catch-all\n url(r'^.*$', BomList.as_view(), name='api-bom-list'),\n]\n", "path": "InvenTree/part/api.py" } ]
diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index 403934d3d9d4..dbc114021404 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -1075,6 +1075,7 @@ def filter_queryset(self, queryset): 'revision', 'keywords', 'category__name', + 'manufacturer_parts__MPN', ] diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 262a749bfa57..5cd09f854ef2 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -180,9 +180,9 @@ <script type='text/javascript' src="{% i18n_static 'tables.js' %}"></script> <script type='text/javascript' src="{% i18n_static 'table_filters.js' %}"></script> -<script type='text/javascript' src="{% static 'fontawesome/js/solid.js' %}"></script> -<script type='text/javascript' src="{% static 'fontawesome/js/brands.js' %}"></script> -<script type='text/javascript' src="{% static 'fontawesome/js/fontawesome.js' %}"></script> +<script type='text/javascript' src="{% static 'fontawesome/js/solid.min.js' %}"></script> +<script type='text/javascript' src="{% static 'fontawesome/js/brands.min.js' %}"></script> +<script type='text/javascript' src="{% static 'fontawesome/js/fontawesome.min.js' %}"></script> {% block js_load %} {% endblock %}
google__flax-3089
Imcompatibility with Flax Official ImageNet example with jax version >= 0.4.7 Hi, I was testing the [official flax example](https://github.com/google/flax/tree/main/examples/imagenet/) on Colab with jax and jaxlib version >= 0.4.7 on the colab pro+ environment with V100. After installing the requirements with `pip install -r requirements.txt` and with the following command `python main.py --workdir=./imagenet --config=configs/v100_x8.py`, the error is ``` File "/content/FlaxImageNet/main.py", line 29, in <module> import train File "/content/FlaxImageNet/train.py", line 30, in <module> from flax.training import checkpoints File "/usr/local/lib/python3.10/dist-packages/flax/training/checkpoints.py", line 34, in <module> from jax.experimental.global_device_array import GlobalDeviceArray ModuleNotFoundError: No module named 'jax.experimental.global_device_array' ``` According to [this StackOverflow answer](https://stackoverflow.com/questions/76191911/no-module-named-jax-experimental-global-device-array-when-running-the-official/76192120#76192120), it seems that 'jax.experimental.global_device_array' is removed. Therefore, it would be great if one can fix the official example so that it works on newer version of jax. Unavailable to import checkpoints Provide as much information as possible. At least, this should include a description of your issue and steps to reproduce the problem. If possible also provide a summary of what steps or workarounds you have already tried. ### System information - Flax, jax, jaxlib versions (obtain with `pip show flax jax jaxlib`: All to its latest, also orbitax Name: flax Version: 0.6.9 Summary: Flax: A neural network library for JAX designed for flexibility Home-page: Author: Author-email: Flax team <[email protected]> License: Location: /home/fernanda/.local/lib/python3.8/site-packages Requires: jax, msgpack, numpy, optax, orbax-checkpoint, PyYAML, rich, tensorstore, typing-extensions Required-by: --- Name: jax Version: 0.4.8 Summary: Differentiate, compile, and transform Numpy code. Home-page: https://github.com/google/jax Author: JAX team Author-email: [email protected] License: Apache-2.0 Location: /home/fernanda/.local/lib/python3.8/site-packages Requires: ml-dtypes, numpy, opt-einsum, scipy Required-by: chex, diffrax, equinox, flax, optax, orbax, orbax-checkpoint, richmol --- Name: jaxlib Version: 0.4.7 Summary: XLA library for JAX Home-page: https://github.com/google/jax Author: JAX team Author-email: [email protected] License: Apache-2.0 Location: /home/fernanda/.local/lib/python3.8/site-packages Requires: ml-dtypes, numpy, scipy Required-by: chex, optax, orbax, orbax-checkpoint --- Name: orbax Version: 0.1.7 Summary: Orbax Home-page: Author: Author-email: Orbax Authors <[email protected]> License: Location: /home/fernanda/.local/lib/python3.8/site-packages Requires: absl-py, cached_property, etils, importlib_resources, jax, jaxlib, msgpack, nest_asyncio, numpy, pyyaml, tensorstore, typing_extensions - Python version: 3.8 ### Problem you have encountered: When importing checkpoints, get the following error: """ --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-1-0eac7b685376> in <module> 11 config.update("jax_enable_x64", True) 12 from flax import serialization ---> 13 from flax.training import checkpoints 14 from jax import numpy as jnp 15 import jax /gpfs/cfel/group/cmi/common/psi4/psi4conda/lib//python3.8/site-packages/flax/training/checkpoints.py in <module> 37 from jax import process_index 38 from jax import sharding ---> 39 from jax.experimental.global_device_array import GlobalDeviceArray 40 from jax.experimental.multihost_utils import sync_global_devices 41 import orbax.checkpoint as orbax ModuleNotFoundError: No module named 'jax.experimental.global_device_array' """ I guess it is a compatibility problem between jax and flax. ### What you expected to happen: Usual importing
[ { "content": "# Copyright 2023 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Current Flax version at head on Github.\"\"\"\n__version__ = \"0.6.9\"\n\n", "path": "flax/version.py" } ]
[ { "content": "# Copyright 2023 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Current Flax version at head on Github.\"\"\"\n__version__ = \"0.6.10\"\n\n", "path": "flax/version.py" } ]
diff --git a/CHANGELOG.md b/CHANGELOG.md index 921a1181b..1be1757f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,6 @@ vNext ------ (Add your change to a random empty line to avoid merge conflicts) - -- Rudimentary quantization support: some layers can be parametrized with custom dot_general and conv_general_dilated. - - - @@ -24,6 +23,10 @@ vNext - - +0.6.10 +----- +- Rudimentary quantization support: some layers can be parametrized with custom dot_general and conv_general_dilated. + 0.6.9 ----- - Depend on `orbax-checkpoint` package instead of `orbax`. diff --git a/flax/version.py b/flax/version.py index d32591aec..e7bcc9e9c 100644 --- a/flax/version.py +++ b/flax/version.py @@ -13,5 +13,5 @@ # limitations under the License. """Current Flax version at head on Github.""" -__version__ = "0.6.9" +__version__ = "0.6.10"
DataDog__dd-agent-2915
[http] HTTP Check logs error *_Output of the [info page](https://help.datadoghq.com/hc/en-us/articles/203764635-Agent-Status-and-Information) *_ <details> ``` =================== Collector (v 5.9.1) =================== Status date: 2016-10-09 11:44:45 (13s ago) Pid: 15254 Platform: Linux-3.13.0-96-generic-x86_64-with-Ubuntu-14.04-trusty Python Version: 2.7.12, 64bit Logs: <stderr>, /var/log/datadog/collector.log Clocks ====== NTP offset: -0.0007 s System UTC time: 2016-10-09 11:44:59.442160 Paths ===== conf.d: /etc/dd-agent/conf.d checks.d: /opt/datadog-agent/agent/checks.d Hostnames ========= ec2-hostname: <REDACTED> local-ipv4: <REDACTED> local-hostname: <REDACTED> public-hostname: <REDACTED> hostname: <REDACTED> instance-id: <REDACTED> public-ipv4: <REDACTED> agent-hostname: <REDACTED> socket-fqdn: <REDACTED> Checks ====== nginx ----- - instance #0 [OK] - Collected 7 metrics, 0 events & 2 service checks network ------- - instance #0 [OK] - Collected 15 metrics, 0 events & 1 service check ntp --- - Collected 0 metrics, 0 events & 1 service check disk ---- - instance #0 [OK] - Collected 24 metrics, 0 events & 1 service check http_check ---------- - instance #0 [WARNING] Warning: Using events for service checks is deprecated in favor of monitors and will be removed in future versions of the Datadog Agent. Warning: Using events for service checks is deprecated in favor of monitors and will be removed in future versions of the Datadog Agent. Warning: Using events for service checks is deprecated in favor of monitors and will be removed in future versions of the Datadog Agent. Warning: Using events for service checks is deprecated in favor of monitors and will be removed in future versions of the Datadog Agent. Warning: Using events for service checks is deprecated in favor of monitors and will be removed in future versions of the Datadog Agent. Warning: Using events for service checks is deprecated in favor of monitors and will be removed in future versions of the Datadog Agent. - instance #1 [OK] - instance #2 [OK] - Collected 3 metrics, 0 events & 7 service checks Emitters ======== - http_emitter [OK] =================== Dogstatsd (v 5.9.1) =================== Status date: 2016-10-09 11:44:57 (2s ago) Pid: 15251 Platform: Linux-3.13.0-96-generic-x86_64-with-Ubuntu-14.04-trusty Python Version: 2.7.12, 64bit Logs: <stderr>, /var/log/datadog/dogstatsd.log Flush count: 34 Packet Count: 0 Packets per second: 0.0 Metric count: 1 Event count: 0 Service check count: 0 =================== Forwarder (v 5.9.1) =================== Status date: 2016-10-09 11:44:57 (3s ago) Pid: 15253 Platform: Linux-3.13.0-96-generic-x86_64-with-Ubuntu-14.04-trusty Python Version: 2.7.12, 64bit Logs: <stderr>, /var/log/datadog/forwarder.log Queue Size: 447 bytes Queue Length: 1 Flush Count: 116 Transactions received: 51 Transactions flushed: 50 Transactions rejected: 0 ``` </details> **Additional environment details (Operating System, Cloud provider, etc):** - Ubuntu 14.04.5 LTS - AWS **Steps to reproduce the issue:** 1. Create `http_check.yaml` against 1+ https:// enabled sites, and disable `disable_ssl_validation` (note: the double-negative use of this variable is confusing.) 2. Restart Agent **Describe the results you received:** from `/var/log/datadog/collector.log`: ``` 2016-10-09 11:39:21 UTC | INFO | dd.collector | checks.http_check(network_checks.py:94) | Starting Thread Pool 2016-10-09 11:39:21 UTC | ERROR | dd.collector | checks.http_check(network_checks.py:152) | Failed to process instance ''. Traceback (most recent call last): File "/opt/datadog-agent/agent/checks/network_checks.py", line 138, in _process statuses = self._check(instance) File "/opt/datadog-agent/agent/checks.d/http_check.py", line 319, in _check status, msg = self.check_cert_expiration(instance, timeout, instance_ca_certs) File "/opt/datadog-agent/agent/checks.d/http_check.py", line 449, in check_cert_expiration exp_date = datetime.strptime(cert['notAfter'], "%b %d %H:%M:%S %Y %Z") AttributeError: 'module' object has no attribute '_strptime' 2016-10-09 11:39:21 UTC | INFO | dd.collector | checks.collector(collector.py:514) | Finished run #1. Collection time: 4.35s. Emit time: 0.02s 2016-10-09 11:39:40 UTC | WARNING | dd.collector | checks.http_check(__init__.py:679) | Using events for service checks is deprecated in favor of monitors and will be removed in future versions of the Datadog Agent. 2016-10-09 11:39:40 UTC | WARNING | dd.collector | checks.http_check(__init__.py:679) | Using events for service checks is deprecated in favor of monitors and will be removed in future versions of the Datadog Agent. 2016-10-09 11:39:40 UTC | WARNING | dd.collector | checks.http_check(__init__.py:679) | Using events for service checks is deprecated in favor of monitors and will be removed in future versions of the Datadog Agent. ... (repeat infinitely) ``` **Describe the results you expected:** No log errors. **Additional information you deem important (e.g. issue happens only occasionally):** The WARNINGs that appear both in the `info` and the collector logs have previously been reported in #1999 last year, and persist. I think this is not related to this issue. I might be wrong.
[ { "content": "# (C) Datadog, Inc. 2010-2016\n# All rights reserved\n# Licensed under Simplified BSD License (see LICENSE)\n\n# stdlib\nfrom datetime import datetime\nimport os.path\nfrom os import environ\nimport re\nimport socket\nimport ssl\nimport time\nimport warnings\nfrom urlparse import urlparse\n\n# 3rd party\nimport requests\nimport tornado\n\nfrom requests.adapters import HTTPAdapter\nfrom requests.packages import urllib3\nfrom requests.packages.urllib3.util import ssl_\n\nfrom requests.packages.urllib3.exceptions import (\n SecurityWarning,\n)\nfrom requests.packages.urllib3.packages.ssl_match_hostname import \\\n match_hostname\n\n# project\nfrom checks.network_checks import EventType, NetworkCheck, Status\nfrom config import _is_affirmative\nfrom util import headers as agent_headers\n\nDEFAULT_EXPECTED_CODE = \"(1|2|3)\\d\\d\"\nCONTENT_LENGTH = 200\n\n\nclass WeakCiphersHTTPSConnection(urllib3.connection.VerifiedHTTPSConnection):\n\n SUPPORTED_CIPHERS = (\n 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:'\n 'ECDH+HIGH:DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:'\n 'RSA+3DES:ECDH+RC4:DH+RC4:RSA+RC4:!aNULL:!eNULL:!EXP:-MD5:RSA+RC4+MD5'\n )\n\n def __init__(self, host, port, ciphers=None, **kwargs):\n self.ciphers = ciphers if ciphers is not None else self.SUPPORTED_CIPHERS\n super(WeakCiphersHTTPSConnection, self).__init__(host, port, **kwargs)\n\n def connect(self):\n # Add certificate verification\n conn = self._new_conn()\n\n resolved_cert_reqs = ssl_.resolve_cert_reqs(self.cert_reqs)\n resolved_ssl_version = ssl_.resolve_ssl_version(self.ssl_version)\n\n hostname = self.host\n if getattr(self, '_tunnel_host', None):\n # _tunnel_host was added in Python 2.6.3\n # (See:\n # http://hg.python.org/cpython/rev/0f57b30a152f)\n #\n # However this check is still necessary in 2.7.x\n\n self.sock = conn\n # Calls self._set_hostport(), so self.host is\n # self._tunnel_host below.\n self._tunnel()\n # Mark this connection as not reusable\n self.auto_open = 0\n\n # Override the host with the one we're requesting data from.\n hostname = self._tunnel_host\n\n # Wrap socket using verification with the root certs in trusted_root_certs\n self.sock = ssl_.ssl_wrap_socket(conn, self.key_file, self.cert_file,\n cert_reqs=resolved_cert_reqs,\n ca_certs=self.ca_certs,\n server_hostname=hostname,\n ssl_version=resolved_ssl_version,\n ciphers=self.ciphers)\n\n if self.assert_fingerprint:\n ssl_.assert_fingerprint(self.sock.getpeercert(binary_form=True), self.assert_fingerprint)\n elif resolved_cert_reqs != ssl.CERT_NONE \\\n and self.assert_hostname is not False:\n cert = self.sock.getpeercert()\n if not cert.get('subjectAltName', ()):\n warnings.warn((\n 'Certificate has no `subjectAltName`, falling back to check for a `commonName` for now. '\n 'This feature is being removed by major browsers and deprecated by RFC 2818. '\n '(See https://github.com/shazow/urllib3/issues/497 for details.)'),\n SecurityWarning\n )\n match_hostname(cert, self.assert_hostname or hostname)\n\n self.is_verified = (resolved_cert_reqs == ssl.CERT_REQUIRED\n or self.assert_fingerprint is not None)\n\n\nclass WeakCiphersHTTPSConnectionPool(urllib3.connectionpool.HTTPSConnectionPool):\n\n ConnectionCls = WeakCiphersHTTPSConnection\n\n\nclass WeakCiphersPoolManager(urllib3.poolmanager.PoolManager):\n\n def _new_pool(self, scheme, host, port):\n if scheme == 'https':\n return WeakCiphersHTTPSConnectionPool(host, port, **(self.connection_pool_kw))\n return super(WeakCiphersPoolManager, self)._new_pool(scheme, host, port)\n\n\nclass WeakCiphersAdapter(HTTPAdapter):\n \"\"\"\"Transport adapter\" that allows us to use TLS_RSA_WITH_RC4_128_MD5.\"\"\"\n\n def init_poolmanager(self, connections, maxsize, block=False, **pool_kwargs):\n # Rewrite of the\n # requests.adapters.HTTPAdapter.init_poolmanager method\n # to use WeakCiphersPoolManager instead of\n # urllib3's PoolManager\n self._pool_connections = connections\n self._pool_maxsize = maxsize\n self._pool_block = block\n\n self.poolmanager = WeakCiphersPoolManager(num_pools=connections,\n maxsize=maxsize, block=block, strict=True, **pool_kwargs)\n\n\ndef get_ca_certs_path():\n \"\"\"\n Get a path to the trusted certificates of the system\n \"\"\"\n CA_CERTS = [\n '/opt/datadog-agent/embedded/ssl/certs/cacert.pem',\n os.path.join(os.path.dirname(tornado.__file__), 'ca-certificates.crt'),\n '/etc/ssl/certs/ca-certificates.crt',\n ]\n\n for f in CA_CERTS:\n if os.path.exists(f):\n return f\n return None\n\n\nclass HTTPCheck(NetworkCheck):\n SOURCE_TYPE_NAME = 'system'\n SC_STATUS = 'http.can_connect'\n SC_SSL_CERT = 'http.ssl_cert'\n\n def __init__(self, name, init_config, agentConfig, instances):\n NetworkCheck.__init__(self, name, init_config, agentConfig, instances)\n\n self.ca_certs = init_config.get('ca_certs', get_ca_certs_path())\n\n self.proxies['no'] = environ.get('no_proxy',\n environ.get('NO_PROXY', None)\n )\n\n def _load_conf(self, instance):\n # Fetches the conf\n method = instance.get('method', 'get')\n data = instance.get('data', {})\n tags = instance.get('tags', [])\n username = instance.get('username')\n password = instance.get('password')\n http_response_status_code = str(instance.get('http_response_status_code', DEFAULT_EXPECTED_CODE))\n timeout = int(instance.get('timeout', 10))\n config_headers = instance.get('headers', {})\n headers = agent_headers(self.agentConfig)\n headers.update(config_headers)\n url = instance.get('url')\n content_match = instance.get('content_match')\n response_time = _is_affirmative(instance.get('collect_response_time', True))\n if not url:\n raise Exception(\"Bad configuration. You must specify a url\")\n include_content = _is_affirmative(instance.get('include_content', False))\n ssl = _is_affirmative(instance.get('disable_ssl_validation', True))\n ssl_expire = _is_affirmative(instance.get('check_certificate_expiration', True))\n instance_ca_certs = instance.get('ca_certs', self.ca_certs)\n weakcipher = _is_affirmative(instance.get('weakciphers', False))\n ignore_ssl_warning = _is_affirmative(instance.get('ignore_ssl_warning', False))\n skip_proxy = _is_affirmative(instance.get('no_proxy', False))\n allow_redirects = _is_affirmative(instance.get('allow_redirects', True))\n\n return url, username, password, method, data, http_response_status_code, timeout, include_content,\\\n headers, response_time, content_match, tags, ssl, ssl_expire, instance_ca_certs,\\\n weakcipher, ignore_ssl_warning, skip_proxy, allow_redirects\n\n def _check(self, instance):\n addr, username, password, method, data, http_response_status_code, timeout, include_content, headers,\\\n response_time, content_match, tags, disable_ssl_validation,\\\n ssl_expire, instance_ca_certs, weakcipher, ignore_ssl_warning, skip_proxy, allow_redirects = self._load_conf(instance)\n start = time.time()\n\n service_checks = []\n try:\n parsed_uri = urlparse(addr)\n self.log.debug(\"Connecting to %s\" % addr)\n if disable_ssl_validation and parsed_uri.scheme == \"https\" and not ignore_ssl_warning:\n self.warning(\"Skipping SSL certificate validation for %s based on configuration\"\n % addr)\n\n instance_proxy = self.proxies.copy()\n\n # disable proxy if necessary\n if skip_proxy:\n instance_proxy.pop('http')\n instance_proxy.pop('https')\n else:\n for url in self.proxies['no'].replace(';', ',').split(\",\"):\n if url in parsed_uri.netloc:\n instance_proxy.pop('http')\n instance_proxy.pop('https')\n\n self.log.debug(\"Proxies used for %s - %s\", addr, instance_proxy)\n\n auth = None\n if username is not None and password is not None:\n auth = (username, password)\n\n sess = requests.Session()\n sess.trust_env = False\n if weakcipher:\n base_addr = '{uri.scheme}://{uri.netloc}/'.format(uri=parsed_uri)\n sess.mount(base_addr, WeakCiphersAdapter())\n self.log.debug(\"Weak Ciphers will be used for {0}. Suppoted Cipherlist: {1}\".format(\n base_addr, WeakCiphersHTTPSConnection.SUPPORTED_CIPHERS))\n\n r = sess.request(method.upper(), addr, auth=auth, timeout=timeout, headers=headers,\n proxies = instance_proxy, allow_redirects=allow_redirects,\n verify=False if disable_ssl_validation else instance_ca_certs,\n json = data if method == 'post' else None)\n\n except (socket.timeout, requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:\n length = int((time.time() - start) * 1000)\n self.log.info(\"%s is DOWN, error: %s. Connection failed after %s ms\"\n % (addr, str(e), length))\n service_checks.append((\n self.SC_STATUS,\n Status.DOWN,\n \"%s. Connection failed after %s ms\" % (str(e), length)\n ))\n\n except socket.error as e:\n length = int((time.time() - start) * 1000)\n self.log.info(\"%s is DOWN, error: %s. Connection failed after %s ms\"\n % (addr, repr(e), length))\n service_checks.append((\n self.SC_STATUS,\n Status.DOWN,\n \"Socket error: %s. Connection failed after %s ms\" % (repr(e), length)\n ))\n\n except Exception as e:\n length = int((time.time() - start) * 1000)\n self.log.error(\"Unhandled exception %s. Connection failed after %s ms\"\n % (str(e), length))\n raise\n\n # Only report this metric if the site is not down\n if response_time and not service_checks:\n # Stop the timer as early as possible\n running_time = time.time() - start\n # Store tags in a temporary list so that we don't modify the global tags data structure\n tags_list = list(tags)\n tags_list.append('url:%s' % addr)\n self.gauge('network.http.response_time', running_time, tags=tags_list)\n\n # Check HTTP response status code\n if not (service_checks or re.match(http_response_status_code, str(r.status_code))):\n if http_response_status_code == DEFAULT_EXPECTED_CODE:\n expected_code = \"1xx or 2xx or 3xx\"\n else:\n expected_code = http_response_status_code\n\n message = \"Incorrect HTTP return code for url %s. Expected %s, got %s.\" % (\n addr, expected_code, str(r.status_code))\n if include_content:\n message += '\\nContent: {}'.format(r.content[:CONTENT_LENGTH])\n\n self.log.info(message)\n\n service_checks.append((\n self.SC_STATUS,\n Status.DOWN,\n message\n ))\n\n if not service_checks:\n # Host is UP\n # Check content matching is set\n if content_match:\n content = r.content\n if re.search(content_match, content, re.UNICODE):\n self.log.debug(\"%s is found in return content\" % content_match)\n service_checks.append((\n self.SC_STATUS, Status.UP, \"UP\"\n ))\n else:\n self.log.info(\"%s not found in content\" % content_match)\n self.log.debug(\"Content returned:\\n%s\" % content)\n message = 'Content \"%s\" not found in response.' % content_match\n if include_content:\n message += '\\nContent: {}'.format(content[:CONTENT_LENGTH])\n service_checks.append((\n self.SC_STATUS,\n Status.DOWN,\n message\n ))\n else:\n self.log.debug(\"%s is UP\" % addr)\n service_checks.append((\n self.SC_STATUS, Status.UP, \"UP\"\n ))\n\n if ssl_expire and parsed_uri.scheme == \"https\":\n status, msg = self.check_cert_expiration(instance, timeout, instance_ca_certs)\n service_checks.append((\n self.SC_SSL_CERT, status, msg\n ))\n\n return service_checks\n\n # FIXME: 5.3 drop this function\n def _create_status_event(self, sc_name, status, msg, instance):\n # Create only this deprecated event for old check\n if sc_name != self.SC_STATUS:\n return\n # Get the instance settings\n url = instance.get('url', None)\n name = instance.get('name', None)\n nb_failures = self.statuses[name][sc_name].count(Status.DOWN)\n nb_tries = len(self.statuses[name][sc_name])\n tags = instance.get('tags', [])\n tags_list = []\n tags_list.extend(tags)\n tags_list.append('url:%s' % url)\n\n # Get a custom message that will be displayed in the event\n custom_message = instance.get('message', \"\")\n if custom_message:\n custom_message += \" \\n\"\n\n # Let the possibility to override the source type name\n instance_source_type_name = instance.get('source_type', None)\n if instance_source_type_name is None:\n source_type = \"%s.%s\" % (NetworkCheck.SOURCE_TYPE_NAME, name)\n else:\n source_type = \"%s.%s\" % (NetworkCheck.SOURCE_TYPE_NAME, instance_source_type_name)\n\n # Get the handles you want to notify\n notify = instance.get('notify', self.init_config.get('notify', []))\n notify_message = \"\"\n if notify:\n notify_list = []\n for handle in notify:\n notify_list.append(\"@%s\" % handle.strip())\n notify_message = \" \".join(notify_list) + \" \\n\"\n\n if status == Status.DOWN:\n # format the HTTP response body into the event\n if isinstance(msg, tuple):\n code, reason, content = msg\n\n # truncate and html-escape content\n if len(content) > 200:\n content = content[:197] + '...'\n\n msg = u\"%d %s\\n\\n%s\" % (code, reason, content)\n msg = msg.rstrip()\n\n title = \"[Alert] %s reported that %s is down\" % (self.hostname, name)\n alert_type = \"error\"\n msg = u\"%s %s %s reported that %s (%s) failed %s time(s) within %s last attempt(s).\"\\\n \" Last error: %s\" % (notify_message, custom_message, self.hostname,\n name, url, nb_failures, nb_tries, msg)\n event_type = EventType.DOWN\n\n else: # Status is UP\n title = \"[Recovered] %s reported that %s is up\" % (self.hostname, name)\n alert_type = \"success\"\n msg = u\"%s %s %s reported that %s (%s) recovered\" \\\n % (notify_message, custom_message, self.hostname, name, url)\n event_type = EventType.UP\n\n return {\n 'timestamp': int(time.time()),\n 'event_type': event_type,\n 'host': self.hostname,\n 'msg_text': msg,\n 'msg_title': title,\n 'alert_type': alert_type,\n \"source_type_name\": source_type,\n \"event_object\": name,\n \"tags\": tags_list\n }\n\n def report_as_service_check(self, sc_name, status, instance, msg=None):\n instance_name = self.normalize(instance['name'])\n url = instance.get('url', None)\n sc_tags = ['url:{0}'.format(url), \"instance:{0}\".format(instance_name)]\n custom_tags = instance.get('tags', [])\n tags = sc_tags + custom_tags\n\n if sc_name == self.SC_STATUS:\n # format the HTTP response body into the event\n if isinstance(msg, tuple):\n code, reason, content = msg\n\n # truncate and html-escape content\n if len(content) > 200:\n content = content[:197] + '...'\n\n msg = u\"%d %s\\n\\n%s\" % (code, reason, content)\n msg = msg.rstrip()\n\n self.service_check(sc_name,\n NetworkCheck.STATUS_TO_SERVICE_CHECK[status],\n tags=tags,\n message=msg\n )\n\n def check_cert_expiration(self, instance, timeout, instance_ca_certs):\n warning_days = int(instance.get('days_warning', 14))\n critical_days = int(instance.get('days_critical', 7))\n url = instance.get('url')\n\n o = urlparse(url)\n host = o.hostname\n\n port = o.port or 443\n\n try:\n sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n sock.settimeout(float(timeout))\n sock.connect((host, port))\n context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)\n context.verify_mode = ssl.CERT_REQUIRED\n context.check_hostname = True\n context.load_verify_locations(instance_ca_certs)\n ssl_sock = context.wrap_socket(sock, server_hostname=host)\n cert = ssl_sock.getpeercert()\n\n except Exception as e:\n return Status.DOWN, \"%s\" % (str(e))\n\n exp_date = datetime.strptime(cert['notAfter'], \"%b %d %H:%M:%S %Y %Z\")\n days_left = exp_date - datetime.utcnow()\n\n if days_left.days < 0:\n return Status.DOWN, \"Expired by {0} days\".format(days_left.days)\n\n elif days_left.days < critical_days:\n return Status.CRITICAL, \"This cert TTL is critical: only {0} days before it expires\"\\\n .format(days_left.days)\n\n elif days_left.days < warning_days:\n return Status.WARNING, \"This cert is almost expired, only {0} days left\"\\\n .format(days_left.days)\n\n else:\n return Status.UP, \"Days left: {0}\".format(days_left.days)\n", "path": "checks.d/http_check.py" } ]
[ { "content": "# (C) Datadog, Inc. 2010-2016\n# All rights reserved\n# Licensed under Simplified BSD License (see LICENSE)\n\n# stdlib\nfrom datetime import datetime\nimport _strptime # noqa\nimport os.path\nfrom os import environ\nimport re\nimport socket\nimport ssl\nimport time\nimport warnings\nfrom urlparse import urlparse\n\n# 3rd party\nimport requests\nimport tornado\n\nfrom requests.adapters import HTTPAdapter\nfrom requests.packages import urllib3\nfrom requests.packages.urllib3.util import ssl_\n\nfrom requests.packages.urllib3.exceptions import (\n SecurityWarning,\n)\nfrom requests.packages.urllib3.packages.ssl_match_hostname import \\\n match_hostname\n\n# project\nfrom checks.network_checks import EventType, NetworkCheck, Status\nfrom config import _is_affirmative\nfrom util import headers as agent_headers\n\nDEFAULT_EXPECTED_CODE = \"(1|2|3)\\d\\d\"\nCONTENT_LENGTH = 200\n\n\nclass WeakCiphersHTTPSConnection(urllib3.connection.VerifiedHTTPSConnection):\n\n SUPPORTED_CIPHERS = (\n 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:'\n 'ECDH+HIGH:DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:'\n 'RSA+3DES:ECDH+RC4:DH+RC4:RSA+RC4:!aNULL:!eNULL:!EXP:-MD5:RSA+RC4+MD5'\n )\n\n def __init__(self, host, port, ciphers=None, **kwargs):\n self.ciphers = ciphers if ciphers is not None else self.SUPPORTED_CIPHERS\n super(WeakCiphersHTTPSConnection, self).__init__(host, port, **kwargs)\n\n def connect(self):\n # Add certificate verification\n conn = self._new_conn()\n\n resolved_cert_reqs = ssl_.resolve_cert_reqs(self.cert_reqs)\n resolved_ssl_version = ssl_.resolve_ssl_version(self.ssl_version)\n\n hostname = self.host\n if getattr(self, '_tunnel_host', None):\n # _tunnel_host was added in Python 2.6.3\n # (See:\n # http://hg.python.org/cpython/rev/0f57b30a152f)\n #\n # However this check is still necessary in 2.7.x\n\n self.sock = conn\n # Calls self._set_hostport(), so self.host is\n # self._tunnel_host below.\n self._tunnel()\n # Mark this connection as not reusable\n self.auto_open = 0\n\n # Override the host with the one we're requesting data from.\n hostname = self._tunnel_host\n\n # Wrap socket using verification with the root certs in trusted_root_certs\n self.sock = ssl_.ssl_wrap_socket(conn, self.key_file, self.cert_file,\n cert_reqs=resolved_cert_reqs,\n ca_certs=self.ca_certs,\n server_hostname=hostname,\n ssl_version=resolved_ssl_version,\n ciphers=self.ciphers)\n\n if self.assert_fingerprint:\n ssl_.assert_fingerprint(self.sock.getpeercert(binary_form=True), self.assert_fingerprint)\n elif resolved_cert_reqs != ssl.CERT_NONE \\\n and self.assert_hostname is not False:\n cert = self.sock.getpeercert()\n if not cert.get('subjectAltName', ()):\n warnings.warn((\n 'Certificate has no `subjectAltName`, falling back to check for a `commonName` for now. '\n 'This feature is being removed by major browsers and deprecated by RFC 2818. '\n '(See https://github.com/shazow/urllib3/issues/497 for details.)'),\n SecurityWarning\n )\n match_hostname(cert, self.assert_hostname or hostname)\n\n self.is_verified = (resolved_cert_reqs == ssl.CERT_REQUIRED\n or self.assert_fingerprint is not None)\n\n\nclass WeakCiphersHTTPSConnectionPool(urllib3.connectionpool.HTTPSConnectionPool):\n\n ConnectionCls = WeakCiphersHTTPSConnection\n\n\nclass WeakCiphersPoolManager(urllib3.poolmanager.PoolManager):\n\n def _new_pool(self, scheme, host, port):\n if scheme == 'https':\n return WeakCiphersHTTPSConnectionPool(host, port, **(self.connection_pool_kw))\n return super(WeakCiphersPoolManager, self)._new_pool(scheme, host, port)\n\n\nclass WeakCiphersAdapter(HTTPAdapter):\n \"\"\"\"Transport adapter\" that allows us to use TLS_RSA_WITH_RC4_128_MD5.\"\"\"\n\n def init_poolmanager(self, connections, maxsize, block=False, **pool_kwargs):\n # Rewrite of the\n # requests.adapters.HTTPAdapter.init_poolmanager method\n # to use WeakCiphersPoolManager instead of\n # urllib3's PoolManager\n self._pool_connections = connections\n self._pool_maxsize = maxsize\n self._pool_block = block\n\n self.poolmanager = WeakCiphersPoolManager(num_pools=connections,\n maxsize=maxsize, block=block, strict=True, **pool_kwargs)\n\n\ndef get_ca_certs_path():\n \"\"\"\n Get a path to the trusted certificates of the system\n \"\"\"\n CA_CERTS = [\n '/opt/datadog-agent/embedded/ssl/certs/cacert.pem',\n os.path.join(os.path.dirname(tornado.__file__), 'ca-certificates.crt'),\n '/etc/ssl/certs/ca-certificates.crt',\n ]\n\n for f in CA_CERTS:\n if os.path.exists(f):\n return f\n return None\n\n\nclass HTTPCheck(NetworkCheck):\n SOURCE_TYPE_NAME = 'system'\n SC_STATUS = 'http.can_connect'\n SC_SSL_CERT = 'http.ssl_cert'\n\n def __init__(self, name, init_config, agentConfig, instances):\n NetworkCheck.__init__(self, name, init_config, agentConfig, instances)\n\n self.ca_certs = init_config.get('ca_certs', get_ca_certs_path())\n\n self.proxies['no'] = environ.get('no_proxy',\n environ.get('NO_PROXY', None)\n )\n\n def _load_conf(self, instance):\n # Fetches the conf\n method = instance.get('method', 'get')\n data = instance.get('data', {})\n tags = instance.get('tags', [])\n username = instance.get('username')\n password = instance.get('password')\n http_response_status_code = str(instance.get('http_response_status_code', DEFAULT_EXPECTED_CODE))\n timeout = int(instance.get('timeout', 10))\n config_headers = instance.get('headers', {})\n headers = agent_headers(self.agentConfig)\n headers.update(config_headers)\n url = instance.get('url')\n content_match = instance.get('content_match')\n response_time = _is_affirmative(instance.get('collect_response_time', True))\n if not url:\n raise Exception(\"Bad configuration. You must specify a url\")\n include_content = _is_affirmative(instance.get('include_content', False))\n ssl = _is_affirmative(instance.get('disable_ssl_validation', True))\n ssl_expire = _is_affirmative(instance.get('check_certificate_expiration', True))\n instance_ca_certs = instance.get('ca_certs', self.ca_certs)\n weakcipher = _is_affirmative(instance.get('weakciphers', False))\n ignore_ssl_warning = _is_affirmative(instance.get('ignore_ssl_warning', False))\n skip_proxy = _is_affirmative(instance.get('no_proxy', False))\n allow_redirects = _is_affirmative(instance.get('allow_redirects', True))\n\n return url, username, password, method, data, http_response_status_code, timeout, include_content,\\\n headers, response_time, content_match, tags, ssl, ssl_expire, instance_ca_certs,\\\n weakcipher, ignore_ssl_warning, skip_proxy, allow_redirects\n\n def _check(self, instance):\n addr, username, password, method, data, http_response_status_code, timeout, include_content, headers,\\\n response_time, content_match, tags, disable_ssl_validation,\\\n ssl_expire, instance_ca_certs, weakcipher, ignore_ssl_warning, skip_proxy, allow_redirects = self._load_conf(instance)\n start = time.time()\n\n service_checks = []\n try:\n parsed_uri = urlparse(addr)\n self.log.debug(\"Connecting to %s\" % addr)\n if disable_ssl_validation and parsed_uri.scheme == \"https\" and not ignore_ssl_warning:\n self.warning(\"Skipping SSL certificate validation for %s based on configuration\"\n % addr)\n\n instance_proxy = self.proxies.copy()\n\n # disable proxy if necessary\n if skip_proxy:\n instance_proxy.pop('http')\n instance_proxy.pop('https')\n else:\n for url in self.proxies['no'].replace(';', ',').split(\",\"):\n if url in parsed_uri.netloc:\n instance_proxy.pop('http')\n instance_proxy.pop('https')\n\n self.log.debug(\"Proxies used for %s - %s\", addr, instance_proxy)\n\n auth = None\n if username is not None and password is not None:\n auth = (username, password)\n\n sess = requests.Session()\n sess.trust_env = False\n if weakcipher:\n base_addr = '{uri.scheme}://{uri.netloc}/'.format(uri=parsed_uri)\n sess.mount(base_addr, WeakCiphersAdapter())\n self.log.debug(\"Weak Ciphers will be used for {0}. Suppoted Cipherlist: {1}\".format(\n base_addr, WeakCiphersHTTPSConnection.SUPPORTED_CIPHERS))\n\n r = sess.request(method.upper(), addr, auth=auth, timeout=timeout, headers=headers,\n proxies = instance_proxy, allow_redirects=allow_redirects,\n verify=False if disable_ssl_validation else instance_ca_certs,\n json = data if method == 'post' else None)\n\n except (socket.timeout, requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:\n length = int((time.time() - start) * 1000)\n self.log.info(\"%s is DOWN, error: %s. Connection failed after %s ms\"\n % (addr, str(e), length))\n service_checks.append((\n self.SC_STATUS,\n Status.DOWN,\n \"%s. Connection failed after %s ms\" % (str(e), length)\n ))\n\n except socket.error as e:\n length = int((time.time() - start) * 1000)\n self.log.info(\"%s is DOWN, error: %s. Connection failed after %s ms\"\n % (addr, repr(e), length))\n service_checks.append((\n self.SC_STATUS,\n Status.DOWN,\n \"Socket error: %s. Connection failed after %s ms\" % (repr(e), length)\n ))\n\n except Exception as e:\n length = int((time.time() - start) * 1000)\n self.log.error(\"Unhandled exception %s. Connection failed after %s ms\"\n % (str(e), length))\n raise\n\n # Only report this metric if the site is not down\n if response_time and not service_checks:\n # Stop the timer as early as possible\n running_time = time.time() - start\n # Store tags in a temporary list so that we don't modify the global tags data structure\n tags_list = list(tags)\n tags_list.append('url:%s' % addr)\n self.gauge('network.http.response_time', running_time, tags=tags_list)\n\n # Check HTTP response status code\n if not (service_checks or re.match(http_response_status_code, str(r.status_code))):\n if http_response_status_code == DEFAULT_EXPECTED_CODE:\n expected_code = \"1xx or 2xx or 3xx\"\n else:\n expected_code = http_response_status_code\n\n message = \"Incorrect HTTP return code for url %s. Expected %s, got %s.\" % (\n addr, expected_code, str(r.status_code))\n if include_content:\n message += '\\nContent: {}'.format(r.content[:CONTENT_LENGTH])\n\n self.log.info(message)\n\n service_checks.append((\n self.SC_STATUS,\n Status.DOWN,\n message\n ))\n\n if not service_checks:\n # Host is UP\n # Check content matching is set\n if content_match:\n content = r.content\n if re.search(content_match, content, re.UNICODE):\n self.log.debug(\"%s is found in return content\" % content_match)\n service_checks.append((\n self.SC_STATUS, Status.UP, \"UP\"\n ))\n else:\n self.log.info(\"%s not found in content\" % content_match)\n self.log.debug(\"Content returned:\\n%s\" % content)\n message = 'Content \"%s\" not found in response.' % content_match\n if include_content:\n message += '\\nContent: {}'.format(content[:CONTENT_LENGTH])\n service_checks.append((\n self.SC_STATUS,\n Status.DOWN,\n message\n ))\n else:\n self.log.debug(\"%s is UP\" % addr)\n service_checks.append((\n self.SC_STATUS, Status.UP, \"UP\"\n ))\n\n if ssl_expire and parsed_uri.scheme == \"https\":\n status, msg = self.check_cert_expiration(instance, timeout, instance_ca_certs)\n service_checks.append((\n self.SC_SSL_CERT, status, msg\n ))\n\n return service_checks\n\n # FIXME: 5.3 drop this function\n def _create_status_event(self, sc_name, status, msg, instance):\n # Create only this deprecated event for old check\n if sc_name != self.SC_STATUS:\n return\n # Get the instance settings\n url = instance.get('url', None)\n name = instance.get('name', None)\n nb_failures = self.statuses[name][sc_name].count(Status.DOWN)\n nb_tries = len(self.statuses[name][sc_name])\n tags = instance.get('tags', [])\n tags_list = []\n tags_list.extend(tags)\n tags_list.append('url:%s' % url)\n\n # Get a custom message that will be displayed in the event\n custom_message = instance.get('message', \"\")\n if custom_message:\n custom_message += \" \\n\"\n\n # Let the possibility to override the source type name\n instance_source_type_name = instance.get('source_type', None)\n if instance_source_type_name is None:\n source_type = \"%s.%s\" % (NetworkCheck.SOURCE_TYPE_NAME, name)\n else:\n source_type = \"%s.%s\" % (NetworkCheck.SOURCE_TYPE_NAME, instance_source_type_name)\n\n # Get the handles you want to notify\n notify = instance.get('notify', self.init_config.get('notify', []))\n notify_message = \"\"\n if notify:\n notify_list = []\n for handle in notify:\n notify_list.append(\"@%s\" % handle.strip())\n notify_message = \" \".join(notify_list) + \" \\n\"\n\n if status == Status.DOWN:\n # format the HTTP response body into the event\n if isinstance(msg, tuple):\n code, reason, content = msg\n\n # truncate and html-escape content\n if len(content) > 200:\n content = content[:197] + '...'\n\n msg = u\"%d %s\\n\\n%s\" % (code, reason, content)\n msg = msg.rstrip()\n\n title = \"[Alert] %s reported that %s is down\" % (self.hostname, name)\n alert_type = \"error\"\n msg = u\"%s %s %s reported that %s (%s) failed %s time(s) within %s last attempt(s).\"\\\n \" Last error: %s\" % (notify_message, custom_message, self.hostname,\n name, url, nb_failures, nb_tries, msg)\n event_type = EventType.DOWN\n\n else: # Status is UP\n title = \"[Recovered] %s reported that %s is up\" % (self.hostname, name)\n alert_type = \"success\"\n msg = u\"%s %s %s reported that %s (%s) recovered\" \\\n % (notify_message, custom_message, self.hostname, name, url)\n event_type = EventType.UP\n\n return {\n 'timestamp': int(time.time()),\n 'event_type': event_type,\n 'host': self.hostname,\n 'msg_text': msg,\n 'msg_title': title,\n 'alert_type': alert_type,\n \"source_type_name\": source_type,\n \"event_object\": name,\n \"tags\": tags_list\n }\n\n def report_as_service_check(self, sc_name, status, instance, msg=None):\n instance_name = self.normalize(instance['name'])\n url = instance.get('url', None)\n sc_tags = ['url:{0}'.format(url), \"instance:{0}\".format(instance_name)]\n custom_tags = instance.get('tags', [])\n tags = sc_tags + custom_tags\n\n if sc_name == self.SC_STATUS:\n # format the HTTP response body into the event\n if isinstance(msg, tuple):\n code, reason, content = msg\n\n # truncate and html-escape content\n if len(content) > 200:\n content = content[:197] + '...'\n\n msg = u\"%d %s\\n\\n%s\" % (code, reason, content)\n msg = msg.rstrip()\n\n self.service_check(sc_name,\n NetworkCheck.STATUS_TO_SERVICE_CHECK[status],\n tags=tags,\n message=msg\n )\n\n def check_cert_expiration(self, instance, timeout, instance_ca_certs):\n warning_days = int(instance.get('days_warning', 14))\n critical_days = int(instance.get('days_critical', 7))\n url = instance.get('url')\n\n o = urlparse(url)\n host = o.hostname\n\n port = o.port or 443\n\n try:\n sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n sock.settimeout(float(timeout))\n sock.connect((host, port))\n context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)\n context.verify_mode = ssl.CERT_REQUIRED\n context.check_hostname = True\n context.load_verify_locations(instance_ca_certs)\n ssl_sock = context.wrap_socket(sock, server_hostname=host)\n cert = ssl_sock.getpeercert()\n\n except Exception as e:\n return Status.DOWN, \"%s\" % (str(e))\n\n exp_date = datetime.strptime(cert['notAfter'], \"%b %d %H:%M:%S %Y %Z\")\n days_left = exp_date - datetime.utcnow()\n\n if days_left.days < 0:\n return Status.DOWN, \"Expired by {0} days\".format(days_left.days)\n\n elif days_left.days < critical_days:\n return Status.CRITICAL, \"This cert TTL is critical: only {0} days before it expires\"\\\n .format(days_left.days)\n\n elif days_left.days < warning_days:\n return Status.WARNING, \"This cert is almost expired, only {0} days left\"\\\n .format(days_left.days)\n\n else:\n return Status.UP, \"Days left: {0}\".format(days_left.days)\n", "path": "checks.d/http_check.py" } ]
diff --git a/checks.d/http_check.py b/checks.d/http_check.py index f3976a0b79..260a4fc9cd 100644 --- a/checks.d/http_check.py +++ b/checks.d/http_check.py @@ -4,6 +4,7 @@ # stdlib from datetime import datetime +import _strptime # noqa import os.path from os import environ import re
google__osv.dev-836
Missing result from query ``` curl -X POST -d '{"package": {"ecosystem": "npm", "name": "ws"}, "version": "7.1.1"}' https://api.osv.dev/v1/query ``` Should return at least https://osv.dev/vulnerability/GHSA-6fc8-4gx4-v693
[ { "content": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"API server implementation.\"\"\"\n\nimport argparse\nimport concurrent\nimport functools\nimport logging\nimport os\nimport random\nimport sys\nimport time\nfrom collections import defaultdict\n\nfrom google.cloud import ndb\nimport grpc\nfrom grpc_reflection.v1alpha import reflection\nfrom packageurl import PackageURL\n\nimport osv\nfrom osv import ecosystems\nfrom osv import semver_index\nimport osv_service_v1_pb2\nimport osv_service_v1_pb2_grpc\n\nfrom typing import List\n\n_PROJECT = 'oss-vdb'\n_OSS_FUZZ_TRACKER_URL = 'https://bugs.chromium.org/p/oss-fuzz/issues/detail?id='\n\n_SHUTDOWN_GRACE_DURATION = 5\n\n_AUTHORIZATION_HEADER_PREFIX = 'Bearer '\n_EXPECTED_AUDIENCE = 'https://db.oss-fuzz.com'\n\n_MAX_BATCH_QUERY = 1000\n_MAX_VULNERABILITIES_LISTED = 16\n_MAX_HASHES_TO_TRY = 50\n_MAX_COMMITS_TO_TRY = 10\n\n_ndb_client = ndb.Client()\n\n\ndef ndb_context(func):\n \"\"\"Wrapper to create an NDB context.\"\"\"\n\n @functools.wraps(func)\n def wrapper(*args, **kwargs):\n with _ndb_client.context():\n return func(*args, **kwargs)\n\n return wrapper\n\n\nclass OSVServicer(osv_service_v1_pb2_grpc.OSVServicer):\n \"\"\"V1 OSV servicer.\"\"\"\n\n @ndb_context\n def GetVulnById(self, request, context):\n \"\"\"Return a `Vulnerability` object for a given OSV ID.\"\"\"\n bug = osv.Bug.get_by_id(request.id)\n if not bug or bug.status == osv.BugStatus.UNPROCESSED:\n context.abort(grpc.StatusCode.NOT_FOUND, 'Bug not found.')\n return None\n\n if not bug.public:\n context.abort(grpc.StatusCode.PERMISSION_DENIED, 'Permission denied.')\n return None\n\n return bug_to_response(bug)\n\n @ndb_context\n def QueryAffected(self, request, context):\n \"\"\"Query vulnerabilities for a particular project at a given commit or\n\n version.\n \"\"\"\n results, next_page_token = do_query(request.query, context).result()\n if results is not None:\n return osv_service_v1_pb2.VulnerabilityList(\n vulns=results, next_page_token=next_page_token)\n\n return None\n\n @ndb_context\n def QueryAffectedBatch(self, request, context):\n \"\"\"Query vulnerabilities (batch).\"\"\"\n batch_results = []\n futures = []\n\n if len(request.query.queries) > _MAX_BATCH_QUERY:\n context.abort(grpc.StatusCode.INVALID_ARGUMENT, 'Too many queries.')\n return None\n\n for query in request.query.queries:\n futures.append(do_query(query, context, include_details=False))\n\n for future in futures:\n batch_results.append(\n osv_service_v1_pb2.VulnerabilityList(vulns=future.result()[0] or []))\n\n return osv_service_v1_pb2.BatchVulnerabilityList(results=batch_results)\n\n @ndb_context\n def DetermineVersion(self, request, context):\n \"\"\"Determine the version of the provided hashes.\"\"\"\n return determine_version(request.query, context).result()\n\n\[email protected]\ndef determine_version(version_query: osv_service_v1_pb2.VersionQuery,\n context: grpc.ServicerContext) -> ndb.Future:\n \"\"\"Identify fitting commits based on a subset of hashes\"\"\"\n if len(version_query.file_hashes) <= _MAX_HASHES_TO_TRY:\n hashes = [\n f.hash for f in version_query\n .file_hashes[:min(_MAX_HASHES_TO_TRY, len(version_query.file_hashes))]\n ]\n else:\n hashes = [\n f.hash\n for f in random.sample(version_query.file_hashes, _MAX_HASHES_TO_TRY)\n ]\n tracker = defaultdict(int)\n\n hash_futures = []\n for h in hashes:\n query = osv.RepoIndexResult.query(\n osv.RepoIndexResult.file_results.hash == h)\n query.keys_only = True\n hash_futures.append(query.fetch_async())\n\n for f in hash_futures:\n for r in f.result():\n tracker[r.key.parent()] += 1\n\n idx_keys = []\n for k, v in tracker.items():\n if v == _MAX_HASHES_TO_TRY:\n idx_keys.append(k)\n if not idx_keys:\n idx_keys = [\n k for k, _ in sorted(\n tracker.items(), key=lambda item: item[1], reverse=True)\n ]\n idx_keys = idx_keys[:min(_MAX_COMMITS_TO_TRY, len(idx_keys))]\n if len(idx_keys) == 0:\n context.abort(grpc.StatusCode.NOT_FOUND, 'no matches found')\n return None\n\n idx_futures = ndb.get_multi_async(idx_keys)\n match_futures = []\n for f in idx_futures:\n idx = f.result()\n if version_query.name not in ('', idx.name):\n continue\n match = compare_hashes_from_commit(idx, version_query.file_hashes)\n match_futures.append(match)\n results = []\n for f in match_futures:\n match = f.result()\n if match.score != 0.0:\n results.append(match)\n if len(results) == 0:\n context.abort(grpc.StatusCode.NOT_FOUND, 'no matches found')\n return None\n\n return osv_service_v1_pb2.VersionMatchList(matches=results)\n\n\[email protected]\ndef compare_hashes_from_commit(\n idx: osv.RepoIndex,\n hashes: List[osv_service_v1_pb2.FileHash]) -> ndb.Future:\n \"\"\"\"Retrieves the hashes from the provided index and compares\n them to the input hashes.\"\"\"\n total_files = 0\n matching_hashes = 0\n for i in range(idx.pages):\n key = version_hashes_key(idx.key, idx.commit, idx.file_hash_type, i)\n result = key.get()\n for f_result in result.file_results:\n for in_hash in hashes:\n if in_hash.hash == f_result.hash:\n matching_hashes += 1\n break\n total_files += 1\n score = matching_hashes / total_files if total_files != 0 else 0.0\n return osv_service_v1_pb2.VersionMatch(\n type=osv_service_v1_pb2.VersionMatch.VERSION,\n value=idx.version,\n score=score)\n\n\ndef version_hashes_key(parent_key: ndb.Key, commit: bytes, hash_type: str,\n page: int) -> ndb.Key:\n return ndb.Key(parent_key.kind(), parent_key.id(), osv.RepoIndexResult,\n f\"{commit.hex()}-{hash_type}-{page}\")\n\n\[email protected]\ndef do_query(query, context, include_details=True):\n \"\"\"Do a query.\"\"\"\n if query.HasField('package'):\n package_name = query.package.name\n ecosystem = query.package.ecosystem\n purl_str = query.package.purl\n else:\n package_name = ''\n ecosystem = ''\n purl_str = ''\n\n page_token = None\n if query.page_token:\n page_token = ndb.Cursor(urlsafe=query.page_token)\n\n purl = None\n purl_version = None\n if purl_str:\n try:\n parsed_purl = PackageURL.from_string(purl_str)\n purl_version = parsed_purl.version\n purl = _clean_purl(parsed_purl)\n except ValueError:\n context.abort(grpc.StatusCode.INVALID_ARGUMENT, 'Invalid Package URL.')\n return None\n\n def to_response(b):\n return bug_to_response(b, include_details)\n\n next_page_token = None\n\n if query.WhichOneof('param') == 'commit':\n bugs = yield query_by_commit(query.commit, to_response=to_response)\n elif purl and purl_version:\n bugs = yield query_by_version(\n package_name, ecosystem, purl, purl_version, to_response=to_response)\n elif query.WhichOneof('param') == 'version':\n bugs = yield query_by_version(\n package_name, ecosystem, purl, query.version, to_response=to_response)\n elif (package_name != '' and ecosystem != '') or (purl and not purl_version):\n # Package specified without version.\n bugs, next_page_token = yield query_by_package(\n package_name, ecosystem, purl, page_token, to_response=to_response)\n else:\n context.abort(grpc.StatusCode.INVALID_ARGUMENT, 'Invalid query.')\n return None\n\n if next_page_token:\n next_page_token = next_page_token.urlsafe()\n\n return bugs, next_page_token\n\n\ndef bug_to_response(bug, include_details=True):\n \"\"\"Convert a Bug entity to a response object.\"\"\"\n if include_details:\n return bug.to_vulnerability(include_source=True)\n\n return bug.to_vulnerability_minimal()\n\n\ndef _get_bugs(bug_ids, to_response=bug_to_response):\n \"\"\"Get bugs from bug ids.\"\"\"\n bugs = ndb.get_multi([ndb.Key(osv.Bug, bug_id) for bug_id in bug_ids])\n return [\n to_response(bug)\n for bug in bugs\n if bug and bug.status == osv.BugStatus.PROCESSED\n ]\n\n\ndef _clean_purl(purl):\n \"\"\"\n Clean a purl object.\n\n Removes version, subpath, and qualifiers with the exception of\n the 'arch' qualifier\n \"\"\"\n values = purl.to_dict()\n values.pop('version', None)\n values.pop('subpath', None)\n qualifiers = values.pop('qualifiers', None)\n new_qualifiers = {}\n if qualifiers and 'arch' in qualifiers: # CPU arch for debian packages\n new_qualifiers['arch'] = qualifiers['arch']\n return PackageURL(qualifiers=new_qualifiers, **values)\n\n\[email protected]\ndef query_by_commit(commit, to_response=bug_to_response):\n \"\"\"Query by commit.\"\"\"\n query = osv.AffectedCommit.query(osv.AffectedCommit.commit == commit,\n osv.AffectedCommit.public == True) # pylint: disable=singleton-comparison\n bug_ids = []\n it = query.iter()\n while (yield it.has_next_async()):\n affected_commit = it.next()\n bug_ids.append(affected_commit.bug_id)\n\n return _get_bugs(bug_ids, to_response=to_response)\n\n\ndef _match_purl(purl_query: PackageURL, purl_db: PackageURL) -> bool:\n \"\"\"Check if purl match at the specifity level of purl_query\n\n If purl_query doesn't have qualifiers, then we will match against purl_db\n without qualifiers, otherwise match with qualifiers\n \"\"\"\n\n if not purl_query.qualifiers:\n # No qualifiers, and our PURLs never have versions, so just match name\n return purl_query.name == purl_db.name\n\n return purl_query == purl_db\n\n\ndef _is_semver_affected(affected_packages, package_name, ecosystem,\n purl: PackageURL, version):\n \"\"\"Returns whether or not the given version is within an affected SEMVER\n\n range.\n \"\"\"\n version = semver_index.parse(version)\n\n affected = False\n for affected_package in affected_packages:\n if package_name and package_name != affected_package.package.name:\n continue\n\n if ecosystem and ecosystem != affected_package.package.ecosystem:\n continue\n\n if purl and not (affected_package.package.purl and _match_purl(\n purl, PackageURL.from_string(affected_package.package.purl))):\n continue\n\n for affected_range in affected_package.ranges:\n if affected_range.type != 'SEMVER':\n continue\n\n for event in osv.sorted_events('', affected_range.type,\n affected_range.events):\n if (event.type == 'introduced' and\n (event.value == '0' or version >= semver_index.parse(event.value))):\n affected = True\n\n if event.type == 'fixed' and version >= semver_index.parse(event.value):\n affected = False\n\n if event.type == 'last_affected' and version > semver_index.parse(\n event.value):\n affected = False\n\n return affected\n\n\ndef _is_version_affected(affected_packages,\n package_name,\n ecosystem,\n purl: PackageURL,\n version,\n normalize=False):\n \"\"\"Returns whether or not the given version is within an affected ECOSYSTEM\n\n range.\n \"\"\"\n for affected_package in affected_packages:\n if package_name and package_name != affected_package.package.name:\n continue\n\n if ecosystem:\n # If package ecosystem has a :, also try ignoring parts after it.\n if (affected_package.package.ecosystem != ecosystem and\n ecosystems.normalize(\n affected_package.package.ecosystem) != ecosystem):\n continue\n\n if purl and not (affected_package.package.purl and _match_purl(\n purl, PackageURL.from_string(affected_package.package.purl))):\n continue\n\n if normalize:\n if any(\n osv.normalize_tag(version) == osv.normalize_tag(v)\n for v in affected_package.versions):\n return True\n else:\n if version in affected_package.versions:\n return True\n\n return False\n\n\[email protected]\ndef _query_by_semver(query, package_name, ecosystem, purl: PackageURL, version):\n \"\"\"Query by semver.\"\"\"\n if not semver_index.is_valid(version):\n return []\n\n results = []\n query = query.filter(\n osv.Bug.semver_fixed_indexes > semver_index.normalize(version))\n it = query.iter()\n\n while (yield it.has_next_async()):\n bug = it.next()\n if _is_semver_affected(bug.affected_packages, package_name, ecosystem, purl,\n version):\n results.append(bug)\n\n return results\n\n\[email protected]\ndef _query_by_generic_version(base_query, project, ecosystem, purl: PackageURL,\n version):\n \"\"\"Query by generic version.\"\"\"\n # Try without normalizing.\n results = []\n query = base_query.filter(osv.Bug.affected_fuzzy == version)\n it = query.iter()\n while (yield it.has_next_async()):\n bug = it.next()\n if _is_version_affected(bug.affected_packages, project, ecosystem, purl,\n version):\n results.append(bug)\n\n if results:\n return results\n\n # Try again after normalizing.\n version = osv.normalize_tag(version)\n query = base_query.filter(osv.Bug.affected_fuzzy == version)\n it = query.iter()\n while (yield it.has_next_async()):\n bug = it.next()\n if _is_version_affected(\n bug.affected_packages,\n project,\n ecosystem,\n purl,\n version,\n normalize=True):\n results.append(bug)\n\n return results\n\n\[email protected]\ndef query_by_version(project: str,\n ecosystem: str,\n purl: PackageURL,\n version,\n to_response=bug_to_response):\n \"\"\"Query by (fuzzy) version.\"\"\"\n ecosystem_info = ecosystems.get(ecosystem)\n is_semver = ecosystem_info and ecosystem_info.is_semver\n if project:\n query = osv.Bug.query(osv.Bug.status == osv.BugStatus.PROCESSED,\n osv.Bug.project == project, osv.Bug.public == True) # pylint: disable=singleton-comparison\n elif purl:\n query = osv.Bug.query(osv.Bug.status == osv.BugStatus.PROCESSED,\n osv.Bug.purl == purl.to_string(),\n osv.Bug.public == True) # pylint: disable=singleton-comparison\n else:\n return []\n\n if ecosystem:\n query = query.filter(osv.Bug.ecosystem == ecosystem)\n\n bugs = []\n if ecosystem:\n if is_semver:\n # Ecosystem supports semver only.\n bugs.extend((yield _query_by_semver(query, project, ecosystem, purl,\n version)))\n else:\n bugs.extend((yield _query_by_generic_version(query, project, ecosystem,\n purl, version)))\n else:\n # Unspecified ecosystem. Try both.\n bugs.extend((yield _query_by_semver(query, project, ecosystem, purl,\n version)))\n bugs.extend((yield _query_by_generic_version(query, project, ecosystem,\n purl, version)))\n\n return [to_response(bug) for bug in bugs]\n\n\[email protected]\ndef query_by_package(project, ecosystem, purl: PackageURL, page_token,\n to_response):\n \"\"\"Query by package.\"\"\"\n bugs = []\n if project and ecosystem:\n query = osv.Bug.query(osv.Bug.status == osv.BugStatus.PROCESSED,\n osv.Bug.project == project,\n osv.Bug.ecosystem == ecosystem,\n osv.Bug.public == True) # pylint: disable=singleton-comparison\n elif purl:\n query = osv.Bug.query(osv.Bug.status == osv.BugStatus.PROCESSED,\n osv.Bug.purl == purl.to_string(),\n osv.Bug.public == True) # pylint: disable=singleton-comparison\n else:\n return []\n\n # Set limit to the max + 1, as otherwise we can't detect if there are any\n # more left.\n it = query.iter(\n start_cursor=page_token, limit=_MAX_VULNERABILITIES_LISTED + 1)\n cursor = None\n while (yield it.has_next_async()):\n if len(bugs) >= _MAX_VULNERABILITIES_LISTED:\n cursor = it.cursor_after()\n break\n\n bugs.append(it.next())\n\n return [to_response(bug) for bug in bugs], cursor\n\n\ndef serve(port: int, local: bool):\n \"\"\"Configures and runs the bookstore API server.\"\"\"\n server = grpc.server(concurrent.futures.ThreadPoolExecutor(max_workers=10))\n osv_service_v1_pb2_grpc.add_OSVServicer_to_server(OSVServicer(), server)\n if local:\n service_names = (\n osv_service_v1_pb2.DESCRIPTOR.services_by_name['OSV'].full_name,\n reflection.SERVICE_NAME,\n )\n reflection.enable_server_reflection(service_names, server)\n server.add_insecure_port('[::]:{}'.format(port))\n server.start()\n\n print('Listening on port {}'.format(port))\n try:\n while True:\n time.sleep(3600)\n except KeyboardInterrupt:\n server.stop(_SHUTDOWN_GRACE_DURATION)\n\n\ndef main():\n \"\"\"Entrypoint.\"\"\"\n logging.basicConfig(stream=sys.stderr)\n logging.getLogger().setLevel(logging.INFO)\n\n parser = argparse.ArgumentParser(\n formatter_class=argparse.RawDescriptionHelpFormatter)\n parser.add_argument(\n '--port',\n type=int,\n default=None,\n help='The port to listen on.'\n 'If arg is not set, will listen on the $PORT env var.'\n 'If env var is empty, defaults to 8000.')\n parser.add_argument(\n '--local',\n action='store_true',\n default=False,\n help='If set reflection is enabled to allow debugging with grpcurl.')\n\n args = parser.parse_args()\n port = args.port\n if not port:\n port = os.environ.get('PORT')\n if not port:\n port = 8000\n\n serve(port, args.local)\n\n\nif __name__ == '__main__':\n main()\n", "path": "gcp/api/server.py" } ]
[ { "content": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"API server implementation.\"\"\"\n\nimport argparse\nimport concurrent\nimport functools\nimport logging\nimport os\nimport random\nimport sys\nimport time\nfrom collections import defaultdict\n\nfrom google.cloud import ndb\nimport grpc\nfrom grpc_reflection.v1alpha import reflection\nfrom packageurl import PackageURL\n\nimport osv\nfrom osv import ecosystems\nfrom osv import semver_index\nimport osv_service_v1_pb2\nimport osv_service_v1_pb2_grpc\n\nfrom typing import List\n\n_PROJECT = 'oss-vdb'\n_OSS_FUZZ_TRACKER_URL = 'https://bugs.chromium.org/p/oss-fuzz/issues/detail?id='\n\n_SHUTDOWN_GRACE_DURATION = 5\n\n_AUTHORIZATION_HEADER_PREFIX = 'Bearer '\n_EXPECTED_AUDIENCE = 'https://db.oss-fuzz.com'\n\n_MAX_BATCH_QUERY = 1000\n_MAX_VULNERABILITIES_LISTED = 16\n_MAX_HASHES_TO_TRY = 50\n_MAX_COMMITS_TO_TRY = 10\n\n_ndb_client = ndb.Client()\n\n\ndef ndb_context(func):\n \"\"\"Wrapper to create an NDB context.\"\"\"\n\n @functools.wraps(func)\n def wrapper(*args, **kwargs):\n with _ndb_client.context():\n return func(*args, **kwargs)\n\n return wrapper\n\n\nclass OSVServicer(osv_service_v1_pb2_grpc.OSVServicer):\n \"\"\"V1 OSV servicer.\"\"\"\n\n @ndb_context\n def GetVulnById(self, request, context):\n \"\"\"Return a `Vulnerability` object for a given OSV ID.\"\"\"\n bug = osv.Bug.get_by_id(request.id)\n if not bug or bug.status == osv.BugStatus.UNPROCESSED:\n context.abort(grpc.StatusCode.NOT_FOUND, 'Bug not found.')\n return None\n\n if not bug.public:\n context.abort(grpc.StatusCode.PERMISSION_DENIED, 'Permission denied.')\n return None\n\n return bug_to_response(bug)\n\n @ndb_context\n def QueryAffected(self, request, context):\n \"\"\"Query vulnerabilities for a particular project at a given commit or\n\n version.\n \"\"\"\n results, next_page_token = do_query(request.query, context).result()\n if results is not None:\n return osv_service_v1_pb2.VulnerabilityList(\n vulns=results, next_page_token=next_page_token)\n\n return None\n\n @ndb_context\n def QueryAffectedBatch(self, request, context):\n \"\"\"Query vulnerabilities (batch).\"\"\"\n batch_results = []\n futures = []\n\n if len(request.query.queries) > _MAX_BATCH_QUERY:\n context.abort(grpc.StatusCode.INVALID_ARGUMENT, 'Too many queries.')\n return None\n\n for query in request.query.queries:\n futures.append(do_query(query, context, include_details=False))\n\n for future in futures:\n batch_results.append(\n osv_service_v1_pb2.VulnerabilityList(vulns=future.result()[0] or []))\n\n return osv_service_v1_pb2.BatchVulnerabilityList(results=batch_results)\n\n @ndb_context\n def DetermineVersion(self, request, context):\n \"\"\"Determine the version of the provided hashes.\"\"\"\n return determine_version(request.query, context).result()\n\n\[email protected]\ndef determine_version(version_query: osv_service_v1_pb2.VersionQuery,\n context: grpc.ServicerContext) -> ndb.Future:\n \"\"\"Identify fitting commits based on a subset of hashes\"\"\"\n if len(version_query.file_hashes) <= _MAX_HASHES_TO_TRY:\n hashes = [\n f.hash for f in version_query\n .file_hashes[:min(_MAX_HASHES_TO_TRY, len(version_query.file_hashes))]\n ]\n else:\n hashes = [\n f.hash\n for f in random.sample(version_query.file_hashes, _MAX_HASHES_TO_TRY)\n ]\n tracker = defaultdict(int)\n\n hash_futures = []\n for h in hashes:\n query = osv.RepoIndexResult.query(\n osv.RepoIndexResult.file_results.hash == h)\n query.keys_only = True\n hash_futures.append(query.fetch_async())\n\n for f in hash_futures:\n for r in f.result():\n tracker[r.key.parent()] += 1\n\n idx_keys = []\n for k, v in tracker.items():\n if v == _MAX_HASHES_TO_TRY:\n idx_keys.append(k)\n if not idx_keys:\n idx_keys = [\n k for k, _ in sorted(\n tracker.items(), key=lambda item: item[1], reverse=True)\n ]\n idx_keys = idx_keys[:min(_MAX_COMMITS_TO_TRY, len(idx_keys))]\n if len(idx_keys) == 0:\n context.abort(grpc.StatusCode.NOT_FOUND, 'no matches found')\n return None\n\n idx_futures = ndb.get_multi_async(idx_keys)\n match_futures = []\n for f in idx_futures:\n idx = f.result()\n if version_query.name not in ('', idx.name):\n continue\n match = compare_hashes_from_commit(idx, version_query.file_hashes)\n match_futures.append(match)\n results = []\n for f in match_futures:\n match = f.result()\n if match.score != 0.0:\n results.append(match)\n if len(results) == 0:\n context.abort(grpc.StatusCode.NOT_FOUND, 'no matches found')\n return None\n\n return osv_service_v1_pb2.VersionMatchList(matches=results)\n\n\[email protected]\ndef compare_hashes_from_commit(\n idx: osv.RepoIndex,\n hashes: List[osv_service_v1_pb2.FileHash]) -> ndb.Future:\n \"\"\"\"Retrieves the hashes from the provided index and compares\n them to the input hashes.\"\"\"\n total_files = 0\n matching_hashes = 0\n for i in range(idx.pages):\n key = version_hashes_key(idx.key, idx.commit, idx.file_hash_type, i)\n result = key.get()\n for f_result in result.file_results:\n for in_hash in hashes:\n if in_hash.hash == f_result.hash:\n matching_hashes += 1\n break\n total_files += 1\n score = matching_hashes / total_files if total_files != 0 else 0.0\n return osv_service_v1_pb2.VersionMatch(\n type=osv_service_v1_pb2.VersionMatch.VERSION,\n value=idx.version,\n score=score)\n\n\ndef version_hashes_key(parent_key: ndb.Key, commit: bytes, hash_type: str,\n page: int) -> ndb.Key:\n return ndb.Key(parent_key.kind(), parent_key.id(), osv.RepoIndexResult,\n f\"{commit.hex()}-{hash_type}-{page}\")\n\n\[email protected]\ndef do_query(query, context, include_details=True):\n \"\"\"Do a query.\"\"\"\n if query.HasField('package'):\n package_name = query.package.name\n ecosystem = query.package.ecosystem\n purl_str = query.package.purl\n else:\n package_name = ''\n ecosystem = ''\n purl_str = ''\n\n page_token = None\n if query.page_token:\n page_token = ndb.Cursor(urlsafe=query.page_token)\n\n purl = None\n purl_version = None\n if purl_str:\n try:\n parsed_purl = PackageURL.from_string(purl_str)\n purl_version = parsed_purl.version\n purl = _clean_purl(parsed_purl)\n except ValueError:\n context.abort(grpc.StatusCode.INVALID_ARGUMENT, 'Invalid Package URL.')\n return None\n\n def to_response(b):\n return bug_to_response(b, include_details)\n\n next_page_token = None\n\n if query.WhichOneof('param') == 'commit':\n bugs = yield query_by_commit(query.commit, to_response=to_response)\n elif purl and purl_version:\n bugs = yield query_by_version(\n package_name, ecosystem, purl, purl_version, to_response=to_response)\n elif query.WhichOneof('param') == 'version':\n bugs = yield query_by_version(\n package_name, ecosystem, purl, query.version, to_response=to_response)\n elif (package_name != '' and ecosystem != '') or (purl and not purl_version):\n # Package specified without version.\n bugs, next_page_token = yield query_by_package(\n package_name, ecosystem, purl, page_token, to_response=to_response)\n else:\n context.abort(grpc.StatusCode.INVALID_ARGUMENT, 'Invalid query.')\n return None\n\n if next_page_token:\n next_page_token = next_page_token.urlsafe()\n\n return bugs, next_page_token\n\n\ndef bug_to_response(bug, include_details=True):\n \"\"\"Convert a Bug entity to a response object.\"\"\"\n if include_details:\n return bug.to_vulnerability(include_source=True)\n\n return bug.to_vulnerability_minimal()\n\n\ndef _get_bugs(bug_ids, to_response=bug_to_response):\n \"\"\"Get bugs from bug ids.\"\"\"\n bugs = ndb.get_multi([ndb.Key(osv.Bug, bug_id) for bug_id in bug_ids])\n return [\n to_response(bug)\n for bug in bugs\n if bug and bug.status == osv.BugStatus.PROCESSED\n ]\n\n\ndef _clean_purl(purl):\n \"\"\"\n Clean a purl object.\n\n Removes version, subpath, and qualifiers with the exception of\n the 'arch' qualifier\n \"\"\"\n values = purl.to_dict()\n values.pop('version', None)\n values.pop('subpath', None)\n qualifiers = values.pop('qualifiers', None)\n new_qualifiers = {}\n if qualifiers and 'arch' in qualifiers: # CPU arch for debian packages\n new_qualifiers['arch'] = qualifiers['arch']\n return PackageURL(qualifiers=new_qualifiers, **values)\n\n\[email protected]\ndef query_by_commit(commit, to_response=bug_to_response):\n \"\"\"Query by commit.\"\"\"\n query = osv.AffectedCommit.query(osv.AffectedCommit.commit == commit,\n osv.AffectedCommit.public == True) # pylint: disable=singleton-comparison\n bug_ids = []\n it = query.iter()\n while (yield it.has_next_async()):\n affected_commit = it.next()\n bug_ids.append(affected_commit.bug_id)\n\n return _get_bugs(bug_ids, to_response=to_response)\n\n\ndef _match_purl(purl_query: PackageURL, purl_db: PackageURL) -> bool:\n \"\"\"Check if purl match at the specifity level of purl_query\n\n If purl_query doesn't have qualifiers, then we will match against purl_db\n without qualifiers, otherwise match with qualifiers\n \"\"\"\n\n if not purl_query.qualifiers:\n # No qualifiers, and our PURLs never have versions, so just match name\n return purl_query.name == purl_db.name\n\n return purl_query == purl_db\n\n\ndef _is_semver_affected(affected_packages, package_name, ecosystem,\n purl: PackageURL, version):\n \"\"\"Returns whether or not the given version is within an affected SEMVER\n\n range.\n \"\"\"\n version = semver_index.parse(version)\n\n affected = False\n for affected_package in affected_packages:\n if package_name and package_name != affected_package.package.name:\n continue\n\n if ecosystem and ecosystem != affected_package.package.ecosystem:\n continue\n\n if purl and not (affected_package.package.purl and _match_purl(\n purl, PackageURL.from_string(affected_package.package.purl))):\n continue\n\n for affected_range in affected_package.ranges:\n if affected_range.type != 'SEMVER':\n continue\n\n for event in osv.sorted_events('', affected_range.type,\n affected_range.events):\n if (event.type == 'introduced' and\n (event.value == '0' or version >= semver_index.parse(event.value))):\n affected = True\n\n if event.type == 'fixed' and version >= semver_index.parse(event.value):\n affected = False\n\n if event.type == 'last_affected' and version > semver_index.parse(\n event.value):\n affected = False\n\n if affected:\n return affected\n\n return affected\n\n\ndef _is_version_affected(affected_packages,\n package_name,\n ecosystem,\n purl: PackageURL,\n version,\n normalize=False):\n \"\"\"Returns whether or not the given version is within an affected ECOSYSTEM\n\n range.\n \"\"\"\n for affected_package in affected_packages:\n if package_name and package_name != affected_package.package.name:\n continue\n\n if ecosystem:\n # If package ecosystem has a :, also try ignoring parts after it.\n if (affected_package.package.ecosystem != ecosystem and\n ecosystems.normalize(\n affected_package.package.ecosystem) != ecosystem):\n continue\n\n if purl and not (affected_package.package.purl and _match_purl(\n purl, PackageURL.from_string(affected_package.package.purl))):\n continue\n\n if normalize:\n if any(\n osv.normalize_tag(version) == osv.normalize_tag(v)\n for v in affected_package.versions):\n return True\n else:\n if version in affected_package.versions:\n return True\n\n return False\n\n\[email protected]\ndef _query_by_semver(query, package_name, ecosystem, purl: PackageURL, version):\n \"\"\"Query by semver.\"\"\"\n if not semver_index.is_valid(version):\n return []\n\n results = []\n query = query.filter(\n osv.Bug.semver_fixed_indexes > semver_index.normalize(version))\n it = query.iter()\n\n while (yield it.has_next_async()):\n bug = it.next()\n if _is_semver_affected(bug.affected_packages, package_name, ecosystem, purl,\n version):\n results.append(bug)\n\n return results\n\n\[email protected]\ndef _query_by_generic_version(base_query, project, ecosystem, purl: PackageURL,\n version):\n \"\"\"Query by generic version.\"\"\"\n # Try without normalizing.\n results = []\n query = base_query.filter(osv.Bug.affected_fuzzy == version)\n it = query.iter()\n while (yield it.has_next_async()):\n bug = it.next()\n if _is_version_affected(bug.affected_packages, project, ecosystem, purl,\n version):\n results.append(bug)\n\n if results:\n return results\n\n # Try again after normalizing.\n version = osv.normalize_tag(version)\n query = base_query.filter(osv.Bug.affected_fuzzy == version)\n it = query.iter()\n while (yield it.has_next_async()):\n bug = it.next()\n if _is_version_affected(\n bug.affected_packages,\n project,\n ecosystem,\n purl,\n version,\n normalize=True):\n results.append(bug)\n\n return results\n\n\[email protected]\ndef query_by_version(project: str,\n ecosystem: str,\n purl: PackageURL,\n version,\n to_response=bug_to_response):\n \"\"\"Query by (fuzzy) version.\"\"\"\n ecosystem_info = ecosystems.get(ecosystem)\n is_semver = ecosystem_info and ecosystem_info.is_semver\n if project:\n query = osv.Bug.query(osv.Bug.status == osv.BugStatus.PROCESSED,\n osv.Bug.project == project, osv.Bug.public == True) # pylint: disable=singleton-comparison\n elif purl:\n query = osv.Bug.query(osv.Bug.status == osv.BugStatus.PROCESSED,\n osv.Bug.purl == purl.to_string(),\n osv.Bug.public == True) # pylint: disable=singleton-comparison\n else:\n return []\n\n if ecosystem:\n query = query.filter(osv.Bug.ecosystem == ecosystem)\n\n bugs = []\n if ecosystem:\n if is_semver:\n # Ecosystem supports semver only.\n bugs.extend((yield _query_by_semver(query, project, ecosystem, purl,\n version)))\n else:\n bugs.extend((yield _query_by_generic_version(query, project, ecosystem,\n purl, version)))\n else:\n # Unspecified ecosystem. Try both.\n bugs.extend((yield _query_by_semver(query, project, ecosystem, purl,\n version)))\n bugs.extend((yield _query_by_generic_version(query, project, ecosystem,\n purl, version)))\n\n return [to_response(bug) for bug in bugs]\n\n\[email protected]\ndef query_by_package(project, ecosystem, purl: PackageURL, page_token,\n to_response):\n \"\"\"Query by package.\"\"\"\n bugs = []\n if project and ecosystem:\n query = osv.Bug.query(osv.Bug.status == osv.BugStatus.PROCESSED,\n osv.Bug.project == project,\n osv.Bug.ecosystem == ecosystem,\n osv.Bug.public == True) # pylint: disable=singleton-comparison\n elif purl:\n query = osv.Bug.query(osv.Bug.status == osv.BugStatus.PROCESSED,\n osv.Bug.purl == purl.to_string(),\n osv.Bug.public == True) # pylint: disable=singleton-comparison\n else:\n return []\n\n # Set limit to the max + 1, as otherwise we can't detect if there are any\n # more left.\n it = query.iter(\n start_cursor=page_token, limit=_MAX_VULNERABILITIES_LISTED + 1)\n cursor = None\n while (yield it.has_next_async()):\n if len(bugs) >= _MAX_VULNERABILITIES_LISTED:\n cursor = it.cursor_after()\n break\n\n bugs.append(it.next())\n\n return [to_response(bug) for bug in bugs], cursor\n\n\ndef serve(port: int, local: bool):\n \"\"\"Configures and runs the bookstore API server.\"\"\"\n server = grpc.server(concurrent.futures.ThreadPoolExecutor(max_workers=10))\n osv_service_v1_pb2_grpc.add_OSVServicer_to_server(OSVServicer(), server)\n if local:\n service_names = (\n osv_service_v1_pb2.DESCRIPTOR.services_by_name['OSV'].full_name,\n reflection.SERVICE_NAME,\n )\n reflection.enable_server_reflection(service_names, server)\n server.add_insecure_port('[::]:{}'.format(port))\n server.start()\n\n print('Listening on port {}'.format(port))\n try:\n while True:\n time.sleep(3600)\n except KeyboardInterrupt:\n server.stop(_SHUTDOWN_GRACE_DURATION)\n\n\ndef main():\n \"\"\"Entrypoint.\"\"\"\n logging.basicConfig(stream=sys.stderr)\n logging.getLogger().setLevel(logging.INFO)\n\n parser = argparse.ArgumentParser(\n formatter_class=argparse.RawDescriptionHelpFormatter)\n parser.add_argument(\n '--port',\n type=int,\n default=None,\n help='The port to listen on.'\n 'If arg is not set, will listen on the $PORT env var.'\n 'If env var is empty, defaults to 8000.')\n parser.add_argument(\n '--local',\n action='store_true',\n default=False,\n help='If set reflection is enabled to allow debugging with grpcurl.')\n\n args = parser.parse_args()\n port = args.port\n if not port:\n port = os.environ.get('PORT')\n if not port:\n port = 8000\n\n serve(port, args.local)\n\n\nif __name__ == '__main__':\n main()\n", "path": "gcp/api/server.py" } ]
diff --git a/gcp/api/integration_tests.py b/gcp/api/integration_tests.py index 0752981657f..31b087d6b47 100644 --- a/gcp/api/integration_tests.py +++ b/gcp/api/integration_tests.py @@ -320,6 +320,22 @@ def test_query_semver_multiple_package(self): self.assertCountEqual(['GO-2021-0061', 'GO-2020-0036'], [vuln['id'] for vuln in response_json['vulns']]) + response = requests.post( + _api() + '/v1/query', + data=json.dumps({ + 'version': '7.1.1', + 'package': { + 'name': 'ws', + 'ecosystem': 'npm', + } + }), + timeout=_TIMEOUT) + + response_json = response.json() + self.assertEqual(1, len(response_json['vulns'])) + self.assertCountEqual(['GHSA-6fc8-4gx4-v693'], + [vuln['id'] for vuln in response_json['vulns']]) + def test_query_purl(self): """Test querying by PURL.""" expected = [ diff --git a/gcp/api/server.py b/gcp/api/server.py index 2f51f13f581..ab63794429f 100644 --- a/gcp/api/server.py +++ b/gcp/api/server.py @@ -363,6 +363,9 @@ def _is_semver_affected(affected_packages, package_name, ecosystem, event.value): affected = False + if affected: + return affected + return affected
django-haystack__django-haystack-1375
Limit django versions in setup.py Since the currently released version of haystack is incompatible with django 1.9 people have to manually install django 1.8 it would be nice if pip would handle this automatically. The same problem will probably also arise when django 1.10 is released. For the next release please limit django versions to >= 1.8 and < 1.10 I'm not sure when you're planning a new release that supports 1.9. But if it's still a while, can you please release a new version where you just limit the django version?
[ { "content": "#!/usr/bin/env python\n# encoding: utf-8\n\n# n.b. we can't have unicode_literals here due to http://bugs.python.org/setuptools/issue152\nfrom __future__ import absolute_import, division, print_function\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from ez_setup import use_setuptools\n use_setuptools()\n from setuptools import setup\n\ninstall_requires = [\n 'Django',\n]\n\ntests_require = [\n 'elasticsearch>=1.0.0,<2.0.0',\n 'pysolr>=3.3.2',\n 'whoosh>=2.5.4,<3.0',\n 'python-dateutil',\n 'geopy==0.95.1',\n\n 'nose',\n 'mock',\n 'coverage',\n]\n\nsetup(\n name='django-haystack',\n version='2.5.dev1',\n description='Pluggable search for Django.',\n author='Daniel Lindsley',\n author_email='[email protected]',\n long_description=open('README.rst', 'r').read(),\n url='http://haystacksearch.org/',\n packages=[\n 'haystack',\n 'haystack.backends',\n 'haystack.management',\n 'haystack.management.commands',\n 'haystack.templatetags',\n 'haystack.utils',\n ],\n package_data={\n 'haystack': [\n 'templates/panels/*',\n 'templates/search_configuration/*',\n ]\n },\n classifiers=[\n 'Development Status :: 5 - Production/Stable',\n 'Environment :: Web Environment',\n 'Framework :: Django',\n 'Intended Audience :: Developers',\n 'License :: OSI Approved :: BSD License',\n 'Operating System :: OS Independent',\n 'Programming Language :: Python',\n 'Programming Language :: Python :: 2',\n 'Programming Language :: Python :: 3',\n 'Topic :: Utilities',\n ],\n zip_safe=False,\n install_requires=install_requires,\n tests_require=tests_require,\n test_suite=\"test_haystack.run_tests.run_all\",\n)\n", "path": "setup.py" } ]
[ { "content": "#!/usr/bin/env python\n# encoding: utf-8\n\n# n.b. we can't have unicode_literals here due to http://bugs.python.org/setuptools/issue152\nfrom __future__ import absolute_import, division, print_function\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from ez_setup import use_setuptools\n use_setuptools()\n from setuptools import setup\n\ninstall_requires = [\n 'Django>=1.8',\n 'Django<1.10',\n]\n\ntests_require = [\n 'elasticsearch>=1.0.0,<2.0.0',\n 'pysolr>=3.3.2',\n 'whoosh>=2.5.4,<3.0',\n 'python-dateutil',\n 'geopy==0.95.1',\n\n 'nose',\n 'mock',\n 'coverage',\n]\n\nsetup(\n name='django-haystack',\n version='2.5.dev1',\n description='Pluggable search for Django.',\n author='Daniel Lindsley',\n author_email='[email protected]',\n long_description=open('README.rst', 'r').read(),\n url='http://haystacksearch.org/',\n packages=[\n 'haystack',\n 'haystack.backends',\n 'haystack.management',\n 'haystack.management.commands',\n 'haystack.templatetags',\n 'haystack.utils',\n ],\n package_data={\n 'haystack': [\n 'templates/panels/*',\n 'templates/search_configuration/*',\n ]\n },\n classifiers=[\n 'Development Status :: 5 - Production/Stable',\n 'Environment :: Web Environment',\n 'Framework :: Django',\n 'Intended Audience :: Developers',\n 'License :: OSI Approved :: BSD License',\n 'Operating System :: OS Independent',\n 'Programming Language :: Python',\n 'Programming Language :: Python :: 2',\n 'Programming Language :: Python :: 3',\n 'Topic :: Utilities',\n ],\n zip_safe=False,\n install_requires=install_requires,\n tests_require=tests_require,\n test_suite=\"test_haystack.run_tests.run_all\",\n)\n", "path": "setup.py" } ]
diff --git a/setup.py b/setup.py index fe240e9a8..b7afeb7a4 100755 --- a/setup.py +++ b/setup.py @@ -12,7 +12,8 @@ from setuptools import setup install_requires = [ - 'Django', + 'Django>=1.8', + 'Django<1.10', ] tests_require = [
d2l-ai__d2l-en-2078
[MXNet] matplotlib >=3.5 raises TypeError with ax.plot_wireframe in MXNet ndarray With the latest version of matplotlib, multiple notebooks fail with a type error in mxnet (mxnet==1.7.0 & CUDA 10.2). Some of the affected sections include [optimization intro](https://d2l.ai/chapter_optimization/optimization-intro.html), [integral calculus](https://d2l.ai/chapter_appendix-mathematics-for-deep-learning/integral-calculus.html), [multivariable calculus](https://d2l.ai/chapter_appendix-mathematics-for-deep-learning/multivariable-calculus.html) etc. ``` TypeError: no implementation found for 'numpy.column_stack' on types that implement __array_function__: [<class 'mxnet.numpy.ndarray'>, <class 'numpy.ndarray'>] ``` Please see attached traceback and reproduction instructions below. Steps to reproduce the issue. 1. Setup the d2l environment (using `static/build.yml`) 2. While setting up the environment, it will automatically install the latest version of matplotlib (i.e. `matplotlib==3.5.1` as of today). Run one of the notebooks which is affected (mentioned above) <details> <summary>Click to expand: Error Traceback</summary> ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Input In [7], in <module> 9 # Plot function 10 ax = d2l.plt.figure().add_subplot(111, projection='3d') ---> 11 ax.plot_wireframe(x, y, z, **{'rstride': 10, 'cstride': 10}) 12 ax.plot_wireframe(x, y, w, **{'rstride': 10, 'cstride': 10}, color='purple') 13 d2l.plt.xlabel('x') File ~/miniconda3/envs/mpl_d2l/lib/python3.8/site-packages/matplotlib/_api/deprecation.py:412, in delete_parameter.<locals>.wrapper(*inner_args, **inner_kwargs) 402 deprecation_addendum = ( 403 f"If any parameter follows {name!r}, they should be passed as " 404 f"keyword, not positionally.") 405 warn_deprecated( 406 since, 407 name=repr(name), (...) 410 else deprecation_addendum, 411 **kwargs) --> 412 return func(*inner_args, **inner_kwargs) File ~/miniconda3/envs/mpl_d2l/lib/python3.8/site-packages/mpl_toolkits/mplot3d/axes3d.py:1908, in Axes3D.plot_wireframe(self, X, Y, Z, *args, **kwargs) 1906 linec = art3d.Line3DCollection(lines, *args, **kwargs) 1907 self.add_collection(linec) -> 1908 self.auto_scale_xyz(X, Y, Z, had_data) 1910 return linec File ~/miniconda3/envs/mpl_d2l/lib/python3.8/site-packages/mpl_toolkits/mplot3d/axes3d.py:658, in Axes3D.auto_scale_xyz(self, X, Y, Z, had_data) 656 self.xy_dataLim.update_from_data_y(Y, not had_data) 657 if Z is not None: --> 658 self.zz_dataLim.update_from_data_x(Z, not had_data) 659 # Let autoscale_view figure out how to use this data. 660 self.autoscale_view() File ~/miniconda3/envs/mpl_d2l/lib/python3.8/site-packages/matplotlib/transforms.py:922, in Bbox.update_from_data_x(self, x, ignore) 906 """ 907 Update the x-bounds of the `Bbox` based on the passed in data. After 908 updating, the bounds will have positive *width*, and *x0* will be the (...) 919 - When ``None``, use the last value passed to :meth:`ignore`. 920 """ 921 x = np.ravel(x) --> 922 self.update_from_data_xy(np.column_stack([x, np.ones(x.size)]), 923 ignore=ignore, updatey=False) File <__array_function__ internals>:180, in column_stack(*args, **kwargs) TypeError: no implementation found for 'numpy.column_stack' on types that implement __array_function__: [<class 'mxnet.numpy.ndarray'>, <class 'numpy.ndarray'>] ``` </details> This is another issue validating the need of #2044. A simple solution for now is to pin the matplotlib version to 1.4. I'll send a PR for this. cc @astonzhang
[ { "content": "from setuptools import setup, find_packages\nimport d2l\n\nrequirements = [\n 'jupyter',\n 'numpy',\n 'matplotlib==3.4',\n 'requests',\n 'pandas',\n 'gym'\n]\n\nsetup(\n name='d2l',\n version=d2l.__version__,\n python_requires='>=3.5',\n author='D2L Developers',\n author_email='[email protected]',\n url='https://d2l.ai',\n description='Dive into Deep Learning',\n license='MIT-0',\n packages=find_packages(),\n zip_safe=True,\n install_requires=requirements,\n)\n", "path": "setup.py" } ]
[ { "content": "from setuptools import setup, find_packages\nimport d2l\n\nrequirements = [\n 'jupyter',\n 'numpy',\n 'matplotlib',\n 'requests',\n 'pandas',\n 'gym'\n]\n\nsetup(\n name='d2l',\n version=d2l.__version__,\n python_requires='>=3.5',\n author='D2L Developers',\n author_email='[email protected]',\n url='https://d2l.ai',\n description='Dive into Deep Learning',\n license='MIT-0',\n packages=find_packages(),\n zip_safe=True,\n install_requires=requirements,\n)\n", "path": "setup.py" } ]
diff --git a/chapter_appendix-mathematics-for-deep-learning/integral-calculus.md b/chapter_appendix-mathematics-for-deep-learning/integral-calculus.md index 128efe816d..ddef4ef097 100644 --- a/chapter_appendix-mathematics-for-deep-learning/integral-calculus.md +++ b/chapter_appendix-mathematics-for-deep-learning/integral-calculus.md @@ -352,7 +352,7 @@ z = np.exp(- x**2 - y**2) # Plot function ax = d2l.plt.figure().add_subplot(111, projection='3d') -ax.plot_wireframe(x, y, z) +ax.plot_wireframe(x.asnumpy(), y.asnumpy(), z.asnumpy()) d2l.plt.xlabel('x') d2l.plt.ylabel('y') d2l.plt.xticks([-2, -1, 0, 1, 2]) diff --git a/chapter_appendix-mathematics-for-deep-learning/multivariable-calculus.md b/chapter_appendix-mathematics-for-deep-learning/multivariable-calculus.md index 4123d7096b..7c93154bf3 100644 --- a/chapter_appendix-mathematics-for-deep-learning/multivariable-calculus.md +++ b/chapter_appendix-mathematics-for-deep-learning/multivariable-calculus.md @@ -553,8 +553,10 @@ w = np.exp(-1)*(-1 - (x + 1) + (x + 1)**2 + y**2) # Plot function ax = d2l.plt.figure().add_subplot(111, projection='3d') -ax.plot_wireframe(x, y, z, **{'rstride': 10, 'cstride': 10}) -ax.plot_wireframe(x, y, w, **{'rstride': 10, 'cstride': 10}, color='purple') +ax.plot_wireframe(x.asnumpy(), y.asnumpy(), z.asnumpy(), + **{'rstride': 10, 'cstride': 10}) +ax.plot_wireframe(x.asnumpy(), y.asnumpy(), w.asnumpy(), + **{'rstride': 10, 'cstride': 10}, color='purple') d2l.plt.xlabel('x') d2l.plt.ylabel('y') d2l.set_figsize() diff --git a/chapter_linear-networks/linear-regression.md b/chapter_linear-networks/linear-regression.md index e415bb37df..50d9cf717e 100644 --- a/chapter_linear-networks/linear-regression.md +++ b/chapter_linear-networks/linear-regression.md @@ -391,7 +391,7 @@ rather than writing costly for-loops in Python.**) %matplotlib inline from d2l import mxnet as d2l import math -import numpy as np +from mxnet import np import time ``` @@ -507,7 +507,19 @@ def normal(x, mu, sigma): We can now (**visualize the normal distributions**). ```{.python .input n=8} -%%tab all +%%tab mxnet +# Use numpy again for visualization +x = np.arange(-7, 7, 0.01) + +# Mean and standard deviation pairs +params = [(0, 1), (0, 2), (3, 1)] +d2l.plot(x.asnumpy(), [normal(x, mu, sigma).asnumpy() for mu, sigma in params], xlabel='x', + ylabel='p(x)', figsize=(4.5, 2.5), + legend=[f'mean {mu}, std {sigma}' for mu, sigma in params]) +``` + +```{.python .input n=8} +%%tab pytorch, tensorflow # Use numpy again for visualization x = np.arange(-7, 7, 0.01) diff --git a/chapter_optimization/optimization-intro.md b/chapter_optimization/optimization-intro.md index e8df6b59b3..9d5d890d04 100644 --- a/chapter_optimization/optimization-intro.md +++ b/chapter_optimization/optimization-intro.md @@ -150,7 +150,25 @@ annotate('saddle point', (0, -0.2), (-0.52, -5.0)) Saddle points in higher dimensions are even more insidious, as the example below shows. Consider the function $f(x, y) = x^2 - y^2$. It has its saddle point at $(0, 0)$. This is a maximum with respect to $y$ and a minimum with respect to $x$. Moreover, it *looks* like a saddle, which is where this mathematical property got its name. ```{.python .input} -#@tab all +#@tab mxnet +x, y = d2l.meshgrid( + d2l.linspace(-1.0, 1.0, 101), d2l.linspace(-1.0, 1.0, 101)) +z = x**2 - y**2 + +ax = d2l.plt.figure().add_subplot(111, projection='3d') +ax.plot_wireframe(x.asnumpy(), y.asnumpy(), z.asnumpy(), + **{'rstride': 10, 'cstride': 10}) +ax.plot([0], [0], [0], 'rx') +ticks = [-1, 0, 1] +d2l.plt.xticks(ticks) +d2l.plt.yticks(ticks) +ax.set_zticks(ticks) +d2l.plt.xlabel('x') +d2l.plt.ylabel('y'); +``` + +```{.python .input} +#@tab pytorch, tensorflow x, y = d2l.meshgrid( d2l.linspace(-1.0, 1.0, 101), d2l.linspace(-1.0, 1.0, 101)) z = x**2 - y**2 diff --git a/setup.py b/setup.py index bf088b91da..2e3dec1d41 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ requirements = [ 'jupyter', 'numpy', - 'matplotlib==3.4', + 'matplotlib', 'requests', 'pandas', 'gym'
mytardis__mytardis-582
dynamic SFTP settings page password text incorrect if SITE_TITLE not set in settings.py SITE_TITLE set to None in default_settings.py by default, which prevents the default template value for {{ site_name }} to be set to 'MyTardis'. As a result, the password information reads "Your None password" instead of "Your MyTardis password". ![screen shot 2016-01-07 at 4 27 10 pm](https://cloud.githubusercontent.com/assets/6635497/12162847/8a3fd19e-b55b-11e5-9483-7ff220e9a401.png) default_settings.py: https://github.com/mytardis/mytardis/blob/develop/tardis/default_settings.py#L109 sftp view fn: https://github.com/mytardis/mytardis/blob/develop/tardis/tardis_portal/views/pages.py#L622
[ { "content": "from datetime import timedelta\nfrom os import path\nfrom tempfile import gettempdir\n\nimport djcelery\n\n# MUST change this to False for any serious use.\nDEBUG = True\n\nADMINS = (('bob', '[email protected]'), )\n\nMANAGERS = ADMINS\n\n# Dictionary containing the settings for all databases to be used.\n# The DATABASES setting must configure a default database;\n# any number of additional databases may also be specified.\nDATABASES = {\n 'default': {\n # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n 'ENGINE': 'django.db.backends.sqlite3',\n # Name of the database to use. For SQLite, it's the full path.\n 'NAME': 'db.sqlite3',\n 'USER': '',\n 'PASSWORD': '',\n 'HOST': '',\n 'PORT': '',\n }\n}\n\n# Fix 'SQLite backend does not support timezone-aware datetimes\n# when USE_TZ is False.' error by setting USE_TZ to True\nUSE_TZ = True\n\n# Celery queue\nBROKER_URL = 'django://'\n'''\nuse django:, add kombu.transport.django to INSTALLED_APPS\nor use redis: install redis separately and add the following to a\ncustom buildout.cfg:\n django-celery-with-redis\n redis\n hiredis\n'''\n# BROKER_URL = 'redis://localhost:6379/0'\n# CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'\n\n# A dictionary containing the settings for all caches to be used with\n# Django. The CACHES setting must configure a default cache; any\n# number of additional caches may also be specified. Once the cache\n# is set up, you'll need to add\n# 'django.middleware.cache.UpdateCacheMiddleware' and\n# 'django.middleware.cache.FetchFromCacheMiddleware'\n# to your MIDDLEWARE_CLASSES setting below\n\nCACHES = {\n 'default': {\n 'BACKEND': 'django.core.cache.backends.db.DatabaseCache',\n 'LOCATION': 'default_cache',\n },\n # # or use memcached\n # 'default': {\n # 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',\n # 'LOCATION': '127.0.0.1:11211',\n # },\n 'celery-locks': {\n 'BACKEND': 'django.core.cache.backends.db.DatabaseCache',\n 'LOCATION': 'celery_lock_cache',\n }\n}\n'''\nchange the CACHES setting to memcached if you prefer. Requires additional\ndependencies.\n'''\n\n# Local time zone for this installation. Choices can be found here:\n# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name\n# although not all choices may be available on all operating systems.\n# If running in a Windows environment this must be set to the same as your\n# system time zone.\n\nTIME_ZONE = 'Australia/Melbourne'\n\n# Language code for this installation. All choices can be found here:\n# http://www.i18nguy.com/unicode/language-identifiers.html\n\nLANGUAGE_CODE = 'en-us'\n\n# Date format to use by default. (\"jS F Y\" => \"8th March 2012\")\n# https://docs.djangoproject.com/en/1.3/ref/templates/builtins/#std:templatefilter-date # noqa\n\nDATE_FORMAT = \"jS F Y\"\nDATETIME_FORMAT = \"jS F Y H:i\"\n\nSITE_ID = 1\n\n# If you set this to False, Django will make some optimizations so as not\n# to load the internationalization machinery.\n\nUSE_I18N = True\n\n# SECRET_KEY has been removed. Generate one by referring to build.sh\n\nALLOWED_HOSTS = ['*']\n'''\nFor security reasons this needs to be set to your hostname and/or IP\naddress in production.\n'''\n\nSITE_TITLE = None\n'''\ncustomise the title of your site\n'''\n\nSPONSORED_TEXT = None\n'''\nadd text to the footer to acknowledge someone\n'''\n\nMIDDLEWARE_CLASSES = (\n # 'django.middleware.cache.UpdateCacheMiddleware',\n 'django.middleware.common.CommonMiddleware',\n 'django.middleware.csrf.CsrfViewMiddleware',\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n 'tardis.tardis_portal.logging_middleware.LoggingMiddleware',\n 'django.contrib.messages.middleware.MessageMiddleware',\n 'tardis.tardis_portal.auth.token_auth.TokenAuthMiddleware',\n # 'django.middleware.cache.FetchFromCacheMiddleware',\n)\n\nROOT_URLCONF = 'tardis.urls'\n\nTEMPLATES = [\n {\n 'BACKEND': 'django.template.backends.django.DjangoTemplates',\n 'DIRS': [\n path.join(path.dirname(__file__),\n 'tardis_portal/templates/').replace('\\\\', '/'),\n ],\n 'OPTIONS': {\n 'context_processors': [\n 'django.template.context_processors.request',\n 'django.template.context_processors.static',\n 'django.contrib.auth.context_processors.auth',\n 'django.contrib.messages.context_processors.messages',\n 'django.template.context_processors.debug',\n 'django.template.context_processors.i18n',\n 'tardis.tardis_portal.context_processors'\n '.global_contexts',\n 'tardis.tardis_portal.context_processors'\n '.single_search_processor',\n 'tardis.tardis_portal.context_processors'\n '.tokenuser_processor',\n 'tardis.tardis_portal.context_processors'\n '.registration_processor',\n 'tardis.tardis_portal.context_processors'\n '.user_details_processor',\n ],\n 'loaders': [\n 'django.template.loaders.app_directories.Loader',\n 'django.template.loaders.filesystem.Loader',\n ],\n },\n }\n]\n\nSTATIC_DOC_ROOT = path.join(path.dirname(__file__),\n 'tardis_portal/site_media').replace('\\\\', '/')\n\n\ndef get_admin_media_path():\n import pkgutil\n package = pkgutil.get_loader(\"django.contrib.admin\")\n return path.join(package.filename, 'static', 'admin')\n\nADMIN_MEDIA_STATIC_DOC_ROOT = get_admin_media_path()\n\n# FILE_STORE_PATH = path.abspath(path.join(path.dirname(__file__),\n# '../var/store/')).replace('\\\\', '/')\nSTAGING_PATH = path.abspath(path.join(path.dirname(__file__),\n '../var/staging/')).replace('\\\\', '/')\n# SYNC_TEMP_PATH = path.abspath(path.join(path.dirname(__file__),\n# '../var/sync/')).replace('\\\\', '/')\n\nDEFAULT_STORAGE_BASE_DIR = path.abspath(path.join(path.dirname(__file__),\n '../var/store/')).replace('\\\\', '/')\n\n# LEGACY, ignore\nFILE_STORE_PATH = DEFAULT_STORAGE_BASE_DIR\nINITIAL_LOCATIONS = {}\n\nMETADATA_STORE_PATH = DEFAULT_STORAGE_BASE_DIR\n'''\nstorage path for image paths stored in parameters. Better to set to another\nlocation if possible\n'''\n\nSTAGING_PROTOCOL = 'ldap'\nSTAGING_MOUNT_PREFIX = 'smb://localhost/staging/'\nSTAGING_MOUNT_USER_SUFFIX_ENABLE = False\n\nREQUIRE_DATAFILE_CHECKSUMS = True\nREQUIRE_DATAFILE_SIZES = True\nREQUIRE_VALIDATION_ON_INGESTION = True\n\nDEFAULT_FILE_STORAGE = \\\n 'tardis.tardis_portal.storage.MyTardisLocalFileSystemStorage'\n\n# Absolute path to the directory that holds media.\n# Example: \"/home/media/media.lawrence.com/\"\nMEDIA_ROOT = DEFAULT_STORAGE_BASE_DIR\n\n# URL that handles the media served from MEDIA_ROOT. Make sure to use a\n# trailing slash if there is a path component (optional in other cases).\n# Examples: \"http://media.lawrence.com\", \"http://example.com/media/\"\nMEDIA_URL = None\n\n# Static content location\nSTATIC_URL = '/static/'\n\n# Used by \"django collectstatic\"\nSTATIC_ROOT = path.abspath(path.join(path.dirname(__file__), '..', 'static'))\n\n# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a\n# trailing slash.\n# Examples: \"http://foo.com/media/\", \"/media/\".\n# ADMIN_MEDIA_PREFIX = STATIC_URL + '/admin/'\n\nSTATICFILES_DIRS = (\n ('admin', ADMIN_MEDIA_STATIC_DOC_ROOT),\n)\n\n# Use cachable copies of static files\nSTATICFILES_STORAGE = \\\n 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'\n\n# A tuple of strings designating all applications that are enabled in\n# this Django installation.\nTARDIS_APP_ROOT = 'tardis.apps'\nINSTALLED_APPS = (\n 'django_extensions',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.sites',\n 'django.contrib.staticfiles',\n 'django.contrib.admin',\n 'django.contrib.admindocs',\n 'django.contrib.humanize',\n 'registration',\n 'django_jasmine',\n 'djcelery',\n 'kombu.transport.django',\n 'bootstrapform',\n 'mustachejs',\n 'tastypie',\n 'tastypie_swagger',\n 'tardis.tardis_portal',\n 'tardis.tardis_portal.templatetags',\n 'tardis.search',\n # these optional apps, may require extra settings\n 'tardis.apps.publication_forms',\n 'tardis.apps.oaipmh',\n # 'tardis.apps.push_to',\n)\n\n# Here you can define any custom view overrides provided by apps.\n# Index page overrides are associated with a Django 'Site', specified\n# by SITE_ID (an integer) or the domain name of the incoming request.\n# Overriding index views are encouraged to subclass\n# tardis.tardis_portal.views.pages.IndexView. However, in order to reference\n# this class-based view from settings you need to create a wrapper function\n# which returns MySubclassedView.as_view() (since class-based views cannot\n# be referenced by module path strings like traditional view functions).\n# eg\n# def my_custom_index_wrapper(request, *args, **kwargs):\n# from tardis.tardis_portal.views.pages import class_to_view\n# return class_to_view(MySubclassedView, request, *args, **kwargs):\n#\n# Dataset and Experiment view overrides are mapped via a Schema\n# namespace.\n#\n# INDEX_VIEWS = {\n# 1: 'tardis.apps.my_custom_app.views.my_custom_index_wrapper',\n# 'store.example.com': 'tardis.apps.myapp.my_custom_index_wrapper'\n# }\n#\n# DATASET_VIEWS = [\n# ('http://www.tardis.edu.au/schemas/dataset/my_example_schema',\n# 'tardis.apps.my_custom_app.views.dataset_view_wrapper_fn'),\n# ]\n#\n# EXPERIMENT_VIEWS = [\n# ('http://www.tardis.edu.au/schemas/expt/my_example_schema',\n# 'tardis.apps.my_custom_app.views.expt_view_wrapper_fn'),\n# ]\n\nJASMINE_TEST_DIRECTORY = path.abspath(path.join(path.dirname(__file__),\n 'tardis_portal',\n 'tests',\n 'jasmine'))\n\n\nUSER_PROVIDERS = (\n 'tardis.tardis_portal.auth.localdb_auth.DjangoUserProvider',\n)\n\nGROUP_PROVIDERS = (\n 'tardis.tardis_portal.auth.localdb_auth.DjangoGroupProvider',\n 'tardis.tardis_portal.auth.token_auth.TokenGroupProvider',\n)\n\n# AUTH_PROVIDERS entry format:\n# ('name', 'display name', 'backend implementation')\n# name - used as the key for the entry\n# display name - used as the displayed value in the login form\n# backend implementation points to the actual backend implementation\n#\n# In most cases, the backend implementation should be a fully\n# qualified class name string, whose class can be instantiated without\n# any arguments. For LDAP authentication, the\n# 'tardis.tardis_portal.auth.ldap_auth.LDAPBackend'\n# class can't be instantiated without any arguments, so the\n# 'tardis.tardis_portal.auth.ldap_auth.ldap_auth'\n# wrapper function should be used instead.\n#\n# We will assume that localdb will always be a default AUTH_PROVIDERS entry\n\nAUTH_PROVIDERS = (\n ('localdb', 'Local DB',\n 'tardis.tardis_portal.auth.localdb_auth.DjangoAuthBackend'),\n)\n\n# default authentication module for experiment ownership user during\n# ingestion? Must be one of the above authentication provider names\nDEFAULT_AUTH = 'localdb'\n\nAUTH_PROFILE_MODULE = 'tardis_portal.UserProfile'\n\n# New users are added to these groups by default.\nNEW_USER_INITIAL_GROUPS = []\n\nACCOUNT_ACTIVATION_DAYS = 3\n\nAUTHENTICATION_BACKENDS = (\n 'django.contrib.auth.backends.ModelBackend',\n 'tardis.tardis_portal.auth.authorisation.ACLAwareBackend',\n)\n\n# Email Configuration\n\nEMAIL_PORT = 587\n\nEMAIL_HOST = 'smtp.gmail.com'\n\nEMAIL_HOST_USER = '[email protected]'\n\nEMAIL_HOST_PASSWORD = 'bob'\n\nEMAIL_USE_TLS = True\n\n# Post Save Filters\n# POST_SAVE_FILTERS = [\n# (\"tardis.tardis_portal.filters.exif.make_filter\",\n# [\"EXIF\", \"http://exif.schema\"]), # this filter requires pyexiv2\n# # http://tilloy.net/dev/pyexiv2/\n# ]\n\n# Post Save Filters\n# POST_SAVE_FILTERS = [\n# (\"tardis.tardis_portal.filters.diffractionimage.make_filter\",\n# [\"DIFFRACTION\", \"http://www.tardis.edu.au/schemas/trdDatafile/1\",\n# \"/Users/steve/Desktop/diffdump\"]), # requires ccp4 diffdump binary\n# ]\n\n# logging levels are: DEBUG, INFO, WARN, ERROR, CRITICAL\nSYSTEM_LOG_LEVEL = 'INFO'\nMODULE_LOG_LEVEL = 'INFO'\n\nSYSTEM_LOG_FILENAME = 'request.log'\nMODULE_LOG_FILENAME = 'tardis.log'\n\n# Rollover occurs whenever the current log file is nearly maxBytes in length;\n# if maxBytes is zero, rollover never occurs\nSYSTEM_LOG_MAXBYTES = 0\nMODULE_LOG_MAXBYTES = 0\n\n# Uploadify root folder path, relative to STATIC root\nUPLOADIFY_PATH = '%s/%s' % (STATIC_URL, 'js/lib/uploadify')\n\n# Upload path that files are sent to\nUPLOADIFY_UPLOAD_PATH = '%s/%s' % (MEDIA_URL, 'uploads')\n\n# Download size limit: zero means no limit\nDOWNLOAD_ARCHIVE_SIZE_LIMIT = 0\n\n# Render image file size limit: zero means no limit\nRENDER_IMAGE_SIZE_LIMIT = 0\n\n# temporary download file location\nDOWNLOAD_TEMP_DIR = gettempdir()\n\n# Safety margin for temporary space when downloading. (Estimated archive\n# file size + safety_margin must be less that available disk space ...)\nDOWNLOAD_SPACE_SAFETY_MARGIN = 8388608\n\n# Disable registration (copy to your settings.py first!)\n# INSTALLED_APPS = filter(lambda x: x != 'registration', INSTALLED_APPS)\n\n# Settings for the single search box\nSINGLE_SEARCH_ENABLED = False\n# flip this to turn on search:\nif SINGLE_SEARCH_ENABLED:\n HAYSTACK_CONNECTIONS = {\n 'default': {\n 'ENGINE': 'haystack.backends.elasticsearch_backend.'\n 'ElasticsearchSearchEngine',\n 'URL': 'http://127.0.0.1:9200/',\n 'INDEX_NAME': 'haystack',\n },\n }\nelse:\n HAYSTACK_CONNECTIONS = {\n 'default': {\n 'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',\n },\n }\nif SINGLE_SEARCH_ENABLED:\n INSTALLED_APPS = INSTALLED_APPS + ('haystack',)\nHAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'\n\nDEFAULT_INSTITUTION = \"Monash University\"\n\nTOKEN_EXPIRY_DAYS = 30\nTOKEN_LENGTH = 30\nTOKEN_USERNAME = 'tokenuser'\n\nREQUIRE_VALID_PUBLIC_CONTACTS = True\n\n# RIF-CS Settings\nOAI_DOCS_PATH = path.abspath(path.join(path.dirname(__file__), '../var/oai'))\nRIFCS_PROVIDERS = (\n 'tardis.tardis_portal.publish.provider.rifcsprovider.RifCsProvider',)\nRIFCS_TEMPLATE_DIR = path.join(\n path.dirname(__file__),\n 'tardis_portal/templates/tardis_portal/rif-cs/profiles/')\nRIFCS_GROUP = \"MyTARDIS Default Group\"\nRIFCS_KEY = \"keydomain.example\"\nRELATED_INFO_SCHEMA_NAMESPACE = \\\n 'http://www.tardis.edu.au/schemas/related_info/2011/11/10'\nRELATED_OTHER_INFO_SCHEMA_NAMESPACE = \\\n 'http://www.tardis.edu.au/schemas/experiment/annotation/2011/07/07'\n\nDOI_ENABLE = False\nDOI_XML_PROVIDER = 'tardis.tardis_portal.ands_doi.DOIXMLProvider'\n# DOI_TEMPLATE_DIR = path.join(\n# TARDIS_DIR, 'tardis_portal/templates/tardis_portal/doi/')\nDOI_TEMPLATE_DIR = path.join('tardis_portal/doi/')\nDOI_APP_ID = ''\nDOI_NAMESPACE = 'http://www.tardis.edu.au/schemas/doi/2011/12/07'\nDOI_MINT_URL = 'https://services.ands.org.au/home/dois/doi_mint.php'\nDOI_RELATED_INFO_ENABLE = False\nDOI_BASE_URL = 'http://mytardis.example.com'\n\nOAIPMH_PROVIDERS = [\n 'tardis.apps.oaipmh.provider.experiment.DcExperimentProvider',\n 'tardis.apps.oaipmh.provider.experiment.RifCsExperimentProvider',\n]\n\nREDIS_VERIFY_MANAGER = False\n'''\nUses REDIS to keep track of files that fail to verify\n'''\nREDIS_VERIFY_MANAGER_SETUP = {\n 'host': 'localhost',\n 'port': 6379,\n 'db': 1,\n}\n\nREDIS_VERIFY_DELAY = 86400 # 1 day = 86400\n'''\ndelay between verification attempts in seconds\n'''\n\nCELERYBEAT_SCHEDULE = {\n \"verify-files\": {\n \"task\": \"tardis_portal.verify_dfos\",\n \"schedule\": timedelta(seconds=300)\n },\n # enable this task for the publication workflow\n # \"update-publication-records\": {\n # \"task\": \"apps.publication_forms.update_publication_records\",\n # \"schedule\": timedelta(seconds=300)\n # },\n}\n\ndjcelery.setup_loader()\n\n# DEFAULT_LOCATION = \"local\"\n\n# INITIAL_LOCATIONS = [{'name': DEFAULT_LOCATION,\n# 'url': 'file://' + FILE_STORE_PATH,\n# 'provider': 'local',\n# 'type': 'online',\n# 'priority': 10},\n# # {'name': 'sync',\n# # 'url': 'file://' + SYNC_PATH,\n# # 'provider': 'local',\n# # 'type': 'external',\n# # 'priority': 8},\n# {'name': 'staging',\n# 'provider': 'local',\n# 'url': 'file://' + STAGING_PATH,\n# 'type': 'external',\n# 'priority': 5}]\n\nDEFAULT_MIGRATION_DESTINATION = 'unknown'\n\nTRANSFER_PROVIDERS = {\n 'http': 'tardis.tardis_portal.transfer.SimpleHttpTransfer',\n 'dav': 'tardis.tardis_portal.transfer.WebDAVTransfer',\n 'local': 'tardis.tardis_portal.transfer.LocalTransfer'}\n\nUPLOAD_METHOD = False\n'''\nOld version: UPLOAD_METHOD = \"uploadify\".\nThis can be changed to an app that provides an upload_button function,\neg. \"tardis.apps.filepicker.views.upload_button\" to use a fancy\ncommercial uploader.\nTo use filepicker, please also get an API key at http://filepicker.io\n'''\n# FILEPICKER_API_KEY = \"YOUR KEY\"\n\nARCHIVE_FILE_MAPPERS = {\n 'deep-storage': (\n 'tardis.apps.deep_storage_download_mapper.mapper.deep_storage_mapper',\n ),\n}\n\n# Site's default archive organization (i.e. path structure)\nDEFAULT_ARCHIVE_ORGANIZATION = 'deep-storage'\n\nDEFAULT_ARCHIVE_FORMATS = ['tar']\n'''\nSite's preferred archive types, with the most preferred first\nother available option: 'tgz'. Add to list if desired\n'''\n\n# DEEP_DATASET_STORAGE = True\n# '''\n# Set to true if you want to preserve folder structure on \"stage_file\" ingest,\n# eg. via the METS importer.\n# Currently, only tested for the METS importer.\n# '''\n\n\n# Get version from git to be displayed on About page.\ndef get_git_version():\n repo_dir = path.dirname(path.dirname(path.abspath(__file__)))\n\n def run_git(args):\n import subprocess\n process = subprocess.Popen('git %s' % args,\n stdout=subprocess.PIPE,\n stderr=subprocess.PIPE,\n shell=True,\n cwd=repo_dir,\n universal_newlines=True)\n return process.communicate()[0]\n\n try:\n info = {\n 'commit_id': run_git(\"log -1 --format='%H'\").strip(),\n 'date': run_git(\"log -1 --format='%cd' --date=rfc\").strip(),\n 'branch': run_git(\"rev-parse --abbrev-ref HEAD\").strip(),\n 'tag': run_git(\"describe --abbrev=0 --tags\").strip(),\n }\n except Exception:\n return [\"unavailable\"]\n return info\n\nMYTARDIS_VERSION = get_git_version()\n# If you want enable user agent sensing, copy this to settings.py\n# and uncomment it.\n#\n# USER_AGENT_SENSING = True\n# if USER_AGENT_SENSING:\n# from os import environ\n# # Workaround for bug in ua_parser ... can't find its builtin copy\n# # of regexes.yaml ... in versions 0.3.2 and earlier. Remove when fixed.\n# environ['UA_PARSER_YAML'] = '/opt/mytardis/current/ua_parser_regexes.yaml'\n#\n# INSTALLED_APPS = INSTALLED_APPS + ('django_user_agents',)\n# MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + \\\n# ('django_user_agents.middleware.UserAgentMiddleware',)\n\nAUTOGENERATE_API_KEY = False\n'''\nGenerate a tastypie API key with user post_save\n(tardis/tardis_portal/models/hooks.py)\n'''\n\nBLEACH_ALLOWED_TAGS = [\n 'a',\n 'abbr',\n 'acronym',\n 'b',\n 'blockquote',\n 'code',\n 'em',\n 'i',\n 'li',\n 'ol',\n 'strong',\n 'ul',\n]\n'''\nThese are the default bleach values and shown here as an example.\n'''\n\nBLEACH_ALLOWED_ATTRIBUTES = {\n 'a': ['href', 'title'],\n 'abbr': ['title'],\n 'acronym': ['title'],\n}\n'''\nThese are the default bleach values and shown here as an example.\n'''\n\nSFTP_PORT = 2200\nSFTP_GEVENT = False\nSFTP_HOST_KEY = (\n \"-----BEGIN RSA PRIVATE KEY-----\\n\"\n \"MIICXgIBAAKCAIEAl7sAF0x2O/HwLhG68b1uG8KHSOTqe3Cdlj5i/1RhO7E2BJ4B\\n\"\n \"3jhKYDYtupRnMFbpu7fb21A24w3Y3W5gXzywBxR6dP2HgiSDVecoDg2uSYPjnlDk\\n\"\n \"HrRuviSBG3XpJ/awn1DObxRIvJP4/sCqcMY8Ro/3qfmid5WmMpdCZ3EBeC0CAwEA\\n\"\n \"AQKCAIBSGefUs5UOnr190C49/GiGMN6PPP78SFWdJKjgzEHI0P0PxofwPLlSEj7w\\n\"\n \"RLkJWR4kazpWE7N/bNC6EK2pGueMN9Ag2GxdIRC5r1y8pdYbAkuFFwq9Tqa6j5B0\\n\"\n \"GkkwEhrcFNBGx8UfzHESXe/uE16F+e8l6xBMcXLMJVo9Xjui6QJBAL9MsJEx93iO\\n\"\n \"zwjoRpSNzWyZFhiHbcGJ0NahWzc3wASRU6L9M3JZ1VkabRuWwKNuEzEHNK8cLbRl\\n\"\n \"TyH0mceWXcsCQQDLDEuWcOeoDteEpNhVJFkXJJfwZ4Rlxu42MDsQQ/paJCjt2ONU\\n\"\n \"WBn/P6iYDTvxrt/8+CtLfYc+QQkrTnKn3cLnAkEAk3ixXR0h46Rj4j/9uSOfyyow\\n\"\n \"qHQunlZ50hvNz8GAm4TU7v82m96449nFZtFObC69SLx/VsboTPsUh96idgRrBQJA\\n\"\n \"QBfGeFt1VGAy+YTLYLzTfnGnoFQcv7+2i9ZXnn/Gs9N8M+/lekdBFYgzoKN0y4pG\\n\"\n \"2+Q+Tlr2aNlAmrHtkT13+wJAJVgZATPI5X3UO0Wdf24f/w9+OY+QxKGl86tTQXzE\\n\"\n \"4bwvYtUGufMIHiNeWP66i6fYCucXCMYtx6Xgu2hpdZZpFw==\\n\"\n \"-----END RSA PRIVATE KEY-----\\n\")\n'''\npublic, useless key, debugging use only\n'''\n\n# Show the Rapid Connect login button.\nRAPID_CONNECT_ENABLED = False\n\nRAPID_CONNECT_CONFIG = {}\n\nRAPID_CONNECT_CONFIG['secret'] = 'CHANGE_ME'\nRAPID_CONNECT_CONFIG['authnrequest_url'] = 'CHANGE_ME'\n'''something like\n'https://rapid.test.aaf.edu.au/jwt/authnrequest/research/XXXXXXXXXXXXXXXX'\n'''\n\nRAPID_CONNECT_CONFIG['iss'] = 'https://rapid.test.aaf.edu.au'\n''' 'https://rapid.test.aaf.edu.au' or 'https://rapid.aaf.edu.au'\n'''\nRAPID_CONNECT_CONFIG['aud'] = 'https://example.com/rc/'\n'''Public facing URL that accepts the HTTP/HTTPS POST request from\nRapid Connect.\n'''\n\nMANAGE_ACCOUNT_ENABLED = True\n\n# Example settings for the publication form workflow. Also requires the\n# corresponding app in 'INSTALLED_APPS' and the corresponding task to be\n# enabled\n\n# Publication form settings #\n# PUBLICATION_NOTIFICATION_SENDER_EMAIL = 'emailsender@mytardisserver'\n\n# PUBLICATION_OWNER_GROUP = 'publication-admin'\n\n# PUBLICATION_SCHEMA_ROOT = 'http://www.tardis.edu.au/schemas/publication/'\n\n# This schema holds bibliographic details including authors and\n# acknowledgements\n# PUBLICATION_DETAILS_SCHEMA = PUBLICATION_SCHEMA_ROOT + 'details/'\n\n# Any experiment with this schema is treated as a draft publication\n# This schema will be created automatically if not present\n# PUBLICATION_DRAFT_SCHEMA = PUBLICATION_SCHEMA_ROOT + 'draft/'\n\n# Form mappings\n# PUBLICATION_FORM_MAPPINGS is a list of dictionaries that contain the\n# following parameters:\n# dataset_schema: the namespace of the schema that triggers the form to be used\n# publication_schema: the namspace of the schema that should be added to the\n# publication\n# form_template: a URL to the form template (usually static HTML)\n# PUBLICATION_FORM_MAPPINGS = [\n# {'dataset_schema': 'http://example.com/a_dataset_schema',\n# 'publication_schema': 'http://example.com/a_publication_schema',\n# 'form_template': '/static/publication-form/form-template.html'}]\n# Note: dataset_schema is treated as a regular expression\n\n# The PDB publication schema is used for any experiments that reference a\n# PDB structure\n# It is defined here as a setting because it is used both for the publication\n# form and for fetching data from PDB.org and must always match.\n# PDB_PUBLICATION_SCHEMA_ROOT = 'http://synchrotron.org.au/pub/mx/pdb/'\n# PDB_SEQUENCE_PUBLICATION_SCHEMA = PDB_PUBLICATION_SCHEMA_ROOT+'sequence/'\n# PDB_CITATION_PUBLICATION_SCHEMA = PDB_PUBLICATION_SCHEMA_ROOT+'citation/'\n# PDB_REFRESH_INTERVAL = timedelta(days=7)\n\n# PUBLICATION_FORM_MAPPINGS = [\n# {'dataset_schema': r'^http://synchrotron.org.au/mx/',\n# 'publication_schema': PDB_PUBLICATION_SCHEMA_ROOT,\n# 'form_template': '/static/publication-form/mx-pdb-template.html'},\n# {'dataset_schema': r'^http://synchrotron.org.au/mx/',\n# 'publication_schema': 'http://synchrotron.org.au/pub/mx/dataset/',\n# 'form_template':\n# '/static/publication-form/mx-dataset-description-template.html'}]\n\n# Put your API_ID for the Monash DOI minting service here. For other DOI\n# minting, please contact the developers\n# MODC_DOI_API_ID = ''\n# MODC_DOI_API_PASSWORD = ''\n# MODC_DOI_MINT_DEFINITION = 'https://doiserver/modc/ws/MintDoiService.wsdl'\n# MODC_DOI_ACTIVATE_DEFINITION = 'https://doiserver/modc/ws/' \\\n# 'ActivateDoiService.wsdl'\n# MODC_DOI_DEACTIVATE_DEFINITION = 'https://doiserver/modc/ws/' \\\n# 'DeactivateDoiService.wsdl'\n# MODC_DOI_ENDPOINT = 'https://doiserver/modc/ws/'\n# MODC_DOI_MINT_URL_ROOT = 'http://mytardisserver/'\n\n# Push-to app settings\n# PUSH_TO_FROM_EMAIL = '[email protected]'\n", "path": "tardis/default_settings.py" } ]
[ { "content": "from datetime import timedelta\nfrom os import path\nfrom tempfile import gettempdir\n\nimport djcelery\n\n# MUST change this to False for any serious use.\nDEBUG = True\n\nADMINS = (('bob', '[email protected]'), )\n\nMANAGERS = ADMINS\n\n# Dictionary containing the settings for all databases to be used.\n# The DATABASES setting must configure a default database;\n# any number of additional databases may also be specified.\nDATABASES = {\n 'default': {\n # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n 'ENGINE': 'django.db.backends.sqlite3',\n # Name of the database to use. For SQLite, it's the full path.\n 'NAME': 'db.sqlite3',\n 'USER': '',\n 'PASSWORD': '',\n 'HOST': '',\n 'PORT': '',\n }\n}\n\n# Fix 'SQLite backend does not support timezone-aware datetimes\n# when USE_TZ is False.' error by setting USE_TZ to True\nUSE_TZ = True\n\n# Celery queue\nBROKER_URL = 'django://'\n'''\nuse django:, add kombu.transport.django to INSTALLED_APPS\nor use redis: install redis separately and add the following to a\ncustom buildout.cfg:\n django-celery-with-redis\n redis\n hiredis\n'''\n# BROKER_URL = 'redis://localhost:6379/0'\n# CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'\n\n# A dictionary containing the settings for all caches to be used with\n# Django. The CACHES setting must configure a default cache; any\n# number of additional caches may also be specified. Once the cache\n# is set up, you'll need to add\n# 'django.middleware.cache.UpdateCacheMiddleware' and\n# 'django.middleware.cache.FetchFromCacheMiddleware'\n# to your MIDDLEWARE_CLASSES setting below\n\nCACHES = {\n 'default': {\n 'BACKEND': 'django.core.cache.backends.db.DatabaseCache',\n 'LOCATION': 'default_cache',\n },\n # # or use memcached\n # 'default': {\n # 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',\n # 'LOCATION': '127.0.0.1:11211',\n # },\n 'celery-locks': {\n 'BACKEND': 'django.core.cache.backends.db.DatabaseCache',\n 'LOCATION': 'celery_lock_cache',\n }\n}\n'''\nchange the CACHES setting to memcached if you prefer. Requires additional\ndependencies.\n'''\n\n# Local time zone for this installation. Choices can be found here:\n# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name\n# although not all choices may be available on all operating systems.\n# If running in a Windows environment this must be set to the same as your\n# system time zone.\n\nTIME_ZONE = 'Australia/Melbourne'\n\n# Language code for this installation. All choices can be found here:\n# http://www.i18nguy.com/unicode/language-identifiers.html\n\nLANGUAGE_CODE = 'en-us'\n\n# Date format to use by default. (\"jS F Y\" => \"8th March 2012\")\n# https://docs.djangoproject.com/en/1.3/ref/templates/builtins/#std:templatefilter-date # noqa\n\nDATE_FORMAT = \"jS F Y\"\nDATETIME_FORMAT = \"jS F Y H:i\"\n\nSITE_ID = 1\n\n# If you set this to False, Django will make some optimizations so as not\n# to load the internationalization machinery.\n\nUSE_I18N = True\n\n# SECRET_KEY has been removed. Generate one by referring to build.sh\n\nALLOWED_HOSTS = ['*']\n'''\nFor security reasons this needs to be set to your hostname and/or IP\naddress in production.\n'''\n\nSITE_TITLE = 'MyTardis'\n'''\ncustomise the title of your site\n'''\n\nSPONSORED_TEXT = None\n'''\nadd text to the footer to acknowledge someone\n'''\n\nMIDDLEWARE_CLASSES = (\n # 'django.middleware.cache.UpdateCacheMiddleware',\n 'django.middleware.common.CommonMiddleware',\n 'django.middleware.csrf.CsrfViewMiddleware',\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n 'tardis.tardis_portal.logging_middleware.LoggingMiddleware',\n 'django.contrib.messages.middleware.MessageMiddleware',\n 'tardis.tardis_portal.auth.token_auth.TokenAuthMiddleware',\n # 'django.middleware.cache.FetchFromCacheMiddleware',\n)\n\nROOT_URLCONF = 'tardis.urls'\n\nTEMPLATES = [\n {\n 'BACKEND': 'django.template.backends.django.DjangoTemplates',\n 'DIRS': [\n path.join(path.dirname(__file__),\n 'tardis_portal/templates/').replace('\\\\', '/'),\n ],\n 'OPTIONS': {\n 'context_processors': [\n 'django.template.context_processors.request',\n 'django.template.context_processors.static',\n 'django.contrib.auth.context_processors.auth',\n 'django.contrib.messages.context_processors.messages',\n 'django.template.context_processors.debug',\n 'django.template.context_processors.i18n',\n 'tardis.tardis_portal.context_processors'\n '.global_contexts',\n 'tardis.tardis_portal.context_processors'\n '.single_search_processor',\n 'tardis.tardis_portal.context_processors'\n '.tokenuser_processor',\n 'tardis.tardis_portal.context_processors'\n '.registration_processor',\n 'tardis.tardis_portal.context_processors'\n '.user_details_processor',\n ],\n 'loaders': [\n 'django.template.loaders.app_directories.Loader',\n 'django.template.loaders.filesystem.Loader',\n ],\n },\n }\n]\n\nSTATIC_DOC_ROOT = path.join(path.dirname(__file__),\n 'tardis_portal/site_media').replace('\\\\', '/')\n\n\ndef get_admin_media_path():\n import pkgutil\n package = pkgutil.get_loader(\"django.contrib.admin\")\n return path.join(package.filename, 'static', 'admin')\n\nADMIN_MEDIA_STATIC_DOC_ROOT = get_admin_media_path()\n\n# FILE_STORE_PATH = path.abspath(path.join(path.dirname(__file__),\n# '../var/store/')).replace('\\\\', '/')\nSTAGING_PATH = path.abspath(path.join(path.dirname(__file__),\n '../var/staging/')).replace('\\\\', '/')\n# SYNC_TEMP_PATH = path.abspath(path.join(path.dirname(__file__),\n# '../var/sync/')).replace('\\\\', '/')\n\nDEFAULT_STORAGE_BASE_DIR = path.abspath(path.join(path.dirname(__file__),\n '../var/store/')).replace('\\\\', '/')\n\n# LEGACY, ignore\nFILE_STORE_PATH = DEFAULT_STORAGE_BASE_DIR\nINITIAL_LOCATIONS = {}\n\nMETADATA_STORE_PATH = DEFAULT_STORAGE_BASE_DIR\n'''\nstorage path for image paths stored in parameters. Better to set to another\nlocation if possible\n'''\n\nSTAGING_PROTOCOL = 'ldap'\nSTAGING_MOUNT_PREFIX = 'smb://localhost/staging/'\nSTAGING_MOUNT_USER_SUFFIX_ENABLE = False\n\nREQUIRE_DATAFILE_CHECKSUMS = True\nREQUIRE_DATAFILE_SIZES = True\nREQUIRE_VALIDATION_ON_INGESTION = True\n\nDEFAULT_FILE_STORAGE = \\\n 'tardis.tardis_portal.storage.MyTardisLocalFileSystemStorage'\n\n# Absolute path to the directory that holds media.\n# Example: \"/home/media/media.lawrence.com/\"\nMEDIA_ROOT = DEFAULT_STORAGE_BASE_DIR\n\n# URL that handles the media served from MEDIA_ROOT. Make sure to use a\n# trailing slash if there is a path component (optional in other cases).\n# Examples: \"http://media.lawrence.com\", \"http://example.com/media/\"\nMEDIA_URL = None\n\n# Static content location\nSTATIC_URL = '/static/'\n\n# Used by \"django collectstatic\"\nSTATIC_ROOT = path.abspath(path.join(path.dirname(__file__), '..', 'static'))\n\n# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a\n# trailing slash.\n# Examples: \"http://foo.com/media/\", \"/media/\".\n# ADMIN_MEDIA_PREFIX = STATIC_URL + '/admin/'\n\nSTATICFILES_DIRS = (\n ('admin', ADMIN_MEDIA_STATIC_DOC_ROOT),\n)\n\n# Use cachable copies of static files\nSTATICFILES_STORAGE = \\\n 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'\n\n# A tuple of strings designating all applications that are enabled in\n# this Django installation.\nTARDIS_APP_ROOT = 'tardis.apps'\nINSTALLED_APPS = (\n 'django_extensions',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.sites',\n 'django.contrib.staticfiles',\n 'django.contrib.admin',\n 'django.contrib.admindocs',\n 'django.contrib.humanize',\n 'registration',\n 'django_jasmine',\n 'djcelery',\n 'kombu.transport.django',\n 'bootstrapform',\n 'mustachejs',\n 'tastypie',\n 'tastypie_swagger',\n 'tardis.tardis_portal',\n 'tardis.tardis_portal.templatetags',\n 'tardis.search',\n # these optional apps, may require extra settings\n 'tardis.apps.publication_forms',\n 'tardis.apps.oaipmh',\n # 'tardis.apps.push_to',\n)\n\n# Here you can define any custom view overrides provided by apps.\n# Index page overrides are associated with a Django 'Site', specified\n# by SITE_ID (an integer) or the domain name of the incoming request.\n# Overriding index views are encouraged to subclass\n# tardis.tardis_portal.views.pages.IndexView. However, in order to reference\n# this class-based view from settings you need to create a wrapper function\n# which returns MySubclassedView.as_view() (since class-based views cannot\n# be referenced by module path strings like traditional view functions).\n# eg\n# def my_custom_index_wrapper(request, *args, **kwargs):\n# from tardis.tardis_portal.views.pages import class_to_view\n# return class_to_view(MySubclassedView, request, *args, **kwargs):\n#\n# Dataset and Experiment view overrides are mapped via a Schema\n# namespace.\n#\n# INDEX_VIEWS = {\n# 1: 'tardis.apps.my_custom_app.views.my_custom_index_wrapper',\n# 'store.example.com': 'tardis.apps.myapp.my_custom_index_wrapper'\n# }\n#\n# DATASET_VIEWS = [\n# ('http://www.tardis.edu.au/schemas/dataset/my_example_schema',\n# 'tardis.apps.my_custom_app.views.dataset_view_wrapper_fn'),\n# ]\n#\n# EXPERIMENT_VIEWS = [\n# ('http://www.tardis.edu.au/schemas/expt/my_example_schema',\n# 'tardis.apps.my_custom_app.views.expt_view_wrapper_fn'),\n# ]\n\nJASMINE_TEST_DIRECTORY = path.abspath(path.join(path.dirname(__file__),\n 'tardis_portal',\n 'tests',\n 'jasmine'))\n\n\nUSER_PROVIDERS = (\n 'tardis.tardis_portal.auth.localdb_auth.DjangoUserProvider',\n)\n\nGROUP_PROVIDERS = (\n 'tardis.tardis_portal.auth.localdb_auth.DjangoGroupProvider',\n 'tardis.tardis_portal.auth.token_auth.TokenGroupProvider',\n)\n\n# AUTH_PROVIDERS entry format:\n# ('name', 'display name', 'backend implementation')\n# name - used as the key for the entry\n# display name - used as the displayed value in the login form\n# backend implementation points to the actual backend implementation\n#\n# In most cases, the backend implementation should be a fully\n# qualified class name string, whose class can be instantiated without\n# any arguments. For LDAP authentication, the\n# 'tardis.tardis_portal.auth.ldap_auth.LDAPBackend'\n# class can't be instantiated without any arguments, so the\n# 'tardis.tardis_portal.auth.ldap_auth.ldap_auth'\n# wrapper function should be used instead.\n#\n# We will assume that localdb will always be a default AUTH_PROVIDERS entry\n\nAUTH_PROVIDERS = (\n ('localdb', 'Local DB',\n 'tardis.tardis_portal.auth.localdb_auth.DjangoAuthBackend'),\n)\n\n# default authentication module for experiment ownership user during\n# ingestion? Must be one of the above authentication provider names\nDEFAULT_AUTH = 'localdb'\n\nAUTH_PROFILE_MODULE = 'tardis_portal.UserProfile'\n\n# New users are added to these groups by default.\nNEW_USER_INITIAL_GROUPS = []\n\nACCOUNT_ACTIVATION_DAYS = 3\n\nAUTHENTICATION_BACKENDS = (\n 'django.contrib.auth.backends.ModelBackend',\n 'tardis.tardis_portal.auth.authorisation.ACLAwareBackend',\n)\n\n# Email Configuration\n\nEMAIL_PORT = 587\n\nEMAIL_HOST = 'smtp.gmail.com'\n\nEMAIL_HOST_USER = '[email protected]'\n\nEMAIL_HOST_PASSWORD = 'bob'\n\nEMAIL_USE_TLS = True\n\n# Post Save Filters\n# POST_SAVE_FILTERS = [\n# (\"tardis.tardis_portal.filters.exif.make_filter\",\n# [\"EXIF\", \"http://exif.schema\"]), # this filter requires pyexiv2\n# # http://tilloy.net/dev/pyexiv2/\n# ]\n\n# Post Save Filters\n# POST_SAVE_FILTERS = [\n# (\"tardis.tardis_portal.filters.diffractionimage.make_filter\",\n# [\"DIFFRACTION\", \"http://www.tardis.edu.au/schemas/trdDatafile/1\",\n# \"/Users/steve/Desktop/diffdump\"]), # requires ccp4 diffdump binary\n# ]\n\n# logging levels are: DEBUG, INFO, WARN, ERROR, CRITICAL\nSYSTEM_LOG_LEVEL = 'INFO'\nMODULE_LOG_LEVEL = 'INFO'\n\nSYSTEM_LOG_FILENAME = 'request.log'\nMODULE_LOG_FILENAME = 'tardis.log'\n\n# Rollover occurs whenever the current log file is nearly maxBytes in length;\n# if maxBytes is zero, rollover never occurs\nSYSTEM_LOG_MAXBYTES = 0\nMODULE_LOG_MAXBYTES = 0\n\n# Uploadify root folder path, relative to STATIC root\nUPLOADIFY_PATH = '%s/%s' % (STATIC_URL, 'js/lib/uploadify')\n\n# Upload path that files are sent to\nUPLOADIFY_UPLOAD_PATH = '%s/%s' % (MEDIA_URL, 'uploads')\n\n# Download size limit: zero means no limit\nDOWNLOAD_ARCHIVE_SIZE_LIMIT = 0\n\n# Render image file size limit: zero means no limit\nRENDER_IMAGE_SIZE_LIMIT = 0\n\n# temporary download file location\nDOWNLOAD_TEMP_DIR = gettempdir()\n\n# Safety margin for temporary space when downloading. (Estimated archive\n# file size + safety_margin must be less that available disk space ...)\nDOWNLOAD_SPACE_SAFETY_MARGIN = 8388608\n\n# Disable registration (copy to your settings.py first!)\n# INSTALLED_APPS = filter(lambda x: x != 'registration', INSTALLED_APPS)\n\n# Settings for the single search box\nSINGLE_SEARCH_ENABLED = False\n# flip this to turn on search:\nif SINGLE_SEARCH_ENABLED:\n HAYSTACK_CONNECTIONS = {\n 'default': {\n 'ENGINE': 'haystack.backends.elasticsearch_backend.'\n 'ElasticsearchSearchEngine',\n 'URL': 'http://127.0.0.1:9200/',\n 'INDEX_NAME': 'haystack',\n },\n }\nelse:\n HAYSTACK_CONNECTIONS = {\n 'default': {\n 'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',\n },\n }\nif SINGLE_SEARCH_ENABLED:\n INSTALLED_APPS = INSTALLED_APPS + ('haystack',)\nHAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'\n\nDEFAULT_INSTITUTION = \"Monash University\"\n\nTOKEN_EXPIRY_DAYS = 30\nTOKEN_LENGTH = 30\nTOKEN_USERNAME = 'tokenuser'\n\nREQUIRE_VALID_PUBLIC_CONTACTS = True\n\n# RIF-CS Settings\nOAI_DOCS_PATH = path.abspath(path.join(path.dirname(__file__), '../var/oai'))\nRIFCS_PROVIDERS = (\n 'tardis.tardis_portal.publish.provider.rifcsprovider.RifCsProvider',)\nRIFCS_TEMPLATE_DIR = path.join(\n path.dirname(__file__),\n 'tardis_portal/templates/tardis_portal/rif-cs/profiles/')\nRIFCS_GROUP = \"MyTARDIS Default Group\"\nRIFCS_KEY = \"keydomain.example\"\nRELATED_INFO_SCHEMA_NAMESPACE = \\\n 'http://www.tardis.edu.au/schemas/related_info/2011/11/10'\nRELATED_OTHER_INFO_SCHEMA_NAMESPACE = \\\n 'http://www.tardis.edu.au/schemas/experiment/annotation/2011/07/07'\n\nDOI_ENABLE = False\nDOI_XML_PROVIDER = 'tardis.tardis_portal.ands_doi.DOIXMLProvider'\n# DOI_TEMPLATE_DIR = path.join(\n# TARDIS_DIR, 'tardis_portal/templates/tardis_portal/doi/')\nDOI_TEMPLATE_DIR = path.join('tardis_portal/doi/')\nDOI_APP_ID = ''\nDOI_NAMESPACE = 'http://www.tardis.edu.au/schemas/doi/2011/12/07'\nDOI_MINT_URL = 'https://services.ands.org.au/home/dois/doi_mint.php'\nDOI_RELATED_INFO_ENABLE = False\nDOI_BASE_URL = 'http://mytardis.example.com'\n\nOAIPMH_PROVIDERS = [\n 'tardis.apps.oaipmh.provider.experiment.DcExperimentProvider',\n 'tardis.apps.oaipmh.provider.experiment.RifCsExperimentProvider',\n]\n\nREDIS_VERIFY_MANAGER = False\n'''\nUses REDIS to keep track of files that fail to verify\n'''\nREDIS_VERIFY_MANAGER_SETUP = {\n 'host': 'localhost',\n 'port': 6379,\n 'db': 1,\n}\n\nREDIS_VERIFY_DELAY = 86400 # 1 day = 86400\n'''\ndelay between verification attempts in seconds\n'''\n\nCELERYBEAT_SCHEDULE = {\n \"verify-files\": {\n \"task\": \"tardis_portal.verify_dfos\",\n \"schedule\": timedelta(seconds=300)\n },\n # enable this task for the publication workflow\n # \"update-publication-records\": {\n # \"task\": \"apps.publication_forms.update_publication_records\",\n # \"schedule\": timedelta(seconds=300)\n # },\n}\n\ndjcelery.setup_loader()\n\n# DEFAULT_LOCATION = \"local\"\n\n# INITIAL_LOCATIONS = [{'name': DEFAULT_LOCATION,\n# 'url': 'file://' + FILE_STORE_PATH,\n# 'provider': 'local',\n# 'type': 'online',\n# 'priority': 10},\n# # {'name': 'sync',\n# # 'url': 'file://' + SYNC_PATH,\n# # 'provider': 'local',\n# # 'type': 'external',\n# # 'priority': 8},\n# {'name': 'staging',\n# 'provider': 'local',\n# 'url': 'file://' + STAGING_PATH,\n# 'type': 'external',\n# 'priority': 5}]\n\nDEFAULT_MIGRATION_DESTINATION = 'unknown'\n\nTRANSFER_PROVIDERS = {\n 'http': 'tardis.tardis_portal.transfer.SimpleHttpTransfer',\n 'dav': 'tardis.tardis_portal.transfer.WebDAVTransfer',\n 'local': 'tardis.tardis_portal.transfer.LocalTransfer'}\n\nUPLOAD_METHOD = False\n'''\nOld version: UPLOAD_METHOD = \"uploadify\".\nThis can be changed to an app that provides an upload_button function,\neg. \"tardis.apps.filepicker.views.upload_button\" to use a fancy\ncommercial uploader.\nTo use filepicker, please also get an API key at http://filepicker.io\n'''\n# FILEPICKER_API_KEY = \"YOUR KEY\"\n\nARCHIVE_FILE_MAPPERS = {\n 'deep-storage': (\n 'tardis.apps.deep_storage_download_mapper.mapper.deep_storage_mapper',\n ),\n}\n\n# Site's default archive organization (i.e. path structure)\nDEFAULT_ARCHIVE_ORGANIZATION = 'deep-storage'\n\nDEFAULT_ARCHIVE_FORMATS = ['tar']\n'''\nSite's preferred archive types, with the most preferred first\nother available option: 'tgz'. Add to list if desired\n'''\n\n# DEEP_DATASET_STORAGE = True\n# '''\n# Set to true if you want to preserve folder structure on \"stage_file\" ingest,\n# eg. via the METS importer.\n# Currently, only tested for the METS importer.\n# '''\n\n\n# Get version from git to be displayed on About page.\ndef get_git_version():\n repo_dir = path.dirname(path.dirname(path.abspath(__file__)))\n\n def run_git(args):\n import subprocess\n process = subprocess.Popen('git %s' % args,\n stdout=subprocess.PIPE,\n stderr=subprocess.PIPE,\n shell=True,\n cwd=repo_dir,\n universal_newlines=True)\n return process.communicate()[0]\n\n try:\n info = {\n 'commit_id': run_git(\"log -1 --format='%H'\").strip(),\n 'date': run_git(\"log -1 --format='%cd' --date=rfc\").strip(),\n 'branch': run_git(\"rev-parse --abbrev-ref HEAD\").strip(),\n 'tag': run_git(\"describe --abbrev=0 --tags\").strip(),\n }\n except Exception:\n return [\"unavailable\"]\n return info\n\nMYTARDIS_VERSION = get_git_version()\n# If you want enable user agent sensing, copy this to settings.py\n# and uncomment it.\n#\n# USER_AGENT_SENSING = True\n# if USER_AGENT_SENSING:\n# from os import environ\n# # Workaround for bug in ua_parser ... can't find its builtin copy\n# # of regexes.yaml ... in versions 0.3.2 and earlier. Remove when fixed.\n# environ['UA_PARSER_YAML'] = '/opt/mytardis/current/ua_parser_regexes.yaml'\n#\n# INSTALLED_APPS = INSTALLED_APPS + ('django_user_agents',)\n# MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + \\\n# ('django_user_agents.middleware.UserAgentMiddleware',)\n\nAUTOGENERATE_API_KEY = False\n'''\nGenerate a tastypie API key with user post_save\n(tardis/tardis_portal/models/hooks.py)\n'''\n\nBLEACH_ALLOWED_TAGS = [\n 'a',\n 'abbr',\n 'acronym',\n 'b',\n 'blockquote',\n 'code',\n 'em',\n 'i',\n 'li',\n 'ol',\n 'strong',\n 'ul',\n]\n'''\nThese are the default bleach values and shown here as an example.\n'''\n\nBLEACH_ALLOWED_ATTRIBUTES = {\n 'a': ['href', 'title'],\n 'abbr': ['title'],\n 'acronym': ['title'],\n}\n'''\nThese are the default bleach values and shown here as an example.\n'''\n\nSFTP_PORT = 2200\nSFTP_GEVENT = False\nSFTP_HOST_KEY = (\n \"-----BEGIN RSA PRIVATE KEY-----\\n\"\n \"MIICXgIBAAKCAIEAl7sAF0x2O/HwLhG68b1uG8KHSOTqe3Cdlj5i/1RhO7E2BJ4B\\n\"\n \"3jhKYDYtupRnMFbpu7fb21A24w3Y3W5gXzywBxR6dP2HgiSDVecoDg2uSYPjnlDk\\n\"\n \"HrRuviSBG3XpJ/awn1DObxRIvJP4/sCqcMY8Ro/3qfmid5WmMpdCZ3EBeC0CAwEA\\n\"\n \"AQKCAIBSGefUs5UOnr190C49/GiGMN6PPP78SFWdJKjgzEHI0P0PxofwPLlSEj7w\\n\"\n \"RLkJWR4kazpWE7N/bNC6EK2pGueMN9Ag2GxdIRC5r1y8pdYbAkuFFwq9Tqa6j5B0\\n\"\n \"GkkwEhrcFNBGx8UfzHESXe/uE16F+e8l6xBMcXLMJVo9Xjui6QJBAL9MsJEx93iO\\n\"\n \"zwjoRpSNzWyZFhiHbcGJ0NahWzc3wASRU6L9M3JZ1VkabRuWwKNuEzEHNK8cLbRl\\n\"\n \"TyH0mceWXcsCQQDLDEuWcOeoDteEpNhVJFkXJJfwZ4Rlxu42MDsQQ/paJCjt2ONU\\n\"\n \"WBn/P6iYDTvxrt/8+CtLfYc+QQkrTnKn3cLnAkEAk3ixXR0h46Rj4j/9uSOfyyow\\n\"\n \"qHQunlZ50hvNz8GAm4TU7v82m96449nFZtFObC69SLx/VsboTPsUh96idgRrBQJA\\n\"\n \"QBfGeFt1VGAy+YTLYLzTfnGnoFQcv7+2i9ZXnn/Gs9N8M+/lekdBFYgzoKN0y4pG\\n\"\n \"2+Q+Tlr2aNlAmrHtkT13+wJAJVgZATPI5X3UO0Wdf24f/w9+OY+QxKGl86tTQXzE\\n\"\n \"4bwvYtUGufMIHiNeWP66i6fYCucXCMYtx6Xgu2hpdZZpFw==\\n\"\n \"-----END RSA PRIVATE KEY-----\\n\")\n'''\npublic, useless key, debugging use only\n'''\n\n# Show the Rapid Connect login button.\nRAPID_CONNECT_ENABLED = False\n\nRAPID_CONNECT_CONFIG = {}\n\nRAPID_CONNECT_CONFIG['secret'] = 'CHANGE_ME'\nRAPID_CONNECT_CONFIG['authnrequest_url'] = 'CHANGE_ME'\n'''something like\n'https://rapid.test.aaf.edu.au/jwt/authnrequest/research/XXXXXXXXXXXXXXXX'\n'''\n\nRAPID_CONNECT_CONFIG['iss'] = 'https://rapid.test.aaf.edu.au'\n''' 'https://rapid.test.aaf.edu.au' or 'https://rapid.aaf.edu.au'\n'''\nRAPID_CONNECT_CONFIG['aud'] = 'https://example.com/rc/'\n'''Public facing URL that accepts the HTTP/HTTPS POST request from\nRapid Connect.\n'''\n\nMANAGE_ACCOUNT_ENABLED = True\n\n# Example settings for the publication form workflow. Also requires the\n# corresponding app in 'INSTALLED_APPS' and the corresponding task to be\n# enabled\n\n# Publication form settings #\n# PUBLICATION_NOTIFICATION_SENDER_EMAIL = 'emailsender@mytardisserver'\n\n# PUBLICATION_OWNER_GROUP = 'publication-admin'\n\n# PUBLICATION_SCHEMA_ROOT = 'http://www.tardis.edu.au/schemas/publication/'\n\n# This schema holds bibliographic details including authors and\n# acknowledgements\n# PUBLICATION_DETAILS_SCHEMA = PUBLICATION_SCHEMA_ROOT + 'details/'\n\n# Any experiment with this schema is treated as a draft publication\n# This schema will be created automatically if not present\n# PUBLICATION_DRAFT_SCHEMA = PUBLICATION_SCHEMA_ROOT + 'draft/'\n\n# Form mappings\n# PUBLICATION_FORM_MAPPINGS is a list of dictionaries that contain the\n# following parameters:\n# dataset_schema: the namespace of the schema that triggers the form to be used\n# publication_schema: the namspace of the schema that should be added to the\n# publication\n# form_template: a URL to the form template (usually static HTML)\n# PUBLICATION_FORM_MAPPINGS = [\n# {'dataset_schema': 'http://example.com/a_dataset_schema',\n# 'publication_schema': 'http://example.com/a_publication_schema',\n# 'form_template': '/static/publication-form/form-template.html'}]\n# Note: dataset_schema is treated as a regular expression\n\n# The PDB publication schema is used for any experiments that reference a\n# PDB structure\n# It is defined here as a setting because it is used both for the publication\n# form and for fetching data from PDB.org and must always match.\n# PDB_PUBLICATION_SCHEMA_ROOT = 'http://synchrotron.org.au/pub/mx/pdb/'\n# PDB_SEQUENCE_PUBLICATION_SCHEMA = PDB_PUBLICATION_SCHEMA_ROOT+'sequence/'\n# PDB_CITATION_PUBLICATION_SCHEMA = PDB_PUBLICATION_SCHEMA_ROOT+'citation/'\n# PDB_REFRESH_INTERVAL = timedelta(days=7)\n\n# PUBLICATION_FORM_MAPPINGS = [\n# {'dataset_schema': r'^http://synchrotron.org.au/mx/',\n# 'publication_schema': PDB_PUBLICATION_SCHEMA_ROOT,\n# 'form_template': '/static/publication-form/mx-pdb-template.html'},\n# {'dataset_schema': r'^http://synchrotron.org.au/mx/',\n# 'publication_schema': 'http://synchrotron.org.au/pub/mx/dataset/',\n# 'form_template':\n# '/static/publication-form/mx-dataset-description-template.html'}]\n\n# Put your API_ID for the Monash DOI minting service here. For other DOI\n# minting, please contact the developers\n# MODC_DOI_API_ID = ''\n# MODC_DOI_API_PASSWORD = ''\n# MODC_DOI_MINT_DEFINITION = 'https://doiserver/modc/ws/MintDoiService.wsdl'\n# MODC_DOI_ACTIVATE_DEFINITION = 'https://doiserver/modc/ws/' \\\n# 'ActivateDoiService.wsdl'\n# MODC_DOI_DEACTIVATE_DEFINITION = 'https://doiserver/modc/ws/' \\\n# 'DeactivateDoiService.wsdl'\n# MODC_DOI_ENDPOINT = 'https://doiserver/modc/ws/'\n# MODC_DOI_MINT_URL_ROOT = 'http://mytardisserver/'\n\n# Push-to app settings\n# PUSH_TO_FROM_EMAIL = '[email protected]'\n", "path": "tardis/default_settings.py" } ]
diff --git a/tardis/default_settings.py b/tardis/default_settings.py index 5db11d3504..de45a028a9 100644 --- a/tardis/default_settings.py +++ b/tardis/default_settings.py @@ -106,7 +106,7 @@ address in production. ''' -SITE_TITLE = None +SITE_TITLE = 'MyTardis' ''' customise the title of your site '''
python__mypy-4770
__ne__ doesn't allow returning NotImplemented It seems that mypy doesn't allow `__ne__` returning `NotImplemented`, (this is allowed with `__eq__`). And when I try explicitly adding `NotImplemented` as a possible return type, I get a run-time error: ``` File ".../pod.py", line 65, in PlainOldData def __ne__(self, other: Any) -> Union[bool, NotImplemented]: File "/usr/lib/python3.6/typing.py", line 682, in inner return func(*args, **kwds) File "/usr/lib/python3.6/typing.py", line 800, in __getitem__ parameters = tuple(_type_check(p, msg) for p in parameters) File "/usr/lib/python3.6/typing.py", line 800, in <genexpr> parameters = tuple(_type_check(p, msg) for p in parameters) File "/usr/lib/python3.6/typing.py", line 374, in _type_check raise TypeError(msg + " Got %.100r." % (arg,)) TypeError: Union[arg, ...]: each arg must be a type. Got NotImplemented. ``` If I change this to `def __ne__(self, other: Any) -> Union[bool, type(NotImplemented)]:`, then mypy complains: ``` error: invalid type comment or annotation note: Suggestion: use type[...] instead of type(...) ``` and when I try using this suggestion, I get a runtime error: ``` TypeError: 'type' object is not subscriptable ``` @gvanrossum suggested (in [issue 1101](https://github.com/python/mypy/issues/1101#issuecomment-374685779)) that this was due to `__ne__` not being in `sharedparse.__MAGICMETHODS`; but it does appear to be there.
[ { "content": "from typing import Optional\n\n\"\"\"Shared logic between our three mypy parser files.\"\"\"\n\n\nMAGIC_METHODS = {\n \"__abs__\",\n \"__add__\",\n \"__and__\",\n \"__call__\",\n \"__cmp__\",\n \"__complex__\",\n \"__contains__\",\n \"__del__\",\n \"__delattr__\",\n \"__delitem__\",\n \"__divmod__\",\n \"__div__\",\n \"__enter__\",\n \"__exit__\",\n \"__eq__\",\n \"__floordiv__\",\n \"__float__\",\n \"__ge__\",\n \"__getattr__\",\n \"__getattribute__\",\n \"__getitem__\",\n \"__gt__\",\n \"__hex__\",\n \"__iadd__\",\n \"__iand__\",\n \"__idiv__\",\n \"__ifloordiv__\",\n \"__ilshift__\",\n \"__imod__\",\n \"__imul__\",\n \"__init__\",\n \"__init_subclass__\",\n \"__int__\",\n \"__invert__\",\n \"__ior__\",\n \"__ipow__\",\n \"__irshift__\",\n \"__isub__\",\n \"__iter__\",\n \"__ixor__\",\n \"__le__\",\n \"__len__\",\n \"__long__\",\n \"__lshift__\",\n \"__lt__\",\n \"__mod__\",\n \"__mul__\",\n \"__ne__\",\n \"__neg__\",\n \"__new__\",\n \"__nonzero__\",\n \"__oct__\",\n \"__or__\",\n \"__pos__\",\n \"__pow__\",\n \"__radd__\",\n \"__rand__\",\n \"__rdiv__\",\n \"__repr__\",\n \"__reversed__\",\n \"__rfloordiv__\",\n \"__rlshift__\",\n \"__rmod__\",\n \"__rmul__\",\n \"__ror__\",\n \"__rpow__\",\n \"__rrshift__\",\n \"__rshift__\",\n \"__rsub__\",\n \"__rxor__\",\n \"__setattr__\",\n \"__setitem__\",\n \"__str__\",\n \"__sub__\",\n \"__unicode__\",\n \"__xor__\",\n}\n\nMAGIC_METHODS_ALLOWING_KWARGS = {\n \"__init__\",\n \"__init_subclass__\",\n \"__new__\",\n \"__call__\",\n}\n\nMAGIC_METHODS_POS_ARGS_ONLY = MAGIC_METHODS - MAGIC_METHODS_ALLOWING_KWARGS\n\nBINARY_MAGIC_METHODS = {\n \"__add__\",\n \"__and__\",\n \"__cmp__\",\n \"__divmod__\",\n \"__div__\",\n \"__eq__\",\n \"__floordiv__\",\n \"__ge__\",\n \"__gt__\",\n \"__iadd__\",\n \"__iand__\",\n \"__idiv__\",\n \"__ifloordiv__\",\n \"__ilshift__\",\n \"__imod__\",\n \"__imul__\",\n \"__ior__\",\n \"__ipow__\",\n \"__irshift__\",\n \"__isub__\",\n \"__ixor__\",\n \"__le__\",\n \"__lshift__\",\n \"__lt__\",\n \"__mod__\",\n \"__mul__\",\n \"__or__\",\n \"__pow__\",\n \"__radd__\",\n \"__rand__\",\n \"__rdiv__\",\n \"__rfloordiv__\",\n \"__rlshift__\",\n \"__rmod__\",\n \"__rmul__\",\n \"__ror__\",\n \"__rpow__\",\n \"__rrshift__\",\n \"__rshift__\",\n \"__rsub__\",\n \"__rxor__\",\n \"__sub__\",\n \"__xor__\",\n}\n\n\ndef special_function_elide_names(name: str) -> bool:\n return name in MAGIC_METHODS_POS_ARGS_ONLY\n\n\ndef argument_elide_name(name: Optional[str]) -> bool:\n return name is not None and name.startswith(\"__\")\n", "path": "mypy/sharedparse.py" } ]
[ { "content": "from typing import Optional\n\n\"\"\"Shared logic between our three mypy parser files.\"\"\"\n\n\nMAGIC_METHODS = {\n \"__abs__\",\n \"__add__\",\n \"__and__\",\n \"__call__\",\n \"__cmp__\",\n \"__complex__\",\n \"__contains__\",\n \"__del__\",\n \"__delattr__\",\n \"__delitem__\",\n \"__divmod__\",\n \"__div__\",\n \"__enter__\",\n \"__exit__\",\n \"__eq__\",\n \"__floordiv__\",\n \"__float__\",\n \"__ge__\",\n \"__getattr__\",\n \"__getattribute__\",\n \"__getitem__\",\n \"__gt__\",\n \"__hex__\",\n \"__iadd__\",\n \"__iand__\",\n \"__idiv__\",\n \"__ifloordiv__\",\n \"__ilshift__\",\n \"__imod__\",\n \"__imul__\",\n \"__init__\",\n \"__init_subclass__\",\n \"__int__\",\n \"__invert__\",\n \"__ior__\",\n \"__ipow__\",\n \"__irshift__\",\n \"__isub__\",\n \"__iter__\",\n \"__ixor__\",\n \"__le__\",\n \"__len__\",\n \"__long__\",\n \"__lshift__\",\n \"__lt__\",\n \"__mod__\",\n \"__mul__\",\n \"__ne__\",\n \"__neg__\",\n \"__new__\",\n \"__nonzero__\",\n \"__oct__\",\n \"__or__\",\n \"__pos__\",\n \"__pow__\",\n \"__radd__\",\n \"__rand__\",\n \"__rdiv__\",\n \"__repr__\",\n \"__reversed__\",\n \"__rfloordiv__\",\n \"__rlshift__\",\n \"__rmod__\",\n \"__rmul__\",\n \"__ror__\",\n \"__rpow__\",\n \"__rrshift__\",\n \"__rshift__\",\n \"__rsub__\",\n \"__rxor__\",\n \"__setattr__\",\n \"__setitem__\",\n \"__str__\",\n \"__sub__\",\n \"__unicode__\",\n \"__xor__\",\n}\n\nMAGIC_METHODS_ALLOWING_KWARGS = {\n \"__init__\",\n \"__init_subclass__\",\n \"__new__\",\n \"__call__\",\n}\n\nMAGIC_METHODS_POS_ARGS_ONLY = MAGIC_METHODS - MAGIC_METHODS_ALLOWING_KWARGS\n\nBINARY_MAGIC_METHODS = {\n \"__add__\",\n \"__and__\",\n \"__cmp__\",\n \"__divmod__\",\n \"__div__\",\n \"__eq__\",\n \"__floordiv__\",\n \"__ge__\",\n \"__gt__\",\n \"__iadd__\",\n \"__iand__\",\n \"__idiv__\",\n \"__ifloordiv__\",\n \"__ilshift__\",\n \"__imod__\",\n \"__imul__\",\n \"__ior__\",\n \"__ipow__\",\n \"__irshift__\",\n \"__isub__\",\n \"__ixor__\",\n \"__le__\",\n \"__lshift__\",\n \"__lt__\",\n \"__mod__\",\n \"__mul__\",\n \"__ne__\",\n \"__or__\",\n \"__pow__\",\n \"__radd__\",\n \"__rand__\",\n \"__rdiv__\",\n \"__rfloordiv__\",\n \"__rlshift__\",\n \"__rmod__\",\n \"__rmul__\",\n \"__ror__\",\n \"__rpow__\",\n \"__rrshift__\",\n \"__rshift__\",\n \"__rsub__\",\n \"__rxor__\",\n \"__sub__\",\n \"__xor__\",\n}\n\n\ndef special_function_elide_names(name: str) -> bool:\n return name in MAGIC_METHODS_POS_ARGS_ONLY\n\n\ndef argument_elide_name(name: Optional[str]) -> bool:\n return name is not None and name.startswith(\"__\")\n", "path": "mypy/sharedparse.py" } ]
diff --git a/mypy/sharedparse.py b/mypy/sharedparse.py index 91015b6d693f..b186da088f2b 100644 --- a/mypy/sharedparse.py +++ b/mypy/sharedparse.py @@ -118,6 +118,7 @@ "__lt__", "__mod__", "__mul__", + "__ne__", "__or__", "__pow__", "__radd__",
ManimCommunity__manim-126
Remove argparse from setup.py https://github.com/ManimCommunity/manim/blob/cf8c5b9938abafba9f6c2c1aeff9e15c8edbfdd1/setup.py#L17 Remove `argparse` from setup.py as it is a default library and need not be mentioned in `requirements.txt` and `setup.py`.
[ { "content": "from setuptools import setup, find_namespace_packages\n\nsetup(\n name=\"manimlib\",\n version=\"0.2.0\",\n description=\"Animation engine for explanatory math videos\",\n license=\"MIT\",\n packages=find_namespace_packages(),\n package_data={ \"manim\": [\"*.tex\"] },\n entry_points={\n \"console_scripts\": [\n \"manim=manim.__main__:main\",\n \"manimcm=manim.__main__:main\",\n ]\n },\n install_requires=[\n \"argparse\",\n \"colour\",\n \"numpy\",\n \"Pillow\",\n \"progressbar\",\n \"scipy\",\n \"tqdm\",\n \"pycairo\",\n \"pydub\",\n \"pygments\",\n \"pyreadline; sys_platform == 'win32'\",\n \"rich\",\n ],\n)\n", "path": "setup.py" } ]
[ { "content": "from setuptools import setup, find_namespace_packages\n\nsetup(\n name=\"manimlib\",\n version=\"0.2.0\",\n description=\"Animation engine for explanatory math videos\",\n license=\"MIT\",\n packages=find_namespace_packages(),\n package_data={ \"manim\": [\"*.tex\"] },\n entry_points={\n \"console_scripts\": [\n \"manim=manim.__main__:main\",\n \"manimcm=manim.__main__:main\",\n ]\n },\n install_requires=[\n \"colour\",\n \"numpy\",\n \"Pillow\",\n \"progressbar\",\n \"scipy\",\n \"tqdm\",\n \"pycairo\",\n \"pydub\",\n \"pygments\",\n \"pyreadline; sys_platform == 'win32'\",\n \"rich\",\n ],\n)\n", "path": "setup.py" } ]
diff --git a/requirements.txt b/requirements.txt index 53f34a4ac8..6f1952e7ef 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -argparse colour numpy Pillow diff --git a/setup.py b/setup.py index 018bf1ebcb..f47d495fb1 100755 --- a/setup.py +++ b/setup.py @@ -14,7 +14,6 @@ ] }, install_requires=[ - "argparse", "colour", "numpy", "Pillow",
scikit-hep__pyhf-2300
Sphinx warning in docs for config value `jupyterlite_dir` has type `str`, defaults to `PosixPath` Following Issue #2297, the test build of the docs is failing with ``` WARNING: The config value `jupyterlite_dir' has type `str', defaults to `PosixPath'. ``` This warning is treated as an error as we do this intentionally https://github.com/scikit-hep/pyhf/blob/b6874878c58093f8c1fecc06d2f631fa82e6e064/docs/Makefile#L5-L8 I'm not sure if this means that we need to update https://github.com/scikit-hep/pyhf/blob/b6874878c58093f8c1fecc06d2f631fa82e6e064/docs/conf.py#L531-L532 to be a Pathlib Path or not. I'm not sure how that would work though.
[ { "content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use Path('../relative_path_to_dir').resolve() to make it absolute, like shown here.\n\nimport sys\nfrom pathlib import Path\n\nimport jupytext\nfrom pkg_resources import get_distribution\n\nsys.path.insert(0, str(Path('./exts').resolve()))\n\n# Convert jupyterlite example to ipynb\ndocs_dir = Path(__file__).resolve().parent\npy_percent_as_notebook = jupytext.read(docs_dir / \"lite\" / \"jupyterlite.py\")\njupytext.write(\n py_percent_as_notebook, docs_dir / \"lite\" / \"jupyterlite.ipynb\", fmt=\"ipynb\"\n)\n\n\ndef setup(app):\n app.add_css_file(\n 'https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.2/gh-fork-ribbon.min.css'\n )\n\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n 'sphinx.ext.autodoc',\n 'sphinx.ext.autosummary',\n 'sphinx.ext.coverage',\n 'sphinx.ext.mathjax',\n 'sphinx.ext.ifconfig',\n 'sphinx.ext.viewcode',\n 'sphinx.ext.githubpages',\n 'sphinx.ext.intersphinx',\n 'sphinx_rtd_theme',\n 'sphinxcontrib.bibtex',\n 'sphinx.ext.napoleon',\n 'sphinx_click.ext',\n 'nbsphinx',\n 'sphinx_issues',\n 'sphinx_copybutton',\n 'xref',\n 'jupyterlite_sphinx',\n]\nbibtex_bibfiles = [\n \"bib/docs.bib\",\n \"bib/HEPData_likelihoods.bib\",\n \"bib/media.bib\",\n \"bib/posters.bib\",\n \"bib/preferred.bib\",\n \"bib/talks.bib\",\n \"bib/tutorials.bib\",\n \"bib/use_citations.bib\",\n \"bib/general_citations.bib\",\n]\nbibtex_default_style = \"unsrt\"\n\n# external links\nxref_links = {\"arXiv:1007.1727\": (\"[1007.1727]\", \"https://arxiv.org/abs/1007.1727\")}\n\nintersphinx_mapping = {\n 'python': ('https://docs.python.org/3', None),\n 'numpy': ('https://numpy.org/doc/stable/', None),\n 'scipy': ('https://docs.scipy.org/doc/scipy/', None),\n 'matplotlib': ('https://matplotlib.org/stable/', None),\n 'iminuit': ('https://iminuit.readthedocs.io/en/stable/', None),\n 'uproot': ('https://uproot.readthedocs.io/en/latest/', None),\n 'jsonpatch': ('https://python-json-patch.readthedocs.io/en/latest/', None),\n}\n\n# GitHub repo\nissues_github_path = 'scikit-hep/pyhf'\n\n# Generate the API documentation when building\nautosummary_generate = True\nnumpydoc_show_class_members = False\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\nsource_suffix = ['.rst', '.md']\n# source_suffix = '.rst'\n\n# The encoding of source files.\n#\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = 'pyhf'\ncopyright = '2018, Lukas Heinrich, Matthew Feickert, Giordon Stark'\nauthor = 'Lukas Heinrich, Matthew Feickert, Giordon Stark'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n# The full version, including alpha/beta/rc tags.\nrelease = get_distribution('pyhf').version\n# for example take major/minor/patch\nversion = '.'.join(release.split('.')[:3])\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = \"en\"\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#\n# today = ''\n#\n# Else, today_fmt is used as the format for a strftime call.\n#\n# today_fmt = '%B %d, %Y'\n\nautodoc_mock_imports = [\n 'tensorflow',\n 'torch',\n 'jax',\n 'iminuit',\n 'tensorflow_probability',\n]\n\n\n_type_aliases_inverted = {\n 'pyhf.typing': [\n 'PathOrStr',\n 'ParameterBase',\n 'Parameter',\n 'Measurement',\n 'ModifierBase',\n 'NormSys',\n 'NormFactor',\n 'HistoSys',\n 'StatError',\n 'ShapeSys',\n 'ShapeFactor',\n 'LumiSys',\n 'Modifier',\n 'Sample',\n 'Channel',\n 'Observation',\n 'Workspace',\n 'Literal',\n ],\n 'numpy.typing': ['ArrayLike', 'DTypeLike', 'NBitBase', 'NDArray'],\n}\nautodoc_type_aliases = {\n item: f'{k}.{item}' for k, v in _type_aliases_inverted.items() for item in v\n}\n\nautodoc_typehints_format = 'fully-qualified'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = [\n '_build',\n 'JOSS',\n 'lite',\n '**.ipynb_checkpoints',\n 'examples/experiments/edwardpyhf.ipynb',\n 'examples/notebooks/ImpactPlot.ipynb',\n 'examples/notebooks/Recast.ipynb',\n 'examples/notebooks/StatError.ipynb',\n 'examples/notebooks/example-tensorflow.ipynb',\n 'examples/notebooks/histogrammar.ipynb',\n 'examples/notebooks/histosys.ipynb',\n 'examples/notebooks/histosys-pytorch.ipynb',\n 'examples/notebooks/importxml.ipynb',\n 'examples/notebooks/multichannel-coupled-normsys.ipynb',\n 'examples/notebooks/multichannel-normsys.ipynb',\n 'examples/notebooks/normsys.ipynb',\n 'examples/notebooks/pullplot.ipynb',\n 'examples/notebooks/pytorch_tests_onoff.ipynb',\n 'examples/notebooks/tensorflow-limit.ipynb',\n]\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n#\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#\n# show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n# keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages. See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'sphinx_rtd_theme'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further. For a list of options available for each theme, see the\n# documentation.\n#\nhtml_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\nhtml_theme_path = []\n\n# The name for this set of Sphinx documents.\n# \"<project> v<release> documentation\" by default.\n#\n# html_title = u'pyhf v0.3.0'\n\n# A shorter title for the navigation bar. Default is the same as html_title.\n#\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#\n# html_logo = None\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#\n# html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\nhtml_css_files = [\n 'css/custom.css',\n]\n\nhtml_js_files = [\n 'js/custom.js',\n (\n 'https://views.scientific-python.org/js/plausible.js',\n {\"data-domain\": \"pyhf.readthedocs.io\", \"defer\": \"defer\"},\n ),\n]\n\n# Add any extra paths that contain custom files (such as robots.txt or\n# .htaccess) here, relative to this directory. These files are copied\n# directly to the root of the documentation.\n#\nhtml_extra_path = ['_extras']\n\n# If not None, a 'Last updated on:' timestamp is inserted at every page\n# bottom, using the given strftime format.\n# The empty string is equivalent to '%b %d, %Y'.\n#\n# html_last_updated_fmt = None\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#\n# html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#\n# html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#\n# html_additional_pages = {}\n\n# If false, no module index is generated.\n#\n# html_domain_indices = True\n\n# If false, no index is generated.\n#\n# html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#\n# html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#\n# html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#\n# html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#\n# html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it. The value of this option must be the\n# base URL from which the finished HTML is served.\n#\n# html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n# html_file_suffix = None\n\n# Language to be used for generating the HTML full-text search index.\n# Sphinx supports the following languages:\n# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'\n# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'\n#\n# html_search_language = 'en'\n\n# A dictionary with options for the search language support, empty by default.\n# 'ja' uses this config value.\n# 'zh' user can custom change `jieba` dictionary path.\n#\n# html_search_options = {'type': 'default'}\n\n# The name of a javascript file (relative to the configuration directory) that\n# implements a search results scorer. If empty, the default will be used.\n#\n# html_search_scorer = 'scorer.js'\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'pyhfdoc'\n\n# sphinx-copybutton configuration\ncopybutton_prompt_text = r\">>> |\\.\\.\\. |\\$ \"\ncopybutton_prompt_is_regexp = True\ncopybutton_here_doc_delimiter = \"EOF\"\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n # The paper size ('letterpaper' or 'a4paper').\n #\n # 'papersize': 'letterpaper',\n # The font size ('10pt', '11pt' or '12pt').\n #\n # 'pointsize': '10pt',\n # Additional stuff for the LaTeX preamble.\n #\n # 'preamble': '',\n # Latex figure (float) alignment\n #\n # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n# author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n (\n master_doc,\n 'pyhf.tex',\n 'pyhf Documentation',\n 'Lukas Heinrich, Matthew Feickert, Giordon Stark',\n 'manual',\n )\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#\n# latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#\n# latex_use_parts = False\n\n# If true, show page references after internal links.\n#\n# latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#\n# latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#\n# latex_appendices = []\n\n# It false, will not define \\strong, \\code, \titleref, \\crossref ... but only\n# \\sphinxstrong, ..., \\sphinxtitleref, ... To help avoid clash with user added\n# packages.\n#\n# latex_keep_old_macro_names = True\n\n# If false, no module index is generated.\n#\n# latex_domain_indices = True\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [(master_doc, 'pyhf', 'pyhf Documentation', [author], 1)]\n\n# If true, show URL addresses after external links.\n#\n# man_show_urls = False\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n# dir menu entry, description, category)\ntexinfo_documents = [\n (\n master_doc,\n 'pyhf',\n 'pyhf Documentation',\n author,\n 'pyhf',\n 'One line description of project.',\n 'Miscellaneous',\n )\n]\n\n# Documents to append as an appendix to all manuals.\n#\n# texinfo_appendices = []\n\n# If false, no module index is generated.\n#\n# texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#\n# texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n#\n# texinfo_no_detailmenu = False\n\nmathjax3_config = {\n 'tex2jax': {'inlineMath': [['$', '$'], ['\\\\(', '\\\\)']]},\n 'tex': {\n 'macros': {\n 'bm': [\"\\\\boldsymbol{#1}\", 1], # \\usepackage{bm}, see mathjax/MathJax#1219\n 'HiFa': r'\\texttt{HistFactory}',\n 'Root': r'\\texttt{ROOT}',\n 'RooStats': r'\\texttt{RooStats}',\n 'RooFit': r'\\texttt{RooFit}',\n 'pyhf': r'\\texttt{pyhf}',\n 'CLs': r'\\mathrm{CL}_{s}',\n 'freeset': r'\\bm{\\eta}',\n 'constrset': r'\\bm{\\chi}',\n 'singleconstr': r'\\chi',\n 'channelcounts': r'\\bm{n}',\n 'auxdata': r'\\bm{a}',\n 'poiset': r'\\bm{\\psi}',\n 'nuisset': r'\\bm{\\theta}',\n 'fullset': r'\\bm{\\phi}',\n 'singlefull': r'\\phi',\n 'TeV': r'\\textrm{TeV}',\n }\n },\n}\n\n# c.f. https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder\nlinkcheck_ignore = [\n 'cli.html#pyhf-xml2json',\n # https://doi.org/10.31526/lhep.2020.158 is causing linkcheck connection timeouts in CI\n r'https://doi\\.org/10\\.31526/.*',\n # https://doi.org/10.1051/epjconf/x DOI URLs will periodically generate 500 Server Error\n r'https://doi\\.org/10\\.1051/epjconf/.*',\n # https://indico.desy.de/event/22731/contributions/47953/ is frequently generating 403 Client Error\n r'https://indico.desy.de/event/22731/.*',\n # https://indico.belle2.org/event/8470/contributions/55871/ is frequently generating 403 Client Error\n r'https://indico.belle2.org/event/8470/.*',\n # CERN doesn't maintain its SSL certs well enough to not have SSLErrors\n r'https://twiki.cern.ch/.*',\n # tags for a release won't exist until it is made, but the release notes\n # and ReadTheDocs need to reference them\n r'https://github.com/scikit-hep/pyhf/releases/tag/.*',\n r'https://pyhf.readthedocs.io/en/.*',\n]\nlinkcheck_retries = 50\n\n# JupyterLite configuration\njupyterlite_dir = \"lite\"\n", "path": "docs/conf.py" } ]
[ { "content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use Path('../relative_path_to_dir').resolve() to make it absolute, like shown here.\n\nimport sys\nfrom pathlib import Path\n\nimport jupytext\nfrom pkg_resources import get_distribution\n\nsys.path.insert(0, str(Path('./exts').resolve()))\n\n# Convert jupyterlite example to ipynb\ndocs_dir = Path(__file__).resolve().parent\npy_percent_as_notebook = jupytext.read(docs_dir / \"lite\" / \"jupyterlite.py\")\njupytext.write(\n py_percent_as_notebook, docs_dir / \"lite\" / \"jupyterlite.ipynb\", fmt=\"ipynb\"\n)\n\n\ndef setup(app):\n app.add_css_file(\n 'https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.2/gh-fork-ribbon.min.css'\n )\n\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n 'sphinx.ext.autodoc',\n 'sphinx.ext.autosummary',\n 'sphinx.ext.coverage',\n 'sphinx.ext.mathjax',\n 'sphinx.ext.ifconfig',\n 'sphinx.ext.viewcode',\n 'sphinx.ext.githubpages',\n 'sphinx.ext.intersphinx',\n 'sphinx_rtd_theme',\n 'sphinxcontrib.bibtex',\n 'sphinx.ext.napoleon',\n 'sphinx_click.ext',\n 'nbsphinx',\n 'sphinx_issues',\n 'sphinx_copybutton',\n 'xref',\n 'jupyterlite_sphinx',\n]\nbibtex_bibfiles = [\n \"bib/docs.bib\",\n \"bib/HEPData_likelihoods.bib\",\n \"bib/media.bib\",\n \"bib/posters.bib\",\n \"bib/preferred.bib\",\n \"bib/talks.bib\",\n \"bib/tutorials.bib\",\n \"bib/use_citations.bib\",\n \"bib/general_citations.bib\",\n]\nbibtex_default_style = \"unsrt\"\n\n# external links\nxref_links = {\"arXiv:1007.1727\": (\"[1007.1727]\", \"https://arxiv.org/abs/1007.1727\")}\n\nintersphinx_mapping = {\n 'python': ('https://docs.python.org/3', None),\n 'numpy': ('https://numpy.org/doc/stable/', None),\n 'scipy': ('https://docs.scipy.org/doc/scipy/', None),\n 'matplotlib': ('https://matplotlib.org/stable/', None),\n 'iminuit': ('https://iminuit.readthedocs.io/en/stable/', None),\n 'uproot': ('https://uproot.readthedocs.io/en/latest/', None),\n 'jsonpatch': ('https://python-json-patch.readthedocs.io/en/latest/', None),\n}\n\n# GitHub repo\nissues_github_path = 'scikit-hep/pyhf'\n\n# Generate the API documentation when building\nautosummary_generate = True\nnumpydoc_show_class_members = False\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\nsource_suffix = ['.rst', '.md']\n# source_suffix = '.rst'\n\n# The encoding of source files.\n#\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = 'pyhf'\ncopyright = '2018, Lukas Heinrich, Matthew Feickert, Giordon Stark'\nauthor = 'Lukas Heinrich, Matthew Feickert, Giordon Stark'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n# The full version, including alpha/beta/rc tags.\nrelease = get_distribution('pyhf').version\n# for example take major/minor/patch\nversion = '.'.join(release.split('.')[:3])\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = \"en\"\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#\n# today = ''\n#\n# Else, today_fmt is used as the format for a strftime call.\n#\n# today_fmt = '%B %d, %Y'\n\nautodoc_mock_imports = [\n 'tensorflow',\n 'torch',\n 'jax',\n 'iminuit',\n 'tensorflow_probability',\n]\n\n\n_type_aliases_inverted = {\n 'pyhf.typing': [\n 'PathOrStr',\n 'ParameterBase',\n 'Parameter',\n 'Measurement',\n 'ModifierBase',\n 'NormSys',\n 'NormFactor',\n 'HistoSys',\n 'StatError',\n 'ShapeSys',\n 'ShapeFactor',\n 'LumiSys',\n 'Modifier',\n 'Sample',\n 'Channel',\n 'Observation',\n 'Workspace',\n 'Literal',\n ],\n 'numpy.typing': ['ArrayLike', 'DTypeLike', 'NBitBase', 'NDArray'],\n}\nautodoc_type_aliases = {\n item: f'{k}.{item}' for k, v in _type_aliases_inverted.items() for item in v\n}\n\nautodoc_typehints_format = 'fully-qualified'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = [\n '_build',\n 'JOSS',\n 'lite',\n '**.ipynb_checkpoints',\n 'examples/experiments/edwardpyhf.ipynb',\n 'examples/notebooks/ImpactPlot.ipynb',\n 'examples/notebooks/Recast.ipynb',\n 'examples/notebooks/StatError.ipynb',\n 'examples/notebooks/example-tensorflow.ipynb',\n 'examples/notebooks/histogrammar.ipynb',\n 'examples/notebooks/histosys.ipynb',\n 'examples/notebooks/histosys-pytorch.ipynb',\n 'examples/notebooks/importxml.ipynb',\n 'examples/notebooks/multichannel-coupled-normsys.ipynb',\n 'examples/notebooks/multichannel-normsys.ipynb',\n 'examples/notebooks/normsys.ipynb',\n 'examples/notebooks/pullplot.ipynb',\n 'examples/notebooks/pytorch_tests_onoff.ipynb',\n 'examples/notebooks/tensorflow-limit.ipynb',\n]\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n#\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#\n# show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n# keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages. See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'sphinx_rtd_theme'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further. For a list of options available for each theme, see the\n# documentation.\n#\nhtml_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\nhtml_theme_path = []\n\n# The name for this set of Sphinx documents.\n# \"<project> v<release> documentation\" by default.\n#\n# html_title = u'pyhf v0.3.0'\n\n# A shorter title for the navigation bar. Default is the same as html_title.\n#\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#\n# html_logo = None\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#\n# html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\nhtml_css_files = [\n 'css/custom.css',\n]\n\nhtml_js_files = [\n 'js/custom.js',\n (\n 'https://views.scientific-python.org/js/plausible.js',\n {\"data-domain\": \"pyhf.readthedocs.io\", \"defer\": \"defer\"},\n ),\n]\n\n# Add any extra paths that contain custom files (such as robots.txt or\n# .htaccess) here, relative to this directory. These files are copied\n# directly to the root of the documentation.\n#\nhtml_extra_path = ['_extras']\n\n# If not None, a 'Last updated on:' timestamp is inserted at every page\n# bottom, using the given strftime format.\n# The empty string is equivalent to '%b %d, %Y'.\n#\n# html_last_updated_fmt = None\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#\n# html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#\n# html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#\n# html_additional_pages = {}\n\n# If false, no module index is generated.\n#\n# html_domain_indices = True\n\n# If false, no index is generated.\n#\n# html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#\n# html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#\n# html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#\n# html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#\n# html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it. The value of this option must be the\n# base URL from which the finished HTML is served.\n#\n# html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n# html_file_suffix = None\n\n# Language to be used for generating the HTML full-text search index.\n# Sphinx supports the following languages:\n# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'\n# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'\n#\n# html_search_language = 'en'\n\n# A dictionary with options for the search language support, empty by default.\n# 'ja' uses this config value.\n# 'zh' user can custom change `jieba` dictionary path.\n#\n# html_search_options = {'type': 'default'}\n\n# The name of a javascript file (relative to the configuration directory) that\n# implements a search results scorer. If empty, the default will be used.\n#\n# html_search_scorer = 'scorer.js'\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'pyhfdoc'\n\n# sphinx-copybutton configuration\ncopybutton_prompt_text = r\">>> |\\.\\.\\. |\\$ \"\ncopybutton_prompt_is_regexp = True\ncopybutton_here_doc_delimiter = \"EOF\"\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n # The paper size ('letterpaper' or 'a4paper').\n #\n # 'papersize': 'letterpaper',\n # The font size ('10pt', '11pt' or '12pt').\n #\n # 'pointsize': '10pt',\n # Additional stuff for the LaTeX preamble.\n #\n # 'preamble': '',\n # Latex figure (float) alignment\n #\n # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n# author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n (\n master_doc,\n 'pyhf.tex',\n 'pyhf Documentation',\n 'Lukas Heinrich, Matthew Feickert, Giordon Stark',\n 'manual',\n )\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#\n# latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#\n# latex_use_parts = False\n\n# If true, show page references after internal links.\n#\n# latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#\n# latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#\n# latex_appendices = []\n\n# It false, will not define \\strong, \\code, \titleref, \\crossref ... but only\n# \\sphinxstrong, ..., \\sphinxtitleref, ... To help avoid clash with user added\n# packages.\n#\n# latex_keep_old_macro_names = True\n\n# If false, no module index is generated.\n#\n# latex_domain_indices = True\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [(master_doc, 'pyhf', 'pyhf Documentation', [author], 1)]\n\n# If true, show URL addresses after external links.\n#\n# man_show_urls = False\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n# dir menu entry, description, category)\ntexinfo_documents = [\n (\n master_doc,\n 'pyhf',\n 'pyhf Documentation',\n author,\n 'pyhf',\n 'One line description of project.',\n 'Miscellaneous',\n )\n]\n\n# Documents to append as an appendix to all manuals.\n#\n# texinfo_appendices = []\n\n# If false, no module index is generated.\n#\n# texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#\n# texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n#\n# texinfo_no_detailmenu = False\n\nmathjax3_config = {\n 'tex2jax': {'inlineMath': [['$', '$'], ['\\\\(', '\\\\)']]},\n 'tex': {\n 'macros': {\n 'bm': [\"\\\\boldsymbol{#1}\", 1], # \\usepackage{bm}, see mathjax/MathJax#1219\n 'HiFa': r'\\texttt{HistFactory}',\n 'Root': r'\\texttt{ROOT}',\n 'RooStats': r'\\texttt{RooStats}',\n 'RooFit': r'\\texttt{RooFit}',\n 'pyhf': r'\\texttt{pyhf}',\n 'CLs': r'\\mathrm{CL}_{s}',\n 'freeset': r'\\bm{\\eta}',\n 'constrset': r'\\bm{\\chi}',\n 'singleconstr': r'\\chi',\n 'channelcounts': r'\\bm{n}',\n 'auxdata': r'\\bm{a}',\n 'poiset': r'\\bm{\\psi}',\n 'nuisset': r'\\bm{\\theta}',\n 'fullset': r'\\bm{\\phi}',\n 'singlefull': r'\\phi',\n 'TeV': r'\\textrm{TeV}',\n }\n },\n}\n\n# c.f. https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder\nlinkcheck_ignore = [\n 'cli.html#pyhf-xml2json',\n # https://doi.org/10.31526/lhep.2020.158 is causing linkcheck connection timeouts in CI\n r'https://doi\\.org/10\\.31526/.*',\n # https://doi.org/10.1051/epjconf/x DOI URLs will periodically generate 500 Server Error\n r'https://doi\\.org/10\\.1051/epjconf/.*',\n # https://indico.desy.de/event/22731/contributions/47953/ is frequently generating 403 Client Error\n r'https://indico.desy.de/event/22731/.*',\n # https://indico.belle2.org/event/8470/contributions/55871/ is frequently generating 403 Client Error\n r'https://indico.belle2.org/event/8470/.*',\n # CERN doesn't maintain its SSL certs well enough to not have SSLErrors\n r'https://twiki.cern.ch/.*',\n # tags for a release won't exist until it is made, but the release notes\n # and ReadTheDocs need to reference them\n r'https://github.com/scikit-hep/pyhf/releases/tag/.*',\n r'https://pyhf.readthedocs.io/en/.*',\n]\nlinkcheck_retries = 50\n\n# JupyterLite configuration\n# Use Path as jupyterlite-sphinx expects PosixPath\njupyterlite_dir = Path(\"lite\")\n", "path": "docs/conf.py" } ]
diff --git a/docs/conf.py b/docs/conf.py index 062f1f5eb7..c119cd0de8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -529,4 +529,5 @@ def setup(app): linkcheck_retries = 50 # JupyterLite configuration -jupyterlite_dir = "lite" +# Use Path as jupyterlite-sphinx expects PosixPath +jupyterlite_dir = Path("lite")
rotki__rotki-2192
Suport the v2 Aave tokens ## Abstract The v2 Aave tokens are detected thanks to the defi SDK and taken into account in the balance query. But they are not shown in the dashboard. ## Task Add support for them and also show them in the Dashboard
[ { "content": "from dataclasses import dataclass, field\nfrom functools import total_ordering\nfrom typing import Any, Optional, Type, TypeVar\n\nfrom rotkehlchen.assets.resolver import AssetResolver\nfrom rotkehlchen.errors import DeserializationError, UnknownAsset, UnsupportedAsset\nfrom rotkehlchen.typing import AssetType, ChecksumEthAddress, EthTokenInfo, Timestamp\n\nWORLD_TO_BITTREX = {\n # In Rotkehlchen Bitswift is BITS-2 but in Bittrex it's BITS\n 'BITS-2': 'BITS',\n # In Rotkehlchen NuBits is USNBT but in Bittrex it's NBT\n 'USNBT': 'NBT',\n # In Rotkehlchen BTM-2 is Bytom but in Bittrex it's BTM\n 'BTM-2': 'BTM',\n # In Rotkehlchen PAI-2 is PCHAIN token but in Bittrex it's PI\n 'PAI-2': 'PI',\n # In Rotkehlchen PLA-2 is Playchip but in Bittrex is PLA\n 'PLA-2': 'PLA',\n # In Rotkehlchen sUSD is Synt USD but in Bittrex it's SUSD\n 'sUSD': 'SUSD',\n # In Rotkehlchen LUNA-2 is Terra Luna but in Bittrex it's LUNA\n 'LUNA-2': 'LUNA',\n # In Rotkehlchen WorldWideAssetExchange is WAX but in Bittrex it's WASP\n 'WAX': 'WAXP',\n # In Rotkehlchen Validity is RADS, the old name but in Bittrex it's VAL\n 'RADS': 'VAL',\n}\n\nWORLD_TO_POLONIEX = {\n # AIR-2 is aircoin for us and AIR is airtoken. Poloniex has only aircoin\n 'AIR-2': 'AIR',\n # Decentr is DEC-2 for us but DEC in Poloniex\n 'DEC-2': 'DEC',\n # Poloniex delisted BCH and listed it as BCHABC after the Bitcoin Cash\n # ABC / SV fork. In Rotkehlchen we consider BCH to be the same as BCHABC\n 'BCH': 'BCHABC',\n # Poloniex has the BCH Fork, Bitcoin Satoshi's vision listed as BCHSV.\n # We know it as BSV\n 'BSV': 'BCHSV',\n # Caishen is known as CAI in Poloniex. This is before the swap to CAIX\n 'CAIX': 'CAI',\n # CCN is Cannacoin in Poloniex but in Rotkehlchen we know it as CCN-2\n 'CCN-2': 'CCN',\n # CCN is CustomContractNetwork in Rotkehlchen but does not exist in Cryptocompare\n # Putting it as conversion to make sure we don't accidentally ask for wrong price\n 'CCN': '',\n 'cUSDT': 'CUSDT',\n # Faircoin is known as FAIR outside of Poloniex. Seems to be the same as the\n # now delisted Poloniex's FAC if you look at the bitcointalk announcement\n # https://bitcointalk.org/index.php?topic=702675.0\n 'FAIR': 'FAC',\n # KeyCoin in Poloniex is KEY but in Rotkehlchen it's KEY-3\n 'KEY-3': 'KEY',\n # Mazacoin in Poloniex is MZC but in Rotkehlchen it's MAZA\n 'MAZA': 'MZC',\n # Myriadcoin in Poloniex is MYR but in Rotkehlchen it's XMY\n 'XMY': 'MYR',\n # NuBits in Poloniex is NBT but in Rotkehlchen it's USNBT\n 'USNBT': 'NBT',\n # Stellar is XLM everywhere, apart from Poloniex\n 'XLM': 'STR',\n # Poloniex still has the old name WC for WhiteCoin\n 'XWC': 'WC',\n # Poloniex uses a different name for 1inch. Maybe due to starting with number?\n '1INCH': 'ONEINCH',\n}\n\nWORLD_TO_KRAKEN = {\n 'ATOM': 'ATOM',\n 'ALGO': 'ALGO',\n 'AUD': 'ZAUD',\n 'BAT': 'BAT',\n 'COMP': 'COMP',\n 'DOT': 'DOT',\n 'KAVA': 'KAVA',\n 'KNC': 'KNC',\n 'LINK': 'LINK',\n 'BSV': 'BSV',\n 'ETC': 'XETC',\n 'ETH': 'XETH',\n 'LTC': 'XLTC',\n 'REP': 'XREP',\n 'BTC': 'XXBT',\n 'XMR': 'XXMR',\n 'XRP': 'XXRP',\n 'ZEC': 'XZEC',\n 'EUR': 'ZEUR',\n 'USD': 'ZUSD',\n 'GBP': 'ZGBP',\n 'CAD': 'ZCAD',\n 'JPY': 'ZJPY',\n 'CHF': 'CHF',\n 'KRW': 'ZKRW',\n 'REPV2': 'REPV2',\n 'DAO': 'XDAO',\n 'MLN': 'XMLN',\n 'ICN': 'XICN',\n 'GNO': 'GNO',\n 'BCH': 'BCH',\n 'XLM': 'XXLM',\n 'DASH': 'DASH',\n 'EOS': 'EOS',\n 'USDC': 'USDC',\n 'USDT': 'USDT',\n 'KFEE': 'KFEE',\n 'ADA': 'ADA',\n 'QTUM': 'QTUM',\n 'NMC': 'XNMC',\n 'VEN': 'XXVN',\n 'DOGE': 'XXDG',\n 'DAI': 'DAI',\n 'XTZ': 'XTZ',\n 'WAVES': 'WAVES',\n 'ICX': 'ICX',\n 'NANO': 'NANO',\n 'OMG': 'OMG',\n 'SC': 'SC',\n 'PAXG': 'PAXG',\n 'LSK': 'LSK',\n 'TRX': 'TRX',\n 'OXT': 'OXT',\n 'STORJ': 'STORJ',\n 'BAL': 'BAL',\n 'KSM': 'KSM',\n 'CRV': 'CRV',\n 'SNX': 'SNX',\n 'FIL': 'FIL',\n 'UNI': 'UNI',\n 'YFI': 'YFI',\n 'ANT': 'ANT',\n 'KEEP': 'KEEP',\n 'TBTC': 'TBTC',\n 'ETH2': 'ETH2',\n 'AAVE': 'AAVE',\n 'MANA': 'MANA',\n 'GRT': 'GRT',\n}\n\nWORLD_TO_BINANCE = {\n # When BCH forked to BCHABC and BCHSV, binance renamed the original to ABC\n 'BCH': 'BCHABC',\n 'BSV': 'BCHSV',\n # ETHOS is known as BQX in Binance\n 'ETHOS': 'BQX',\n # GXChain is GXS in Binance but GXC in Rotkehlchen\n 'GXC': 'GXS',\n # Luna Terra is LUNA-2 in rotki\n 'LUNA-2': 'LUNA',\n # YOYOW is known as YOYO in Binance\n 'YOYOW': 'YOYO',\n # Solana is SOL-2 in rotki\n 'SOL-2': 'SOL',\n # BETH is the eth staked in beacon chain\n 'BETH': 'ETH2',\n}\n\nWORLD_TO_BITFINEX = {\n 'BCH': 'BCHABC',\n 'CNY': 'CNH',\n 'DOGE': 'DOG',\n 'REPV2': 'REP',\n 'TRIO': 'TRI',\n 'ZB': 'ZBT',\n}\n\nWORLD_TO_ICONOMI = {\n # In Rotkehlchen LUNA-2 is Terra Luna but in Bittrex it's LUNA\n 'LUNA-2': 'LUNA',\n}\n\n\n@total_ordering\n@dataclass(init=True, repr=True, eq=False, order=False, unsafe_hash=False, frozen=True)\nclass Asset():\n identifier: str\n name: str = field(init=False)\n symbol: str = field(init=False)\n active: bool = field(init=False)\n asset_type: AssetType = field(init=False)\n started: Timestamp = field(init=False)\n ended: Optional[Timestamp] = field(init=False)\n forked: Optional[str] = field(init=False)\n swapped_for: Optional[str] = field(init=False)\n # None means no special mapping. '' means not supported\n cryptocompare: Optional[str] = field(init=False)\n coingecko: Optional[str] = field(init=False)\n\n def __post_init__(self) -> None:\n \"\"\"\n Asset post initialization\n\n The only thing that is given to initialize an asset is a string.\n\n If a non string is given then it's probably a deserialization error or\n invalid data were given to us by the server if an API was queried.\n \"\"\"\n if not isinstance(self.identifier, str):\n raise DeserializationError(\n 'Tried to initialize an asset out of a non-string identifier',\n )\n\n canonical_id = AssetResolver().is_identifier_canonical(self.identifier)\n if canonical_id is None:\n raise UnknownAsset(self.identifier)\n # else let's make sure we got the canonical id in our data struct\n object.__setattr__(self, 'identifier', canonical_id)\n\n data = AssetResolver().get_asset_data(self.identifier)\n # Ugly hack to set attributes of a frozen data class as post init\n # https://docs.python.org/3/library/dataclasses.html#frozen-instances\n object.__setattr__(self, 'name', data.name)\n object.__setattr__(self, 'symbol', data.symbol)\n object.__setattr__(self, 'active', data.active)\n object.__setattr__(self, 'asset_type', data.asset_type)\n object.__setattr__(self, 'started', data.started)\n object.__setattr__(self, 'ended', data.ended)\n object.__setattr__(self, 'forked', data.forked)\n object.__setattr__(self, 'swapped_for', data.swapped_for)\n object.__setattr__(self, 'cryptocompare', data.cryptocompare)\n object.__setattr__(self, 'coingecko', data.coingecko)\n\n def serialize(self) -> str:\n return self.identifier\n\n def is_fiat(self) -> bool:\n return self.asset_type == AssetType.FIAT\n\n def is_eth_token(self) -> bool:\n return self.asset_type in (AssetType.ETH_TOKEN, AssetType.ETH_TOKEN_AND_MORE)\n\n def __str__(self) -> str:\n return self.name\n\n def __repr__(self) -> str:\n return f'<Asset identifier:{self.identifier} name:{self.name} symbol:{self.symbol}>'\n\n def to_kraken(self) -> str:\n return WORLD_TO_KRAKEN[self.identifier]\n\n def to_bitfinex(self) -> str:\n return WORLD_TO_BITFINEX.get(self.identifier, self.identifier)\n\n def to_bittrex(self) -> str:\n return WORLD_TO_BITTREX.get(self.identifier, self.identifier)\n\n def to_binance(self) -> str:\n return WORLD_TO_BINANCE.get(self.identifier, self.identifier)\n\n def to_cryptocompare(self) -> str:\n \"\"\"Returns the symbol with which to query cryptocompare for the asset\n\n May raise:\n - UnsupportedAsset() if the asset is not supported by cryptocompare\n \"\"\"\n cryptocompare_str = self.identifier if self.cryptocompare is None else self.cryptocompare\n # There is an asset which should not be queried in cryptocompare\n if cryptocompare_str == '':\n raise UnsupportedAsset(f'{self.identifier} is not supported by cryptocompare')\n\n # Seems cryptocompare capitalizes everything. So cDAI -> CDAI\n return cryptocompare_str.upper()\n\n def to_coingecko(self) -> str:\n \"\"\"Returns the symbol with which to query coingecko for the asset\n\n May raise:\n - UnsupportedAsset() if the asset is not supported by coingecko\n \"\"\"\n coingecko_str = self.identifier if self.coingecko is None else self.coingecko\n # There is an asset which should not be queried in cryptocompare\n if coingecko_str == '':\n raise UnsupportedAsset(f'{self.identifier} is not supported by coingecko')\n return coingecko_str\n\n def has_coingecko(self) -> bool:\n return self.coingecko is not None and self.coingecko != ''\n\n def __hash__(self) -> int:\n return hash(self.identifier)\n\n def __eq__(self, other: Any) -> bool:\n if other is None:\n return False\n\n if isinstance(other, Asset):\n return self.identifier == other.identifier\n if isinstance(other, str):\n return self.identifier == other\n # else\n raise ValueError(f'Invalid comparison of asset with {type(other)}')\n\n def __ne__(self, other: Any) -> bool:\n return not self.__eq__(other)\n\n def __lt__(self, other: Any) -> bool:\n if isinstance(other, Asset):\n return self.identifier < other.identifier\n if isinstance(other, str):\n return self.identifier < other\n # else\n raise ValueError(f'Invalid comparison of asset with {type(other)}')\n\n\n@dataclass(init=True, repr=True, eq=False, order=False, unsafe_hash=False, frozen=True)\nclass HasEthereumToken(Asset):\n \"\"\" Marker to denote assets having an Ethereum token address \"\"\"\n ethereum_address: ChecksumEthAddress = field(init=False)\n decimals: int = field(init=False)\n\n def __post_init__(self) -> None:\n super().__post_init__()\n data = AssetResolver().get_asset_data(self.identifier) # pylint: disable=no-member\n\n if not data.ethereum_address:\n raise DeserializationError(\n 'Tried to initialize a non Ethereum asset as Ethereum Token',\n )\n\n object.__setattr__(self, 'ethereum_address', data.ethereum_address)\n object.__setattr__(self, 'decimals', data.decimals)\n\n\n# Create a generic variable that can be 'EthereumToken', or any subclass.\nT = TypeVar('T', bound='EthereumToken')\n\n\n@dataclass(init=True, repr=True, eq=False, order=False, unsafe_hash=False, frozen=True)\nclass EthereumToken(HasEthereumToken):\n\n def token_info(self) -> EthTokenInfo:\n return EthTokenInfo(\n identifier=self.identifier,\n address=self.ethereum_address,\n symbol=self.symbol,\n name=self.name,\n decimals=self.decimals,\n )\n\n @classmethod\n def from_asset(cls: Type[T], asset: Asset) -> Optional[T]:\n \"\"\"Attempts to turn an asset into an EthereumToken. If it fails returns None\"\"\"\n try:\n return cls(asset.identifier)\n except DeserializationError:\n return None\n", "path": "rotkehlchen/assets/asset.py" } ]
[ { "content": "from dataclasses import dataclass, field\nfrom functools import total_ordering\nfrom typing import Any, Optional, Type, TypeVar\n\nfrom rotkehlchen.assets.resolver import AssetResolver\nfrom rotkehlchen.errors import DeserializationError, UnknownAsset, UnsupportedAsset\nfrom rotkehlchen.typing import AssetType, ChecksumEthAddress, EthTokenInfo, Timestamp\n\nWORLD_TO_BITTREX = {\n # In Rotkehlchen Bitswift is BITS-2 but in Bittrex it's BITS\n 'BITS-2': 'BITS',\n # In Rotkehlchen NuBits is USNBT but in Bittrex it's NBT\n 'USNBT': 'NBT',\n # In Rotkehlchen BTM-2 is Bytom but in Bittrex it's BTM\n 'BTM-2': 'BTM',\n # In Rotkehlchen PAI-2 is PCHAIN token but in Bittrex it's PI\n 'PAI-2': 'PI',\n # In Rotkehlchen PLA-2 is Playchip but in Bittrex is PLA\n 'PLA-2': 'PLA',\n # In Rotkehlchen sUSD is Synt USD but in Bittrex it's SUSD\n 'sUSD': 'SUSD',\n # In Rotkehlchen LUNA-2 is Terra Luna but in Bittrex it's LUNA\n 'LUNA-2': 'LUNA',\n # In Rotkehlchen WorldWideAssetExchange is WAX but in Bittrex it's WASP\n 'WAX': 'WAXP',\n # In Rotkehlchen Validity is RADS, the old name but in Bittrex it's VAL\n 'RADS': 'VAL',\n}\n\nWORLD_TO_POLONIEX = {\n # AIR-2 is aircoin for us and AIR is airtoken. Poloniex has only aircoin\n 'AIR-2': 'AIR',\n # Decentr is DEC-2 for us but DEC in Poloniex\n 'DEC-2': 'DEC',\n # Poloniex delisted BCH and listed it as BCHABC after the Bitcoin Cash\n # ABC / SV fork. In Rotkehlchen we consider BCH to be the same as BCHABC\n 'BCH': 'BCHABC',\n # Poloniex has the BCH Fork, Bitcoin Satoshi's vision listed as BCHSV.\n # We know it as BSV\n 'BSV': 'BCHSV',\n # Caishen is known as CAI in Poloniex. This is before the swap to CAIX\n 'CAIX': 'CAI',\n # CCN is Cannacoin in Poloniex but in Rotkehlchen we know it as CCN-2\n 'CCN-2': 'CCN',\n # CCN is CustomContractNetwork in Rotkehlchen but does not exist in Cryptocompare\n # Putting it as conversion to make sure we don't accidentally ask for wrong price\n 'CCN': '',\n 'cUSDT': 'CUSDT',\n # Faircoin is known as FAIR outside of Poloniex. Seems to be the same as the\n # now delisted Poloniex's FAC if you look at the bitcointalk announcement\n # https://bitcointalk.org/index.php?topic=702675.0\n 'FAIR': 'FAC',\n # KeyCoin in Poloniex is KEY but in Rotkehlchen it's KEY-3\n 'KEY-3': 'KEY',\n # Mazacoin in Poloniex is MZC but in Rotkehlchen it's MAZA\n 'MAZA': 'MZC',\n # Myriadcoin in Poloniex is MYR but in Rotkehlchen it's XMY\n 'XMY': 'MYR',\n # NuBits in Poloniex is NBT but in Rotkehlchen it's USNBT\n 'USNBT': 'NBT',\n # Stellar is XLM everywhere, apart from Poloniex\n 'XLM': 'STR',\n # Poloniex still has the old name WC for WhiteCoin\n 'XWC': 'WC',\n # Poloniex uses a different name for 1inch. Maybe due to starting with number?\n '1INCH': 'ONEINCH',\n}\n\nWORLD_TO_KRAKEN = {\n 'ATOM': 'ATOM',\n 'ALGO': 'ALGO',\n 'AUD': 'ZAUD',\n 'BAT': 'BAT',\n 'COMP': 'COMP',\n 'DOT': 'DOT',\n 'KAVA': 'KAVA',\n 'KNC': 'KNC',\n 'LINK': 'LINK',\n 'BSV': 'BSV',\n 'ETC': 'XETC',\n 'ETH': 'XETH',\n 'LTC': 'XLTC',\n 'REP': 'XREP',\n 'BTC': 'XXBT',\n 'XMR': 'XXMR',\n 'XRP': 'XXRP',\n 'ZEC': 'XZEC',\n 'EUR': 'ZEUR',\n 'USD': 'ZUSD',\n 'GBP': 'ZGBP',\n 'CAD': 'ZCAD',\n 'JPY': 'ZJPY',\n 'CHF': 'CHF',\n 'KRW': 'ZKRW',\n 'REPV2': 'REPV2',\n 'DAO': 'XDAO',\n 'MLN': 'XMLN',\n 'ICN': 'XICN',\n 'GNO': 'GNO',\n 'BCH': 'BCH',\n 'XLM': 'XXLM',\n 'DASH': 'DASH',\n 'EOS': 'EOS',\n 'USDC': 'USDC',\n 'USDT': 'USDT',\n 'KFEE': 'KFEE',\n 'ADA': 'ADA',\n 'QTUM': 'QTUM',\n 'NMC': 'XNMC',\n 'VEN': 'XXVN',\n 'DOGE': 'XXDG',\n 'DAI': 'DAI',\n 'XTZ': 'XTZ',\n 'WAVES': 'WAVES',\n 'ICX': 'ICX',\n 'NANO': 'NANO',\n 'OMG': 'OMG',\n 'SC': 'SC',\n 'PAXG': 'PAXG',\n 'LSK': 'LSK',\n 'TRX': 'TRX',\n 'OXT': 'OXT',\n 'STORJ': 'STORJ',\n 'BAL': 'BAL',\n 'KSM': 'KSM',\n 'CRV': 'CRV',\n 'SNX': 'SNX',\n 'FIL': 'FIL',\n 'UNI': 'UNI',\n 'YFI': 'YFI',\n 'ANT': 'ANT',\n 'KEEP': 'KEEP',\n 'TBTC': 'TBTC',\n 'ETH2': 'ETH2',\n 'AAVE': 'AAVE',\n 'MANA': 'MANA',\n 'GRT': 'GRT',\n 'FLOW': 'FLOW',\n}\n\nWORLD_TO_BINANCE = {\n # When BCH forked to BCHABC and BCHSV, binance renamed the original to ABC\n 'BCH': 'BCHABC',\n 'BSV': 'BCHSV',\n # ETHOS is known as BQX in Binance\n 'ETHOS': 'BQX',\n # GXChain is GXS in Binance but GXC in Rotkehlchen\n 'GXC': 'GXS',\n # Luna Terra is LUNA-2 in rotki\n 'LUNA-2': 'LUNA',\n # YOYOW is known as YOYO in Binance\n 'YOYOW': 'YOYO',\n # Solana is SOL-2 in rotki\n 'SOL-2': 'SOL',\n # BETH is the eth staked in beacon chain\n 'BETH': 'ETH2',\n}\n\nWORLD_TO_BITFINEX = {\n 'BCH': 'BCHABC',\n 'CNY': 'CNH',\n 'DOGE': 'DOG',\n 'REPV2': 'REP',\n 'TRIO': 'TRI',\n 'ZB': 'ZBT',\n}\n\nWORLD_TO_ICONOMI = {\n # In Rotkehlchen LUNA-2 is Terra Luna but in Bittrex it's LUNA\n 'LUNA-2': 'LUNA',\n}\n\n\n@total_ordering\n@dataclass(init=True, repr=True, eq=False, order=False, unsafe_hash=False, frozen=True)\nclass Asset():\n identifier: str\n name: str = field(init=False)\n symbol: str = field(init=False)\n active: bool = field(init=False)\n asset_type: AssetType = field(init=False)\n started: Timestamp = field(init=False)\n ended: Optional[Timestamp] = field(init=False)\n forked: Optional[str] = field(init=False)\n swapped_for: Optional[str] = field(init=False)\n # None means no special mapping. '' means not supported\n cryptocompare: Optional[str] = field(init=False)\n coingecko: Optional[str] = field(init=False)\n\n def __post_init__(self) -> None:\n \"\"\"\n Asset post initialization\n\n The only thing that is given to initialize an asset is a string.\n\n If a non string is given then it's probably a deserialization error or\n invalid data were given to us by the server if an API was queried.\n \"\"\"\n if not isinstance(self.identifier, str):\n raise DeserializationError(\n 'Tried to initialize an asset out of a non-string identifier',\n )\n\n canonical_id = AssetResolver().is_identifier_canonical(self.identifier)\n if canonical_id is None:\n raise UnknownAsset(self.identifier)\n # else let's make sure we got the canonical id in our data struct\n object.__setattr__(self, 'identifier', canonical_id)\n\n data = AssetResolver().get_asset_data(self.identifier)\n # Ugly hack to set attributes of a frozen data class as post init\n # https://docs.python.org/3/library/dataclasses.html#frozen-instances\n object.__setattr__(self, 'name', data.name)\n object.__setattr__(self, 'symbol', data.symbol)\n object.__setattr__(self, 'active', data.active)\n object.__setattr__(self, 'asset_type', data.asset_type)\n object.__setattr__(self, 'started', data.started)\n object.__setattr__(self, 'ended', data.ended)\n object.__setattr__(self, 'forked', data.forked)\n object.__setattr__(self, 'swapped_for', data.swapped_for)\n object.__setattr__(self, 'cryptocompare', data.cryptocompare)\n object.__setattr__(self, 'coingecko', data.coingecko)\n\n def serialize(self) -> str:\n return self.identifier\n\n def is_fiat(self) -> bool:\n return self.asset_type == AssetType.FIAT\n\n def is_eth_token(self) -> bool:\n return self.asset_type in (AssetType.ETH_TOKEN, AssetType.ETH_TOKEN_AND_MORE)\n\n def __str__(self) -> str:\n return self.name\n\n def __repr__(self) -> str:\n return f'<Asset identifier:{self.identifier} name:{self.name} symbol:{self.symbol}>'\n\n def to_kraken(self) -> str:\n return WORLD_TO_KRAKEN[self.identifier]\n\n def to_bitfinex(self) -> str:\n return WORLD_TO_BITFINEX.get(self.identifier, self.identifier)\n\n def to_bittrex(self) -> str:\n return WORLD_TO_BITTREX.get(self.identifier, self.identifier)\n\n def to_binance(self) -> str:\n return WORLD_TO_BINANCE.get(self.identifier, self.identifier)\n\n def to_cryptocompare(self) -> str:\n \"\"\"Returns the symbol with which to query cryptocompare for the asset\n\n May raise:\n - UnsupportedAsset() if the asset is not supported by cryptocompare\n \"\"\"\n cryptocompare_str = self.identifier if self.cryptocompare is None else self.cryptocompare\n # There is an asset which should not be queried in cryptocompare\n if cryptocompare_str == '':\n raise UnsupportedAsset(f'{self.identifier} is not supported by cryptocompare')\n\n # Seems cryptocompare capitalizes everything. So cDAI -> CDAI\n return cryptocompare_str.upper()\n\n def to_coingecko(self) -> str:\n \"\"\"Returns the symbol with which to query coingecko for the asset\n\n May raise:\n - UnsupportedAsset() if the asset is not supported by coingecko\n \"\"\"\n coingecko_str = self.identifier if self.coingecko is None else self.coingecko\n # There is an asset which should not be queried in cryptocompare\n if coingecko_str == '':\n raise UnsupportedAsset(f'{self.identifier} is not supported by coingecko')\n return coingecko_str\n\n def has_coingecko(self) -> bool:\n return self.coingecko is not None and self.coingecko != ''\n\n def __hash__(self) -> int:\n return hash(self.identifier)\n\n def __eq__(self, other: Any) -> bool:\n if other is None:\n return False\n\n if isinstance(other, Asset):\n return self.identifier == other.identifier\n if isinstance(other, str):\n return self.identifier == other\n # else\n raise ValueError(f'Invalid comparison of asset with {type(other)}')\n\n def __ne__(self, other: Any) -> bool:\n return not self.__eq__(other)\n\n def __lt__(self, other: Any) -> bool:\n if isinstance(other, Asset):\n return self.identifier < other.identifier\n if isinstance(other, str):\n return self.identifier < other\n # else\n raise ValueError(f'Invalid comparison of asset with {type(other)}')\n\n\n@dataclass(init=True, repr=True, eq=False, order=False, unsafe_hash=False, frozen=True)\nclass HasEthereumToken(Asset):\n \"\"\" Marker to denote assets having an Ethereum token address \"\"\"\n ethereum_address: ChecksumEthAddress = field(init=False)\n decimals: int = field(init=False)\n\n def __post_init__(self) -> None:\n super().__post_init__()\n data = AssetResolver().get_asset_data(self.identifier) # pylint: disable=no-member\n\n if not data.ethereum_address:\n raise DeserializationError(\n 'Tried to initialize a non Ethereum asset as Ethereum Token',\n )\n\n object.__setattr__(self, 'ethereum_address', data.ethereum_address)\n object.__setattr__(self, 'decimals', data.decimals)\n\n\n# Create a generic variable that can be 'EthereumToken', or any subclass.\nT = TypeVar('T', bound='EthereumToken')\n\n\n@dataclass(init=True, repr=True, eq=False, order=False, unsafe_hash=False, frozen=True)\nclass EthereumToken(HasEthereumToken):\n\n def token_info(self) -> EthTokenInfo:\n return EthTokenInfo(\n identifier=self.identifier,\n address=self.ethereum_address,\n symbol=self.symbol,\n name=self.name,\n decimals=self.decimals,\n )\n\n @classmethod\n def from_asset(cls: Type[T], asset: Asset) -> Optional[T]:\n \"\"\"Attempts to turn an asset into an EthereumToken. If it fails returns None\"\"\"\n try:\n return cls(asset.identifier)\n except DeserializationError:\n return None\n", "path": "rotkehlchen/assets/asset.py" } ]
diff --git a/docs/changelog.rst b/docs/changelog.rst index 5aaa3f0b7f..09374d5db8 100755 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -14,6 +14,7 @@ Changelog * :feature:`2159` Users now won't see empty tables for blockchains without accounts. * :feature:`2155` Users can now additionally filter the uniswap liquidity pools using a pool filter. * :feature:`1865` Users will now see an explanation of the current stage of the profit/loss report's progress along with the completion percentage. +* :feature:`2158` Add support for all current Aaave v2 aTokens. Users will now be able to see them in their dashboard. * :bug:`2117` Users can now properly dismiss notifications with long tiles, or dismiss all the pending notifications at once. * :bug:`2024` Multiple crypto.com csv import debited entries with same timestamp will be handled correctly. * :bug:`2135` Users will now properly see the correct accounting settings when creating a profit/loss report. @@ -28,8 +29,13 @@ Changelog - `Edgeware (EDG) <https://www.coingecko.com/en/coins/edgeware>`__ - `PieDAO Balanced Crypto Pie (BCP) <https://www.coingecko.com/en/coins/piedao-balanced-crypto-pie>`__ - `PieDAO DEFI++ (DEFI++) <https://www.coingecko.com/en/coins/piedao-defi>`__ + - `PieDAO DEFI Small Cap (DEFI+S) <https://www.coingecko.com/en/coins/piedao-defi-small-cap>`__ + - `PieDAO DEFI Large Cap (DEFI+L) <https://www.coingecko.com/en/coins/piedao-defi-large-cap>`__ - `PieDAO BTC++ (BTC++) <https://www.coingecko.com/en/coins/piedao-btc>`__ - `AllianceBlock Token (ALBT) <https://www.coingecko.com/en/coins/allianceblock>`__ + - `Shroom.finance (SHROOM) <https://www.coingecko.com/en/coins/shroom-finance>`__ + - `Invictus Hyperoin Fund (IHF) <https://www.coingecko.com/en/coins/invictus-hyperion-fund>`__ + - `Flow - Dapper labs (FLOW) <https://www.coingecko.com/en/coins/flow>`__ * :release:`1.12.2 <2021-01-18>` * :bug:`2120` Rotki should now display the action datetime when editing a ledger action. diff --git a/rotkehlchen/assets/asset.py b/rotkehlchen/assets/asset.py index 33fa6a809e..1991a296d7 100644 --- a/rotkehlchen/assets/asset.py +++ b/rotkehlchen/assets/asset.py @@ -135,6 +135,7 @@ 'AAVE': 'AAVE', 'MANA': 'MANA', 'GRT': 'GRT', + 'FLOW': 'FLOW', } WORLD_TO_BINANCE = { diff --git a/rotkehlchen/data/all_assets.json b/rotkehlchen/data/all_assets.json index f1778a98fa..6f6dedf797 100644 --- a/rotkehlchen/data/all_assets.json +++ b/rotkehlchen/data/all_assets.json @@ -925,7 +925,7 @@ "type": "ethereum token" }, "B2BX": { - "coingecko": "b2b", + "coingecko": "b2bcoin-2", "cryptocompare": "B2B", "ethereum_address": "0x5d51FCceD3114A8bb5E90cDD0f9d682bCbCC5393", "ethereum_token_decimals": 18, @@ -1186,7 +1186,7 @@ }, "BCP": { "coingecko": "piedao-balanced-crypto-pie", - "cryptocompare": "", + "cryptocompare": "", "ethereum_address": "0xE4f726Adc8e89C6a6017F01eadA77865dB22dA14", "ethereum_token_decimals": 18, "name": "PieDAO Balanced Crypto Pie", @@ -1839,7 +1839,7 @@ }, "BTC++": { "coingecko": "piedao-btc", - "cryptocompare": "", + "cryptocompare": "", "ethereum_address": "0x0327112423F3A68efdF1fcF402F6c5CB9f7C33fd", "ethereum_token_decimals": 18, "name": "PieDAO BTC++ ", @@ -3444,14 +3444,34 @@ }, "DEFI++": { "coingecko": "piedao-defi", - "cryptocompare": "", + "cryptocompare": "", "ethereum_address": "0x8D1ce361eb68e9E05573443C407D4A3Bed23B033", "ethereum_token_decimals": 18, - "name": "PieDAO DEFI++ ", + "name": "PieDAO DEFI++", "started": 1604311938, "symbol": "DEFI++", "type": "ethereum token" }, + "DEFI+S": { + "coingecko": "piedao-defi-small-cap", + "cryptocompare": "", + "ethereum_address": "0xaD6A626aE2B43DCb1B39430Ce496d2FA0365BA9C", + "ethereum_token_decimals": 18, + "name": "PieDAO DEFI Small Cap", + "started": 1602115200, + "symbol": "DEFI+S", + "type": "ethereum token" + }, + "DEFI+L": { + "coingecko": "piedao-defi-large-cap", + "cryptocompare": "", + "ethereum_address": "0x78F225869c08d478c34e5f645d07A87d3fe8eb78", + "ethereum_token_decimals": 18, + "name": "PieDAO DEFI Large Cap", + "started": 1602115200, + "symbol": "DEFI+L", + "type": "ethereum token" + }, "DELTA": { "coingecko": "deltachain", "ethereum_address": "0xDE1E0AE6101b46520cF66fDC0B1059c5cC3d106c", @@ -4947,6 +4967,14 @@ "symbol": "FLOT", "type": "ethereum token" }, + "FLOW": { + "coingecko": "flow", + "cryptocompare": "", + "name": "Flow", + "started": 1611619200, + "symbol": "FLOW", + "type": "own chain" + }, "FLP": { "coingecko": "gameflip", "ethereum_address": "0x3a1Bda28AdB5B0a812a7CF10A1950c920F79BcD3", @@ -11728,7 +11756,7 @@ }, "TORN": { "coingecko": "tornado-cash", - "cryptocompare": "", + "cryptocompare": "", "ethereum_address": "0x77777FeDdddFfC19Ff86DB637967013e6C6A116C", "ethereum_token_decimals": 18, "name": "TornadoCash", @@ -13569,6 +13597,16 @@ "symbol": "aBAT", "type": "ethereum token" }, + "aBATv2": { + "coingecko": "aave-bat", + "cryptocompare": "BAT", + "ethereum_address": "0x05Ec93c0365baAeAbF7AefFb0972ea7ECdD39CF1", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing BAT v2", + "started": 1606832522, + "symbol": "aBAT", + "type": "ethereum token" + }, "aAAVE": { "coingecko": "aave", "cryptocompare": "AAVE", @@ -13579,6 +13617,16 @@ "symbol": "aAAVE", "type": "ethereum token" }, + "aAAVEv2": { + "coingecko": "aave", + "cryptocompare": "AAVE", + "ethereum_address": "0xFFC97d72E13E01096502Cb8Eb52dEe56f74DAD7B", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing Aave Token v2", + "started": 1606832522, + "symbol": "aAAVE", + "type": "ethereum token" + }, "aBUSD": { "coingecko": "aave-busd", "cryptocompare": "BUSD", @@ -13589,6 +13637,26 @@ "symbol": "aBUSD", "type": "ethereum token" }, + "aBUSDv2": { + "coingecko": "aave-busd", + "cryptocompare": "BUSD", + "ethereum_address": "0xA361718326c15715591c299427c62086F69923D9", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing Binance USD v2", + "started": 1606832522, + "symbol": "aBUSD", + "type": "ethereum token" + }, + "aCRV": { + "coingecko": "curve-dao-token", + "cryptocompare": "CRV", + "ethereum_address": "0x8dAE6Cb04688C62d939ed9B68d32Bc62e49970b1", + "ethereum_token_decimals": 18, + "name": "Aave interest bearing CRV", + "started": 1609105615, + "symbol": "aCRV", + "type": "ethereum token" + }, "aDAI": { "coingecko": "aave-dai", "cryptocompare": "DAI", @@ -13599,6 +13667,16 @@ "symbol": "aDAI", "type": "ethereum token" }, + "aDAIv2": { + "coingecko": "aave-dai", + "cryptocompare": "DAI", + "ethereum_address": "0x028171bCA77440897B824Ca71D1c56caC55b68A3", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing DAI v2", + "started": 1606832522, + "symbol": "aDAI", + "type": "ethereum token" + }, "aENJ": { "coingecko": "aave-enj", "cryptocompare": "ENJ", @@ -13609,6 +13687,16 @@ "symbol": "aENJ", "type": "ethereum token" }, + "aENJv2": { + "coingecko": "aave-enj", + "cryptocompare": "ENJ", + "ethereum_address": "0xaC6Df26a590F08dcC95D5a4705ae8abbc88509Ef", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing ENJ v2", + "started": 1606832588, + "symbol": "aENJ", + "type": "ethereum token" + }, "aETH": { "coingecko": "aave-eth", "cryptocompare": "ETH", @@ -13619,6 +13707,16 @@ "symbol": "aETH", "type": "ethereum token" }, + "aGUSD": { + "coingecko": "gemini-dollar", + "cryptocompare": "GUSD", + "ethereum_address": "0xD37EE7e4f452C6638c96536e68090De8cBcdb583", + "ethereum_token_decimals": 2, + "name": "Aave Interest bearing GUSD", + "started": 1609615002, + "symbol": "aGUSD", + "type": "ethereum token" + }, "aKNC": { "coingecko": "aave-knc", "cryptocompare": "KNC", @@ -13629,6 +13727,16 @@ "symbol": "aKNC", "type": "ethereum token" }, + "aKNCv2": { + "coingecko": "aave-knc", + "cryptocompare": "KNC", + "ethereum_address": "0x39C6b3e42d6A679d7D776778Fe880BC9487C2EDA", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing KNC v2", + "started": 1606832588, + "symbol": "aKNC", + "type": "ethereum token" + }, "aLEND": { "coingecko": "aave-lend", "cryptocompare": "LEND", @@ -13649,6 +13757,16 @@ "symbol": "aLINK", "type": "ethereum token" }, + "aLINKv2": { + "coingecko": "aave-link", + "cryptocompare": "LINK", + "ethereum_address": "0xa06bC25B5805d5F8d82847D191Cb4Af5A3e873E0", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing LINK v2", + "started": 1606832588, + "symbol": "aLINK", + "type": "ethereum token" + }, "aMANA": { "coingecko": "aave-mana", "cryptocompare": "MANA", @@ -13659,6 +13777,16 @@ "symbol": "aMANA", "type": "ethereum token" }, + "aMANAv2": { + "coingecko": "aave-mana", + "cryptocompare": "MANA", + "ethereum_address": "0xa685a61171bb30d4072B338c80Cb7b2c865c873E", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing MANA v2", + "started": 1606832588, + "symbol": "aMANA", + "type": "ethereum token" + }, "aMKR": { "coingecko": "aave-mkr", "cryptocompare": "MKR", @@ -13669,6 +13797,16 @@ "symbol": "aMKR", "type": "ethereum token" }, + "aMKRv2": { + "coingecko": "aave-mkr", + "cryptocompare": "MKR", + "ethereum_address": "0xc713e5E149D5D0715DcD1c156a020976e7E56B88", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing MKR v2", + "started": 1606832623, + "symbol": "aMKR", + "type": "ethereum token" + }, "aREN": { "coingecko": "aave-ren", "cryptocompare": "REN", @@ -13679,6 +13817,16 @@ "symbol": "aREN", "type": "ethereum token" }, + "aRENv2": { + "coingecko": "aave-ren", + "cryptocompare": "REN", + "ethereum_address": "0xCC12AbE4ff81c9378D670De1b57F8e0Dd228D77a", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing REN v2", + "started": 1606832623, + "symbol": "aREN", + "type": "ethereum token" + }, "aREP": { "coingecko": "aave-rep", "cryptocompare": "REP", @@ -13699,6 +13847,16 @@ "symbol": "aSNX", "type": "ethereum token" }, + "aSNXv2": { + "coingecko": "aave-snx", + "cryptocompare": "SNX", + "ethereum_address": "0x35f6B052C598d933D69A4EEC4D04c73A191fE6c2", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing SNX v2", + "started": 1606832623, + "symbol": "aSNX", + "type": "ethereum token" + }, "aSUSD": { "coingecko": "aave-susd", "cryptocompare": "sUSD", @@ -13709,6 +13867,16 @@ "symbol": "aSUSD", "type": "ethereum token" }, + "aSUSDv2": { + "coingecko": "aave-susd", + "cryptocompare": "sUSD", + "ethereum_address": "0x6C5024Cd4F8A59110119C56f8933403A539555EB", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing SUSD v2", + "started": 1606832623, + "symbol": "aSUSD", + "type": "ethereum token" + }, "aTUSD": { "coingecko": "aave-tusd", "cryptocompare": "TUSD", @@ -13719,6 +13887,16 @@ "symbol": "aTUSD", "type": "ethereum token" }, + "aTUSDv2": { + "coingecko": "aave-tusd", + "cryptocompare": "TUSD", + "ethereum_address": "0x101cc05f4A51C0319f570d5E146a8C625198e636", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing TUSD v2", + "started": 1606832636, + "symbol": "aTUSD", + "type": "ethereum token" + }, "aUSDC": { "coingecko": "aave-usdc", "cryptocompare": "USDC", @@ -13729,6 +13907,16 @@ "symbol": "aUSDC", "type": "ethereum token" }, + "aUSDCv2": { + "coingecko": "aave-usdc", + "cryptocompare": "USDC", + "ethereum_address": "0xBcca60bB61934080951369a648Fb03DF4F96263C", + "ethereum_token_decimals": 6, + "name": "Aave Interest bearing USDC v2", + "started": 1606832636, + "symbol": "aUSDC", + "type": "ethereum token" + }, "aUSDT": { "coingecko": "aave-usdt", "cryptocompare": "USDT", @@ -13739,6 +13927,16 @@ "symbol": "aUSDT", "type": "ethereum token" }, + "aUSDTv2": { + "coingecko": "aave-usdt", + "cryptocompare": "USDT", + "ethereum_address": "0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811", + "ethereum_token_decimals": 6, + "name": "Aave Interest bearing USDT v2", + "started": 1606774830, + "symbol": "aUSDT", + "type": "ethereum token" + }, "aWBTC": { "coingecko": "aave-wbtc", "cryptocompare": "WBTC", @@ -13749,6 +13947,26 @@ "symbol": "aWBTC", "type": "ethereum token" }, + "aWBTCv2": { + "coingecko": "aave-wbtc", + "cryptocompare": "WBTC", + "ethereum_address": "0x9ff58f4fFB29fA2266Ab25e75e2A8b3503311656", + "ethereum_token_decimals": 8, + "name": "Aave Interest bearing WBTC v2", + "started": 1606774830, + "symbol": "aWBTC", + "type": "ethereum token" + }, + "aWETH": { + "coingecko": "weth", + "cryptocompare": "WETH", + "ethereum_address": "0x030bA81f1c18d280636F32af80b9AAd02Cf0854e", + "ethereum_token_decimals": 18, + "name": "Aave interest bearing WETH", + "started": 1606774830, + "symbol": "aWETH", + "type": "ethereum token" + }, "aYFI": { "coingecko": "ayfi", "cryptocompare": "YFI", @@ -13759,6 +13977,16 @@ "symbol": "aYFI", "type": "ethereum token" }, + "aYFIv2": { + "coingecko": "ayfi", + "cryptocompare": "YFI", + "ethereum_address": "0x5165d24277cD063F5ac44Efd447B27025e888f37", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing YFI v2", + "started": 1606774830, + "symbol": "aYFI", + "type": "ethereum token" + }, "aZRX": { "coingecko": "aave-zrx", "cryptocompare": "ZRX", @@ -13769,6 +13997,16 @@ "symbol": "aZRX", "type": "ethereum token" }, + "aZRXv2": { + "coingecko": "aave-zrx", + "cryptocompare": "ZRX", + "ethereum_address": "0xDf7FF54aAcAcbFf42dfe29DD6144A69b629f8C9e", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing ZRX v2", + "started": 1606774830, + "symbol": "aZRX", + "type": "ethereum token" + }, "aUNI": { "coingecko": "uniswap", "cryptocompare": "UNI", @@ -13779,6 +14017,16 @@ "symbol": "aUNI", "type": "ethereum token" }, + "aUNIv2": { + "coingecko": "uniswap", + "cryptocompare": "UNI", + "ethereum_address": "0xB9D7CB55f463405CDfBe4E90a6D2Df01C2B92BF1", + "ethereum_token_decimals": 18, + "name": "Aave Interest bearing Uniswap v2", + "started": 1606774858, + "symbol": "aUNI", + "type": "ethereum token" + }, "cBAT": { "coingecko": "compound-basic-attention-token", "ethereum_address": "0x6C8c6b02E7b2BE14d4fA6022Dfd6d75921D90E4E", @@ -14282,6 +14530,15 @@ "symbol": "SHR", "type": "ethereum token" }, + "SHROOM": { + "coingecko": "shroom-finance", + "ethereum_address": "0xEd0439EACf4c4965AE4613D77a5C2Efe10e5f183", + "ethereum_token_decimals": 18, + "name": "shroom.finance", + "started": 1599047104, + "symbol": "SHROOM", + "type": "ethereum token" + }, "HEGIC": { "coingecko": "hegic", "ethereum_address": "0x584bC13c7D411c00c01A62e8019472dE68768430", diff --git a/rotkehlchen/data/all_assets.meta b/rotkehlchen/data/all_assets.meta index cf8a3167b4..33e3f4d65e 100644 --- a/rotkehlchen/data/all_assets.meta +++ b/rotkehlchen/data/all_assets.meta @@ -1 +1 @@ -{"md5": "ad98cf96cf31804c286acb0a6367814e", "version": 46} +{"md5": "7969237a9e90ff27d35c29e2ff2fe895", "version": 47} diff --git a/rotkehlchen/tests/exchanges/test_kraken.py b/rotkehlchen/tests/exchanges/test_kraken.py index ba2a5fb71f..331e4378a3 100644 --- a/rotkehlchen/tests/exchanges/test_kraken.py +++ b/rotkehlchen/tests/exchanges/test_kraken.py @@ -38,9 +38,7 @@ def test_coverage_of_kraken_balances(kraken): got_assets.remove('USD.HOLD') got_assets.remove('FLOW.S') got_assets.remove('FLOWH.S') - # Ignore the following assets as well - got_assets.remove('FLOW') - got_assets.remove('FLOWH') + got_assets.remove('FLOWH') # what is FLOWH? diff = expected_assets.symmetric_difference(got_assets) if len(diff) != 0: diff --git a/rotkehlchen/tests/fixtures/accounting.py b/rotkehlchen/tests/fixtures/accounting.py index 75fe7d5575..9f925b670c 100644 --- a/rotkehlchen/tests/fixtures/accounting.py +++ b/rotkehlchen/tests/fixtures/accounting.py @@ -171,7 +171,7 @@ def create_inquirer( if not should_mock_current_price_queries: return inquirer - def mock_find_usd_price(asset): # pylint: disable=unused-argument + def mock_find_usd_price(asset, ignore_cache: bool = False): # pylint: disable=unused-argument return mocked_prices.get(asset, FVal('1.5')) inquirer.find_usd_price = mock_find_usd_price # type: ignore diff --git a/rotkehlchen/tests/unit/test_assets.py b/rotkehlchen/tests/unit/test_assets.py index 9c8af395c2..181856dc65 100644 --- a/rotkehlchen/tests/unit/test_assets.py +++ b/rotkehlchen/tests/unit/test_assets.py @@ -97,6 +97,8 @@ def test_cryptocompare_asset_support(cryptocompare): 'MUST', # Must (Cometh) but Must protocol in CC 'SDT-2', # Stake DAO token but TerraSDT in CC 'BAC', # Basis Cash but BACoin in CC + 'IHF', # waiting until cryptocompare fixes historical price for this. https://github.com/rotki/rotki/pull/2176 # noqa: E501 + 'FLOW', # FLOW from dapper labs but "Flow Protocol" in CC ) for identifier, asset_data in AssetResolver().assets.items(): potential_support = ( @@ -281,7 +283,7 @@ def test_coingecko_identifiers_are_reachable(data_dir): def test_assets_json_meta(): """Test that all_assets.json md5 matches and that if md5 changes since last time then version is also bumped""" - last_meta = {'md5': '931775d33b57e0431c85538d658caa08', 'version': 45} + last_meta = {'md5': '7969237a9e90ff27d35c29e2ff2fe895', 'version': 47} data_dir = Path(__file__).resolve().parent.parent.parent / 'data' data_md5 = file_md5(data_dir / 'all_assets.json')
doccano__doccano-1530
doccano init causes a ModuleNotFoundError for chardet How to reproduce the behaviour --------- Create a fresh virtualenv in which to test, then install the latest release of doccano from PyPi (v1.4.1): ``` $ virtualenv env [...virtualenv output removed...] $ source env/bin/activate (env) $ pip install doccano [... main output removed...] Successfully installed Django-3.2.6 MarkupSafe-2.0.1 PyJWT-2.1.0 amqp-5.0.6 apache-libcloud-3.3.1 asgiref-3.4.1 auto-labeling-pipeline-0.1.21 billiard-3.6.4.0 boto3-1.18.30 botocore-1.21.30 celery-5.1.2 certifi-2021.5.30 cffi-1.14.6 charset-normalizer-2.0.4 click-7.1.2 click-didyoumean-0.0.3 click-plugins-1.1.1 click-repl-0.2.0 colour-0.1.5 conllu-4.4.1 coreapi-2.3.3 coreschema-0.0.4 cryptography-3.4.8 defusedxml-0.7.1 dj-database-url-0.5.0 dj-rest-auth-2.1.11 django-celery-results-2.2.0 django-cors-headers-3.8.0 django-drf-filepond-0.4.0 django-filter-2.4.0 django-polymorphic-3.0.0 django-rest-polymorphic-0.1.9 django-storages-1.11.1 djangorestframework-3.12.4 djangorestframework-csv-2.1.1 djangorestframework-xml-2.0.0 doccano-1.4.1 drf-yasg-1.20.0 ecdsa-0.17.0 environs-9.3.3 et-xmlfile-1.1.0 furl-2.1.2 greenlet-1.1.1 gunicorn-20.1.0 idna-3.2 inflection-0.5.1 itypes-1.2.0 jinja2-3.0.1 jmespath-0.10.0 joblib-1.0.1 kombu-5.1.0 lml-0.1.0 marshmallow-3.13.0 numpy-1.21.2 oauthlib-3.1.1 openpyxl-3.0.7 orderedmultidict-1.0.1 packaging-21.0 prompt-toolkit-3.0.20 pyasn1-0.4.8 pycparser-2.20 pydantic-1.8.2 pyexcel-0.6.6 pyexcel-io-0.6.4 pyexcel-xlsx-0.6.0 pyparsing-2.4.7 python-dateutil-2.8.2 python-dotenv-0.19.0 python-jose-3.3.0 python3-openid-3.2.0 pytz-2021.1 requests-2.26.0 requests-oauthlib-1.3.0 rsa-4.7.2 ruamel.yaml-0.17.14 ruamel.yaml.clib-0.2.6 s3transfer-0.5.0 scikit-learn-0.24.2 scipy-1.7.1 seqeval-1.2.2 shortuuid-1.0.1 six-1.16.0 social-auth-app-django-5.0.0 social-auth-core-4.1.0 sqlalchemy-1.4.23 sqlparse-0.4.1 texttable-1.6.4 threadpoolctl-2.2.0 typing-extensions-3.10.0.0 unicodecsv-0.14.1 uritemplate-3.0.1 urllib3-1.26.6 vine-5.0.0 wcwidth-0.2.5 whitenoise-5.3.0 ``` Now run `doccano init`: ``` (env) $ doccano init ``` This results in a set of long stack traces all rooted on [doccano/backend/api/views/upload/dataset.py:L7](https://github.com/doccano/doccano/blob/3bf91c1e30c00693362491932a6aa802235a5f95/backend/api/views/upload/dataset.py#L7) - `import chardet` ``` Traceback (most recent call last): File "/env/lib/python3.8/site-packages/backend/manage.py", line 15, in <module> execute_from_command_line(sys.argv) File "/env/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line utility.execute() File "/env/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/env/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv self.execute(*args, **cmd_options) [...traceback truncated...] File "/env/lib/python3.8/site-packages/backend/api/urls.py", line 3, in <module> from . import views File "/env/lib/python3.8/site-packages/backend/api/views/__init__.py", line 5, in <module> from .export_dataset import * File "/env/lib/python3.8/site-packages/backend/api/views/export_dataset.py", line 11, in <module> from ..tasks import export_dataset File "/env/lib/python3.8/site-packages/backend/api/tasks.py", line 13, in <module> from .views.upload.factory import (get_data_class, get_dataset_class, File "/env/lib/python3.8/site-packages/backend/api/views/upload/factory.py", line 3, in <module> from . import catalog, data, dataset, label File "/env/lib/python3.8/site-packages/backend/api/views/upload/dataset.py", line 7, in <module> import chardet ModuleNotFoundError: No module named 'chardet' ``` `pip install chardet` resolves the issue and `doccano init` then completes successfully and I'm able to run the app. Your Environment --------- * **Operating System:** Tested on both macOS 10.15.7 and Ubuntu 20.04 * **Python Version Used:** 3.8.9 (macOS, via macports), 3.8.10 (Ubuntu) * **When you install doccano:** 27th Aug 2021 - installing current release from PyPi, v1.4.1 * **How did you install doccano (Heroku button etc):** Installing v1.4.1 from PyPi using `pip install doccano` into a clean python virtualenv.
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport io\nimport os\n\nfrom setuptools import find_packages, setup\n\nNAME = 'doccano'\nDESCRIPTION = 'doccano, text annotation tool for machine learning practitioners'\nURL = 'https://github.com/doccano/doccano'\nEMAIL = '[email protected]'\nAUTHOR = 'Hironsan'\nLICENSE = 'MIT'\n\nhere = os.path.abspath(os.path.dirname(__file__))\nwith io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:\n long_description = '\\n' + f.read()\n\nrequired = [\n 'apache-libcloud>=3.2.0',\n 'colour>=0.1.5',\n 'conllu>=4.2.2',\n 'dj-database-url>=0.5.0',\n 'django-cors-headers>=3.5.0',\n 'django-filter>=2.4.0',\n 'django-rest-polymorphic>=0.1.9',\n 'djangorestframework-csv>=2.1.0',\n 'djangorestframework-xml>=2.0.0',\n 'drf-yasg>=1.20.0',\n 'environs>=9.2.0',\n 'furl>=2.1.0',\n 'pyexcel>=0.6.6',\n 'pyexcel-xlsx>=0.6.0',\n 'python-jose>=3.2.0',\n 'seqeval>=1.2.2',\n 'social-auth-app-django>=4.0.0',\n 'whitenoise>=5.2.0',\n 'auto-labeling-pipeline>=0.1.12',\n 'celery>=5.0.5',\n 'dj-rest-auth>=2.1.4',\n 'django-celery-results>=2.0.1',\n 'django-drf-filepond>=0.3.0',\n 'sqlalchemy>=1.4.7',\n 'gunicorn>=20.1.0',\n 'waitress>=2.0.0',\n]\n\nsetup(\n name=NAME,\n use_scm_version=True,\n setup_requires=['setuptools_scm'],\n description=DESCRIPTION,\n long_description=long_description,\n long_description_content_type='text/markdown',\n author=AUTHOR,\n author_email=EMAIL,\n url=URL,\n packages=find_packages(exclude=('*.tests',)),\n entry_points={\n 'console_scripts': [\n 'doccano = backend.cli:main'\n ]\n },\n install_requires=required,\n extras_require={\n 'postgresql': ['psycopg2-binary>=2.8.6'],\n 'mssql': ['django-mssql-backend>=2.8.1'],\n },\n include_package_data=True,\n license=LICENSE,\n classifiers=[\n 'License :: OSI Approved :: MIT License',\n 'Programming Language :: Python',\n 'Programming Language :: Python :: 3.6',\n 'Programming Language :: Python :: 3.7',\n 'Programming Language :: Python :: 3.8',\n 'Programming Language :: Python :: Implementation :: CPython',\n 'Programming Language :: Python :: Implementation :: PyPy'\n ],\n)\n", "path": "setup.py" } ]
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport io\nimport os\n\nfrom setuptools import find_packages, setup\n\nNAME = 'doccano'\nDESCRIPTION = 'doccano, text annotation tool for machine learning practitioners'\nURL = 'https://github.com/doccano/doccano'\nEMAIL = '[email protected]'\nAUTHOR = 'Hironsan'\nLICENSE = 'MIT'\n\nhere = os.path.abspath(os.path.dirname(__file__))\nwith io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:\n long_description = '\\n' + f.read()\n\nrequired = [\n 'apache-libcloud>=3.2.0',\n 'colour>=0.1.5',\n 'conllu>=4.2.2',\n 'dj-database-url>=0.5.0',\n 'django-cors-headers>=3.5.0',\n 'django-filter>=2.4.0',\n 'django-rest-polymorphic>=0.1.9',\n 'djangorestframework-csv>=2.1.0',\n 'djangorestframework-xml>=2.0.0',\n 'drf-yasg>=1.20.0',\n 'environs>=9.2.0',\n 'furl>=2.1.0',\n 'pyexcel>=0.6.6',\n 'pyexcel-xlsx>=0.6.0',\n 'python-jose>=3.2.0',\n 'seqeval>=1.2.2',\n 'social-auth-app-django>=4.0.0',\n 'whitenoise>=5.2.0',\n 'auto-labeling-pipeline>=0.1.12',\n 'celery>=5.0.5',\n 'dj-rest-auth>=2.1.4',\n 'django-celery-results>=2.0.1',\n 'django-drf-filepond>=0.3.0',\n 'sqlalchemy>=1.4.7',\n 'gunicorn>=20.1.0',\n 'waitress>=2.0.0',\n 'pydantic>=1.8.2',\n 'chardet>=4.0.0'\n]\n\nsetup(\n name=NAME,\n use_scm_version=True,\n setup_requires=['setuptools_scm'],\n description=DESCRIPTION,\n long_description=long_description,\n long_description_content_type='text/markdown',\n author=AUTHOR,\n author_email=EMAIL,\n url=URL,\n packages=find_packages(exclude=('*.tests',)),\n entry_points={\n 'console_scripts': [\n 'doccano = backend.cli:main'\n ]\n },\n install_requires=required,\n extras_require={\n 'postgresql': ['psycopg2-binary>=2.8.6'],\n 'mssql': ['django-mssql-backend>=2.8.1'],\n },\n include_package_data=True,\n license=LICENSE,\n classifiers=[\n 'License :: OSI Approved :: MIT License',\n 'Programming Language :: Python',\n 'Programming Language :: Python :: 3.6',\n 'Programming Language :: Python :: 3.7',\n 'Programming Language :: Python :: 3.8',\n 'Programming Language :: Python :: Implementation :: CPython',\n 'Programming Language :: Python :: Implementation :: PyPy'\n ],\n)\n", "path": "setup.py" } ]
diff --git a/setup.py b/setup.py index c2156b7311..92b0a28dc2 100644 --- a/setup.py +++ b/setup.py @@ -43,6 +43,8 @@ 'sqlalchemy>=1.4.7', 'gunicorn>=20.1.0', 'waitress>=2.0.0', + 'pydantic>=1.8.2', + 'chardet>=4.0.0' ] setup(
encode__httpx-868
0.12.0 PyPI wheel contains both public- and private-name modules The following works in httpx 0.11.1: ```python In [1]: import httpx ...: from httpx.exceptions import InvalidURL In [2]: try: ...: httpx.get("foo.bar") ...: except InvalidURL: ...: pass ...: ``` In 0.12.0 the exception isn't caught: ```python In [1]: import httpx ...: from httpx.exceptions import InvalidURL In [2]: try: ...: httpx.get("foo.bar") ...: except InvalidURL: ...: pass ...: --------------------------------------------------------------------------- InvalidURL Traceback (most recent call last) <ipython-input-2-87135a63c42c> in <module> 1 try: ----> 2 httpx.get("foo.bar") 3 except InvalidURL: 4 pass 5 ~/.venv/lib/python3.7/site-packages/httpx/_api.py in get(url, params, headers, cookies, auth, allow_redirects, cert, verify, timeout, trust_env) 166 verify=verify, 167 timeout=timeout, --> 168 trust_env=trust_env, 169 ) 170 ~/.venv/lib/python3.7/site-packages/httpx/_api.py in request(method, url, params, data, files, json, headers, cookies, auth, timeout, allow_redirects, verify, cert, trust_env) 92 cookies=cookies, 93 auth=auth, ---> 94 allow_redirects=allow_redirects, 95 ) 96 ~/.venv/lib/python3.7/site-packages/httpx/_client.py in request(self, method, url, data, files, json, params, headers, cookies, auth, allow_redirects, timeout) 566 params=params, 567 headers=headers, --> 568 cookies=cookies, 569 ) 570 return self.send( ~/.venv/lib/python3.7/site-packages/httpx/_client.py in build_request(self, method, url, data, files, json, params, headers, cookies) 196 Build and return a request instance. 197 """ --> 198 url = self.merge_url(url) 199 headers = self.merge_headers(headers) 200 cookies = self.merge_cookies(cookies) ~/.venv/lib/python3.7/site-packages/httpx/_client.py in merge_url(self, url) 216 to create the URL used for the outgoing request. 217 """ --> 218 url = self.base_url.join(relative_url=url) 219 if url.scheme == "http" and hstspreload.in_hsts_preload(url.host): 220 port = None if url.port == 80 else url.port ~/.venv/lib/python3.7/site-packages/httpx/_models.py in join(self, relative_url) 227 """ 228 if self.is_relative_url: --> 229 return URL(relative_url) 230 231 # We drop any fragment portion, because RFC 3986 strictly ~/.venv/lib/python3.7/site-packages/httpx/_models.py in __init__(self, url, allow_relative, params) 104 if not allow_relative: 105 if not self.scheme: --> 106 raise InvalidURL("No scheme included in URL.") 107 if not self.host: 108 raise InvalidURL("No host included in URL.") InvalidURL: No scheme included in URL. ``` This works though: ```python In [3]: import httpx ...: from httpx._exceptions import InvalidURL In [4]: try: ...: httpx.get("foo.bar") ...: except InvalidURL: ...: pass ...: ```
[ { "content": "__title__ = \"httpx\"\n__description__ = \"A next generation HTTP client, for Python 3.\"\n__version__ = \"0.12.0\"\n", "path": "httpx/__version__.py" } ]
[ { "content": "__title__ = \"httpx\"\n__description__ = \"A next generation HTTP client, for Python 3.\"\n__version__ = \"0.12.1\"\n", "path": "httpx/__version__.py" } ]
diff --git a/CHANGELOG.md b/CHANGELOG.md index 158577a198..748ac94a14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.12.1 (March 19th, 2020) + +### Fixed + +* Resolved packaging issue, where additional files were being included. + ## 0.12.0 (March 9th, 2020) The 0.12 release tightens up the API expectations for `httpx` by switching to private module names to enforce better clarity around public API. diff --git a/httpx/__version__.py b/httpx/__version__.py index 3b4d4b906d..c2a43f6816 100644 --- a/httpx/__version__.py +++ b/httpx/__version__.py @@ -1,3 +1,3 @@ __title__ = "httpx" __description__ = "A next generation HTTP client, for Python 3." -__version__ = "0.12.0" +__version__ = "0.12.1"
AUTOMATIC1111__stable-diffusion-webui-7583
[Bug]: vae does not appear when clicking refresh button in models/VAE ### Is there an existing issue for this? - [X] I have searched the existing issues and checked the recent builds/commits ### What happened? Pressing the button to update the VAE list does not update the VAE list. ### Steps to reproduce the problem 1. Insert new VAE file to models/VAE 2. Press buttion Refresh VAE list ### What should have happened? Apprear new VAE file in list ### Commit where the problem happens Lastest ### What platforms do you use to access the UI ? _No response_ ### What browsers do you use to access the UI ? _No response_ ### Command Line Arguments ```Shell No ``` ### List of extensions No ### Console logs ```Shell Nothing ``` ### Additional information _No response_
[ { "content": "\r\n\r\ndef realesrgan_models_names():\r\n import modules.realesrgan_model\r\n return [x.name for x in modules.realesrgan_model.get_realesrgan_models(None)]\r\n\r\n\r\ndef postprocessing_scripts():\r\n import modules.scripts\r\n\r\n return modules.scripts.scripts_postproc.scripts\r\n\r\n\r\ndef sd_vae_items():\r\n import modules.sd_vae\r\n\r\n return [\"Automatic\", \"None\"] + list(modules.sd_vae.vae_dict)\r\n\r\n\r\ndef refresh_vae_list():\r\n import modules.sd_vae\r\n\r\n return modules.sd_vae.refresh_vae_list\r\n", "path": "modules/shared_items.py" } ]
[ { "content": "\r\n\r\ndef realesrgan_models_names():\r\n import modules.realesrgan_model\r\n return [x.name for x in modules.realesrgan_model.get_realesrgan_models(None)]\r\n\r\n\r\ndef postprocessing_scripts():\r\n import modules.scripts\r\n\r\n return modules.scripts.scripts_postproc.scripts\r\n\r\n\r\ndef sd_vae_items():\r\n import modules.sd_vae\r\n\r\n return [\"Automatic\", \"None\"] + list(modules.sd_vae.vae_dict)\r\n\r\n\r\ndef refresh_vae_list():\r\n import modules.sd_vae\r\n\r\n return modules.sd_vae.refresh_vae_list()\r\n", "path": "modules/shared_items.py" } ]
diff --git a/modules/shared_items.py b/modules/shared_items.py index 8b5ec96dcdf..b72b2bae068 100644 --- a/modules/shared_items.py +++ b/modules/shared_items.py @@ -20,4 +20,4 @@ def sd_vae_items(): def refresh_vae_list(): import modules.sd_vae - return modules.sd_vae.refresh_vae_list + return modules.sd_vae.refresh_vae_list()
apache__tvm-6399
`import tvm` now requires pytest With the merge of #6331, `import tvm` now requires pytest. I created this issue just to check whether this is something intentional or something that we want to fix. The chain from `import tvm` to `import pytest` happens due to the `from .import testing` on `python/tvm/__init__.py`. There is nothing actually done with that import. https://github.com/apache/incubator-tvm/blob/a4ebb16ed76bfea4ce4eed7be7ea73d4a01027e2/python/tvm/__init__.py#L53-L56 Within `python/tvm/testing.py` then there is the `import pytest`. I was thinking that we might want to remove these lines from `__init__.py`, so that we don't load `tvm.testing` and will only import it when required. I'm happy to submit a PR removing those lines, in case there is an understanding that it makes sense. cc @tqchen
[ { "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations\n# under the License.\n# pylint: disable=redefined-builtin, wildcard-import\n\"\"\"TVM: Open Deep Learning Compiler Stack.\"\"\"\nimport multiprocessing\nimport sys\nimport traceback\n\n# top-level alias\n# tvm._ffi\nfrom ._ffi.base import TVMError, __version__\nfrom ._ffi.runtime_ctypes import DataTypeCode, DataType\nfrom ._ffi import register_object, register_func, register_extension, get_global_func\n\n# top-level alias\n# tvm.runtime\nfrom .runtime.object import Object\nfrom .runtime.ndarray import context, cpu, gpu, opencl, cl, vulkan, metal, mtl\nfrom .runtime.ndarray import vpi, rocm, ext_dev, micro_dev, hexagon\nfrom .runtime import ndarray as nd\n\n# tvm.error\nfrom . import error\n\n# tvm.ir\nfrom .ir import IRModule\nfrom .ir import transform\nfrom .ir import container\nfrom . import ir\n\n# tvm.tir\nfrom . import tir\n\n# tvm.target\nfrom . import target\n\n# tvm.te\nfrom . import te\n\n# tvm.testing\nfrom . import testing\n\n# tvm.driver\nfrom .driver import build, lower\n\n# tvm.parser\nfrom . import parser\n\n# tvm tir hybrid script\nfrom . import hybrid\n\n# others\nfrom . import arith\n\n# support infra\nfrom . import support\n\n# Contrib initializers\nfrom .contrib import rocm as _rocm, nvcc as _nvcc, sdaccel as _sdaccel\n\n\ndef tvm_wrap_excepthook(exception_hook):\n \"\"\"Wrap given excepthook with TVM additional work.\"\"\"\n\n def wrapper(exctype, value, trbk):\n \"\"\"Clean subprocesses when TVM is interrupted.\"\"\"\n exception_hook(exctype, value, trbk)\n if hasattr(multiprocessing, 'active_children'):\n # pylint: disable=not-callable\n for p in multiprocessing.active_children():\n p.terminate()\n\n return wrapper\n\n\nsys.excepthook = tvm_wrap_excepthook(sys.excepthook)\n", "path": "python/tvm/__init__.py" } ]
[ { "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations\n# under the License.\n# pylint: disable=redefined-builtin, wildcard-import\n\"\"\"TVM: Open Deep Learning Compiler Stack.\"\"\"\nimport multiprocessing\nimport sys\nimport traceback\n\n# top-level alias\n# tvm._ffi\nfrom ._ffi.base import TVMError, __version__\nfrom ._ffi.runtime_ctypes import DataTypeCode, DataType\nfrom ._ffi import register_object, register_func, register_extension, get_global_func\n\n# top-level alias\n# tvm.runtime\nfrom .runtime.object import Object\nfrom .runtime.ndarray import context, cpu, gpu, opencl, cl, vulkan, metal, mtl\nfrom .runtime.ndarray import vpi, rocm, ext_dev, micro_dev, hexagon\nfrom .runtime import ndarray as nd\n\n# tvm.error\nfrom . import error\n\n# tvm.ir\nfrom .ir import IRModule\nfrom .ir import transform\nfrom .ir import container\nfrom . import ir\n\n# tvm.tir\nfrom . import tir\n\n# tvm.target\nfrom . import target\n\n# tvm.te\nfrom . import te\n\n# tvm.driver\nfrom .driver import build, lower\n\n# tvm.parser\nfrom . import parser\n\n# tvm tir hybrid script\nfrom . import hybrid\n\n# others\nfrom . import arith\n\n# support infra\nfrom . import support\n\n# Contrib initializers\nfrom .contrib import rocm as _rocm, nvcc as _nvcc, sdaccel as _sdaccel\n\n\ndef tvm_wrap_excepthook(exception_hook):\n \"\"\"Wrap given excepthook with TVM additional work.\"\"\"\n\n def wrapper(exctype, value, trbk):\n \"\"\"Clean subprocesses when TVM is interrupted.\"\"\"\n exception_hook(exctype, value, trbk)\n if hasattr(multiprocessing, 'active_children'):\n # pylint: disable=not-callable\n for p in multiprocessing.active_children():\n p.terminate()\n\n return wrapper\n\n\nsys.excepthook = tvm_wrap_excepthook(sys.excepthook)\n", "path": "python/tvm/__init__.py" } ]
diff --git a/python/tvm/__init__.py b/python/tvm/__init__.py index 19a69bf6f12a..e10f387e3591 100644 --- a/python/tvm/__init__.py +++ b/python/tvm/__init__.py @@ -51,9 +51,6 @@ # tvm.te from . import te -# tvm.testing -from . import testing - # tvm.driver from .driver import build, lower
ManimCommunity__manim-70
A small Bug in setup.py In `install_requires` of `setup.py` the library `colour` is mentioned twice. This needed to be changed.
[ { "content": "from setuptools import setup, find_namespace_packages\nsetup(\n name=\"manimlib\",\n version=\"0.2.0\",\n description=\"Animation engine for explanatory math videos\",\n license=\"MIT\",\n packages=find_namespace_packages(),\n package_data={ \"manim\": [\"*.tex\"] },\n entry_points={\n \"console_scripts\": [\n \"manim=manim:main\",\n \"manimcm=manim:main\",\n ]\n },\n install_requires=[\n \"colour\",\n \"argparse\",\n \"colour\",\n \"numpy\",\n \"Pillow\",\n \"progressbar\",\n \"scipy\",\n \"tqdm\",\n \"opencv-python\",\n \"pycairo\",\n \"pydub\",\n \"pygments\",\n \"pyreadline; sys_platform == 'win32'\",\n \"rich\"\n ],\n)\n", "path": "setup.py" } ]
[ { "content": "from setuptools import setup, find_namespace_packages\nsetup(\n name=\"manimlib\",\n version=\"0.2.0\",\n description=\"Animation engine for explanatory math videos\",\n license=\"MIT\",\n packages=find_namespace_packages(),\n package_data={ \"manim\": [\"*.tex\"] },\n entry_points={\n \"console_scripts\": [\n \"manim=manim:main\",\n \"manimcm=manim:main\",\n ]\n },\n install_requires=[\n \"argparse\",\n \"colour\",\n \"numpy\",\n \"Pillow\",\n \"progressbar\",\n \"scipy\",\n \"tqdm\",\n \"opencv-python\",\n \"pycairo\",\n \"pydub\",\n \"pygments\",\n \"pyreadline; sys_platform == 'win32'\",\n \"rich\"\n ],\n)\n", "path": "setup.py" } ]
diff --git a/setup.py b/setup.py index 51b8279813..4552d4c3cb 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,6 @@ ] }, install_requires=[ - "colour", "argparse", "colour", "numpy",
pyca__cryptography-2606
Set a minimum version on setuptools Apparently it fails in hilarious ways with very very old setuptools (or even distribute). We should set a floor in `setup.py`. @dstufft do you have opinions on what a reasonable floor would be?
[ { "content": "#!/usr/bin/env python\n\n# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport os\nimport platform\nimport subprocess\nimport sys\nfrom distutils.command.build import build\n\nimport pkg_resources\n\nfrom setuptools import find_packages, setup\nfrom setuptools.command.install import install\nfrom setuptools.command.test import test\n\n\nbase_dir = os.path.dirname(__file__)\nsrc_dir = os.path.join(base_dir, \"src\")\n\n# When executing the setup.py, we need to be able to import ourselves, this\n# means that we need to add the src/ directory to the sys.path.\nsys.path.insert(0, src_dir)\n\nabout = {}\nwith open(os.path.join(src_dir, \"cryptography\", \"__about__.py\")) as f:\n exec(f.read(), about)\n\n\nVECTORS_DEPENDENCY = \"cryptography_vectors=={0}\".format(about['__version__'])\n\nrequirements = [\n \"idna>=2.0\",\n \"pyasn1>=0.1.8\",\n \"six>=1.4.1\",\n \"setuptools\",\n]\nsetup_requirements = []\n\nif sys.version_info < (3, 4):\n requirements.append(\"enum34\")\n\nif sys.version_info < (3, 3):\n requirements.append(\"ipaddress\")\n\nif platform.python_implementation() == \"PyPy\":\n if sys.pypy_version_info < (2, 6):\n raise RuntimeError(\n \"cryptography 1.0 is not compatible with PyPy < 2.6. Please \"\n \"upgrade PyPy to use this library.\"\n )\nelse:\n requirements.append(\"cffi>=1.1.0\")\n setup_requirements.append(\"cffi>=1.1.0\")\n\n# If you add a new dep here you probably need to add it in the tox.ini as well\ntest_requirements = [\n \"pytest\",\n \"pretend\",\n \"iso8601\",\n \"hypothesis\",\n \"pyasn1_modules\",\n]\n\n# If there's no vectors locally that probably means we are in a tarball and\n# need to go and get the matching vectors package from PyPi\nif not os.path.exists(os.path.join(base_dir, \"vectors/setup.py\")):\n test_requirements.append(VECTORS_DEPENDENCY)\n\n\ndef cc_is_available():\n return sys.platform == \"darwin\" and list(map(\n int, platform.mac_ver()[0].split(\".\"))) >= [10, 8, 0]\n\n\nbackends = [\n \"openssl = cryptography.hazmat.backends.openssl:backend\"\n]\n\nif cc_is_available():\n backends.append(\n \"commoncrypto = cryptography.hazmat.backends.commoncrypto:backend\",\n )\n\n\nclass PyTest(test):\n def finalize_options(self):\n test.finalize_options(self)\n self.test_args = []\n self.test_suite = True\n\n # This means there's a vectors/ folder with the package in here.\n # cd into it, install the vectors package and then refresh sys.path\n if VECTORS_DEPENDENCY not in test_requirements:\n subprocess.check_call(\n [sys.executable, \"setup.py\", \"install\"], cwd=\"vectors\"\n )\n pkg_resources.get_distribution(\"cryptography_vectors\").activate()\n\n def run_tests(self):\n # Import here because in module scope the eggs are not loaded.\n import pytest\n test_args = [os.path.join(base_dir, \"tests\")]\n errno = pytest.main(test_args)\n sys.exit(errno)\n\n\ndef keywords_with_side_effects(argv):\n \"\"\"\n Get a dictionary with setup keywords that (can) have side effects.\n\n :param argv: A list of strings with command line arguments.\n :returns: A dictionary with keyword arguments for the ``setup()`` function.\n\n This setup.py script uses the setuptools 'setup_requires' feature because\n this is required by the cffi package to compile extension modules. The\n purpose of ``keywords_with_side_effects()`` is to avoid triggering the cffi\n build process as a result of setup.py invocations that don't need the cffi\n module to be built (setup.py serves the dual purpose of exposing package\n metadata).\n\n All of the options listed by ``python setup.py --help`` that print\n information should be recognized here. The commands ``clean``,\n ``egg_info``, ``register``, ``sdist`` and ``upload`` are also recognized.\n Any combination of these options and commands is also supported.\n\n This function was originally based on the `setup.py script`_ of SciPy (see\n also the discussion in `pip issue #25`_).\n\n .. _pip issue #25: https://github.com/pypa/pip/issues/25\n .. _setup.py script: https://github.com/scipy/scipy/blob/master/setup.py\n \"\"\"\n no_setup_requires_arguments = (\n '-h', '--help',\n '-n', '--dry-run',\n '-q', '--quiet',\n '-v', '--verbose',\n '-V', '--version',\n '--author',\n '--author-email',\n '--classifiers',\n '--contact',\n '--contact-email',\n '--description',\n '--egg-base',\n '--fullname',\n '--help-commands',\n '--keywords',\n '--licence',\n '--license',\n '--long-description',\n '--maintainer',\n '--maintainer-email',\n '--name',\n '--no-user-cfg',\n '--obsoletes',\n '--platforms',\n '--provides',\n '--requires',\n '--url',\n 'clean',\n 'egg_info',\n 'register',\n 'sdist',\n 'upload',\n )\n\n def is_short_option(argument):\n \"\"\"Check whether a command line argument is a short option.\"\"\"\n return len(argument) >= 2 and argument[0] == '-' and argument[1] != '-'\n\n def expand_short_options(argument):\n \"\"\"Expand combined short options into canonical short options.\"\"\"\n return ('-' + char for char in argument[1:])\n\n def argument_without_setup_requirements(argv, i):\n \"\"\"Check whether a command line argument needs setup requirements.\"\"\"\n if argv[i] in no_setup_requires_arguments:\n # Simple case: An argument which is either an option or a command\n # which doesn't need setup requirements.\n return True\n elif (is_short_option(argv[i]) and\n all(option in no_setup_requires_arguments\n for option in expand_short_options(argv[i]))):\n # Not so simple case: Combined short options none of which need\n # setup requirements.\n return True\n elif argv[i - 1:i] == ['--egg-base']:\n # Tricky case: --egg-info takes an argument which should not make\n # us use setup_requires (defeating the purpose of this code).\n return True\n else:\n return False\n\n if all(argument_without_setup_requirements(argv, i)\n for i in range(1, len(argv))):\n return {\n \"cmdclass\": {\n \"build\": DummyBuild,\n \"install\": DummyInstall,\n \"test\": DummyPyTest,\n }\n }\n else:\n cffi_modules = [\n \"src/_cffi_src/build_openssl.py:ffi\",\n \"src/_cffi_src/build_constant_time.py:ffi\",\n \"src/_cffi_src/build_padding.py:ffi\",\n ]\n if cc_is_available():\n cffi_modules.append(\"src/_cffi_src/build_commoncrypto.py:ffi\")\n\n return {\n \"setup_requires\": setup_requirements,\n \"cmdclass\": {\n \"test\": PyTest,\n },\n \"cffi_modules\": cffi_modules\n }\n\n\nsetup_requires_error = (\"Requested setup command that needs 'setup_requires' \"\n \"while command line arguments implied a side effect \"\n \"free command or option.\")\n\n\nclass DummyBuild(build):\n \"\"\"\n This class makes it very obvious when ``keywords_with_side_effects()`` has\n incorrectly interpreted the command line arguments to ``setup.py build`` as\n one of the 'side effect free' commands or options.\n \"\"\"\n\n def run(self):\n raise RuntimeError(setup_requires_error)\n\n\nclass DummyInstall(install):\n \"\"\"\n This class makes it very obvious when ``keywords_with_side_effects()`` has\n incorrectly interpreted the command line arguments to ``setup.py install``\n as one of the 'side effect free' commands or options.\n \"\"\"\n\n def run(self):\n raise RuntimeError(setup_requires_error)\n\n\nclass DummyPyTest(test):\n \"\"\"\n This class makes it very obvious when ``keywords_with_side_effects()`` has\n incorrectly interpreted the command line arguments to ``setup.py test`` as\n one of the 'side effect free' commands or options.\n \"\"\"\n\n def run_tests(self):\n raise RuntimeError(setup_requires_error)\n\n\nwith open(os.path.join(base_dir, \"README.rst\")) as f:\n long_description = f.read()\n\n\nsetup(\n name=about[\"__title__\"],\n version=about[\"__version__\"],\n\n description=about[\"__summary__\"],\n long_description=long_description,\n license=about[\"__license__\"],\n url=about[\"__uri__\"],\n\n author=about[\"__author__\"],\n author_email=about[\"__email__\"],\n\n classifiers=[\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: Apache Software License\",\n \"License :: OSI Approved :: BSD License\",\n \"Natural Language :: English\",\n \"Operating System :: MacOS :: MacOS X\",\n \"Operating System :: POSIX\",\n \"Operating System :: POSIX :: BSD\",\n \"Operating System :: POSIX :: Linux\",\n \"Operating System :: Microsoft :: Windows\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 2\",\n \"Programming Language :: Python :: 2.6\",\n \"Programming Language :: Python :: 2.7\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.3\",\n \"Programming Language :: Python :: 3.4\",\n \"Programming Language :: Python :: 3.5\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Security :: Cryptography\",\n ],\n\n package_dir={\"\": \"src\"},\n packages=find_packages(\n where=\"src\", exclude=[\"_cffi_src\", \"_cffi_src.*\", \"tests\", \"tests.*\"]\n ),\n include_package_data=True,\n\n install_requires=requirements,\n tests_require=test_requirements,\n\n # for cffi\n zip_safe=False,\n ext_package=\"cryptography.hazmat.bindings\",\n entry_points={\n \"cryptography.backends\": backends,\n },\n **keywords_with_side_effects(sys.argv)\n)\n", "path": "setup.py" } ]
[ { "content": "#!/usr/bin/env python\n\n# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport os\nimport platform\nimport subprocess\nimport sys\nfrom distutils.command.build import build\n\nimport pkg_resources\n\nfrom setuptools import find_packages, setup\nfrom setuptools.command.install import install\nfrom setuptools.command.test import test\n\n\nbase_dir = os.path.dirname(__file__)\nsrc_dir = os.path.join(base_dir, \"src\")\n\n# When executing the setup.py, we need to be able to import ourselves, this\n# means that we need to add the src/ directory to the sys.path.\nsys.path.insert(0, src_dir)\n\nabout = {}\nwith open(os.path.join(src_dir, \"cryptography\", \"__about__.py\")) as f:\n exec(f.read(), about)\n\n\nVECTORS_DEPENDENCY = \"cryptography_vectors=={0}\".format(about['__version__'])\n\nrequirements = [\n \"idna>=2.0\",\n \"pyasn1>=0.1.8\",\n \"six>=1.4.1\",\n \"setuptools>=1.0\",\n]\nsetup_requirements = []\n\nif sys.version_info < (3, 4):\n requirements.append(\"enum34\")\n\nif sys.version_info < (3, 3):\n requirements.append(\"ipaddress\")\n\nif platform.python_implementation() == \"PyPy\":\n if sys.pypy_version_info < (2, 6):\n raise RuntimeError(\n \"cryptography 1.0 is not compatible with PyPy < 2.6. Please \"\n \"upgrade PyPy to use this library.\"\n )\nelse:\n requirements.append(\"cffi>=1.1.0\")\n setup_requirements.append(\"cffi>=1.1.0\")\n\n# If you add a new dep here you probably need to add it in the tox.ini as well\ntest_requirements = [\n \"pytest\",\n \"pretend\",\n \"iso8601\",\n \"hypothesis\",\n \"pyasn1_modules\",\n]\n\n# If there's no vectors locally that probably means we are in a tarball and\n# need to go and get the matching vectors package from PyPi\nif not os.path.exists(os.path.join(base_dir, \"vectors/setup.py\")):\n test_requirements.append(VECTORS_DEPENDENCY)\n\n\ndef cc_is_available():\n return sys.platform == \"darwin\" and list(map(\n int, platform.mac_ver()[0].split(\".\"))) >= [10, 8, 0]\n\n\nbackends = [\n \"openssl = cryptography.hazmat.backends.openssl:backend\"\n]\n\nif cc_is_available():\n backends.append(\n \"commoncrypto = cryptography.hazmat.backends.commoncrypto:backend\",\n )\n\n\nclass PyTest(test):\n def finalize_options(self):\n test.finalize_options(self)\n self.test_args = []\n self.test_suite = True\n\n # This means there's a vectors/ folder with the package in here.\n # cd into it, install the vectors package and then refresh sys.path\n if VECTORS_DEPENDENCY not in test_requirements:\n subprocess.check_call(\n [sys.executable, \"setup.py\", \"install\"], cwd=\"vectors\"\n )\n pkg_resources.get_distribution(\"cryptography_vectors\").activate()\n\n def run_tests(self):\n # Import here because in module scope the eggs are not loaded.\n import pytest\n test_args = [os.path.join(base_dir, \"tests\")]\n errno = pytest.main(test_args)\n sys.exit(errno)\n\n\ndef keywords_with_side_effects(argv):\n \"\"\"\n Get a dictionary with setup keywords that (can) have side effects.\n\n :param argv: A list of strings with command line arguments.\n :returns: A dictionary with keyword arguments for the ``setup()`` function.\n\n This setup.py script uses the setuptools 'setup_requires' feature because\n this is required by the cffi package to compile extension modules. The\n purpose of ``keywords_with_side_effects()`` is to avoid triggering the cffi\n build process as a result of setup.py invocations that don't need the cffi\n module to be built (setup.py serves the dual purpose of exposing package\n metadata).\n\n All of the options listed by ``python setup.py --help`` that print\n information should be recognized here. The commands ``clean``,\n ``egg_info``, ``register``, ``sdist`` and ``upload`` are also recognized.\n Any combination of these options and commands is also supported.\n\n This function was originally based on the `setup.py script`_ of SciPy (see\n also the discussion in `pip issue #25`_).\n\n .. _pip issue #25: https://github.com/pypa/pip/issues/25\n .. _setup.py script: https://github.com/scipy/scipy/blob/master/setup.py\n \"\"\"\n no_setup_requires_arguments = (\n '-h', '--help',\n '-n', '--dry-run',\n '-q', '--quiet',\n '-v', '--verbose',\n '-V', '--version',\n '--author',\n '--author-email',\n '--classifiers',\n '--contact',\n '--contact-email',\n '--description',\n '--egg-base',\n '--fullname',\n '--help-commands',\n '--keywords',\n '--licence',\n '--license',\n '--long-description',\n '--maintainer',\n '--maintainer-email',\n '--name',\n '--no-user-cfg',\n '--obsoletes',\n '--platforms',\n '--provides',\n '--requires',\n '--url',\n 'clean',\n 'egg_info',\n 'register',\n 'sdist',\n 'upload',\n )\n\n def is_short_option(argument):\n \"\"\"Check whether a command line argument is a short option.\"\"\"\n return len(argument) >= 2 and argument[0] == '-' and argument[1] != '-'\n\n def expand_short_options(argument):\n \"\"\"Expand combined short options into canonical short options.\"\"\"\n return ('-' + char for char in argument[1:])\n\n def argument_without_setup_requirements(argv, i):\n \"\"\"Check whether a command line argument needs setup requirements.\"\"\"\n if argv[i] in no_setup_requires_arguments:\n # Simple case: An argument which is either an option or a command\n # which doesn't need setup requirements.\n return True\n elif (is_short_option(argv[i]) and\n all(option in no_setup_requires_arguments\n for option in expand_short_options(argv[i]))):\n # Not so simple case: Combined short options none of which need\n # setup requirements.\n return True\n elif argv[i - 1:i] == ['--egg-base']:\n # Tricky case: --egg-info takes an argument which should not make\n # us use setup_requires (defeating the purpose of this code).\n return True\n else:\n return False\n\n if all(argument_without_setup_requirements(argv, i)\n for i in range(1, len(argv))):\n return {\n \"cmdclass\": {\n \"build\": DummyBuild,\n \"install\": DummyInstall,\n \"test\": DummyPyTest,\n }\n }\n else:\n cffi_modules = [\n \"src/_cffi_src/build_openssl.py:ffi\",\n \"src/_cffi_src/build_constant_time.py:ffi\",\n \"src/_cffi_src/build_padding.py:ffi\",\n ]\n if cc_is_available():\n cffi_modules.append(\"src/_cffi_src/build_commoncrypto.py:ffi\")\n\n return {\n \"setup_requires\": setup_requirements,\n \"cmdclass\": {\n \"test\": PyTest,\n },\n \"cffi_modules\": cffi_modules\n }\n\n\nsetup_requires_error = (\"Requested setup command that needs 'setup_requires' \"\n \"while command line arguments implied a side effect \"\n \"free command or option.\")\n\n\nclass DummyBuild(build):\n \"\"\"\n This class makes it very obvious when ``keywords_with_side_effects()`` has\n incorrectly interpreted the command line arguments to ``setup.py build`` as\n one of the 'side effect free' commands or options.\n \"\"\"\n\n def run(self):\n raise RuntimeError(setup_requires_error)\n\n\nclass DummyInstall(install):\n \"\"\"\n This class makes it very obvious when ``keywords_with_side_effects()`` has\n incorrectly interpreted the command line arguments to ``setup.py install``\n as one of the 'side effect free' commands or options.\n \"\"\"\n\n def run(self):\n raise RuntimeError(setup_requires_error)\n\n\nclass DummyPyTest(test):\n \"\"\"\n This class makes it very obvious when ``keywords_with_side_effects()`` has\n incorrectly interpreted the command line arguments to ``setup.py test`` as\n one of the 'side effect free' commands or options.\n \"\"\"\n\n def run_tests(self):\n raise RuntimeError(setup_requires_error)\n\n\nwith open(os.path.join(base_dir, \"README.rst\")) as f:\n long_description = f.read()\n\n\nsetup(\n name=about[\"__title__\"],\n version=about[\"__version__\"],\n\n description=about[\"__summary__\"],\n long_description=long_description,\n license=about[\"__license__\"],\n url=about[\"__uri__\"],\n\n author=about[\"__author__\"],\n author_email=about[\"__email__\"],\n\n classifiers=[\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: Apache Software License\",\n \"License :: OSI Approved :: BSD License\",\n \"Natural Language :: English\",\n \"Operating System :: MacOS :: MacOS X\",\n \"Operating System :: POSIX\",\n \"Operating System :: POSIX :: BSD\",\n \"Operating System :: POSIX :: Linux\",\n \"Operating System :: Microsoft :: Windows\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 2\",\n \"Programming Language :: Python :: 2.6\",\n \"Programming Language :: Python :: 2.7\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.3\",\n \"Programming Language :: Python :: 3.4\",\n \"Programming Language :: Python :: 3.5\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Security :: Cryptography\",\n ],\n\n package_dir={\"\": \"src\"},\n packages=find_packages(\n where=\"src\", exclude=[\"_cffi_src\", \"_cffi_src.*\", \"tests\", \"tests.*\"]\n ),\n include_package_data=True,\n\n install_requires=requirements,\n tests_require=test_requirements,\n\n # for cffi\n zip_safe=False,\n ext_package=\"cryptography.hazmat.bindings\",\n entry_points={\n \"cryptography.backends\": backends,\n },\n **keywords_with_side_effects(sys.argv)\n)\n", "path": "setup.py" } ]
diff --git a/setup.py b/setup.py index 19f1e66382a2..3b67e8ff02da 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ "idna>=2.0", "pyasn1>=0.1.8", "six>=1.4.1", - "setuptools", + "setuptools>=1.0", ] setup_requirements = []
blaze__blaze-1136
psutil.NUM_CPUS deprecated and removed ``` python --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-11-5c5ee3cb747a> in <module>() ----> 1 import blaze /home/skipper/.virtualenvs/py3/lib/python3.4/site-packages/blaze/__init__.py in <module>() 16 17 from datashape import dshape, discover ---> 18 from .utils import ignoring 19 from .expr import (Symbol, TableSymbol, symbol, ndim, shape) 20 from .expr import (by, count, count_values, distinct, head, join, label, like, /home/skipper/.virtualenvs/py3/lib/python3.4/site-packages/blaze/utils.py in <module>() 25 from .dispatch import dispatch 26 ---> 27 thread_pool = ThreadPool(psutil.NUM_CPUS) 28 29 AttributeError: 'module' object has no attribute 'NUM_CPUS' ``` ``` Python 3.4.0 (default, Apr 11 2014, 13:05:11) Type "copyright", "credits" or "license" for more information. IPython 3.1.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. [TerminalIPythonApp] WARNING | File not found: '/home/skipper/.pystartup' import pu [~/] [1]: import psutil [~/] [2]: psutil.__version__ [2]: '3.0.0' ``` https://github.com/giampaolo/psutil/issues/451
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport datetime\nfrom functools import wraps\n\ntry:\n from cytoolz import nth\nexcept ImportError:\n from toolz import nth\n\nfrom itertools import islice\nfrom collections import Iterator\nfrom multiprocessing.pool import ThreadPool\n\n# these are used throughout blaze, don't remove them\nfrom odo.utils import tmpfile, filetext, filetexts, raises, keywords, ignoring\n\nimport psutil\nimport numpy as np\n\n# Imports that replace older utils.\nfrom .compatibility import map, zip\n\nfrom .dispatch import dispatch\n\nthread_pool = ThreadPool(psutil.NUM_CPUS)\n\n\ndef nth_list(n, seq):\n \"\"\"\n\n >>> tuple(nth_list([0, 1, 4], 'Hello'))\n ('H', 'e', 'o')\n >>> tuple(nth_list([4, 1, 0], 'Hello'))\n ('o', 'e', 'H')\n >>> tuple(nth_list([0, 0, 0], 'Hello'))\n ('H', 'H', 'H')\n \"\"\"\n seq = iter(seq)\n\n result = []\n old = 0\n item = next(seq)\n for index in sorted(n):\n for i in range(index - old):\n item = next(seq)\n result.append(item)\n old = index\n\n order = [x[1] for x in sorted(zip(n, range(len(n))))]\n return (result[i] for i in order)\n\n\ndef get(ind, coll, lazy=False):\n \"\"\"\n\n >>> get(0, 'Hello')\n 'H'\n\n >>> get([1, 0], 'Hello')\n ('e', 'H')\n\n >>> get(slice(1, 4), 'Hello')\n ('e', 'l', 'l')\n\n >>> get(slice(1, 4), 'Hello', lazy=True)\n <itertools.islice object at ...>\n \"\"\"\n if isinstance(ind, list):\n result = nth_list(ind, coll)\n elif isinstance(ind, slice):\n result = islice(coll, ind.start, ind.stop, ind.step)\n else:\n if isinstance(coll, Iterator):\n result = nth(ind, coll)\n else:\n result = coll[ind]\n if not lazy and isinstance(result, Iterator):\n result = tuple(result)\n return result\n\n\ndef ndget(ind, data):\n \"\"\"\n Get from N-Dimensional getable\n\n Can index with elements, lists, or slices. Mimic's numpy fancy indexing on\n generic indexibles.\n\n >>> data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]\n >>> ndget(0, data)\n [[1, 2], [3, 4]]\n >>> ndget((0, 1), data)\n [3, 4]\n >>> ndget((0, 0, 0), data)\n 1\n >>> ndget((slice(0, 2), [0, 1], 0), data)\n ((1, 3), (5, 7))\n \"\"\"\n if isinstance(ind, tuple) and len(ind) == 1:\n ind = ind[0]\n if not isinstance(ind, tuple):\n return get(ind, data)\n result = get(ind[0], data)\n if isinstance(ind[0], (list, slice)):\n return type(result)(ndget(ind[1:], row) for row in result)\n else:\n return ndget(ind[1:], result)\n\n\ndef normalize_to_date(dt):\n if isinstance(dt, datetime.datetime) and not dt.time():\n return dt.date()\n else:\n return dt\n\n\ndef assert_allclose(lhs, rhs):\n for tb in map(zip, lhs, rhs):\n for left, right in tb:\n if isinstance(left, (np.floating, float)):\n # account for nans\n assert np.all(np.isclose(left, right, equal_nan=True))\n continue\n if isinstance(left, datetime.datetime):\n left = normalize_to_date(left)\n if isinstance(right, datetime.datetime):\n right = normalize_to_date(right)\n assert left == right\n\n\ndef example(filename, datapath=os.path.join('examples', 'data')):\n import blaze\n return os.path.join(os.path.dirname(blaze.__file__), datapath, filename)\n\n\ndef available_memory():\n return psutil.virtual_memory().available\n\n\ndef listpack(x):\n \"\"\"\n >>> listpack(1)\n [1]\n >>> listpack((1, 2))\n [1, 2]\n >>> listpack([1, 2])\n [1, 2]\n \"\"\"\n if isinstance(x, tuple):\n return list(x)\n elif isinstance(x, list):\n return x\n else:\n return [x]\n\n\n@dispatch(datetime.datetime)\ndef json_dumps(dt):\n s = dt.isoformat()\n if not dt.tzname():\n s += 'Z'\n return s\n", "path": "blaze/utils.py" } ]
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport datetime\nfrom functools import wraps\n\ntry:\n from cytoolz import nth\nexcept ImportError:\n from toolz import nth\n\nfrom itertools import islice\nfrom collections import Iterator\nfrom multiprocessing.pool import ThreadPool\n\n# these are used throughout blaze, don't remove them\nfrom odo.utils import tmpfile, filetext, filetexts, raises, keywords, ignoring\n\nimport psutil\nimport numpy as np\n\n# Imports that replace older utils.\nfrom .compatibility import map, zip\n\nfrom .dispatch import dispatch\n\nthread_pool = ThreadPool(psutil.cpu_count())\n\n\ndef nth_list(n, seq):\n \"\"\"\n\n >>> tuple(nth_list([0, 1, 4], 'Hello'))\n ('H', 'e', 'o')\n >>> tuple(nth_list([4, 1, 0], 'Hello'))\n ('o', 'e', 'H')\n >>> tuple(nth_list([0, 0, 0], 'Hello'))\n ('H', 'H', 'H')\n \"\"\"\n seq = iter(seq)\n\n result = []\n old = 0\n item = next(seq)\n for index in sorted(n):\n for i in range(index - old):\n item = next(seq)\n result.append(item)\n old = index\n\n order = [x[1] for x in sorted(zip(n, range(len(n))))]\n return (result[i] for i in order)\n\n\ndef get(ind, coll, lazy=False):\n \"\"\"\n\n >>> get(0, 'Hello')\n 'H'\n\n >>> get([1, 0], 'Hello')\n ('e', 'H')\n\n >>> get(slice(1, 4), 'Hello')\n ('e', 'l', 'l')\n\n >>> get(slice(1, 4), 'Hello', lazy=True)\n <itertools.islice object at ...>\n \"\"\"\n if isinstance(ind, list):\n result = nth_list(ind, coll)\n elif isinstance(ind, slice):\n result = islice(coll, ind.start, ind.stop, ind.step)\n else:\n if isinstance(coll, Iterator):\n result = nth(ind, coll)\n else:\n result = coll[ind]\n if not lazy and isinstance(result, Iterator):\n result = tuple(result)\n return result\n\n\ndef ndget(ind, data):\n \"\"\"\n Get from N-Dimensional getable\n\n Can index with elements, lists, or slices. Mimic's numpy fancy indexing on\n generic indexibles.\n\n >>> data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]\n >>> ndget(0, data)\n [[1, 2], [3, 4]]\n >>> ndget((0, 1), data)\n [3, 4]\n >>> ndget((0, 0, 0), data)\n 1\n >>> ndget((slice(0, 2), [0, 1], 0), data)\n ((1, 3), (5, 7))\n \"\"\"\n if isinstance(ind, tuple) and len(ind) == 1:\n ind = ind[0]\n if not isinstance(ind, tuple):\n return get(ind, data)\n result = get(ind[0], data)\n if isinstance(ind[0], (list, slice)):\n return type(result)(ndget(ind[1:], row) for row in result)\n else:\n return ndget(ind[1:], result)\n\n\ndef normalize_to_date(dt):\n if isinstance(dt, datetime.datetime) and not dt.time():\n return dt.date()\n else:\n return dt\n\n\ndef assert_allclose(lhs, rhs):\n for tb in map(zip, lhs, rhs):\n for left, right in tb:\n if isinstance(left, (np.floating, float)):\n # account for nans\n assert np.all(np.isclose(left, right, equal_nan=True))\n continue\n if isinstance(left, datetime.datetime):\n left = normalize_to_date(left)\n if isinstance(right, datetime.datetime):\n right = normalize_to_date(right)\n assert left == right\n\n\ndef example(filename, datapath=os.path.join('examples', 'data')):\n import blaze\n return os.path.join(os.path.dirname(blaze.__file__), datapath, filename)\n\n\ndef available_memory():\n return psutil.virtual_memory().available\n\n\ndef listpack(x):\n \"\"\"\n >>> listpack(1)\n [1]\n >>> listpack((1, 2))\n [1, 2]\n >>> listpack([1, 2])\n [1, 2]\n \"\"\"\n if isinstance(x, tuple):\n return list(x)\n elif isinstance(x, list):\n return x\n else:\n return [x]\n\n\n@dispatch(datetime.datetime)\ndef json_dumps(dt):\n s = dt.isoformat()\n if not dt.tzname():\n s += 'Z'\n return s\n", "path": "blaze/utils.py" } ]
diff --git a/blaze/utils.py b/blaze/utils.py index 7c6fb6c41..968450340 100644 --- a/blaze/utils.py +++ b/blaze/utils.py @@ -24,7 +24,7 @@ from .dispatch import dispatch -thread_pool = ThreadPool(psutil.NUM_CPUS) +thread_pool = ThreadPool(psutil.cpu_count()) def nth_list(n, seq):
jazzband__django-axes-648
Error fetching command 'axes_reset_user' Hello, after updating to the latest django-axes (5.6.1) i've got some errors applying its migrations, since the software i'm developing is still in test i had the opportunity to start over and deleting database tables and migrations. Unfortunately i still got this error every time i try to access django's management commands: Error fetching command 'axes_reset_user': name 'axes_reset_username' is not defined Command 'axes_reset_user' skipped I am using Django 3.1.1 with postgres, before this update everything was working as it should. Can i help in some way to understand what's happening? Thanks Marco
[ { "content": "axes_reset_username.py # type: ignore # pylint: disable=all\n", "path": "axes/management/commands/axes_reset_user.py" } ]
[ { "content": "from django.core.management.base import BaseCommand\n\nfrom axes.utils import reset\n\n\nclass Command(BaseCommand):\n help = \"Reset all access attempts and lockouts for given usernames\"\n\n def add_arguments(self, parser):\n parser.add_argument(\"username\", nargs=\"+\", type=str)\n\n def handle(self, *args, **options):\n count = 0\n\n for username in options[\"username\"]:\n count += reset(username=username)\n\n if count:\n self.stdout.write(f\"{count} attempts removed.\")\n else:\n self.stdout.write(\"No attempts found.\")\n", "path": "axes/management/commands/axes_reset_user.py" } ]
diff --git a/axes/management/commands/axes_reset_user.py b/axes/management/commands/axes_reset_user.py deleted file mode 100644 index 1438d29f..00000000 --- a/axes/management/commands/axes_reset_user.py +++ /dev/null @@ -1 +0,0 @@ -axes_reset_username.py # type: ignore # pylint: disable=all diff --git a/axes/management/commands/axes_reset_user.py b/axes/management/commands/axes_reset_user.py new file mode 120000 index 00000000..5f248756 --- /dev/null +++ b/axes/management/commands/axes_reset_user.py @@ -0,0 +1 @@ +axes_reset_username.py \ No newline at end of file
bookwyrm-social__bookwyrm-1018
Ratings don't federate **Describe the bug** I do follow someone on bookwyrm.social from bookwyrm.social and wyrms.de. I have seen on b.s that they rated some books without reviewing them, but those ratings do not appear on w.d. All other posts federate properly (I think). **Expeceted behaviour** The rating should show up on connected instances and ideally also be used on those to calculate the average rating of the book. Here is one example that's not visible from w.d: https://bookwyrm.social/user/tastytea/reviewrating/21469
[ { "content": "\"\"\" note serializer and children thereof \"\"\"\nfrom dataclasses import dataclass, field\nfrom typing import Dict, List\nfrom django.apps import apps\n\nfrom .base_activity import ActivityObject, Link\nfrom .image import Document\n\n\n@dataclass(init=False)\nclass Tombstone(ActivityObject):\n \"\"\"the placeholder for a deleted status\"\"\"\n\n type: str = \"Tombstone\"\n\n def to_model(self, *args, **kwargs): # pylint: disable=unused-argument\n \"\"\"this should never really get serialized, just searched for\"\"\"\n model = apps.get_model(\"bookwyrm.Status\")\n return model.find_existing_by_remote_id(self.id)\n\n\n@dataclass(init=False)\nclass Note(ActivityObject):\n \"\"\"Note activity\"\"\"\n\n published: str\n attributedTo: str\n content: str = \"\"\n to: List[str] = field(default_factory=lambda: [])\n cc: List[str] = field(default_factory=lambda: [])\n replies: Dict = field(default_factory=lambda: {})\n inReplyTo: str = \"\"\n summary: str = \"\"\n tag: List[Link] = field(default_factory=lambda: [])\n attachment: List[Document] = field(default_factory=lambda: [])\n sensitive: bool = False\n type: str = \"Note\"\n\n\n@dataclass(init=False)\nclass Article(Note):\n \"\"\"what's an article except a note with more fields\"\"\"\n\n name: str\n type: str = \"Article\"\n\n\n@dataclass(init=False)\nclass GeneratedNote(Note):\n \"\"\"just a re-typed note\"\"\"\n\n type: str = \"GeneratedNote\"\n\n\n@dataclass(init=False)\nclass Comment(Note):\n \"\"\"like a note but with a book\"\"\"\n\n inReplyToBook: str\n type: str = \"Comment\"\n\n\n@dataclass(init=False)\nclass Quotation(Comment):\n \"\"\"a quote and commentary on a book\"\"\"\n\n quote: str\n type: str = \"Quotation\"\n\n\n@dataclass(init=False)\nclass Review(Comment):\n \"\"\"a full book review\"\"\"\n\n name: str = None\n rating: int = None\n type: str = \"Review\"\n\n\n@dataclass(init=False)\nclass Rating(Comment):\n \"\"\"just a star rating\"\"\"\n\n rating: int\n content: str = None\n type: str = \"Rating\"\n", "path": "bookwyrm/activitypub/note.py" } ]
[ { "content": "\"\"\" note serializer and children thereof \"\"\"\nfrom dataclasses import dataclass, field\nfrom typing import Dict, List\nfrom django.apps import apps\n\nfrom .base_activity import ActivityObject, Link\nfrom .image import Document\n\n\n@dataclass(init=False)\nclass Tombstone(ActivityObject):\n \"\"\"the placeholder for a deleted status\"\"\"\n\n type: str = \"Tombstone\"\n\n def to_model(self, *args, **kwargs): # pylint: disable=unused-argument\n \"\"\"this should never really get serialized, just searched for\"\"\"\n model = apps.get_model(\"bookwyrm.Status\")\n return model.find_existing_by_remote_id(self.id)\n\n\n@dataclass(init=False)\nclass Note(ActivityObject):\n \"\"\"Note activity\"\"\"\n\n published: str\n attributedTo: str\n content: str = \"\"\n to: List[str] = field(default_factory=lambda: [])\n cc: List[str] = field(default_factory=lambda: [])\n replies: Dict = field(default_factory=lambda: {})\n inReplyTo: str = \"\"\n summary: str = \"\"\n tag: List[Link] = field(default_factory=lambda: [])\n attachment: List[Document] = field(default_factory=lambda: [])\n sensitive: bool = False\n type: str = \"Note\"\n\n\n@dataclass(init=False)\nclass Article(Note):\n \"\"\"what's an article except a note with more fields\"\"\"\n\n name: str\n type: str = \"Article\"\n\n\n@dataclass(init=False)\nclass GeneratedNote(Note):\n \"\"\"just a re-typed note\"\"\"\n\n type: str = \"GeneratedNote\"\n\n\n@dataclass(init=False)\nclass Comment(Note):\n \"\"\"like a note but with a book\"\"\"\n\n inReplyToBook: str\n type: str = \"Comment\"\n\n\n@dataclass(init=False)\nclass Quotation(Comment):\n \"\"\"a quote and commentary on a book\"\"\"\n\n quote: str\n type: str = \"Quotation\"\n\n\n@dataclass(init=False)\nclass Review(Comment):\n \"\"\"a full book review\"\"\"\n\n name: str = None\n rating: int = None\n type: str = \"Review\"\n\n\n@dataclass(init=False)\nclass Rating(Comment):\n \"\"\"just a star rating\"\"\"\n\n rating: int\n content: str = None\n name: str = None # not used, but the model inherits from Review\n type: str = \"Rating\"\n", "path": "bookwyrm/activitypub/note.py" } ]
diff --git a/bookwyrm/activitypub/note.py b/bookwyrm/activitypub/note.py index b501c3d619..ea2e92b6e3 100644 --- a/bookwyrm/activitypub/note.py +++ b/bookwyrm/activitypub/note.py @@ -83,4 +83,5 @@ class Rating(Comment): rating: int content: str = None + name: str = None # not used, but the model inherits from Review type: str = "Rating" diff --git a/bookwyrm/tests/views/inbox/test_inbox_create.py b/bookwyrm/tests/views/inbox/test_inbox_create.py index e7a1202446..958dfee8cc 100644 --- a/bookwyrm/tests/views/inbox/test_inbox_create.py +++ b/bookwyrm/tests/views/inbox/test_inbox_create.py @@ -127,6 +127,43 @@ def test_create_status_remote_note_with_reply(self): self.assertTrue(models.Notification.objects.filter(user=self.local_user)) self.assertEqual(models.Notification.objects.get().notification_type, "REPLY") + def test_create_rating(self): + """a remote rating activity""" + book = models.Edition.objects.create( + title="Test Book", remote_id="https://example.com/book/1" + ) + activity = self.create_json + activity["object"] = { + "id": "https://example.com/user/mouse/reviewrating/12", + "type": "Rating", + "published": "2021-04-29T21:27:30.014235+00:00", + "attributedTo": "https://example.com/user/mouse", + "to": ["https://www.w3.org/ns/activitystreams#Public"], + "cc": ["https://example.com/user/mouse/followers"], + "replies": { + "id": "https://example.com/user/mouse/reviewrating/12/replies", + "type": "OrderedCollection", + "totalItems": 0, + "first": "https://example.com/user/mouse/reviewrating/12/replies?page=1", + "last": "https://example.com/user/mouse/reviewrating/12/replies?page=1", + "@context": "https://www.w3.org/ns/activitystreams", + }, + "inReplyTo": "", + "summary": "", + "tag": [], + "attachment": [], + "sensitive": False, + "inReplyToBook": "https://example.com/book/1", + "rating": 3, + "@context": "https://www.w3.org/ns/activitystreams", + } + with patch("bookwyrm.activitystreams.ActivityStream.add_status") as redis_mock: + views.inbox.activity_task(activity) + self.assertTrue(redis_mock.called) + rating = models.ReviewRating.objects.first() + self.assertEqual(rating.book, book) + self.assertEqual(rating.rating, 3.0) + def test_create_list(self): """a new list""" activity = self.create_json
apache__airflow-15731
DockerOperator fails to pull an image **Apache Airflow version**: 2.0 **Environment**: - **OS** (from /etc/os-release): Debian GNU/Linux 10 (buster) - **Kernel** (`uname -a`): Linux 37365fa0b59b 5.4.0-47-generic #51-Ubuntu SMP Fri Sep 4 19:50:52 UTC 2020 x86_64 GNU/Linux - **Others**: running inside a docker container, forked puckel/docker-airflow **What happened**: `DockerOperator` does not attempt to pull an image unless force_pull is set to True, instead displaying a misleading 404 error. **What you expected to happen**: `DockerOperator` should attempt to pull an image when it is not present locally. **How to reproduce it**: Make sure you don't have an image tagged `debian:buster-slim` present locally. ``` DockerOperator( task_id=f'try_to_pull_debian', image='debian:buster-slim', command=f'''echo hello''', force_pull=False ) ``` prints: `{taskinstance.py:1396} ERROR - 404 Client Error: Not Found ("No such image: ubuntu:latest")` This, on the other hand: ``` DockerOperator( task_id=f'try_to_pull_debian', image='debian:buster-slim', command=f'''echo hello''', force_pull=True ) ``` pulls the image and prints `{docker.py:263} INFO - hello` **Anything else we need to know**: I overrode `DockerOperator` to track down what I was doing wrong and found the following: When trying to run an image that's not present locally, `self.cli.images(name=self.image)` in the line: https://github.com/apache/airflow/blob/8723b1feb82339d7a4ba5b40a6c4d4bbb995a4f9/airflow/providers/docker/operators/docker.py#L286 returns a non-empty array even when the image has been deleted from the local machine. In fact, `self.cli.images` appears to return non-empty arrays even when supplied with nonsense image names. <details><summary>force_pull_false.log</summary> [2021-01-27 06:15:28,987] {__init__.py:124} DEBUG - Preparing lineage inlets and outlets [2021-01-27 06:15:28,987] {__init__.py:168} DEBUG - inlets: [], outlets: [] [2021-01-27 06:15:28,987] {config.py:21} DEBUG - Trying paths: ['/usr/local/airflow/.docker/config.json', '/usr/local/airflow/.dockercfg'] [2021-01-27 06:15:28,987] {config.py:25} DEBUG - Found file at path: /usr/local/airflow/.docker/config.json [2021-01-27 06:15:28,987] {auth.py:182} DEBUG - Found 'auths' section [2021-01-27 06:15:28,988] {auth.py:142} DEBUG - Found entry (registry='https://index.docker.io/v1/', username='xxxxxxx') [2021-01-27 06:15:29,015] {connectionpool.py:433} DEBUG - http://localhost:None "GET /version HTTP/1.1" 200 851 [2021-01-27 06:15:29,060] {connectionpool.py:433} DEBUG - http://localhost:None "GET /v1.41/images/json?filter=debian%3Abuster-slim&only_ids=0&all=0 HTTP/1.1" 200 None [2021-01-27 06:15:29,060] {docker.py:224} INFO - Starting docker container from image debian:buster-slim [2021-01-27 06:15:29,063] {connectionpool.py:433} DEBUG - http://localhost:None "POST /v1.41/containers/create HTTP/1.1" 404 48 [2021-01-27 06:15:29,063] {taskinstance.py:1396} ERROR - 404 Client Error: Not Found ("No such image: debian:buster-slim") Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/docker/api/client.py", line 261, in _raise_for_status response.raise_for_status() File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 941, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.41/containers/create During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1086, in _run_raw_task self._prepare_and_execute_task_with_callbacks(context, task) File "/usr/local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1260, in _prepare_and_execute_task_with_callbacks result = self._execute_task(context, task_copy) File "/usr/local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1300, in _execute_task result = task_copy.execute(context=context) File "/usr/local/lib/python3.8/site-packages/airflow/providers/docker/operators/docker.py", line 305, in execute return self._run_image() File "/usr/local/lib/python3.8/site-packages/airflow/providers/docker/operators/docker.py", line 231, in _run_image self.container = self.cli.create_container( File "/usr/local/lib/python3.8/site-packages/docker/api/container.py", line 427, in create_container return self.create_container_from_config(config, name) File "/usr/local/lib/python3.8/site-packages/docker/api/container.py", line 438, in create_container_from_config return self._result(res, True) File "/usr/local/lib/python3.8/site-packages/docker/api/client.py", line 267, in _result self._raise_for_status(response) File "/usr/local/lib/python3.8/site-packages/docker/api/client.py", line 263, in _raise_for_status raise create_api_error_from_http_exception(e) File "/usr/local/lib/python3.8/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception raise cls(e, response=response, explanation=explanation) docker.errors.ImageNotFound: 404 Client Error: Not Found ("No such image: debian:buster-slim") </details> <details><summary>force_pull_true.log</summary> [2021-01-27 06:17:01,811] {__init__.py:124} DEBUG - Preparing lineage inlets and outlets [2021-01-27 06:17:01,811] {__init__.py:168} DEBUG - inlets: [], outlets: [] [2021-01-27 06:17:01,811] {config.py:21} DEBUG - Trying paths: ['/usr/local/airflow/.docker/config.json', '/usr/local/airflow/.dockercfg'] [2021-01-27 06:17:01,811] {config.py:25} DEBUG - Found file at path: /usr/local/airflow/.docker/config.json [2021-01-27 06:17:01,811] {auth.py:182} DEBUG - Found 'auths' section [2021-01-27 06:17:01,812] {auth.py:142} DEBUG - Found entry (registry='https://index.docker.io/v1/', username='xxxxxxxxx') [2021-01-27 06:17:01,825] {connectionpool.py:433} DEBUG - http://localhost:None "GET /version HTTP/1.1" 200 851 [2021-01-27 06:17:01,826] {docker.py:287} INFO - Pulling docker image debian:buster-slim [2021-01-27 06:17:01,826] {auth.py:41} DEBUG - Looking for auth config [2021-01-27 06:17:01,826] {auth.py:242} DEBUG - Looking for auth entry for 'docker.io' [2021-01-27 06:17:01,826] {auth.py:250} DEBUG - Found 'https://index.docker.io/v1/' [2021-01-27 06:17:01,826] {auth.py:54} DEBUG - Found auth config [2021-01-27 06:17:04,399] {connectionpool.py:433} DEBUG - http://localhost:None "POST /v1.41/images/create?tag=buster-slim&fromImage=debian HTTP/1.1" 200 None [2021-01-27 06:17:04,400] {docker.py:301} INFO - buster-slim: Pulling from library/debian [2021-01-27 06:17:04,982] {docker.py:301} INFO - a076a628af6f: Pulling fs layer [2021-01-27 06:17:05,884] {docker.py:301} INFO - a076a628af6f: Downloading [2021-01-27 06:17:11,429] {docker.py:301} INFO - a076a628af6f: Verifying Checksum [2021-01-27 06:17:11,429] {docker.py:301} INFO - a076a628af6f: Download complete [2021-01-27 06:17:11,480] {docker.py:301} INFO - a076a628af6f: Extracting </details>
[ { "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\"\"\"Setup.py for the Airflow project.\"\"\"\nimport glob\nimport logging\nimport os\nimport subprocess\nimport unittest\nfrom copy import deepcopy\nfrom distutils import log\nfrom os.path import dirname, relpath\nfrom textwrap import wrap\nfrom typing import Dict, List\n\nfrom setuptools import Command, Distribution, find_namespace_packages, setup\nfrom setuptools.command.develop import develop as develop_orig\nfrom setuptools.command.install import install as install_orig\n\n# Controls whether providers are installed from packages or directly from sources\n# It is turned on by default in case of development environments such as Breeze\n# And it is particularly useful when you add a new provider and there is no\n# PyPI version to install the provider package from\nINSTALL_PROVIDERS_FROM_SOURCES = 'INSTALL_PROVIDERS_FROM_SOURCES'\n\nlogger = logging.getLogger(__name__)\n\nversion = '2.1.0.dev0'\n\nmy_dir = dirname(__file__)\n\n\ndef airflow_test_suite() -> unittest.TestSuite:\n \"\"\"Test suite for Airflow tests\"\"\"\n test_loader = unittest.TestLoader()\n test_suite = test_loader.discover(os.path.join(my_dir, 'tests'), pattern='test_*.py')\n return test_suite\n\n\nclass CleanCommand(Command):\n \"\"\"\n Command to tidy up the project root.\n Registered as cmdclass in setup() so it can be called with ``python setup.py extra_clean``.\n \"\"\"\n\n description = \"Tidy up the project root\"\n user_options: List[str] = []\n\n def initialize_options(self):\n \"\"\"Set default values for options.\"\"\"\n\n def finalize_options(self):\n \"\"\"Set final values for options.\"\"\"\n\n @staticmethod\n def rm_all_files(files: List[str]):\n \"\"\"Remove all files from the list\"\"\"\n for file in files:\n try:\n os.remove(file)\n except Exception as e: # noqa pylint: disable=broad-except\n logger.warning(\"Error when removing %s: %s\", file, e)\n\n def run(self):\n \"\"\"Remove temporary files and directories.\"\"\"\n os.chdir(my_dir)\n self.rm_all_files(glob.glob('./build/*'))\n self.rm_all_files(glob.glob('./**/__pycache__/*', recursive=True))\n self.rm_all_files(glob.glob('./**/*.pyc', recursive=True))\n self.rm_all_files(glob.glob('./dist/*'))\n self.rm_all_files(glob.glob('./*.egg-info'))\n self.rm_all_files(glob.glob('./docker-context-files/*.whl'))\n self.rm_all_files(glob.glob('./docker-context-files/*.tgz'))\n\n\nclass CompileAssets(Command):\n \"\"\"\n Compile and build the frontend assets using yarn and webpack.\n Registered as cmdclass in setup() so it can be called with ``python setup.py compile_assets``.\n \"\"\"\n\n description = \"Compile and build the frontend assets\"\n user_options: List[str] = []\n\n def initialize_options(self):\n \"\"\"Set default values for options.\"\"\"\n\n def finalize_options(self):\n \"\"\"Set final values for options.\"\"\"\n\n def run(self): # noqa\n \"\"\"Run a command to compile and build assets.\"\"\"\n subprocess.check_call('./airflow/www/compile_assets.sh')\n\n\nclass ListExtras(Command):\n \"\"\"\n List all available extras\n Registered as cmdclass in setup() so it can be called with ``python setup.py list_extras``.\n \"\"\"\n\n description = \"List available extras\"\n user_options: List[str] = []\n\n def initialize_options(self):\n \"\"\"Set default values for options.\"\"\"\n\n def finalize_options(self):\n \"\"\"Set final values for options.\"\"\"\n\n def run(self): # noqa\n \"\"\"List extras.\"\"\"\n print(\"\\n\".join(wrap(\", \".join(EXTRAS_REQUIREMENTS.keys()), 100)))\n\n\ndef git_version(version_: str) -> str:\n \"\"\"\n Return a version to identify the state of the underlying git repo. The version will\n indicate whether the head of the current git-backed working directory is tied to a\n release tag or not : it will indicate the former with a 'release:{version}' prefix\n and the latter with a '.dev0' suffix. Following the prefix will be a sha of the current\n branch head. Finally, a \"dirty\" suffix is appended to indicate that uncommitted\n changes are present.\n\n :param str version_: Semver version\n :return: Found Airflow version in Git repo\n :rtype: str\n \"\"\"\n try:\n import git\n\n try:\n repo = git.Repo(os.path.join(*[my_dir, '.git']))\n except git.NoSuchPathError:\n logger.warning('.git directory not found: Cannot compute the git version')\n return ''\n except git.InvalidGitRepositoryError:\n logger.warning('Invalid .git directory not found: Cannot compute the git version')\n return ''\n except ImportError:\n logger.warning('gitpython not found: Cannot compute the git version.')\n return ''\n if repo:\n sha = repo.head.commit.hexsha\n if repo.is_dirty():\n return f'.dev0+{sha}.dirty'\n # commit is clean\n return f'.release:{version_}+{sha}'\n return 'no_git_version'\n\n\ndef write_version(filename: str = os.path.join(*[my_dir, \"airflow\", \"git_version\"])):\n \"\"\"\n Write the Semver version + git hash to file, e.g. \".dev0+2f635dc265e78db6708f59f68e8009abb92c1e65\".\n\n :param str filename: Destination file to write\n \"\"\"\n text = f\"{git_version(version)}\"\n with open(filename, 'w') as file:\n file.write(text)\n\n\ndef get_sphinx_theme_version() -> str:\n \"\"\"\n Return sphinx theme version. If USE_THEME_FROM_GIT env variable is set, the theme is used from\n GitHub to allow dynamically update it during development. However for regular PIP release\n you cannot use @ package specification, so the latest available released theme package from\n PIP is used.\n :return: Version of sphinx theme to use.\n \"\"\"\n if os.environ.get('USE_THEME_FROM_GIT'):\n return (\n \"@ https://github.com/apache/airflow-site/releases/download/0.0.4/\"\n + \"sphinx_airflow_theme-0.0.4-py3-none-any.whl\"\n )\n return ''\n\n\n# 'Start dependencies group' and 'Start dependencies group' are mark for ./scripts/ci/check_order_setup.py\n# If you change this mark you should also change ./scripts/ci/check_order_setup.py\n# Start dependencies group\namazon = [\n 'boto3>=1.15.0,<1.18.0',\n 'watchtower~=0.7.3',\n]\napache_beam = [\n 'apache-beam>=2.20.0',\n]\nasync_packages = [\n 'eventlet>= 0.9.7',\n 'gevent>=0.13',\n 'greenlet>=0.4.9',\n]\natlas = [\n 'atlasclient>=0.1.2',\n]\nazure = [\n 'azure-batch>=8.0.0',\n 'azure-cosmos>=3.0.1,<4',\n 'azure-datalake-store>=0.0.45',\n 'azure-identity>=1.3.1',\n 'azure-keyvault>=4.1.0',\n 'azure-kusto-data>=0.0.43,<0.1',\n 'azure-mgmt-containerinstance>=1.5.0,<2.0',\n 'azure-mgmt-datafactory>=1.0.0,<2.0',\n 'azure-mgmt-datalake-store>=0.5.0',\n 'azure-mgmt-resource>=2.2.0',\n 'azure-storage-blob>=12.7.0',\n 'azure-storage-common>=2.1.0',\n 'azure-storage-file>=2.1.0',\n]\ncassandra = [\n 'cassandra-driver>=3.13.0,<4',\n]\ncelery = [\n 'celery~=4.4.2',\n 'flower>=0.7.3, <1.0',\n 'vine~=1.3', # https://stackoverflow.com/questions/32757259/celery-no-module-named-five\n]\ncgroups = [\n 'cgroupspy>=0.1.4',\n]\ncloudant = [\n 'cloudant>=2.0',\n]\ndask = [\n 'cloudpickle>=1.4.1, <1.5.0',\n 'dask<2021.3.1;python_version<\"3.7\"', # dask stopped supporting python 3.6 in 2021.3.1 version\n 'dask>=2.9.0;python_version>=\"3.7\"',\n 'distributed>=2.11.1, <2.20',\n]\ndatabricks = [\n 'requests>=2.20.0, <3',\n]\ndatadog = [\n 'datadog>=0.14.0',\n]\ndoc = [\n # Sphinx is limited to < 3.5.0 because of https://github.com/sphinx-doc/sphinx/issues/8880\n 'sphinx>=2.1.2, <3.5.0',\n f'sphinx-airflow-theme{get_sphinx_theme_version()}',\n 'sphinx-argparse>=0.1.13',\n 'sphinx-autoapi==1.0.0',\n 'sphinx-copybutton',\n 'sphinx-jinja~=1.1',\n 'sphinx-rtd-theme>=0.1.6',\n 'sphinxcontrib-httpdomain>=1.7.0',\n 'sphinxcontrib-redoc>=1.6.0',\n 'sphinxcontrib-spelling==5.2.1',\n]\ndocker = [\n 'docker~=3.0',\n]\ndruid = [\n 'pydruid>=0.4.1',\n]\nelasticsearch = [\n 'elasticsearch>7, <7.6.0',\n 'elasticsearch-dbapi==0.1.0',\n 'elasticsearch-dsl>=5.0.0',\n]\nexasol = [\n 'pyexasol>=0.5.1,<1.0.0',\n]\nfacebook = [\n 'facebook-business>=6.0.2',\n]\nflask_oauth = [\n 'Flask-OAuthlib>=0.9.1,<0.9.6', # Flask OAuthLib 0.9.6 requires Flask-Login 0.5.0 - breaks FAB\n 'oauthlib!=2.0.3,!=2.0.4,!=2.0.5,<3.0.0,>=1.1.2',\n 'requests-oauthlib<1.2.0',\n]\ngoogle = [\n 'PyOpenSSL',\n 'google-ads>=4.0.0,<8.0.0',\n 'google-api-core>=1.25.1,<2.0.0',\n 'google-api-python-client>=1.6.0,<2.0.0',\n 'google-auth>=1.0.0,<2.0.0',\n 'google-auth-httplib2>=0.0.1',\n 'google-cloud-automl>=2.1.0,<3.0.0',\n 'google-cloud-bigquery-datatransfer>=3.0.0,<4.0.0',\n 'google-cloud-bigtable>=1.0.0,<2.0.0',\n 'google-cloud-container>=0.1.1,<2.0.0',\n 'google-cloud-datacatalog>=3.0.0,<4.0.0',\n 'google-cloud-dataproc>=2.2.0,<3.0.0',\n 'google-cloud-dlp>=0.11.0,<2.0.0',\n 'google-cloud-kms>=2.0.0,<3.0.0',\n 'google-cloud-language>=1.1.1,<2.0.0',\n 'google-cloud-logging>=2.1.1,<3.0.0',\n 'google-cloud-memcache>=0.2.0',\n 'google-cloud-monitoring>=2.0.0,<3.0.0',\n 'google-cloud-os-login>=2.0.0,<3.0.0',\n 'google-cloud-pubsub>=2.0.0,<3.0.0',\n 'google-cloud-redis>=2.0.0,<3.0.0',\n 'google-cloud-secret-manager>=0.2.0,<2.0.0',\n 'google-cloud-spanner>=1.10.0,<2.0.0',\n 'google-cloud-speech>=0.36.3,<2.0.0',\n 'google-cloud-storage>=1.30,<2.0.0',\n 'google-cloud-tasks>=2.0.0,<3.0.0',\n 'google-cloud-texttospeech>=0.4.0,<2.0.0',\n 'google-cloud-translate>=1.5.0,<2.0.0',\n 'google-cloud-videointelligence>=1.7.0,<2.0.0',\n 'google-cloud-vision>=0.35.2,<2.0.0',\n 'google-cloud-workflows>=0.1.0,<2.0.0',\n 'grpcio-gcp>=0.2.2',\n 'json-merge-patch~=0.2',\n # pandas-gbq 0.15.0 release broke google provider's bigquery import\n # _check_google_client_version (airflow/providers/google/cloud/hooks/bigquery.py:49)\n 'pandas-gbq<0.15.0',\n 'plyvel',\n]\ngrpc = [\n 'google-auth>=1.0.0, <2.0.0dev',\n 'google-auth-httplib2>=0.0.1',\n 'grpcio>=1.15.0',\n]\nhashicorp = [\n 'hvac~=0.10',\n]\nhdfs = [\n 'snakebite-py3',\n]\nhive = [\n 'hmsclient>=0.1.0',\n 'pyhive[hive]>=0.6.0',\n 'thrift>=0.9.2',\n]\njdbc = [\n 'jaydebeapi>=1.1.1',\n]\njenkins = [\n 'python-jenkins>=1.0.0',\n]\njira = [\n 'JIRA>1.0.7',\n]\nkerberos = [\n 'pykerberos>=1.1.13',\n 'requests_kerberos>=0.10.0',\n 'thrift_sasl>=0.2.0',\n]\nkubernetes = [\n 'cryptography>=2.0.0',\n 'kubernetes>=3.0.0, <12.0.0',\n]\nkylin = ['kylinpy>=2.6']\nldap = [\n 'ldap3>=2.5.1',\n 'python-ldap',\n]\nmongo = [\n 'dnspython>=1.13.0,<2.0.0',\n 'pymongo>=3.6.0',\n]\nmssql = [\n 'pymssql~=2.1,>=2.1.5',\n]\nmysql = [\n 'mysql-connector-python>=8.0.11, <=8.0.22',\n 'mysqlclient>=1.3.6,<3',\n]\nneo4j = ['neo4j>=4.2.1']\nodbc = [\n 'pyodbc',\n]\noracle = [\n 'cx_Oracle>=5.1.2',\n]\npagerduty = [\n 'pdpyras>=4.1.2,<5',\n]\npapermill = [\n 'papermill[all]>=1.2.1',\n 'scrapbook[all]',\n]\npassword = [\n 'bcrypt>=2.0.0',\n 'flask-bcrypt>=0.7.1',\n]\npinot = [\n # pinotdb v0.1.1 may still work with older versions of Apache Pinot, but we've confirmed that it\n # causes a problem with newer versions.\n 'pinotdb>0.1.2,<1.0.0',\n]\nplexus = [\n 'arrow>=0.16.0,<1.0.0',\n]\npostgres = [\n 'psycopg2-binary>=2.7.4',\n]\npresto = ['presto-python-client>=0.7.0,<0.8']\nqubole = [\n 'qds-sdk>=1.10.4',\n]\nrabbitmq = [\n 'amqp<5.0.0',\n]\nredis = [\n 'redis~=3.2',\n]\nsalesforce = [\n 'simple-salesforce>=1.0.0',\n 'tableauserverclient',\n]\nsamba = [\n 'pysmbclient>=0.1.3',\n]\nsegment = [\n 'analytics-python>=1.2.9',\n]\nsendgrid = [\n 'sendgrid>=6.0.0,<7',\n]\nsentry = [\n 'blinker>=1.1',\n 'sentry-sdk>=0.8.0',\n]\nsingularity = ['spython>=0.0.56']\nslack = [\n 'slack_sdk>=3.0.0,<4.0.0',\n]\nsnowflake = [\n 'snowflake-connector-python>=2.4.1',\n 'snowflake-sqlalchemy>=1.1.0',\n]\nspark = [\n 'pyspark',\n]\nssh = [\n 'paramiko>=2.6.0',\n 'pysftp>=0.2.9',\n 'sshtunnel>=0.1.4,<0.2',\n]\nstatsd = [\n 'statsd>=3.3.0, <4.0',\n]\ntableau = [\n 'tableauserverclient',\n]\ntelegram = [\n 'python-telegram-bot==13.0',\n]\ntrino = ['trino']\nvertica = [\n 'vertica-python>=0.5.1',\n]\nvirtualenv = [\n 'virtualenv',\n]\nwebhdfs = [\n 'hdfs[avro,dataframe,kerberos]>=2.0.4',\n]\nwinrm = [\n 'pywinrm~=0.4',\n]\nyandex = [\n 'yandexcloud>=0.22.0',\n]\nzendesk = [\n 'zdesk',\n]\n# End dependencies group\n\ndevel = [\n 'aws_xray_sdk',\n 'beautifulsoup4~=4.7.1',\n 'black',\n 'blinker',\n 'bowler',\n 'click~=7.1',\n 'coverage',\n 'docutils',\n 'filelock',\n 'flake8>=3.6.0',\n 'flake8-colors',\n 'flaky',\n 'freezegun',\n 'github3.py',\n 'gitpython',\n 'importlib-resources~=1.4',\n 'ipdb',\n 'jira',\n 'jsonpath-ng',\n 'jsondiff',\n 'mongomock',\n 'moto~=2.0',\n 'mypy==0.770',\n 'parameterized',\n 'paramiko',\n 'pipdeptree',\n 'pre-commit',\n 'pylint~=2.8.1',\n 'pysftp',\n 'pytest~=6.0',\n 'pytest-cov',\n 'pytest-instafail',\n 'pytest-rerunfailures~=9.1',\n 'pytest-timeouts',\n 'pytest-xdist',\n 'python-jose',\n 'pywinrm',\n 'qds-sdk>=1.9.6',\n 'requests_mock',\n 'wheel',\n 'yamllint',\n]\n\ndevel_minreq = cgroups + devel + doc + kubernetes + mysql + password\ndevel_hadoop = devel_minreq + hdfs + hive + kerberos + presto + webhdfs\n\n# Dict of all providers which are part of the Apache Airflow repository together with their requirements\nPROVIDERS_REQUIREMENTS: Dict[str, List[str]] = {\n 'airbyte': [],\n 'amazon': amazon,\n 'apache.beam': apache_beam,\n 'apache.cassandra': cassandra,\n 'apache.druid': druid,\n 'apache.hdfs': hdfs,\n 'apache.hive': hive,\n 'apache.kylin': kylin,\n 'apache.livy': [],\n 'apache.pig': [],\n 'apache.pinot': pinot,\n 'apache.spark': spark,\n 'apache.sqoop': [],\n 'celery': celery,\n 'cloudant': cloudant,\n 'cncf.kubernetes': kubernetes,\n 'databricks': databricks,\n 'datadog': datadog,\n 'dingding': [],\n 'discord': [],\n 'docker': docker,\n 'elasticsearch': elasticsearch,\n 'exasol': exasol,\n 'facebook': facebook,\n 'ftp': [],\n 'google': google,\n 'grpc': grpc,\n 'hashicorp': hashicorp,\n 'http': [],\n 'imap': [],\n 'jdbc': jdbc,\n 'jenkins': jenkins,\n 'jira': jira,\n 'microsoft.azure': azure,\n 'microsoft.mssql': mssql,\n 'microsoft.winrm': winrm,\n 'mongo': mongo,\n 'mysql': mysql,\n 'neo4j': neo4j,\n 'odbc': odbc,\n 'openfaas': [],\n 'opsgenie': [],\n 'oracle': oracle,\n 'pagerduty': pagerduty,\n 'papermill': papermill,\n 'plexus': plexus,\n 'postgres': postgres,\n 'presto': presto,\n 'qubole': qubole,\n 'redis': redis,\n 'salesforce': salesforce,\n 'samba': samba,\n 'segment': segment,\n 'sendgrid': sendgrid,\n 'sftp': ssh,\n 'singularity': singularity,\n 'slack': slack,\n 'snowflake': snowflake,\n 'sqlite': [],\n 'ssh': ssh,\n 'tableau': tableau,\n 'telegram': telegram,\n 'trino': trino,\n 'vertica': vertica,\n 'yandex': yandex,\n 'zendesk': zendesk,\n}\n\n# Those are all additional extras which do not have their own 'providers'\n# The 'apache.atlas' and 'apache.webhdfs' are extras that provide additional libraries\n# but they do not have separate providers (yet?), they are merely there to add extra libraries\n# That can be used in custom python/bash operators.\nADDITIONAL_EXTRAS_REQUIREMENTS: Dict[str, List[str]] = {\n 'apache.atlas': atlas,\n 'apache.webhdfs': webhdfs,\n}\n\n\n# Those are extras that are extensions of the 'core' Airflow. They provide additional features\n# To airflow core. They do not have separate providers because they do not have any operators/hooks etc.\nCORE_EXTRAS_REQUIREMENTS: Dict[str, List[str]] = {\n 'async': async_packages,\n 'celery': celery, # also has provider, but it extends the core with the Celery executor\n 'cgroups': cgroups,\n 'cncf.kubernetes': kubernetes, # also has provider, but it extends the core with the KubernetesExecutor\n 'dask': dask,\n 'github_enterprise': flask_oauth,\n 'google_auth': flask_oauth,\n 'kerberos': kerberos,\n 'ldap': ldap,\n 'password': password,\n 'rabbitmq': rabbitmq,\n 'sentry': sentry,\n 'statsd': statsd,\n 'virtualenv': virtualenv,\n}\n\n\nEXTRAS_REQUIREMENTS: Dict[str, List[str]] = deepcopy(CORE_EXTRAS_REQUIREMENTS)\n\n\ndef add_extras_for_all_providers() -> None:\n \"\"\"\n Adds extras for all providers.\n By default all providers have the same extra name as provider id, for example\n 'apache.hive' extra has 'apache.hive' provider requirement.\n \"\"\"\n for provider_name, provider_requirement in PROVIDERS_REQUIREMENTS.items():\n EXTRAS_REQUIREMENTS[provider_name] = provider_requirement\n\n\ndef add_additional_extras() -> None:\n \"\"\"Adds extras for all additional extras.\"\"\"\n for extra_name, extra_requirement in ADDITIONAL_EXTRAS_REQUIREMENTS.items():\n EXTRAS_REQUIREMENTS[extra_name] = extra_requirement\n\n\nadd_extras_for_all_providers()\nadd_additional_extras()\n\n#############################################################################################################\n# The whole section can be removed in Airflow 3.0 as those old aliases are deprecated in 2.* series\n#############################################################################################################\n\n# Dictionary of aliases from 1.10 - deprecated in Airflow 2.*\nEXTRAS_DEPRECATED_ALIASES: Dict[str, str] = {\n 'atlas': 'apache.atlas',\n 'aws': 'amazon',\n 'azure': 'microsoft.azure',\n 'cassandra': 'apache.cassandra',\n 'crypto': '', # All crypto requirements are installation requirements of core Airflow\n 'druid': 'apache.druid',\n 'gcp': 'google',\n 'gcp_api': 'google',\n 'hdfs': 'apache.hdfs',\n 'hive': 'apache.hive',\n 'kubernetes': 'cncf.kubernetes',\n 'mssql': 'microsoft.mssql',\n 'pinot': 'apache.pinot',\n 'qds': 'qubole',\n 's3': 'amazon',\n 'spark': 'apache.spark',\n 'webhdfs': 'apache.webhdfs',\n 'winrm': 'microsoft.winrm',\n}\n\nEXTRAS_DEPRECATED_ALIASES_NOT_PROVIDERS: List[str] = [\n \"crypto\",\n \"webhdfs\",\n]\n\n\ndef add_extras_for_all_deprecated_aliases() -> None:\n \"\"\"\n Add extras for all deprecated aliases. Requirements for those deprecated aliases are the same\n as the extras they are replaced with.\n The requirements are not copies - those are the same lists as for the new extras. This is intended.\n Thanks to that if the original extras are later extended with providers, aliases are extended as well.\n \"\"\"\n for alias, extra in EXTRAS_DEPRECATED_ALIASES.items():\n requirements = EXTRAS_REQUIREMENTS.get(extra) if extra != '' else []\n if requirements is None:\n raise Exception(f\"The extra {extra} is missing for deprecated alias {alias}\")\n EXTRAS_REQUIREMENTS[alias] = requirements\n\n\ndef add_all_deprecated_provider_packages() -> None:\n \"\"\"\n For deprecated aliases that are providers, we will swap the providers requirements to instead\n be the provider itself.\n\n e.g. {\"kubernetes\": [\"kubernetes>=3.0.0, <12.0.0\", ...]} becomes\n {\"kubernetes\": [\"apache-airflow-provider-cncf-kubernetes\"]}\n \"\"\"\n for alias, provider in EXTRAS_DEPRECATED_ALIASES.items():\n if alias in EXTRAS_DEPRECATED_ALIASES_NOT_PROVIDERS:\n continue\n replace_extra_requirement_with_provider_packages(alias, [provider])\n\n\nadd_extras_for_all_deprecated_aliases()\n\n#############################################################################################################\n# End of deprecated section\n#############################################################################################################\n\n# This is list of all providers. It's a shortcut for anyone who would like to easily get list of\n# All providers. It is used by pre-commits.\nALL_PROVIDERS = list(PROVIDERS_REQUIREMENTS.keys())\n\nALL_DB_PROVIDERS = [\n 'apache.cassandra',\n 'apache.druid',\n 'apache.hdfs',\n 'apache.hive',\n 'apache.pinot',\n 'cloudant',\n 'exasol',\n 'microsoft.mssql',\n 'mongo',\n 'mysql',\n 'neo4j',\n 'postgres',\n 'presto',\n 'trino',\n 'vertica',\n]\n\n# Special requirements for all database-related providers. They are de-duplicated.\nall_dbs = list({req for db_provider in ALL_DB_PROVIDERS for req in PROVIDERS_REQUIREMENTS[db_provider]})\n\n# Requirements for all \"user\" extras (no devel). They are de-duplicated. Note that we do not need\n# to separately add providers requirements - they have been already added as 'providers' extras above\n_all_requirements = list({req for extras_reqs in EXTRAS_REQUIREMENTS.values() for req in extras_reqs})\n\n# All user extras here\nEXTRAS_REQUIREMENTS[\"all\"] = _all_requirements\n\n# All db user extras here\nEXTRAS_REQUIREMENTS[\"all_dbs\"] = all_dbs\n\n# This can be simplified to devel_hadoop + _all_requirements due to inclusions\n# but we keep it for explicit sake. We are de-duplicating it anyway.\ndevel_all = list(set(_all_requirements + doc + devel_minreq + devel_hadoop))\n\n# Those are packages excluded for \"all\" dependencies\nPACKAGES_EXCLUDED_FOR_ALL = []\nPACKAGES_EXCLUDED_FOR_ALL.extend(\n [\n 'snakebite',\n ]\n)\n\n\ndef is_package_excluded(package: str, exclusion_list: List[str]):\n \"\"\"\n Checks if package should be excluded.\n\n :param package: package name (beginning of it)\n :param exclusion_list: list of excluded packages\n :return: true if package should be excluded\n \"\"\"\n return any(package.startswith(excluded_package) for excluded_package in exclusion_list)\n\n\ndevel_all = [\n package\n for package in devel_all\n if not is_package_excluded(package=package, exclusion_list=PACKAGES_EXCLUDED_FOR_ALL)\n]\n\ndevel_ci = devel_all\n\n\n# Those are extras that we have to add for development purposes\n# They can be use to install some predefined set of dependencies.\nEXTRAS_REQUIREMENTS[\"doc\"] = doc\nEXTRAS_REQUIREMENTS[\"devel\"] = devel_minreq # devel_minreq already includes doc\nEXTRAS_REQUIREMENTS[\"devel_hadoop\"] = devel_hadoop # devel_hadoop already includes devel_minreq\nEXTRAS_REQUIREMENTS[\"devel_all\"] = devel_all\nEXTRAS_REQUIREMENTS[\"devel_ci\"] = devel_ci\n\n\ndef sort_extras_requirements() -> Dict[str, List[str]]:\n \"\"\"\n For Python 3.6+ the dictionary order remains when keys() are retrieved.\n Sort both: extras and list of dependencies to make it easier to analyse problems\n external packages will be first, then if providers are added they are added at the end of the lists.\n \"\"\"\n sorted_requirements = dict(sorted(EXTRAS_REQUIREMENTS.items())) # noqa\n for extra_list in sorted_requirements.values():\n extra_list.sort()\n return sorted_requirements\n\n\nEXTRAS_REQUIREMENTS = sort_extras_requirements()\n\n# Those providers are pre-installed always when airflow is installed.\n# Those providers do not have dependency on airflow2.0 because that would lead to circular dependencies.\n# This is not a problem for PIP but some tools (pipdeptree) show those as a warning.\nPREINSTALLED_PROVIDERS = [\n 'ftp',\n 'http',\n 'imap',\n 'sqlite',\n]\n\n\ndef get_provider_package_from_package_id(package_id: str):\n \"\"\"\n Builds the name of provider package out of the package id provided/\n\n :param package_id: id of the package (like amazon or microsoft.azure)\n :return: full name of package in PyPI\n \"\"\"\n package_suffix = package_id.replace(\".\", \"-\")\n return f\"apache-airflow-providers-{package_suffix}\"\n\n\ndef get_all_provider_packages():\n \"\"\"Returns all provider packages configured in setup.py\"\"\"\n return \" \".join([get_provider_package_from_package_id(package) for package in PROVIDERS_REQUIREMENTS])\n\n\nclass AirflowDistribution(Distribution):\n \"\"\"\n The setuptools.Distribution subclass with Airflow specific behaviour\n\n The reason for pylint: disable=signature-differs of parse_config_files is explained here:\n https://github.com/PyCQA/pylint/issues/3737\n\n \"\"\"\n\n def parse_config_files(self, *args, **kwargs): # pylint: disable=signature-differs\n \"\"\"\n Ensure that when we have been asked to install providers from sources\n that we don't *also* try to install those providers from PyPI.\n Also we should make sure that in this case we copy provider.yaml files so that\n Providers manager can find package information.\n \"\"\"\n super().parse_config_files(*args, **kwargs)\n if os.getenv(INSTALL_PROVIDERS_FROM_SOURCES) == 'true':\n self.install_requires = [ # noqa pylint: disable=attribute-defined-outside-init\n req for req in self.install_requires if not req.startswith('apache-airflow-providers-')\n ]\n provider_yaml_files = glob.glob(\"airflow/providers/**/provider.yaml\", recursive=True)\n for provider_yaml_file in provider_yaml_files:\n provider_relative_path = relpath(provider_yaml_file, os.path.join(my_dir, \"airflow\"))\n self.package_data['airflow'].append(provider_relative_path)\n else:\n self.install_requires.extend(\n [get_provider_package_from_package_id(package_id) for package_id in PREINSTALLED_PROVIDERS]\n )\n\n\ndef replace_extra_requirement_with_provider_packages(extra: str, providers: List[str]) -> None:\n \"\"\"\n Replaces extra requirement with provider package. The intention here is that when\n the provider is added as dependency of extra, there is no need to add the dependencies\n separately. This is not needed and even harmful, because in case of future versions of\n the provider, the requirements might change, so hard-coding requirements from the version\n that was available at the release time might cause dependency conflicts in the future.\n\n Say for example that you have salesforce provider with those deps:\n\n { 'salesforce': ['simple-salesforce>=1.0.0', 'tableauserverclient'] }\n\n Initially ['salesforce'] extra has those requirements and it works like that when you install\n it when INSTALL_PROVIDERS_FROM_SOURCES is set to `true` (during the development). However, when\n the production installation is used, The dependencies are changed:\n\n { 'salesforce': ['apache-airflow-providers-salesforce'] }\n\n And then, 'apache-airflow-providers-salesforce' package has those 'install_requires' dependencies:\n ['simple-salesforce>=1.0.0', 'tableauserverclient']\n\n So transitively 'salesforce' extra has all the requirements it needs and in case the provider\n changes it's dependencies, they will transitively change as well.\n\n In the constraint mechanism we save both - provider versions and it's dependencies\n version, which means that installation using constraints is repeatable.\n\n :param extra: Name of the extra to add providers to\n :param providers: list of provider ids\n \"\"\"\n EXTRAS_REQUIREMENTS[extra] = [\n get_provider_package_from_package_id(package_name) for package_name in providers\n ]\n\n\ndef add_provider_packages_to_extra_requirements(extra: str, providers: List[str]) -> None:\n \"\"\"\n Adds provider packages as requirements to extra. This is used to add provider packages as requirements\n to the \"bulk\" kind of extras. Those bulk extras do not have the detailed 'extra' requirements as\n initial values, so instead of replacing them (see previous function) we can extend them.\n\n :param extra: Name of the extra to add providers to\n :param providers: list of provider ids\n \"\"\"\n EXTRAS_REQUIREMENTS[extra].extend(\n [get_provider_package_from_package_id(package_name) for package_name in providers]\n )\n\n\ndef add_all_provider_packages() -> None:\n \"\"\"\n In case of regular installation (providers installed from packages), we should add extra dependencies to\n Airflow - to get the providers automatically installed when those extras are installed.\n\n For providers installed from sources we skip that step. That helps to test and install airflow with\n all packages in CI - for example when new providers are added, otherwise the installation would fail\n as the new provider is not yet in PyPI.\n\n \"\"\"\n for provider in ALL_PROVIDERS:\n replace_extra_requirement_with_provider_packages(provider, [provider])\n add_provider_packages_to_extra_requirements(\"all\", ALL_PROVIDERS)\n add_provider_packages_to_extra_requirements(\"devel_ci\", ALL_PROVIDERS)\n add_provider_packages_to_extra_requirements(\"devel_all\", ALL_PROVIDERS)\n add_provider_packages_to_extra_requirements(\"all_dbs\", ALL_DB_PROVIDERS)\n add_provider_packages_to_extra_requirements(\n \"devel_hadoop\", [\"apache.hdfs\", \"apache.hive\", \"presto\", \"trino\"]\n )\n add_all_deprecated_provider_packages()\n\n\nclass Develop(develop_orig):\n \"\"\"Forces removal of providers in editable mode.\"\"\"\n\n def run(self):\n self.announce('Installing in editable mode. Uninstalling provider packages!', level=log.INFO)\n # We need to run \"python3 -m pip\" because it might be that older PIP binary is in the path\n # And it results with an error when running pip directly (cannot import pip module)\n # also PIP does not have a stable API so we have to run subprocesses ¯\\_(ツ)_/¯\n try:\n installed_packages = (\n subprocess.check_output([\"python3\", \"-m\", \"pip\", \"freeze\"]).decode().splitlines()\n )\n airflow_provider_packages = [\n package_line.split(\"=\")[0]\n for package_line in installed_packages\n if package_line.startswith(\"apache-airflow-providers\")\n ]\n self.announce(f'Uninstalling ${airflow_provider_packages}!', level=log.INFO)\n subprocess.check_call([\"python3\", \"-m\", \"pip\", \"uninstall\", \"--yes\", *airflow_provider_packages])\n except subprocess.CalledProcessError as e:\n self.announce(f'Error when uninstalling airflow provider packages: {e}!', level=log.WARN)\n super().run()\n\n\nclass Install(install_orig):\n \"\"\"Forces installation of providers from sources in editable mode.\"\"\"\n\n def run(self):\n self.announce('Standard installation. Providers are installed from packages', level=log.INFO)\n super().run()\n\n\ndef do_setup() -> None:\n \"\"\"\n Perform the Airflow package setup.\n\n Most values come from setup.cfg, only the dynamically calculated ones are passed to setup\n function call. See https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html\n \"\"\"\n setup_kwargs = {}\n\n def include_provider_namespace_packages_when_installing_from_sources() -> None:\n \"\"\"\n When installing providers from sources we install all namespace packages found below airflow,\n including airflow and provider packages, otherwise defaults from setup.cfg control this.\n The kwargs in setup() call override those that are specified in setup.cfg.\n \"\"\"\n if os.getenv(INSTALL_PROVIDERS_FROM_SOURCES) == 'true':\n setup_kwargs['packages'] = find_namespace_packages(include=['airflow*'])\n\n include_provider_namespace_packages_when_installing_from_sources()\n if os.getenv(INSTALL_PROVIDERS_FROM_SOURCES) == 'true':\n print(\"Installing providers from sources. Skip adding providers as dependencies\")\n else:\n add_all_provider_packages()\n\n write_version()\n setup(\n distclass=AirflowDistribution,\n version=version,\n extras_require=EXTRAS_REQUIREMENTS,\n download_url=('https://archive.apache.org/dist/airflow/' + version),\n cmdclass={\n 'extra_clean': CleanCommand,\n 'compile_assets': CompileAssets,\n 'list_extras': ListExtras,\n 'install': Install,\n 'develop': Develop,\n },\n test_suite='setup.airflow_test_suite',\n **setup_kwargs,\n )\n\n\nif __name__ == \"__main__\":\n do_setup()\n", "path": "setup.py" } ]
[ { "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\"\"\"Setup.py for the Airflow project.\"\"\"\nimport glob\nimport logging\nimport os\nimport subprocess\nimport unittest\nfrom copy import deepcopy\nfrom distutils import log\nfrom os.path import dirname, relpath\nfrom textwrap import wrap\nfrom typing import Dict, List\n\nfrom setuptools import Command, Distribution, find_namespace_packages, setup\nfrom setuptools.command.develop import develop as develop_orig\nfrom setuptools.command.install import install as install_orig\n\n# Controls whether providers are installed from packages or directly from sources\n# It is turned on by default in case of development environments such as Breeze\n# And it is particularly useful when you add a new provider and there is no\n# PyPI version to install the provider package from\nINSTALL_PROVIDERS_FROM_SOURCES = 'INSTALL_PROVIDERS_FROM_SOURCES'\n\nlogger = logging.getLogger(__name__)\n\nversion = '2.1.0.dev0'\n\nmy_dir = dirname(__file__)\n\n\ndef airflow_test_suite() -> unittest.TestSuite:\n \"\"\"Test suite for Airflow tests\"\"\"\n test_loader = unittest.TestLoader()\n test_suite = test_loader.discover(os.path.join(my_dir, 'tests'), pattern='test_*.py')\n return test_suite\n\n\nclass CleanCommand(Command):\n \"\"\"\n Command to tidy up the project root.\n Registered as cmdclass in setup() so it can be called with ``python setup.py extra_clean``.\n \"\"\"\n\n description = \"Tidy up the project root\"\n user_options: List[str] = []\n\n def initialize_options(self):\n \"\"\"Set default values for options.\"\"\"\n\n def finalize_options(self):\n \"\"\"Set final values for options.\"\"\"\n\n @staticmethod\n def rm_all_files(files: List[str]):\n \"\"\"Remove all files from the list\"\"\"\n for file in files:\n try:\n os.remove(file)\n except Exception as e: # noqa pylint: disable=broad-except\n logger.warning(\"Error when removing %s: %s\", file, e)\n\n def run(self):\n \"\"\"Remove temporary files and directories.\"\"\"\n os.chdir(my_dir)\n self.rm_all_files(glob.glob('./build/*'))\n self.rm_all_files(glob.glob('./**/__pycache__/*', recursive=True))\n self.rm_all_files(glob.glob('./**/*.pyc', recursive=True))\n self.rm_all_files(glob.glob('./dist/*'))\n self.rm_all_files(glob.glob('./*.egg-info'))\n self.rm_all_files(glob.glob('./docker-context-files/*.whl'))\n self.rm_all_files(glob.glob('./docker-context-files/*.tgz'))\n\n\nclass CompileAssets(Command):\n \"\"\"\n Compile and build the frontend assets using yarn and webpack.\n Registered as cmdclass in setup() so it can be called with ``python setup.py compile_assets``.\n \"\"\"\n\n description = \"Compile and build the frontend assets\"\n user_options: List[str] = []\n\n def initialize_options(self):\n \"\"\"Set default values for options.\"\"\"\n\n def finalize_options(self):\n \"\"\"Set final values for options.\"\"\"\n\n def run(self): # noqa\n \"\"\"Run a command to compile and build assets.\"\"\"\n subprocess.check_call('./airflow/www/compile_assets.sh')\n\n\nclass ListExtras(Command):\n \"\"\"\n List all available extras\n Registered as cmdclass in setup() so it can be called with ``python setup.py list_extras``.\n \"\"\"\n\n description = \"List available extras\"\n user_options: List[str] = []\n\n def initialize_options(self):\n \"\"\"Set default values for options.\"\"\"\n\n def finalize_options(self):\n \"\"\"Set final values for options.\"\"\"\n\n def run(self): # noqa\n \"\"\"List extras.\"\"\"\n print(\"\\n\".join(wrap(\", \".join(EXTRAS_REQUIREMENTS.keys()), 100)))\n\n\ndef git_version(version_: str) -> str:\n \"\"\"\n Return a version to identify the state of the underlying git repo. The version will\n indicate whether the head of the current git-backed working directory is tied to a\n release tag or not : it will indicate the former with a 'release:{version}' prefix\n and the latter with a '.dev0' suffix. Following the prefix will be a sha of the current\n branch head. Finally, a \"dirty\" suffix is appended to indicate that uncommitted\n changes are present.\n\n :param str version_: Semver version\n :return: Found Airflow version in Git repo\n :rtype: str\n \"\"\"\n try:\n import git\n\n try:\n repo = git.Repo(os.path.join(*[my_dir, '.git']))\n except git.NoSuchPathError:\n logger.warning('.git directory not found: Cannot compute the git version')\n return ''\n except git.InvalidGitRepositoryError:\n logger.warning('Invalid .git directory not found: Cannot compute the git version')\n return ''\n except ImportError:\n logger.warning('gitpython not found: Cannot compute the git version.')\n return ''\n if repo:\n sha = repo.head.commit.hexsha\n if repo.is_dirty():\n return f'.dev0+{sha}.dirty'\n # commit is clean\n return f'.release:{version_}+{sha}'\n return 'no_git_version'\n\n\ndef write_version(filename: str = os.path.join(*[my_dir, \"airflow\", \"git_version\"])):\n \"\"\"\n Write the Semver version + git hash to file, e.g. \".dev0+2f635dc265e78db6708f59f68e8009abb92c1e65\".\n\n :param str filename: Destination file to write\n \"\"\"\n text = f\"{git_version(version)}\"\n with open(filename, 'w') as file:\n file.write(text)\n\n\ndef get_sphinx_theme_version() -> str:\n \"\"\"\n Return sphinx theme version. If USE_THEME_FROM_GIT env variable is set, the theme is used from\n GitHub to allow dynamically update it during development. However for regular PIP release\n you cannot use @ package specification, so the latest available released theme package from\n PIP is used.\n :return: Version of sphinx theme to use.\n \"\"\"\n if os.environ.get('USE_THEME_FROM_GIT'):\n return (\n \"@ https://github.com/apache/airflow-site/releases/download/0.0.4/\"\n + \"sphinx_airflow_theme-0.0.4-py3-none-any.whl\"\n )\n return ''\n\n\n# 'Start dependencies group' and 'Start dependencies group' are mark for ./scripts/ci/check_order_setup.py\n# If you change this mark you should also change ./scripts/ci/check_order_setup.py\n# Start dependencies group\namazon = [\n 'boto3>=1.15.0,<1.18.0',\n 'watchtower~=0.7.3',\n]\napache_beam = [\n 'apache-beam>=2.20.0',\n]\nasync_packages = [\n 'eventlet>= 0.9.7',\n 'gevent>=0.13',\n 'greenlet>=0.4.9',\n]\natlas = [\n 'atlasclient>=0.1.2',\n]\nazure = [\n 'azure-batch>=8.0.0',\n 'azure-cosmos>=3.0.1,<4',\n 'azure-datalake-store>=0.0.45',\n 'azure-identity>=1.3.1',\n 'azure-keyvault>=4.1.0',\n 'azure-kusto-data>=0.0.43,<0.1',\n 'azure-mgmt-containerinstance>=1.5.0,<2.0',\n 'azure-mgmt-datafactory>=1.0.0,<2.0',\n 'azure-mgmt-datalake-store>=0.5.0',\n 'azure-mgmt-resource>=2.2.0',\n 'azure-storage-blob>=12.7.0',\n 'azure-storage-common>=2.1.0',\n 'azure-storage-file>=2.1.0',\n]\ncassandra = [\n 'cassandra-driver>=3.13.0,<4',\n]\ncelery = [\n 'celery~=4.4.2',\n 'flower>=0.7.3, <1.0',\n 'vine~=1.3', # https://stackoverflow.com/questions/32757259/celery-no-module-named-five\n]\ncgroups = [\n 'cgroupspy>=0.1.4',\n]\ncloudant = [\n 'cloudant>=2.0',\n]\ndask = [\n 'cloudpickle>=1.4.1, <1.5.0',\n 'dask<2021.3.1;python_version<\"3.7\"', # dask stopped supporting python 3.6 in 2021.3.1 version\n 'dask>=2.9.0;python_version>=\"3.7\"',\n 'distributed>=2.11.1, <2.20',\n]\ndatabricks = [\n 'requests>=2.20.0, <3',\n]\ndatadog = [\n 'datadog>=0.14.0',\n]\ndoc = [\n # Sphinx is limited to < 3.5.0 because of https://github.com/sphinx-doc/sphinx/issues/8880\n 'sphinx>=2.1.2, <3.5.0',\n f'sphinx-airflow-theme{get_sphinx_theme_version()}',\n 'sphinx-argparse>=0.1.13',\n 'sphinx-autoapi==1.0.0',\n 'sphinx-copybutton',\n 'sphinx-jinja~=1.1',\n 'sphinx-rtd-theme>=0.1.6',\n 'sphinxcontrib-httpdomain>=1.7.0',\n 'sphinxcontrib-redoc>=1.6.0',\n 'sphinxcontrib-spelling==5.2.1',\n]\ndocker = [\n 'docker',\n]\ndruid = [\n 'pydruid>=0.4.1',\n]\nelasticsearch = [\n 'elasticsearch>7, <7.6.0',\n 'elasticsearch-dbapi==0.1.0',\n 'elasticsearch-dsl>=5.0.0',\n]\nexasol = [\n 'pyexasol>=0.5.1,<1.0.0',\n]\nfacebook = [\n 'facebook-business>=6.0.2',\n]\nflask_oauth = [\n 'Flask-OAuthlib>=0.9.1,<0.9.6', # Flask OAuthLib 0.9.6 requires Flask-Login 0.5.0 - breaks FAB\n 'oauthlib!=2.0.3,!=2.0.4,!=2.0.5,<3.0.0,>=1.1.2',\n 'requests-oauthlib<1.2.0',\n]\ngoogle = [\n 'PyOpenSSL',\n 'google-ads>=4.0.0,<8.0.0',\n 'google-api-core>=1.25.1,<2.0.0',\n 'google-api-python-client>=1.6.0,<2.0.0',\n 'google-auth>=1.0.0,<2.0.0',\n 'google-auth-httplib2>=0.0.1',\n 'google-cloud-automl>=2.1.0,<3.0.0',\n 'google-cloud-bigquery-datatransfer>=3.0.0,<4.0.0',\n 'google-cloud-bigtable>=1.0.0,<2.0.0',\n 'google-cloud-container>=0.1.1,<2.0.0',\n 'google-cloud-datacatalog>=3.0.0,<4.0.0',\n 'google-cloud-dataproc>=2.2.0,<3.0.0',\n 'google-cloud-dlp>=0.11.0,<2.0.0',\n 'google-cloud-kms>=2.0.0,<3.0.0',\n 'google-cloud-language>=1.1.1,<2.0.0',\n 'google-cloud-logging>=2.1.1,<3.0.0',\n 'google-cloud-memcache>=0.2.0',\n 'google-cloud-monitoring>=2.0.0,<3.0.0',\n 'google-cloud-os-login>=2.0.0,<3.0.0',\n 'google-cloud-pubsub>=2.0.0,<3.0.0',\n 'google-cloud-redis>=2.0.0,<3.0.0',\n 'google-cloud-secret-manager>=0.2.0,<2.0.0',\n 'google-cloud-spanner>=1.10.0,<2.0.0',\n 'google-cloud-speech>=0.36.3,<2.0.0',\n 'google-cloud-storage>=1.30,<2.0.0',\n 'google-cloud-tasks>=2.0.0,<3.0.0',\n 'google-cloud-texttospeech>=0.4.0,<2.0.0',\n 'google-cloud-translate>=1.5.0,<2.0.0',\n 'google-cloud-videointelligence>=1.7.0,<2.0.0',\n 'google-cloud-vision>=0.35.2,<2.0.0',\n 'google-cloud-workflows>=0.1.0,<2.0.0',\n 'grpcio-gcp>=0.2.2',\n 'json-merge-patch~=0.2',\n # pandas-gbq 0.15.0 release broke google provider's bigquery import\n # _check_google_client_version (airflow/providers/google/cloud/hooks/bigquery.py:49)\n 'pandas-gbq<0.15.0',\n 'plyvel',\n]\ngrpc = [\n 'google-auth>=1.0.0, <2.0.0dev',\n 'google-auth-httplib2>=0.0.1',\n 'grpcio>=1.15.0',\n]\nhashicorp = [\n 'hvac~=0.10',\n]\nhdfs = [\n 'snakebite-py3',\n]\nhive = [\n 'hmsclient>=0.1.0',\n 'pyhive[hive]>=0.6.0',\n 'thrift>=0.9.2',\n]\njdbc = [\n 'jaydebeapi>=1.1.1',\n]\njenkins = [\n 'python-jenkins>=1.0.0',\n]\njira = [\n 'JIRA>1.0.7',\n]\nkerberos = [\n 'pykerberos>=1.1.13',\n 'requests_kerberos>=0.10.0',\n 'thrift_sasl>=0.2.0',\n]\nkubernetes = [\n 'cryptography>=2.0.0',\n 'kubernetes>=3.0.0, <12.0.0',\n]\nkylin = ['kylinpy>=2.6']\nldap = [\n 'ldap3>=2.5.1',\n 'python-ldap',\n]\nmongo = [\n 'dnspython>=1.13.0,<2.0.0',\n 'pymongo>=3.6.0',\n]\nmssql = [\n 'pymssql~=2.1,>=2.1.5',\n]\nmysql = [\n 'mysql-connector-python>=8.0.11, <=8.0.22',\n 'mysqlclient>=1.3.6,<3',\n]\nneo4j = ['neo4j>=4.2.1']\nodbc = [\n 'pyodbc',\n]\noracle = [\n 'cx_Oracle>=5.1.2',\n]\npagerduty = [\n 'pdpyras>=4.1.2,<5',\n]\npapermill = [\n 'papermill[all]>=1.2.1',\n 'scrapbook[all]',\n]\npassword = [\n 'bcrypt>=2.0.0',\n 'flask-bcrypt>=0.7.1',\n]\npinot = [\n # pinotdb v0.1.1 may still work with older versions of Apache Pinot, but we've confirmed that it\n # causes a problem with newer versions.\n 'pinotdb>0.1.2,<1.0.0',\n]\nplexus = [\n 'arrow>=0.16.0,<1.0.0',\n]\npostgres = [\n 'psycopg2-binary>=2.7.4',\n]\npresto = ['presto-python-client>=0.7.0,<0.8']\nqubole = [\n 'qds-sdk>=1.10.4',\n]\nrabbitmq = [\n 'amqp<5.0.0',\n]\nredis = [\n 'redis~=3.2',\n]\nsalesforce = [\n 'simple-salesforce>=1.0.0',\n 'tableauserverclient',\n]\nsamba = [\n 'pysmbclient>=0.1.3',\n]\nsegment = [\n 'analytics-python>=1.2.9',\n]\nsendgrid = [\n 'sendgrid>=6.0.0,<7',\n]\nsentry = [\n 'blinker>=1.1',\n 'sentry-sdk>=0.8.0',\n]\nsingularity = ['spython>=0.0.56']\nslack = [\n 'slack_sdk>=3.0.0,<4.0.0',\n]\nsnowflake = [\n 'snowflake-connector-python>=2.4.1',\n 'snowflake-sqlalchemy>=1.1.0',\n]\nspark = [\n 'pyspark',\n]\nssh = [\n 'paramiko>=2.6.0',\n 'pysftp>=0.2.9',\n 'sshtunnel>=0.1.4,<0.2',\n]\nstatsd = [\n 'statsd>=3.3.0, <4.0',\n]\ntableau = [\n 'tableauserverclient',\n]\ntelegram = [\n 'python-telegram-bot==13.0',\n]\ntrino = ['trino']\nvertica = [\n 'vertica-python>=0.5.1',\n]\nvirtualenv = [\n 'virtualenv',\n]\nwebhdfs = [\n 'hdfs[avro,dataframe,kerberos]>=2.0.4',\n]\nwinrm = [\n 'pywinrm~=0.4',\n]\nyandex = [\n 'yandexcloud>=0.22.0',\n]\nzendesk = [\n 'zdesk',\n]\n# End dependencies group\n\ndevel = [\n 'aws_xray_sdk',\n 'beautifulsoup4~=4.7.1',\n 'black',\n 'blinker',\n 'bowler',\n 'click~=7.1',\n 'coverage',\n 'docutils',\n 'filelock',\n 'flake8>=3.6.0',\n 'flake8-colors',\n 'flaky',\n 'freezegun',\n 'github3.py',\n 'gitpython',\n 'importlib-resources~=1.4',\n 'ipdb',\n 'jira',\n 'jsonpath-ng',\n 'jsondiff',\n 'mongomock',\n 'moto~=2.0',\n 'mypy==0.770',\n 'parameterized',\n 'paramiko',\n 'pipdeptree',\n 'pre-commit',\n 'pylint~=2.8.1',\n 'pysftp',\n 'pytest~=6.0',\n 'pytest-cov',\n 'pytest-instafail',\n 'pytest-rerunfailures~=9.1',\n 'pytest-timeouts',\n 'pytest-xdist',\n 'python-jose',\n 'pywinrm',\n 'qds-sdk>=1.9.6',\n 'requests_mock',\n 'wheel',\n 'yamllint',\n]\n\ndevel_minreq = cgroups + devel + doc + kubernetes + mysql + password\ndevel_hadoop = devel_minreq + hdfs + hive + kerberos + presto + webhdfs\n\n# Dict of all providers which are part of the Apache Airflow repository together with their requirements\nPROVIDERS_REQUIREMENTS: Dict[str, List[str]] = {\n 'airbyte': [],\n 'amazon': amazon,\n 'apache.beam': apache_beam,\n 'apache.cassandra': cassandra,\n 'apache.druid': druid,\n 'apache.hdfs': hdfs,\n 'apache.hive': hive,\n 'apache.kylin': kylin,\n 'apache.livy': [],\n 'apache.pig': [],\n 'apache.pinot': pinot,\n 'apache.spark': spark,\n 'apache.sqoop': [],\n 'celery': celery,\n 'cloudant': cloudant,\n 'cncf.kubernetes': kubernetes,\n 'databricks': databricks,\n 'datadog': datadog,\n 'dingding': [],\n 'discord': [],\n 'docker': docker,\n 'elasticsearch': elasticsearch,\n 'exasol': exasol,\n 'facebook': facebook,\n 'ftp': [],\n 'google': google,\n 'grpc': grpc,\n 'hashicorp': hashicorp,\n 'http': [],\n 'imap': [],\n 'jdbc': jdbc,\n 'jenkins': jenkins,\n 'jira': jira,\n 'microsoft.azure': azure,\n 'microsoft.mssql': mssql,\n 'microsoft.winrm': winrm,\n 'mongo': mongo,\n 'mysql': mysql,\n 'neo4j': neo4j,\n 'odbc': odbc,\n 'openfaas': [],\n 'opsgenie': [],\n 'oracle': oracle,\n 'pagerduty': pagerduty,\n 'papermill': papermill,\n 'plexus': plexus,\n 'postgres': postgres,\n 'presto': presto,\n 'qubole': qubole,\n 'redis': redis,\n 'salesforce': salesforce,\n 'samba': samba,\n 'segment': segment,\n 'sendgrid': sendgrid,\n 'sftp': ssh,\n 'singularity': singularity,\n 'slack': slack,\n 'snowflake': snowflake,\n 'sqlite': [],\n 'ssh': ssh,\n 'tableau': tableau,\n 'telegram': telegram,\n 'trino': trino,\n 'vertica': vertica,\n 'yandex': yandex,\n 'zendesk': zendesk,\n}\n\n# Those are all additional extras which do not have their own 'providers'\n# The 'apache.atlas' and 'apache.webhdfs' are extras that provide additional libraries\n# but they do not have separate providers (yet?), they are merely there to add extra libraries\n# That can be used in custom python/bash operators.\nADDITIONAL_EXTRAS_REQUIREMENTS: Dict[str, List[str]] = {\n 'apache.atlas': atlas,\n 'apache.webhdfs': webhdfs,\n}\n\n\n# Those are extras that are extensions of the 'core' Airflow. They provide additional features\n# To airflow core. They do not have separate providers because they do not have any operators/hooks etc.\nCORE_EXTRAS_REQUIREMENTS: Dict[str, List[str]] = {\n 'async': async_packages,\n 'celery': celery, # also has provider, but it extends the core with the Celery executor\n 'cgroups': cgroups,\n 'cncf.kubernetes': kubernetes, # also has provider, but it extends the core with the KubernetesExecutor\n 'dask': dask,\n 'github_enterprise': flask_oauth,\n 'google_auth': flask_oauth,\n 'kerberos': kerberos,\n 'ldap': ldap,\n 'password': password,\n 'rabbitmq': rabbitmq,\n 'sentry': sentry,\n 'statsd': statsd,\n 'virtualenv': virtualenv,\n}\n\n\nEXTRAS_REQUIREMENTS: Dict[str, List[str]] = deepcopy(CORE_EXTRAS_REQUIREMENTS)\n\n\ndef add_extras_for_all_providers() -> None:\n \"\"\"\n Adds extras for all providers.\n By default all providers have the same extra name as provider id, for example\n 'apache.hive' extra has 'apache.hive' provider requirement.\n \"\"\"\n for provider_name, provider_requirement in PROVIDERS_REQUIREMENTS.items():\n EXTRAS_REQUIREMENTS[provider_name] = provider_requirement\n\n\ndef add_additional_extras() -> None:\n \"\"\"Adds extras for all additional extras.\"\"\"\n for extra_name, extra_requirement in ADDITIONAL_EXTRAS_REQUIREMENTS.items():\n EXTRAS_REQUIREMENTS[extra_name] = extra_requirement\n\n\nadd_extras_for_all_providers()\nadd_additional_extras()\n\n#############################################################################################################\n# The whole section can be removed in Airflow 3.0 as those old aliases are deprecated in 2.* series\n#############################################################################################################\n\n# Dictionary of aliases from 1.10 - deprecated in Airflow 2.*\nEXTRAS_DEPRECATED_ALIASES: Dict[str, str] = {\n 'atlas': 'apache.atlas',\n 'aws': 'amazon',\n 'azure': 'microsoft.azure',\n 'cassandra': 'apache.cassandra',\n 'crypto': '', # All crypto requirements are installation requirements of core Airflow\n 'druid': 'apache.druid',\n 'gcp': 'google',\n 'gcp_api': 'google',\n 'hdfs': 'apache.hdfs',\n 'hive': 'apache.hive',\n 'kubernetes': 'cncf.kubernetes',\n 'mssql': 'microsoft.mssql',\n 'pinot': 'apache.pinot',\n 'qds': 'qubole',\n 's3': 'amazon',\n 'spark': 'apache.spark',\n 'webhdfs': 'apache.webhdfs',\n 'winrm': 'microsoft.winrm',\n}\n\nEXTRAS_DEPRECATED_ALIASES_NOT_PROVIDERS: List[str] = [\n \"crypto\",\n \"webhdfs\",\n]\n\n\ndef add_extras_for_all_deprecated_aliases() -> None:\n \"\"\"\n Add extras for all deprecated aliases. Requirements for those deprecated aliases are the same\n as the extras they are replaced with.\n The requirements are not copies - those are the same lists as for the new extras. This is intended.\n Thanks to that if the original extras are later extended with providers, aliases are extended as well.\n \"\"\"\n for alias, extra in EXTRAS_DEPRECATED_ALIASES.items():\n requirements = EXTRAS_REQUIREMENTS.get(extra) if extra != '' else []\n if requirements is None:\n raise Exception(f\"The extra {extra} is missing for deprecated alias {alias}\")\n EXTRAS_REQUIREMENTS[alias] = requirements\n\n\ndef add_all_deprecated_provider_packages() -> None:\n \"\"\"\n For deprecated aliases that are providers, we will swap the providers requirements to instead\n be the provider itself.\n\n e.g. {\"kubernetes\": [\"kubernetes>=3.0.0, <12.0.0\", ...]} becomes\n {\"kubernetes\": [\"apache-airflow-provider-cncf-kubernetes\"]}\n \"\"\"\n for alias, provider in EXTRAS_DEPRECATED_ALIASES.items():\n if alias in EXTRAS_DEPRECATED_ALIASES_NOT_PROVIDERS:\n continue\n replace_extra_requirement_with_provider_packages(alias, [provider])\n\n\nadd_extras_for_all_deprecated_aliases()\n\n#############################################################################################################\n# End of deprecated section\n#############################################################################################################\n\n# This is list of all providers. It's a shortcut for anyone who would like to easily get list of\n# All providers. It is used by pre-commits.\nALL_PROVIDERS = list(PROVIDERS_REQUIREMENTS.keys())\n\nALL_DB_PROVIDERS = [\n 'apache.cassandra',\n 'apache.druid',\n 'apache.hdfs',\n 'apache.hive',\n 'apache.pinot',\n 'cloudant',\n 'exasol',\n 'microsoft.mssql',\n 'mongo',\n 'mysql',\n 'neo4j',\n 'postgres',\n 'presto',\n 'trino',\n 'vertica',\n]\n\n# Special requirements for all database-related providers. They are de-duplicated.\nall_dbs = list({req for db_provider in ALL_DB_PROVIDERS for req in PROVIDERS_REQUIREMENTS[db_provider]})\n\n# Requirements for all \"user\" extras (no devel). They are de-duplicated. Note that we do not need\n# to separately add providers requirements - they have been already added as 'providers' extras above\n_all_requirements = list({req for extras_reqs in EXTRAS_REQUIREMENTS.values() for req in extras_reqs})\n\n# All user extras here\nEXTRAS_REQUIREMENTS[\"all\"] = _all_requirements\n\n# All db user extras here\nEXTRAS_REQUIREMENTS[\"all_dbs\"] = all_dbs\n\n# This can be simplified to devel_hadoop + _all_requirements due to inclusions\n# but we keep it for explicit sake. We are de-duplicating it anyway.\ndevel_all = list(set(_all_requirements + doc + devel_minreq + devel_hadoop))\n\n# Those are packages excluded for \"all\" dependencies\nPACKAGES_EXCLUDED_FOR_ALL = []\nPACKAGES_EXCLUDED_FOR_ALL.extend(\n [\n 'snakebite',\n ]\n)\n\n\ndef is_package_excluded(package: str, exclusion_list: List[str]):\n \"\"\"\n Checks if package should be excluded.\n\n :param package: package name (beginning of it)\n :param exclusion_list: list of excluded packages\n :return: true if package should be excluded\n \"\"\"\n return any(package.startswith(excluded_package) for excluded_package in exclusion_list)\n\n\ndevel_all = [\n package\n for package in devel_all\n if not is_package_excluded(package=package, exclusion_list=PACKAGES_EXCLUDED_FOR_ALL)\n]\n\ndevel_ci = devel_all\n\n\n# Those are extras that we have to add for development purposes\n# They can be use to install some predefined set of dependencies.\nEXTRAS_REQUIREMENTS[\"doc\"] = doc\nEXTRAS_REQUIREMENTS[\"devel\"] = devel_minreq # devel_minreq already includes doc\nEXTRAS_REQUIREMENTS[\"devel_hadoop\"] = devel_hadoop # devel_hadoop already includes devel_minreq\nEXTRAS_REQUIREMENTS[\"devel_all\"] = devel_all\nEXTRAS_REQUIREMENTS[\"devel_ci\"] = devel_ci\n\n\ndef sort_extras_requirements() -> Dict[str, List[str]]:\n \"\"\"\n For Python 3.6+ the dictionary order remains when keys() are retrieved.\n Sort both: extras and list of dependencies to make it easier to analyse problems\n external packages will be first, then if providers are added they are added at the end of the lists.\n \"\"\"\n sorted_requirements = dict(sorted(EXTRAS_REQUIREMENTS.items())) # noqa\n for extra_list in sorted_requirements.values():\n extra_list.sort()\n return sorted_requirements\n\n\nEXTRAS_REQUIREMENTS = sort_extras_requirements()\n\n# Those providers are pre-installed always when airflow is installed.\n# Those providers do not have dependency on airflow2.0 because that would lead to circular dependencies.\n# This is not a problem for PIP but some tools (pipdeptree) show those as a warning.\nPREINSTALLED_PROVIDERS = [\n 'ftp',\n 'http',\n 'imap',\n 'sqlite',\n]\n\n\ndef get_provider_package_from_package_id(package_id: str):\n \"\"\"\n Builds the name of provider package out of the package id provided/\n\n :param package_id: id of the package (like amazon or microsoft.azure)\n :return: full name of package in PyPI\n \"\"\"\n package_suffix = package_id.replace(\".\", \"-\")\n return f\"apache-airflow-providers-{package_suffix}\"\n\n\ndef get_all_provider_packages():\n \"\"\"Returns all provider packages configured in setup.py\"\"\"\n return \" \".join([get_provider_package_from_package_id(package) for package in PROVIDERS_REQUIREMENTS])\n\n\nclass AirflowDistribution(Distribution):\n \"\"\"\n The setuptools.Distribution subclass with Airflow specific behaviour\n\n The reason for pylint: disable=signature-differs of parse_config_files is explained here:\n https://github.com/PyCQA/pylint/issues/3737\n\n \"\"\"\n\n def parse_config_files(self, *args, **kwargs): # pylint: disable=signature-differs\n \"\"\"\n Ensure that when we have been asked to install providers from sources\n that we don't *also* try to install those providers from PyPI.\n Also we should make sure that in this case we copy provider.yaml files so that\n Providers manager can find package information.\n \"\"\"\n super().parse_config_files(*args, **kwargs)\n if os.getenv(INSTALL_PROVIDERS_FROM_SOURCES) == 'true':\n self.install_requires = [ # noqa pylint: disable=attribute-defined-outside-init\n req for req in self.install_requires if not req.startswith('apache-airflow-providers-')\n ]\n provider_yaml_files = glob.glob(\"airflow/providers/**/provider.yaml\", recursive=True)\n for provider_yaml_file in provider_yaml_files:\n provider_relative_path = relpath(provider_yaml_file, os.path.join(my_dir, \"airflow\"))\n self.package_data['airflow'].append(provider_relative_path)\n else:\n self.install_requires.extend(\n [get_provider_package_from_package_id(package_id) for package_id in PREINSTALLED_PROVIDERS]\n )\n\n\ndef replace_extra_requirement_with_provider_packages(extra: str, providers: List[str]) -> None:\n \"\"\"\n Replaces extra requirement with provider package. The intention here is that when\n the provider is added as dependency of extra, there is no need to add the dependencies\n separately. This is not needed and even harmful, because in case of future versions of\n the provider, the requirements might change, so hard-coding requirements from the version\n that was available at the release time might cause dependency conflicts in the future.\n\n Say for example that you have salesforce provider with those deps:\n\n { 'salesforce': ['simple-salesforce>=1.0.0', 'tableauserverclient'] }\n\n Initially ['salesforce'] extra has those requirements and it works like that when you install\n it when INSTALL_PROVIDERS_FROM_SOURCES is set to `true` (during the development). However, when\n the production installation is used, The dependencies are changed:\n\n { 'salesforce': ['apache-airflow-providers-salesforce'] }\n\n And then, 'apache-airflow-providers-salesforce' package has those 'install_requires' dependencies:\n ['simple-salesforce>=1.0.0', 'tableauserverclient']\n\n So transitively 'salesforce' extra has all the requirements it needs and in case the provider\n changes it's dependencies, they will transitively change as well.\n\n In the constraint mechanism we save both - provider versions and it's dependencies\n version, which means that installation using constraints is repeatable.\n\n :param extra: Name of the extra to add providers to\n :param providers: list of provider ids\n \"\"\"\n EXTRAS_REQUIREMENTS[extra] = [\n get_provider_package_from_package_id(package_name) for package_name in providers\n ]\n\n\ndef add_provider_packages_to_extra_requirements(extra: str, providers: List[str]) -> None:\n \"\"\"\n Adds provider packages as requirements to extra. This is used to add provider packages as requirements\n to the \"bulk\" kind of extras. Those bulk extras do not have the detailed 'extra' requirements as\n initial values, so instead of replacing them (see previous function) we can extend them.\n\n :param extra: Name of the extra to add providers to\n :param providers: list of provider ids\n \"\"\"\n EXTRAS_REQUIREMENTS[extra].extend(\n [get_provider_package_from_package_id(package_name) for package_name in providers]\n )\n\n\ndef add_all_provider_packages() -> None:\n \"\"\"\n In case of regular installation (providers installed from packages), we should add extra dependencies to\n Airflow - to get the providers automatically installed when those extras are installed.\n\n For providers installed from sources we skip that step. That helps to test and install airflow with\n all packages in CI - for example when new providers are added, otherwise the installation would fail\n as the new provider is not yet in PyPI.\n\n \"\"\"\n for provider in ALL_PROVIDERS:\n replace_extra_requirement_with_provider_packages(provider, [provider])\n add_provider_packages_to_extra_requirements(\"all\", ALL_PROVIDERS)\n add_provider_packages_to_extra_requirements(\"devel_ci\", ALL_PROVIDERS)\n add_provider_packages_to_extra_requirements(\"devel_all\", ALL_PROVIDERS)\n add_provider_packages_to_extra_requirements(\"all_dbs\", ALL_DB_PROVIDERS)\n add_provider_packages_to_extra_requirements(\n \"devel_hadoop\", [\"apache.hdfs\", \"apache.hive\", \"presto\", \"trino\"]\n )\n add_all_deprecated_provider_packages()\n\n\nclass Develop(develop_orig):\n \"\"\"Forces removal of providers in editable mode.\"\"\"\n\n def run(self):\n self.announce('Installing in editable mode. Uninstalling provider packages!', level=log.INFO)\n # We need to run \"python3 -m pip\" because it might be that older PIP binary is in the path\n # And it results with an error when running pip directly (cannot import pip module)\n # also PIP does not have a stable API so we have to run subprocesses ¯\\_(ツ)_/¯\n try:\n installed_packages = (\n subprocess.check_output([\"python3\", \"-m\", \"pip\", \"freeze\"]).decode().splitlines()\n )\n airflow_provider_packages = [\n package_line.split(\"=\")[0]\n for package_line in installed_packages\n if package_line.startswith(\"apache-airflow-providers\")\n ]\n self.announce(f'Uninstalling ${airflow_provider_packages}!', level=log.INFO)\n subprocess.check_call([\"python3\", \"-m\", \"pip\", \"uninstall\", \"--yes\", *airflow_provider_packages])\n except subprocess.CalledProcessError as e:\n self.announce(f'Error when uninstalling airflow provider packages: {e}!', level=log.WARN)\n super().run()\n\n\nclass Install(install_orig):\n \"\"\"Forces installation of providers from sources in editable mode.\"\"\"\n\n def run(self):\n self.announce('Standard installation. Providers are installed from packages', level=log.INFO)\n super().run()\n\n\ndef do_setup() -> None:\n \"\"\"\n Perform the Airflow package setup.\n\n Most values come from setup.cfg, only the dynamically calculated ones are passed to setup\n function call. See https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html\n \"\"\"\n setup_kwargs = {}\n\n def include_provider_namespace_packages_when_installing_from_sources() -> None:\n \"\"\"\n When installing providers from sources we install all namespace packages found below airflow,\n including airflow and provider packages, otherwise defaults from setup.cfg control this.\n The kwargs in setup() call override those that are specified in setup.cfg.\n \"\"\"\n if os.getenv(INSTALL_PROVIDERS_FROM_SOURCES) == 'true':\n setup_kwargs['packages'] = find_namespace_packages(include=['airflow*'])\n\n include_provider_namespace_packages_when_installing_from_sources()\n if os.getenv(INSTALL_PROVIDERS_FROM_SOURCES) == 'true':\n print(\"Installing providers from sources. Skip adding providers as dependencies\")\n else:\n add_all_provider_packages()\n\n write_version()\n setup(\n distclass=AirflowDistribution,\n version=version,\n extras_require=EXTRAS_REQUIREMENTS,\n download_url=('https://archive.apache.org/dist/airflow/' + version),\n cmdclass={\n 'extra_clean': CleanCommand,\n 'compile_assets': CompileAssets,\n 'list_extras': ListExtras,\n 'install': Install,\n 'develop': Develop,\n },\n test_suite='setup.airflow_test_suite',\n **setup_kwargs,\n )\n\n\nif __name__ == \"__main__\":\n do_setup()\n", "path": "setup.py" } ]
diff --git a/setup.py b/setup.py index 818b28e80d0a9..7a3024ec6f33c 100644 --- a/setup.py +++ b/setup.py @@ -263,7 +263,7 @@ def get_sphinx_theme_version() -> str: 'sphinxcontrib-spelling==5.2.1', ] docker = [ - 'docker~=3.0', + 'docker', ] druid = [ 'pydruid>=0.4.1',
hylang__hy-1369
Official support for evaluating strings of Hy code from Python Is it possible to embed some hy code inside a python file? As opposed to having the whole file be full on hy?
[ { "content": "__appname__ = 'hy'\ntry:\n from hy.version import __version__\nexcept ImportError:\n __version__ = 'unknown'\n\n\nfrom hy.models import HyExpression, HyInteger, HyKeyword, HyComplex, HyString, HyBytes, HySymbol, HyFloat, HyDict, HyList, HySet, HyCons # NOQA\n\n\nimport hy.importer # NOQA\n# we import for side-effects.\n", "path": "hy/__init__.py" } ]
[ { "content": "__appname__ = 'hy'\ntry:\n from hy.version import __version__\nexcept ImportError:\n __version__ = 'unknown'\n\n\nfrom hy.models import HyExpression, HyInteger, HyKeyword, HyComplex, HyString, HyBytes, HySymbol, HyFloat, HyDict, HyList, HySet, HyCons # NOQA\n\n\nimport hy.importer # NOQA\n# we import for side-effects.\n\n\nfrom hy.core.language import read, read_str # NOQA\nfrom hy.importer import hy_eval as eval # NOQA\n", "path": "hy/__init__.py" } ]
diff --git a/AUTHORS b/AUTHORS index dcc9b0cee..7791140dd 100644 --- a/AUTHORS +++ b/AUTHORS @@ -80,3 +80,4 @@ * Neil Lindquist <[email protected] * Hikaru Ikuta <[email protected]> * David Schaefer <[email protected]> +* Jordan Danford <[email protected]> diff --git a/NEWS b/NEWS index 6580965ef..4a2a9e59b 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,10 @@ Changes from 0.13.0 * `exec` now works under Python 2 * No TypeError from multi-arity defn returning values evaluating to None + [ Misc. Improvements ] + * `read`, `read_str`, and `eval` are exposed and documented as top-level + functions in the `hy` module + Changes from 0.12.1 [ Language Changes ] diff --git a/docs/language/interop.rst b/docs/language/interop.rst index 433679cc8..039d825c9 100644 --- a/docs/language/interop.rst +++ b/docs/language/interop.rst @@ -131,5 +131,17 @@ argument:: test() bar +Evaluating strings of Hy code from Python +----------------------------------------- +Evaluating a string (or ``file`` object) containing a Hy expression requires +two separate steps. First, use the ``read_str`` function (or ``read`` for a +``file`` object) to turn the expression into a Hy model:: + >>> import hy + >>> expr = hy.read_str("(- (/ (+ 1 3 88) 2) 8)") + +Then, use the ``eval`` function to evaluate it:: + + >>> hy.eval(expr) + 38.0 diff --git a/hy/__init__.py b/hy/__init__.py index a17ddbbe1..6b986d19c 100644 --- a/hy/__init__.py +++ b/hy/__init__.py @@ -10,3 +10,7 @@ import hy.importer # NOQA # we import for side-effects. + + +from hy.core.language import read, read_str # NOQA +from hy.importer import hy_eval as eval # NOQA diff --git a/hy/core/language.hy b/hy/core/language.hy index 5f9378ad4..4504b6aba 100644 --- a/hy/core/language.hy +++ b/hy/core/language.hy @@ -426,8 +426,8 @@ (defn read [&optional [from-file sys.stdin] [eof ""]] - "Read from input and returns a tokenized string. - Can take a given input buffer to read from" + "Read from input and returns a tokenized string. Can take a given input buffer + to read from, and a single byte as EOF (defaults to an empty string)" (setv buff "") (while True (setv inn (string (.readline from-file))) diff --git a/tests/importer/test_importer.py b/tests/importer/test_importer.py index 79b72daab..9fa5aa595 100644 --- a/tests/importer/test_importer.py +++ b/tests/importer/test_importer.py @@ -2,12 +2,14 @@ # This file is part of Hy, which is free software licensed under the Expat # license. See the LICENSE. +import hy from hy.importer import (import_file_to_module, import_buffer_to_ast, MetaLoader, get_bytecode_path) from hy.errors import HyTypeError import os import ast import tempfile +from fractions import Fraction def test_basics(): @@ -64,3 +66,20 @@ def test_import_autocompiles(): os.remove(f.name) os.remove(get_bytecode_path(f.name)) + + +def test_eval(): + def eval_str(s): + return hy.eval(hy.read_str(s)) + + assert eval_str('[1 2 3]') == [1, 2, 3] + assert eval_str('{"dog" "bark" "cat" "meow"}') == { + 'dog': 'bark', 'cat': 'meow'} + assert eval_str('(, 1 2 3)') == (1, 2, 3) + assert eval_str('#{3 1 2}') == {1, 2, 3} + assert eval_str('1/2') == Fraction(1, 2) + assert eval_str('(.strip " fooooo ")') == 'fooooo' + assert eval_str( + '(if True "this is if true" "this is if false")') == "this is if true" + assert eval_str('(list-comp (pow num 2) (num (range 100)) (= (% num 2) 1))') == [ + pow(num, 2) for num in range(100) if num % 2 == 1]
getsentry__sentry-python-133
Rename meta key to _meta sentry.io cannot handle "" as meta key, only "_meta"
[ { "content": "import os\nimport sys\nimport linecache\nimport logging\n\nfrom contextlib import contextmanager\nfrom datetime import datetime\nfrom collections import Mapping, Sequence\n\nfrom sentry_sdk._compat import (\n urlparse,\n text_type,\n implements_str,\n string_types,\n number_types,\n int_types,\n)\n\n\nepoch = datetime(1970, 1, 1)\n\n\n# The logger is created here but initializde in the debug support module\nlogger = logging.getLogger(\"sentry_sdk.errors\")\n\n\ndef _get_debug_hub():\n # This function is replaced by debug.py\n pass\n\n\n@contextmanager\ndef capture_internal_exceptions():\n try:\n yield\n except Exception:\n hub = _get_debug_hub()\n if hub is not None:\n hub._capture_internal_exception(sys.exc_info())\n\n\ndef to_timestamp(value):\n return (value - epoch).total_seconds()\n\n\ndef event_hint_with_exc_info(exc_info=None):\n \"\"\"Creates a hint with the exc info filled in.\"\"\"\n if exc_info is None:\n exc_info = sys.exc_info()\n else:\n exc_info = exc_info_from_error(exc_info)\n if exc_info[0] is None:\n exc_info = None\n return {\"exc_info\": exc_info}\n\n\nclass BadDsn(ValueError):\n \"\"\"Raised on invalid DSNs.\"\"\"\n\n\n@implements_str\nclass Dsn(object):\n \"\"\"Represents a DSN.\"\"\"\n\n def __init__(self, value):\n if isinstance(value, Dsn):\n self.__dict__ = dict(value.__dict__)\n return\n parts = urlparse.urlsplit(text_type(value))\n if parts.scheme not in (u\"http\", u\"https\"):\n raise BadDsn(\"Unsupported scheme %r\" % parts.scheme)\n self.scheme = parts.scheme\n self.host = parts.hostname\n self.port = parts.port\n if self.port is None:\n self.port = self.scheme == \"https\" and 443 or 80\n self.public_key = parts.username\n if not self.public_key:\n raise BadDsn(\"Missig public key\")\n self.secret_key = parts.password\n if not parts.path:\n raise BadDsn(\"Missing project ID in DSN\")\n try:\n self.project_id = text_type(int(parts.path[1:]))\n except (ValueError, TypeError):\n raise BadDsn(\"Invalid project in DSN (%r)\" % (parts.path or \"\")[1:])\n\n @property\n def netloc(self):\n \"\"\"The netloc part of a DSN.\"\"\"\n rv = self.host\n if (self.scheme, self.port) not in ((\"http\", 80), (\"https\", 443)):\n rv = \"%s:%s\" % (rv, self.port)\n return rv\n\n def to_auth(self, client=None):\n \"\"\"Returns the auth info object for this dsn.\"\"\"\n return Auth(\n scheme=self.scheme,\n host=self.netloc,\n project_id=self.project_id,\n public_key=self.public_key,\n secret_key=self.secret_key,\n client=client,\n )\n\n def __str__(self):\n return \"%s://%s%s@%s/%s\" % (\n self.scheme,\n self.public_key,\n self.secret_key and \"@\" + self.secret_key or \"\",\n self.netloc,\n self.project_id,\n )\n\n\nclass Auth(object):\n \"\"\"Helper object that represents the auth info.\"\"\"\n\n def __init__(\n self,\n scheme,\n host,\n project_id,\n public_key,\n secret_key=None,\n version=7,\n client=None,\n ):\n self.scheme = scheme\n self.host = host\n self.project_id = project_id\n self.public_key = public_key\n self.secret_key = secret_key\n self.version = version\n self.client = client\n\n @property\n def store_api_url(self):\n \"\"\"Returns the API url for storing events.\"\"\"\n return \"%s://%s/api/%s/store/\" % (self.scheme, self.host, self.project_id)\n\n def to_header(self, timestamp=None):\n \"\"\"Returns the auth header a string.\"\"\"\n rv = [(\"sentry_key\", self.public_key), (\"sentry_version\", self.version)]\n if timestamp is not None:\n rv.append((\"sentry_timestamp\", str(to_timestamp(timestamp))))\n if self.client is not None:\n rv.append((\"sentry_client\", self.client))\n if self.secret_key is not None:\n rv.append((\"sentry_secret\", self.secret_key))\n return u\"Sentry \" + u\", \".join(\"%s=%s\" % (key, value) for key, value in rv)\n\n\ndef get_type_name(cls):\n return getattr(cls, \"__qualname__\", None) or getattr(cls, \"__name__\", None)\n\n\ndef get_type_module(cls):\n mod = getattr(cls, \"__module__\", None)\n if mod not in (None, \"builtins\", \"__builtins__\"):\n return mod\n\n\ndef should_hide_frame(frame):\n try:\n mod = frame.f_globals[\"__name__\"]\n return mod.startswith(\"sentry_sdk.\")\n except (AttributeError, KeyError):\n pass\n\n for flag_name in \"__traceback_hide__\", \"__tracebackhide__\":\n try:\n if frame.f_locals[flag_name]:\n return True\n except Exception:\n pass\n\n return False\n\n\ndef iter_stacks(tb):\n while tb is not None:\n if not should_hide_frame(tb.tb_frame):\n yield tb\n tb = tb.tb_next\n\n\ndef slim_string(value, length=512):\n if not value:\n return value\n if len(value) > length:\n return value[: length - 3] + \"...\"\n return value[:length]\n\n\ndef get_lines_from_file(filename, lineno, loader=None, module=None):\n context_lines = 5\n source = None\n if loader is not None and hasattr(loader, \"get_source\"):\n try:\n source = loader.get_source(module)\n except (ImportError, IOError):\n source = None\n if source is not None:\n source = source.splitlines()\n\n if source is None:\n try:\n source = linecache.getlines(filename)\n except (OSError, IOError):\n return None, None, None\n\n if not source:\n return None, None, None\n\n lower_bound = max(0, lineno - context_lines)\n upper_bound = min(lineno + 1 + context_lines, len(source))\n\n try:\n pre_context = [\n slim_string(line.strip(\"\\r\\n\")) for line in source[lower_bound:lineno]\n ]\n context_line = slim_string(source[lineno].strip(\"\\r\\n\"))\n post_context = [\n slim_string(line.strip(\"\\r\\n\"))\n for line in source[(lineno + 1) : upper_bound]\n ]\n return pre_context, context_line, post_context\n except IndexError:\n # the file may have changed since it was loaded into memory\n return [], None, []\n\n\ndef get_source_context(frame, tb_lineno):\n try:\n abs_path = frame.f_code.co_filename\n except Exception:\n abs_path = None\n try:\n module = frame.f_globals[\"__name__\"]\n except Exception:\n return [], None, []\n try:\n loader = frame.f_globals[\"__loader__\"]\n except Exception:\n loader = None\n lineno = tb_lineno - 1\n if lineno is not None and abs_path:\n return get_lines_from_file(abs_path, lineno, loader, module)\n return [], None, []\n\n\ndef safe_str(value):\n try:\n return text_type(value)\n except Exception:\n return safe_repr(value)\n\n\ndef safe_repr(value):\n try:\n rv = repr(value)\n if isinstance(rv, bytes):\n rv = rv.decode(\"utf-8\", \"replace\")\n\n # At this point `rv` contains a bunch of literal escape codes, like\n # this (exaggerated example):\n #\n # u\"\\\\x2f\"\n #\n # But we want to show this string as:\n #\n # u\"/\"\n try:\n # unicode-escape does this job, but can only decode latin1. So we\n # attempt to encode in latin1.\n return rv.encode(\"latin1\").decode(\"unicode-escape\")\n except Exception:\n # Since usually strings aren't latin1 this can break. In those\n # cases we just give up.\n return rv\n except Exception:\n # If e.g. the call to `repr` already fails\n return u\"<broken repr>\"\n\n\ndef object_to_json(obj):\n def _walk(obj, depth):\n if depth < 4:\n if isinstance(obj, Sequence) and not isinstance(obj, (bytes, text_type)):\n return [_walk(x, depth + 1) for x in obj]\n if isinstance(obj, Mapping):\n return {safe_str(k): _walk(v, depth + 1) for k, v in obj.items()}\n return safe_repr(obj)\n\n return _walk(obj, 0)\n\n\ndef extract_locals(frame):\n rv = {}\n for key, value in frame.f_locals.items():\n rv[str(key)] = object_to_json(value)\n return rv\n\n\ndef filename_for_module(module, abs_path):\n try:\n if abs_path.endswith(\".pyc\"):\n abs_path = abs_path[:-1]\n\n base_module = module.split(\".\", 1)[0]\n if base_module == module:\n return os.path.basename(abs_path)\n\n base_module_path = sys.modules[base_module].__file__\n return abs_path.split(base_module_path.rsplit(os.sep, 2)[0], 1)[-1].lstrip(\n os.sep\n )\n except Exception:\n return abs_path\n\n\ndef serialize_frame(frame, tb_lineno=None, with_locals=True):\n f_code = getattr(frame, \"f_code\", None)\n if f_code:\n abs_path = frame.f_code.co_filename\n function = frame.f_code.co_name\n else:\n abs_path = None\n function = None\n try:\n module = frame.f_globals[\"__name__\"]\n except Exception:\n module = None\n\n if tb_lineno is None:\n tb_lineno = frame.f_lineno\n\n pre_context, context_line, post_context = get_source_context(frame, tb_lineno)\n\n rv = {\n \"filename\": filename_for_module(module, abs_path) or None,\n \"abs_path\": os.path.abspath(abs_path) if abs_path else None,\n \"function\": function or \"<unknown>\",\n \"module\": module,\n \"lineno\": tb_lineno,\n \"pre_context\": pre_context,\n \"context_line\": context_line,\n \"post_context\": post_context,\n }\n if with_locals:\n rv[\"vars\"] = extract_locals(frame)\n return rv\n\n\ndef stacktrace_from_traceback(tb=None, with_locals=True):\n return {\n \"frames\": [\n serialize_frame(\n tb.tb_frame, tb_lineno=tb.tb_lineno, with_locals=with_locals\n )\n for tb in iter_stacks(tb)\n ]\n }\n\n\ndef current_stacktrace(with_locals=True):\n __tracebackhide__ = True\n frames = []\n\n f = sys._getframe()\n while f is not None:\n if not should_hide_frame(f):\n frames.append(serialize_frame(f, with_locals=with_locals))\n f = f.f_back\n\n frames.reverse()\n\n return {\"frames\": frames}\n\n\ndef get_errno(exc_value):\n return getattr(exc_value, \"errno\", None)\n\n\ndef single_exception_from_error_tuple(\n exc_type, exc_value, tb, client_options=None, mechanism=None\n):\n errno = get_errno(exc_value)\n if errno is not None:\n mechanism = mechanism or {}\n mechanism_meta = mechanism.setdefault(\"meta\", {})\n mechanism_meta.setdefault(\"errno\", {\"code\": errno})\n\n if client_options is None:\n with_locals = True\n else:\n with_locals = client_options[\"with_locals\"]\n\n return {\n \"module\": get_type_module(exc_type),\n \"type\": get_type_name(exc_type),\n \"value\": safe_str(exc_value),\n \"mechanism\": mechanism,\n \"stacktrace\": stacktrace_from_traceback(tb, with_locals),\n }\n\n\ndef exceptions_from_error_tuple(exc_info, client_options=None, mechanism=None):\n exc_type, exc_value, tb = exc_info\n rv = []\n while exc_type is not None:\n rv.append(\n single_exception_from_error_tuple(\n exc_type, exc_value, tb, client_options, mechanism\n )\n )\n cause = getattr(exc_value, \"__cause__\", None)\n if cause is None:\n break\n exc_type = type(cause)\n exc_value = cause\n tb = getattr(cause, \"__traceback__\", None)\n return rv\n\n\ndef to_string(value):\n try:\n return text_type(value)\n except UnicodeDecodeError:\n return repr(value)[1:-1]\n\n\ndef iter_event_frames(event):\n stacktraces = []\n if \"stacktrace\" in event:\n stacktraces.append(event[\"stacktrace\"])\n if \"exception\" in event:\n for exception in event[\"exception\"].get(\"values\") or ():\n if \"stacktrace\" in exception:\n stacktraces.append(exception[\"stacktrace\"])\n for stacktrace in stacktraces:\n for frame in stacktrace.get(\"frames\") or ():\n yield frame\n\n\ndef handle_in_app(event, in_app_exclude=None, in_app_include=None):\n any_in_app = False\n for frame in iter_event_frames(event):\n in_app = frame.get(\"in_app\")\n if in_app is not None:\n if in_app:\n any_in_app = True\n continue\n\n module = frame.get(\"module\")\n if not module:\n continue\n\n if _module_in_set(module, in_app_exclude):\n frame[\"in_app\"] = False\n if _module_in_set(module, in_app_include):\n frame[\"in_app\"] = True\n any_in_app = True\n\n if not any_in_app:\n for frame in iter_event_frames(event):\n frame[\"in_app\"] = True\n\n return event\n\n\ndef exc_info_from_error(error):\n if isinstance(error, tuple) and len(error) == 3:\n exc_type, exc_value, tb = error\n else:\n tb = getattr(error, \"__traceback__\", None)\n if tb is not None:\n exc_type = type(error)\n exc_value = error\n else:\n exc_type, exc_value, tb = sys.exc_info()\n if exc_value is not error:\n tb = None\n exc_value = error\n exc_type = type(error)\n\n return exc_type, exc_value, tb\n\n\ndef event_from_exception(exc_info, client_options=None, mechanism=None):\n exc_info = exc_info_from_error(exc_info)\n hint = event_hint_with_exc_info(exc_info)\n return (\n {\n \"level\": \"error\",\n \"exception\": {\n \"values\": exceptions_from_error_tuple(\n exc_info, client_options, mechanism\n )\n },\n },\n hint,\n )\n\n\ndef _module_in_set(name, set):\n if not set:\n return False\n for item in set or ():\n if item == name or name.startswith(item + \".\"):\n return True\n return False\n\n\nclass AnnotatedValue(object):\n def __init__(self, value, metadata):\n self.value = value\n self.metadata = metadata\n\n\ndef flatten_metadata(obj):\n def inner(obj):\n if isinstance(obj, Mapping):\n rv = {}\n meta = {}\n for k, v in obj.items():\n # if we actually have \"\" keys in our data, throw them away. It's\n # unclear how we would tell them apart from metadata\n if k == \"\":\n continue\n\n rv[k], meta[k] = inner(v)\n if meta[k] is None:\n del meta[k]\n if rv[k] is None:\n del rv[k]\n return rv, (meta or None)\n if isinstance(obj, Sequence) and not isinstance(obj, (text_type, bytes)):\n rv = []\n meta = {}\n for i, v in enumerate(obj):\n new_v, meta[str(i)] = inner(v)\n rv.append(new_v)\n if meta[str(i)] is None:\n del meta[str(i)]\n return rv, (meta or None)\n if isinstance(obj, AnnotatedValue):\n return obj.value, {\"\": obj.metadata}\n return obj, None\n\n obj, meta = inner(obj)\n if meta is not None:\n obj[\"\"] = meta\n return obj\n\n\ndef strip_event(event):\n old_frames = event.get(\"stacktrace\", {}).get(\"frames\", None)\n if old_frames:\n event[\"stacktrace\"][\"frames\"] = [strip_frame(frame) for frame in old_frames]\n\n old_request_data = event.get(\"request\", {}).get(\"data\", None)\n if old_request_data:\n event[\"request\"][\"data\"] = strip_databag(old_request_data)\n\n return event\n\n\ndef strip_frame(frame):\n if \"vars\" in frame:\n frame[\"vars\"] = strip_databag(frame[\"vars\"])\n return frame\n\n\ndef convert_types(obj):\n if isinstance(obj, datetime):\n return obj.strftime(\"%Y-%m-%dT%H:%M:%SZ\")\n if isinstance(obj, Mapping):\n return {k: convert_types(v) for k, v in obj.items()}\n if isinstance(obj, Sequence) and not isinstance(obj, (text_type, bytes)):\n return [convert_types(v) for v in obj]\n if not isinstance(obj, string_types + number_types):\n return safe_repr(obj)\n return obj\n\n\ndef strip_databag(obj, remaining_depth=20):\n assert not isinstance(obj, bytes), \"bytes should have been normalized before\"\n if remaining_depth <= 0:\n return AnnotatedValue(None, {\"rem\": [[\"!limit\", \"x\"]]})\n if isinstance(obj, text_type):\n return strip_string(obj)\n if isinstance(obj, Mapping):\n return {k: strip_databag(v, remaining_depth - 1) for k, v in obj.items()}\n if isinstance(obj, Sequence):\n return [strip_databag(v, remaining_depth - 1) for v in obj]\n return obj\n\n\ndef strip_string(value, max_length=512):\n # TODO: read max_length from config\n if not value:\n return value\n length = len(value)\n if length > max_length:\n return AnnotatedValue(\n value=value[: max_length - 3] + u\"...\",\n metadata={\n \"len\": length,\n \"rem\": [[\"!limit\", \"x\", max_length - 3, max_length]],\n },\n )\n return value\n\n\ndef format_and_strip(template, params, strip_string=strip_string):\n \"\"\"Format a string containing %s for placeholders and call `strip_string`\n on each parameter. The string template itself does not have a maximum\n length.\n\n TODO: handle other placeholders, not just %s\n \"\"\"\n chunks = template.split(u\"%s\")\n if not chunks:\n raise ValueError(\"No formatting placeholders found\")\n\n params = list(reversed(params))\n rv_remarks = []\n rv_original_length = 0\n rv_length = 0\n rv = []\n\n def realign_remark(remark):\n return [\n (rv_length + x if isinstance(x, int_types) and i < 4 else x)\n for i, x in enumerate(remark)\n ]\n\n for chunk in chunks[:-1]:\n rv.append(chunk)\n rv_length += len(chunk)\n rv_original_length += len(chunk)\n if not params:\n raise ValueError(\"Not enough params.\")\n param = params.pop()\n\n stripped_param = strip_string(param)\n if isinstance(stripped_param, AnnotatedValue):\n rv_remarks.extend(\n realign_remark(remark) for remark in stripped_param.metadata[\"rem\"]\n )\n stripped_param = stripped_param.value\n\n rv_original_length += len(param)\n rv_length += len(stripped_param)\n rv.append(stripped_param)\n\n rv.append(chunks[-1])\n rv_length += len(chunks[-1])\n rv_original_length += len(chunks[-1])\n\n rv = u\"\".join(rv)\n assert len(rv) == rv_length\n\n if not rv_remarks:\n return rv\n\n return AnnotatedValue(\n value=rv, metadata={\"len\": rv_original_length, \"rem\": rv_remarks}\n )\n\n\ntry:\n from contextvars import ContextVar\nexcept ImportError:\n from threading import local\n\n class ContextVar(object):\n # Super-limited impl of ContextVar\n\n def __init__(self, name):\n self._name = name\n self._local = local()\n\n def get(self, default):\n return getattr(self._local, \"value\", default)\n\n def set(self, value):\n setattr(self._local, \"value\", value)\n", "path": "sentry_sdk/utils.py" } ]
[ { "content": "import os\nimport sys\nimport linecache\nimport logging\n\nfrom contextlib import contextmanager\nfrom datetime import datetime\nfrom collections import Mapping, Sequence\n\nfrom sentry_sdk._compat import (\n urlparse,\n text_type,\n implements_str,\n string_types,\n number_types,\n int_types,\n)\n\n\nepoch = datetime(1970, 1, 1)\n\n\n# The logger is created here but initializde in the debug support module\nlogger = logging.getLogger(\"sentry_sdk.errors\")\n\n\ndef _get_debug_hub():\n # This function is replaced by debug.py\n pass\n\n\n@contextmanager\ndef capture_internal_exceptions():\n try:\n yield\n except Exception:\n hub = _get_debug_hub()\n if hub is not None:\n hub._capture_internal_exception(sys.exc_info())\n\n\ndef to_timestamp(value):\n return (value - epoch).total_seconds()\n\n\ndef event_hint_with_exc_info(exc_info=None):\n \"\"\"Creates a hint with the exc info filled in.\"\"\"\n if exc_info is None:\n exc_info = sys.exc_info()\n else:\n exc_info = exc_info_from_error(exc_info)\n if exc_info[0] is None:\n exc_info = None\n return {\"exc_info\": exc_info}\n\n\nclass BadDsn(ValueError):\n \"\"\"Raised on invalid DSNs.\"\"\"\n\n\n@implements_str\nclass Dsn(object):\n \"\"\"Represents a DSN.\"\"\"\n\n def __init__(self, value):\n if isinstance(value, Dsn):\n self.__dict__ = dict(value.__dict__)\n return\n parts = urlparse.urlsplit(text_type(value))\n if parts.scheme not in (u\"http\", u\"https\"):\n raise BadDsn(\"Unsupported scheme %r\" % parts.scheme)\n self.scheme = parts.scheme\n self.host = parts.hostname\n self.port = parts.port\n if self.port is None:\n self.port = self.scheme == \"https\" and 443 or 80\n self.public_key = parts.username\n if not self.public_key:\n raise BadDsn(\"Missig public key\")\n self.secret_key = parts.password\n if not parts.path:\n raise BadDsn(\"Missing project ID in DSN\")\n try:\n self.project_id = text_type(int(parts.path[1:]))\n except (ValueError, TypeError):\n raise BadDsn(\"Invalid project in DSN (%r)\" % (parts.path or \"\")[1:])\n\n @property\n def netloc(self):\n \"\"\"The netloc part of a DSN.\"\"\"\n rv = self.host\n if (self.scheme, self.port) not in ((\"http\", 80), (\"https\", 443)):\n rv = \"%s:%s\" % (rv, self.port)\n return rv\n\n def to_auth(self, client=None):\n \"\"\"Returns the auth info object for this dsn.\"\"\"\n return Auth(\n scheme=self.scheme,\n host=self.netloc,\n project_id=self.project_id,\n public_key=self.public_key,\n secret_key=self.secret_key,\n client=client,\n )\n\n def __str__(self):\n return \"%s://%s%s@%s/%s\" % (\n self.scheme,\n self.public_key,\n self.secret_key and \"@\" + self.secret_key or \"\",\n self.netloc,\n self.project_id,\n )\n\n\nclass Auth(object):\n \"\"\"Helper object that represents the auth info.\"\"\"\n\n def __init__(\n self,\n scheme,\n host,\n project_id,\n public_key,\n secret_key=None,\n version=7,\n client=None,\n ):\n self.scheme = scheme\n self.host = host\n self.project_id = project_id\n self.public_key = public_key\n self.secret_key = secret_key\n self.version = version\n self.client = client\n\n @property\n def store_api_url(self):\n \"\"\"Returns the API url for storing events.\"\"\"\n return \"%s://%s/api/%s/store/\" % (self.scheme, self.host, self.project_id)\n\n def to_header(self, timestamp=None):\n \"\"\"Returns the auth header a string.\"\"\"\n rv = [(\"sentry_key\", self.public_key), (\"sentry_version\", self.version)]\n if timestamp is not None:\n rv.append((\"sentry_timestamp\", str(to_timestamp(timestamp))))\n if self.client is not None:\n rv.append((\"sentry_client\", self.client))\n if self.secret_key is not None:\n rv.append((\"sentry_secret\", self.secret_key))\n return u\"Sentry \" + u\", \".join(\"%s=%s\" % (key, value) for key, value in rv)\n\n\ndef get_type_name(cls):\n return getattr(cls, \"__qualname__\", None) or getattr(cls, \"__name__\", None)\n\n\ndef get_type_module(cls):\n mod = getattr(cls, \"__module__\", None)\n if mod not in (None, \"builtins\", \"__builtins__\"):\n return mod\n\n\ndef should_hide_frame(frame):\n try:\n mod = frame.f_globals[\"__name__\"]\n return mod.startswith(\"sentry_sdk.\")\n except (AttributeError, KeyError):\n pass\n\n for flag_name in \"__traceback_hide__\", \"__tracebackhide__\":\n try:\n if frame.f_locals[flag_name]:\n return True\n except Exception:\n pass\n\n return False\n\n\ndef iter_stacks(tb):\n while tb is not None:\n if not should_hide_frame(tb.tb_frame):\n yield tb\n tb = tb.tb_next\n\n\ndef slim_string(value, length=512):\n if not value:\n return value\n if len(value) > length:\n return value[: length - 3] + \"...\"\n return value[:length]\n\n\ndef get_lines_from_file(filename, lineno, loader=None, module=None):\n context_lines = 5\n source = None\n if loader is not None and hasattr(loader, \"get_source\"):\n try:\n source = loader.get_source(module)\n except (ImportError, IOError):\n source = None\n if source is not None:\n source = source.splitlines()\n\n if source is None:\n try:\n source = linecache.getlines(filename)\n except (OSError, IOError):\n return None, None, None\n\n if not source:\n return None, None, None\n\n lower_bound = max(0, lineno - context_lines)\n upper_bound = min(lineno + 1 + context_lines, len(source))\n\n try:\n pre_context = [\n slim_string(line.strip(\"\\r\\n\")) for line in source[lower_bound:lineno]\n ]\n context_line = slim_string(source[lineno].strip(\"\\r\\n\"))\n post_context = [\n slim_string(line.strip(\"\\r\\n\"))\n for line in source[(lineno + 1) : upper_bound]\n ]\n return pre_context, context_line, post_context\n except IndexError:\n # the file may have changed since it was loaded into memory\n return [], None, []\n\n\ndef get_source_context(frame, tb_lineno):\n try:\n abs_path = frame.f_code.co_filename\n except Exception:\n abs_path = None\n try:\n module = frame.f_globals[\"__name__\"]\n except Exception:\n return [], None, []\n try:\n loader = frame.f_globals[\"__loader__\"]\n except Exception:\n loader = None\n lineno = tb_lineno - 1\n if lineno is not None and abs_path:\n return get_lines_from_file(abs_path, lineno, loader, module)\n return [], None, []\n\n\ndef safe_str(value):\n try:\n return text_type(value)\n except Exception:\n return safe_repr(value)\n\n\ndef safe_repr(value):\n try:\n rv = repr(value)\n if isinstance(rv, bytes):\n rv = rv.decode(\"utf-8\", \"replace\")\n\n # At this point `rv` contains a bunch of literal escape codes, like\n # this (exaggerated example):\n #\n # u\"\\\\x2f\"\n #\n # But we want to show this string as:\n #\n # u\"/\"\n try:\n # unicode-escape does this job, but can only decode latin1. So we\n # attempt to encode in latin1.\n return rv.encode(\"latin1\").decode(\"unicode-escape\")\n except Exception:\n # Since usually strings aren't latin1 this can break. In those\n # cases we just give up.\n return rv\n except Exception:\n # If e.g. the call to `repr` already fails\n return u\"<broken repr>\"\n\n\ndef object_to_json(obj):\n def _walk(obj, depth):\n if depth < 4:\n if isinstance(obj, Sequence) and not isinstance(obj, (bytes, text_type)):\n return [_walk(x, depth + 1) for x in obj]\n if isinstance(obj, Mapping):\n return {safe_str(k): _walk(v, depth + 1) for k, v in obj.items()}\n return safe_repr(obj)\n\n return _walk(obj, 0)\n\n\ndef extract_locals(frame):\n rv = {}\n for key, value in frame.f_locals.items():\n rv[str(key)] = object_to_json(value)\n return rv\n\n\ndef filename_for_module(module, abs_path):\n try:\n if abs_path.endswith(\".pyc\"):\n abs_path = abs_path[:-1]\n\n base_module = module.split(\".\", 1)[0]\n if base_module == module:\n return os.path.basename(abs_path)\n\n base_module_path = sys.modules[base_module].__file__\n return abs_path.split(base_module_path.rsplit(os.sep, 2)[0], 1)[-1].lstrip(\n os.sep\n )\n except Exception:\n return abs_path\n\n\ndef serialize_frame(frame, tb_lineno=None, with_locals=True):\n f_code = getattr(frame, \"f_code\", None)\n if f_code:\n abs_path = frame.f_code.co_filename\n function = frame.f_code.co_name\n else:\n abs_path = None\n function = None\n try:\n module = frame.f_globals[\"__name__\"]\n except Exception:\n module = None\n\n if tb_lineno is None:\n tb_lineno = frame.f_lineno\n\n pre_context, context_line, post_context = get_source_context(frame, tb_lineno)\n\n rv = {\n \"filename\": filename_for_module(module, abs_path) or None,\n \"abs_path\": os.path.abspath(abs_path) if abs_path else None,\n \"function\": function or \"<unknown>\",\n \"module\": module,\n \"lineno\": tb_lineno,\n \"pre_context\": pre_context,\n \"context_line\": context_line,\n \"post_context\": post_context,\n }\n if with_locals:\n rv[\"vars\"] = extract_locals(frame)\n return rv\n\n\ndef stacktrace_from_traceback(tb=None, with_locals=True):\n return {\n \"frames\": [\n serialize_frame(\n tb.tb_frame, tb_lineno=tb.tb_lineno, with_locals=with_locals\n )\n for tb in iter_stacks(tb)\n ]\n }\n\n\ndef current_stacktrace(with_locals=True):\n __tracebackhide__ = True\n frames = []\n\n f = sys._getframe()\n while f is not None:\n if not should_hide_frame(f):\n frames.append(serialize_frame(f, with_locals=with_locals))\n f = f.f_back\n\n frames.reverse()\n\n return {\"frames\": frames}\n\n\ndef get_errno(exc_value):\n return getattr(exc_value, \"errno\", None)\n\n\ndef single_exception_from_error_tuple(\n exc_type, exc_value, tb, client_options=None, mechanism=None\n):\n errno = get_errno(exc_value)\n if errno is not None:\n mechanism = mechanism or {}\n mechanism_meta = mechanism.setdefault(\"meta\", {})\n mechanism_meta.setdefault(\"errno\", {\"code\": errno})\n\n if client_options is None:\n with_locals = True\n else:\n with_locals = client_options[\"with_locals\"]\n\n return {\n \"module\": get_type_module(exc_type),\n \"type\": get_type_name(exc_type),\n \"value\": safe_str(exc_value),\n \"mechanism\": mechanism,\n \"stacktrace\": stacktrace_from_traceback(tb, with_locals),\n }\n\n\ndef exceptions_from_error_tuple(exc_info, client_options=None, mechanism=None):\n exc_type, exc_value, tb = exc_info\n rv = []\n while exc_type is not None:\n rv.append(\n single_exception_from_error_tuple(\n exc_type, exc_value, tb, client_options, mechanism\n )\n )\n cause = getattr(exc_value, \"__cause__\", None)\n if cause is None:\n break\n exc_type = type(cause)\n exc_value = cause\n tb = getattr(cause, \"__traceback__\", None)\n return rv\n\n\ndef to_string(value):\n try:\n return text_type(value)\n except UnicodeDecodeError:\n return repr(value)[1:-1]\n\n\ndef iter_event_frames(event):\n stacktraces = []\n if \"stacktrace\" in event:\n stacktraces.append(event[\"stacktrace\"])\n if \"exception\" in event:\n for exception in event[\"exception\"].get(\"values\") or ():\n if \"stacktrace\" in exception:\n stacktraces.append(exception[\"stacktrace\"])\n for stacktrace in stacktraces:\n for frame in stacktrace.get(\"frames\") or ():\n yield frame\n\n\ndef handle_in_app(event, in_app_exclude=None, in_app_include=None):\n any_in_app = False\n for frame in iter_event_frames(event):\n in_app = frame.get(\"in_app\")\n if in_app is not None:\n if in_app:\n any_in_app = True\n continue\n\n module = frame.get(\"module\")\n if not module:\n continue\n\n if _module_in_set(module, in_app_exclude):\n frame[\"in_app\"] = False\n if _module_in_set(module, in_app_include):\n frame[\"in_app\"] = True\n any_in_app = True\n\n if not any_in_app:\n for frame in iter_event_frames(event):\n frame[\"in_app\"] = True\n\n return event\n\n\ndef exc_info_from_error(error):\n if isinstance(error, tuple) and len(error) == 3:\n exc_type, exc_value, tb = error\n else:\n tb = getattr(error, \"__traceback__\", None)\n if tb is not None:\n exc_type = type(error)\n exc_value = error\n else:\n exc_type, exc_value, tb = sys.exc_info()\n if exc_value is not error:\n tb = None\n exc_value = error\n exc_type = type(error)\n\n return exc_type, exc_value, tb\n\n\ndef event_from_exception(exc_info, client_options=None, mechanism=None):\n exc_info = exc_info_from_error(exc_info)\n hint = event_hint_with_exc_info(exc_info)\n return (\n {\n \"level\": \"error\",\n \"exception\": {\n \"values\": exceptions_from_error_tuple(\n exc_info, client_options, mechanism\n )\n },\n },\n hint,\n )\n\n\ndef _module_in_set(name, set):\n if not set:\n return False\n for item in set or ():\n if item == name or name.startswith(item + \".\"):\n return True\n return False\n\n\nclass AnnotatedValue(object):\n def __init__(self, value, metadata):\n self.value = value\n self.metadata = metadata\n\n\ndef flatten_metadata(obj):\n def inner(obj):\n if isinstance(obj, Mapping):\n rv = {}\n meta = {}\n for k, v in obj.items():\n # if we actually have \"\" keys in our data, throw them away. It's\n # unclear how we would tell them apart from metadata\n if k == \"\":\n continue\n\n rv[k], meta[k] = inner(v)\n if meta[k] is None:\n del meta[k]\n if rv[k] is None:\n del rv[k]\n return rv, (meta or None)\n if isinstance(obj, Sequence) and not isinstance(obj, (text_type, bytes)):\n rv = []\n meta = {}\n for i, v in enumerate(obj):\n new_v, meta[str(i)] = inner(v)\n rv.append(new_v)\n if meta[str(i)] is None:\n del meta[str(i)]\n return rv, (meta or None)\n if isinstance(obj, AnnotatedValue):\n return obj.value, {\"\": obj.metadata}\n return obj, None\n\n obj, meta = inner(obj)\n if meta is not None:\n obj[\"_meta\"] = meta\n return obj\n\n\ndef strip_event(event):\n old_frames = event.get(\"stacktrace\", {}).get(\"frames\", None)\n if old_frames:\n event[\"stacktrace\"][\"frames\"] = [strip_frame(frame) for frame in old_frames]\n\n old_request_data = event.get(\"request\", {}).get(\"data\", None)\n if old_request_data:\n event[\"request\"][\"data\"] = strip_databag(old_request_data)\n\n return event\n\n\ndef strip_frame(frame):\n if \"vars\" in frame:\n frame[\"vars\"] = strip_databag(frame[\"vars\"])\n return frame\n\n\ndef convert_types(obj):\n if isinstance(obj, datetime):\n return obj.strftime(\"%Y-%m-%dT%H:%M:%SZ\")\n if isinstance(obj, Mapping):\n return {k: convert_types(v) for k, v in obj.items()}\n if isinstance(obj, Sequence) and not isinstance(obj, (text_type, bytes)):\n return [convert_types(v) for v in obj]\n if not isinstance(obj, string_types + number_types):\n return safe_repr(obj)\n return obj\n\n\ndef strip_databag(obj, remaining_depth=20):\n assert not isinstance(obj, bytes), \"bytes should have been normalized before\"\n if remaining_depth <= 0:\n return AnnotatedValue(None, {\"rem\": [[\"!limit\", \"x\"]]})\n if isinstance(obj, text_type):\n return strip_string(obj)\n if isinstance(obj, Mapping):\n return {k: strip_databag(v, remaining_depth - 1) for k, v in obj.items()}\n if isinstance(obj, Sequence):\n return [strip_databag(v, remaining_depth - 1) for v in obj]\n return obj\n\n\ndef strip_string(value, max_length=512):\n # TODO: read max_length from config\n if not value:\n return value\n length = len(value)\n if length > max_length:\n return AnnotatedValue(\n value=value[: max_length - 3] + u\"...\",\n metadata={\n \"len\": length,\n \"rem\": [[\"!limit\", \"x\", max_length - 3, max_length]],\n },\n )\n return value\n\n\ndef format_and_strip(template, params, strip_string=strip_string):\n \"\"\"Format a string containing %s for placeholders and call `strip_string`\n on each parameter. The string template itself does not have a maximum\n length.\n\n TODO: handle other placeholders, not just %s\n \"\"\"\n chunks = template.split(u\"%s\")\n if not chunks:\n raise ValueError(\"No formatting placeholders found\")\n\n params = list(reversed(params))\n rv_remarks = []\n rv_original_length = 0\n rv_length = 0\n rv = []\n\n def realign_remark(remark):\n return [\n (rv_length + x if isinstance(x, int_types) and i < 4 else x)\n for i, x in enumerate(remark)\n ]\n\n for chunk in chunks[:-1]:\n rv.append(chunk)\n rv_length += len(chunk)\n rv_original_length += len(chunk)\n if not params:\n raise ValueError(\"Not enough params.\")\n param = params.pop()\n\n stripped_param = strip_string(param)\n if isinstance(stripped_param, AnnotatedValue):\n rv_remarks.extend(\n realign_remark(remark) for remark in stripped_param.metadata[\"rem\"]\n )\n stripped_param = stripped_param.value\n\n rv_original_length += len(param)\n rv_length += len(stripped_param)\n rv.append(stripped_param)\n\n rv.append(chunks[-1])\n rv_length += len(chunks[-1])\n rv_original_length += len(chunks[-1])\n\n rv = u\"\".join(rv)\n assert len(rv) == rv_length\n\n if not rv_remarks:\n return rv\n\n return AnnotatedValue(\n value=rv, metadata={\"len\": rv_original_length, \"rem\": rv_remarks}\n )\n\n\ntry:\n from contextvars import ContextVar\nexcept ImportError:\n from threading import local\n\n class ContextVar(object):\n # Super-limited impl of ContextVar\n\n def __init__(self, name):\n self._name = name\n self._local = local()\n\n def get(self, default):\n return getattr(self._local, \"value\", default)\n\n def set(self, value):\n setattr(self._local, \"value\", value)\n", "path": "sentry_sdk/utils.py" } ]
diff --git a/sentry_sdk/utils.py b/sentry_sdk/utils.py index 5531545e94..5b4e97a455 100644 --- a/sentry_sdk/utils.py +++ b/sentry_sdk/utils.py @@ -552,7 +552,7 @@ def inner(obj): obj, meta = inner(obj) if meta is not None: - obj[""] = meta + obj["_meta"] = meta return obj diff --git a/tests/integrations/django/test_basic.py b/tests/integrations/django/test_basic.py index c83ddaca6f..5fe6fe0bdd 100644 --- a/tests/integrations/django/test_basic.py +++ b/tests/integrations/django/test_basic.py @@ -200,7 +200,10 @@ def test_request_body(sentry_init, client, capture_events): assert event["message"] == "hi" assert event["request"]["data"] == "" - assert event[""]["request"]["data"][""] == {"len": 6, "rem": [["!raw", "x", 0, 6]]} + assert event["_meta"]["request"]["data"][""] == { + "len": 6, + "rem": [["!raw", "x", 0, 6]], + } del events[:] diff --git a/tests/integrations/flask/test_flask.py b/tests/integrations/flask/test_flask.py index ec03f2a1ee..f730c61e7f 100644 --- a/tests/integrations/flask/test_flask.py +++ b/tests/integrations/flask/test_flask.py @@ -203,7 +203,7 @@ def index(): assert response.status_code == 200 event, = events - assert event[""]["request"]["data"]["foo"]["bar"] == { + assert event["_meta"]["request"]["data"]["foo"]["bar"] == { "": {"len": 2000, "rem": [["!limit", "x", 509, 512]]} } assert len(event["request"]["data"]["foo"]["bar"]) == 512 @@ -229,7 +229,7 @@ def index(): assert response.status_code == 200 event, = events - assert event[""]["request"]["data"]["foo"] == { + assert event["_meta"]["request"]["data"]["foo"] == { "": {"len": 2000, "rem": [["!limit", "x", 509, 512]]} } assert len(event["request"]["data"]["foo"]) == 512 @@ -259,7 +259,7 @@ def index(): assert response.status_code == 200 event, = events - assert event[""]["request"]["data"] == { + assert event["_meta"]["request"]["data"] == { "": {"len": 2000, "rem": [["!config", "x", 0, 2000]]} } assert not event["request"]["data"] @@ -285,12 +285,12 @@ def index(): assert response.status_code == 200 event, = events - assert event[""]["request"]["data"]["foo"] == { + assert event["_meta"]["request"]["data"]["foo"] == { "": {"len": 2000, "rem": [["!limit", "x", 509, 512]]} } assert len(event["request"]["data"]["foo"]) == 512 - assert event[""]["request"]["data"]["file"] == { + assert event["_meta"]["request"]["data"]["file"] == { "": {"len": 0, "rem": [["!raw", "x", 0, 0]]} } assert not event["request"]["data"]["file"] diff --git a/tests/test_event.py b/tests/test_event.py index af50e487b0..d95ae34fb0 100644 --- a/tests/test_event.py +++ b/tests/test_event.py @@ -6,7 +6,7 @@ def test_flatten_metadata(): assert flatten_metadata({"foo": ["bar"]}) == {"foo": [u"bar"]} assert flatten_metadata({"foo": [AnnotatedValue("bar", u"meta")]}) == { "foo": [u"bar"], - "": {"foo": {"0": {"": u"meta"}}}, + "_meta": {"foo": {"0": {"": u"meta"}}}, }
doccano__doccano-1907
Cannot access Django admin panel in a Heroku deployment How to reproduce the behaviour --------- The FAQ describes how to [create a user via the Django admin panel](https://github.com/doccano/doccano/blob/master/docs/faq.md#how-to-create-a-user) for a locally hosted Doccano. When run locally, I have no problem to reach the admin panel on `http://localhost:8000/admin/`, in Heroku however it is not working. I have tried to reach it on - `https://mydeployment.herokuapp.com/admin/` - `https://mydeployment.herokuapp.com/admin/login` - `https://mydeployment.herokuapp.com/admin/login/` - `http://mydeployment.herokuapp.com/admin/` Those urls all result in a `500 Internal Server Error`. Am I missing something here, or is this perhaps a bug? Your Environment --------- <!-- Include details of your environment. --> * Operating System: - * Python Version Used: - * When did you install doccano: A few days ago * How did you install doccano (Heroku button etc): Heroku button
[ { "content": "import django_heroku\n\nfrom .base import * # noqa: F401,F403\n\ndjango_heroku.settings(locals(), test_runner=False)\n", "path": "backend/config/settings/heroku.py" } ]
[ { "content": "import django_heroku\n\nfrom .base import * # noqa: F401,F403\n\ndjango_heroku.settings(locals(), test_runner=False, staticfiles=False)\n", "path": "backend/config/settings/heroku.py" } ]
diff --git a/backend/config/settings/heroku.py b/backend/config/settings/heroku.py index 080fac7db7..c94ede01e3 100644 --- a/backend/config/settings/heroku.py +++ b/backend/config/settings/heroku.py @@ -2,4 +2,4 @@ from .base import * # noqa: F401,F403 -django_heroku.settings(locals(), test_runner=False) +django_heroku.settings(locals(), test_runner=False, staticfiles=False)
mindsdb__mindsdb-2137
[Bug]: PIP installation error ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior Hello, using ```pip install mindsdb``` I've got this error: ``` Traceback (most recent call last): File "C:\Users\lukas\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module> main() File "C:\Users\lukas\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "C:\Users\lukas\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel return hook(config_settings) File "C:\Users\lukas\AppData\Local\Temp\pip-build-env-ke4g80_2\overlay\Lib\site-packages\setuptools\build_meta.py", line 177, in get_requires_for_build_wheel return self._get_build_requires( File "C:\Users\lukas\AppData\Local\Temp\pip-build-env-ke4g80_2\overlay\Lib\site-packages\setuptools\build_meta.py", line 159, in _get_build_requires self.run_setup() File "C:\Users\lukas\AppData\Local\Temp\pip-build-env-ke4g80_2\overlay\Lib\site-packages\setuptools\build_meta.py", line 281, in run_setup super(_BuildMetaLegacyBackend, File "C:\Users\lukas\AppData\Local\Temp\pip-build-env-ke4g80_2\overlay\Lib\site-packages\setuptools\build_meta.py", line 174, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 10, in <module> long_description = fh.read() File "C:\Users\lukas\AppData\Local\Programs\Python\Python310\lib\encodings\cp1250.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 3404: character maps to <undefined> ``` I am using the latest Python 3.10.4 ### Expected Behavior _No response_ ### Steps To Reproduce _No response_ ### Anything else? _No response_
[ { "content": "from setuptools import setup, find_packages\n\n\nabout = {}\nwith open(\"mindsdb/__about__.py\") as fp:\n exec(fp.read(), about)\n\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.read()\n\n\ndef install_deps():\n \"\"\"Reads requirements.txt and preprocess it\n to be feed into setuptools.\n\n This is the only possible way (we found)\n how requirements.txt can be reused in setup.py\n using dependencies from private github repositories.\n\n Links must be appendend by `-{StringWithAtLeastOneNumber}`\n or something like that, so e.g. `-9231` works as well as\n `1.1.0`. This is ignored by the setuptools, but has to be there.\n\n Warnings:\n to make pip respect the links, you have to use\n `--process-dependency-links` switch. So e.g.:\n `pip install --process-dependency-links {git-url}`\n\n Returns:\n list of packages and dependency links.\n \"\"\"\n default = open('requirements.txt', 'r').readlines()\n new_pkgs = []\n links = []\n for resource in default:\n if 'git+https' in resource:\n pkg = resource.split('#')[-1]\n links.append(resource.strip() + '-9876543210')\n new_pkgs.append(pkg.replace('egg=', '').rstrip())\n else:\n new_pkgs.append(resource.strip())\n return new_pkgs, links\n\n\npkgs, new_links = install_deps()\n\nsetup(\n name=about['__title__'],\n version=about['__version__'],\n url=about['__github__'],\n download_url=about['__pypi__'],\n license=about['__license__'],\n author=about['__author__'],\n author_email=about['__email__'],\n description=about['__description__'],\n long_description=long_description,\n long_description_content_type=\"text/markdown\",\n packages=find_packages(),\n install_requires=pkgs,\n dependency_links=new_links,\n include_package_data=True,\n classifiers=[\n \"Programming Language :: Python :: 3\",\n \"Operating System :: OS Independent\",\n ],\n python_requires=\">=3.6\"\n)\n", "path": "setup.py" } ]
[ { "content": "from setuptools import setup, find_packages\n\n\nabout = {}\nwith open(\"mindsdb/__about__.py\") as fp:\n exec(fp.read(), about)\n\n\nwith open(\"README.md\", \"r\", encoding=\"utf8\") as fh:\n long_description = fh.read()\n\n\ndef install_deps():\n \"\"\"Reads requirements.txt and preprocess it\n to be feed into setuptools.\n\n This is the only possible way (we found)\n how requirements.txt can be reused in setup.py\n using dependencies from private github repositories.\n\n Links must be appendend by `-{StringWithAtLeastOneNumber}`\n or something like that, so e.g. `-9231` works as well as\n `1.1.0`. This is ignored by the setuptools, but has to be there.\n\n Warnings:\n to make pip respect the links, you have to use\n `--process-dependency-links` switch. So e.g.:\n `pip install --process-dependency-links {git-url}`\n\n Returns:\n list of packages and dependency links.\n \"\"\"\n default = open('requirements.txt', 'r').readlines()\n new_pkgs = []\n links = []\n for resource in default:\n if 'git+https' in resource:\n pkg = resource.split('#')[-1]\n links.append(resource.strip() + '-9876543210')\n new_pkgs.append(pkg.replace('egg=', '').rstrip())\n else:\n new_pkgs.append(resource.strip())\n return new_pkgs, links\n\n\npkgs, new_links = install_deps()\n\nsetup(\n name=about['__title__'],\n version=about['__version__'],\n url=about['__github__'],\n download_url=about['__pypi__'],\n license=about['__license__'],\n author=about['__author__'],\n author_email=about['__email__'],\n description=about['__description__'],\n long_description=long_description,\n long_description_content_type=\"text/markdown\",\n packages=find_packages(),\n install_requires=pkgs,\n dependency_links=new_links,\n include_package_data=True,\n classifiers=[\n \"Programming Language :: Python :: 3\",\n \"Operating System :: OS Independent\",\n ],\n python_requires=\">=3.6\"\n)\n", "path": "setup.py" } ]
diff --git a/setup.py b/setup.py index 73eaa8781c7..a518fe61f34 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ exec(fp.read(), about) -with open("README.md", "r") as fh: +with open("README.md", "r", encoding="utf8") as fh: long_description = fh.read()
uccser__cs-unplugged-54
Add Bootstrap 4 SCSS
[ { "content": "\"\"\"\nDjango settings for csunplugged project.\n\nGenerated by 'django-admin startproject' using Django 1.10.3.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.10/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.10/ref/settings/\n\"\"\"\n\nimport os\nfrom config.settings_secret import *\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n# nasty hard coding\nSETTINGS_PATH = os.path.dirname(os.path.dirname(__file__))\n\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = 'l@@)w&&%&u37+sjz^lsx^+29y_333oid3ygxzucar^8o(axo*f'\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n\nALLOWED_HOSTS = []\n\n\n# Application definition\n\nINSTALLED_APPS = [\n 'general.apps.GeneralConfig',\n 'topics.apps.TopicsConfig',\n 'resources.apps.ResourcesConfig',\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.messages',\n 'django.contrib.staticfiles',\n]\n\nMIDDLEWARE = [\n 'django.middleware.security.SecurityMiddleware',\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'django.middleware.locale.LocaleMiddleware',\n 'django.middleware.common.CommonMiddleware',\n 'django.middleware.csrf.CsrfViewMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n 'django.contrib.messages.middleware.MessageMiddleware',\n 'django.middleware.clickjacking.XFrameOptionsMiddleware',\n]\n\nROOT_URLCONF = 'config.urls'\n\nTEMPLATES = [\n {\n 'BACKEND': 'django.template.backends.django.DjangoTemplates',\n 'DIRS': [\n os.path.join(SETTINGS_PATH, 'templates'),\n os.path.join(SETTINGS_PATH, 'resources/content/')\n ],\n 'APP_DIRS': True,\n 'OPTIONS': {\n 'context_processors': [\n 'django.template.context_processors.debug',\n 'django.template.context_processors.request',\n 'django.contrib.auth.context_processors.auth',\n 'django.contrib.messages.context_processors.messages',\n ],\n },\n },\n]\n\nWSGI_APPLICATION = 'config.wsgi.application'\n\n\n# Database\n# https://docs.djangoproject.com/en/1.10/ref/settings/#databases\n# Database values are stored in `settings_secret.py`\n# A template of this file is available as `settings_secret_template.py`\n\n\n# Password validation\n# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators\n\nAUTH_PASSWORD_VALIDATORS = [\n {\n 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',\n },\n {\n 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',\n },\n {\n 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',\n },\n {\n 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',\n },\n]\n\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.10/topics/i18n/\n\nLANGUAGE_CODE = 'en-us'\n\nTIME_ZONE = 'UTC'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\nLOCALE_PATHS = ['locale']\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.10/howto/static-files/\n\nSTATIC_URL = '/static/'\nSTATICFILES_DIRS = (\n os.path.join(BASE_DIR, 'static'),\n )\n", "path": "csunplugged/config/settings.py" } ]
[ { "content": "\"\"\"\nDjango settings for csunplugged project.\n\nGenerated by 'django-admin startproject' using Django 1.10.3.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.10/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.10/ref/settings/\n\"\"\"\n\nimport os\nfrom config.settings_secret import *\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n# nasty hard coding\nSETTINGS_PATH = os.path.dirname(os.path.dirname(__file__))\n\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = 'l@@)w&&%&u37+sjz^lsx^+29y_333oid3ygxzucar^8o(axo*f'\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n\nALLOWED_HOSTS = []\n\n\n# Application definition\n\nINSTALLED_APPS = [\n 'general.apps.GeneralConfig',\n 'topics.apps.TopicsConfig',\n 'resources.apps.ResourcesConfig',\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.messages',\n 'django.contrib.staticfiles',\n]\n\nMIDDLEWARE = [\n 'django.middleware.security.SecurityMiddleware',\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'django.middleware.locale.LocaleMiddleware',\n 'django.middleware.common.CommonMiddleware',\n 'django.middleware.csrf.CsrfViewMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n 'django.contrib.messages.middleware.MessageMiddleware',\n 'django.middleware.clickjacking.XFrameOptionsMiddleware',\n]\n\nROOT_URLCONF = 'config.urls'\n\nTEMPLATES = [\n {\n 'BACKEND': 'django.template.backends.django.DjangoTemplates',\n 'DIRS': [\n os.path.join(SETTINGS_PATH, 'templates'),\n os.path.join(SETTINGS_PATH, 'resources/content/')\n ],\n 'APP_DIRS': True,\n 'OPTIONS': {\n 'context_processors': [\n 'django.template.context_processors.debug',\n 'django.template.context_processors.request',\n 'django.contrib.auth.context_processors.auth',\n 'django.contrib.messages.context_processors.messages',\n ],\n },\n },\n]\n\nWSGI_APPLICATION = 'config.wsgi.application'\n\n\n# Database\n# https://docs.djangoproject.com/en/1.10/ref/settings/#databases\n# Database values are stored in `settings_secret.py`\n# A template of this file is available as `settings_secret_template.py`\n\n\n# Password validation\n# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators\n\nAUTH_PASSWORD_VALIDATORS = [\n {\n 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',\n },\n {\n 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',\n },\n {\n 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',\n },\n {\n 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',\n },\n]\n\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.10/topics/i18n/\n\nLANGUAGE_CODE = 'en-us'\n\nTIME_ZONE = 'UTC'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\nLOCALE_PATHS = ['locale']\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.10/howto/static-files/\n\nSTATIC_URL = '/static/'\nSTATICFILES_DIRS = (\n os.path.join(BASE_DIR, 'build'),\n )\n", "path": "csunplugged/config/settings.py" } ]
diff --git a/.gitignore b/.gitignore index 52c5759ac..67d14c841 100644 --- a/.gitignore +++ b/.gitignore @@ -93,8 +93,12 @@ ENV/ # Rope project settings .ropeproject +# Installed node modules +node_modules/ + # vim files *.swp +*.swo -# custom git configs +# Custom git settings .gitconfig diff --git a/csunplugged/config/settings.py b/csunplugged/config/settings.py index a45bbc5a7..f7c1acd1d 100644 --- a/csunplugged/config/settings.py +++ b/csunplugged/config/settings.py @@ -126,5 +126,5 @@ STATIC_URL = '/static/' STATICFILES_DIRS = ( - os.path.join(BASE_DIR, 'static'), + os.path.join(BASE_DIR, 'build'), ) diff --git a/csunplugged/gulpfile.js b/csunplugged/gulpfile.js new file mode 100644 index 000000000..15c0c1e6d --- /dev/null +++ b/csunplugged/gulpfile.js @@ -0,0 +1,220 @@ +'use strict'; +var gulp = require('gulp'); +var gutil = require('gulp-util'); +var del = require('del'); +var uglify = require('gulp-uglify'); +var gulpif = require('gulp-if'); +var exec = require('child_process').exec; + + +var notify = require('gulp-notify'); + +var buffer = require('vinyl-buffer'); +var argv = require('yargs').argv; +// sass +var sass = require('gulp-sass'); +var postcss = require('gulp-postcss'); +var postcssFlexbugFixes = require('postcss-flexbugs-fixes'); +var autoprefixer = require('autoprefixer'); +var sourcemaps = require('gulp-sourcemaps'); +// BrowserSync +var browserSync = require('browser-sync'); +// js +var watchify = require('watchify'); +var browserify = require('browserify'); +var source = require('vinyl-source-stream'); +// linting +var jshint = require('gulp-jshint'); +var stylish = require('jshint-stylish'); + + +// gulp build --production +var production = !!argv.production; +// determine if we're doing a build +// and if so, bypass the livereload +var build = argv._.length ? argv._[0] === 'build' : false; +var watch = argv._.length ? argv._[0] === 'watch' : true; + +// ---------------------------- +// Error notification methods +// ---------------------------- +var beep = function() { + var os = require('os'); + var file = 'gulp/error.wav'; + if (os.platform() === 'linux') { + // linux + exec("aplay " + file); + } else { + // mac + console.log("afplay " + file); + exec("afplay " + file); + } +}; +var handleError = function(task) { + return function(err) { + beep(); + + notify.onError({ + message: task + ' failed, check the logs..', + sound: false + })(err); + + gutil.log(gutil.colors.bgRed(task + ' error:'), gutil.colors.red(err)); + }; +}; +// -------------------------- +// CUSTOM TASK METHODS +// -------------------------- +var tasks = { + // -------------------------- + // Delete build folder + // -------------------------- + clean: function(cb) { + del(['build/'], cb); + }, + // -------------------------- + // Copy static images + // -------------------------- + images: function() { + return gulp.src('./static/img/**/*') + .pipe(gulp.dest('build/img')); + }, + // -------------------------- + // CSS + // -------------------------- + css: function() { + gulp.src('static/css/**/*.css') + .pipe(gulp.dest('build/css')); + }, + // -------------------------- + // JS + // -------------------------- + js: function() { + gulp.src('static/js/**/*.js') + .pipe(gulp.dest('build/js')); + }, + // -------------------------- + // SASS (libsass) + // -------------------------- + sass: function() { + return gulp.src('./static/scss/*.scss') + // sourcemaps + sass + error handling + .pipe(gulpif(!production, sourcemaps.init())) + .pipe(sass({ + sourceComments: !production, + outputStyle: production ? 'compressed' : 'nested' + })) + .on('error', handleError('SASS')) + // generate .maps + .pipe(gulpif(!production, sourcemaps.write({ + 'includeContent': false, + 'sourceRoot': '.' + }))) + // autoprefixer + .pipe(gulpif(!production, sourcemaps.init({ + 'loadMaps': true + }))) + .pipe(postcss([autoprefixer({browsers: ['last 2 versions']}), postcssFlexbugFixes])) + // we don't serve the source files + // so include scss content inside the sourcemaps + .pipe(sourcemaps.write({ + 'includeContent': true + })) + // write sourcemaps to a specific directory + // give it a file and save + .pipe(gulp.dest('build/css')); + }, + + // -------------------------- + // linting + // -------------------------- + lintjs: function() { + return gulp.src([ + 'gulpfile.js', + './static/js/index.js', + './static/js/**/*.js' + ]).pipe(jshint()) + .pipe(jshint.reporter(stylish)) + .on('error', function() { + beep(); + }); + }, +}; + +gulp.task('browser-sync', function() { + browserSync.init({ + proxy: "localhost:8000", + port: process.env.PORT || 3000 + }); +}); + +gulp.task('reload-sass', ['sass'], function(){ + browserSync.reload(); +}); +gulp.task('reload-js', ['js'], function(){ + browserSync.reload(); +}); +gulp.task('reload-css', ['css'], function(){ + browserSync.reload(); +}); +gulp.task('reload-templates', [], function(){ + browserSync.reload(); +}); + +// // -------------------------- +// // CUSTOMS TASKS +// // -------------------------- +gulp.task('clean', tasks.clean); +// // for production we require the clean method on every individual task +var req = []; +// // individual tasks +gulp.task('images', req, tasks.images); +gulp.task('js', req, tasks.js); +gulp.task('css', req, tasks.css); +gulp.task('sass', req, tasks.sass); +gulp.task('lint:js', tasks.lintjs); +gulp.task('optimize', tasks.optimize); +gulp.task('test', tasks.test); + +// -------------------------- +// DEV/WATCH TASK +// -------------------------- +gulp.task('watch', ['images', 'css', 'js', 'sass', 'browser-sync'], function() { + + // -------------------------- + // watch:sass + // -------------------------- + gulp.watch('./static/scss/**/*.scss', ['reload-sass']); + + // -------------------------- + // watch:js + // -------------------------- + gulp.watch('./static/js/**/*.js', ['lint:js', 'reload-js']); + + // -------------------------- + // watch:css + // -------------------------- + gulp.watch('./static/css/**/*.css', ['reload-css']); + + // -------------------------- + // watch:templates + // -------------------------- + gulp.watch('./templates/**/*.html', ['reload-templates']); + + gutil.log(gutil.colors.bgGreen('Watching for changes...')); +}); + +// build task +gulp.task('build', [ + 'clean', + 'images', + 'css', + 'js', + 'sass' +]); + +gulp.task('default', ['watch']); + +// gulp (watch) : for development and livereload +// gulp build : for a one off development build +// gulp build --production : for a minified production build diff --git a/csunplugged/package.json b/csunplugged/package.json new file mode 100644 index 000000000..9ca0296c0 --- /dev/null +++ b/csunplugged/package.json @@ -0,0 +1,31 @@ +{ + "name": "cs-unplugged-assets", + "version": "0.0.1", + "main": "gulpfile.js", + "dependencies": { + "autoprefixer": "^6.7.6", + "browser-sync": "^2.18.8", + "browserify": "^14.1.0", + "child_process": "^1.0.2", + "del": "^2.2.2", + "gulp": "^3.9.1", + "gulp-if": "^2.0.2", + "gulp-jshint": "^2.0.4", + "gulp-notify": "^3.0.0", + "gulp-postcss": "^6.3.0", + "gulp-sass": "^3.1.0", + "gulp-sourcemaps": "^2.4.1", + "gulp-uglify": "^2.0.1", + "gulp-util": "^3.0.8", + "jshint": "^2.9.4", + "jshint-stylish": "^2.2.1", + "postcss-flexbugs-fixes": "^2.1.0", + "vinyl-buffer": "^1.0.0", + "vinyl-source-stream": "^1.1.0", + "watchify": "^3.9.0", + "yargs": "^6.6.0" + }, + "devDependencies": { + "gulp": "^3.9.1" + } +} diff --git a/csunplugged/static/css/bootstrap.min.css b/csunplugged/static/css/bootstrap.min.css deleted file mode 100644 index a8da0748b..000000000 --- a/csunplugged/static/css/bootstrap.min.css +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com) - * Copyright 2011-2017 The Bootstrap Authors - * Copyright 2011-2017 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - *//*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}@media print{*,::after,::before,blockquote::first-letter,blockquote::first-line,div::first-letter,div::first-line,li::first-letter,li::first-line,p::first-letter,p::first-line{text-shadow:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}html{-webkit-box-sizing:border-box;box-sizing:border-box}*,::after,::before{-webkit-box-sizing:inherit;box-sizing:inherit}@-ms-viewport{width:device-width}html{-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}body{font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#292b2c;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{cursor:help}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}a{color:#0275d8;text-decoration:none}a:focus,a:hover{color:#014c8c;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle}[role=button]{cursor:pointer}[role=button],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse;background-color:transparent}caption{padding-top:.75rem;padding-bottom:.75rem;color:#636c72;text-align:left;caption-side:bottom}th{text-align:left}label{display:inline-block;margin-bottom:.5rem}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,select,textarea{line-height:inherit}input[type=checkbox]:disabled,input[type=radio]:disabled{cursor:not-allowed}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit}input[type=search]{-webkit-appearance:none}output{display:inline-block}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.1}.display-2{font-size:5.5rem;font-weight:300;line-height:1.1}.display-3{font-size:4.5rem;font-weight:300;line-height:1.1}.display-4{font-size:3.5rem;font-weight:300;line-height:1.1}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:5px}.initialism{font-size:90%;text-transform:uppercase}.blockquote{padding:.5rem 1rem;margin-bottom:1rem;font-size:1.25rem;border-left:.25rem solid #eceeef}.blockquote-footer{display:block;font-size:80%;color:#636c72}.blockquote-footer::before{content:"\2014 \00A0"}.blockquote-reverse{padding-right:1rem;padding-left:0;text-align:right;border-right:.25rem solid #eceeef;border-left:0}.blockquote-reverse .blockquote-footer::before{content:""}.blockquote-reverse .blockquote-footer::after{content:"\00A0 \2014"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #ddd;border-radius:.25rem;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#636c72}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}code{padding:.2rem .4rem;font-size:90%;color:#bd4147;background-color:#f7f7f9;border-radius:.25rem}a>code{padding:0;color:inherit;background-color:inherit}kbd{padding:.2rem .4rem;font-size:90%;color:#fff;background-color:#292b2c;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;margin-top:0;margin-bottom:1rem;font-size:90%;color:#292b2c}pre code{padding:0;font-size:inherit;color:inherit;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{position:relative;margin-left:auto;margin-right:auto;padding-right:15px;padding-left:15px}@media (min-width:576px){.container{padding-right:15px;padding-left:15px}}@media (min-width:768px){.container{padding-right:15px;padding-left:15px}}@media (min-width:992px){.container{padding-right:15px;padding-left:15px}}@media (min-width:1200px){.container{padding-right:15px;padding-left:15px}}@media (min-width:576px){.container{width:540px;max-width:100%}}@media (min-width:768px){.container{width:720px;max-width:100%}}@media (min-width:992px){.container{width:960px;max-width:100%}}@media (min-width:1200px){.container{width:1140px;max-width:100%}}.container-fluid{position:relative;margin-left:auto;margin-right:auto;padding-right:15px;padding-left:15px}@media (min-width:576px){.container-fluid{padding-right:15px;padding-left:15px}}@media (min-width:768px){.container-fluid{padding-right:15px;padding-left:15px}}@media (min-width:992px){.container-fluid{padding-right:15px;padding-left:15px}}@media (min-width:1200px){.container-fluid{padding-right:15px;padding-left:15px}}.row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}@media (min-width:576px){.row{margin-right:-15px;margin-left:-15px}}@media (min-width:768px){.row{margin-right:-15px;margin-left:-15px}}@media (min-width:992px){.row{margin-right:-15px;margin-left:-15px}}@media (min-width:1200px){.row{margin-right:-15px;margin-left:-15px}}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9{position:relative;width:100%;min-height:1px;padding-right:15px;padding-left:15px}@media (min-width:576px){.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9{padding-right:15px;padding-left:15px}}@media (min-width:768px){.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9{padding-right:15px;padding-left:15px}}@media (min-width:992px){.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9{padding-right:15px;padding-left:15px}}@media (min-width:1200px){.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9{padding-right:15px;padding-left:15px}}.col{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-auto{-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-1{-webkit-box-flex:0;-webkit-flex:0 0 8.333333%;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-2{-webkit-box-flex:0;-webkit-flex:0 0 16.666667%;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-3{-webkit-box-flex:0;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-webkit-box-flex:0;-webkit-flex:0 0 33.333333%;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-5{-webkit-box-flex:0;-webkit-flex:0 0 41.666667%;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-6{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7{-webkit-box-flex:0;-webkit-flex:0 0 58.333333%;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-8{-webkit-box-flex:0;-webkit-flex:0 0 66.666667%;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-9{-webkit-box-flex:0;-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-webkit-box-flex:0;-webkit-flex:0 0 83.333333%;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-11{-webkit-box-flex:0;-webkit-flex:0 0 91.666667%;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-12{-webkit-box-flex:0;-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.pull-0{right:auto}.pull-1{right:8.333333%}.pull-2{right:16.666667%}.pull-3{right:25%}.pull-4{right:33.333333%}.pull-5{right:41.666667%}.pull-6{right:50%}.pull-7{right:58.333333%}.pull-8{right:66.666667%}.pull-9{right:75%}.pull-10{right:83.333333%}.pull-11{right:91.666667%}.pull-12{right:100%}.push-0{left:auto}.push-1{left:8.333333%}.push-2{left:16.666667%}.push-3{left:25%}.push-4{left:33.333333%}.push-5{left:41.666667%}.push-6{left:50%}.push-7{left:58.333333%}.push-8{left:66.666667%}.push-9{left:75%}.push-10{left:83.333333%}.push-11{left:91.666667%}.push-12{left:100%}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666667%}@media (min-width:576px){.col-sm{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-sm-auto{-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-sm-1{-webkit-box-flex:0;-webkit-flex:0 0 8.333333%;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{-webkit-box-flex:0;-webkit-flex:0 0 16.666667%;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-3{-webkit-box-flex:0;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-webkit-box-flex:0;-webkit-flex:0 0 33.333333%;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{-webkit-box-flex:0;-webkit-flex:0 0 41.666667%;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-sm-6{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-webkit-box-flex:0;-webkit-flex:0 0 58.333333%;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{-webkit-box-flex:0;-webkit-flex:0 0 66.666667%;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-sm-9{-webkit-box-flex:0;-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-webkit-box-flex:0;-webkit-flex:0 0 83.333333%;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{-webkit-box-flex:0;-webkit-flex:0 0 91.666667%;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-sm-12{-webkit-box-flex:0;-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.pull-sm-0{right:auto}.pull-sm-1{right:8.333333%}.pull-sm-2{right:16.666667%}.pull-sm-3{right:25%}.pull-sm-4{right:33.333333%}.pull-sm-5{right:41.666667%}.pull-sm-6{right:50%}.pull-sm-7{right:58.333333%}.pull-sm-8{right:66.666667%}.pull-sm-9{right:75%}.pull-sm-10{right:83.333333%}.pull-sm-11{right:91.666667%}.pull-sm-12{right:100%}.push-sm-0{left:auto}.push-sm-1{left:8.333333%}.push-sm-2{left:16.666667%}.push-sm-3{left:25%}.push-sm-4{left:33.333333%}.push-sm-5{left:41.666667%}.push-sm-6{left:50%}.push-sm-7{left:58.333333%}.push-sm-8{left:66.666667%}.push-sm-9{left:75%}.push-sm-10{left:83.333333%}.push-sm-11{left:91.666667%}.push-sm-12{left:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666667%}}@media (min-width:768px){.col-md{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-md-auto{-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-md-1{-webkit-box-flex:0;-webkit-flex:0 0 8.333333%;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{-webkit-box-flex:0;-webkit-flex:0 0 16.666667%;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-3{-webkit-box-flex:0;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-webkit-box-flex:0;-webkit-flex:0 0 33.333333%;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{-webkit-box-flex:0;-webkit-flex:0 0 41.666667%;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-md-6{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-webkit-box-flex:0;-webkit-flex:0 0 58.333333%;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{-webkit-box-flex:0;-webkit-flex:0 0 66.666667%;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-md-9{-webkit-box-flex:0;-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-webkit-box-flex:0;-webkit-flex:0 0 83.333333%;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{-webkit-box-flex:0;-webkit-flex:0 0 91.666667%;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-md-12{-webkit-box-flex:0;-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.pull-md-0{right:auto}.pull-md-1{right:8.333333%}.pull-md-2{right:16.666667%}.pull-md-3{right:25%}.pull-md-4{right:33.333333%}.pull-md-5{right:41.666667%}.pull-md-6{right:50%}.pull-md-7{right:58.333333%}.pull-md-8{right:66.666667%}.pull-md-9{right:75%}.pull-md-10{right:83.333333%}.pull-md-11{right:91.666667%}.pull-md-12{right:100%}.push-md-0{left:auto}.push-md-1{left:8.333333%}.push-md-2{left:16.666667%}.push-md-3{left:25%}.push-md-4{left:33.333333%}.push-md-5{left:41.666667%}.push-md-6{left:50%}.push-md-7{left:58.333333%}.push-md-8{left:66.666667%}.push-md-9{left:75%}.push-md-10{left:83.333333%}.push-md-11{left:91.666667%}.push-md-12{left:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666667%}}@media (min-width:992px){.col-lg{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-lg-auto{-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-lg-1{-webkit-box-flex:0;-webkit-flex:0 0 8.333333%;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{-webkit-box-flex:0;-webkit-flex:0 0 16.666667%;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-3{-webkit-box-flex:0;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-webkit-box-flex:0;-webkit-flex:0 0 33.333333%;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{-webkit-box-flex:0;-webkit-flex:0 0 41.666667%;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-lg-6{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-webkit-box-flex:0;-webkit-flex:0 0 58.333333%;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{-webkit-box-flex:0;-webkit-flex:0 0 66.666667%;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-lg-9{-webkit-box-flex:0;-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-webkit-box-flex:0;-webkit-flex:0 0 83.333333%;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{-webkit-box-flex:0;-webkit-flex:0 0 91.666667%;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-lg-12{-webkit-box-flex:0;-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.pull-lg-0{right:auto}.pull-lg-1{right:8.333333%}.pull-lg-2{right:16.666667%}.pull-lg-3{right:25%}.pull-lg-4{right:33.333333%}.pull-lg-5{right:41.666667%}.pull-lg-6{right:50%}.pull-lg-7{right:58.333333%}.pull-lg-8{right:66.666667%}.pull-lg-9{right:75%}.pull-lg-10{right:83.333333%}.pull-lg-11{right:91.666667%}.pull-lg-12{right:100%}.push-lg-0{left:auto}.push-lg-1{left:8.333333%}.push-lg-2{left:16.666667%}.push-lg-3{left:25%}.push-lg-4{left:33.333333%}.push-lg-5{left:41.666667%}.push-lg-6{left:50%}.push-lg-7{left:58.333333%}.push-lg-8{left:66.666667%}.push-lg-9{left:75%}.push-lg-10{left:83.333333%}.push-lg-11{left:91.666667%}.push-lg-12{left:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666667%}}@media (min-width:1200px){.col-xl{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-xl-auto{-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-xl-1{-webkit-box-flex:0;-webkit-flex:0 0 8.333333%;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{-webkit-box-flex:0;-webkit-flex:0 0 16.666667%;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-3{-webkit-box-flex:0;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-webkit-box-flex:0;-webkit-flex:0 0 33.333333%;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{-webkit-box-flex:0;-webkit-flex:0 0 41.666667%;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-xl-6{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-webkit-box-flex:0;-webkit-flex:0 0 58.333333%;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{-webkit-box-flex:0;-webkit-flex:0 0 66.666667%;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-xl-9{-webkit-box-flex:0;-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-webkit-box-flex:0;-webkit-flex:0 0 83.333333%;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{-webkit-box-flex:0;-webkit-flex:0 0 91.666667%;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-xl-12{-webkit-box-flex:0;-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.pull-xl-0{right:auto}.pull-xl-1{right:8.333333%}.pull-xl-2{right:16.666667%}.pull-xl-3{right:25%}.pull-xl-4{right:33.333333%}.pull-xl-5{right:41.666667%}.pull-xl-6{right:50%}.pull-xl-7{right:58.333333%}.pull-xl-8{right:66.666667%}.pull-xl-9{right:75%}.pull-xl-10{right:83.333333%}.pull-xl-11{right:91.666667%}.pull-xl-12{right:100%}.push-xl-0{left:auto}.push-xl-1{left:8.333333%}.push-xl-2{left:16.666667%}.push-xl-3{left:25%}.push-xl-4{left:33.333333%}.push-xl-5{left:41.666667%}.push-xl-6{left:50%}.push-xl-7{left:58.333333%}.push-xl-8{left:66.666667%}.push-xl-9{left:75%}.push-xl-10{left:83.333333%}.push-xl-11{left:91.666667%}.push-xl-12{left:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666667%}}.table{width:100%;max-width:100%;margin-bottom:1rem}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #eceeef}.table thead th{vertical-align:bottom;border-bottom:2px solid #eceeef}.table tbody+tbody{border-top:2px solid #eceeef}.table .table{background-color:#fff}.table-sm td,.table-sm th{padding:.3rem}.table-bordered{border:1px solid #eceeef}.table-bordered td,.table-bordered th{border:1px solid #eceeef}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{background-color:rgba(0,0,0,.075)}.table-active,.table-active>td,.table-active>th{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table-success,.table-success>td,.table-success>th{background-color:#dff0d8}.table-hover .table-success:hover{background-color:#d0e9c6}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#d0e9c6}.table-info,.table-info>td,.table-info>th{background-color:#d9edf7}.table-hover .table-info:hover{background-color:#c4e3f3}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#c4e3f3}.table-warning,.table-warning>td,.table-warning>th{background-color:#fcf8e3}.table-hover .table-warning:hover{background-color:#faf2cc}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#faf2cc}.table-danger,.table-danger>td,.table-danger>th{background-color:#f2dede}.table-hover .table-danger:hover{background-color:#ebcccc}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#ebcccc}.thead-inverse th{color:#fff;background-color:#292b2c}.thead-default th{color:#464a4c;background-color:#eceeef}.table-inverse{color:#fff;background-color:#292b2c}.table-inverse td,.table-inverse th,.table-inverse thead th{border-color:#fff}.table-inverse.table-bordered{border:0}.table-responsive{display:block;width:100%;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive.table-bordered{border:0}.form-control{display:block;width:100%;padding:.5rem .75rem;font-size:1rem;line-height:1.25;color:#464a4c;background-color:#fff;background-image:none;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem;-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s,-webkit-box-shadow ease-in-out .15s}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:focus{color:#464a4c;background-color:#fff;border-color:#5cb3fd;outline:0}.form-control::-webkit-input-placeholder{color:#636c72;opacity:1}.form-control::-moz-placeholder{color:#636c72;opacity:1}.form-control:-ms-input-placeholder{color:#636c72;opacity:1}.form-control::placeholder{color:#636c72;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#eceeef;opacity:1}.form-control:disabled{cursor:not-allowed}select.form-control:not([size]):not([multiple]){height:calc(2.25rem + 2px)}select.form-control:focus::-ms-value{color:#464a4c;background-color:#fff}.form-control-file,.form-control-range{display:block}.col-form-label{padding-top:calc(.5rem - 1px * 2);padding-bottom:calc(.5rem - 1px * 2);margin-bottom:0}.col-form-label-lg{padding-top:calc(.75rem - 1px * 2);padding-bottom:calc(.75rem - 1px * 2);font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem - 1px * 2);padding-bottom:calc(.25rem - 1px * 2);font-size:.875rem}.col-form-legend{padding-top:.5rem;padding-bottom:.5rem;margin-bottom:0;font-size:1rem}.form-control-static{padding-top:.5rem;padding-bottom:.5rem;margin-bottom:0;line-height:1.25;border:solid transparent;border-width:1px 0}.form-control-static.form-control-lg,.form-control-static.form-control-sm,.input-group-lg>.form-control-static.form-control,.input-group-lg>.form-control-static.input-group-addon,.input-group-lg>.input-group-btn>.form-control-static.btn,.input-group-sm>.form-control-static.form-control,.input-group-sm>.form-control-static.input-group-addon,.input-group-sm>.input-group-btn>.form-control-static.btn{padding-right:0;padding-left:0}.form-control-sm,.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.input-group-sm>.input-group-btn>select.btn:not([size]):not([multiple]),.input-group-sm>select.form-control:not([size]):not([multiple]),.input-group-sm>select.input-group-addon:not([size]):not([multiple]),select.form-control-sm:not([size]):not([multiple]){height:1.8125rem}.form-control-lg,.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{padding:.75rem 1.5rem;font-size:1.25rem;border-radius:.3rem}.input-group-lg>.input-group-btn>select.btn:not([size]):not([multiple]),.input-group-lg>select.form-control:not([size]):not([multiple]),.input-group-lg>select.input-group-addon:not([size]):not([multiple]),select.form-control-lg:not([size]):not([multiple]){height:3.166667rem}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-check{position:relative;display:block;margin-bottom:.5rem}.form-check.disabled .form-check-label{color:#636c72;cursor:not-allowed}.form-check-label{padding-left:1.25rem;margin-bottom:0;cursor:pointer}.form-check-input{position:absolute;margin-top:.25rem;margin-left:-1.25rem}.form-check-input:only-child{position:static}.form-check-inline{display:inline-block}.form-check-inline .form-check-label{vertical-align:middle}.form-check-inline+.form-check-inline{margin-left:.75rem}.form-control-feedback{margin-top:.25rem}.form-control-danger,.form-control-success,.form-control-warning{padding-right:2.25rem;background-repeat:no-repeat;background-position:center right .5625rem;-webkit-background-size:1.125rem 1.125rem;background-size:1.125rem 1.125rem}.has-success .col-form-label,.has-success .custom-control,.has-success .form-check-label,.has-success .form-control-feedback,.has-success .form-control-label{color:#5cb85c}.has-success .form-control{border-color:#5cb85c}.has-success .input-group-addon{color:#5cb85c;border-color:#5cb85c;background-color:#eaf6ea}.has-success .form-control-success{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%235cb85c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E")}.has-warning .col-form-label,.has-warning .custom-control,.has-warning .form-check-label,.has-warning .form-control-feedback,.has-warning .form-control-label{color:#f0ad4e}.has-warning .form-control{border-color:#f0ad4e}.has-warning .input-group-addon{color:#f0ad4e;border-color:#f0ad4e;background-color:#fff}.has-warning .form-control-warning{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23f0ad4e' d='M4.4 5.324h-.8v-2.46h.8zm0 1.42h-.8V5.89h.8zM3.76.63L.04 7.075c-.115.2.016.425.26.426h7.397c.242 0 .372-.226.258-.426C6.726 4.924 5.47 2.79 4.253.63c-.113-.174-.39-.174-.494 0z'/%3E%3C/svg%3E")}.has-danger .col-form-label,.has-danger .custom-control,.has-danger .form-check-label,.has-danger .form-control-feedback,.has-danger .form-control-label{color:#d9534f}.has-danger .form-control{border-color:#d9534f}.has-danger .input-group-addon{color:#d9534f;border-color:#d9534f;background-color:#fdf7f7}.has-danger .form-control-danger{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23d9534f' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23d9534f' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E")}.form-inline{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{width:auto}.form-inline .form-control-label{margin-bottom:0;vertical-align:middle}.form-inline .form-check{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:auto;margin-top:0;margin-bottom:0}.form-inline .form-check-label{padding-left:0}.form-inline .form-check-input{position:relative;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;padding-left:0}.form-inline .custom-control-indicator{position:static;display:inline-block;margin-right:.25rem;vertical-align:text-bottom}.form-inline .has-feedback .form-control-feedback{top:0}}.btn{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.5rem 1rem;font-size:1rem;border-radius:.25rem;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.btn:focus,.btn:hover{text-decoration:none}.btn.focus,.btn:focus{outline:0;-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.25);box-shadow:0 0 0 2px rgba(2,117,216,.25)}.btn.disabled,.btn:disabled{cursor:not-allowed;opacity:.65}.btn.active,.btn:active{background-image:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#0275d8;border-color:#0275d8}.btn-primary:hover{color:#fff;background-color:#025aa5;border-color:#01549b}.btn-primary.focus,.btn-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.btn-primary.disabled,.btn-primary:disabled{background-color:#0275d8;border-color:#0275d8}.btn-primary.active,.btn-primary:active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#025aa5;background-image:none;border-color:#01549b}.btn-secondary{color:#292b2c;background-color:#fff;border-color:#ccc}.btn-secondary:hover{color:#292b2c;background-color:#e6e6e6;border-color:#adadad}.btn-secondary.focus,.btn-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.btn-secondary.disabled,.btn-secondary:disabled{background-color:#fff;border-color:#ccc}.btn-secondary.active,.btn-secondary:active,.show>.btn-secondary.dropdown-toggle{color:#292b2c;background-color:#e6e6e6;background-image:none;border-color:#adadad}.btn-info{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#2aabd2}.btn-info.focus,.btn-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.btn-info.disabled,.btn-info:disabled{background-color:#5bc0de;border-color:#5bc0de}.btn-info.active,.btn-info:active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;background-image:none;border-color:#2aabd2}.btn-success{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#419641}.btn-success.focus,.btn-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.btn-success.disabled,.btn-success:disabled{background-color:#5cb85c;border-color:#5cb85c}.btn-success.active,.btn-success:active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#449d44;background-image:none;border-color:#419641}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#eb9316}.btn-warning.focus,.btn-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.btn-warning.disabled,.btn-warning:disabled{background-color:#f0ad4e;border-color:#f0ad4e}.btn-warning.active,.btn-warning:active,.show>.btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;background-image:none;border-color:#eb9316}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d9534f}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#c12e2a}.btn-danger.focus,.btn-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.btn-danger.disabled,.btn-danger:disabled{background-color:#d9534f;border-color:#d9534f}.btn-danger.active,.btn-danger:active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;background-image:none;border-color:#c12e2a}.btn-outline-primary{color:#0275d8;background-image:none;background-color:transparent;border-color:#0275d8}.btn-outline-primary:hover{color:#fff;background-color:#0275d8;border-color:#0275d8}.btn-outline-primary.focus,.btn-outline-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#0275d8;background-color:transparent}.btn-outline-primary.active,.btn-outline-primary:active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#0275d8;border-color:#0275d8}.btn-outline-secondary{color:#ccc;background-image:none;background-color:transparent;border-color:#ccc}.btn-outline-secondary:hover{color:#fff;background-color:#ccc;border-color:#ccc}.btn-outline-secondary.focus,.btn-outline-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#ccc;background-color:transparent}.btn-outline-secondary.active,.btn-outline-secondary:active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#ccc;border-color:#ccc}.btn-outline-info{color:#5bc0de;background-image:none;background-color:transparent;border-color:#5bc0de}.btn-outline-info:hover{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.btn-outline-info.focus,.btn-outline-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#5bc0de;background-color:transparent}.btn-outline-info.active,.btn-outline-info:active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.btn-outline-success{color:#5cb85c;background-image:none;background-color:transparent;border-color:#5cb85c}.btn-outline-success:hover{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.btn-outline-success.focus,.btn-outline-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#5cb85c;background-color:transparent}.btn-outline-success.active,.btn-outline-success:active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.btn-outline-warning{color:#f0ad4e;background-image:none;background-color:transparent;border-color:#f0ad4e}.btn-outline-warning:hover{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.btn-outline-warning.focus,.btn-outline-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#f0ad4e;background-color:transparent}.btn-outline-warning.active,.btn-outline-warning:active,.show>.btn-outline-warning.dropdown-toggle{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.btn-outline-danger{color:#d9534f;background-image:none;background-color:transparent;border-color:#d9534f}.btn-outline-danger:hover{color:#fff;background-color:#d9534f;border-color:#d9534f}.btn-outline-danger.focus,.btn-outline-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#d9534f;background-color:transparent}.btn-outline-danger.active,.btn-outline-danger:active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#d9534f;border-color:#d9534f}.btn-link{font-weight:400;color:#0275d8;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link:disabled{background-color:transparent}.btn-link,.btn-link:active,.btn-link:focus{border-color:transparent}.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#014c8c;text-decoration:underline;background-color:transparent}.btn-link:disabled{color:#636c72}.btn-link:disabled:focus,.btn-link:disabled:hover{text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:.75rem 1.5rem;font-size:1.25rem;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.show{opacity:1}.collapse{display:none}.collapse.show{display:block}tr.collapse.show{display:table-row}tbody.collapse.show{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.dropdown,.dropup{position:relative}.dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.3em;vertical-align:middle;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-left:.3em solid transparent}.dropdown-toggle:focus{outline:0}.dropup .dropdown-toggle::after{border-top:0;border-bottom:.3em solid}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#292b2c;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-divider{height:1px;margin:.5rem 0;overflow:hidden;background-color:#eceeef}.dropdown-item{display:block;width:100%;padding:3px 1.5rem;clear:both;font-weight:400;color:#292b2c;text-align:inherit;white-space:nowrap;background:0 0;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#1d1e1f;text-decoration:none;background-color:#f7f7f9}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#0275d8}.dropdown-item.disabled,.dropdown-item:disabled{color:#636c72;cursor:not-allowed;background-color:transparent}.show>.dropdown-menu{display:block}.show>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#636c72;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.dropup .dropdown-menu{top:auto;bottom:100%;margin-bottom:.125rem}.btn-group,.btn-group-vertical{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.btn-group-vertical>.btn:hover,.btn-group>.btn:hover{z-index:2}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group,.btn-group-vertical .btn+.btn,.btn-group-vertical .btn+.btn-group,.btn-group-vertical .btn-group+.btn,.btn-group-vertical .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn+.dropdown-toggle-split::after{margin-left:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:1.125rem;padding-left:1.125rem}.btn-group-vertical{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.btn-group-vertical .btn,.btn-group-vertical .btn-group{width:100%}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%}.input-group .form-control{position:relative;z-index:2;-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;margin-bottom:0}.input-group .form-control:active,.input-group .form-control:focus,.input-group .form-control:hover{z-index:3}.input-group .form-control,.input-group-addon,.input-group-btn{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{white-space:nowrap;vertical-align:middle}.input-group-addon{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.25;color:#464a4c;text-align:center;background-color:#eceeef;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.input-group-addon.form-control-sm,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.input-group-addon.btn{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.input-group-addon.form-control-lg,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.input-group-addon.btn{padding:.75rem 1.5rem;font-size:1.25rem;border-radius:.3rem}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:not(:last-child),.input-group-addon:not(:last-child),.input-group-btn:not(:first-child)>.btn-group:not(:last-child)>.btn,.input-group-btn:not(:first-child)>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:not(:last-child)>.btn,.input-group-btn:not(:last-child)>.btn-group>.btn,.input-group-btn:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:not(:last-child){border-right:0}.input-group .form-control:not(:first-child),.input-group-addon:not(:first-child),.input-group-btn:not(:first-child)>.btn,.input-group-btn:not(:first-child)>.btn-group>.btn,.input-group-btn:not(:first-child)>.dropdown-toggle,.input-group-btn:not(:last-child)>.btn-group:not(:first-child)>.btn,.input-group-btn:not(:last-child)>.btn:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.form-control+.input-group-addon:not(:first-child){border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative;-webkit-box-flex:1;-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:3}.input-group-btn:not(:last-child)>.btn,.input-group-btn:not(:last-child)>.btn-group{margin-right:-1px}.input-group-btn:not(:first-child)>.btn,.input-group-btn:not(:first-child)>.btn-group{z-index:2;margin-left:-1px}.input-group-btn:not(:first-child)>.btn-group:active,.input-group-btn:not(:first-child)>.btn-group:focus,.input-group-btn:not(:first-child)>.btn-group:hover,.input-group-btn:not(:first-child)>.btn:active,.input-group-btn:not(:first-child)>.btn:focus,.input-group-btn:not(:first-child)>.btn:hover{z-index:3}.custom-control{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:1.5rem;padding-left:1.5rem;margin-right:1rem;cursor:pointer}.custom-control-input{position:absolute;z-index:-1;opacity:0}.custom-control-input:checked~.custom-control-indicator{color:#fff;background-color:#0275d8}.custom-control-input:focus~.custom-control-indicator{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #0275d8;box-shadow:0 0 0 1px #fff,0 0 0 3px #0275d8}.custom-control-input:active~.custom-control-indicator{color:#fff;background-color:#8fcafe}.custom-control-input:disabled~.custom-control-indicator{cursor:not-allowed;background-color:#eceeef}.custom-control-input:disabled~.custom-control-description{color:#636c72;cursor:not-allowed}.custom-control-indicator{position:absolute;top:.25rem;left:0;display:block;width:1rem;height:1rem;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#ddd;background-repeat:no-repeat;background-position:center center;-webkit-background-size:50% 50%;background-size:50% 50%}.custom-checkbox .custom-control-indicator{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-indicator{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-indicator{background-color:#0275d8;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E")}.custom-radio .custom-control-indicator{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-indicator{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E")}.custom-controls-stacked{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.custom-controls-stacked .custom-control{margin-bottom:.25rem}.custom-controls-stacked .custom-control+.custom-control{margin-left:0}.custom-select{display:inline-block;max-width:100%;height:calc(2.25rem + 2px);padding:.375rem 1.75rem .375rem .75rem;line-height:1.25;color:#464a4c;vertical-align:middle;background:#fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right .75rem center;-webkit-background-size:8px 10px;background-size:8px 10px;border:1px solid rgba(0,0,0,.15);border-radius:.25rem;-moz-appearance:none;-webkit-appearance:none}.custom-select:focus{border-color:#5cb3fd;outline:0}.custom-select:focus::-ms-value{color:#464a4c;background-color:#fff}.custom-select:disabled{color:#636c72;cursor:not-allowed;background-color:#eceeef}.custom-select::-ms-expand{opacity:0}.custom-select-sm{padding-top:.375rem;padding-bottom:.375rem;font-size:75%}.custom-file{position:relative;display:inline-block;max-width:100%;height:2.5rem;margin-bottom:0;cursor:pointer}.custom-file-input{min-width:14rem;max-width:100%;height:2.5rem;margin:0;filter:alpha(opacity=0);opacity:0}.custom-file-control{position:absolute;top:0;right:0;left:0;z-index:5;height:2.5rem;padding:.5rem 1rem;line-height:1.5;color:#464a4c;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.custom-file-control:lang(en)::after{content:"Choose file..."}.custom-file-control::before{position:absolute;top:-1px;right:-1px;bottom:-1px;z-index:6;display:block;height:2.5rem;padding:.5rem 1rem;line-height:1.5;color:#464a4c;background-color:#eceeef;border:1px solid rgba(0,0,0,.15);border-radius:0 .25rem .25rem 0}.custom-file-control:lang(en)::before{content:"Browse"}.nav{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5em 1em}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#636c72;cursor:not-allowed}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-right-radius:.25rem;border-top-left-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#eceeef #eceeef #ddd}.nav-tabs .nav-link.disabled{color:#636c72;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#464a4c;background-color:#fff;border-color:#ddd #ddd #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-item.show .nav-link,.nav-pills .nav-link.active{color:#fff;cursor:default;background-color:#0275d8}.nav-fill .nav-item{-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item{-webkit-box-flex:1;-webkit-flex:1 1 100%;-ms-flex:1 1 100%;flex:1 1 100%;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:.5rem 1rem}.navbar-brand{display:inline-block;padding-top:.25rem;padding-bottom:.25rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-text{display:inline-block;padding-top:.425rem;padding-bottom:.425rem}.navbar-toggler{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;padding:.25rem .75rem;font-size:1.25rem;line-height:1;background:0 0;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat center center;-webkit-background-size:100% 100%;background-size:100% 100%}.navbar-toggler-left{position:absolute;left:1rem}.navbar-toggler-right{position:absolute;right:1rem}@media (max-width:575px){.navbar-toggleable .navbar-nav .dropdown-menu{position:static;float:none}.navbar-toggleable>.container{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-toggleable{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.navbar-toggleable .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.navbar-toggleable .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-toggleable>.container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.navbar-toggleable .navbar-collapse{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;width:100%}.navbar-toggleable .navbar-toggler{display:none}}@media (max-width:767px){.navbar-toggleable-sm .navbar-nav .dropdown-menu{position:static;float:none}.navbar-toggleable-sm>.container{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-toggleable-sm{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.navbar-toggleable-sm .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.navbar-toggleable-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-toggleable-sm>.container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.navbar-toggleable-sm .navbar-collapse{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;width:100%}.navbar-toggleable-sm .navbar-toggler{display:none}}@media (max-width:991px){.navbar-toggleable-md .navbar-nav .dropdown-menu{position:static;float:none}.navbar-toggleable-md>.container{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-toggleable-md{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.navbar-toggleable-md .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.navbar-toggleable-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-toggleable-md>.container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.navbar-toggleable-md .navbar-collapse{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;width:100%}.navbar-toggleable-md .navbar-toggler{display:none}}@media (max-width:1199px){.navbar-toggleable-lg .navbar-nav .dropdown-menu{position:static;float:none}.navbar-toggleable-lg>.container{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-toggleable-lg{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.navbar-toggleable-lg .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.navbar-toggleable-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-toggleable-lg>.container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.navbar-toggleable-lg .navbar-collapse{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;width:100%}.navbar-toggleable-lg .navbar-toggler{display:none}}.navbar-toggleable-xl{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.navbar-toggleable-xl .navbar-nav .dropdown-menu{position:static;float:none}.navbar-toggleable-xl>.container{padding-right:0;padding-left:0}.navbar-toggleable-xl .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.navbar-toggleable-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-toggleable-xl>.container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.navbar-toggleable-xl .navbar-collapse{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;width:100%}.navbar-toggleable-xl .navbar-toggler{display:none}.navbar-light .navbar-brand,.navbar-light .navbar-toggler{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover,.navbar-light .navbar-toggler:focus,.navbar-light .navbar-toggler:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.open,.navbar-light .navbar-nav .open>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-toggler{color:#fff}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-toggler:focus,.navbar-inverse .navbar-toggler:hover{color:#fff}.navbar-inverse .navbar-nav .nav-link{color:rgba(255,255,255,.5)}.navbar-inverse .navbar-nav .nav-link:focus,.navbar-inverse .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-inverse .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-inverse .navbar-nav .active>.nav-link,.navbar-inverse .navbar-nav .nav-link.active,.navbar-inverse .navbar-nav .nav-link.open,.navbar-inverse .navbar-nav .open>.nav-link{color:#fff}.navbar-inverse .navbar-toggler{border-color:rgba(255,255,255,.1)}.navbar-inverse .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E")}.navbar-inverse .navbar-text{color:rgba(255,255,255,.5)}.card{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;background-color:#fff;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card-block{-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card>.list-group:first-child .list-group-item:first-child{border-top-right-radius:.25rem;border-top-left-radius:.25rem}.card>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:#f7f7f9;border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.75rem 1.25rem;background-color:#f7f7f9;border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.625rem;margin-bottom:-.75rem;margin-left:-.625rem;border-bottom:0}.card-header-pills{margin-right:-.625rem;margin-left:-.625rem}.card-primary{background-color:#0275d8;border-color:#0275d8}.card-primary .card-footer,.card-primary .card-header{background-color:transparent}.card-success{background-color:#5cb85c;border-color:#5cb85c}.card-success .card-footer,.card-success .card-header{background-color:transparent}.card-info{background-color:#5bc0de;border-color:#5bc0de}.card-info .card-footer,.card-info .card-header{background-color:transparent}.card-warning{background-color:#f0ad4e;border-color:#f0ad4e}.card-warning .card-footer,.card-warning .card-header{background-color:transparent}.card-danger{background-color:#d9534f;border-color:#d9534f}.card-danger .card-footer,.card-danger .card-header{background-color:transparent}.card-outline-primary{background-color:transparent;border-color:#0275d8}.card-outline-secondary{background-color:transparent;border-color:#ccc}.card-outline-info{background-color:transparent;border-color:#5bc0de}.card-outline-success{background-color:transparent;border-color:#5cb85c}.card-outline-warning{background-color:transparent;border-color:#f0ad4e}.card-outline-danger{background-color:transparent;border-color:#d9534f}.card-inverse{color:rgba(255,255,255,.65)}.card-inverse .card-footer,.card-inverse .card-header{background-color:transparent;border-color:rgba(255,255,255,.2)}.card-inverse .card-blockquote,.card-inverse .card-footer,.card-inverse .card-header,.card-inverse .card-title{color:#fff}.card-inverse .card-blockquote .blockquote-footer,.card-inverse .card-link,.card-inverse .card-subtitle,.card-inverse .card-text{color:rgba(255,255,255,.65)}.card-inverse .card-link:focus,.card-inverse .card-link:hover{color:#fff}.card-blockquote{padding:0;margin-bottom:0;border-left:0}.card-img{border-radius:calc(.25rem - 1px)}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem}.card-img-top{border-top-right-radius:calc(.25rem - 1px);border-top-left-radius:calc(.25rem - 1px)}.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}@media (min-width:576px){.card-deck{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}.card-deck .card{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1 0 0%;-ms-flex:1 0 0%;flex:1 0 0%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.card-deck .card:not(:first-child){margin-left:15px}.card-deck .card:not(:last-child){margin-right:15px}}@media (min-width:576px){.card-group{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group .card{-webkit-box-flex:1;-webkit-flex:1 0 0%;-ms-flex:1 0 0%;flex:1 0 0%}.card-group .card+.card{margin-left:0;border-left:0}.card-group .card:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.card-group .card:first-child .card-img-top{border-top-right-radius:0}.card-group .card:first-child .card-img-bottom{border-bottom-right-radius:0}.card-group .card:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.card-group .card:last-child .card-img-top{border-top-left-radius:0}.card-group .card:last-child .card-img-bottom{border-bottom-left-radius:0}.card-group .card:not(:first-child):not(:last-child){border-radius:0}.card-group .card:not(:first-child):not(:last-child) .card-img-bottom,.card-group .card:not(:first-child):not(:last-child) .card-img-top{border-radius:0}}@media (min-width:576px){.card-columns{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:1.25rem;-moz-column-gap:1.25rem;column-gap:1.25rem}.card-columns .card{display:inline-block;width:100%;margin-bottom:.75rem}}.breadcrumb{padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#eceeef;border-radius:.25rem}.breadcrumb::after{display:block;content:"";clear:both}.breadcrumb-item{float:left}.breadcrumb-item+.breadcrumb-item::before{display:inline-block;padding-right:.5rem;padding-left:.5rem;color:#636c72;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#636c72}.pagination{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-item:first-child .page-link{margin-left:0;border-bottom-left-radius:.25rem;border-top-left-radius:.25rem}.page-item:last-child .page-link{border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}.page-item.active .page-link{z-index:2;color:#fff;background-color:#0275d8;border-color:#0275d8}.page-item.disabled .page-link{color:#636c72;pointer-events:none;cursor:not-allowed;background-color:#fff;border-color:#ddd}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#0275d8;background-color:#fff;border:1px solid #ddd}.page-link:focus,.page-link:hover{color:#014c8c;text-decoration:none;background-color:#eceeef;border-color:#ddd}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem}.pagination-lg .page-item:first-child .page-link{border-bottom-left-radius:.3rem;border-top-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-bottom-right-radius:.3rem;border-top-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem}.pagination-sm .page-item:first-child .page-link{border-bottom-left-radius:.2rem;border-top-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-bottom-right-radius:.2rem;border-top-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-default{background-color:#636c72}.badge-default[href]:focus,.badge-default[href]:hover{background-color:#4b5257}.badge-primary{background-color:#0275d8}.badge-primary[href]:focus,.badge-primary[href]:hover{background-color:#025aa5}.badge-success{background-color:#5cb85c}.badge-success[href]:focus,.badge-success[href]:hover{background-color:#449d44}.badge-info{background-color:#5bc0de}.badge-info[href]:focus,.badge-info[href]:hover{background-color:#31b0d5}.badge-warning{background-color:#f0ad4e}.badge-warning[href]:focus,.badge-warning[href]:hover{background-color:#ec971f}.badge-danger{background-color:#d9534f}.badge-danger[href]:focus,.badge-danger[href]:hover{background-color:#c9302c}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#eceeef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-hr{border-top-color:#d0d5d8}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible .close{position:relative;top:-.75rem;right:-1.25rem;padding:.75rem 1.25rem;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d0e9c6;color:#3c763d}.alert-success hr{border-top-color:#c1e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bcdff1;color:#31708f}.alert-info hr{border-top-color:#a6d5ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faf2cc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7ecb5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebcccc;color:#a94442}.alert-danger hr{border-top-color:#e4b9b9}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden;font-size:.75rem;line-height:1rem;text-align:center;background-color:#eceeef;border-radius:.25rem}.progress-bar{height:1rem;color:#fff;background-color:#0275d8}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:1rem 1rem;background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:progress-bar-stripes 1s linear infinite;-o-animation:progress-bar-stripes 1s linear infinite;animation:progress-bar-stripes 1s linear infinite}.media{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.media-body{-webkit-box-flex:1;-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%}.list-group{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0}.list-group-item-action{width:100%;color:#464a4c;text-align:inherit}.list-group-item-action .list-group-item-heading{color:#292b2c}.list-group-item-action:focus,.list-group-item-action:hover{color:#464a4c;text-decoration:none;background-color:#f7f7f9}.list-group-item-action:active{color:#292b2c;background-color:#eceeef}.list-group-item{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding:.75rem 1.25rem;margin-bottom:-1px;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-right-radius:.25rem;border-top-left-radius:.25rem}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.list-group-item:focus,.list-group-item:hover{text-decoration:none}.list-group-item.disabled,.list-group-item:disabled{color:#636c72;cursor:not-allowed;background-color:#fff}.list-group-item.disabled .list-group-item-heading,.list-group-item:disabled .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item:disabled .list-group-item-text{color:#636c72}.list-group-item.active{z-index:2;color:#fff;background-color:#0275d8;border-color:#0275d8}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text{color:#daeeff}.list-group-flush .list-group-item{border-right:0;border-left:0;border-radius:0}.list-group-flush:first-child .list-group-item:first-child{border-top:0}.list-group-flush:last-child .list-group-item:last-child{border-bottom:0}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,button.list-group-item-success.active{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,button.list-group-item-info.active{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,button.list-group-item-warning.active{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,button.list-group-item-danger.active{color:#fff;background-color:#a94442;border-color:#a94442}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.857143%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.75}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out,-o-transform .3s ease-out;-webkit-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.show .modal-dialog{-webkit-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:15px;border-bottom:1px solid #eceeef}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;padding:15px}.modal-footer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;padding:15px;border-top:1px solid #eceeef}.modal-footer>:not(:first-child){margin-left:.25rem}.modal-footer>:not(:last-child){margin-right:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:30px auto}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg{max-width:800px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip.bs-tether-element-attached-bottom,.tooltip.tooltip-top{padding:5px 0;margin-top:-3px}.tooltip.bs-tether-element-attached-bottom .tooltip-inner::before,.tooltip.tooltip-top .tooltip-inner::before{bottom:0;left:50%;margin-left:-5px;content:"";border-width:5px 5px 0;border-top-color:#000}.tooltip.bs-tether-element-attached-left,.tooltip.tooltip-right{padding:0 5px;margin-left:3px}.tooltip.bs-tether-element-attached-left .tooltip-inner::before,.tooltip.tooltip-right .tooltip-inner::before{top:50%;left:0;margin-top:-5px;content:"";border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.bs-tether-element-attached-top,.tooltip.tooltip-bottom{padding:5px 0;margin-top:3px}.tooltip.bs-tether-element-attached-top .tooltip-inner::before,.tooltip.tooltip-bottom .tooltip-inner::before{top:0;left:50%;margin-left:-5px;content:"";border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bs-tether-element-attached-right,.tooltip.tooltip-left{padding:0 5px;margin-left:-3px}.tooltip.bs-tether-element-attached-right .tooltip-inner::before,.tooltip.tooltip-left .tooltip-inner::before{top:50%;right:0;margin-top:-5px;content:"";border-width:5px 0 5px 5px;border-left-color:#000}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.tooltip-inner::before{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;padding:1px;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;font-size:.875rem;word-wrap:break-word;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover.bs-tether-element-attached-bottom,.popover.popover-top{margin-top:-10px}.popover.bs-tether-element-attached-bottom::after,.popover.bs-tether-element-attached-bottom::before,.popover.popover-top::after,.popover.popover-top::before{left:50%;border-bottom-width:0}.popover.bs-tether-element-attached-bottom::before,.popover.popover-top::before{bottom:-11px;margin-left:-11px;border-top-color:rgba(0,0,0,.25)}.popover.bs-tether-element-attached-bottom::after,.popover.popover-top::after{bottom:-10px;margin-left:-10px;border-top-color:#fff}.popover.bs-tether-element-attached-left,.popover.popover-right{margin-left:10px}.popover.bs-tether-element-attached-left::after,.popover.bs-tether-element-attached-left::before,.popover.popover-right::after,.popover.popover-right::before{top:50%;border-left-width:0}.popover.bs-tether-element-attached-left::before,.popover.popover-right::before{left:-11px;margin-top:-11px;border-right-color:rgba(0,0,0,.25)}.popover.bs-tether-element-attached-left::after,.popover.popover-right::after{left:-10px;margin-top:-10px;border-right-color:#fff}.popover.bs-tether-element-attached-top,.popover.popover-bottom{margin-top:10px}.popover.bs-tether-element-attached-top::after,.popover.bs-tether-element-attached-top::before,.popover.popover-bottom::after,.popover.popover-bottom::before{left:50%;border-top-width:0}.popover.bs-tether-element-attached-top::before,.popover.popover-bottom::before{top:-11px;margin-left:-11px;border-bottom-color:rgba(0,0,0,.25)}.popover.bs-tether-element-attached-top::after,.popover.popover-bottom::after{top:-10px;margin-left:-10px;border-bottom-color:#f7f7f7}.popover.bs-tether-element-attached-top .popover-title::before,.popover.popover-bottom .popover-title::before{position:absolute;top:0;left:50%;display:block;width:20px;margin-left:-10px;content:"";border-bottom:1px solid #f7f7f7}.popover.bs-tether-element-attached-right,.popover.popover-left{margin-left:-10px}.popover.bs-tether-element-attached-right::after,.popover.bs-tether-element-attached-right::before,.popover.popover-left::after,.popover.popover-left::before{top:50%;border-right-width:0}.popover.bs-tether-element-attached-right::before,.popover.popover-left::before{right:-11px;margin-top:-11px;border-left-color:rgba(0,0,0,.25)}.popover.bs-tether-element-attached-right::after,.popover.popover-left::after{right:-10px;margin-top:-10px;border-left-color:#fff}.popover-title{padding:8px 14px;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-right-radius:calc(.3rem - 1px);border-top-left-radius:calc(.3rem - 1px)}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover::after,.popover::before{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover::before{content:"";border-width:11px}.popover::after{content:"";border-width:10px}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-item{position:relative;display:none;width:100%}@media (-webkit-transform-3d){.carousel-item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;transition:transform .6s ease-in-out,-webkit-transform .6s ease-in-out,-o-transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}}@supports ((-webkit-transform:translate3d(0,0,0)) or (transform:translate3d(0,0,0))){.carousel-item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;transition:transform .6s ease-in-out,-webkit-transform .6s ease-in-out,-o-transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.carousel-item-next,.carousel-item-prev{position:absolute;top:0}@media (-webkit-transform-3d){.carousel-item-next.carousel-item-left,.carousel-item-prev.carousel-item-right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.active.carousel-item-right,.carousel-item-next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.active.carousel-item-left,.carousel-item-prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@supports ((-webkit-transform:translate3d(0,0,0)) or (transform:translate3d(0,0,0))){.carousel-item-next.carousel-item-left,.carousel-item-prev.carousel-item-right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.active.carousel-item-right,.carousel-item-next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.active.carousel-item-left,.carousel-item-prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:transparent no-repeat center center;-webkit-background-size:100% 100%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M4 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E")}.carousel-control-next-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M1.5 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E")}.carousel-indicators{position:absolute;right:0;bottom:10px;left:0;z-index:15;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{position:relative;-webkit-box-flex:1;-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;max-width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:rgba(255,255,255,.5)}.carousel-indicators li::before{position:absolute;top:-10px;left:0;display:inline-block;width:100%;height:10px;content:""}.carousel-indicators li::after{position:absolute;bottom:-10px;left:0;display:inline-block;width:100%;height:10px;content:""}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-faded{background-color:#f7f7f7}.bg-primary{background-color:#0275d8!important}a.bg-primary:focus,a.bg-primary:hover{background-color:#025aa5!important}.bg-success{background-color:#5cb85c!important}a.bg-success:focus,a.bg-success:hover{background-color:#449d44!important}.bg-info{background-color:#5bc0de!important}a.bg-info:focus,a.bg-info:hover{background-color:#31b0d5!important}.bg-warning{background-color:#f0ad4e!important}a.bg-warning:focus,a.bg-warning:hover{background-color:#ec971f!important}.bg-danger{background-color:#d9534f!important}a.bg-danger:focus,a.bg-danger:hover{background-color:#c9302c!important}.bg-inverse{background-color:#292b2c!important}a.bg-inverse:focus,a.bg-inverse:hover{background-color:#101112!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.rounded{border-radius:.25rem}.rounded-top{border-top-right-radius:.25rem;border-top-left-radius:.25rem}.rounded-right{border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}.rounded-bottom{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-left{border-bottom-left-radius:.25rem;border-top-left-radius:.25rem}.rounded-circle{border-radius:50%}.rounded-0{border-radius:0}.clearfix::after{display:block;content:"";clear:both}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-cell{display:table-cell!important}.d-flex{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important}.d-inline-flex{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-ms-inline-flexbox!important;display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important}.d-sm-inline-flex{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important}.d-md-inline-flex{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important}.d-lg-inline-flex{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important}.d-xl-inline-flex{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}.flex-first{-webkit-box-ordinal-group:0;-webkit-order:-1;-ms-flex-order:-1;order:-1}.flex-last{-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}.flex-unordered{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0}.flex-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-webkit-flex-direction:row!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:row-reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:column-reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-wrap{-webkit-flex-wrap:wrap!important;-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-nowrap{-webkit-flex-wrap:nowrap!important;-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-wrap-reverse{-webkit-flex-wrap:wrap-reverse!important;-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-start{-webkit-box-pack:start!important;-webkit-justify-content:flex-start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-end{-webkit-box-pack:end!important;-webkit-justify-content:flex-end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-center{-webkit-box-pack:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-webkit-box-pack:justify!important;-webkit-justify-content:space-between!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-webkit-justify-content:space-around!important;-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-start{-webkit-box-align:start!important;-webkit-align-items:flex-start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-end{-webkit-box-align:end!important;-webkit-align-items:flex-end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-center{-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-baseline{-webkit-box-align:baseline!important;-webkit-align-items:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-stretch{-webkit-box-align:stretch!important;-webkit-align-items:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-start{-webkit-align-content:flex-start!important;-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-end{-webkit-align-content:flex-end!important;-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-center{-webkit-align-content:center!important;-ms-flex-line-pack:center!important;align-content:center!important}.align-content-between{-webkit-align-content:space-between!important;-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-around{-webkit-align-content:space-around!important;-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-stretch{-webkit-align-content:stretch!important;-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-auto{-webkit-align-self:auto!important;-ms-flex-item-align:auto!important;-ms-grid-row-align:auto!important;align-self:auto!important}.align-self-start{-webkit-align-self:flex-start!important;-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-end{-webkit-align-self:flex-end!important;-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-center{-webkit-align-self:center!important;-ms-flex-item-align:center!important;-ms-grid-row-align:center!important;align-self:center!important}.align-self-baseline{-webkit-align-self:baseline!important;-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-stretch{-webkit-align-self:stretch!important;-ms-flex-item-align:stretch!important;-ms-grid-row-align:stretch!important;align-self:stretch!important}@media (min-width:576px){.flex-sm-first{-webkit-box-ordinal-group:0;-webkit-order:-1;-ms-flex-order:-1;order:-1}.flex-sm-last{-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}.flex-sm-unordered{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0}.flex-sm-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-webkit-flex-direction:row!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-sm-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-sm-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:row-reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-sm-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:column-reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-sm-wrap{-webkit-flex-wrap:wrap!important;-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-sm-nowrap{-webkit-flex-wrap:nowrap!important;-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-sm-wrap-reverse{-webkit-flex-wrap:wrap-reverse!important;-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-sm-start{-webkit-box-pack:start!important;-webkit-justify-content:flex-start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-sm-end{-webkit-box-pack:end!important;-webkit-justify-content:flex-end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-sm-center{-webkit-box-pack:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-sm-between{-webkit-box-pack:justify!important;-webkit-justify-content:space-between!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-sm-around{-webkit-justify-content:space-around!important;-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-sm-start{-webkit-box-align:start!important;-webkit-align-items:flex-start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-sm-end{-webkit-box-align:end!important;-webkit-align-items:flex-end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-sm-center{-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-sm-baseline{-webkit-box-align:baseline!important;-webkit-align-items:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-sm-stretch{-webkit-box-align:stretch!important;-webkit-align-items:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-sm-start{-webkit-align-content:flex-start!important;-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-sm-end{-webkit-align-content:flex-end!important;-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-sm-center{-webkit-align-content:center!important;-ms-flex-line-pack:center!important;align-content:center!important}.align-content-sm-between{-webkit-align-content:space-between!important;-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-sm-around{-webkit-align-content:space-around!important;-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-sm-stretch{-webkit-align-content:stretch!important;-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-sm-auto{-webkit-align-self:auto!important;-ms-flex-item-align:auto!important;-ms-grid-row-align:auto!important;align-self:auto!important}.align-self-sm-start{-webkit-align-self:flex-start!important;-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-sm-end{-webkit-align-self:flex-end!important;-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-sm-center{-webkit-align-self:center!important;-ms-flex-item-align:center!important;-ms-grid-row-align:center!important;align-self:center!important}.align-self-sm-baseline{-webkit-align-self:baseline!important;-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-sm-stretch{-webkit-align-self:stretch!important;-ms-flex-item-align:stretch!important;-ms-grid-row-align:stretch!important;align-self:stretch!important}}@media (min-width:768px){.flex-md-first{-webkit-box-ordinal-group:0;-webkit-order:-1;-ms-flex-order:-1;order:-1}.flex-md-last{-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}.flex-md-unordered{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0}.flex-md-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-webkit-flex-direction:row!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-md-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-md-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:row-reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-md-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:column-reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-md-wrap{-webkit-flex-wrap:wrap!important;-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-md-nowrap{-webkit-flex-wrap:nowrap!important;-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-md-wrap-reverse{-webkit-flex-wrap:wrap-reverse!important;-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-md-start{-webkit-box-pack:start!important;-webkit-justify-content:flex-start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-md-end{-webkit-box-pack:end!important;-webkit-justify-content:flex-end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-md-center{-webkit-box-pack:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-md-between{-webkit-box-pack:justify!important;-webkit-justify-content:space-between!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-md-around{-webkit-justify-content:space-around!important;-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-md-start{-webkit-box-align:start!important;-webkit-align-items:flex-start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-md-end{-webkit-box-align:end!important;-webkit-align-items:flex-end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-md-center{-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-md-baseline{-webkit-box-align:baseline!important;-webkit-align-items:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-md-stretch{-webkit-box-align:stretch!important;-webkit-align-items:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-md-start{-webkit-align-content:flex-start!important;-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-md-end{-webkit-align-content:flex-end!important;-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-md-center{-webkit-align-content:center!important;-ms-flex-line-pack:center!important;align-content:center!important}.align-content-md-between{-webkit-align-content:space-between!important;-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-md-around{-webkit-align-content:space-around!important;-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-md-stretch{-webkit-align-content:stretch!important;-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-md-auto{-webkit-align-self:auto!important;-ms-flex-item-align:auto!important;-ms-grid-row-align:auto!important;align-self:auto!important}.align-self-md-start{-webkit-align-self:flex-start!important;-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-md-end{-webkit-align-self:flex-end!important;-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-md-center{-webkit-align-self:center!important;-ms-flex-item-align:center!important;-ms-grid-row-align:center!important;align-self:center!important}.align-self-md-baseline{-webkit-align-self:baseline!important;-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-md-stretch{-webkit-align-self:stretch!important;-ms-flex-item-align:stretch!important;-ms-grid-row-align:stretch!important;align-self:stretch!important}}@media (min-width:992px){.flex-lg-first{-webkit-box-ordinal-group:0;-webkit-order:-1;-ms-flex-order:-1;order:-1}.flex-lg-last{-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}.flex-lg-unordered{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0}.flex-lg-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-webkit-flex-direction:row!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-lg-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-lg-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:row-reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-lg-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:column-reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-lg-wrap{-webkit-flex-wrap:wrap!important;-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-lg-nowrap{-webkit-flex-wrap:nowrap!important;-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-lg-wrap-reverse{-webkit-flex-wrap:wrap-reverse!important;-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-lg-start{-webkit-box-pack:start!important;-webkit-justify-content:flex-start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-lg-end{-webkit-box-pack:end!important;-webkit-justify-content:flex-end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-lg-center{-webkit-box-pack:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-lg-between{-webkit-box-pack:justify!important;-webkit-justify-content:space-between!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-lg-around{-webkit-justify-content:space-around!important;-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-lg-start{-webkit-box-align:start!important;-webkit-align-items:flex-start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-lg-end{-webkit-box-align:end!important;-webkit-align-items:flex-end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-lg-center{-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-lg-baseline{-webkit-box-align:baseline!important;-webkit-align-items:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-lg-stretch{-webkit-box-align:stretch!important;-webkit-align-items:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-lg-start{-webkit-align-content:flex-start!important;-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-lg-end{-webkit-align-content:flex-end!important;-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-lg-center{-webkit-align-content:center!important;-ms-flex-line-pack:center!important;align-content:center!important}.align-content-lg-between{-webkit-align-content:space-between!important;-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-lg-around{-webkit-align-content:space-around!important;-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-lg-stretch{-webkit-align-content:stretch!important;-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-lg-auto{-webkit-align-self:auto!important;-ms-flex-item-align:auto!important;-ms-grid-row-align:auto!important;align-self:auto!important}.align-self-lg-start{-webkit-align-self:flex-start!important;-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-lg-end{-webkit-align-self:flex-end!important;-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-lg-center{-webkit-align-self:center!important;-ms-flex-item-align:center!important;-ms-grid-row-align:center!important;align-self:center!important}.align-self-lg-baseline{-webkit-align-self:baseline!important;-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-lg-stretch{-webkit-align-self:stretch!important;-ms-flex-item-align:stretch!important;-ms-grid-row-align:stretch!important;align-self:stretch!important}}@media (min-width:1200px){.flex-xl-first{-webkit-box-ordinal-group:0;-webkit-order:-1;-ms-flex-order:-1;order:-1}.flex-xl-last{-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}.flex-xl-unordered{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0}.flex-xl-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-webkit-flex-direction:row!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-xl-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-xl-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:row-reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xl-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:column-reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xl-wrap{-webkit-flex-wrap:wrap!important;-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xl-nowrap{-webkit-flex-wrap:nowrap!important;-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xl-wrap-reverse{-webkit-flex-wrap:wrap-reverse!important;-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-xl-start{-webkit-box-pack:start!important;-webkit-justify-content:flex-start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xl-end{-webkit-box-pack:end!important;-webkit-justify-content:flex-end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xl-center{-webkit-box-pack:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xl-between{-webkit-box-pack:justify!important;-webkit-justify-content:space-between!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xl-around{-webkit-justify-content:space-around!important;-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-xl-start{-webkit-box-align:start!important;-webkit-align-items:flex-start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xl-end{-webkit-box-align:end!important;-webkit-align-items:flex-end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xl-center{-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-xl-baseline{-webkit-box-align:baseline!important;-webkit-align-items:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xl-stretch{-webkit-box-align:stretch!important;-webkit-align-items:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xl-start{-webkit-align-content:flex-start!important;-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xl-end{-webkit-align-content:flex-end!important;-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xl-center{-webkit-align-content:center!important;-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xl-between{-webkit-align-content:space-between!important;-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xl-around{-webkit-align-content:space-around!important;-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xl-stretch{-webkit-align-content:stretch!important;-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xl-auto{-webkit-align-self:auto!important;-ms-flex-item-align:auto!important;-ms-grid-row-align:auto!important;align-self:auto!important}.align-self-xl-start{-webkit-align-self:flex-start!important;-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xl-end{-webkit-align-self:flex-end!important;-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xl-center{-webkit-align-self:center!important;-ms-flex-item-align:center!important;-ms-grid-row-align:center!important;align-self:center!important}.align-self-xl-baseline{-webkit-align-self:baseline!important;-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xl-stretch{-webkit-align-self:stretch!important;-ms-flex-item-align:stretch!important;-ms-grid-row-align:stretch!important;align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1030}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.m-0{margin:0 0!important}.mt-0{margin-top:0!important}.mr-0{margin-right:0!important}.mb-0{margin-bottom:0!important}.ml-0{margin-left:0!important}.mx-0{margin-right:0!important;margin-left:0!important}.my-0{margin-top:0!important;margin-bottom:0!important}.m-1{margin:.25rem .25rem!important}.mt-1{margin-top:.25rem!important}.mr-1{margin-right:.25rem!important}.mb-1{margin-bottom:.25rem!important}.ml-1{margin-left:.25rem!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.m-2{margin:.5rem .5rem!important}.mt-2{margin-top:.5rem!important}.mr-2{margin-right:.5rem!important}.mb-2{margin-bottom:.5rem!important}.ml-2{margin-left:.5rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.m-3{margin:1rem 1rem!important}.mt-3{margin-top:1rem!important}.mr-3{margin-right:1rem!important}.mb-3{margin-bottom:1rem!important}.ml-3{margin-left:1rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.m-4{margin:1.5rem 1.5rem!important}.mt-4{margin-top:1.5rem!important}.mr-4{margin-right:1.5rem!important}.mb-4{margin-bottom:1.5rem!important}.ml-4{margin-left:1.5rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.m-5{margin:3rem 3rem!important}.mt-5{margin-top:3rem!important}.mr-5{margin-right:3rem!important}.mb-5{margin-bottom:3rem!important}.ml-5{margin-left:3rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.p-0{padding:0 0!important}.pt-0{padding-top:0!important}.pr-0{padding-right:0!important}.pb-0{padding-bottom:0!important}.pl-0{padding-left:0!important}.px-0{padding-right:0!important;padding-left:0!important}.py-0{padding-top:0!important;padding-bottom:0!important}.p-1{padding:.25rem .25rem!important}.pt-1{padding-top:.25rem!important}.pr-1{padding-right:.25rem!important}.pb-1{padding-bottom:.25rem!important}.pl-1{padding-left:.25rem!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.p-2{padding:.5rem .5rem!important}.pt-2{padding-top:.5rem!important}.pr-2{padding-right:.5rem!important}.pb-2{padding-bottom:.5rem!important}.pl-2{padding-left:.5rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.p-3{padding:1rem 1rem!important}.pt-3{padding-top:1rem!important}.pr-3{padding-right:1rem!important}.pb-3{padding-bottom:1rem!important}.pl-3{padding-left:1rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.p-4{padding:1.5rem 1.5rem!important}.pt-4{padding-top:1.5rem!important}.pr-4{padding-right:1.5rem!important}.pb-4{padding-bottom:1.5rem!important}.pl-4{padding-left:1.5rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.p-5{padding:3rem 3rem!important}.pt-5{padding-top:3rem!important}.pr-5{padding-right:3rem!important}.pb-5{padding-bottom:3rem!important}.pl-5{padding-left:3rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.m-auto{margin:auto!important}.mt-auto{margin-top:auto!important}.mr-auto{margin-right:auto!important}.mb-auto{margin-bottom:auto!important}.ml-auto{margin-left:auto!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}@media (min-width:576px){.m-sm-0{margin:0 0!important}.mt-sm-0{margin-top:0!important}.mr-sm-0{margin-right:0!important}.mb-sm-0{margin-bottom:0!important}.ml-sm-0{margin-left:0!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.m-sm-1{margin:.25rem .25rem!important}.mt-sm-1{margin-top:.25rem!important}.mr-sm-1{margin-right:.25rem!important}.mb-sm-1{margin-bottom:.25rem!important}.ml-sm-1{margin-left:.25rem!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.m-sm-2{margin:.5rem .5rem!important}.mt-sm-2{margin-top:.5rem!important}.mr-sm-2{margin-right:.5rem!important}.mb-sm-2{margin-bottom:.5rem!important}.ml-sm-2{margin-left:.5rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.m-sm-3{margin:1rem 1rem!important}.mt-sm-3{margin-top:1rem!important}.mr-sm-3{margin-right:1rem!important}.mb-sm-3{margin-bottom:1rem!important}.ml-sm-3{margin-left:1rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.m-sm-4{margin:1.5rem 1.5rem!important}.mt-sm-4{margin-top:1.5rem!important}.mr-sm-4{margin-right:1.5rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.ml-sm-4{margin-left:1.5rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.m-sm-5{margin:3rem 3rem!important}.mt-sm-5{margin-top:3rem!important}.mr-sm-5{margin-right:3rem!important}.mb-sm-5{margin-bottom:3rem!important}.ml-sm-5{margin-left:3rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.p-sm-0{padding:0 0!important}.pt-sm-0{padding-top:0!important}.pr-sm-0{padding-right:0!important}.pb-sm-0{padding-bottom:0!important}.pl-sm-0{padding-left:0!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.p-sm-1{padding:.25rem .25rem!important}.pt-sm-1{padding-top:.25rem!important}.pr-sm-1{padding-right:.25rem!important}.pb-sm-1{padding-bottom:.25rem!important}.pl-sm-1{padding-left:.25rem!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.p-sm-2{padding:.5rem .5rem!important}.pt-sm-2{padding-top:.5rem!important}.pr-sm-2{padding-right:.5rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pl-sm-2{padding-left:.5rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.p-sm-3{padding:1rem 1rem!important}.pt-sm-3{padding-top:1rem!important}.pr-sm-3{padding-right:1rem!important}.pb-sm-3{padding-bottom:1rem!important}.pl-sm-3{padding-left:1rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.p-sm-4{padding:1.5rem 1.5rem!important}.pt-sm-4{padding-top:1.5rem!important}.pr-sm-4{padding-right:1.5rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pl-sm-4{padding-left:1.5rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.p-sm-5{padding:3rem 3rem!important}.pt-sm-5{padding-top:3rem!important}.pr-sm-5{padding-right:3rem!important}.pb-sm-5{padding-bottom:3rem!important}.pl-sm-5{padding-left:3rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto{margin-top:auto!important}.mr-sm-auto{margin-right:auto!important}.mb-sm-auto{margin-bottom:auto!important}.ml-sm-auto{margin-left:auto!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}}@media (min-width:768px){.m-md-0{margin:0 0!important}.mt-md-0{margin-top:0!important}.mr-md-0{margin-right:0!important}.mb-md-0{margin-bottom:0!important}.ml-md-0{margin-left:0!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.m-md-1{margin:.25rem .25rem!important}.mt-md-1{margin-top:.25rem!important}.mr-md-1{margin-right:.25rem!important}.mb-md-1{margin-bottom:.25rem!important}.ml-md-1{margin-left:.25rem!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.m-md-2{margin:.5rem .5rem!important}.mt-md-2{margin-top:.5rem!important}.mr-md-2{margin-right:.5rem!important}.mb-md-2{margin-bottom:.5rem!important}.ml-md-2{margin-left:.5rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.m-md-3{margin:1rem 1rem!important}.mt-md-3{margin-top:1rem!important}.mr-md-3{margin-right:1rem!important}.mb-md-3{margin-bottom:1rem!important}.ml-md-3{margin-left:1rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.m-md-4{margin:1.5rem 1.5rem!important}.mt-md-4{margin-top:1.5rem!important}.mr-md-4{margin-right:1.5rem!important}.mb-md-4{margin-bottom:1.5rem!important}.ml-md-4{margin-left:1.5rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.m-md-5{margin:3rem 3rem!important}.mt-md-5{margin-top:3rem!important}.mr-md-5{margin-right:3rem!important}.mb-md-5{margin-bottom:3rem!important}.ml-md-5{margin-left:3rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.p-md-0{padding:0 0!important}.pt-md-0{padding-top:0!important}.pr-md-0{padding-right:0!important}.pb-md-0{padding-bottom:0!important}.pl-md-0{padding-left:0!important}.px-md-0{padding-right:0!important;padding-left:0!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.p-md-1{padding:.25rem .25rem!important}.pt-md-1{padding-top:.25rem!important}.pr-md-1{padding-right:.25rem!important}.pb-md-1{padding-bottom:.25rem!important}.pl-md-1{padding-left:.25rem!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.p-md-2{padding:.5rem .5rem!important}.pt-md-2{padding-top:.5rem!important}.pr-md-2{padding-right:.5rem!important}.pb-md-2{padding-bottom:.5rem!important}.pl-md-2{padding-left:.5rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.p-md-3{padding:1rem 1rem!important}.pt-md-3{padding-top:1rem!important}.pr-md-3{padding-right:1rem!important}.pb-md-3{padding-bottom:1rem!important}.pl-md-3{padding-left:1rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.p-md-4{padding:1.5rem 1.5rem!important}.pt-md-4{padding-top:1.5rem!important}.pr-md-4{padding-right:1.5rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pl-md-4{padding-left:1.5rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.p-md-5{padding:3rem 3rem!important}.pt-md-5{padding-top:3rem!important}.pr-md-5{padding-right:3rem!important}.pb-md-5{padding-bottom:3rem!important}.pl-md-5{padding-left:3rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto{margin-top:auto!important}.mr-md-auto{margin-right:auto!important}.mb-md-auto{margin-bottom:auto!important}.ml-md-auto{margin-left:auto!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}}@media (min-width:992px){.m-lg-0{margin:0 0!important}.mt-lg-0{margin-top:0!important}.mr-lg-0{margin-right:0!important}.mb-lg-0{margin-bottom:0!important}.ml-lg-0{margin-left:0!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.m-lg-1{margin:.25rem .25rem!important}.mt-lg-1{margin-top:.25rem!important}.mr-lg-1{margin-right:.25rem!important}.mb-lg-1{margin-bottom:.25rem!important}.ml-lg-1{margin-left:.25rem!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.m-lg-2{margin:.5rem .5rem!important}.mt-lg-2{margin-top:.5rem!important}.mr-lg-2{margin-right:.5rem!important}.mb-lg-2{margin-bottom:.5rem!important}.ml-lg-2{margin-left:.5rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.m-lg-3{margin:1rem 1rem!important}.mt-lg-3{margin-top:1rem!important}.mr-lg-3{margin-right:1rem!important}.mb-lg-3{margin-bottom:1rem!important}.ml-lg-3{margin-left:1rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.m-lg-4{margin:1.5rem 1.5rem!important}.mt-lg-4{margin-top:1.5rem!important}.mr-lg-4{margin-right:1.5rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.ml-lg-4{margin-left:1.5rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.m-lg-5{margin:3rem 3rem!important}.mt-lg-5{margin-top:3rem!important}.mr-lg-5{margin-right:3rem!important}.mb-lg-5{margin-bottom:3rem!important}.ml-lg-5{margin-left:3rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.p-lg-0{padding:0 0!important}.pt-lg-0{padding-top:0!important}.pr-lg-0{padding-right:0!important}.pb-lg-0{padding-bottom:0!important}.pl-lg-0{padding-left:0!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.p-lg-1{padding:.25rem .25rem!important}.pt-lg-1{padding-top:.25rem!important}.pr-lg-1{padding-right:.25rem!important}.pb-lg-1{padding-bottom:.25rem!important}.pl-lg-1{padding-left:.25rem!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.p-lg-2{padding:.5rem .5rem!important}.pt-lg-2{padding-top:.5rem!important}.pr-lg-2{padding-right:.5rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pl-lg-2{padding-left:.5rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.p-lg-3{padding:1rem 1rem!important}.pt-lg-3{padding-top:1rem!important}.pr-lg-3{padding-right:1rem!important}.pb-lg-3{padding-bottom:1rem!important}.pl-lg-3{padding-left:1rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.p-lg-4{padding:1.5rem 1.5rem!important}.pt-lg-4{padding-top:1.5rem!important}.pr-lg-4{padding-right:1.5rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pl-lg-4{padding-left:1.5rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.p-lg-5{padding:3rem 3rem!important}.pt-lg-5{padding-top:3rem!important}.pr-lg-5{padding-right:3rem!important}.pb-lg-5{padding-bottom:3rem!important}.pl-lg-5{padding-left:3rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto{margin-top:auto!important}.mr-lg-auto{margin-right:auto!important}.mb-lg-auto{margin-bottom:auto!important}.ml-lg-auto{margin-left:auto!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0 0!important}.mt-xl-0{margin-top:0!important}.mr-xl-0{margin-right:0!important}.mb-xl-0{margin-bottom:0!important}.ml-xl-0{margin-left:0!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.m-xl-1{margin:.25rem .25rem!important}.mt-xl-1{margin-top:.25rem!important}.mr-xl-1{margin-right:.25rem!important}.mb-xl-1{margin-bottom:.25rem!important}.ml-xl-1{margin-left:.25rem!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.m-xl-2{margin:.5rem .5rem!important}.mt-xl-2{margin-top:.5rem!important}.mr-xl-2{margin-right:.5rem!important}.mb-xl-2{margin-bottom:.5rem!important}.ml-xl-2{margin-left:.5rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.m-xl-3{margin:1rem 1rem!important}.mt-xl-3{margin-top:1rem!important}.mr-xl-3{margin-right:1rem!important}.mb-xl-3{margin-bottom:1rem!important}.ml-xl-3{margin-left:1rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.m-xl-4{margin:1.5rem 1.5rem!important}.mt-xl-4{margin-top:1.5rem!important}.mr-xl-4{margin-right:1.5rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.ml-xl-4{margin-left:1.5rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.m-xl-5{margin:3rem 3rem!important}.mt-xl-5{margin-top:3rem!important}.mr-xl-5{margin-right:3rem!important}.mb-xl-5{margin-bottom:3rem!important}.ml-xl-5{margin-left:3rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.p-xl-0{padding:0 0!important}.pt-xl-0{padding-top:0!important}.pr-xl-0{padding-right:0!important}.pb-xl-0{padding-bottom:0!important}.pl-xl-0{padding-left:0!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.p-xl-1{padding:.25rem .25rem!important}.pt-xl-1{padding-top:.25rem!important}.pr-xl-1{padding-right:.25rem!important}.pb-xl-1{padding-bottom:.25rem!important}.pl-xl-1{padding-left:.25rem!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.p-xl-2{padding:.5rem .5rem!important}.pt-xl-2{padding-top:.5rem!important}.pr-xl-2{padding-right:.5rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pl-xl-2{padding-left:.5rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.p-xl-3{padding:1rem 1rem!important}.pt-xl-3{padding-top:1rem!important}.pr-xl-3{padding-right:1rem!important}.pb-xl-3{padding-bottom:1rem!important}.pl-xl-3{padding-left:1rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.p-xl-4{padding:1.5rem 1.5rem!important}.pt-xl-4{padding-top:1.5rem!important}.pr-xl-4{padding-right:1.5rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pl-xl-4{padding-left:1.5rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.p-xl-5{padding:3rem 3rem!important}.pt-xl-5{padding-top:3rem!important}.pr-xl-5{padding-right:3rem!important}.pb-xl-5{padding-bottom:3rem!important}.pl-xl-5{padding-left:3rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto{margin-top:auto!important}.mr-xl-auto{margin-right:auto!important}.mb-xl-auto{margin-bottom:auto!important}.ml-xl-auto{margin-left:auto!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}}.text-justify{text-align:justify!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-normal{font-weight:400}.font-weight-bold{font-weight:700}.font-italic{font-style:italic}.text-white{color:#fff!important}.text-muted{color:#636c72!important}a.text-muted:focus,a.text-muted:hover{color:#4b5257!important}.text-primary{color:#0275d8!important}a.text-primary:focus,a.text-primary:hover{color:#025aa5!important}.text-success{color:#5cb85c!important}a.text-success:focus,a.text-success:hover{color:#449d44!important}.text-info{color:#5bc0de!important}a.text-info:focus,a.text-info:hover{color:#31b0d5!important}.text-warning{color:#f0ad4e!important}a.text-warning:focus,a.text-warning:hover{color:#ec971f!important}.text-danger{color:#d9534f!important}a.text-danger:focus,a.text-danger:hover{color:#c9302c!important}.text-gray-dark{color:#292b2c!important}a.text-gray-dark:focus,a.text-gray-dark:hover{color:#101112!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.invisible{visibility:hidden!important}.hidden-xs-up{display:none!important}@media (max-width:575px){.hidden-xs-down{display:none!important}}@media (min-width:576px){.hidden-sm-up{display:none!important}}@media (max-width:767px){.hidden-sm-down{display:none!important}}@media (min-width:768px){.hidden-md-up{display:none!important}}@media (max-width:991px){.hidden-md-down{display:none!important}}@media (min-width:992px){.hidden-lg-up{display:none!important}}@media (max-width:1199px){.hidden-lg-down{display:none!important}}@media (min-width:1200px){.hidden-xl-up{display:none!important}}.hidden-xl-down{display:none!important}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/csunplugged/static/css/bootstrap.min.css.map b/csunplugged/static/css/bootstrap.min.css.map deleted file mode 100644 index 74462f2c3..000000000 --- a/csunplugged/static/css/bootstrap.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../scss/_normalize.scss","bootstrap.css","../../scss/_print.scss","../../scss/_reboot.scss","../../scss/_variables.scss","../../scss/mixins/_hover.scss","../../scss/_type.scss","../../scss/mixins/_lists.scss","../../scss/_images.scss","../../scss/mixins/_image.scss","../../scss/mixins/_border-radius.scss","../../scss/_mixins.scss","../../scss/_code.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/mixins/_breakpoints.scss","../../scss/mixins/_grid-framework.scss","../../scss/_tables.scss","../../scss/mixins/_table-row.scss","../../scss/_forms.scss","../../scss/mixins/_forms.scss","../../scss/_buttons.scss","../../scss/mixins/_buttons.scss","../../scss/_transitions.scss","../../scss/_dropdown.scss","../../scss/mixins/_nav-divider.scss","../../scss/_button-group.scss","../../scss/_input-group.scss","../../scss/_custom-forms.scss","../../scss/_nav.scss","../../scss/_navbar.scss","../../scss/_card.scss","../../scss/mixins/_cards.scss","../../scss/_breadcrumb.scss","../../scss/mixins/_clearfix.scss","../../scss/_pagination.scss","../../scss/mixins/_pagination.scss","../../scss/_badge.scss","../../scss/mixins/_badge.scss","../../scss/_jumbotron.scss","../../scss/_alert.scss","../../scss/mixins/_alert.scss","../../scss/_progress.scss","../../scss/mixins/_gradients.scss","../../scss/_media.scss","../../scss/_list-group.scss","../../scss/mixins/_list-group.scss","../../scss/_responsive-embed.scss","../../scss/_close.scss","../../scss/_modal.scss","../../scss/_tooltip.scss","../../scss/mixins/_reset-text.scss","../../scss/_popover.scss","../../scss/_carousel.scss","../../scss/mixins/_transforms.scss","../../scss/utilities/_align.scss","../../scss/utilities/_background.scss","../../scss/mixins/_background-variant.scss","../../scss/utilities/_borders.scss","../../scss/utilities/_display.scss","../../scss/utilities/_flex.scss","../../scss/utilities/_float.scss","../../scss/mixins/_float.scss","../../scss/utilities/_position.scss","../../scss/utilities/_screenreaders.scss","../../scss/mixins/_screen-reader.scss","../../scss/utilities/_sizing.scss","../../scss/utilities/_spacing.scss","../../scss/utilities/_text.scss","../../scss/mixins/_text-truncate.scss","../../scss/mixins/_text-emphasis.scss","../../scss/mixins/_text-hide.scss","../../scss/utilities/_visibility.scss","../../scss/mixins/_visibility.scss"],"names":[],"mappings":";;;;;4EAYA,KACE,YAAA,WACA,YAAA,KACA,qBAAA,KACA,yBAAA,KAUF,KACE,OAAA,EAOF,QAAA,MAAA,OAAA,OAAA,IAAA,QAME,QAAA,MAQF,GACE,UAAA,IACA,OAAA,MAAA,EAWF,WAAA,OAAA,KAGE,QAAA,MAOF,OACE,OAAA,IAAA,KAQF,GACE,mBAAA,YAAA,WAAA,YACA,OAAA,EACA,SAAA,QAQF,IACE,YAAA,UAAA,UACA,UAAA,IAWF,EACE,iBAAA,YACA,6BAAA,QAQF,SAAA,QAEE,cAAA,EAQF,YACE,cAAA,KACA,gBAAA,UACA,gBAAA,UAAA,OAOF,EAAA,OAEE,YAAA,QAOF,EAAA,OAEE,YAAA,OAQF,KAAA,IAAA,KAGE,YAAA,UAAA,UACA,UAAA,IAOF,IACE,WAAA,OAOF,KACE,iBAAA,KACA,MAAA,KAOF,MACE,UAAA,IAQF,IAAA,IAEE,UAAA,IACA,YAAA,EACA,SAAA,SACA,eAAA,SAGF,IACE,OAAA,OAGF,IACE,IAAA,MAUF,MAAA,MAEE,QAAA,aAOF,sBACE,QAAA,KACA,OAAA,EAOF,IACE,aAAA,KAOF,eACE,SAAA,OAWF,OAAA,MAAA,SAAA,OAAA,SAKE,YAAA,WACA,UAAA,KACA,YAAA,KACA,OAAA,EAQF,OAAA,MAEE,SAAA,QAQF,OAAA,OAEE,eAAA,KASF,aAAA,cAAA,OAAA,mBAIE,mBAAA,OAOF,gCAAA,+BAAA,gCAAA,yBAIE,aAAA,KACA,QAAA,EAOF,6BAAA,4BAAA,6BAAA,sBAIE,QAAA,IAAA,OAAA,WAOF,SACE,OAAA,IAAA,MAAA,OACA,OAAA,EAAA,IACA,QAAA,MAAA,OAAA,MAUF,OACE,mBAAA,WAAA,WAAA,WACA,MAAA,QACA,QAAA,MACA,UAAA,KACA,QAAA,EACA,YAAA,OAQF,SACE,QAAA,aACA,eAAA,SAOF,SACE,SAAA,KC/JF,gBAAA,aDyKE,mBAAA,WAAA,WAAA,WACA,QAAA,ECpKF,yCAAA,yCD6KE,OAAA,KCxKF,cDiLE,mBAAA,UACA,eAAA,KC7KF,4CAAA,yCDsLE,mBAAA,KAQF,6BACE,mBAAA,OACA,KAAA,QAWF,QAAA,KAEE,QAAA,MAOF,QACE,QAAA,UAUF,OACE,QAAA,aAOF,SACE,QAAA,KC7MF,SDwNE,QAAA,KEhcA,aACE,EAAA,QAAA,SAAA,yBAAA,uBAAA,kBAAA,gBAAA,iBAAA,eAAA,gBAAA,cAcE,YAAA,eAEA,mBAAA,eAAA,WAAA,eAGF,EAAA,UAEE,gBAAA,UAQF,mBACE,QAA6B,KAA7B,YAA6B,IAc/B,IACE,YAAA,mBAEF,WAAA,IAEE,OAAA,IAAA,MAAA,KACA,kBAAA,MAQF,MACE,QAAA,mBAGF,IAAA,GAEE,kBAAA,MAGF,GAAA,GAAA,EAGE,QAAA,EACA,OAAA,EAGF,GAAA,GAEE,iBAAA,MAMF,QACE,QAAA,KAEF,OACE,OAAA,IAAA,MAAA,KAGF,OACE,gBAAA,mBADF,UAAA,UAKI,iBAAA,eAGJ,mBAAA,mBAGI,OAAA,IAAA,MAAA,gBC3FR,KACE,mBAAA,WAAA,WAAA,WAGF,EAAA,QAAA,SAGE,mBAAA,QAAA,WAAA,QAoBA,cAAgB,MAAA,aAQlB,KAYE,mBAAA,UAGA,4BAAA,YAGF,KACE,YAAA,cAAA,UAAA,mBAAA,WAAA,OC2K4H,iBD3K5H,MAAA,WACA,UAAA,KACA,YAAA,IACA,YAAA,IAEA,MAAA,QAEA,iBAAA,KFmQF,sBE1PE,QAAA,YAYF,GAAI,GAAI,GAAI,GAAI,GAAI,GAClB,WAAA,EACA,cAAA,MAOF,EACE,WAAA,EACA,cAAA,KAIF,0BAAA,YAGE,OAAA,KAGF,QACE,cAAA,KACA,WAAA,OACA,YAAA,QAGF,GAAA,GAAA,GAGE,WAAA,EACA,cAAA,KAGF,MAAA,MAAA,MAAA,MAIE,cAAA,EAGF,GACE,YAAA,IAGF,GACE,cAAA,MACA,YAAA,EAGF,WACE,OAAA,EAAA,EAAA,KAQF,EACE,MAAA,QACA,gBAAA,KEhJE,QAAA,QFmJA,MAAA,QACA,gBAAA,UAUJ,8BACE,MAAA,QACA,gBAAA,KEhKE,oCAAA,oCFmKA,MAAA,QACA,gBAAA,KANJ,oCAUI,QAAA,EASJ,IAEE,WAAA,EAEA,cAAA,KAEA,SAAA,KAQF,OAGE,OAAA,EAAA,EAAA,KAQF,IAGE,eAAA,OF8MF,cEjME,OAAA,QAcF,cAAA,EAAA,KAAA,OAAA,MAAA,MAAA,OAAA,QAAA,SASE,iBAAA,aAAA,aAAA,aAQF,MAEE,gBAAA,SAEA,iBAAA,YAGF,QACE,YAAA,OACA,eAAA,OACA,MAAA,QACA,WAAA,KACA,aAAA,OAGF,GAEE,WAAA,KAQF,MAEE,QAAA,aACA,cAAA,MAOF,aACE,QAAA,IAAA,OACA,QAAA,IAAA,KAAA,yBAGF,OAAA,MAAA,OAAA,SAME,YAAA,QAGF,8BAAA,2BAMI,OAAA,YAKJ,iBAAA,iBAAA,2BAAA,kBASE,mBAAA,QAGF,SAEE,OAAA,SAGF,SAME,UAAA,EAEA,QAAA,EACA,OAAA,EACA,OAAA,EAGF,OAEE,QAAA,MACA,MAAA,KACA,QAAA,EACA,cAAA,MACA,UAAA,OACA,YAAA,QAGF,mBAKE,mBAAA,KAIF,OACE,QAAA,aF8IF,SEtIE,QAAA,eG/XF,IAAK,IAAK,IAAK,IAAK,IAAK,IAAzB,GAAI,GAAI,GAAI,GAAI,GAAI,GAElB,cAAA,MACA,YAAA,QACA,YAAA,IACA,YAAA,IACA,MAAA,QAGE,IAAJ,GAAU,UAAA,OACN,IAAJ,GAAU,UAAA,KACN,IAAJ,GAAU,UAAA,QACN,IAAJ,GAAU,UAAA,OACN,IAAJ,GAAU,UAAA,QACN,IAAJ,GAAU,UAAA,KAEV,MACE,UAAA,QACA,YAAA,IAIF,WACE,UAAA,KACA,YAAA,IACA,YAAA,IAEF,WACE,UAAA,OACA,YAAA,IACA,YAAA,IAEF,WACE,UAAA,OACA,YAAA,IACA,YAAA,IAEF,WACE,UAAA,OACA,YAAA,IACA,YAAA,IAQF,GACE,WAAA,KACA,cAAA,KACA,OAAA,EACA,WAAA,IAAA,MAAA,eAQF,OAAA,MAEE,UAAA,IACA,YAAA,IAGF,MAAA,KAEE,QAAA,KACA,iBAAA,QAQF,eC7EE,aAAA,EACA,WAAA,KDiFF,aClFE,aAAA,EACA,WAAA,KDoFF,kBACE,QAAA,aADF,mCAII,aAAA,IAUJ,YACE,UAAA,IACA,eAAA,UAIF,YACE,QAAA,MAAA,KACA,cAAA,KACA,UAAA,QACA,YAAA,OAAA,MAAA,QAGF,mBACE,QAAA,MACA,UAAA,IACA,MAAA,QAHF,2BAMI,QAAsB,cAK1B,oBACE,cAAA,KACA,aAAA,EACA,WAAA,MACA,aAAA,OAAA,MAAA,QACA,YAAA,EAGF,+CAEI,QAAW,GAFf,8CAKI,QAAsB,cErI1B,WCIE,UAAA,KAGA,OAAA,KDDF,eACE,QAAA,OACA,iBAAA,KACA,OAAA,IAAA,MAAA,KEZE,cAAA,OCWE,mBAAA,IAAA,IAAA,YAAA,cAAA,IAAA,IAAA,YAAA,WAAA,IAAA,IAAA,YFJJ,UAAA,KAGA,OAAA,KDeF,QAEE,QAAA,aAGF,YACE,cAAA,MACA,YAAA,EAGF,gBACE,UAAA,IACA,MAAA,QIxCF,KAAA,IAAA,IAAA,KAIE,YAAA,MAAA,OAAA,SAAA,kBRmP2F,cQnP3F,UAIF,KACE,QAAA,MAAA,MACA,UAAA,IACA,MAAA,QACA,iBAAA,QFTE,cAAA,OEaF,OACE,QAAA,EACA,MAAA,QACA,iBAAA,QAKJ,IACE,QAAA,MAAA,MACA,UAAA,IACA,MAAA,KACA,iBAAA,QFzBE,cAAA,MEqBJ,QASI,QAAA,EACA,UAAA,KACA,YAAA,IAMJ,IACE,QAAA,MACA,WAAA,EACA,cAAA,KACA,UAAA,IACA,MAAA,QALF,SASI,QAAA,EACA,UAAA,QACA,MAAA,QACA,iBAAA,YACA,cAAA,EAKJ,gBACE,WAAA,MACA,WAAA,OCzDA,WCAA,SAAA,SACA,YAAA,KACA,aAAA,KAKI,cAAA,KACA,aAAA,KC2CF,yBFnDF,WCOI,cAAA,KACA,aAAA,MC2CF,yBFnDF,WCOI,cAAA,KACA,aAAA,MC2CF,yBFnDF,WCOI,cAAA,KACA,aAAA,MC2CF,0BFnDF,WCOI,cAAA,KACA,aAAA,MC2CF,yBFnDF,WCkBI,MAAA,MACA,UAAA,MCgCF,yBFnDF,WCkBI,MAAA,MACA,UAAA,MCgCF,yBFnDF,WCkBI,MAAA,MACA,UAAA,MCgCF,0BFnDF,WCkBI,MAAA,OACA,UAAA,MDPJ,iBCZA,SAAA,SACA,YAAA,KACA,aAAA,KAKI,cAAA,KACA,aAAA,KC2CF,yBFvCF,iBCLI,cAAA,KACA,aAAA,MC2CF,yBFvCF,iBCLI,cAAA,KACA,aAAA,MC2CF,yBFvCF,iBCLI,cAAA,KACA,aAAA,MC2CF,0BFvCF,iBCLI,cAAA,KACA,aAAA,MDcJ,KCaA,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,KAAA,cAAA,KAAA,UAAA,KAKI,aAAA,MACA,YAAA,MCSF,yBF7BF,KCmBI,aAAA,MACA,YAAA,OCSF,yBF7BF,KCmBI,aAAA,MACA,YAAA,OCSF,yBF7BF,KCmBI,aAAA,MACA,YAAA,OCSF,0BF7BF,KCmBI,aAAA,MACA,YAAA,ODdJ,YACE,aAAA,EACA,YAAA,EAFF,iBAAA,0BAMI,cAAA,EACA,aAAA,EGjCJ,KAAA,OAAA,QAAA,QAAA,QAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UACE,SAAA,SACA,MAAA,KACA,WAAA,IFuBE,cAAA,KACA,aAAA,KCsBF,yBCjDF,KAAA,OAAA,QAAA,QAAA,QAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UF0BI,cAAA,KACA,aAAA,MCsBF,yBCjDF,KAAA,OAAA,QAAA,QAAA,QAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UF0BI,cAAA,KACA,aAAA,MCsBF,yBCjDF,KAAA,OAAA,QAAA,QAAA,QAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UF0BI,cAAA,KACA,aAAA,MCsBF,0BCjDF,KAAA,OAAA,QAAA,QAAA,QAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,OAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,QAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UF0BI,cAAA,KACA,aAAA,MEJA,KACE,mBAAA,EAAA,wBAAA,EAAA,WAAA,EACA,iBAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,UAAA,EACA,UAAA,KAEF,UACE,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KACA,MAAA,KAIA,OF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,UAAA,SAAA,EAAA,EAAA,UAAA,KAAA,EAAA,EAAA,UAKA,UAAA,UElCM,OF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,OF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,OF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,OF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,OF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,OF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,OF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,OF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,QF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,QF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,QF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KAKA,UAAA,KE3BQ,QFuCR,MAAA,KEvCQ,QFuCR,MAAA,UEvCQ,QFuCR,MAAA,WEvCQ,QFuCR,MAAA,IEvCQ,QFuCR,MAAA,WEvCQ,QFuCR,MAAA,WEvCQ,QFuCR,MAAA,IEvCQ,QFuCR,MAAA,WEvCQ,QFuCR,MAAA,WEvCQ,QFuCR,MAAA,IEvCQ,SFuCR,MAAA,WEvCQ,SFuCR,MAAA,WEvCQ,SFuCR,MAAA,KEvCQ,QFmCR,KAAA,KEnCQ,QFmCR,KAAA,UEnCQ,QFmCR,KAAA,WEnCQ,QFmCR,KAAA,IEnCQ,QFmCR,KAAA,WEnCQ,QFmCR,KAAA,WEnCQ,QFmCR,KAAA,IEnCQ,QFmCR,KAAA,WEnCQ,QFmCR,KAAA,WEnCQ,QFmCR,KAAA,IEnCQ,SFmCR,KAAA,WEnCQ,SFmCR,KAAA,WEnCQ,SFmCR,KAAA,KE1BQ,UFsBR,YAAA,UEtBQ,UFsBR,YAAA,WEtBQ,UFsBR,YAAA,IEtBQ,UFsBR,YAAA,WEtBQ,UFsBR,YAAA,WEtBQ,UFsBR,YAAA,IEtBQ,UFsBR,YAAA,WEtBQ,UFsBR,YAAA,WEtBQ,UFsBR,YAAA,IEtBQ,WFsBR,YAAA,WEtBQ,WFsBR,YAAA,WCvBE,yBC1BE,QACE,mBAAA,EAAA,wBAAA,EAAA,WAAA,EACA,iBAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,UAAA,EACA,UAAA,KAEF,aACE,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KACA,MAAA,KAIA,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,UAAA,SAAA,EAAA,EAAA,UAAA,KAAA,EAAA,EAAA,UAKA,UAAA,UElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,WF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,WF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,WF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KAKA,UAAA,KE3BQ,WFuCR,MAAA,KEvCQ,WFuCR,MAAA,UEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,IEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,IEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,IEvCQ,YFuCR,MAAA,WEvCQ,YFuCR,MAAA,WEvCQ,YFuCR,MAAA,KEvCQ,WFmCR,KAAA,KEnCQ,WFmCR,KAAA,UEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,IEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,IEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,IEnCQ,YFmCR,KAAA,WEnCQ,YFmCR,KAAA,WEnCQ,YFmCR,KAAA,KE1BQ,aFsBR,YAAA,EEtBQ,aFsBR,YAAA,UEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,IEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,IEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,IEtBQ,cFsBR,YAAA,WEtBQ,cFsBR,YAAA,YCvBE,yBC1BE,QACE,mBAAA,EAAA,wBAAA,EAAA,WAAA,EACA,iBAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,UAAA,EACA,UAAA,KAEF,aACE,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KACA,MAAA,KAIA,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,UAAA,SAAA,EAAA,EAAA,UAAA,KAAA,EAAA,EAAA,UAKA,UAAA,UElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,WF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,WF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,WF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KAKA,UAAA,KE3BQ,WFuCR,MAAA,KEvCQ,WFuCR,MAAA,UEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,IEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,IEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,IEvCQ,YFuCR,MAAA,WEvCQ,YFuCR,MAAA,WEvCQ,YFuCR,MAAA,KEvCQ,WFmCR,KAAA,KEnCQ,WFmCR,KAAA,UEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,IEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,IEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,IEnCQ,YFmCR,KAAA,WEnCQ,YFmCR,KAAA,WEnCQ,YFmCR,KAAA,KE1BQ,aFsBR,YAAA,EEtBQ,aFsBR,YAAA,UEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,IEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,IEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,IEtBQ,cFsBR,YAAA,WEtBQ,cFsBR,YAAA,YCvBE,yBC1BE,QACE,mBAAA,EAAA,wBAAA,EAAA,WAAA,EACA,iBAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,UAAA,EACA,UAAA,KAEF,aACE,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KACA,MAAA,KAIA,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,UAAA,SAAA,EAAA,EAAA,UAAA,KAAA,EAAA,EAAA,UAKA,UAAA,UElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,WF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,WF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,WF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KAKA,UAAA,KE3BQ,WFuCR,MAAA,KEvCQ,WFuCR,MAAA,UEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,IEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,IEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,IEvCQ,YFuCR,MAAA,WEvCQ,YFuCR,MAAA,WEvCQ,YFuCR,MAAA,KEvCQ,WFmCR,KAAA,KEnCQ,WFmCR,KAAA,UEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,IEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,IEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,IEnCQ,YFmCR,KAAA,WEnCQ,YFmCR,KAAA,WEnCQ,YFmCR,KAAA,KE1BQ,aFsBR,YAAA,EEtBQ,aFsBR,YAAA,UEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,IEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,IEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,IEtBQ,cFsBR,YAAA,WEtBQ,cFsBR,YAAA,YCvBE,0BC1BE,QACE,mBAAA,EAAA,wBAAA,EAAA,WAAA,EACA,iBAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,UAAA,EACA,UAAA,KAEF,aACE,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KACA,MAAA,KAIA,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,UAAA,SAAA,EAAA,EAAA,UAAA,KAAA,EAAA,EAAA,UAKA,UAAA,UElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,UF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,IAAA,SAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,IAKA,UAAA,IElCM,WF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,WF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,WAAA,SAAA,EAAA,EAAA,WAAA,KAAA,EAAA,EAAA,WAKA,UAAA,WElCM,WF6BN,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KAKA,UAAA,KE3BQ,WFuCR,MAAA,KEvCQ,WFuCR,MAAA,UEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,IEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,IEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,WEvCQ,WFuCR,MAAA,IEvCQ,YFuCR,MAAA,WEvCQ,YFuCR,MAAA,WEvCQ,YFuCR,MAAA,KEvCQ,WFmCR,KAAA,KEnCQ,WFmCR,KAAA,UEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,IEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,IEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,WEnCQ,WFmCR,KAAA,IEnCQ,YFmCR,KAAA,WEnCQ,YFmCR,KAAA,WEnCQ,YFmCR,KAAA,KE1BQ,aFsBR,YAAA,EEtBQ,aFsBR,YAAA,UEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,IEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,IEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,WEtBQ,aFsBR,YAAA,IEtBQ,cFsBR,YAAA,WEtBQ,cFsBR,YAAA,YG3EF,OACE,MAAA,KACA,UAAA,KACA,cAAA,KAHF,UAAA,UAOI,QAAA,OACA,eAAA,IACA,WAAA,IAAA,MAAA,QATJ,gBAaI,eAAA,OACA,cAAA,IAAA,MAAA,QAdJ,mBAkBI,WAAA,IAAA,MAAA,QAlBJ,cAsBI,iBAAA,KASJ,aAAA,aAGI,QAAA,MASJ,gBACE,OAAA,IAAA,MAAA,QADF,mBAAA,mBAKI,OAAA,IAAA,MAAA,QALJ,yBAAA,yBAWM,oBAAA,IAUN,yCAEI,iBAAA,gBASJ,4BAGM,iBAAA,iBC7EJ,cAAA,iBAAA,iBAII,iBAAA,iBAMJ,iCAKM,iBAAA,iBALN,oCAAA,oCASQ,iBAAA,iBAnBR,eAAA,kBAAA,kBAII,iBAAA,QAMJ,kCAKM,iBAAA,QALN,qCAAA,qCASQ,iBAAA,QAnBR,YAAA,eAAA,eAII,iBAAA,QAMJ,+BAKM,iBAAA,QALN,kCAAA,kCASQ,iBAAA,QAnBR,eAAA,kBAAA,kBAII,iBAAA,QAMJ,kCAKM,iBAAA,QALN,qCAAA,qCASQ,iBAAA,QAnBR,cAAA,iBAAA,iBAII,iBAAA,QAMJ,iCAKM,iBAAA,QALN,oCAAA,oCASQ,iBAAA,QDiFV,kBAEI,MAAA,KACA,iBAAA,QAIJ,kBAEI,MAAA,QACA,iBAAA,QAIJ,eACE,MAAA,KACA,iBAAA,QAFF,kBAAA,kBAAA,wBAOI,aAAA,KAPJ,8BAWI,OAAA,EAYJ,kBACE,QAAA,MACA,MAAA,KACA,WAAA,KACA,mBAAA,yBAJF,iCAQI,OAAA,EEhJJ,cACE,QAAA,MACA,MAAA,KAGA,QAAA,MAAA,OACA,UAAA,KACA,YAAA,KACA,MAAA,QACA,iBAAA,KAEA,iBAAA,KACA,wBAAA,YAAA,gBAAA,YACA,OAAA,IAAA,MAAA,gBAKE,cAAA,ORTE,mBAAA,aAAA,YAAA,KAAA,mBAAA,YAAA,KAAA,WAAA,aAAA,YAAA,KAAA,mBAAA,YAAA,KAAA,cAAA,aAAA,YAAA,KAAA,WAAA,YAAA,KAAA,WAAA,aAAA,YAAA,KAAA,WAAA,YAAA,KAAA,WAAA,aAAA,YAAA,KAAA,WAAA,YAAA,KAAA,mBAAA,YAAA,KQTN,0BA6BI,iBAAA,YACA,OAAA,ECSF,oBACE,MAAA,QACA,iBAAA,KACA,aAAA,QACA,QAAA,ED3CJ,yCAsCI,MAAA,QAEA,QAAA,EAxCJ,gCAsCI,MAAA,QAEA,QAAA,EAxCJ,oCAsCI,MAAA,QAEA,QAAA,EAxCJ,2BAsCI,MAAA,QAEA,QAAA,EAxCJ,uBAAwB,wBAkDpB,iBAAA,QAEA,QAAA,EApDJ,uBAwDI,OAAA,YAIJ,gDAGI,OAAA,oBAHJ,qCAYI,MAAA,QACA,iBAAA,KAKJ,mBAAA,oBAEE,QAAA,MAUF,gBACE,YAAA,sBACA,eAAA,sBACA,cAAA,EAGF,mBACE,YAAA,uBACA,eAAA,uBACA,UAAA,QAGF,mBACE,YAAA,uBACA,eAAA,uBACA,UAAA,QAUF,iBACE,YAAA,MACA,eAAA,MACA,cAAA,EACA,UAAA,KASF,qBACE,YAAA,MACA,eAAA,MACA,cAAA,EACA,YAAA,KACA,OAAA,MAAA,YACA,aAAA,IAAA,EAN6D,qCAA/D,qCAAqG,kDAArG,uDAAA,0DAAsC,kDAAtC,uDAAA,0DAUI,cAAA,EACA,aAAA,EAaJ,iBAAkB,8BAAlB,mCAAA,sCACE,QAAA,OAAA,MACA,UAAA,QT5JE,cAAA,MSgKJ,wEAAoD,gEAApD,qEAAA,mDAEI,OAAA,UAIJ,iBAAkB,8BAAlB,mCAAA,sCACE,QAAA,OAAA,OACA,UAAA,QTxKE,cAAA,MS4KJ,wEAAoD,gEAApD,qEAAA,mDAEI,OAAA,YAUJ,YACE,cAAA,KAGF,WACE,QAAA,MACA,WAAA,OAQF,YACE,SAAA,SACA,QAAA,MACA,cAAA,MAHF,uCAOM,MAAA,QACA,OAAA,YAKN,kBACE,aAAA,QACA,cAAA,EACA,OAAA,QAGF,kBACE,SAAA,SACA,WAAA,OACA,YAAA,SAHF,6BAMI,SAAA,OAKJ,mBACE,QAAA,aADF,qCAII,eAAA,OAJJ,sCAQI,YAAA,OASJ,uBACE,WAAA,OAGF,qBAAA,sBAAA,sBAGE,cAAA,QACA,kBAAA,UACA,oBAAA,OAAA,MAAA,SACA,wBAAA,SAAA,SAAA,gBAAA,SAAA,SC5PA,6BAAA,6BAAA,+BAAA,oCAAA,iCAKE,MAAA,QAIF,2BACE,aAAA,QAQF,gCACE,MAAA,QACA,aAAA,QACA,iBAAA,QD2OJ,mCAII,iBAAA,wPCpQF,6BAAA,6BAAA,+BAAA,oCAAA,iCAKE,MAAA,QAIF,2BACE,aAAA,QAQF,gCACE,MAAA,QACA,aAAA,QACA,iBAAA,KDmPJ,mCAII,iBAAA,iUC5QF,4BAAA,4BAAA,8BAAA,mCAAA,gCAKE,MAAA,QAIF,0BACE,aAAA,QAQF,+BACE,MAAA,QACA,aAAA,QACA,iBAAA,QD2PJ,iCAII,iBAAA,kSAcJ,aACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,IAAA,KAAA,cAAA,IAAA,KAAA,UAAA,IAAA,KACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OAHF,yBASI,MAAA,KJ1PA,yBIiPF,mBAeI,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OACA,iBAAA,OAAA,wBAAA,OAAA,cAAA,OAAA,gBAAA,OACA,cAAA,EAlBJ,yBAuBI,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KACA,kBAAA,IAAA,KAAA,cAAA,IAAA,KAAA,UAAA,IAAA,KACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OACA,cAAA,EA3BJ,2BAgCI,QAAA,aACA,MAAA,KACA,eAAA,OAlCJ,kCAuCI,QAAA,aAvCJ,0BA2CI,MAAA,KA3CJ,iCA+CI,cAAA,EACA,eAAA,OAhDJ,yBAsDI,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OACA,iBAAA,OAAA,wBAAA,OAAA,cAAA,OAAA,gBAAA,OACA,MAAA,KACA,WAAA,EACA,cAAA,EA3DJ,+BA8DI,aAAA,EA9DJ,+BAiEI,SAAA,SACA,WAAA,EACA,aAAA,OACA,YAAA,EApEJ,6BAyEI,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OACA,iBAAA,OAAA,wBAAA,OAAA,cAAA,OAAA,gBAAA,OACA,aAAA,EA5EJ,uCA+EI,SAAA,OACA,QAAA,aACA,aAAA,OACA,eAAA,YAlFJ,kDAuFI,IAAA,GE1XN,KACE,QAAA,aACA,YAAA,IACA,YAAA,KACA,WAAA,OACA,YAAA,OACA,eAAA,OACA,oBAAA,KAAA,iBAAA,KAAA,gBAAA,KAAA,YAAA,KACA,OAAA,IAAA,MAAA,YCoEA,QAAA,MAAA,KACA,UAAA,KZ/EE,cAAA,OCWE,mBAAA,IAAA,IAAA,YAAA,cAAA,IAAA,IAAA,YAAA,WAAA,IAAA,IAAA,YNKF,WAAA,WgBAA,gBAAA,KAdQ,WAAZ,WAkBI,QAAA,EACA,mBAAA,EAAA,EAAA,EAAA,IAAA,oBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,oBAnBJ,cAAe,cAyBX,OAAA,YACA,QAAA,IA1BS,YAAb,YAgCI,iBAAA,KAMJ,eAAA,yBAEE,eAAA,KAQF,aC7CE,MAAA,KACA,iBAAA,QACA,aAAA,QjBDE,mBiBMA,MAAA,KACA,iBAAA,QACA,aAAA,QAEF,mBAAA,mBAMI,mBAAA,EAAA,EAAA,EAAA,IAAA,mBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,mBAKJ,sBAAA,sBAEE,iBAAA,QACA,aAAA,QAGF,oBAAA,oBAAA,mCAGE,MAAA,KACA,iBAAA,QACA,iBAAA,KACA,aAAA,QDcJ,eChDE,MAAA,QACA,iBAAA,KACA,aAAA,KjBDE,qBiBMA,MAAA,QACA,iBAAA,QACA,aAAA,QAEF,qBAAA,qBAMI,mBAAA,EAAA,EAAA,EAAA,IAAA,qBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,qBAKJ,wBAAA,wBAEE,iBAAA,KACA,aAAA,KAGF,sBAAA,sBAAA,qCAGE,MAAA,QACA,iBAAA,QACA,iBAAA,KACA,aAAA,QDiBJ,UCnDE,MAAA,KACA,iBAAA,QACA,aAAA,QjBDE,gBiBMA,MAAA,KACA,iBAAA,QACA,aAAA,QAEF,gBAAA,gBAMI,mBAAA,EAAA,EAAA,EAAA,IAAA,oBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,oBAKJ,mBAAA,mBAEE,iBAAA,QACA,aAAA,QAGF,iBAAA,iBAAA,gCAGE,MAAA,KACA,iBAAA,QACA,iBAAA,KACA,aAAA,QDoBJ,aCtDE,MAAA,KACA,iBAAA,QACA,aAAA,QjBDE,mBiBMA,MAAA,KACA,iBAAA,QACA,aAAA,QAEF,mBAAA,mBAMI,mBAAA,EAAA,EAAA,EAAA,IAAA,mBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,mBAKJ,sBAAA,sBAEE,iBAAA,QACA,aAAA,QAGF,oBAAA,oBAAA,mCAGE,MAAA,KACA,iBAAA,QACA,iBAAA,KACA,aAAA,QDuBJ,aCzDE,MAAA,KACA,iBAAA,QACA,aAAA,QjBDE,mBiBMA,MAAA,KACA,iBAAA,QACA,aAAA,QAEF,mBAAA,mBAMI,mBAAA,EAAA,EAAA,EAAA,IAAA,oBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,oBAKJ,sBAAA,sBAEE,iBAAA,QACA,aAAA,QAGF,oBAAA,oBAAA,mCAGE,MAAA,KACA,iBAAA,QACA,iBAAA,KACA,aAAA,QD0BJ,YC5DE,MAAA,KACA,iBAAA,QACA,aAAA,QjBDE,kBiBMA,MAAA,KACA,iBAAA,QACA,aAAA,QAEF,kBAAA,kBAMI,mBAAA,EAAA,EAAA,EAAA,IAAA,mBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,mBAKJ,qBAAA,qBAEE,iBAAA,QACA,aAAA,QAGF,mBAAA,mBAAA,kCAGE,MAAA,KACA,iBAAA,QACA,iBAAA,KACA,aAAA,QD+BJ,qBCzBE,MAAA,QACA,iBAAA,KACA,iBAAA,YACA,aAAA,QjB1CE,2BiB6CA,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,2BAAA,2BAEE,mBAAA,EAAA,EAAA,EAAA,IAAA,mBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,mBAGF,8BAAA,8BAEE,MAAA,QACA,iBAAA,YAGF,4BAAA,4BAAA,2CAGE,MAAA,KACA,iBAAA,QACA,aAAA,QDCJ,uBC5BE,MAAA,KACA,iBAAA,KACA,iBAAA,YACA,aAAA,KjB1CE,6BiB6CA,MAAA,KACA,iBAAA,KACA,aAAA,KAGF,6BAAA,6BAEE,mBAAA,EAAA,EAAA,EAAA,IAAA,qBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,qBAGF,gCAAA,gCAEE,MAAA,KACA,iBAAA,YAGF,8BAAA,8BAAA,6CAGE,MAAA,KACA,iBAAA,KACA,aAAA,KDIJ,kBC/BE,MAAA,QACA,iBAAA,KACA,iBAAA,YACA,aAAA,QjB1CE,wBiB6CA,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,wBAAA,wBAEE,mBAAA,EAAA,EAAA,EAAA,IAAA,oBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,oBAGF,2BAAA,2BAEE,MAAA,QACA,iBAAA,YAGF,yBAAA,yBAAA,wCAGE,MAAA,KACA,iBAAA,QACA,aAAA,QDOJ,qBClCE,MAAA,QACA,iBAAA,KACA,iBAAA,YACA,aAAA,QjB1CE,2BiB6CA,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,2BAAA,2BAEE,mBAAA,EAAA,EAAA,EAAA,IAAA,mBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,mBAGF,8BAAA,8BAEE,MAAA,QACA,iBAAA,YAGF,4BAAA,4BAAA,2CAGE,MAAA,KACA,iBAAA,QACA,aAAA,QDUJ,qBCrCE,MAAA,QACA,iBAAA,KACA,iBAAA,YACA,aAAA,QjB1CE,2BiB6CA,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,2BAAA,2BAEE,mBAAA,EAAA,EAAA,EAAA,IAAA,oBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,oBAGF,8BAAA,8BAEE,MAAA,QACA,iBAAA,YAGF,4BAAA,4BAAA,2CAGE,MAAA,KACA,iBAAA,QACA,aAAA,QDaJ,oBCxCE,MAAA,QACA,iBAAA,KACA,iBAAA,YACA,aAAA,QjB1CE,0BiB6CA,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,0BAAA,0BAEE,mBAAA,EAAA,EAAA,EAAA,IAAA,mBAAA,WAAA,EAAA,EAAA,EAAA,IAAA,mBAGF,6BAAA,6BAEE,MAAA,QACA,iBAAA,YAGF,2BAAA,2BAAA,0CAGE,MAAA,KACA,iBAAA,QACA,aAAA,QDuBJ,UACE,YAAA,IACA,MAAA,QACA,cAAA,EAHF,UAA6B,iBAAlB,iBAAoC,mBAS3C,iBAAA,YATJ,UAA4B,iBAAjB,gBAeP,aAAA,YhBxGA,gBgB2GA,aAAA,YhBjGA,gBAAA,gBgBoGA,MAAA,QACA,gBAAA,UACA,iBAAA,YAvBJ,mBA0BI,MAAA,QhBzGA,yBAAA,yBgB4GE,gBAAA,KAUG,mBAAT,QCxDE,QAAA,OAAA,OACA,UAAA,QZ/EE,cAAA,MW0IK,mBAAT,QC5DE,QAAA,OAAA,MACA,UAAA,QZ/EE,cAAA,MWoJJ,WACE,QAAA,MACA,MAAA,KAIF,sBACE,WAAA,MAIF,6BAAA,4BAAA,6BAII,MAAA,KEvKJ,MACE,QAAA,EZcI,mBAAA,QAAA,KAAA,OAAA,cAAA,QAAA,KAAA,OAAA,WAAA,QAAA,KAAA,OYfN,WAKI,QAAA,EAIJ,UACE,QAAA,KADF,eAGI,QAAA,MAIJ,iBAEI,QAAA,UAIJ,oBAEI,QAAA,gBAIJ,YACE,SAAA,SACA,OAAA,EACA,SAAA,OZhBI,mBAAA,OAAA,KAAA,KAAA,cAAA,OAAA,KAAA,KAAA,WAAA,OAAA,KAAA,KadN,UAAA,QAEE,SAAA,SAGF,wBAGI,QAAA,aACA,MAAA,EACA,OAAA,EACA,YAAA,KACA,eAAA,OACA,QAAW,GACX,WAAA,KAAA,MACA,aAAA,KAAA,MAAA,YACA,YAAA,KAAA,MAAA,YAXJ,uBAgBI,QAAA,EAIJ,gCAGM,WAAA,EACA,cAAA,KAAA,MAMN,eACE,SAAA,SACA,IAAA,KACA,KAAA,EACA,QAAA,KACA,QAAA,KACA,MAAA,KACA,UAAA,MACA,QAAA,MAAA,EACA,OAAA,QAAA,EAAA,EACA,UAAA,KACA,MAAA,QACA,WAAA,KACA,WAAA,KACA,iBAAA,KACA,wBAAA,YAAA,gBAAA,YACA,OAAA,IAAA,MAAA,gBdhDE,cAAA,OcsDJ,kBCrDE,OAAA,IACA,OAAA,MAAA,EACA,SAAA,OACA,iBAAA,QDyDF,eACE,QAAA,MACA,MAAA,KACA,QAAA,IAAA,OACA,MAAA,KACA,YAAA,IACA,MAAA,QACA,WAAA,QACA,YAAA,OACA,WAAA,IACA,OAAA,EnBvDE,qBAAA,qBmB0DA,MAAA,QACA,gBAAA,KACA,iBAAA,QAfJ,sBAAuB,sBAoBnB,MAAA,KACA,gBAAA,KACA,iBAAA,QAtBJ,wBAAyB,wBA2BrB,MAAA,QACA,OAAA,YACA,iBAAA,YASJ,qBAGI,QAAA,MAHJ,QAQI,QAAA,EAQJ,qBACE,MAAA,EACA,KAAA,KAGF,oBACE,MAAA,KACA,KAAA,EAIF,iBACE,QAAA,MACA,QAAA,MAAA,OACA,cAAA,EACA,UAAA,QACA,MAAA,QACA,YAAA,OAIF,mBACE,SAAA,MACA,IAAA,EACA,MAAA,EACA,OAAA,EACA,KAAA,EACA,QAAA,IAOF,uBAGI,IAAA,KACA,OAAA,KACA,cAAA,QE3JJ,WAAA,oBAEE,SAAA,SACA,QAAA,mBAAA,QAAA,oBAAA,QAAA,mBAAA,QAAA,YACA,eAAA,OAJF,yBAAA,gBAOI,SAAA,SACA,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KARJ,+BAAA,sBAaM,QAAA,EAbN,gCAAA,gCAAA,+BAAmD,uBAA1B,uBAAzB,sBAkBM,QAAA,EAlBN,qBAAA,2BAAA,2BAAA,iCAAA,8BAAA,oCAAA,oCAAA,0CA2BI,YAAA,KAKJ,aACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,iBAAA,MAAA,wBAAA,WAAA,cAAA,MAAA,gBAAA,WAFF,0BAKI,MAAA,KAIJ,yEACE,cAAA,EAIF,4BACE,YAAA,EADF,mEhBhCI,2BAAA,EACA,wBAAA,EgBuCJ,6CAAA,8ChB1BI,0BAAA,EACA,uBAAA,EgB+BJ,sBACE,MAAA,KAEF,8DACE,cAAA,EAEF,mEAAA,oEhBpDI,2BAAA,EACA,wBAAA,EgByDJ,oEhB5CI,0BAAA,EACA,uBAAA,EgBgDJ,mCAAA,iCAEE,QAAA,EAgBF,4BACE,cAAA,OACA,aAAA,OAFF,mCAKI,YAAA,EAI8B,0CAAlC,+BACE,cAAA,QACA,aAAA,QAGgC,0CAAlC,+BACE,cAAA,SACA,aAAA,SAoBF,oBACE,QAAA,mBAAA,QAAA,oBAAA,QAAA,mBAAA,QAAA,YACA,mBAAA,SAAA,sBAAA,OAAA,uBAAA,OAAA,mBAAA,OAAA,eAAA,OACA,kBAAA,MAAA,oBAAA,WAAA,eAAA,MAAA,YAAA,WACA,iBAAA,OAAA,wBAAA,OAAA,cAAA,OAAA,gBAAA,OAJF,yBAAA,+BAQI,MAAA,KARJ,8BAAA,oCAAA,oCAAA,0CAeI,WAAA,KACA,YAAA,EAIJ,4DAEI,cAAA,EAFJ,sDhBlII,2BAAA,EACA,0BAAA,EgBiIJ,sDhBhJI,wBAAA,EACA,uBAAA,EgB0JJ,uEACE,cAAA,EAEF,4EAAA,6EhBhJI,2BAAA,EACA,0BAAA,EgBqJJ,6EhBpKI,wBAAA,EACA,uBAAA,ET0gGJ,gDAAA,6CAAA,2DAAA,wDyBj1FM,SAAA,SACA,KAAA,cACA,eAAA,KClMN,aACE,SAAA,SACA,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,MAAA,KAHF,2BAQI,SAAA,SACA,QAAA,EACA,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KAGA,MAAA,GACA,cAAA,EAd8B,kCAAlC,iCAAqE,iCAkB/D,QAAA,EAKN,2BAAA,mBAAA,iBAIE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,mBAAA,SAAA,sBAAA,OAAA,uBAAA,OAAA,mBAAA,OAAA,eAAA,OACA,iBAAA,OAAA,wBAAA,OAAA,cAAA,OAAA,gBAAA,OANF,8DAAA,sDAAA,oDjBvBI,cAAA,EiBoCJ,mBAAA,iBAEE,YAAA,OACA,eAAA,OAyBF,mBACE,QAAA,MAAA,OACA,cAAA,EACA,UAAA,KACA,YAAA,IACA,YAAA,KACA,MAAA,QACA,WAAA,OACA,iBAAA,QACA,OAAA,IAAA,MAAA,gBjBzEE,cAAA,OiBgEJ,mCAAA,mCAAA,wDAcI,QAAA,OAAA,MACA,UAAA,QjB/EA,cAAA,MiBgEJ,mCAAA,mCAAA,wDAmBI,QAAA,OAAA,OACA,UAAA,QjBpFA,cAAA,MiBgEJ,wCAAA,qCA4BI,WAAA,EAUJ,4CAAA,oCAAA,oEAAA,+EAAA,uCAAA,kDAAA,mDjBzFI,2BAAA,EACA,wBAAA,EiBiGJ,oCACE,aAAA,EAEF,6CAAA,qCAAA,wCAAA,mDAAA,oDAAA,oEAAA,yDjBvFI,0BAAA,EACA,uBAAA,EiB+FJ,mDACE,YAAA,EAOF,iBACE,SAAA,SAGA,UAAA,EACA,YAAA,OALF,sBAUI,SAAA,SAEA,iBAAA,EAAA,aAAA,EAAA,EAAA,GAAA,SAAA,EAAA,EAAA,GAAA,KAAA,EAAA,EAAA,GAZJ,2BAeM,YAAA,KAfyB,6BAA/B,4BAA+D,4BAoBzD,QAAA,EApBN,uCAAA,6CA4BM,aAAA,KA5BN,wCAAA,8CAkCM,QAAA,EACA,YAAA,KAnCN,qDAAA,oDAAA,oDAAiD,+CAAjD,8CAAmG,8CAsC3F,QAAA,EClKR,gBACE,SAAA,SACA,QAAA,mBAAA,QAAA,oBAAA,QAAA,mBAAA,QAAA,YACA,WAAA,OACA,aAAA,OACA,aAAA,KACA,OAAA,QAGF,sBACE,SAAA,SACA,QAAA,GACA,QAAA,EAHF,wDAMI,MAAA,KACA,iBAAA,QAPJ,sDAaI,mBAAA,EAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,EAAA,IAAA,QAAA,WAAA,EAAA,EAAA,EAAA,IAAA,KAAA,EAAA,EAAA,EAAA,IAAA,QAbJ,uDAiBI,MAAA,KACA,iBAAA,QAlBJ,yDAwBM,OAAA,YACA,iBAAA,QAzBN,2DA6BM,MAAA,QACA,OAAA,YASN,0BACE,SAAA,SACA,IAAA,OACA,KAAA,EACA,QAAA,MACA,MAAA,KACA,OAAA,KACA,eAAA,KACA,oBAAA,KAAA,iBAAA,KAAA,gBAAA,KAAA,YAAA,KACA,iBAAA,KACA,kBAAA,UACA,oBAAA,OAAA,OACA,wBAAA,IAAA,IAAA,gBAAA,IAAA,IAQF,2ClB3EI,cAAA,OkB2EJ,yEAMI,iBAAA,yMANJ,+EAUI,iBAAA,QACA,iBAAA,sJASJ,wCAEI,cAAA,IAFJ,sEAMI,iBAAA,mJAUJ,yBACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,mBAAA,SAAA,sBAAA,OAAA,uBAAA,OAAA,mBAAA,OAAA,eAAA,OAFF,yCAKI,cAAA,OALJ,yDAQM,YAAA,EAYN,eACE,QAAA,aACA,UAAA,KAEA,OAAA,oBACA,QAAA,QAAA,QAAA,QAAA,OACA,YAAA,KACA,MAAA,QACA,eAAA,OACA,WAAA,KAAA,oKAAA,UAAA,MAAA,OAAA,OACA,wBAAA,IAAA,KAAA,gBAAA,IAAA,KACA,OAAA,IAAA,MAAA,gBlB9IE,cAAA,OkBiJF,gBAAA,KACA,mBAAA,KAfF,qBAkBI,aAAA,QACA,QAAA,EAnBJ,gCA4BM,MAAA,QACA,iBAAA,KA7BN,wBAkCI,MAAA,QACA,OAAA,YACA,iBAAA,QApCJ,2BAyCI,QAAA,EAIJ,kBACE,YAAA,QACA,eAAA,QACA,UAAA,IAaF,aACE,SAAA,SACA,QAAA,aACA,UAAA,KACA,OAAA,OACA,cAAA,EACA,OAAA,QAGF,mBACE,UAAA,MACA,UAAA,KACA,OAAA,OACA,OAAA,EACA,OAAA,iBACA,QAAA,EAOF,qBACE,SAAA,SACA,IAAA,EACA,MAAA,EACA,KAAA,EACA,QAAA,EACA,OAAA,OACA,QAAA,MAAA,KACA,YAAA,IACA,MAAA,QACA,eAAA,KACA,oBAAA,KAAA,iBAAA,KAAA,gBAAA,KAAA,YAAA,KACA,iBAAA,KACA,OAAA,IAAA,MAAA,gBlBnOE,cAAA,OkBsNJ,qCAmBM,QxB8SkB,iBwBjUxB,6BAwBI,SAAA,SACA,IAAA,KACA,MAAA,KACA,OAAA,KACA,QAAA,EACA,QAAA,MACA,OAAA,OACA,QAAA,MAAA,KACA,YAAA,IACA,MAAA,QACA,iBAAA,QACA,OAAA,IAAA,MAAA,gBlBzPA,cAAA,EAAA,OAAA,OAAA,EkBsNJ,sCAyCM,QxB2RU,SyBzhBhB,KACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,aAAA,EACA,cAAA,EACA,WAAA,KAGF,UACE,QAAA,MACA,QAAA,KAAA,IxBME,gBAAA,gBwBHA,gBAAA,KALJ,mBAUI,MAAA,QACA,OAAA,YASJ,UACE,cAAA,IAAA,MAAA,KADF,oBAII,cAAA,KAJJ,oBAQI,OAAA,IAAA,MAAA,YnB9BA,wBAAA,OACA,uBAAA,OmBqBJ,0BAA2B,0BAYrB,aAAA,QAAA,QAAA,KAZN,6BAgBM,MAAA,QACA,iBAAA,YACA,aAAA,YAlBN,mCAAA,2BAwBI,MAAA,QACA,iBAAA,KACA,aAAA,KAAA,KAAA,KA1BJ,yBA+BI,WAAA,KnBrDA,wBAAA,EACA,uBAAA,EmB+DJ,qBnBtEI,cAAA,OmBsEJ,oCAAA,4BAOI,MAAA,KACA,OAAA,QACA,iBAAA,QASJ,oBAEI,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KACA,WAAA,OAIJ,yBAEI,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KACA,WAAA,OASJ,uBAEI,QAAA,KAFJ,qBAKI,QAAA,MCnGJ,QACE,SAAA,SACA,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,mBAAA,SAAA,sBAAA,OAAA,uBAAA,OAAA,mBAAA,OAAA,eAAA,OACA,QAAA,MAAA,KAQF,cACE,QAAA,aACA,YAAA,OACA,eAAA,OACA,aAAA,KACA,UAAA,QACA,YAAA,QACA,YAAA,OzBhBE,oBAAA,oByBmBA,gBAAA,KASJ,YACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,mBAAA,SAAA,sBAAA,OAAA,uBAAA,OAAA,mBAAA,OAAA,eAAA,OACA,aAAA,EACA,cAAA,EACA,WAAA,KALF,sBAQI,cAAA,EACA,aAAA,EASJ,aACE,QAAA,aACA,YAAA,QACA,eAAA,QAUF,gBACE,mBAAA,WAAA,oBAAA,MAAA,WAAA,WACA,QAAA,OAAA,OACA,UAAA,QACA,YAAA,EACA,WAAA,IACA,OAAA,IAAA,MAAA,YpBjFE,cAAA,OLgBA,sBAAA,sByBqEA,gBAAA,KAMJ,qBACE,QAAA,aACA,MAAA,MACA,OAAA,MACA,eAAA,OACA,QAAW,GACX,WAAA,UAAA,OAAA,OACA,wBAAA,KAAA,KAAA,gBAAA,KAAA,KAKF,qBACE,SAAA,SACA,KAAA,KAEF,sBACE,SAAA,SACA,MAAA,Kf5CE,yBeiDF,8CASU,SAAA,OACA,MAAA,KAVV,8BAeQ,cAAA,EACA,aAAA,Gf9EN,yBe8DF,mBAqBM,mBAAA,WAAA,sBAAA,OAAA,uBAAA,IAAA,mBAAA,IAAA,eAAA,IACA,kBAAA,OAAA,cAAA,OAAA,UAAA,OACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OAvBN,+BA0BQ,mBAAA,WAAA,sBAAA,OAAA,uBAAA,IAAA,mBAAA,IAAA,eAAA,IA1BR,yCA6BU,cAAA,MACA,aAAA,MA9BV,8BAoCQ,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,OAAA,cAAA,OAAA,UAAA,OACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OAtCR,oCA2CQ,QAAA,sBAAA,QAAA,uBAAA,QAAA,sBAAA,QAAA,eACA,MAAA,KA5CR,mCAiDQ,QAAA,MflGN,yBesDA,iDAIQ,SAAA,OACA,MAAA,KALR,iCAUM,cAAA,EACA,aAAA,Gf9EN,yBemEA,sBAgBI,mBAAA,WAAA,sBAAA,OAAA,uBAAA,IAAA,mBAAA,IAAA,eAAA,IACA,kBAAA,OAAA,cAAA,OAAA,UAAA,OACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OAlBJ,kCAqBM,mBAAA,WAAA,sBAAA,OAAA,uBAAA,IAAA,mBAAA,IAAA,eAAA,IArBN,4CAwBQ,cAAA,MACA,aAAA,MAzBR,iCA+BM,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,OAAA,cAAA,OAAA,UAAA,OACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OAjCN,uCAsCM,QAAA,sBAAA,QAAA,uBAAA,QAAA,sBAAA,QAAA,eACA,MAAA,KAvCN,sCA4CM,QAAA,MflGN,yBesDA,iDAIQ,SAAA,OACA,MAAA,KALR,iCAUM,cAAA,EACA,aAAA,Gf9EN,yBemEA,sBAgBI,mBAAA,WAAA,sBAAA,OAAA,uBAAA,IAAA,mBAAA,IAAA,eAAA,IACA,kBAAA,OAAA,cAAA,OAAA,UAAA,OACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OAlBJ,kCAqBM,mBAAA,WAAA,sBAAA,OAAA,uBAAA,IAAA,mBAAA,IAAA,eAAA,IArBN,4CAwBQ,cAAA,MACA,aAAA,MAzBR,iCA+BM,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,OAAA,cAAA,OAAA,UAAA,OACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OAjCN,uCAsCM,QAAA,sBAAA,QAAA,uBAAA,QAAA,sBAAA,QAAA,eACA,MAAA,KAvCN,sCA4CM,QAAA,MflGN,0BesDA,iDAIQ,SAAA,OACA,MAAA,KALR,iCAUM,cAAA,EACA,aAAA,Gf9EN,0BemEA,sBAgBI,mBAAA,WAAA,sBAAA,OAAA,uBAAA,IAAA,mBAAA,IAAA,eAAA,IACA,kBAAA,OAAA,cAAA,OAAA,UAAA,OACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OAlBJ,kCAqBM,mBAAA,WAAA,sBAAA,OAAA,uBAAA,IAAA,mBAAA,IAAA,eAAA,IArBN,4CAwBQ,cAAA,MACA,aAAA,MAzBR,iCA+BM,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,OAAA,cAAA,OAAA,UAAA,OACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OAjCN,uCAsCM,QAAA,sBAAA,QAAA,uBAAA,QAAA,sBAAA,QAAA,eACA,MAAA,KAvCN,sCA4CM,QAAA,MA5CN,sBAgBI,mBAAA,WAAA,sBAAA,OAAA,uBAAA,IAAA,mBAAA,IAAA,eAAA,IACA,kBAAA,OAAA,cAAA,OAAA,UAAA,OACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OAlBJ,iDAIQ,SAAA,OACA,MAAA,KALR,iCAUM,cAAA,EACA,aAAA,EAXN,kCAqBM,mBAAA,WAAA,sBAAA,OAAA,uBAAA,IAAA,mBAAA,IAAA,eAAA,IArBN,4CAwBQ,cAAA,MACA,aAAA,MAzBR,iCA+BM,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,OAAA,cAAA,OAAA,UAAA,OACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OAjCN,uCAsCM,QAAA,sBAAA,QAAA,uBAAA,QAAA,sBAAA,QAAA,eACA,MAAA,KAvCN,sCA4CM,QAAA,KAaV,4BAAA,8BAGI,MAAA,eAHJ,kCAAmC,kCAAnC,oCAAA,oCAMM,MAAA,eANN,oCAYM,MAAA,eAZN,0CAA2C,0CAenC,MAAA,eAfR,6CAmBQ,MAAA,eAnBR,4CAAA,2CAAA,yCAAA,0CA2BM,MAAA,eA3BN,8BAgCI,aAAA,eAhCJ,mCAoCI,iBAAA,oPApCJ,2BAwCI,MAAA,eAKJ,8BAAA,gCAGI,MAAA,KAHJ,oCAAqC,oCAArC,sCAAA,sCAMM,MAAA,KANN,sCAYM,MAAA,qBAZN,4CAA6C,4CAerC,MAAA,sBAfR,+CAmBQ,MAAA,sBAnBR,8CAAA,6CAAA,2CAAA,4CA2BM,MAAA,KA3BN,gCAgCI,aAAA,qBAhCJ,qCAoCI,iBAAA,0PApCJ,6BAwCI,MAAA,qBCrQJ,MACE,SAAA,SACA,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,mBAAA,SAAA,sBAAA,OAAA,uBAAA,OAAA,mBAAA,OAAA,eAAA,OACA,iBAAA,KACA,OAAA,IAAA,MAAA,iBrBLE,cAAA,OqBSJ,YAGE,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KACA,QAAA,QAGF,YACE,cAAA,OAGF,eACE,WAAA,SACA,cAAA,EAGF,sBACE,cAAA,E1BpBE,iB0ByBA,gBAAA,KAFJ,sBAMI,YAAA,QAIJ,2DrBjCI,wBAAA,OACA,uBAAA,OqBgCJ,yDrBnBI,2BAAA,OACA,0BAAA,OqBqCJ,aACE,QAAA,OAAA,QACA,cAAA,EACA,iBAAA,QACA,cAAA,IAAA,MAAA,iBAJF,yBrB1DI,cAAA,mBAAA,mBAAA,EAAA,EqBqEJ,aACE,QAAA,OAAA,QACA,iBAAA,QACA,WAAA,IAAA,MAAA,iBAHF,wBrBrEI,cAAA,EAAA,EAAA,mBAAA,mBqBoFJ,kBACE,aAAA,SACA,cAAA,QACA,YAAA,SACA,cAAA,EAGF,mBACE,aAAA,SACA,YAAA,SAQF,cCtGE,iBAAA,QACA,aAAA,QAEA,2BAAA,2BAEE,iBAAA,YDoGJ,cCzGE,iBAAA,QACA,aAAA,QAEA,2BAAA,2BAEE,iBAAA,YDuGJ,WC5GE,iBAAA,QACA,aAAA,QAEA,wBAAA,wBAEE,iBAAA,YD0GJ,cC/GE,iBAAA,QACA,aAAA,QAEA,2BAAA,2BAEE,iBAAA,YD6GJ,aClHE,iBAAA,QACA,aAAA,QAEA,0BAAA,0BAEE,iBAAA,YDkHJ,sBC7GE,iBAAA,YACA,aAAA,QD+GF,wBChHE,iBAAA,YACA,aAAA,KDkHF,mBCnHE,iBAAA,YACA,aAAA,QDqHF,sBCtHE,iBAAA,YACA,aAAA,QDwHF,sBCzHE,iBAAA,YACA,aAAA,QD2HF,qBC5HE,iBAAA,YACA,aAAA,QDmIF,cC3HE,MAAA,sBAEA,2BAAA,2BAEE,iBAAA,YACA,aAAA,qBAEF,+BAAA,2BAAA,2BAAA,0BAIE,MAAA,KAEF,kDAAA,yBAAA,6BAAA,yBAIE,MAAA,sBAEF,+BAAA,+BAEI,MAAA,KD8GN,iBACE,QAAA,EACA,cAAA,EACA,YAAA,EAIF,UrB5JI,cAAA,mBqBgKJ,kBACE,SAAA,SACA,IAAA,EACA,MAAA,EACA,OAAA,EACA,KAAA,EACA,QAAA,QAMF,crBtKI,wBAAA,mBACA,uBAAA,mBqBwKJ,iBrB3JI,2BAAA,mBACA,0BAAA,mBK+BA,yBgBmIF,WACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,IAAA,KAAA,cAAA,IAAA,KAAA,UAAA,IAAA,KAFF,iBAKI,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,iBAAA,EAAA,aAAA,EAAA,EAAA,GAAA,SAAA,EAAA,EAAA,GAAA,KAAA,EAAA,EAAA,GACA,mBAAA,SAAA,sBAAA,OAAA,uBAAA,OAAA,mBAAA,OAAA,eAAA,OAPJ,mCAY0B,YAAA,KAZ1B,kCAayB,aAAA,MhBhJvB,yBgB2JF,YACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,IAAA,KAAA,cAAA,IAAA,KAAA,UAAA,IAAA,KAFF,kBAKI,iBAAA,EAAA,aAAA,EAAA,EAAA,GAAA,SAAA,EAAA,EAAA,GAAA,KAAA,EAAA,EAAA,GALJ,wBAQM,YAAA,EACA,YAAA,EATN,8BrBlME,2BAAA,EACA,wBAAA,EqBiMF,4CAkBU,wBAAA,EAlBV,+CAqBU,2BAAA,EArBV,6BrBpLE,0BAAA,EACA,uBAAA,EqBmLF,2CA4BU,uBAAA,EA5BV,8CA+BU,0BAAA,EA/BV,qDAoCQ,cAAA,EApCR,sEAAA,mEAwCU,cAAA,GhBnMR,yBgBiNF,cACE,qBAAA,EAAA,kBAAA,EAAA,aAAA,EACA,mBAAA,QAAA,gBAAA,QAAA,WAAA,QAFF,oBAKI,QAAA,aACA,MAAA,KACA,cAAA,QEhRN,YACE,QAAA,OAAA,KACA,cAAA,KACA,WAAA,KACA,iBAAA,QvBAE,cAAA,OwBHF,mBACE,QAAA,MACA,QAAW,GACX,MAAA,KDKJ,iBACE,MAAA,KADF,0CAKI,QAAA,aACA,cAAA,MACA,aAAA,MACA,MAAA,QACA,QAAiC,IATrC,gDAmBI,gBAAA,UAnBJ,gDAsBI,gBAAA,KAtBJ,wBA0BI,MAAA,QEnCJ,YACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KAEA,aAAA,EACA,WAAA,KzBAE,cAAA,OyBIJ,kCAGM,YAAA,EzBoBF,0BAAA,OACA,uBAAA,OyBxBJ,iCzBSI,2BAAA,OACA,wBAAA,OyBVJ,6BAcI,QAAA,EACA,MAAA,KACA,iBAAA,QACA,aAAA,QAjBJ,+BAqBI,MAAA,QACA,eAAA,KACA,OAAA,YACA,iBAAA,KACA,aAAA,KAIJ,WACE,SAAA,SACA,QAAA,MACA,QAAA,MAAA,OACA,YAAA,KACA,YAAA,KACA,MAAA,QACA,iBAAA,KACA,OAAA,IAAA,MAAA,K9BzBE,iBAAA,iB8B4BA,MAAA,QACA,gBAAA,KACA,iBAAA,QACA,aAAA,KChDF,0BACE,QAAA,OAAA,OACA,UAAA,QAKE,iD1BqBF,0BAAA,MACA,uBAAA,M0BjBE,gD1BEF,2BAAA,MACA,wBAAA,M0BfF,0BACE,QAAA,OAAA,MACA,UAAA,QAKE,iD1BqBF,0BAAA,MACA,uBAAA,M0BjBE,gD1BEF,2BAAA,MACA,wBAAA,M2BbJ,OACE,QAAA,aACA,QAAA,MAAA,KACA,UAAA,IACA,YAAA,IACA,YAAA,EACA,MAAA,KACA,WAAA,OACA,YAAA,OACA,eAAA,S3BVE,cAAA,O2BCJ,aAcI,QAAA,KAKJ,YACE,SAAA,SACA,IAAA,KhCNE,cAAA,cgCaA,MAAA,KACA,gBAAA,KACA,OAAA,QASJ,YACE,cAAA,KACA,aAAA,K3B1CE,cAAA,M2BkDJ,eCnDE,iBAAA,QjCiBE,2BAAA,2BiCbE,iBAAA,QDmDN,eCvDE,iBAAA,QjCiBE,2BAAA,2BiCbE,iBAAA,QDuDN,eC3DE,iBAAA,QjCiBE,2BAAA,2BiCbE,iBAAA,QD2DN,YC/DE,iBAAA,QjCiBE,wBAAA,wBiCbE,iBAAA,QD+DN,eCnEE,iBAAA,QjCiBE,2BAAA,2BiCbE,iBAAA,QDmEN,cCvEE,iBAAA,QjCiBE,0BAAA,0BiCbE,iBAAA,QCPN,WACE,QAAA,KAAA,KACA,cAAA,KACA,iBAAA,Q7BCE,cAAA,MKoDA,yBwBxDF,WAOE,QAAA,KAAA,MAIJ,cACE,iBAAA,QAGF,iBACE,cAAA,EACA,aAAA,E7BbE,cAAA,E8BAJ,OACE,QAAA,OAAA,QACA,cAAA,KACA,OAAA,IAAA,MAAA,Y9BHE,cAAA,O8BQJ,eAEE,MAAA,QAIF,YACE,YAAA,IAQF,0BAGI,SAAA,SACA,IAAA,QACA,MAAA,SACA,QAAA,OAAA,QACA,MAAA,QASJ,eCxCE,iBAAA,QACA,aAAA,QACA,MAAA,QAEA,kBACE,iBAAA,QAEF,2BACE,MAAA,QDmCJ,YC3CE,iBAAA,QACA,aAAA,QACA,MAAA,QAEA,eACE,iBAAA,QAEF,wBACE,MAAA,QDsCJ,eC9CE,iBAAA,QACA,aAAA,QACA,MAAA,QAEA,kBACE,iBAAA,QAEF,2BACE,MAAA,QDyCJ,cCjDE,iBAAA,QACA,aAAA,QACA,MAAA,QAEA,iBACE,iBAAA,QAEF,0BACE,MAAA,QCVJ,wCACE,KAAO,oBAAA,KAAA,EACP,GAAK,oBAAA,EAAA,GAFP,mCACE,KAAO,oBAAA,KAAA,EACP,GAAK,oBAAA,EAAA,GAFP,gCACE,KAAO,oBAAA,KAAA,EACP,GAAK,oBAAA,EAAA,GAIP,UACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,SAAA,OACA,UAAA,OACA,YAAA,KACA,WAAA,OACA,iBAAA,QhCTE,cAAA,OgCYJ,cACE,OAAA,KACA,MAAA,KACA,iBAAA,QAIF,sBCYE,iBAAA,yKAAA,iBAAA,oKAAA,iBAAA,iKDVA,wBAAA,KAAA,KAAA,gBAAA,KAAA,KAIF,uBACE,kBAAA,qBAAA,GAAA,OAAA,SAAA,aAAA,qBAAA,GAAA,OAAA,SAAA,UAAA,qBAAA,GAAA,OAAA,SE9BF,OACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,MAAA,oBAAA,WAAA,eAAA,MAAA,YAAA,WAGF,YACE,iBAAA,EAAA,aAAA,EAAA,EAAA,GAAA,SAAA,EAAA,EAAA,GAAA,KAAA,EAAA,EAAA,GCFF,YACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,mBAAA,SAAA,sBAAA,OAAA,uBAAA,OAAA,mBAAA,OAAA,eAAA,OAGA,aAAA,EACA,cAAA,EASF,wBACE,MAAA,KACA,MAAA,QACA,WAAA,QAHF,iDAMI,MAAA,QxCLA,8BAAA,8BwCUA,MAAA,QACA,gBAAA,KACA,iBAAA,QAbJ,+BAiBI,MAAA,QACA,iBAAA,QASJ,iBACE,SAAA,SACA,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,IAAA,KAAA,cAAA,IAAA,KAAA,UAAA,IAAA,KACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OACA,QAAA,OAAA,QAEA,cAAA,KACA,iBAAA,KACA,OAAA,IAAA,MAAA,iBATF,6BnCpCI,wBAAA,OACA,uBAAA,OmCmCJ,4BAgBI,cAAA,EnCtCA,2BAAA,OACA,0BAAA,OLLA,uBAAA,uBwC+CA,gBAAA,KArBJ,0BAA2B,0BA0BvB,MAAA,QACA,OAAA,YACA,iBAAA,KA5BJ,mDAAoD,mDAgC9C,MAAA,QAhCN,gDAAiD,gDAmC3C,MAAA,QAnCN,wBAyCI,QAAA,EACA,MAAA,KACA,iBAAA,QACA,aAAA,QA5CJ,iDAAA,wDAAA,uDAkDM,MAAA,QAlDN,8CAsDM,MAAA,QAWN,mCAEI,aAAA,EACA,YAAA,EACA,cAAA,EAJJ,2DASM,WAAA,EATN,yDAeM,cAAA,EC3HJ,yBACE,MAAA,QACA,iBAAA,QAGF,0BAAA,+BACE,MAAA,QADF,mDAAA,wDAII,MAAA,QzCQF,gCAAA,gCAAA,qCAAA,qCyCJE,MAAA,QACA,iBAAA,QATJ,iCAAA,sCAaI,MAAA,KACA,iBAAA,QACA,aAAA,QApBJ,sBACE,MAAA,QACA,iBAAA,QAGF,uBAAA,4BACE,MAAA,QADF,gDAAA,qDAII,MAAA,QzCQF,6BAAA,6BAAA,kCAAA,kCyCJE,MAAA,QACA,iBAAA,QATJ,8BAAA,mCAaI,MAAA,KACA,iBAAA,QACA,aAAA,QApBJ,yBACE,MAAA,QACA,iBAAA,QAGF,0BAAA,+BACE,MAAA,QADF,mDAAA,wDAII,MAAA,QzCQF,gCAAA,gCAAA,qCAAA,qCyCJE,MAAA,QACA,iBAAA,QATJ,iCAAA,sCAaI,MAAA,KACA,iBAAA,QACA,aAAA,QApBJ,wBACE,MAAA,QACA,iBAAA,QAGF,yBAAA,8BACE,MAAA,QADF,kDAAA,uDAII,MAAA,QzCQF,+BAAA,+BAAA,oCAAA,oCyCJE,MAAA,QACA,iBAAA,QATJ,gCAAA,qCAaI,MAAA,KACA,iBAAA,QACA,aAAA,QCrBN,kBACE,SAAA,SACA,QAAA,MACA,MAAA,KACA,QAAA,EACA,SAAA,OALF,0BAQI,QAAA,MACA,QAAW,GATf,yCAAA,wBAAA,yBAAA,yBAAA,wBAiBI,SAAA,SACA,IAAA,EACA,OAAA,EACA,KAAA,EACA,MAAA,KACA,OAAA,KACA,OAAA,EAIJ,gCAEI,YAAA,WAIJ,gCAEI,YAAA,OAIJ,+BAEI,YAAA,IAIJ,+BAEI,YAAA,KCjDJ,OACE,MAAA,MACA,UAAA,OACA,YAAA,IACA,YAAA,EACA,MAAA,KACA,YAAA,EAAA,IAAA,EAAA,KACA,QAAA,G3CaE,aAAA,a2CVA,MAAA,KACA,gBAAA,KACA,OAAA,QACA,QAAA,IAUJ,aACE,QAAA,EACA,OAAA,QACA,WAAA,IACA,OAAA,EACA,mBAAA,KCrBF,YACE,SAAA,OAIF,OACE,SAAA,MACA,IAAA,EACA,MAAA,EACA,OAAA,EACA,KAAA,EACA,QAAA,KACA,QAAA,KACA,SAAA,OAGA,QAAA,EAXF,0BtCGM,mBAAA,kBAAA,IAAA,SAAA,WAAA,kBAAA,IAAA,SAAA,cAAA,aAAA,IAAA,SAAA,WAAA,UAAA,IAAA,SAAA,WAAA,UAAA,IAAA,SAAA,kBAAA,IAAA,SAAA,aAAA,IAAA,SsCgBF,kBAAA,kBAAA,aAAA,kBAAA,UAAA,kBAnBJ,0BAqByB,kBAAA,eAAA,aAAA,eAAA,UAAA,eAEzB,mBACE,WAAA,OACA,WAAA,KAIF,cACE,SAAA,SACA,MAAA,KACA,OAAA,KAIF,eACE,SAAA,SACA,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,mBAAA,SAAA,sBAAA,OAAA,uBAAA,OAAA,mBAAA,OAAA,eAAA,OACA,iBAAA,KACA,wBAAA,YAAA,gBAAA,YACA,OAAA,IAAA,MAAA,evClDE,cAAA,MuCsDF,QAAA,EAIF,gBACE,SAAA,MACA,IAAA,EACA,MAAA,EACA,OAAA,EACA,KAAA,EACA,QAAA,KACA,iBAAA,KAPF,qBAUW,QAAA,EAVX,qBAWW,QAAA,GAKX,cACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OACA,iBAAA,QAAA,wBAAA,cAAA,cAAA,QAAA,gBAAA,cACA,QAAA,KACA,cAAA,IAAA,MAAA,QAIF,aACE,cAAA,EACA,YAAA,IAKF,YACE,SAAA,SAGA,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KACA,QAAA,KAIF,cACE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OACA,iBAAA,IAAA,wBAAA,SAAA,cAAA,IAAA,gBAAA,SACA,QAAA,KACA,WAAA,IAAA,MAAA,QALF,iCAQyB,YAAA,OARzB,gCASwB,aAAA,OAIxB,yBACE,SAAA,SACA,IAAA,QACA,MAAA,KACA,OAAA,KACA,SAAA,OlCjEE,yBkCuEF,cACE,UAAA,MACA,OAAA,KAAA,KAOF,UAAY,UAAA,OlChFV,yBkCoFF,UAAY,UAAA,OC3Id,SACE,SAAA,SACA,QAAA,KACA,QAAA,MCHA,YAAA,cAAA,UAAA,mBAAA,WAAA,O/CqP4H,iB+CrP5H,MAAA,WAEA,WAAA,OACA,YAAA,IACA,eAAA,OACA,WAAA,KACA,YAAA,IACA,WAAA,KACA,WAAA,MACA,gBAAA,KACA,YAAA,KACA,eAAA,KACA,YAAA,OACA,WAAA,OACA,aAAA,ODPA,UAAA,QAEA,UAAA,WACA,QAAA,EAVF,cAYW,QAAA,GAZW,2CAAtB,qBAgBI,QAAA,IAAA,EACA,WAAA,KAjByC,kEAA7C,4CAoBM,OAAA,EACA,KAAA,IACA,YAAA,KACA,QAAW,GACX,aAAA,IAAA,IAAA,EACA,iBAAA,KAzBkB,yCAAxB,uBA8BI,QAAA,EAAA,IACA,YAAA,IA/B2C,gEAA/C,8CAkCM,IAAA,IACA,KAAA,EACA,WAAA,KACA,QAAW,GACX,aAAA,IAAA,IAAA,IAAA,EACA,mBAAA,KAvCmB,wCAAzB,wBA4CI,QAAA,IAAA,EACA,WAAA,IA7C4C,+DAAhD,+CAgDM,IAAA,EACA,KAAA,IACA,YAAA,KACA,QAAW,GACX,aAAA,EAAA,IAAA,IACA,oBAAA,KArDiB,0CAAvB,sBA0DI,QAAA,EAAA,IACA,YAAA,KA3D0C,iEAA9C,6CA8DM,IAAA,IACA,MAAA,EACA,WAAA,KACA,QAAW,GACX,aAAA,IAAA,EAAA,IAAA,IACA,kBAAA,KAMN,eACE,UAAA,MACA,QAAA,IAAA,IACA,MAAA,KACA,WAAA,OACA,iBAAA,KxC3EE,cAAA,OwCsEJ,uBASI,SAAA,SACA,MAAA,EACA,OAAA,EACA,aAAA,YACA,aAAA,MEvFJ,SACE,SAAA,SACA,IAAA,EACA,KAAA,EACA,QAAA,KACA,QAAA,MACA,UAAA,MACA,QAAA,IDNA,YAAA,cAAA,UAAA,mBAAA,WAAA,O/CqP4H,iB+CrP5H,MAAA,WAEA,WAAA,OACA,YAAA,IACA,eAAA,OACA,WAAA,KACA,YAAA,IACA,WAAA,KACA,WAAA,MACA,gBAAA,KACA,YAAA,KACA,eAAA,KACA,YAAA,OACA,WAAA,OACA,aAAA,OCJA,UAAA,QAEA,UAAA,WACA,iBAAA,KACA,wBAAA,YAAA,gBAAA,YACA,OAAA,IAAA,MAAA,e1CZE,cAAA,M0CJkB,2CAAtB,qBAyBI,WAAA,MAzB2G,kDAApD,mDAA7B,4BAA9B,6BA6BM,KAAA,IACA,oBAAA,EA9BwB,mDAA9B,6BAkCM,OAAA,MACA,YAAA,MACA,iBAAA,gBApCuB,kDAA7B,4BAwCM,OAAA,MACA,YAAA,MACA,iBAAA,KA1CkB,yCAAxB,uBAgDI,YAAA,KAhD6G,gDAAlD,iDAA/B,8BAAhC,+BAoDM,IAAA,IACA,kBAAA,EArD0B,iDAAhC,+BAyDM,KAAA,MACA,WAAA,MACA,mBAAA,gBA3DyB,gDAA/B,8BA+DM,KAAA,MACA,WAAA,MACA,mBAAA,KAjEmB,wCAAzB,wBAuEI,WAAA,KAvE8G,+CAAjD,gDAAhC,+BAAjC,gCA2EM,KAAA,IACA,iBAAA,EA5E2B,gDAAjC,gCAgFM,IAAA,MACA,YAAA,MACA,oBAAA,gBAlF0B,+CAAhC,+BAsFM,IAAA,MACA,YAAA,MACA,oBAAA,QAxF0C,+DAAhD,+CA6FM,SAAA,SACA,IAAA,EACA,KAAA,IACA,QAAA,MACA,MAAA,KACA,YAAA,MACA,QAAW,GACX,cAAA,IAAA,MAAA,QApGiB,0CAAvB,sBA0GI,YAAA,MA1G4G,iDAAnD,kDAA9B,6BAA/B,8BA8GM,IAAA,IACA,mBAAA,EA/GyB,kDAA/B,8BAmHM,MAAA,MACA,WAAA,MACA,kBAAA,gBArHwB,iDAA9B,6BAyHM,MAAA,MACA,WAAA,MACA,kBAAA,KAON,eACE,QAAA,IAAA,KACA,cAAA,EACA,UAAA,KACA,iBAAA,QACA,cAAA,IAAA,MAAA,Q1C7HE,wBAAA,kBACA,uBAAA,kB0CuHJ,qBAUI,QAAA,KAIJ,iBACE,QAAA,IAAA,KAQF,gBAAA,iBAEE,SAAA,SACA,QAAA,MACA,MAAA,EACA,OAAA,EACA,aAAA,YACA,aAAA,MAGF,iBACE,QAAW,GACX,aAAA,KAEF,gBACE,QAAW,GACX,aAAA,KCxKF,UACE,SAAA,SAGF,gBACE,SAAA,SACA,MAAA,KACA,SAAA,OAGF,eACE,SAAA,SACA,QAAA,KACA,MAAA,KCZA,8BDSA,e1CII,mBAAA,kBAAA,IAAA,YAAA,WAAA,kBAAA,IAAA,YAAA,cAAA,aAAA,IAAA,YAAA,WAAA,UAAA,IAAA,YAAA,WAAA,UAAA,IAAA,YAAA,kBAAA,IAAA,YAAA,aAAA,IAAA,Y0CGF,4BAAA,OAAA,oBAAA,OACA,oBAAA,OAAA,YAAA,QCVuC,qFDEzC,e1CII,mBAAA,kBAAA,IAAA,YAAA,WAAA,kBAAA,IAAA,YAAA,cAAA,aAAA,IAAA,YAAA,WAAA,UAAA,IAAA,YAAA,WAAA,UAAA,IAAA,YAAA,kBAAA,IAAA,YAAA,aAAA,IAAA,Y0CGF,4BAAA,OAAA,oBAAA,OACA,oBAAA,OAAA,YAAA,QAIJ,oBAAA,oBAAA,sBAGE,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KAGF,oBAAA,oBAEE,SAAA,SACA,IAAA,EC9BA,8BDmCA,uCAAA,wCAEE,kBAAA,mBAAA,UAAA,mBAGF,4BAAA,oBAEE,kBAAA,sBAAA,UAAA,sBAGF,2BAAA,oBAEE,kBAAA,uBAAA,UAAA,wBCxCuC,qFD4BzC,uCAAA,wCAEE,kBAAA,mBAAA,UAAA,mBAGF,4BAAA,oBAEE,kBAAA,sBAAA,UAAA,sBAGF,2BAAA,oBAEE,kBAAA,uBAAA,UAAA,wBASJ,uBAAA,uBAEE,SAAA,SACA,IAAA,EACA,OAAA,EAEA,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,kBAAA,OAAA,oBAAA,OAAA,eAAA,OAAA,YAAA,OACA,iBAAA,OAAA,wBAAA,OAAA,cAAA,OAAA,gBAAA,OACA,MAAA,IACA,MAAA,KACA,WAAA,OACA,QAAA,GhDlDE,6BAAA,6BAAA,6BAAA,6BgDwDA,MAAA,KACA,gBAAA,KACA,QAAA,EACA,QAAA,GAGJ,uBACE,KAAA,EAEF,uBACE,MAAA,EAIF,4BAAA,4BAEE,QAAA,aACA,MAAA,KACA,OAAA,KACA,WAAA,YAAA,UAAA,OAAA,OACA,wBAAA,KAAA,KAAA,gBAAA,KAAA,KAEF,4BACE,iBAAA,4LAEF,4BACE,iBAAA,8LASF,qBACE,SAAA,SACA,MAAA,EACA,OAAA,KACA,KAAA,EACA,QAAA,GACA,QAAA,YAAA,QAAA,aAAA,QAAA,YAAA,QAAA,KACA,iBAAA,OAAA,wBAAA,OAAA,cAAA,OAAA,gBAAA,OACA,aAAA,EAEA,aAAA,IACA,YAAA,IACA,WAAA,KAZF,wBAeI,SAAA,SACA,iBAAA,EAAA,aAAA,EAAA,EAAA,KAAA,SAAA,EAAA,EAAA,KAAA,KAAA,EAAA,EAAA,KACA,UAAA,KACA,OAAA,IACA,aAAA,IACA,YAAA,IACA,YAAA,OACA,OAAA,QACA,iBAAA,qBAvBJ,gCA2BM,SAAA,SACA,IAAA,MACA,KAAA,EACA,QAAA,aACA,MAAA,KACA,OAAA,KACA,QAAW,GAjCjB,+BAoCM,SAAA,SACA,OAAA,MACA,KAAA,EACA,QAAA,aACA,MAAA,KACA,OAAA,KACA,QAAW,GA1CjB,6BA+CI,iBAAA,KASJ,kBACE,SAAA,SACA,MAAA,IACA,OAAA,KACA,KAAA,IACA,QAAA,GACA,YAAA,KACA,eAAA,KACA,MAAA,KACA,WAAA,OEhLF,gBAAqB,eAAA,mBACrB,WAAqB,eAAA,cACrB,cAAqB,eAAA,iBACrB,cAAqB,eAAA,iBACrB,mBAAqB,eAAA,sBACrB,gBAAqB,eAAA,mBCDrB,UACE,iBAAA,QCFA,YACE,iBAAA,kBpDgBA,mBAAA,mBoDZE,iBAAA,kBALJ,YACE,iBAAA,kBpDgBA,mBAAA,mBoDZE,iBAAA,kBALJ,SACE,iBAAA,kBpDgBA,gBAAA,gBoDZE,iBAAA,kBALJ,YACE,iBAAA,kBpDgBA,mBAAA,mBoDZE,iBAAA,kBALJ,WACE,iBAAA,kBpDgBA,kBAAA,kBoDZE,iBAAA,kBALJ,YACE,iBAAA,kBpDgBA,mBAAA,mBoDZE,iBAAA,kBCJN,UAAmB,OAAA,YACnB,cAAmB,WAAA,YACnB,gBAAmB,aAAA,YACnB,iBAAmB,cAAA,YACnB,eAAmB,YAAA,YAMnB,ShDVI,cAAA,OgDaJ,ahDPI,wBAAA,OACA,uBAAA,OgDSJ,ehDHI,2BAAA,OACA,wBAAA,OgDKJ,gBhDCI,2BAAA,OACA,0BAAA,OgDCJ,chDKI,0BAAA,OACA,uBAAA,OgDFJ,gBACE,cAAA,IAGF,WACE,cAAA,ExBlCA,iBACE,QAAA,MACA,QAAW,GACX,MAAA,KyBIA,QAAE,QAAA,eACF,UAAE,QAAA,iBACF,gBAAE,QAAA,uBACF,SAAE,QAAA,gBACF,SAAE,QAAA,gBACF,cAAE,QAAA,qBACF,QAAE,QAAA,sBAAA,QAAA,uBAAA,QAAA,sBAAA,QAAA,eACF,eAAE,QAAA,6BAAA,QAAA,8BAAA,QAAA,6BAAA,QAAA,sB5CyCF,yB4ChDA,WAAE,QAAA,eACF,aAAE,QAAA,iBACF,mBAAE,QAAA,uBACF,YAAE,QAAA,gBACF,YAAE,QAAA,gBACF,iBAAE,QAAA,qBACF,WAAE,QAAA,sBAAA,QAAA,uBAAA,QAAA,sBAAA,QAAA,eACF,kBAAE,QAAA,6BAAA,QAAA,8BAAA,QAAA,6BAAA,QAAA,uB5CyCF,yB4ChDA,WAAE,QAAA,eACF,aAAE,QAAA,iBACF,mBAAE,QAAA,uBACF,YAAE,QAAA,gBACF,YAAE,QAAA,gBACF,iBAAE,QAAA,qBACF,WAAE,QAAA,sBAAA,QAAA,uBAAA,QAAA,sBAAA,QAAA,eACF,kBAAE,QAAA,6BAAA,QAAA,8BAAA,QAAA,6BAAA,QAAA,uB5CyCF,yB4ChDA,WAAE,QAAA,eACF,aAAE,QAAA,iBACF,mBAAE,QAAA,uBACF,YAAE,QAAA,gBACF,YAAE,QAAA,gBACF,iBAAE,QAAA,qBACF,WAAE,QAAA,sBAAA,QAAA,uBAAA,QAAA,sBAAA,QAAA,eACF,kBAAE,QAAA,6BAAA,QAAA,8BAAA,QAAA,6BAAA,QAAA,uB5CyCF,0B4ChDA,WAAE,QAAA,eACF,aAAE,QAAA,iBACF,mBAAE,QAAA,uBACF,YAAE,QAAA,gBACF,YAAE,QAAA,gBACF,iBAAE,QAAA,qBACF,WAAE,QAAA,sBAAA,QAAA,uBAAA,QAAA,sBAAA,QAAA,eACF,kBAAE,QAAA,6BAAA,QAAA,8BAAA,QAAA,6BAAA,QAAA,uBCPF,YAAE,0BAAA,EAAA,cAAA,GAAA,eAAA,GAAA,MAAA,GACF,WAAE,0BAAA,EAAA,cAAA,EAAA,eAAA,EAAA,MAAA,EACF,gBAAE,0BAAA,EAAA,cAAA,EAAA,eAAA,EAAA,MAAA,EAEF,UAAE,mBAAA,qBAAA,sBAAA,iBAAA,uBAAA,cAAA,mBAAA,cAAA,eAAA,cACF,aAAE,mBAAA,mBAAA,sBAAA,iBAAA,uBAAA,iBAAA,mBAAA,iBAAA,eAAA,iBACF,kBAAE,mBAAA,qBAAA,sBAAA,kBAAA,uBAAA,sBAAA,mBAAA,sBAAA,eAAA,sBACF,qBAAE,mBAAA,mBAAA,sBAAA,kBAAA,uBAAA,yBAAA,mBAAA,yBAAA,eAAA,yBAEF,WAAE,kBAAA,eAAA,cAAA,eAAA,UAAA,eACF,aAAE,kBAAA,iBAAA,cAAA,iBAAA,UAAA,iBACF,mBAAE,kBAAA,uBAAA,cAAA,uBAAA,UAAA,uBAEF,uBAAE,iBAAA,gBAAA,wBAAA,qBAAA,cAAA,gBAAA,gBAAA,qBACF,qBAAE,iBAAA,cAAA,wBAAA,mBAAA,cAAA,cAAA,gBAAA,mBACF,wBAAE,iBAAA,iBAAA,wBAAA,iBAAA,cAAA,iBAAA,gBAAA,iBACF,yBAAE,iBAAA,kBAAA,wBAAA,wBAAA,cAAA,kBAAA,gBAAA,wBACF,wBAAE,wBAAA,uBAAA,cAAA,qBAAA,gBAAA,uBAEF,mBAAE,kBAAA,gBAAA,oBAAA,qBAAA,eAAA,gBAAA,YAAA,qBACF,iBAAE,kBAAA,cAAA,oBAAA,mBAAA,eAAA,cAAA,YAAA,mBACF,oBAAE,kBAAA,iBAAA,oBAAA,iBAAA,eAAA,iBAAA,YAAA,iBACF,sBAAE,kBAAA,mBAAA,oBAAA,mBAAA,eAAA,mBAAA,YAAA,mBACF,qBAAE,kBAAA,kBAAA,oBAAA,kBAAA,eAAA,kBAAA,YAAA,kBAEF,qBAAE,sBAAA,qBAAA,mBAAA,gBAAA,cAAA,qBACF,mBAAE,sBAAA,mBAAA,mBAAA,cAAA,cAAA,mBACF,sBAAE,sBAAA,iBAAA,mBAAA,iBAAA,cAAA,iBACF,uBAAE,sBAAA,wBAAA,mBAAA,kBAAA,cAAA,wBACF,sBAAE,sBAAA,uBAAA,mBAAA,qBAAA,cAAA,uBACF,uBAAE,sBAAA,kBAAA,mBAAA,kBAAA,cAAA,kBAEF,iBAAE,mBAAA,eAAA,oBAAA,eAAA,mBAAA,eAAA,WAAA,eACF,kBAAE,mBAAA,qBAAA,oBAAA,gBAAA,WAAA,qBACF,gBAAE,mBAAA,mBAAA,oBAAA,cAAA,WAAA,mBACF,mBAAE,mBAAA,iBAAA,oBAAA,iBAAA,mBAAA,iBAAA,WAAA,iBACF,qBAAE,mBAAA,mBAAA,oBAAA,mBAAA,WAAA,mBACF,oBAAE,mBAAA,kBAAA,oBAAA,kBAAA,mBAAA,kBAAA,WAAA,kB7CWF,yB6ChDA,eAAE,0BAAA,EAAA,cAAA,GAAA,eAAA,GAAA,MAAA,GACF,cAAE,0BAAA,EAAA,cAAA,EAAA,eAAA,EAAA,MAAA,EACF,mBAAE,0BAAA,EAAA,cAAA,EAAA,eAAA,EAAA,MAAA,EAEF,aAAE,mBAAA,qBAAA,sBAAA,iBAAA,uBAAA,cAAA,mBAAA,cAAA,eAAA,cACF,gBAAE,mBAAA,mBAAA,sBAAA,iBAAA,uBAAA,iBAAA,mBAAA,iBAAA,eAAA,iBACF,qBAAE,mBAAA,qBAAA,sBAAA,kBAAA,uBAAA,sBAAA,mBAAA,sBAAA,eAAA,sBACF,wBAAE,mBAAA,mBAAA,sBAAA,kBAAA,uBAAA,yBAAA,mBAAA,yBAAA,eAAA,yBAEF,cAAE,kBAAA,eAAA,cAAA,eAAA,UAAA,eACF,gBAAE,kBAAA,iBAAA,cAAA,iBAAA,UAAA,iBACF,sBAAE,kBAAA,uBAAA,cAAA,uBAAA,UAAA,uBAEF,0BAAE,iBAAA,gBAAA,wBAAA,qBAAA,cAAA,gBAAA,gBAAA,qBACF,wBAAE,iBAAA,cAAA,wBAAA,mBAAA,cAAA,cAAA,gBAAA,mBACF,2BAAE,iBAAA,iBAAA,wBAAA,iBAAA,cAAA,iBAAA,gBAAA,iBACF,4BAAE,iBAAA,kBAAA,wBAAA,wBAAA,cAAA,kBAAA,gBAAA,wBACF,2BAAE,wBAAA,uBAAA,cAAA,qBAAA,gBAAA,uBAEF,sBAAE,kBAAA,gBAAA,oBAAA,qBAAA,eAAA,gBAAA,YAAA,qBACF,oBAAE,kBAAA,cAAA,oBAAA,mBAAA,eAAA,cAAA,YAAA,mBACF,uBAAE,kBAAA,iBAAA,oBAAA,iBAAA,eAAA,iBAAA,YAAA,iBACF,yBAAE,kBAAA,mBAAA,oBAAA,mBAAA,eAAA,mBAAA,YAAA,mBACF,wBAAE,kBAAA,kBAAA,oBAAA,kBAAA,eAAA,kBAAA,YAAA,kBAEF,wBAAE,sBAAA,qBAAA,mBAAA,gBAAA,cAAA,qBACF,sBAAE,sBAAA,mBAAA,mBAAA,cAAA,cAAA,mBACF,yBAAE,sBAAA,iBAAA,mBAAA,iBAAA,cAAA,iBACF,0BAAE,sBAAA,wBAAA,mBAAA,kBAAA,cAAA,wBACF,yBAAE,sBAAA,uBAAA,mBAAA,qBAAA,cAAA,uBACF,0BAAE,sBAAA,kBAAA,mBAAA,kBAAA,cAAA,kBAEF,oBAAE,mBAAA,eAAA,oBAAA,eAAA,mBAAA,eAAA,WAAA,eACF,qBAAE,mBAAA,qBAAA,oBAAA,gBAAA,WAAA,qBACF,mBAAE,mBAAA,mBAAA,oBAAA,cAAA,WAAA,mBACF,sBAAE,mBAAA,iBAAA,oBAAA,iBAAA,mBAAA,iBAAA,WAAA,iBACF,wBAAE,mBAAA,mBAAA,oBAAA,mBAAA,WAAA,mBACF,uBAAE,mBAAA,kBAAA,oBAAA,kBAAA,mBAAA,kBAAA,WAAA,mB7CWF,yB6ChDA,eAAE,0BAAA,EAAA,cAAA,GAAA,eAAA,GAAA,MAAA,GACF,cAAE,0BAAA,EAAA,cAAA,EAAA,eAAA,EAAA,MAAA,EACF,mBAAE,0BAAA,EAAA,cAAA,EAAA,eAAA,EAAA,MAAA,EAEF,aAAE,mBAAA,qBAAA,sBAAA,iBAAA,uBAAA,cAAA,mBAAA,cAAA,eAAA,cACF,gBAAE,mBAAA,mBAAA,sBAAA,iBAAA,uBAAA,iBAAA,mBAAA,iBAAA,eAAA,iBACF,qBAAE,mBAAA,qBAAA,sBAAA,kBAAA,uBAAA,sBAAA,mBAAA,sBAAA,eAAA,sBACF,wBAAE,mBAAA,mBAAA,sBAAA,kBAAA,uBAAA,yBAAA,mBAAA,yBAAA,eAAA,yBAEF,cAAE,kBAAA,eAAA,cAAA,eAAA,UAAA,eACF,gBAAE,kBAAA,iBAAA,cAAA,iBAAA,UAAA,iBACF,sBAAE,kBAAA,uBAAA,cAAA,uBAAA,UAAA,uBAEF,0BAAE,iBAAA,gBAAA,wBAAA,qBAAA,cAAA,gBAAA,gBAAA,qBACF,wBAAE,iBAAA,cAAA,wBAAA,mBAAA,cAAA,cAAA,gBAAA,mBACF,2BAAE,iBAAA,iBAAA,wBAAA,iBAAA,cAAA,iBAAA,gBAAA,iBACF,4BAAE,iBAAA,kBAAA,wBAAA,wBAAA,cAAA,kBAAA,gBAAA,wBACF,2BAAE,wBAAA,uBAAA,cAAA,qBAAA,gBAAA,uBAEF,sBAAE,kBAAA,gBAAA,oBAAA,qBAAA,eAAA,gBAAA,YAAA,qBACF,oBAAE,kBAAA,cAAA,oBAAA,mBAAA,eAAA,cAAA,YAAA,mBACF,uBAAE,kBAAA,iBAAA,oBAAA,iBAAA,eAAA,iBAAA,YAAA,iBACF,yBAAE,kBAAA,mBAAA,oBAAA,mBAAA,eAAA,mBAAA,YAAA,mBACF,wBAAE,kBAAA,kBAAA,oBAAA,kBAAA,eAAA,kBAAA,YAAA,kBAEF,wBAAE,sBAAA,qBAAA,mBAAA,gBAAA,cAAA,qBACF,sBAAE,sBAAA,mBAAA,mBAAA,cAAA,cAAA,mBACF,yBAAE,sBAAA,iBAAA,mBAAA,iBAAA,cAAA,iBACF,0BAAE,sBAAA,wBAAA,mBAAA,kBAAA,cAAA,wBACF,yBAAE,sBAAA,uBAAA,mBAAA,qBAAA,cAAA,uBACF,0BAAE,sBAAA,kBAAA,mBAAA,kBAAA,cAAA,kBAEF,oBAAE,mBAAA,eAAA,oBAAA,eAAA,mBAAA,eAAA,WAAA,eACF,qBAAE,mBAAA,qBAAA,oBAAA,gBAAA,WAAA,qBACF,mBAAE,mBAAA,mBAAA,oBAAA,cAAA,WAAA,mBACF,sBAAE,mBAAA,iBAAA,oBAAA,iBAAA,mBAAA,iBAAA,WAAA,iBACF,wBAAE,mBAAA,mBAAA,oBAAA,mBAAA,WAAA,mBACF,uBAAE,mBAAA,kBAAA,oBAAA,kBAAA,mBAAA,kBAAA,WAAA,mB7CWF,yB6ChDA,eAAE,0BAAA,EAAA,cAAA,GAAA,eAAA,GAAA,MAAA,GACF,cAAE,0BAAA,EAAA,cAAA,EAAA,eAAA,EAAA,MAAA,EACF,mBAAE,0BAAA,EAAA,cAAA,EAAA,eAAA,EAAA,MAAA,EAEF,aAAE,mBAAA,qBAAA,sBAAA,iBAAA,uBAAA,cAAA,mBAAA,cAAA,eAAA,cACF,gBAAE,mBAAA,mBAAA,sBAAA,iBAAA,uBAAA,iBAAA,mBAAA,iBAAA,eAAA,iBACF,qBAAE,mBAAA,qBAAA,sBAAA,kBAAA,uBAAA,sBAAA,mBAAA,sBAAA,eAAA,sBACF,wBAAE,mBAAA,mBAAA,sBAAA,kBAAA,uBAAA,yBAAA,mBAAA,yBAAA,eAAA,yBAEF,cAAE,kBAAA,eAAA,cAAA,eAAA,UAAA,eACF,gBAAE,kBAAA,iBAAA,cAAA,iBAAA,UAAA,iBACF,sBAAE,kBAAA,uBAAA,cAAA,uBAAA,UAAA,uBAEF,0BAAE,iBAAA,gBAAA,wBAAA,qBAAA,cAAA,gBAAA,gBAAA,qBACF,wBAAE,iBAAA,cAAA,wBAAA,mBAAA,cAAA,cAAA,gBAAA,mBACF,2BAAE,iBAAA,iBAAA,wBAAA,iBAAA,cAAA,iBAAA,gBAAA,iBACF,4BAAE,iBAAA,kBAAA,wBAAA,wBAAA,cAAA,kBAAA,gBAAA,wBACF,2BAAE,wBAAA,uBAAA,cAAA,qBAAA,gBAAA,uBAEF,sBAAE,kBAAA,gBAAA,oBAAA,qBAAA,eAAA,gBAAA,YAAA,qBACF,oBAAE,kBAAA,cAAA,oBAAA,mBAAA,eAAA,cAAA,YAAA,mBACF,uBAAE,kBAAA,iBAAA,oBAAA,iBAAA,eAAA,iBAAA,YAAA,iBACF,yBAAE,kBAAA,mBAAA,oBAAA,mBAAA,eAAA,mBAAA,YAAA,mBACF,wBAAE,kBAAA,kBAAA,oBAAA,kBAAA,eAAA,kBAAA,YAAA,kBAEF,wBAAE,sBAAA,qBAAA,mBAAA,gBAAA,cAAA,qBACF,sBAAE,sBAAA,mBAAA,mBAAA,cAAA,cAAA,mBACF,yBAAE,sBAAA,iBAAA,mBAAA,iBAAA,cAAA,iBACF,0BAAE,sBAAA,wBAAA,mBAAA,kBAAA,cAAA,wBACF,yBAAE,sBAAA,uBAAA,mBAAA,qBAAA,cAAA,uBACF,0BAAE,sBAAA,kBAAA,mBAAA,kBAAA,cAAA,kBAEF,oBAAE,mBAAA,eAAA,oBAAA,eAAA,mBAAA,eAAA,WAAA,eACF,qBAAE,mBAAA,qBAAA,oBAAA,gBAAA,WAAA,qBACF,mBAAE,mBAAA,mBAAA,oBAAA,cAAA,WAAA,mBACF,sBAAE,mBAAA,iBAAA,oBAAA,iBAAA,mBAAA,iBAAA,WAAA,iBACF,wBAAE,mBAAA,mBAAA,oBAAA,mBAAA,WAAA,mBACF,uBAAE,mBAAA,kBAAA,oBAAA,kBAAA,mBAAA,kBAAA,WAAA,mB7CWF,0B6ChDA,eAAE,0BAAA,EAAA,cAAA,GAAA,eAAA,GAAA,MAAA,GACF,cAAE,0BAAA,EAAA,cAAA,EAAA,eAAA,EAAA,MAAA,EACF,mBAAE,0BAAA,EAAA,cAAA,EAAA,eAAA,EAAA,MAAA,EAEF,aAAE,mBAAA,qBAAA,sBAAA,iBAAA,uBAAA,cAAA,mBAAA,cAAA,eAAA,cACF,gBAAE,mBAAA,mBAAA,sBAAA,iBAAA,uBAAA,iBAAA,mBAAA,iBAAA,eAAA,iBACF,qBAAE,mBAAA,qBAAA,sBAAA,kBAAA,uBAAA,sBAAA,mBAAA,sBAAA,eAAA,sBACF,wBAAE,mBAAA,mBAAA,sBAAA,kBAAA,uBAAA,yBAAA,mBAAA,yBAAA,eAAA,yBAEF,cAAE,kBAAA,eAAA,cAAA,eAAA,UAAA,eACF,gBAAE,kBAAA,iBAAA,cAAA,iBAAA,UAAA,iBACF,sBAAE,kBAAA,uBAAA,cAAA,uBAAA,UAAA,uBAEF,0BAAE,iBAAA,gBAAA,wBAAA,qBAAA,cAAA,gBAAA,gBAAA,qBACF,wBAAE,iBAAA,cAAA,wBAAA,mBAAA,cAAA,cAAA,gBAAA,mBACF,2BAAE,iBAAA,iBAAA,wBAAA,iBAAA,cAAA,iBAAA,gBAAA,iBACF,4BAAE,iBAAA,kBAAA,wBAAA,wBAAA,cAAA,kBAAA,gBAAA,wBACF,2BAAE,wBAAA,uBAAA,cAAA,qBAAA,gBAAA,uBAEF,sBAAE,kBAAA,gBAAA,oBAAA,qBAAA,eAAA,gBAAA,YAAA,qBACF,oBAAE,kBAAA,cAAA,oBAAA,mBAAA,eAAA,cAAA,YAAA,mBACF,uBAAE,kBAAA,iBAAA,oBAAA,iBAAA,eAAA,iBAAA,YAAA,iBACF,yBAAE,kBAAA,mBAAA,oBAAA,mBAAA,eAAA,mBAAA,YAAA,mBACF,wBAAE,kBAAA,kBAAA,oBAAA,kBAAA,eAAA,kBAAA,YAAA,kBAEF,wBAAE,sBAAA,qBAAA,mBAAA,gBAAA,cAAA,qBACF,sBAAE,sBAAA,mBAAA,mBAAA,cAAA,cAAA,mBACF,yBAAE,sBAAA,iBAAA,mBAAA,iBAAA,cAAA,iBACF,0BAAE,sBAAA,wBAAA,mBAAA,kBAAA,cAAA,wBACF,yBAAE,sBAAA,uBAAA,mBAAA,qBAAA,cAAA,uBACF,0BAAE,sBAAA,kBAAA,mBAAA,kBAAA,cAAA,kBAEF,oBAAE,mBAAA,eAAA,oBAAA,eAAA,mBAAA,eAAA,WAAA,eACF,qBAAE,mBAAA,qBAAA,oBAAA,gBAAA,WAAA,qBACF,mBAAE,mBAAA,mBAAA,oBAAA,cAAA,WAAA,mBACF,sBAAE,mBAAA,iBAAA,oBAAA,iBAAA,mBAAA,iBAAA,WAAA,iBACF,wBAAE,mBAAA,mBAAA,oBAAA,mBAAA,WAAA,mBACF,uBAAE,mBAAA,kBAAA,oBAAA,kBAAA,mBAAA,kBAAA,WAAA,mBCzCF,YCHF,MAAA,eDIE,aCDF,MAAA,gBDEE,YCCF,MAAA,e/CiDE,yB8CpDA,eCHF,MAAA,eDIE,gBCDF,MAAA,gBDEE,eCCF,MAAA,gB/CiDE,yB8CpDA,eCHF,MAAA,eDIE,gBCDF,MAAA,gBDEE,eCCF,MAAA,gB/CiDE,yB8CpDA,eCHF,MAAA,eDIE,gBCDF,MAAA,gBDEE,eCCF,MAAA,gB/CiDE,0B8CpDA,eCHF,MAAA,eDIE,gBCDF,MAAA,gBDEE,eCCF,MAAA,gBCLF,WACE,SAAA,MACA,IAAA,EACA,MAAA,EACA,KAAA,EACA,QAAA,KAGF,cACE,SAAA,MACA,MAAA,EACA,OAAA,EACA,KAAA,EACA,QAAA,KAGF,YACE,SAAA,eAAA,SAAA,OACA,IAAA,EACA,QAAA,KCjBF,SCCE,SAAA,SACA,MAAA,IACA,OAAA,IACA,QAAA,EACA,OAAA,KACA,SAAA,OACA,KAAA,cACA,OAAA,EAUA,0BAAA,yBAEE,SAAA,OACA,MAAA,KACA,OAAA,KACA,OAAA,EACA,SAAA,QACA,KAAA,KCzBA,MAAE,MAAA,cAAF,MAAE,MAAA,cAAF,MAAE,MAAA,cAAF,OAAE,MAAA,eAAF,MAAE,OAAA,cAAF,MAAE,OAAA,cAAF,MAAE,OAAA,cAAF,OAAE,OAAA,eAIN,QAAU,UAAA,eACV,QAAU,WAAA,eCEF,KAAE,OAAA,EAAA,YACF,MAAE,WAAA,YACF,MAAE,aAAA,YACF,MAAE,cAAA,YACF,MAAE,YAAA,YACF,MACE,aAAA,YACA,YAAA,YAEF,MACE,WAAA,YACA,cAAA,YAXF,KAAE,OAAA,OAAA,iBACF,MAAE,WAAA,iBACF,MAAE,aAAA,iBACF,MAAE,cAAA,iBACF,MAAE,YAAA,iBACF,MACE,aAAA,iBACA,YAAA,iBAEF,MACE,WAAA,iBACA,cAAA,iBAXF,KAAE,OAAA,MAAA,gBACF,MAAE,WAAA,gBACF,MAAE,aAAA,gBACF,MAAE,cAAA,gBACF,MAAE,YAAA,gBACF,MACE,aAAA,gBACA,YAAA,gBAEF,MACE,WAAA,gBACA,cAAA,gBAXF,KAAE,OAAA,KAAA,eACF,MAAE,WAAA,eACF,MAAE,aAAA,eACF,MAAE,cAAA,eACF,MAAE,YAAA,eACF,MACE,aAAA,eACA,YAAA,eAEF,MACE,WAAA,eACA,cAAA,eAXF,KAAE,OAAA,OAAA,iBACF,MAAE,WAAA,iBACF,MAAE,aAAA,iBACF,MAAE,cAAA,iBACF,MAAE,YAAA,iBACF,MACE,aAAA,iBACA,YAAA,iBAEF,MACE,WAAA,iBACA,cAAA,iBAXF,KAAE,OAAA,KAAA,eACF,MAAE,WAAA,eACF,MAAE,aAAA,eACF,MAAE,cAAA,eACF,MAAE,YAAA,eACF,MACE,aAAA,eACA,YAAA,eAEF,MACE,WAAA,eACA,cAAA,eAXF,KAAE,QAAA,EAAA,YACF,MAAE,YAAA,YACF,MAAE,cAAA,YACF,MAAE,eAAA,YACF,MAAE,aAAA,YACF,MACE,cAAA,YACA,aAAA,YAEF,MACE,YAAA,YACA,eAAA,YAXF,KAAE,QAAA,OAAA,iBACF,MAAE,YAAA,iBACF,MAAE,cAAA,iBACF,MAAE,eAAA,iBACF,MAAE,aAAA,iBACF,MACE,cAAA,iBACA,aAAA,iBAEF,MACE,YAAA,iBACA,eAAA,iBAXF,KAAE,QAAA,MAAA,gBACF,MAAE,YAAA,gBACF,MAAE,cAAA,gBACF,MAAE,eAAA,gBACF,MAAE,aAAA,gBACF,MACE,cAAA,gBACA,aAAA,gBAEF,MACE,YAAA,gBACA,eAAA,gBAXF,KAAE,QAAA,KAAA,eACF,MAAE,YAAA,eACF,MAAE,cAAA,eACF,MAAE,eAAA,eACF,MAAE,aAAA,eACF,MACE,cAAA,eACA,aAAA,eAEF,MACE,YAAA,eACA,eAAA,eAXF,KAAE,QAAA,OAAA,iBACF,MAAE,YAAA,iBACF,MAAE,cAAA,iBACF,MAAE,eAAA,iBACF,MAAE,aAAA,iBACF,MACE,cAAA,iBACA,aAAA,iBAEF,MACE,YAAA,iBACA,eAAA,iBAXF,KAAE,QAAA,KAAA,eACF,MAAE,YAAA,eACF,MAAE,cAAA,eACF,MAAE,eAAA,eACF,MAAE,aAAA,eACF,MACE,cAAA,eACA,aAAA,eAEF,MACE,YAAA,eACA,eAAA,eAMN,QAAE,OAAA,eACF,SAAE,WAAA,eACF,SAAE,aAAA,eACF,SAAE,cAAA,eACF,SAAE,YAAA,eACF,SACE,aAAA,eACA,YAAA,eAEF,SACE,WAAA,eACA,cAAA,epDiBF,yBoD7CI,QAAE,OAAA,EAAA,YACF,SAAE,WAAA,YACF,SAAE,aAAA,YACF,SAAE,cAAA,YACF,SAAE,YAAA,YACF,SACE,aAAA,YACA,YAAA,YAEF,SACE,WAAA,YACA,cAAA,YAXF,QAAE,OAAA,OAAA,iBACF,SAAE,WAAA,iBACF,SAAE,aAAA,iBACF,SAAE,cAAA,iBACF,SAAE,YAAA,iBACF,SACE,aAAA,iBACA,YAAA,iBAEF,SACE,WAAA,iBACA,cAAA,iBAXF,QAAE,OAAA,MAAA,gBACF,SAAE,WAAA,gBACF,SAAE,aAAA,gBACF,SAAE,cAAA,gBACF,SAAE,YAAA,gBACF,SACE,aAAA,gBACA,YAAA,gBAEF,SACE,WAAA,gBACA,cAAA,gBAXF,QAAE,OAAA,KAAA,eACF,SAAE,WAAA,eACF,SAAE,aAAA,eACF,SAAE,cAAA,eACF,SAAE,YAAA,eACF,SACE,aAAA,eACA,YAAA,eAEF,SACE,WAAA,eACA,cAAA,eAXF,QAAE,OAAA,OAAA,iBACF,SAAE,WAAA,iBACF,SAAE,aAAA,iBACF,SAAE,cAAA,iBACF,SAAE,YAAA,iBACF,SACE,aAAA,iBACA,YAAA,iBAEF,SACE,WAAA,iBACA,cAAA,iBAXF,QAAE,OAAA,KAAA,eACF,SAAE,WAAA,eACF,SAAE,aAAA,eACF,SAAE,cAAA,eACF,SAAE,YAAA,eACF,SACE,aAAA,eACA,YAAA,eAEF,SACE,WAAA,eACA,cAAA,eAXF,QAAE,QAAA,EAAA,YACF,SAAE,YAAA,YACF,SAAE,cAAA,YACF,SAAE,eAAA,YACF,SAAE,aAAA,YACF,SACE,cAAA,YACA,aAAA,YAEF,SACE,YAAA,YACA,eAAA,YAXF,QAAE,QAAA,OAAA,iBACF,SAAE,YAAA,iBACF,SAAE,cAAA,iBACF,SAAE,eAAA,iBACF,SAAE,aAAA,iBACF,SACE,cAAA,iBACA,aAAA,iBAEF,SACE,YAAA,iBACA,eAAA,iBAXF,QAAE,QAAA,MAAA,gBACF,SAAE,YAAA,gBACF,SAAE,cAAA,gBACF,SAAE,eAAA,gBACF,SAAE,aAAA,gBACF,SACE,cAAA,gBACA,aAAA,gBAEF,SACE,YAAA,gBACA,eAAA,gBAXF,QAAE,QAAA,KAAA,eACF,SAAE,YAAA,eACF,SAAE,cAAA,eACF,SAAE,eAAA,eACF,SAAE,aAAA,eACF,SACE,cAAA,eACA,aAAA,eAEF,SACE,YAAA,eACA,eAAA,eAXF,QAAE,QAAA,OAAA,iBACF,SAAE,YAAA,iBACF,SAAE,cAAA,iBACF,SAAE,eAAA,iBACF,SAAE,aAAA,iBACF,SACE,cAAA,iBACA,aAAA,iBAEF,SACE,YAAA,iBACA,eAAA,iBAXF,QAAE,QAAA,KAAA,eACF,SAAE,YAAA,eACF,SAAE,cAAA,eACF,SAAE,eAAA,eACF,SAAE,aAAA,eACF,SACE,cAAA,eACA,aAAA,eAEF,SACE,YAAA,eACA,eAAA,eAMN,WAAE,OAAA,eACF,YAAE,WAAA,eACF,YAAE,aAAA,eACF,YAAE,cAAA,eACF,YAAE,YAAA,eACF,YACE,aAAA,eACA,YAAA,eAEF,YACE,WAAA,eACA,cAAA,gBpDiBF,yBoD7CI,QAAE,OAAA,EAAA,YACF,SAAE,WAAA,YACF,SAAE,aAAA,YACF,SAAE,cAAA,YACF,SAAE,YAAA,YACF,SACE,aAAA,YACA,YAAA,YAEF,SACE,WAAA,YACA,cAAA,YAXF,QAAE,OAAA,OAAA,iBACF,SAAE,WAAA,iBACF,SAAE,aAAA,iBACF,SAAE,cAAA,iBACF,SAAE,YAAA,iBACF,SACE,aAAA,iBACA,YAAA,iBAEF,SACE,WAAA,iBACA,cAAA,iBAXF,QAAE,OAAA,MAAA,gBACF,SAAE,WAAA,gBACF,SAAE,aAAA,gBACF,SAAE,cAAA,gBACF,SAAE,YAAA,gBACF,SACE,aAAA,gBACA,YAAA,gBAEF,SACE,WAAA,gBACA,cAAA,gBAXF,QAAE,OAAA,KAAA,eACF,SAAE,WAAA,eACF,SAAE,aAAA,eACF,SAAE,cAAA,eACF,SAAE,YAAA,eACF,SACE,aAAA,eACA,YAAA,eAEF,SACE,WAAA,eACA,cAAA,eAXF,QAAE,OAAA,OAAA,iBACF,SAAE,WAAA,iBACF,SAAE,aAAA,iBACF,SAAE,cAAA,iBACF,SAAE,YAAA,iBACF,SACE,aAAA,iBACA,YAAA,iBAEF,SACE,WAAA,iBACA,cAAA,iBAXF,QAAE,OAAA,KAAA,eACF,SAAE,WAAA,eACF,SAAE,aAAA,eACF,SAAE,cAAA,eACF,SAAE,YAAA,eACF,SACE,aAAA,eACA,YAAA,eAEF,SACE,WAAA,eACA,cAAA,eAXF,QAAE,QAAA,EAAA,YACF,SAAE,YAAA,YACF,SAAE,cAAA,YACF,SAAE,eAAA,YACF,SAAE,aAAA,YACF,SACE,cAAA,YACA,aAAA,YAEF,SACE,YAAA,YACA,eAAA,YAXF,QAAE,QAAA,OAAA,iBACF,SAAE,YAAA,iBACF,SAAE,cAAA,iBACF,SAAE,eAAA,iBACF,SAAE,aAAA,iBACF,SACE,cAAA,iBACA,aAAA,iBAEF,SACE,YAAA,iBACA,eAAA,iBAXF,QAAE,QAAA,MAAA,gBACF,SAAE,YAAA,gBACF,SAAE,cAAA,gBACF,SAAE,eAAA,gBACF,SAAE,aAAA,gBACF,SACE,cAAA,gBACA,aAAA,gBAEF,SACE,YAAA,gBACA,eAAA,gBAXF,QAAE,QAAA,KAAA,eACF,SAAE,YAAA,eACF,SAAE,cAAA,eACF,SAAE,eAAA,eACF,SAAE,aAAA,eACF,SACE,cAAA,eACA,aAAA,eAEF,SACE,YAAA,eACA,eAAA,eAXF,QAAE,QAAA,OAAA,iBACF,SAAE,YAAA,iBACF,SAAE,cAAA,iBACF,SAAE,eAAA,iBACF,SAAE,aAAA,iBACF,SACE,cAAA,iBACA,aAAA,iBAEF,SACE,YAAA,iBACA,eAAA,iBAXF,QAAE,QAAA,KAAA,eACF,SAAE,YAAA,eACF,SAAE,cAAA,eACF,SAAE,eAAA,eACF,SAAE,aAAA,eACF,SACE,cAAA,eACA,aAAA,eAEF,SACE,YAAA,eACA,eAAA,eAMN,WAAE,OAAA,eACF,YAAE,WAAA,eACF,YAAE,aAAA,eACF,YAAE,cAAA,eACF,YAAE,YAAA,eACF,YACE,aAAA,eACA,YAAA,eAEF,YACE,WAAA,eACA,cAAA,gBpDiBF,yBoD7CI,QAAE,OAAA,EAAA,YACF,SAAE,WAAA,YACF,SAAE,aAAA,YACF,SAAE,cAAA,YACF,SAAE,YAAA,YACF,SACE,aAAA,YACA,YAAA,YAEF,SACE,WAAA,YACA,cAAA,YAXF,QAAE,OAAA,OAAA,iBACF,SAAE,WAAA,iBACF,SAAE,aAAA,iBACF,SAAE,cAAA,iBACF,SAAE,YAAA,iBACF,SACE,aAAA,iBACA,YAAA,iBAEF,SACE,WAAA,iBACA,cAAA,iBAXF,QAAE,OAAA,MAAA,gBACF,SAAE,WAAA,gBACF,SAAE,aAAA,gBACF,SAAE,cAAA,gBACF,SAAE,YAAA,gBACF,SACE,aAAA,gBACA,YAAA,gBAEF,SACE,WAAA,gBACA,cAAA,gBAXF,QAAE,OAAA,KAAA,eACF,SAAE,WAAA,eACF,SAAE,aAAA,eACF,SAAE,cAAA,eACF,SAAE,YAAA,eACF,SACE,aAAA,eACA,YAAA,eAEF,SACE,WAAA,eACA,cAAA,eAXF,QAAE,OAAA,OAAA,iBACF,SAAE,WAAA,iBACF,SAAE,aAAA,iBACF,SAAE,cAAA,iBACF,SAAE,YAAA,iBACF,SACE,aAAA,iBACA,YAAA,iBAEF,SACE,WAAA,iBACA,cAAA,iBAXF,QAAE,OAAA,KAAA,eACF,SAAE,WAAA,eACF,SAAE,aAAA,eACF,SAAE,cAAA,eACF,SAAE,YAAA,eACF,SACE,aAAA,eACA,YAAA,eAEF,SACE,WAAA,eACA,cAAA,eAXF,QAAE,QAAA,EAAA,YACF,SAAE,YAAA,YACF,SAAE,cAAA,YACF,SAAE,eAAA,YACF,SAAE,aAAA,YACF,SACE,cAAA,YACA,aAAA,YAEF,SACE,YAAA,YACA,eAAA,YAXF,QAAE,QAAA,OAAA,iBACF,SAAE,YAAA,iBACF,SAAE,cAAA,iBACF,SAAE,eAAA,iBACF,SAAE,aAAA,iBACF,SACE,cAAA,iBACA,aAAA,iBAEF,SACE,YAAA,iBACA,eAAA,iBAXF,QAAE,QAAA,MAAA,gBACF,SAAE,YAAA,gBACF,SAAE,cAAA,gBACF,SAAE,eAAA,gBACF,SAAE,aAAA,gBACF,SACE,cAAA,gBACA,aAAA,gBAEF,SACE,YAAA,gBACA,eAAA,gBAXF,QAAE,QAAA,KAAA,eACF,SAAE,YAAA,eACF,SAAE,cAAA,eACF,SAAE,eAAA,eACF,SAAE,aAAA,eACF,SACE,cAAA,eACA,aAAA,eAEF,SACE,YAAA,eACA,eAAA,eAXF,QAAE,QAAA,OAAA,iBACF,SAAE,YAAA,iBACF,SAAE,cAAA,iBACF,SAAE,eAAA,iBACF,SAAE,aAAA,iBACF,SACE,cAAA,iBACA,aAAA,iBAEF,SACE,YAAA,iBACA,eAAA,iBAXF,QAAE,QAAA,KAAA,eACF,SAAE,YAAA,eACF,SAAE,cAAA,eACF,SAAE,eAAA,eACF,SAAE,aAAA,eACF,SACE,cAAA,eACA,aAAA,eAEF,SACE,YAAA,eACA,eAAA,eAMN,WAAE,OAAA,eACF,YAAE,WAAA,eACF,YAAE,aAAA,eACF,YAAE,cAAA,eACF,YAAE,YAAA,eACF,YACE,aAAA,eACA,YAAA,eAEF,YACE,WAAA,eACA,cAAA,gBpDiBF,0BoD7CI,QAAE,OAAA,EAAA,YACF,SAAE,WAAA,YACF,SAAE,aAAA,YACF,SAAE,cAAA,YACF,SAAE,YAAA,YACF,SACE,aAAA,YACA,YAAA,YAEF,SACE,WAAA,YACA,cAAA,YAXF,QAAE,OAAA,OAAA,iBACF,SAAE,WAAA,iBACF,SAAE,aAAA,iBACF,SAAE,cAAA,iBACF,SAAE,YAAA,iBACF,SACE,aAAA,iBACA,YAAA,iBAEF,SACE,WAAA,iBACA,cAAA,iBAXF,QAAE,OAAA,MAAA,gBACF,SAAE,WAAA,gBACF,SAAE,aAAA,gBACF,SAAE,cAAA,gBACF,SAAE,YAAA,gBACF,SACE,aAAA,gBACA,YAAA,gBAEF,SACE,WAAA,gBACA,cAAA,gBAXF,QAAE,OAAA,KAAA,eACF,SAAE,WAAA,eACF,SAAE,aAAA,eACF,SAAE,cAAA,eACF,SAAE,YAAA,eACF,SACE,aAAA,eACA,YAAA,eAEF,SACE,WAAA,eACA,cAAA,eAXF,QAAE,OAAA,OAAA,iBACF,SAAE,WAAA,iBACF,SAAE,aAAA,iBACF,SAAE,cAAA,iBACF,SAAE,YAAA,iBACF,SACE,aAAA,iBACA,YAAA,iBAEF,SACE,WAAA,iBACA,cAAA,iBAXF,QAAE,OAAA,KAAA,eACF,SAAE,WAAA,eACF,SAAE,aAAA,eACF,SAAE,cAAA,eACF,SAAE,YAAA,eACF,SACE,aAAA,eACA,YAAA,eAEF,SACE,WAAA,eACA,cAAA,eAXF,QAAE,QAAA,EAAA,YACF,SAAE,YAAA,YACF,SAAE,cAAA,YACF,SAAE,eAAA,YACF,SAAE,aAAA,YACF,SACE,cAAA,YACA,aAAA,YAEF,SACE,YAAA,YACA,eAAA,YAXF,QAAE,QAAA,OAAA,iBACF,SAAE,YAAA,iBACF,SAAE,cAAA,iBACF,SAAE,eAAA,iBACF,SAAE,aAAA,iBACF,SACE,cAAA,iBACA,aAAA,iBAEF,SACE,YAAA,iBACA,eAAA,iBAXF,QAAE,QAAA,MAAA,gBACF,SAAE,YAAA,gBACF,SAAE,cAAA,gBACF,SAAE,eAAA,gBACF,SAAE,aAAA,gBACF,SACE,cAAA,gBACA,aAAA,gBAEF,SACE,YAAA,gBACA,eAAA,gBAXF,QAAE,QAAA,KAAA,eACF,SAAE,YAAA,eACF,SAAE,cAAA,eACF,SAAE,eAAA,eACF,SAAE,aAAA,eACF,SACE,cAAA,eACA,aAAA,eAEF,SACE,YAAA,eACA,eAAA,eAXF,QAAE,QAAA,OAAA,iBACF,SAAE,YAAA,iBACF,SAAE,cAAA,iBACF,SAAE,eAAA,iBACF,SAAE,aAAA,iBACF,SACE,cAAA,iBACA,aAAA,iBAEF,SACE,YAAA,iBACA,eAAA,iBAXF,QAAE,QAAA,KAAA,eACF,SAAE,YAAA,eACF,SAAE,cAAA,eACF,SAAE,eAAA,eACF,SAAE,aAAA,eACF,SACE,cAAA,eACA,aAAA,eAEF,SACE,YAAA,eACA,eAAA,eAMN,WAAE,OAAA,eACF,YAAE,WAAA,eACF,YAAE,aAAA,eACF,YAAE,cAAA,eACF,YAAE,YAAA,eACF,YACE,aAAA,eACA,YAAA,eAEF,YACE,WAAA,eACA,cAAA,gBCjCN,cAAiB,WAAA,kBACjB,aAAiB,YAAA,iBACjB,eCJE,SAAA,OACA,cAAA,SACA,YAAA,ODUE,WAAE,WAAA,eACF,YAAE,WAAA,gBACF,aAAE,WAAA,iBrDsCF,yBqDxCA,cAAE,WAAA,eACF,eAAE,WAAA,gBACF,gBAAE,WAAA,kBrDsCF,yBqDxCA,cAAE,WAAA,eACF,eAAE,WAAA,gBACF,gBAAE,WAAA,kBrDsCF,yBqDxCA,cAAE,WAAA,eACF,eAAE,WAAA,gBACF,gBAAE,WAAA,kBrDsCF,0BqDxCA,cAAE,WAAA,eACF,eAAE,WAAA,gBACF,gBAAE,WAAA,kBAMN,gBAAmB,eAAA,oBACnB,gBAAmB,eAAA,oBACnB,iBAAmB,eAAA,qBAInB,oBAAsB,YAAA,IACtB,kBAAsB,YAAA,IACtB,aAAsB,WAAA,OAItB,YACE,MAAA,eElCA,YACE,MAAA,kBjEgBA,mBAAA,mBiEZE,MAAA,kBALJ,cACE,MAAA,kBjEgBA,qBAAA,qBiEZE,MAAA,kBALJ,cACE,MAAA,kBjEgBA,qBAAA,qBiEZE,MAAA,kBALJ,WACE,MAAA,kBjEgBA,kBAAA,kBiEZE,MAAA,kBALJ,cACE,MAAA,kBjEgBA,qBAAA,qBiEZE,MAAA,kBALJ,aACE,MAAA,kBjEgBA,oBAAA,oBiEZE,MAAA,kBALJ,gBACE,MAAA,kBjEgBA,uBAAA,uBiEZE,MAAA,kBFkDN,WGxDE,KAAA,EAAA,EAAA,EACA,MAAA,YACA,YAAA,KACA,iBAAA,YACA,OAAA,ECFF,WCDE,WAAA,iBDQA,cAEI,QAAA,ezDwDF,yByDrDF,gBAEI,QAAA,gBzDsCF,yByD7CF,cAEI,QAAA,gBzDwDF,yByDrDF,gBAEI,QAAA,gBzDsCF,yByD7CF,cAEI,QAAA,gBzDwDF,yByDrDF,gBAEI,QAAA,gBzDsCF,yByD7CF,cAEI,QAAA,gBzDwDF,0ByDrDF,gBAEI,QAAA,gBzDsCF,0ByD7CF,cAEI,QAAA,gBAGJ,gBAEI,QAAA,eAUN,qBACE,QAAA,eAEA,aAHA,qBAIE,QAAA,iBAGJ,sBACE,QAAA,eAEA,aAHA,sBAIE,QAAA,kBAGJ,4BACE,QAAA,eAEA,aAHA,4BAIE,QAAA,wBAKF,aADA,cAEE,QAAA"} \ No newline at end of file diff --git a/csunplugged/static/css/website.css b/csunplugged/static/css/website.css deleted file mode 100644 index a361f601f..000000000 --- a/csunplugged/static/css/website.css +++ /dev/null @@ -1,20 +0,0 @@ -img#navbar-brand-logo { - height: 30px; - margin-right: 1rem; -} -h1, h2, h3 { - color: #e33333; - margin-top: 1.5rem; -} -h1 span.subtitle, -h2 span.subtitle, -h3 span.subtitle { - color: #888; -} -.topic-img-logo { - height: 200px; - object-fit: contain; -} -img.resource-thumbnail { - max-height: 15rem; -} diff --git a/csunplugged/static/scss/bootstrap/.scss-lint.yml b/csunplugged/static/scss/bootstrap/.scss-lint.yml new file mode 100644 index 000000000..9d6e7ec4e --- /dev/null +++ b/csunplugged/static/scss/bootstrap/.scss-lint.yml @@ -0,0 +1,548 @@ +# Default application configuration that all configurations inherit from. +scss_files: + - "**/*.scss" + - "docs/assets/scss/**/*.scss" + +exclude: + - "scss/_normalize.scss" + +plugin_directories: ['.scss-linters'] + +# List of gem names to load custom linters from (make sure they are already +# installed) +plugin_gems: [] + +# Default severity of all linters. +severity: warning + +linters: + BangFormat: + enabled: true + space_before_bang: true + space_after_bang: false + + BemDepth: + enabled: false + max_elements: 1 + + BorderZero: + enabled: true + convention: zero # or `none` + exclude: + - _normalize.scss + + ChainedClasses: + enabled: false + + ColorKeyword: + enabled: true + + ColorVariable: + enabled: false + + Comment: + enabled: true + exclude: + - _normalize.scss + - bootstrap.scss + style: silent + + DebugStatement: + enabled: true + + DeclarationOrder: + enabled: false + + DisableLinterReason: + enabled: false + + DuplicateProperty: + enabled: true + + ElsePlacement: + enabled: true + style: same_line # or 'new_line' + + EmptyLineBetweenBlocks: + enabled: false + ignore_single_line_blocks: true + + EmptyRule: + enabled: true + + ExtendDirective: + enabled: false + + FinalNewline: + enabled: true + present: true + + HexLength: + enabled: true + style: short # or 'long' + + HexNotation: + enabled: true + style: lowercase # or 'uppercase' + + HexValidation: + enabled: true + + IdSelector: + enabled: true + + ImportantRule: + enabled: false + + ImportPath: + enabled: true + leading_underscore: false + filename_extension: false + + Indentation: + enabled: true + allow_non_nested_indentation: false + character: space # or 'tab' + width: 2 + + LeadingZero: + enabled: true + style: exclude_zero # or 'include_zero' + exclude: + - _normalize.scss + + MergeableSelector: + enabled: false + force_nesting: true + + NameFormat: + enabled: true + allow_leading_underscore: true + convention: hyphenated_lowercase # or 'camel_case', or 'snake_case', or a regex pattern + + NestingDepth: + enabled: true + max_depth: 4 + ignore_parent_selectors: false + + PlaceholderInExtend: + enabled: false + + PropertyCount: + enabled: false + include_nested: false + max_properties: 10 + + PropertySortOrder: + enabled: true + ignore_unspecified: false + min_properties: 2 + separate_groups: false + exclude: + - _normalize.scss + order: + - position + - top + - right + - bottom + - left + - z-index + - -webkit-box-sizing + - -moz-box-sizing + - box-sizing + - display + - flex + - flex-align + - flex-basis + - flex-direction + - flex-wrap + - flex-flow + - flex-grow + - flex-order + - flex-pack + - align-items + - align-self + - justify-content + - float + - width + - min-width + - max-width + - height + - min-height + - max-height + - padding + - padding-top + - padding-right + - padding-bottom + - padding-left + - margin + - margin-top + - margin-right + - margin-bottom + - margin-left + - overflow + - overflow-x + - overflow-y + - -webkit-overflow-scrolling + - -ms-overflow-x + - -ms-overflow-y + - -ms-overflow-style + - clip + - clear + - font + - font-family + - font-size + - font-style + - font-weight + - font-variant + - font-size-adjust + - font-stretch + - font-effect + - font-emphasize + - font-emphasize-position + - font-emphasize-style + - font-smooth + - -webkit-hyphens + - -moz-hyphens + - hyphens + - line-height + - color + - text-align + - -webkit-text-align-last + - -moz-text-align-last + - -ms-text-align-last + - text-align-last + - text-emphasis + - text-emphasis-color + - text-emphasis-style + - text-emphasis-position + - text-decoration + - text-indent + - text-justify + - text-outline + - -ms-text-overflow + - text-overflow + - text-overflow-ellipsis + - text-overflow-mode + - text-shadow + - text-transform + - text-wrap + - -webkit-text-size-adjust + - -ms-text-size-adjust + - letter-spacing + - -ms-word-break + - word-break + - word-spacing + - -ms-word-wrap + - word-wrap + - overflow-wrap + - -moz-tab-size + - -o-tab-size + - tab-size + - white-space + - vertical-align + - list-style + - list-style-position + - list-style-type + - list-style-image + - pointer-events + - -ms-touch-action + - touch-action + - cursor + - visibility + - zoom + - table-layout + - empty-cells + - caption-side + - border-spacing + - border-collapse + - content + - quotes + - counter-reset + - counter-increment + - resize + - -webkit-user-select + - -moz-user-select + - -ms-user-select + - -o-user-select + - user-select + - nav-index + - nav-up + - nav-right + - nav-down + - nav-left + - background + - background-color + - background-image + - -ms-filter:\\'progid:DXImageTransform.Microsoft.gradient + - filter:progid:DXImageTransform.Microsoft.gradient + - filter:progid:DXImageTransform.Microsoft.AlphaImageLoader + - filter + - background-repeat + - background-attachment + - background-position + - background-position-x + - background-position-y + - -webkit-background-clip + - -moz-background-clip + - background-clip + - background-origin + - -webkit-background-size + - -moz-background-size + - -o-background-size + - background-size + - border + - border-color + - border-style + - border-width + - border-top + - border-top-color + - border-top-style + - border-top-width + - border-right + - border-right-color + - border-right-style + - border-right-width + - border-bottom + - border-bottom-color + - border-bottom-style + - border-bottom-width + - border-left + - border-left-color + - border-left-style + - border-left-width + - border-radius + - border-top-left-radius + - border-top-right-radius + - border-bottom-right-radius + - border-bottom-left-radius + - -webkit-border-image + - -moz-border-image + - -o-border-image + - border-image + - -webkit-border-image-source + - -moz-border-image-source + - -o-border-image-source + - border-image-source + - -webkit-border-image-slice + - -moz-border-image-slice + - -o-border-image-slice + - border-image-slice + - -webkit-border-image-width + - -moz-border-image-width + - -o-border-image-width + - border-image-width + - -webkit-border-image-outset + - -moz-border-image-outset + - -o-border-image-outset + - border-image-outset + - -webkit-border-image-repeat + - -moz-border-image-repeat + - -o-border-image-repeat + - border-image-repeat + - outline + - outline-width + - outline-style + - outline-color + - outline-offset + - -webkit-box-shadow + - -moz-box-shadow + - box-shadow + - filter:progid:DXImageTransform.Microsoft.Alpha(Opacity + - -ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha + - opacity + - -ms-interpolation-mode + - -webkit-transition + - -moz-transition + - -ms-transition + - -o-transition + - transition + - -webkit-transition-delay + - -moz-transition-delay + - -ms-transition-delay + - -o-transition-delay + - transition-delay + - -webkit-transition-timing-function + - -moz-transition-timing-function + - -ms-transition-timing-function + - -o-transition-timing-function + - transition-timing-function + - -webkit-transition-duration + - -moz-transition-duration + - -ms-transition-duration + - -o-transition-duration + - transition-duration + - -webkit-transition-property + - -moz-transition-property + - -ms-transition-property + - -o-transition-property + - transition-property + - -webkit-transform + - -moz-transform + - -ms-transform + - -o-transform + - transform + - -webkit-transform-origin + - -moz-transform-origin + - -ms-transform-origin + - -o-transform-origin + - transform-origin + - -webkit-animation + - -moz-animation + - -ms-animation + - -o-animation + - animation + - -webkit-animation-name + - -moz-animation-name + - -ms-animation-name + - -o-animation-name + - animation-name + - -webkit-animation-duration + - -moz-animation-duration + - -ms-animation-duration + - -o-animation-duration + - animation-duration + - -webkit-animation-play-state + - -moz-animation-play-state + - -ms-animation-play-state + - -o-animation-play-state + - animation-play-state + - -webkit-animation-timing-function + - -moz-animation-timing-function + - -ms-animation-timing-function + - -o-animation-timing-function + - animation-timing-function + - -webkit-animation-delay + - -moz-animation-delay + - -ms-animation-delay + - -o-animation-delay + - animation-delay + - -webkit-animation-iteration-count + - -moz-animation-iteration-count + - -ms-animation-iteration-count + - -o-animation-iteration-count + - animation-iteration-count + - -webkit-animation-direction + - -moz-animation-direction + - -ms-animation-direction + - -o-animation-direction + + + PropertySpelling: + enabled: true + extra_properties: [] + disabled_properties: [] + + PropertyUnits: + enabled: true + global: [ + 'ch', 'em', 'ex', 'rem', # Font-relative lengths + 'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q', # Absolute lengths + 'vh', 'vw', 'vmin', 'vmax', # Viewport-percentage lengths + 'deg', 'grad', 'rad', 'turn', # Angle + 'ms', 's', # Duration + 'Hz', 'kHz', # Frequency + 'dpi', 'dpcm', 'dppx', # Resolution + '%'] # Other + properties: {} + + PseudoElement: + enabled: true + + QualifyingElement: + enabled: true + allow_element_with_attribute: false + allow_element_with_class: false + allow_element_with_id: false + + SelectorDepth: + enabled: true + max_depth: 4 + + SelectorFormat: + enabled: false + convention: hyphenated_lowercase # or 'strict_BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern + + Shorthand: + enabled: true + allowed_shorthands: [1, 2, 3, 4] + + SingleLinePerProperty: + enabled: false + allow_single_line_rule_sets: true + + SingleLinePerSelector: + enabled: false + + SpaceAfterComma: + enabled: false + style: one_space # or 'no_space', or 'at_least_one_space' + + SpaceAfterPropertyColon: + enabled: true + style: at_least_one_space # or 'no_space', or 'at_least_one_space', or 'aligned' + + SpaceAfterPropertyName: + enabled: true + + SpaceAfterVariableName: + enabled: true + + SpaceAroundOperator: + enabled: true + style: one_space # or 'at_least_one_space', or 'no_space' + + SpaceBeforeBrace: + enabled: true + style: space # or 'new_line' + allow_single_line_padding: true + + SpaceBetweenParens: + enabled: true + spaces: 0 + + StringQuotes: + enabled: true + style: double_quotes # or double_quotes + + TrailingSemicolon: + enabled: true + + TrailingWhitespace: + enabled: true + + TrailingZero: + enabled: false + + TransitionAll: + enabled: false + + UnnecessaryMantissa: + enabled: true + + UnnecessaryParentReference: + enabled: true + + UrlFormat: + enabled: true + + UrlQuotes: + enabled: true + + VariableForProperty: + enabled: false + properties: [] + + VendorPrefix: + enabled: true + identifier_list: base + additional_identifiers: [] + excluded_identifiers: [] + exclude: + - _normalize.scss + + ZeroUnit: + enabled: true + + Compass::*: + enabled: false diff --git a/csunplugged/static/scss/bootstrap/_alert.scss b/csunplugged/static/scss/bootstrap/_alert.scss new file mode 100644 index 000000000..d9b4e9b27 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_alert.scss @@ -0,0 +1,55 @@ +// +// Base styles +// + +.alert { + padding: $alert-padding-y $alert-padding-x; + margin-bottom: $alert-margin-bottom; + border: $alert-border-width solid transparent; + @include border-radius($alert-border-radius); +} + +// Headings for larger alerts +.alert-heading { + // Specified to prevent conflicts of changing $headings-color + color: inherit; +} + +// Provide class for links that match alerts +.alert-link { + font-weight: $alert-link-font-weight; +} + + +// Dismissible alerts +// +// Expand the right padding and account for the close button's positioning. + +.alert-dismissible { + // Adjust close link position + .close { + position: relative; + top: -$alert-padding-y; + right: -$alert-padding-x; + padding: $alert-padding-y $alert-padding-x; + color: inherit; + } +} + + +// Alternate styles +// +// Generate contextual modifier classes for colorizing the alert. + +.alert-success { + @include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text); +} +.alert-info { + @include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text); +} +.alert-warning { + @include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text); +} +.alert-danger { + @include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text); +} diff --git a/csunplugged/static/scss/bootstrap/_badge.scss b/csunplugged/static/scss/bootstrap/_badge.scss new file mode 100644 index 000000000..e5a329893 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_badge.scss @@ -0,0 +1,77 @@ +// Base class +// +// Requires one of the contextual, color modifier classes for `color` and +// `background-color`. + +.badge { + display: inline-block; + padding: $badge-padding-y $badge-padding-x; + font-size: $badge-font-size; + font-weight: $badge-font-weight; + line-height: 1; + color: $badge-color; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + @include border-radius(); + + // Empty badges collapse automatically + &:empty { + display: none; + } +} + +// Quick fix for badges in buttons +.btn .badge { + position: relative; + top: -1px; +} + +// scss-lint:disable QualifyingElement +// Add hover effects, but only for links +a.badge { + @include hover-focus { + color: $badge-link-hover-color; + text-decoration: none; + cursor: pointer; + } +} +// scss-lint:enable QualifyingElement + +// Pill badges +// +// Make them extra rounded with a modifier to replace v3's badges. + +.badge-pill { + padding-right: $badge-pill-padding-x; + padding-left: $badge-pill-padding-x; + @include border-radius($badge-pill-border-radius); +} + +// Colors +// +// Contextual variations (linked badges get darker on :hover). + +.badge-default { + @include badge-variant($badge-default-bg); +} + +.badge-primary { + @include badge-variant($badge-primary-bg); +} + +.badge-success { + @include badge-variant($badge-success-bg); +} + +.badge-info { + @include badge-variant($badge-info-bg); +} + +.badge-warning { + @include badge-variant($badge-warning-bg); +} + +.badge-danger { + @include badge-variant($badge-danger-bg); +} diff --git a/csunplugged/static/scss/bootstrap/_breadcrumb.scss b/csunplugged/static/scss/bootstrap/_breadcrumb.scss new file mode 100644 index 000000000..1a09bba20 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_breadcrumb.scss @@ -0,0 +1,38 @@ +.breadcrumb { + padding: $breadcrumb-padding-y $breadcrumb-padding-x; + margin-bottom: $spacer-y; + list-style: none; + background-color: $breadcrumb-bg; + @include border-radius($border-radius); + @include clearfix; +} + +.breadcrumb-item { + float: left; + + // The separator between breadcrumbs (by default, a forward-slash: "/") + + .breadcrumb-item::before { + display: inline-block; // Suppress underlining of the separator in modern browsers + padding-right: $breadcrumb-item-padding; + padding-left: $breadcrumb-item-padding; + color: $breadcrumb-divider-color; + content: "#{$breadcrumb-divider}"; + } + + // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built + // without `<ul>`s. The `::before` pseudo-element generates an element + // *within* the .breadcrumb-item and thereby inherits the `text-decoration`. + // + // To trick IE into suppressing the underline, we give the pseudo-element an + // underline and then immediately remove it. + + .breadcrumb-item:hover::before { + text-decoration: underline; + } + + .breadcrumb-item:hover::before { + text-decoration: none; + } + + &.active { + color: $breadcrumb-active-color; + } +} diff --git a/csunplugged/static/scss/bootstrap/_button-group.scss b/csunplugged/static/scss/bootstrap/_button-group.scss new file mode 100644 index 000000000..584ed1513 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_button-group.scss @@ -0,0 +1,202 @@ +// scss-lint:disable QualifyingElement + +// Make the div behave like a button +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-flex; + vertical-align: middle; // match .btn alignment given font-size hack above + + > .btn { + position: relative; + flex: 0 1 auto; + + // Bring the hover, focused, and "active" buttons to the fron to overlay + // the borders properly + @include hover { + z-index: 2; + } + &:focus, + &:active, + &.active { + z-index: 2; + } + } + + // Prevent double borders when buttons are next to each other + .btn + .btn, + .btn + .btn-group, + .btn-group + .btn, + .btn-group + .btn-group { + margin-left: -$input-btn-border-width; + } +} + +// Optional: Group multiple button groups together for a toolbar +.btn-toolbar { + display: flex; + justify-content: flex-start; + + .input-group { + width: auto; + } +} + +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} + +// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match +.btn-group > .btn:first-child { + margin-left: 0; + + &:not(:last-child):not(.dropdown-toggle) { + @include border-right-radius(0); + } +} +// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + @include border-left-radius(0); +} + +// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group) +.btn-group > .btn-group { + float: left; +} +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group > .btn-group:first-child:not(:last-child) { + > .btn:last-child, + > .dropdown-toggle { + @include border-right-radius(0); + } +} +.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { + @include border-left-radius(0); +} + +// On active and open, don't show outline +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} + + +// Sizing +// +// Remix the default button sizing classes into new ones for easier manipulation. + +.btn-group-sm > .btn { @extend .btn-sm; } +.btn-group-lg > .btn { @extend .btn-lg; } + + +// +// Split button dropdowns +// + +.btn + .dropdown-toggle-split { + padding-right: $btn-padding-x * .75; + padding-left: $btn-padding-x * .75; + + &::after { + margin-left: 0; + } +} + +.btn-sm + .dropdown-toggle-split { + padding-right: $btn-padding-x-sm * .75; + padding-left: $btn-padding-x-sm * .75; +} + +.btn-lg + .dropdown-toggle-split { + padding-right: $btn-padding-x-lg * .75; + padding-left: $btn-padding-x-lg * .75; +} + + +// The clickable button for toggling the menu +// Remove the gradient and set the same inset shadow as the :active state +.btn-group.open .dropdown-toggle { + @include box-shadow($btn-active-box-shadow); + + // Show no shadow for `.btn-link` since it has no other button styles. + &.btn-link { + @include box-shadow(none); + } +} + + +// +// Vertical button groups +// + +.btn-group-vertical { + display: inline-flex; + flex-direction: column; + align-items: flex-start; + justify-content: center; + + .btn, + .btn-group { + width: 100%; + } + + > .btn + .btn, + > .btn + .btn-group, + > .btn-group + .btn, + > .btn-group + .btn-group { + margin-top: -$input-btn-border-width; + margin-left: 0; + } +} + +.btn-group-vertical > .btn { + &:not(:first-child):not(:last-child) { + border-radius: 0; + } + &:first-child:not(:last-child) { + @include border-bottom-radius(0); + } + &:last-child:not(:first-child) { + @include border-top-radius(0); + } +} +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group-vertical > .btn-group:first-child:not(:last-child) { + > .btn:last-child, + > .dropdown-toggle { + @include border-bottom-radius(0); + } +} +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + @include border-top-radius(0); +} + + +// Checkbox and radio options +// +// In order to support the browser's form validation feedback, powered by the +// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use +// `display: none;` or `visibility: hidden;` as that also hides the popover. +// Simply visually hiding the inputs via `opacity` would leave them clickable in +// certain cases which is prevented by using `clip` and `pointer-events`. +// This way, we ensure a DOM element is visible to position the popover from. +// +// See https://github.com/twbs/bootstrap/pull/12794 and +// https://github.com/twbs/bootstrap/pull/14559 for more information. + +[data-toggle="buttons"] { + > .btn, + > .btn-group > .btn { + input[type="radio"], + input[type="checkbox"] { + position: absolute; + clip: rect(0,0,0,0); + pointer-events: none; + } + } +} diff --git a/csunplugged/static/scss/bootstrap/_buttons.scss b/csunplugged/static/scss/bootstrap/_buttons.scss new file mode 100644 index 000000000..e36ff0f1f --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_buttons.scss @@ -0,0 +1,170 @@ +// scss-lint:disable QualifyingElement + +// +// Base styles +// + +.btn { + display: inline-block; + font-weight: $btn-font-weight; + line-height: $btn-line-height; + text-align: center; + white-space: nowrap; + vertical-align: middle; + user-select: none; + border: $input-btn-border-width solid transparent; + @include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $btn-border-radius); + @include transition($btn-transition); + + // Share hover and focus styles + @include hover-focus { + text-decoration: none; + } + &:focus, + &.focus { + outline: 0; + box-shadow: $btn-focus-box-shadow; + } + + // Disabled comes first so active can properly restyle + &.disabled, + &:disabled { + cursor: $cursor-disabled; + opacity: .65; + @include box-shadow(none); + } + + &:active, + &.active { + background-image: none; + @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow); + } +} + +// Future-proof disabling of clicks on `<a>` elements +a.btn.disabled, +fieldset[disabled] a.btn { + pointer-events: none; +} + + +// +// Alternate buttons +// + +.btn-primary { + @include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border); +} +.btn-secondary { + @include button-variant($btn-secondary-color, $btn-secondary-bg, $btn-secondary-border); +} +.btn-info { + @include button-variant($btn-info-color, $btn-info-bg, $btn-info-border); +} +.btn-success { + @include button-variant($btn-success-color, $btn-success-bg, $btn-success-border); +} +.btn-warning { + @include button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border); +} +.btn-danger { + @include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border); +} + +// Remove all backgrounds +.btn-outline-primary { + @include button-outline-variant($btn-primary-bg); +} +.btn-outline-secondary { + @include button-outline-variant($btn-secondary-border); +} +.btn-outline-info { + @include button-outline-variant($btn-info-bg); +} +.btn-outline-success { + @include button-outline-variant($btn-success-bg); +} +.btn-outline-warning { + @include button-outline-variant($btn-warning-bg); +} +.btn-outline-danger { + @include button-outline-variant($btn-danger-bg); +} + + +// +// Link buttons +// + +// Make a button look and behave like a link +.btn-link { + font-weight: $font-weight-normal; + color: $link-color; + border-radius: 0; + + &, + &:active, + &.active, + &:disabled { + background-color: transparent; + @include box-shadow(none); + } + &, + &:focus, + &:active { + border-color: transparent; + } + @include hover { + border-color: transparent; + } + @include hover-focus { + color: $link-hover-color; + text-decoration: $link-hover-decoration; + background-color: transparent; + } + &:disabled { + color: $btn-link-disabled-color; + + @include hover-focus { + text-decoration: none; + } + } +} + + +// +// Button Sizes +// + +.btn-lg { + // line-height: ensure even-numbered height of button next to large input + @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $btn-border-radius-lg); +} +.btn-sm { + // line-height: ensure proper height of button next to small input + @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $btn-border-radius-sm); +} + + +// +// Block button +// + +.btn-block { + display: block; + width: 100%; +} + +// Vertically space out multiple block buttons +.btn-block + .btn-block { + margin-top: $btn-block-spacing-y; +} + +// Specificity overrides +input[type="submit"], +input[type="reset"], +input[type="button"] { + &.btn-block { + width: 100%; + } +} diff --git a/csunplugged/static/scss/bootstrap/_card.scss b/csunplugged/static/scss/bootstrap/_card.scss new file mode 100644 index 000000000..9fe70e8cf --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_card.scss @@ -0,0 +1,276 @@ +// +// Base styles +// + +.card { + position: relative; + display: flex; + flex-direction: column; + background-color: $card-bg; + border: $card-border-width solid $card-border-color; + @include border-radius($card-border-radius); +} + +.card-block { + // Enable `flex-grow: 1` for decks and groups so that card blocks take up + // as much space as possible, ensuring footers are aligned to the bottom. + flex: 1 1 auto; + padding: $card-spacer-x; +} + +.card-title { + margin-bottom: $card-spacer-y; +} + +.card-subtitle { + margin-top: -($card-spacer-y / 2); + margin-bottom: 0; +} + +.card-text:last-child { + margin-bottom: 0; +} + +.card-link { + @include hover { + text-decoration: none; + } + + + .card-link { + margin-left: $card-spacer-x; + } +} + +.card { + > .list-group:first-child { + .list-group-item:first-child { + @include border-top-radius($card-border-radius); + } + } + + > .list-group:last-child { + .list-group-item:last-child { + @include border-bottom-radius($card-border-radius); + } + } +} + + +// +// Optional textual caps +// + +.card-header { + padding: $card-spacer-y $card-spacer-x; + margin-bottom: 0; // Removes the default margin-bottom of <hN> + background-color: $card-cap-bg; + border-bottom: $card-border-width solid $card-border-color; + + &:first-child { + @include border-radius($card-border-radius-inner $card-border-radius-inner 0 0); + } +} + +.card-footer { + padding: $card-spacer-y $card-spacer-x; + background-color: $card-cap-bg; + border-top: $card-border-width solid $card-border-color; + + &:last-child { + @include border-radius(0 0 $card-border-radius-inner $card-border-radius-inner); + } +} + + +// +// Header navs +// + +.card-header-tabs { + margin-right: -($card-spacer-x / 2); + margin-bottom: -$card-spacer-y; + margin-left: -($card-spacer-x / 2); + border-bottom: 0; +} + +.card-header-pills { + margin-right: -($card-spacer-x / 2); + margin-left: -($card-spacer-x / 2); +} + + +// +// Background variations +// + +.card-primary { + @include card-variant($brand-primary, $brand-primary); +} +.card-success { + @include card-variant($brand-success, $brand-success); +} +.card-info { + @include card-variant($brand-info, $brand-info); +} +.card-warning { + @include card-variant($brand-warning, $brand-warning); +} +.card-danger { + @include card-variant($brand-danger, $brand-danger); +} + +// Remove all backgrounds +.card-outline-primary { + @include card-outline-variant($btn-primary-bg); +} +.card-outline-secondary { + @include card-outline-variant($btn-secondary-border); +} +.card-outline-info { + @include card-outline-variant($btn-info-bg); +} +.card-outline-success { + @include card-outline-variant($btn-success-bg); +} +.card-outline-warning { + @include card-outline-variant($btn-warning-bg); +} +.card-outline-danger { + @include card-outline-variant($btn-danger-bg); +} + +// +// Inverse text within a card for use with dark backgrounds +// + +.card-inverse { + @include card-inverse; +} + +// +// Blockquote +// + +.card-blockquote { + padding: 0; + margin-bottom: 0; + border-left: 0; +} + +// Card image +.card-img { + // margin: -1.325rem; + @include border-radius($card-border-radius-inner); +} +.card-img-overlay { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + padding: $card-img-overlay-padding; +} + + + +// Card image caps +.card-img-top { + @include border-top-radius($card-border-radius-inner); +} +.card-img-bottom { + @include border-bottom-radius($card-border-radius-inner); +} + + +// Card deck + +@include media-breakpoint-up(sm) { + .card-deck { + display: flex; + flex-flow: row wrap; + + .card { + display: flex; + flex: 1 0 0; + flex-direction: column; + + // Selectively apply horizontal margins to cards to avoid doing the + // negative margin dance like our grid. This differs from the grid + // due to the use of margins as gutters instead of padding. + &:not(:first-child) { margin-left: $card-deck-margin; } + &:not(:last-child) { margin-right: $card-deck-margin; } + } + } +} + + +// +// Card groups +// + +@include media-breakpoint-up(sm) { + .card-group { + display: flex; + flex-flow: row wrap; + + .card { + flex: 1 0 0; + + + .card { + margin-left: 0; + border-left: 0; + } + + // Handle rounded corners + @if $enable-rounded { + &:first-child { + @include border-right-radius(0); + + .card-img-top { + border-top-right-radius: 0; + } + .card-img-bottom { + border-bottom-right-radius: 0; + } + } + &:last-child { + @include border-left-radius(0); + + .card-img-top { + border-top-left-radius: 0; + } + .card-img-bottom { + border-bottom-left-radius: 0; + } + } + + &:not(:first-child):not(:last-child) { + border-radius: 0; + + .card-img-top, + .card-img-bottom { + border-radius: 0; + } + } + } + } + } +} + + +// +// Columns +// + +@include media-breakpoint-up(sm) { + .card-columns { + column-count: $card-columns-count; + column-gap: $card-columns-gap; + + .card { + display: inline-block; // Don't let them vertically span multiple columns + width: 100%; // Don't let their width change + margin-bottom: $card-columns-margin; + } + } +} diff --git a/csunplugged/static/scss/bootstrap/_carousel.scss b/csunplugged/static/scss/bootstrap/_carousel.scss new file mode 100644 index 000000000..54478e450 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_carousel.scss @@ -0,0 +1,178 @@ +// Wrapper for the slide container and indicators +.carousel { + position: relative; +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.carousel-item { + position: relative; + display: none; + width: 100%; + + @include if-supports-3d-transforms() { + @include transition($carousel-transition); + backface-visibility: hidden; + perspective: 1000px; + } +} + +.carousel-item.active, +.carousel-item-next, +.carousel-item-prev { + display: flex; +} + +.carousel-item-next, +.carousel-item-prev { + position: absolute; + top: 0; +} + +// CSS3 transforms when supported by the browser +@include if-supports-3d-transforms() { + .carousel-item-next.carousel-item-left, + .carousel-item-prev.carousel-item-right { + transform: translate3d(0, 0, 0); + } + + .carousel-item-next, + .active.carousel-item-right { + transform: translate3d(100%, 0, 0); + } + + .carousel-item-prev, + .active.carousel-item-left { + transform: translate3d(-100%, 0, 0); + } +} + + +// +// Left/right controls for nav +// + +.carousel-control-prev, +.carousel-control-next { + position: absolute; + top: 0; + bottom: 0; + // Use flex for alignment (1-3) + display: flex; // 1. allow flex styles + align-items: center; // 2. vertically center contents + justify-content: center; // 3. horizontally center contents + width: $carousel-control-width; + color: $carousel-control-color; + text-align: center; + opacity: $carousel-control-opacity; + // We can't have a transition here because WebKit cancels the carousel + // animation if you trip this while in the middle of another animation. + + // Hover/focus state + @include hover-focus { + color: $carousel-control-color; + text-decoration: none; + outline: 0; + opacity: .9; + } +} +.carousel-control-prev { + left: 0; +} +.carousel-control-next { + right: 0; +} + +// Icons for within +.carousel-control-prev-icon, +.carousel-control-next-icon { + display: inline-block; + width: $carousel-control-icon-width; + height: $carousel-control-icon-width; + background: transparent no-repeat center center; + background-size: 100% 100%; +} +.carousel-control-prev-icon { + background-image: $carousel-control-prev-icon-bg; +} +.carousel-control-next-icon { + background-image: $carousel-control-next-icon-bg; +} + + +// Optional indicator pips +// +// Add an ordered list with the following class and add a list item for each +// slide your carousel holds. + +.carousel-indicators { + position: absolute; + right: 0; + bottom: 10px; + left: 0; + z-index: 15; + display: flex; + justify-content: center; + padding-left: 0; // override <ol> default + // Use the .carousel-control's width as margin so we don't overlay those + margin-right: $carousel-control-width; + margin-left: $carousel-control-width; + list-style: none; + + li { + position: relative; + flex: 1 0 auto; + max-width: $carousel-indicator-width; + height: $carousel-indicator-height; + margin-right: $carousel-indicator-spacer; + margin-left: $carousel-indicator-spacer; + text-indent: -999px; + cursor: pointer; + background-color: rgba($carousel-indicator-active-bg, .5); + + // Use pseudo classes to increase the hit area by 10px on top and bottom. + &::before { + position: absolute; + top: -10px; + left: 0; + display: inline-block; + width: 100%; + height: 10px; + content: ""; + } + &::after { + position: absolute; + bottom: -10px; + left: 0; + display: inline-block; + width: 100%; + height: 10px; + content: ""; + } + } + + .active { + background-color: $carousel-indicator-active-bg; + } +} + + +// Optional captions +// +// + +.carousel-caption { + position: absolute; + right: ((100% - $carousel-caption-width) / 2); + bottom: 20px; + left: ((100% - $carousel-caption-width) / 2); + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: $carousel-caption-color; + text-align: center; +} diff --git a/csunplugged/static/scss/bootstrap/_close.scss b/csunplugged/static/scss/bootstrap/_close.scss new file mode 100644 index 000000000..859990e31 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_close.scss @@ -0,0 +1,31 @@ +.close { + float: right; + font-size: $close-font-size; + font-weight: $close-font-weight; + line-height: 1; + color: $close-color; + text-shadow: $close-text-shadow; + opacity: .5; + + @include hover-focus { + color: $close-color; + text-decoration: none; + cursor: pointer; + opacity: .75; + } +} + +// Additional properties for button version +// iOS requires the button element instead of an anchor tag. +// If you want the anchor version, it requires `href="#"`. +// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile + +// scss-lint:disable QualifyingElement +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} +// scss-lint:enable QualifyingElement diff --git a/csunplugged/static/scss/bootstrap/_code.scss b/csunplugged/static/scss/bootstrap/_code.scss new file mode 100644 index 000000000..759da15b7 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_code.scss @@ -0,0 +1,64 @@ +// Inline and block code styles +code, +kbd, +pre, +samp { + font-family: $font-family-monospace; +} + +// Inline code +code { + padding: $code-padding-y $code-padding-x; + font-size: $code-font-size; + color: $code-color; + background-color: $code-bg; + @include border-radius($border-radius); + + // Streamline the style when inside anchors to avoid broken underline and more + a > & { + padding: 0; + color: inherit; + background-color: inherit; + } +} + +// User input typically entered via keyboard +kbd { + padding: $code-padding-y $code-padding-x; + font-size: $code-font-size; + color: $kbd-color; + background-color: $kbd-bg; + @include border-radius($border-radius-sm); + @include box-shadow($kbd-box-shadow); + + kbd { + padding: 0; + font-size: 100%; + font-weight: $nested-kbd-font-weight; + @include box-shadow(none); + } +} + +// Blocks of code +pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + font-size: $code-font-size; + color: $pre-color; + + // Account for some code outputs that place code tags in pre tags + code { + padding: 0; + font-size: inherit; + color: inherit; + background-color: transparent; + border-radius: 0; + } +} + +// Enable scrollable blocks of code +.pre-scrollable { + max-height: $pre-scrollable-max-height; + overflow-y: scroll; +} diff --git a/csunplugged/static/scss/bootstrap/_custom-forms.scss b/csunplugged/static/scss/bootstrap/_custom-forms.scss new file mode 100644 index 000000000..ef2aab354 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_custom-forms.scss @@ -0,0 +1,263 @@ +// scss-lint:disable PropertyCount + +// Embedded icons from Open Iconic. +// Released under MIT and copyright 2014 Waybury. +// https://useiconic.com/open + + +// Checkboxes and radios +// +// Base class takes care of all the key behavioral aspects. + +.custom-control { + position: relative; + display: inline-flex; + min-height: (1rem * $line-height-base); + padding-left: $custom-control-gutter; + margin-right: $custom-control-spacer-x; + cursor: pointer; +} + +.custom-control-input { + position: absolute; + z-index: -1; // Put the input behind the label so it doesn't overlay text + opacity: 0; + + &:checked ~ .custom-control-indicator { + color: $custom-control-checked-indicator-color; + background-color: $custom-control-checked-indicator-bg; + @include box-shadow($custom-control-checked-indicator-box-shadow); + } + + &:focus ~ .custom-control-indicator { + // the mixin is not used here to make sure there is feedback + box-shadow: $custom-control-focus-indicator-box-shadow; + } + + &:active ~ .custom-control-indicator { + color: $custom-control-active-indicator-color; + background-color: $custom-control-active-indicator-bg; + @include box-shadow($custom-control-active-indicator-box-shadow); + } + + &:disabled { + ~ .custom-control-indicator { + cursor: $custom-control-disabled-cursor; + background-color: $custom-control-disabled-indicator-bg; + } + + ~ .custom-control-description { + color: $custom-control-disabled-description-color; + cursor: $custom-control-disabled-cursor; + } + } +} + +// Custom indicator +// +// Generates a shadow element to create our makeshift checkbox/radio background. + +.custom-control-indicator { + position: absolute; + top: (($line-height-base - $custom-control-indicator-size) / 2); + left: 0; + display: block; + width: $custom-control-indicator-size; + height: $custom-control-indicator-size; + pointer-events: none; + user-select: none; + background-color: $custom-control-indicator-bg; + background-repeat: no-repeat; + background-position: center center; + background-size: $custom-control-indicator-bg-size; + @include box-shadow($custom-control-indicator-box-shadow); +} + +// Checkboxes +// +// Tweak just a few things for checkboxes. + +.custom-checkbox { + .custom-control-indicator { + @include border-radius($custom-checkbox-radius); + } + + .custom-control-input:checked ~ .custom-control-indicator { + background-image: $custom-checkbox-checked-icon; + } + + .custom-control-input:indeterminate ~ .custom-control-indicator { + background-color: $custom-checkbox-indeterminate-bg; + background-image: $custom-checkbox-indeterminate-icon; + @include box-shadow($custom-checkbox-indeterminate-box-shadow); + } +} + +// Radios +// +// Tweak just a few things for radios. + +.custom-radio { + .custom-control-indicator { + border-radius: $custom-radio-radius; + } + + .custom-control-input:checked ~ .custom-control-indicator { + background-image: $custom-radio-checked-icon; + } +} + + +// Layout options +// +// By default radios and checkboxes are `inline-block` with no additional spacing +// set. Use these optional classes to tweak the layout. + +.custom-controls-stacked { + display: flex; + flex-direction: column; + + .custom-control { + margin-bottom: $custom-control-spacer-y; + + + .custom-control { + margin-left: 0; + } + } +} + + +// Select +// +// Replaces the browser default select with a custom one, mostly pulled from +// http://primercss.io. +// + +.custom-select { + display: inline-block; + max-width: 100%; + $select-border-width: ($border-width * 2); + height: calc(#{$input-height} + #{$select-border-width}); + padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x; + line-height: $custom-select-line-height; + color: $custom-select-color; + vertical-align: middle; + background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center; + background-size: $custom-select-bg-size; + border: $custom-select-border-width solid $custom-select-border-color; + @include border-radius($custom-select-border-radius); + // Use vendor prefixes as `appearance` isn't part of the CSS spec. + -moz-appearance: none; + -webkit-appearance: none; + + &:focus { + border-color: $custom-select-focus-border-color; + outline: none; + @include box-shadow($custom-select-focus-box-shadow); + + &::-ms-value { + // For visual consistency with other platforms/browsers, + // supress the default white text on blue background highlight given to + // the selected option text when the (still closed) <select> receives focus + // in IE and (under certain conditions) Edge. + // See https://github.com/twbs/bootstrap/issues/19398. + color: $input-color; + background-color: $input-bg; + } + } + + &:disabled { + color: $custom-select-disabled-color; + cursor: $cursor-disabled; + background-color: $custom-select-disabled-bg; + } + + // Hides the default caret in IE11 + &::-ms-expand { + opacity: 0; + } +} + +.custom-select-sm { + padding-top: $custom-select-padding-y; + padding-bottom: $custom-select-padding-y; + font-size: $custom-select-sm-font-size; + + // &:not([multiple]) { + // height: 26px; + // min-height: 26px; + // } +} + + +// File +// +// Custom file input. + +.custom-file { + position: relative; + display: inline-block; + max-width: 100%; + height: $custom-file-height; + margin-bottom: 0; + cursor: pointer; +} + +.custom-file-input { + min-width: $custom-file-width; + max-width: 100%; + height: $custom-file-height; + margin: 0; + filter: alpha(opacity = 0); + opacity: 0; + + &:focus ~ .custom-file-control { + @include box-shadow($custom-file-focus-box-shadow); + } +} + +.custom-file-control { + position: absolute; + top: 0; + right: 0; + left: 0; + z-index: 5; + height: $custom-file-height; + padding: $custom-file-padding-x $custom-file-padding-y; + line-height: $custom-file-line-height; + color: $custom-file-color; + pointer-events: none; + user-select: none; + background-color: $custom-file-bg; + border: $custom-file-border-width solid $custom-file-border-color; + @include border-radius($custom-file-border-radius); + @include box-shadow($custom-file-box-shadow); + + @each $lang, $text in map-get($custom-file-text, placeholder) { + &:lang(#{$lang})::after { + content: $text; + } + } + + &::before { + position: absolute; + top: -$custom-file-border-width; + right: -$custom-file-border-width; + bottom: -$custom-file-border-width; + z-index: 6; + display: block; + height: $custom-file-height; + padding: $custom-file-padding-x $custom-file-padding-y; + line-height: $custom-file-line-height; + color: $custom-file-button-color; + background-color: $custom-file-button-bg; + border: $custom-file-border-width solid $custom-file-border-color; + @include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0); + } + + @each $lang, $text in map-get($custom-file-text, button-label) { + &:lang(#{$lang})::before { + content: $text; + } + } +} diff --git a/csunplugged/static/scss/bootstrap/_custom.scss b/csunplugged/static/scss/bootstrap/_custom.scss new file mode 100644 index 000000000..88ccf202e --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_custom.scss @@ -0,0 +1,4 @@ +// Bootstrap overrides +// +// Copy variables from `_variables.scss` to this file to override default values +// without modifying source files. diff --git a/csunplugged/static/scss/bootstrap/_dropdown.scss b/csunplugged/static/scss/bootstrap/_dropdown.scss new file mode 100644 index 000000000..1c2741a2e --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_dropdown.scss @@ -0,0 +1,161 @@ +// The dropdown wrapper (`<div>`) +.dropup, +.dropdown { + position: relative; +} + +.dropdown-toggle { + // Generate the caret automatically + &::after { + display: inline-block; + width: 0; + height: 0; + margin-left: $caret-width; + vertical-align: middle; + content: ""; + border-top: $caret-width solid; + border-right: $caret-width solid transparent; + border-left: $caret-width solid transparent; + } + + // Prevent the focus on the dropdown toggle when closing dropdowns + &:focus { + outline: 0; + } +} + +.dropup { + .dropdown-toggle { + &::after { + border-top: 0; + border-bottom: $caret-width solid; + } + } +} + +// The dropdown menu +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: $zindex-dropdown; + display: none; // none by default, but block on "open" of the menu + float: left; + min-width: $dropdown-min-width; + padding: $dropdown-padding-y 0; + margin: $dropdown-margin-top 0 0; // override default ul + font-size: $font-size-base; // Redeclare because nesting can cause inheritance issues + color: $body-color; + text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) + list-style: none; + background-color: $dropdown-bg; + background-clip: padding-box; + border: $dropdown-border-width solid $dropdown-border-color; + @include border-radius($border-radius); + @include box-shadow($dropdown-box-shadow); +} + +// Dividers (basically an `<hr>`) within the dropdown +.dropdown-divider { + @include nav-divider($dropdown-divider-bg); +} + +// Links, buttons, and more within the dropdown menu +// +// `<button>`-specific styles are denoted with `// For <button>s` +.dropdown-item { + display: block; + width: 100%; // For `<button>`s + padding: 3px $dropdown-item-padding-x; + clear: both; + font-weight: $font-weight-normal; + color: $dropdown-link-color; + text-align: inherit; // For `<button>`s + white-space: nowrap; // prevent links from randomly breaking onto new lines + background: none; // For `<button>`s + border: 0; // For `<button>`s + + @include hover-focus { + color: $dropdown-link-hover-color; + text-decoration: none; + background-color: $dropdown-link-hover-bg; + } + + &.active, + &:active { + color: $dropdown-link-active-color; + text-decoration: none; + background-color: $dropdown-link-active-bg; + } + + &.disabled, + &:disabled { + color: $dropdown-link-disabled-color; + cursor: $cursor-disabled; + background-color: transparent; + // Remove CSS gradients if they're enabled + @if $enable-gradients { + background-image: none; + } + } +} + +// Open state for the dropdown +.show { + // Show the menu + > .dropdown-menu { + display: block; + } + + // Remove the outline when :focus is triggered + > a { + outline: 0; + } +} + +// Menu positioning +// +// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown +// menu with the parent. +.dropdown-menu-right { + right: 0; + left: auto; // Reset the default from `.dropdown-menu` +} + +.dropdown-menu-left { + right: auto; + left: 0; +} + +// Dropdown section headers +.dropdown-header { + display: block; + padding: $dropdown-padding-y $dropdown-item-padding-x; + margin-bottom: 0; // for use with heading elements + font-size: $font-size-sm; + color: $dropdown-header-color; + white-space: nowrap; // as with > li > a +} + +// Backdrop to catch body clicks on mobile, etc. +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: $zindex-dropdown-backdrop; +} + +// Allow for dropdowns to go bottom up (aka, dropup-menu) +// +// Just add .dropup after the standard .dropdown class and you're set. + +.dropup { + // Different positioning for bottom up menu + .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: $dropdown-margin-top; + } +} diff --git a/csunplugged/static/scss/bootstrap/_forms.scss b/csunplugged/static/scss/bootstrap/_forms.scss new file mode 100644 index 000000000..7be62bde6 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_forms.scss @@ -0,0 +1,388 @@ +// scss-lint:disable QualifyingElement + +// +// Textual form controls +// + +.form-control { + display: block; + width: 100%; + // // Make inputs at least the height of their button counterpart (base line-height + padding + border) + // height: $input-height; + padding: $input-padding-y $input-padding-x; + font-size: $font-size-base; + line-height: $input-line-height; + color: $input-color; + background-color: $input-bg; + // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214. + background-image: none; + background-clip: padding-box; + border: $input-btn-border-width solid $input-border-color; + + // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS. + @if $enable-rounded { + // Manually use the if/else instead of the mixin to account for iOS override + border-radius: $input-border-radius; + } @else { + // Otherwise undo the iOS default + border-radius: 0; + } + + @include box-shadow($input-box-shadow); + @include transition($input-transition); + + // Unstyle the caret on `<select>`s in IE10+. + &::-ms-expand { + background-color: transparent; + border: 0; + } + + // Customize the `:focus` state to imitate native WebKit styles. + @include form-control-focus(); + + // Placeholder + &::placeholder { + color: $input-color-placeholder; + // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526. + opacity: 1; + } + + // Disabled and read-only inputs + // + // HTML5 says that controls under a fieldset > legend:first-child won't be + // disabled if the fieldset is disabled. Due to implementation difficulty, we + // don't honor that edge case; we style them as disabled anyway. + &:disabled, + &[readonly] { + background-color: $input-bg-disabled; + // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655. + opacity: 1; + } + + &:disabled { + cursor: $cursor-disabled; + } +} + +select.form-control { + &:not([size]):not([multiple]) { + $select-border-width: ($border-width * 2); + height: calc(#{$input-height} + #{$select-border-width}); + } + + &:focus::-ms-value { + // Suppress the nested default white text on blue background highlight given to + // the selected option text when the (still closed) <select> receives focus + // in IE and (under certain conditions) Edge, as it looks bad and cannot be made to + // match the appearance of the native widget. + // See https://github.com/twbs/bootstrap/issues/19398. + color: $input-color; + background-color: $input-bg; + } +} + +// Make file inputs better match text inputs by forcing them to new lines. +.form-control-file, +.form-control-range { + display: block; +} + + +// +// Labels +// + +// For use with horizontal and inline forms, when you need the label text to +// align with the form controls. +.col-form-label { + padding-top: calc(#{$input-padding-y} - #{$input-btn-border-width} * 2); + padding-bottom: calc(#{$input-padding-y} - #{$input-btn-border-width} * 2); + margin-bottom: 0; // Override the `<label>` default +} + +.col-form-label-lg { + padding-top: calc(#{$input-padding-y-lg} - #{$input-btn-border-width} * 2); + padding-bottom: calc(#{$input-padding-y-lg} - #{$input-btn-border-width} * 2); + font-size: $font-size-lg; +} + +.col-form-label-sm { + padding-top: calc(#{$input-padding-y-sm} - #{$input-btn-border-width} * 2); + padding-bottom: calc(#{$input-padding-y-sm} - #{$input-btn-border-width} * 2); + font-size: $font-size-sm; +} + + +// +// Legends +// + +// For use with horizontal and inline forms, when you need the legend text to +// be the same size as regular labels, and to align with the form controls. +.col-form-legend { + padding-top: $input-padding-y; + padding-bottom: $input-padding-y; + margin-bottom: 0; + font-size: $font-size-base; +} + + +// Static form control text +// +// Apply class to an element to make any string of text align with labels in a +// horizontal form layout. + +.form-control-static { + padding-top: $input-padding-y; + padding-bottom: $input-padding-y; + margin-bottom: 0; // match inputs if this class comes on inputs with default margins + line-height: $input-line-height; + border: solid transparent; + border-width: $input-btn-border-width 0; + + &.form-control-sm, + &.form-control-lg { + padding-right: 0; + padding-left: 0; + } +} + + +// Form control sizing +// +// Build on `.form-control` with modifier classes to decrease or increase the +// height and font-size of form controls. +// +// The `.form-group-* form-control` variations are sadly duplicated to avoid the +// issue documented in https://github.com/twbs/bootstrap/issues/15074. + +.form-control-sm { + padding: $input-padding-y-sm $input-padding-x-sm; + font-size: $font-size-sm; + @include border-radius($input-border-radius-sm); +} + +select.form-control-sm { + &:not([size]):not([multiple]) { + height: $input-height-sm; + } +} + +.form-control-lg { + padding: $input-padding-y-lg $input-padding-x-lg; + font-size: $font-size-lg; + @include border-radius($input-border-radius-lg); +} + +select.form-control-lg { + &:not([size]):not([multiple]) { + height: $input-height-lg; + } +} + + +// Form groups +// +// Designed to help with the organization and spacing of vertical forms. For +// horizontal forms, use the predefined grid classes. + +.form-group { + margin-bottom: $form-group-margin-bottom; +} + +.form-text { + display: block; + margin-top: $form-text-margin-top; +} + + +// Checkboxes and radios +// +// Indent the labels to position radios/checkboxes as hanging controls. + +.form-check { + position: relative; + display: block; + margin-bottom: $form-check-margin-bottom; + + &.disabled { + .form-check-label { + color: $text-muted; + cursor: $cursor-disabled; + } + } +} + +.form-check-label { + padding-left: $form-check-input-gutter; + margin-bottom: 0; // Override default `<label>` bottom margin + cursor: pointer; +} + +.form-check-input { + position: absolute; + margin-top: $form-check-input-margin-y; + margin-left: -$form-check-input-gutter; + + &:only-child { + position: static; + } +} + +// Radios and checkboxes on same line +.form-check-inline { + display: inline-block; + + .form-check-label { + vertical-align: middle; + } + + + .form-check-inline { + margin-left: $form-check-inline-margin-x; + } +} + + +// Form control feedback states +// +// Apply contextual and semantic states to individual form controls. + +.form-control-feedback { + margin-top: $form-feedback-margin-top; +} + +.form-control-success, +.form-control-warning, +.form-control-danger { + padding-right: ($input-padding-x * 3); + background-repeat: no-repeat; + background-position: center right ($input-height / 4); + background-size: ($input-height / 2) ($input-height / 2); +} + +// Form validation states +.has-success { + @include form-control-validation($brand-success); + + .form-control-success { + background-image: $form-icon-success; + } +} + +.has-warning { + @include form-control-validation($brand-warning); + + .form-control-warning { + background-image: $form-icon-warning; + } +} + +.has-danger { + @include form-control-validation($brand-danger); + + .form-control-danger { + background-image: $form-icon-danger; + } +} + + +// Inline forms +// +// Make forms appear inline(-block) by adding the `.form-inline` class. Inline +// forms begin stacked on extra small (mobile) devices and then go inline when +// viewports reach <768px. +// +// Requires wrapping inputs and labels with `.form-group` for proper display of +// default HTML form controls and our custom form controls (e.g., input groups). + +.form-inline { + display: flex; + flex-flow: row wrap; + align-items: center; // Prevent shorter elements from growing to same height as others (e.g., small buttons growing to normal sized button height) + + // Because we use flex, the initial sizing of checkboxes is collapsed and + // doesn't occupy the full-width (which is what we want for xs grid tier), + // so we force that here. + .form-check { + width: 100%; + } + + // Kick in the inline + @include media-breakpoint-up(sm) { + label { + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 0; + } + + // Inline-block all the things for "inline" + .form-group { + display: flex; + flex: 0 0 auto; + flex-flow: row wrap; + align-items: center; + margin-bottom: 0; + } + + // Allow folks to *not* use `.form-group` + .form-control { + display: inline-block; + width: auto; // Prevent labels from stacking above inputs in `.form-group` + vertical-align: middle; + } + + // Make static controls behave like regular ones + .form-control-static { + display: inline-block; + } + + .input-group { + width: auto; + } + + .form-control-label { + margin-bottom: 0; + vertical-align: middle; + } + + // Remove default margin on radios/checkboxes that were used for stacking, and + // then undo the floating of radios and checkboxes to match. + .form-check { + display: flex; + align-items: center; + justify-content: center; + width: auto; + margin-top: 0; + margin-bottom: 0; + } + .form-check-label { + padding-left: 0; + } + .form-check-input { + position: relative; + margin-top: 0; + margin-right: $form-check-input-margin-x; + margin-left: 0; + } + + // Custom form controls + .custom-control { + display: flex; + align-items: center; + justify-content: center; + padding-left: 0; + } + .custom-control-indicator { + position: static; + display: inline-block; + margin-right: $form-check-input-margin-x; // Flexbox alignment means we lose our HTML space here, so we compensate. + vertical-align: text-bottom; + } + + // Re-override the feedback icon. + .has-feedback .form-control-feedback { + top: 0; + } + } +} diff --git a/csunplugged/static/scss/bootstrap/_grid.scss b/csunplugged/static/scss/bootstrap/_grid.scss new file mode 100644 index 000000000..8c7a9ee31 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_grid.scss @@ -0,0 +1,52 @@ +// Container widths +// +// Set the container width, and override it for fixed navbars in media queries. + +@if $enable-grid-classes { + .container { + @include make-container(); + @include make-container-max-widths(); + } +} + +// Fluid container +// +// Utilizes the mixin meant for fixed width containers, but without any defined +// width for fluid, full width layouts. + +@if $enable-grid-classes { + .container-fluid { + @include make-container(); + } +} + +// Row +// +// Rows contain and clear the floats of your columns. + +@if $enable-grid-classes { + .row { + @include make-row(); + } + + // Remove the negative margin from default .row, then the horizontal padding + // from all immediate children columns (to prevent runaway style inheritance). + .no-gutters { + margin-right: 0; + margin-left: 0; + + > .col, + > [class*="col-"] { + padding-right: 0; + padding-left: 0; + } + } +} + +// Columns +// +// Common styles for small and large grid columns + +@if $enable-grid-classes { + @include make-grid-columns(); +} diff --git a/csunplugged/static/scss/bootstrap/_images.scss b/csunplugged/static/scss/bootstrap/_images.scss new file mode 100644 index 000000000..a8135a6c3 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_images.scss @@ -0,0 +1,43 @@ +// Responsive images (ensure images don't scale beyond their parents) +// +// This is purposefully opt-in via an explicit class rather than being the default for all `<img>`s. +// We previously tried the "images are responsive by default" approach in Bootstrap v2, +// and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps) +// which weren't expecting the images within themselves to be involuntarily resized. +// See also https://github.com/twbs/bootstrap/issues/18178 +.img-fluid { + @include img-fluid; +} + + +// Image thumbnails +.img-thumbnail { + padding: $thumbnail-padding; + background-color: $thumbnail-bg; + border: $thumbnail-border-width solid $thumbnail-border-color; + @include border-radius($thumbnail-border-radius); + @include transition($thumbnail-transition); + @include box-shadow($thumbnail-box-shadow); + + // Keep them at most 100% wide + @include img-fluid; +} + +// +// Figures +// + +.figure { + // Ensures the caption's text aligns with the image. + display: inline-block; +} + +.figure-img { + margin-bottom: ($spacer-y / 2); + line-height: 1; +} + +.figure-caption { + font-size: $figure-caption-font-size; + color: $figure-caption-color; +} diff --git a/csunplugged/static/scss/bootstrap/_input-group.scss b/csunplugged/static/scss/bootstrap/_input-group.scss new file mode 100644 index 000000000..ab44883bd --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_input-group.scss @@ -0,0 +1,178 @@ +// +// Base styles +// + +.input-group { + position: relative; + display: flex; + width: 100%; + + .form-control { + // Ensure that the input is always above the *appended* addon button for + // proper border colors. + position: relative; + z-index: 2; + flex: 1 1 auto; + // Add width 1% and flex-basis auto to ensure that button will not wrap out + // the column. Applies to IE Edge+ and Firefox. Chrome does not require this. + width: 1%; + margin-bottom: 0; + + // Bring the "active" form control to the front + @include hover-focus-active { + z-index: 3; + } + } +} + +.input-group-addon, +.input-group-btn, +.input-group .form-control { + // Vertically centers the content of the addons within the input group + display: flex; + flex-direction: column; + justify-content: center; + + &:not(:first-child):not(:last-child) { + @include border-radius(0); + } +} + +.input-group-addon, +.input-group-btn { + white-space: nowrap; + vertical-align: middle; // Match the inputs +} + + +// Sizing options +// +// Remix the default form control sizing classes into new ones for easier +// manipulation. + +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + @extend .form-control-lg; +} +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + @extend .form-control-sm; +} + + +// +// Text input groups +// + +.input-group-addon { + padding: $input-padding-y $input-padding-x; + margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom + font-size: $font-size-base; // Match inputs + font-weight: $font-weight-normal; + line-height: $input-line-height; + color: $input-color; + text-align: center; + background-color: $input-group-addon-bg; + border: $input-btn-border-width solid $input-group-addon-border-color; + @include border-radius($input-border-radius); + + // Sizing + &.form-control-sm { + padding: $input-padding-y-sm $input-padding-x-sm; + font-size: $font-size-sm; + @include border-radius($input-border-radius-sm); + } + &.form-control-lg { + padding: $input-padding-y-lg $input-padding-x-lg; + font-size: $font-size-lg; + @include border-radius($input-border-radius-lg); + } + + // scss-lint:disable QualifyingElement + // Nuke default margins from checkboxes and radios to vertically center within. + input[type="radio"], + input[type="checkbox"] { + margin-top: 0; + } + // scss-lint:enable QualifyingElement +} + + +// +// Reset rounded corners +// + +.input-group .form-control:not(:last-child), +.input-group-addon:not(:last-child), +.input-group-btn:not(:last-child) > .btn, +.input-group-btn:not(:last-child) > .btn-group > .btn, +.input-group-btn:not(:last-child) > .dropdown-toggle, +.input-group-btn:not(:first-child) > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:not(:first-child) > .btn-group:not(:last-child) > .btn { + @include border-right-radius(0); +} +.input-group-addon:not(:last-child) { + border-right: 0; +} +.input-group .form-control:not(:first-child), +.input-group-addon:not(:first-child), +.input-group-btn:not(:first-child) > .btn, +.input-group-btn:not(:first-child) > .btn-group > .btn, +.input-group-btn:not(:first-child) > .dropdown-toggle, +.input-group-btn:not(:last-child) > .btn:not(:first-child), +.input-group-btn:not(:last-child) > .btn-group:not(:first-child) > .btn { + @include border-left-radius(0); +} +.form-control + .input-group-addon:not(:first-child) { + border-left: 0; +} + +// +// Button input groups +// + +.input-group-btn { + position: relative; + // Jankily prevent input button groups from wrapping with `white-space` and + // `font-size` in combination with `inline-block` on buttons. + font-size: 0; + white-space: nowrap; + + // Negative margin for spacing, position for bringing hovered/focused/actived + // element above the siblings. + > .btn { + position: relative; + // Vertically stretch the button and center its content + flex: 1; + + + .btn { + margin-left: (-$input-btn-border-width); + } + + // Bring the "active" button to the front + @include hover-focus-active { + z-index: 3; + } + } + + // Negative margin to only have a single, shared border between the two + &:not(:last-child) { + > .btn, + > .btn-group { + margin-right: (-$input-btn-border-width); + } + } + &:not(:first-child) { + > .btn, + > .btn-group { + z-index: 2; + margin-left: (-$input-btn-border-width); + // Because specificity + @include hover-focus-active { + z-index: 3; + } + } + } +} diff --git a/csunplugged/static/scss/bootstrap/_jumbotron.scss b/csunplugged/static/scss/bootstrap/_jumbotron.scss new file mode 100644 index 000000000..b12d465d9 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_jumbotron.scss @@ -0,0 +1,20 @@ +.jumbotron { + padding: $jumbotron-padding ($jumbotron-padding / 2); + margin-bottom: $jumbotron-padding; + background-color: $jumbotron-bg; + @include border-radius($border-radius-lg); + + @include media-breakpoint-up(sm) { + padding: ($jumbotron-padding * 2) $jumbotron-padding; + } +} + +.jumbotron-hr { + border-top-color: darken($jumbotron-bg, 10%); +} + +.jumbotron-fluid { + padding-right: 0; + padding-left: 0; + @include border-radius(0); +} diff --git a/csunplugged/static/scss/bootstrap/_list-group.scss b/csunplugged/static/scss/bootstrap/_list-group.scss new file mode 100644 index 000000000..ec813c807 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_list-group.scss @@ -0,0 +1,141 @@ +// Base class +// +// Easily usable on <ul>, <ol>, or <div>. + +.list-group { + display: flex; + flex-direction: column; + + // No need to set list-style: none; since .list-group-item is block level + padding-left: 0; // reset padding because ul and ol + margin-bottom: 0; +} + + +// Interactive list items +// +// Use anchor or button elements instead of `li`s or `div`s to create interactive +// list items. Includes an extra `.active` modifier class for selected items. + +.list-group-item-action { + width: 100%; // For `<button>`s (anchors become 100% by default though) + color: $list-group-link-color; + text-align: inherit; // For `<button>`s (anchors inherit) + + .list-group-item-heading { + color: $list-group-link-heading-color; + } + + // Hover state + @include hover-focus { + color: $list-group-link-hover-color; + text-decoration: none; + background-color: $list-group-hover-bg; + } + + &:active { + color: $list-group-link-active-color; + background-color: $list-group-link-active-bg; + } +} + + +// Individual list items +// +// Use on `li`s or `div`s within the `.list-group` parent. + +.list-group-item { + position: relative; + display: flex; + flex-flow: row wrap; + align-items: center; + padding: $list-group-item-padding-y $list-group-item-padding-x; + // Place the border on the list items and negative margin up for better styling + margin-bottom: -$list-group-border-width; + background-color: $list-group-bg; + border: $list-group-border-width solid $list-group-border-color; + + &:first-child { + @include border-top-radius($list-group-border-radius); + } + + &:last-child { + margin-bottom: 0; + @include border-bottom-radius($list-group-border-radius); + } + + @include hover-focus { + text-decoration: none; + } + + &.disabled, + &:disabled { + color: $list-group-disabled-color; + cursor: $cursor-disabled; + background-color: $list-group-disabled-bg; + + // Force color to inherit for custom content + .list-group-item-heading { + color: inherit; + } + .list-group-item-text { + color: $list-group-disabled-text-color; + } + } + + // Include both here for `<a>`s and `<button>`s + &.active { + z-index: 2; // Place active items above their siblings for proper border styling + color: $list-group-active-color; + background-color: $list-group-active-bg; + border-color: $list-group-active-border; + + // Force color to inherit for custom content + .list-group-item-heading, + .list-group-item-heading > small, + .list-group-item-heading > .small { + color: inherit; + } + + .list-group-item-text { + color: $list-group-active-text-color; + } + } +} + + +// Flush list items +// +// Remove borders and border-radius to keep list group items edge-to-edge. Most +// useful within other components (e.g., cards). + +.list-group-flush { + .list-group-item { + border-right: 0; + border-left: 0; + border-radius: 0; + } + + &:first-child { + .list-group-item:first-child { + border-top: 0; + } + } + + &:last-child { + .list-group-item:last-child { + border-bottom: 0; + } + } +} + + +// Contextual variants +// +// Add modifier classes to change text and background color on individual items. +// Organizationally, this must come after the `:hover` states. + +@include list-group-item-variant(success, $state-success-bg, $state-success-text); +@include list-group-item-variant(info, $state-info-bg, $state-info-text); +@include list-group-item-variant(warning, $state-warning-bg, $state-warning-text); +@include list-group-item-variant(danger, $state-danger-bg, $state-danger-text); diff --git a/csunplugged/static/scss/bootstrap/_media.scss b/csunplugged/static/scss/bootstrap/_media.scss new file mode 100644 index 000000000..b573052c1 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_media.scss @@ -0,0 +1,8 @@ +.media { + display: flex; + align-items: flex-start; +} + +.media-body { + flex: 1; +} diff --git a/csunplugged/static/scss/bootstrap/_mixins.scss b/csunplugged/static/scss/bootstrap/_mixins.scss new file mode 100644 index 000000000..da4738297 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_mixins.scss @@ -0,0 +1,57 @@ +// Toggles +// +// Used in conjunction with global variables to enable certain theme features. + +@mixin box-shadow($shadow...) { + @if $enable-shadows { + box-shadow: $shadow; + } +} + +@mixin transition($transition...) { + @if $enable-transitions { + @if length($transition) == 0 { + transition: $transition-base; + } @else { + transition: $transition; + } + } +} + +// Utilities +@import "mixins/breakpoints"; +@import "mixins/hover"; +@import "mixins/image"; +@import "mixins/badge"; +@import "mixins/resize"; +@import "mixins/screen-reader"; +@import "mixins/size"; +@import "mixins/reset-text"; +@import "mixins/text-emphasis"; +@import "mixins/text-hide"; +@import "mixins/text-truncate"; +@import "mixins/transforms"; +@import "mixins/visibility"; + +// // Components +@import "mixins/alert"; +@import "mixins/buttons"; +@import "mixins/cards"; +@import "mixins/pagination"; +@import "mixins/lists"; +@import "mixins/list-group"; +@import "mixins/nav-divider"; +@import "mixins/forms"; +@import "mixins/table-row"; + +// // Skins +@import "mixins/background-variant"; +@import "mixins/border-radius"; +@import "mixins/gradients"; + +// // Layout +@import "mixins/clearfix"; +// @import "mixins/navbar-align"; +@import "mixins/grid-framework"; +@import "mixins/grid"; +@import "mixins/float"; diff --git a/csunplugged/static/scss/bootstrap/_modal.scss b/csunplugged/static/scss/bootstrap/_modal.scss new file mode 100644 index 000000000..9d2a86776 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_modal.scss @@ -0,0 +1,142 @@ +// .modal-open - body class for killing the scroll +// .modal - container to scroll within +// .modal-dialog - positioning shell for the actual modal +// .modal-content - actual modal w/ bg and corners and stuff + + +// Kill the scroll on the body +.modal-open { + overflow: hidden; +} + +// Container that the modal scrolls within +.modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: $zindex-modal; + display: none; + overflow: hidden; + // Prevent Chrome on Windows from adding a focus outline. For details, see + // https://github.com/twbs/bootstrap/pull/10951. + outline: 0; + // We deliberately don't use `-webkit-overflow-scrolling: touch;` due to a + // gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342 + // See also https://github.com/twbs/bootstrap/issues/17695 + + // When fading in the modal, animate it to slide down + &.fade .modal-dialog { + @include transition($modal-transition); + transform: translate(0, -25%); + } + &.show .modal-dialog { transform: translate(0, 0); } +} +.modal-open .modal { + overflow-x: hidden; + overflow-y: auto; +} + +// Shell div to position the modal with bottom padding +.modal-dialog { + position: relative; + width: auto; + margin: $modal-dialog-margin; +} + +// Actual modal +.modal-content { + position: relative; + display: flex; + flex-direction: column; + background-color: $modal-content-bg; + background-clip: padding-box; + border: $modal-content-border-width solid $modal-content-border-color; + @include border-radius($border-radius-lg); + @include box-shadow($modal-content-xs-box-shadow); + // Remove focus outline from opened modal + outline: 0; +} + +// Modal background +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: $zindex-modal-backdrop; + background-color: $modal-backdrop-bg; + + // Fade for backdrop + &.fade { opacity: 0; } + &.show { opacity: $modal-backdrop-opacity; } +} + +// Modal header +// Top section of the modal w/ title and dismiss +.modal-header { + display: flex; + align-items: center; // vertically center it + justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends + padding: $modal-header-padding; + border-bottom: $modal-header-border-width solid $modal-header-border-color; +} + +// Title text within header +.modal-title { + margin-bottom: 0; + line-height: $modal-title-line-height; +} + +// Modal body +// Where all modal content resides (sibling of .modal-header and .modal-footer) +.modal-body { + position: relative; + // Enable `flex-grow: 1` so that the body take up as much space as possible + // when should there be a fixed height on `.modal-dialog`. + flex: 1 1 auto; + padding: $modal-inner-padding; +} + +// Footer (for actions) +.modal-footer { + display: flex; + align-items: center; // vertically center + justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items + padding: $modal-inner-padding; + border-top: $modal-footer-border-width solid $modal-footer-border-color; + + // Easily place margin between footer elements + > :not(:first-child) { margin-left: .25rem; } + > :not(:last-child) { margin-right: .25rem; } +} + +// Measure scrollbar width for padding body during modal show/hide +.modal-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} + +// Scale up the modal +@include media-breakpoint-up(sm) { + // Automatically set modal's width for larger viewports + .modal-dialog { + max-width: $modal-md; + margin: $modal-dialog-sm-up-margin-y auto; + } + + .modal-content { + @include box-shadow($modal-content-sm-up-box-shadow); + } + + .modal-sm { max-width: $modal-sm; } +} + +@include media-breakpoint-up(lg) { + .modal-lg { max-width: $modal-lg; } +} diff --git a/csunplugged/static/scss/bootstrap/_nav.scss b/csunplugged/static/scss/bootstrap/_nav.scss new file mode 100644 index 000000000..eb316bb27 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_nav.scss @@ -0,0 +1,119 @@ +// Base class +// +// Kickstart any navigation component with a set of style resets. Works with +// `<nav>`s or `<ul>`s. + +.nav { + display: flex; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.nav-link { + display: block; + padding: $nav-link-padding; + + @include hover-focus { + text-decoration: none; + } + + // Disabled state lightens text and removes hover/tab effects + &.disabled { + color: $nav-disabled-link-color; + cursor: $cursor-disabled; + } +} + + +// +// Tabs +// + +.nav-tabs { + border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color; + + .nav-item { + margin-bottom: -$nav-tabs-border-width; + } + + .nav-link { + border: $nav-tabs-border-width solid transparent; + @include border-top-radius($nav-tabs-border-radius); + + @include hover-focus { + border-color: $nav-tabs-link-hover-border-color $nav-tabs-link-hover-border-color $nav-tabs-border-color; + } + + &.disabled { + color: $nav-disabled-link-color; + background-color: transparent; + border-color: transparent; + } + } + + .nav-link.active, + .nav-item.show .nav-link { + color: $nav-tabs-active-link-hover-color; + background-color: $nav-tabs-active-link-hover-bg; + border-color: $nav-tabs-active-link-hover-border-color $nav-tabs-active-link-hover-border-color $nav-tabs-active-link-hover-bg; + } + + .dropdown-menu { + // Make dropdown border overlap tab border + margin-top: -$nav-tabs-border-width; + // Remove the top rounded corners here since there is a hard edge above the menu + @include border-top-radius(0); + } +} + + +// +// Pills +// + +.nav-pills { + .nav-link { + @include border-radius($nav-pills-border-radius); + } + + .nav-link.active, + .nav-item.show .nav-link { + color: $nav-pills-active-link-color; + cursor: default; + background-color: $nav-pills-active-link-bg; + } +} + + +// +// Justified variants +// + +.nav-fill { + .nav-item { + flex: 1 1 auto; + text-align: center; + } +} + +.nav-justified { + .nav-item { + flex: 1 1 100%; + text-align: center; + } +} + + +// Tabbable tabs +// +// Hide tabbable panes to start, show them when `.active` + +.tab-content { + > .tab-pane { + display: none; + } + > .active { + display: block; + } +} diff --git a/csunplugged/static/scss/bootstrap/_navbar.scss b/csunplugged/static/scss/bootstrap/_navbar.scss new file mode 100644 index 000000000..80beec8f3 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_navbar.scss @@ -0,0 +1,268 @@ +// Contents +// +// Navbar +// Navbar brand +// Navbar nav +// Navbar text +// Navbar divider +// Responsive navbar +// Navbar position +// Navbar themes + + +// Navbar +// +// Provide a static navbar from which we expand to create full-width, fixed, and +// other navbar variations. + +.navbar { + position: relative; + display: flex; + flex-direction: column; + padding: $navbar-padding-y $navbar-padding-x; +} + + +// Navbar brand +// +// Used for brand, project, or site names. + +.navbar-brand { + display: inline-block; + padding-top: .25rem; + padding-bottom: .25rem; + margin-right: $navbar-padding-x; + font-size: $font-size-lg; + line-height: inherit; + white-space: nowrap; + + @include hover-focus { + text-decoration: none; + } +} + + +// Navbar nav +// +// Custom navbar navigation (doesn't require `.nav`, but does make use of `.nav-link`). + +.navbar-nav { + display: flex; + flex-direction: column; // cannot use `inherit` to get the `.navbar`s value + padding-left: 0; + margin-bottom: 0; + list-style: none; + + .nav-link { + padding-right: 0; + padding-left: 0; + } +} + + +// Navbar text +// +// + +.navbar-text { + display: inline-block; + padding-top: .425rem; + padding-bottom: .425rem; +} + + +// Responsive navbar +// +// Custom styles for responsive collapsing and toggling of navbar contents. +// Powered by the collapse Bootstrap JavaScript plugin. + +// Button for toggling the navbar when in its collapsed state +.navbar-toggler { + align-self: flex-start; // Prevent toggler from growing to full width when it's the only visible navbar child + padding: $navbar-toggler-padding-y $navbar-toggler-padding-x; + font-size: $navbar-toggler-font-size; + line-height: 1; + background: transparent; // remove default button style + border: $border-width solid transparent; // remove default button style + @include border-radius($navbar-toggler-border-radius); + + @include hover-focus { + text-decoration: none; + } +} + +// Keep as a separate element so folks can easily override it with another icon +// or image file as needed. +.navbar-toggler-icon { + display: inline-block; + width: 1.5em; + height: 1.5em; + vertical-align: middle; + content: ""; + background: no-repeat center center; + background-size: 100% 100%; +} + +// Use `position` on the toggler to prevent it from being auto placed as a flex +// item and allow easy placement. +.navbar-toggler-left { + position: absolute; + left: $navbar-padding-x; +} +.navbar-toggler-right { + position: absolute; + right: $navbar-padding-x; +} + +// Generate series of `.navbar-toggleable-*` responsive classes for configuring +// where your navbar collapses. +.navbar-toggleable { + @each $breakpoint in map-keys($grid-breakpoints) { + $next: breakpoint-next($breakpoint, $grid-breakpoints); + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + &#{$infix} { + @include media-breakpoint-down($breakpoint) { + .navbar-nav { + .dropdown-menu { + position: static; + float: none; + } + } + + > .container { + padding-right: 0; + padding-left: 0; + } + } + + @include media-breakpoint-up($next) { + flex-direction: row; + flex-wrap: nowrap; + align-items: center; + + .navbar-nav { + flex-direction: row; + + .nav-link { + padding-right: .5rem; + padding-left: .5rem; + } + } + + // For nesting containers, have to redeclare for alignment purposes + > .container { + display: flex; + flex-wrap: nowrap; + align-items: center; + } + + // scss-lint:disable ImportantRule + .navbar-collapse { + display: flex !important; + width: 100%; + } + // scss-lint:enable ImportantRule + + .navbar-toggler { + display: none; + } + } + } + } +} + + +// Navbar themes +// +// Styles for switching between navbars with light or dark background. + +// Dark links against a light background +.navbar-light { + .navbar-brand, + .navbar-toggler { + color: $navbar-light-active-color; + + @include hover-focus { + color: $navbar-light-active-color; + } + } + + .navbar-nav { + .nav-link { + color: $navbar-light-color; + + @include hover-focus { + color: $navbar-light-hover-color; + } + + &.disabled { + color: $navbar-light-disabled-color; + } + } + + .open > .nav-link, + .active > .nav-link, + .nav-link.open, + .nav-link.active { + color: $navbar-light-active-color; + } + } + + .navbar-toggler { + border-color: $navbar-light-toggler-border; + } + + .navbar-toggler-icon { + background-image: $navbar-light-toggler-bg; + } + + .navbar-text { + color: $navbar-light-color; + } +} + +// White links against a dark background +.navbar-inverse { + .navbar-brand, + .navbar-toggler { + color: $navbar-inverse-active-color; + + @include hover-focus { + color: $navbar-inverse-active-color; + } + } + + .navbar-nav { + .nav-link { + color: $navbar-inverse-color; + + @include hover-focus { + color: $navbar-inverse-hover-color; + } + + &.disabled { + color: $navbar-inverse-disabled-color; + } + } + + .open > .nav-link, + .active > .nav-link, + .nav-link.open, + .nav-link.active { + color: $navbar-inverse-active-color; + } + } + + .navbar-toggler { + border-color: $navbar-inverse-toggler-border; + } + + .navbar-toggler-icon { + background-image: $navbar-inverse-toggler-bg; + } + + .navbar-text { + color: $navbar-inverse-color; + } +} diff --git a/csunplugged/static/scss/bootstrap/_normalize.scss b/csunplugged/static/scss/bootstrap/_normalize.scss new file mode 100644 index 000000000..6bafd53f6 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_normalize.scss @@ -0,0 +1,461 @@ +/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ + +// +// 1. Change the default font family in all browsers (opinionated). +// 2. Correct the line height in all browsers. +// 3. Prevent adjustments of font size after orientation changes in +// IE on Windows Phone and in iOS. +// + +// Document +// ========================================================================== + +html { + font-family: sans-serif; // 1 + line-height: 1.15; // 2 + -ms-text-size-adjust: 100%; // 3 + -webkit-text-size-adjust: 100%; // 3 +} + +// Sections +// ========================================================================== + +// +// Remove the margin in all browsers (opinionated). +// + +body { + margin: 0; +} + +// +// Add the correct display in IE 9-. +// + +article, +aside, +footer, +header, +nav, +section { + display: block; +} + +// +// Correct the font size and margin on `h1` elements within `section` and +// `article` contexts in Chrome, Firefox, and Safari. +// + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +// Grouping content +// ========================================================================== + +// +// Add the correct display in IE 9-. +// 1. Add the correct display in IE. +// + +figcaption, +figure, +main { // 1 + display: block; +} + +// +// Add the correct margin in IE 8. +// + +figure { + margin: 1em 40px; +} + +// +// 1. Add the correct box sizing in Firefox. +// 2. Show the overflow in Edge and IE. +// + +hr { + box-sizing: content-box; // 1 + height: 0; // 1 + overflow: visible; // 2 +} + +// +// 1. Correct the inheritance and scaling of font size in all browsers. +// 2. Correct the odd `em` font sizing in all browsers. +// + +pre { + font-family: monospace, monospace; // 1 + font-size: 1em; // 2 +} + +// Text-level semantics +// ========================================================================== + +// +// 1. Remove the gray background on active links in IE 10. +// 2. Remove gaps in links underline in iOS 8+ and Safari 8+. +// + +a { + background-color: transparent; // 1 + -webkit-text-decoration-skip: objects; // 2 +} + +// +// Remove the outline on focused links when they are also active or hovered +// in all browsers (opinionated). +// + +a:active, +a:hover { + outline-width: 0; +} + +// +// 1. Remove the bottom border in Firefox 39-. +// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. +// + +abbr[title] { + border-bottom: none; // 1 + text-decoration: underline; // 2 + text-decoration: underline dotted; // 2 +} + +// +// Prevent the duplicate application of `bolder` by the next rule in Safari 6. +// + +b, +strong { + font-weight: inherit; +} + +// +// Add the correct font weight in Chrome, Edge, and Safari. +// + +b, +strong { + font-weight: bolder; +} + +// +// 1. Correct the inheritance and scaling of font size in all browsers. +// 2. Correct the odd `em` font sizing in all browsers. +// + +code, +kbd, +samp { + font-family: monospace, monospace; // 1 + font-size: 1em; // 2 +} + +// +// Add the correct font style in Android 4.3-. +// + +dfn { + font-style: italic; +} + +// +// Add the correct background and color in IE 9-. +// + +mark { + background-color: #ff0; + color: #000; +} + +// +// Add the correct font size in all browsers. +// + +small { + font-size: 80%; +} + +// +// Prevent `sub` and `sup` elements from affecting the line height in +// all browsers. +// + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +// Embedded content +// ========================================================================== + +// +// Add the correct display in IE 9-. +// + +audio, +video { + display: inline-block; +} + +// +// Add the correct display in iOS 4-7. +// + +audio:not([controls]) { + display: none; + height: 0; +} + +// +// Remove the border on images inside links in IE 10-. +// + +img { + border-style: none; +} + +// +// Hide the overflow in IE. +// + +svg:not(:root) { + overflow: hidden; +} + +// Forms +// ========================================================================== + +// +// 1. Change the font styles in all browsers (opinionated). +// 2. Remove the margin in Firefox and Safari. +// + +button, +input, +optgroup, +select, +textarea { + font-family: sans-serif; // 1 + font-size: 100%; // 1 + line-height: 1.15; // 1 + margin: 0; // 2 +} + +// +// Show the overflow in IE. +// 1. Show the overflow in Edge. +// + +button, +input { // 1 + overflow: visible; +} + +// +// Remove the inheritance of text transform in Edge, Firefox, and IE. +// 1. Remove the inheritance of text transform in Firefox. +// + +button, +select { // 1 + text-transform: none; +} + +// +// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` +// controls in Android 4. +// 2. Correct the inability to style clickable types in iOS and Safari. +// + +button, +html [type="button"], // 1 +[type="reset"], +[type="submit"] { + -webkit-appearance: button; // 2 +} + +// +// Remove the inner border and padding in Firefox. +// + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +// +// Restore the focus styles unset by the previous rule. +// + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +// +// Change the border, margin, and padding in all browsers (opinionated). +// + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +// +// 1. Correct the text wrapping in Edge and IE. +// 2. Correct the color inheritance from `fieldset` elements in IE. +// 3. Remove the padding so developers are not caught out when they zero out +// `fieldset` elements in all browsers. +// + +legend { + box-sizing: border-box; // 1 + color: inherit; // 2 + display: table; // 1 + max-width: 100%; // 1 + padding: 0; // 3 + white-space: normal; // 1 +} + +// +// 1. Add the correct display in IE 9-. +// 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. +// + +progress { + display: inline-block; // 1 + vertical-align: baseline; // 2 +} + +// +// Remove the default vertical scrollbar in IE. +// + +textarea { + overflow: auto; +} + +// +// 1. Add the correct box sizing in IE 10-. +// 2. Remove the padding in IE 10-. +// + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; // 1 + padding: 0; // 2 +} + +// +// Correct the cursor style of increment and decrement buttons in Chrome. +// + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +// +// 1. Correct the odd appearance in Chrome and Safari. +// 2. Correct the outline style in Safari. +// + +[type="search"] { + -webkit-appearance: textfield; // 1 + outline-offset: -2px; // 2 +} + +// +// Remove the inner padding and cancel buttons in Chrome and Safari on macOS. +// + +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +// +// 1. Correct the inability to style clickable types in iOS and Safari. +// 2. Change font properties to `inherit` in Safari. +// + +::-webkit-file-upload-button { + -webkit-appearance: button; // 1 + font: inherit; // 2 +} + +// Interactive +// ========================================================================== + +// +// Add the correct display in IE 9-. +// 1. Add the correct display in Edge, IE, and Firefox. +// + +details, // 1 +menu { + display: block; +} + +// +// Add the correct display in all browsers. +// + +summary { + display: list-item; +} + +// Scripting +// ========================================================================== + +// +// Add the correct display in IE 9-. +// + +canvas { + display: inline-block; +} + +// +// Add the correct display in IE. +// + +template { + display: none; +} + +// Hidden +// ========================================================================== + +// +// Add the correct display in IE 10-. +// + +[hidden] { + display: none; +} diff --git a/csunplugged/static/scss/bootstrap/_pagination.scss b/csunplugged/static/scss/bootstrap/_pagination.scss new file mode 100644 index 000000000..24aa028d1 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_pagination.scss @@ -0,0 +1,67 @@ +.pagination { + display: flex; + // 1-2: Disable browser default list styles + padding-left: 0; // 1 + list-style: none; // 2 + @include border-radius(); +} + +.page-item { + &:first-child { + .page-link { + margin-left: 0; + @include border-left-radius($border-radius); + } + } + &:last-child { + .page-link { + @include border-right-radius($border-radius); + } + } + + &.active .page-link { + z-index: 2; + color: $pagination-active-color; + background-color: $pagination-active-bg; + border-color: $pagination-active-border; + } + + &.disabled .page-link { + color: $pagination-disabled-color; + pointer-events: none; + cursor: $cursor-disabled; // While `pointer-events: none` removes the cursor in modern browsers, we provide a disabled cursor as a fallback. + background-color: $pagination-disabled-bg; + border-color: $pagination-disabled-border; + } +} + +.page-link { + position: relative; + display: block; + padding: $pagination-padding-y $pagination-padding-x; + margin-left: -1px; + line-height: $pagination-line-height; + color: $pagination-color; + background-color: $pagination-bg; + border: $pagination-border-width solid $pagination-border-color; + + @include hover-focus { + color: $pagination-hover-color; + text-decoration: none; + background-color: $pagination-hover-bg; + border-color: $pagination-hover-border; + } +} + + +// +// Sizing +// + +.pagination-lg { + @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $border-radius-lg); +} + +.pagination-sm { + @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $line-height-sm, $border-radius-sm); +} diff --git a/csunplugged/static/scss/bootstrap/_popover.scss b/csunplugged/static/scss/bootstrap/_popover.scss new file mode 100644 index 000000000..1b6363405 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_popover.scss @@ -0,0 +1,171 @@ +.popover { + position: absolute; + top: 0; + left: 0; + z-index: $zindex-popover; + display: block; + max-width: $popover-max-width; + padding: $popover-inner-padding; + // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element. + // So reset our font and text properties to avoid inheriting weird values. + @include reset-text(); + font-size: $font-size-sm; + // Allow breaking very long words so they don't overflow the popover's bounds + word-wrap: break-word; + background-color: $popover-bg; + background-clip: padding-box; + border: $popover-border-width solid $popover-border-color; + @include border-radius($border-radius-lg); + @include box-shadow($popover-box-shadow); + + + // Popover directions + + &.popover-top, + &.bs-tether-element-attached-bottom { + margin-top: -$popover-arrow-width; + + &::before, + &::after { + left: 50%; + border-bottom-width: 0; + } + + &::before { + bottom: -$popover-arrow-outer-width; + margin-left: -$popover-arrow-outer-width; + border-top-color: $popover-arrow-outer-color; + } + + &::after { + bottom: -($popover-arrow-outer-width - 1); + margin-left: -$popover-arrow-width; + border-top-color: $popover-arrow-color; + } + } + + &.popover-right, + &.bs-tether-element-attached-left { + margin-left: $popover-arrow-width; + + &::before, + &::after { + top: 50%; + border-left-width: 0; + } + + &::before { + left: -$popover-arrow-outer-width; + margin-top: -$popover-arrow-outer-width; + border-right-color: $popover-arrow-outer-color; + } + + &::after { + left: -($popover-arrow-outer-width - 1); + margin-top: -($popover-arrow-outer-width - 1); + border-right-color: $popover-arrow-color; + } + } + + &.popover-bottom, + &.bs-tether-element-attached-top { + margin-top: $popover-arrow-width; + + &::before, + &::after { + left: 50%; + border-top-width: 0; + } + + &::before { + top: -$popover-arrow-outer-width; + margin-left: -$popover-arrow-outer-width; + border-bottom-color: $popover-arrow-outer-color; + } + + &::after { + top: -($popover-arrow-outer-width - 1); + margin-left: -$popover-arrow-width; + border-bottom-color: $popover-title-bg; + } + + // This will remove the popover-title's border just below the arrow + .popover-title::before { + position: absolute; + top: 0; + left: 50%; + display: block; + width: 20px; + margin-left: -10px; + content: ""; + border-bottom: 1px solid $popover-title-bg; + } + } + + &.popover-left, + &.bs-tether-element-attached-right { + margin-left: -$popover-arrow-width; + + &::before, + &::after { + top: 50%; + border-right-width: 0; + } + + &::before { + right: -$popover-arrow-outer-width; + margin-top: -$popover-arrow-outer-width; + border-left-color: $popover-arrow-outer-color; + } + + &::after { + right: -($popover-arrow-outer-width - 1); + margin-top: -($popover-arrow-outer-width - 1); + border-left-color: $popover-arrow-color; + } + } +} + + +// Offset the popover to account for the popover arrow +.popover-title { + padding: $popover-title-padding-y $popover-title-padding-x; + margin-bottom: 0; // Reset the default from Reboot + font-size: $font-size-base; + background-color: $popover-title-bg; + border-bottom: $popover-border-width solid darken($popover-title-bg, 5%); + $offset-border-width: calc(#{$border-radius-lg} - #{$popover-border-width}); + @include border-top-radius($offset-border-width); + + &:empty { + display: none; + } +} + +.popover-content { + padding: $popover-content-padding-y $popover-content-padding-x; +} + + +// Arrows +// +// .popover-arrow is outer, .popover-arrow::after is inner + +.popover::before, +.popover::after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.popover::before { + content: ""; + border-width: $popover-arrow-outer-width; +} +.popover::after { + content: ""; + border-width: $popover-arrow-width; +} diff --git a/csunplugged/static/scss/bootstrap/_print.scss b/csunplugged/static/scss/bootstrap/_print.scss new file mode 100644 index 000000000..e20219a38 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_print.scss @@ -0,0 +1,119 @@ +// scss-lint:disable QualifyingElement + +// Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css + +// ========================================================================== +// Print styles. +// Inlined to avoid the additional HTTP request: +// http://www.phpied.com/delay-loading-your-print-css/ +// ========================================================================== + +@if $enable-print-styles { + @media print { + *, + *::before, + *::after, + p::first-letter, + div::first-letter, + blockquote::first-letter, + li::first-letter, + p::first-line, + div::first-line, + blockquote::first-line, + li::first-line { + // Bootstrap specific; comment out `color` and `background` + //color: #000 !important; // Black prints faster: + // http://www.sanbeiji.com/archives/953 + text-shadow: none !important; + //background: transparent !important; + box-shadow: none !important; + } + + a, + a:visited { + text-decoration: underline; + } + + // Bootstrap specific; comment the following selector out + //a[href]::after { + // content: " (" attr(href) ")"; + //} + + abbr[title]::after { + content: " (" attr(title) ")"; + } + + // Bootstrap specific; comment the following selector out + // + // Don't show links that are fragment identifiers, + // or use the `javascript:` pseudo protocol + // + + //a[href^="#"]::after, + //a[href^="javascript:"]::after { + // content: ""; + //} + + pre { + white-space: pre-wrap !important; + } + pre, + blockquote { + border: $border-width solid #999; // Bootstrap custom code; using `$border-width` instead of 1px + page-break-inside: avoid; + } + + // + // Printing Tables: + // http://css-discuss.incutio.com/wiki/Printing_Tables + // + + thead { + display: table-header-group; + } + + tr, + img { + page-break-inside: avoid; + } + + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + + h2, + h3 { + page-break-after: avoid; + } + + // Bootstrap specific changes start + + // Bootstrap components + .navbar { + display: none; + } + .badge { + border: $border-width solid #000; + } + + .table { + border-collapse: collapse !important; + + td, + th { + background-color: #fff !important; + } + } + .table-bordered { + th, + td { + border: 1px solid #ddd !important; + } + } + + // Bootstrap specific changes end + } +} diff --git a/csunplugged/static/scss/bootstrap/_progress.scss b/csunplugged/static/scss/bootstrap/_progress.scss new file mode 100644 index 000000000..02e4c3bd2 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_progress.scss @@ -0,0 +1,32 @@ +// Progress animations +@keyframes progress-bar-stripes { + from { background-position: $progress-height 0; } + to { background-position: 0 0; } +} + +// Basic progress bar +.progress { + display: flex; + overflow: hidden; // force rounded corners by cropping it + font-size: $progress-font-size; + line-height: $progress-height; + text-align: center; + background-color: $progress-bg; + @include border-radius($progress-border-radius); +} +.progress-bar { + height: $progress-height; + color: $progress-bar-color; + background-color: $progress-bar-bg; +} + +// Striped +.progress-bar-striped { + @include gradient-striped(); + background-size: $progress-height $progress-height; +} + +// Animated +.progress-bar-animated { + animation: progress-bar-stripes $progress-bar-animation-timing; +} diff --git a/csunplugged/static/scss/bootstrap/_reboot.scss b/csunplugged/static/scss/bootstrap/_reboot.scss new file mode 100644 index 000000000..557829f25 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_reboot.scss @@ -0,0 +1,389 @@ +// scss-lint:disable QualifyingElement, DuplicateProperty + +// Reboot +// +// Global resets to common HTML elements and more for easier usage by Bootstrap. +// Adds additional rules on top of Normalize.css, including several overrides. + + +// Reset the box-sizing +// +// Change from `box-sizing: content-box` to `border-box` so that when you add +// `padding` or `border`s to an element, the overall declared `width` does not +// change. For example, `width: 100px;` will always be `100px` despite the +// `border: 10px solid red;` and `padding: 20px;`. +// +// Heads up! This reset may cause conflicts with some third-party widgets. For +// recommendations on resolving such conflicts, see +// https://getbootstrap.com/getting-started/#third-box-sizing. +// +// Credit: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ + +html { + box-sizing: border-box; +} + +*, +*::before, +*::after { + box-sizing: inherit; +} + + +// Make viewport responsive +// +// @viewport is needed because IE 10+ doesn't honor <meta name="viewport"> in +// some cases. See https://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/. +// Eventually @viewport will replace <meta name="viewport">. +// +// However, `device-width` is broken on IE 10 on Windows (Phone) 8, +// (see https://timkadlec.com/2013/01/windows-phone-8-and-device-width/ and https://github.com/twbs/bootstrap/issues/10497) +// and the fix for that involves a snippet of JavaScript to sniff the user agent +// and apply some conditional CSS. +// +// See https://getbootstrap.com/getting-started/#support-ie10-width for the relevant hack. +// +// Wrap `@viewport` with `@at-root` for when folks do a nested import (e.g., +// `.class-name { @import "bootstrap"; }`). +@at-root { + @-ms-viewport { width: device-width; } +} + + +// +// Reset HTML, body, and more +// + +html { + // We assume no initial pixel `font-size` for accessibility reasons. This + // allows web visitors to customize their browser default font-size, making + // your project more inclusive and accessible to everyone. + + // As a side-effect of setting the @viewport above, + // IE11 & Edge make the scrollbar overlap the content and automatically hide itself when not in use. + // Unfortunately, the auto-showing of the scrollbar is sometimes too sensitive, + // thus making it hard to click on stuff near the right edge of the page. + // So we add this style to force IE11 & Edge to use a "normal", non-overlapping, non-auto-hiding scrollbar. + // See https://github.com/twbs/bootstrap/issues/18543 + // and https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7165383/ + -ms-overflow-style: scrollbar; + + // Changes the default tap highlight to be completely transparent in iOS. + -webkit-tap-highlight-color: rgba(0,0,0,0); +} + +body { + font-family: $font-family-base; + font-size: $font-size-base; + font-weight: $font-weight-base; + line-height: $line-height-base; + // Go easy on the eyes and use something other than `#000` for text + color: $body-color; + // By default, `<body>` has no `background-color` so we set one as a best practice. + background-color: $body-bg; +} + +// Suppress the focus outline on elements that cannot be accessed via keyboard. +// This prevents an unwanted focus outline from appearing around elements that +// might still respond to pointer events. +// +// Credit: https://github.com/suitcss/base +[tabindex="-1"]:focus { + outline: none !important; +} + + +// +// Typography +// + +// Remove top margins from headings +// +// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top +// margin for easier control within type scales as it avoids margin collapsing. +h1, h2, h3, h4, h5, h6 { + margin-top: 0; + margin-bottom: .5rem; +} + +// Reset margins on paragraphs +// +// Similarly, the top margin on `<p>`s get reset. However, we also reset the +// bottom margin to use `rem` units instead of `em`. +p { + margin-top: 0; + margin-bottom: 1rem; +} + +// Abbreviations +abbr[title], +// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257 +abbr[data-original-title] { + cursor: help; +} + +address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +ol, +ul, +dl { + margin-top: 0; + margin-bottom: 1rem; +} + +ol ol, +ul ul, +ol ul, +ul ol { + margin-bottom: 0; +} + +dt { + font-weight: $dt-font-weight; +} + +dd { + margin-bottom: .5rem; + margin-left: 0; // Undo browser default +} + +blockquote { + margin: 0 0 1rem; +} + + +// +// Links +// + +a { + color: $link-color; + text-decoration: $link-decoration; + + @include hover-focus { + color: $link-hover-color; + text-decoration: $link-hover-decoration; + } +} + +// And undo these styles for placeholder links/named anchors (without href) +// which have not been made explicitly keyboard-focusable (without tabindex). +// It would be more straightforward to just use a[href] in previous block, but that +// causes specificity issues in many other styles that are too complex to fix. +// See https://github.com/twbs/bootstrap/issues/19402 + +a:not([href]):not([tabindex]) { + color: inherit; + text-decoration: none; + + @include hover-focus { + color: inherit; + text-decoration: none; + } + + &:focus { + outline: 0; + } +} + + +// +// Code +// + +pre { + // Remove browser default top margin + margin-top: 0; + // Reset browser default of `1em` to use `rem`s + margin-bottom: 1rem; + // Normalize v4 removed this property, causing `<pre>` content to break out of wrapping code snippets + overflow: auto; +} + + +// +// Figures +// + +figure { + // Normalize adds `margin` to `figure`s as browsers apply it inconsistently. + // We reset that to create a better flow in-page. + margin: 0 0 1rem; +} + + +// +// Images +// + +img { + // By default, `<img>`s are `inline-block`. This assumes that, and vertically + // centers them. This won't apply should you reset them to `block` level. + vertical-align: middle; + // Note: `<img>`s are deliberately not made responsive by default. + // For the rationale behind this, see the comments on the `.img-fluid` class. +} + + +// iOS "clickable elements" fix for role="button" +// +// Fixes "clickability" issue (and more generally, the firing of events such as focus as well) +// for traditionally non-focusable elements with role="button" +// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile + +[role="button"] { + cursor: pointer; +} + + +// Avoid 300ms click delay on touch devices that support the `touch-action` CSS property. +// +// In particular, unlike most other browsers, IE11+Edge on Windows 10 on touch devices and IE Mobile 10-11 +// DON'T remove the click delay when `<meta name="viewport" content="width=device-width">` is present. +// However, they DO support removing the click delay via `touch-action: manipulation`. +// See: +// * https://v4-alpha.getbootstrap.com/content/reboot/#click-delay-optimization-for-touch +// * http://caniuse.com/#feat=css-touch-action +// * https://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay + +a, +area, +button, +[role="button"], +input, +label, +select, +summary, +textarea { + touch-action: manipulation; +} + + +// +// Tables +// + +table { + // No longer part of Normalize since v4 + border-collapse: collapse; + // Reset for nesting within parents with `background-color`. + background-color: $table-bg; +} + +caption { + padding-top: $table-cell-padding; + padding-bottom: $table-cell-padding; + color: $text-muted; + text-align: left; + caption-side: bottom; +} + +th { + // Centered by default, but left-align-ed to match the `td`s below. + text-align: left; +} + + +// +// Forms +// + +label { + // Allow labels to use `margin` for spacing. + display: inline-block; + margin-bottom: .5rem; +} + +// Work around a Firefox/IE bug where the transparent `button` background +// results in a loss of the default `button` focus styles. +// +// Credit: https://github.com/suitcss/base/ +button:focus { + outline: 1px dotted; + outline: 5px auto -webkit-focus-ring-color; +} + +input, +button, +select, +textarea { + // Normalize includes `font: inherit;`, so `font-family`. `font-size`, etc are + // properly inherited. However, `line-height` isn't inherited there. + line-height: inherit; +} + +input[type="radio"], +input[type="checkbox"] { + // Apply a disabled cursor for radios and checkboxes. + // + // Note: Neither radios nor checkboxes can be readonly. + &:disabled { + cursor: $cursor-disabled; + } +} + + +input[type="date"], +input[type="time"], +input[type="datetime-local"], +input[type="month"] { + // Remove the default appearance of temporal inputs to avoid a Mobile Safari + // bug where setting a custom line-height prevents text from being vertically + // centered within the input. + // See https://bugs.webkit.org/show_bug.cgi?id=139848 + // and https://github.com/twbs/bootstrap/issues/11266 + -webkit-appearance: listbox; +} + +textarea { + // Textareas should really only resize vertically so they don't break their (horizontal) containers. + resize: vertical; +} + +fieldset { + // Browsers set a default `min-width: min-content;` on fieldsets, + // unlike e.g. `<div>`s, which have `min-width: 0;` by default. + // So we reset that to ensure fieldsets behave more like a standard block element. + // See https://github.com/twbs/bootstrap/issues/12359 + // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements + min-width: 0; + // Reset the default outline behavior of fieldsets so they don't affect page layout. + padding: 0; + margin: 0; + border: 0; +} + +legend { + // Reset the entire legend element to match the `fieldset` + display: block; + width: 100%; + padding: 0; + margin-bottom: .5rem; + font-size: 1.5rem; + line-height: inherit; +} + +input[type="search"] { + // This overrides the extra rounded corners on search inputs in iOS so that our + // `.form-control` class can properly style them. Note that this cannot simply + // be added to `.form-control` as it's not specific enough. For details, see + // https://github.com/twbs/bootstrap/issues/11586. + -webkit-appearance: none; +} + +// todo: needed? +output { + display: inline-block; +// font-size: $font-size-base; +// line-height: $line-height; +// color: $input-color; +} + +// Always hide an element with the `hidden` HTML attribute (from PureCSS). +[hidden] { + display: none !important; +} diff --git a/csunplugged/static/scss/bootstrap/_responsive-embed.scss b/csunplugged/static/scss/bootstrap/_responsive-embed.scss new file mode 100644 index 000000000..d3362b6fd --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_responsive-embed.scss @@ -0,0 +1,52 @@ +// Credit: Nicolas Gallagher and SUIT CSS. + +.embed-responsive { + position: relative; + display: block; + width: 100%; + padding: 0; + overflow: hidden; + + &::before { + display: block; + content: ""; + } + + .embed-responsive-item, + iframe, + embed, + object, + video { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; + } +} + +.embed-responsive-21by9 { + &::before { + padding-top: percentage(9 / 21); + } +} + +.embed-responsive-16by9 { + &::before { + padding-top: percentage(9 / 16); + } +} + +.embed-responsive-4by3 { + &::before { + padding-top: percentage(3 / 4); + } +} + +.embed-responsive-1by1 { + &::before { + padding-top: percentage(1 / 1); + } +} diff --git a/csunplugged/static/scss/bootstrap/_tables.scss b/csunplugged/static/scss/bootstrap/_tables.scss new file mode 100644 index 000000000..47be2c508 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_tables.scss @@ -0,0 +1,153 @@ +// +// Basic Bootstrap table +// + +.table { + width: 100%; + max-width: 100%; + margin-bottom: $spacer; + + th, + td { + padding: $table-cell-padding; + vertical-align: top; + border-top: $table-border-width solid $table-border-color; + } + + thead th { + vertical-align: bottom; + border-bottom: (2 * $table-border-width) solid $table-border-color; + } + + tbody + tbody { + border-top: (2 * $table-border-width) solid $table-border-color; + } + + .table { + background-color: $body-bg; + } +} + + +// +// Condensed table w/ half padding +// + +.table-sm { + th, + td { + padding: $table-sm-cell-padding; + } +} + + +// Bordered version +// +// Add borders all around the table and between all the columns. + +.table-bordered { + border: $table-border-width solid $table-border-color; + + th, + td { + border: $table-border-width solid $table-border-color; + } + + thead { + th, + td { + border-bottom-width: (2 * $table-border-width); + } + } +} + + +// Zebra-striping +// +// Default zebra-stripe styles (alternating gray and transparent backgrounds) + +.table-striped { + tbody tr:nth-of-type(odd) { + background-color: $table-bg-accent; + } +} + + +// Hover effect +// +// Placed here since it has to come after the potential zebra striping + +.table-hover { + tbody tr { + @include hover { + background-color: $table-bg-hover; + } + } +} + + +// Table backgrounds +// +// Exact selectors below required to override `.table-striped` and prevent +// inheritance to nested tables. + +// Generate the contextual variants +@include table-row-variant(active, $table-bg-active); +@include table-row-variant(success, $state-success-bg); +@include table-row-variant(info, $state-info-bg); +@include table-row-variant(warning, $state-warning-bg); +@include table-row-variant(danger, $state-danger-bg); + + +// Inverse styles +// +// Same table markup, but inverted color scheme: dark background and light text. + +.thead-inverse { + th { + color: $table-inverse-color; + background-color: $table-inverse-bg; + } +} + +.thead-default { + th { + color: $table-head-color; + background-color: $table-head-bg; + } +} + +.table-inverse { + color: $table-inverse-color; + background-color: $table-inverse-bg; + + th, + td, + thead th { + border-color: $body-bg; + } + + &.table-bordered { + border: 0; + } +} + + + +// Responsive tables +// +// Add `.table-responsive` to `.table`s and we'll make them mobile friendly by +// enabling horizontal scrolling. Only applies <768px. Everything above that +// will display normally. + +.table-responsive { + display: block; + width: 100%; + overflow-x: auto; + -ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057 + + // Prevent double border on horizontal scroll due to use of `display: block;` + &.table-bordered { + border: 0; + } +} diff --git a/csunplugged/static/scss/bootstrap/_tooltip.scss b/csunplugged/static/scss/bootstrap/_tooltip.scss new file mode 100644 index 000000000..24e198d46 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_tooltip.scss @@ -0,0 +1,90 @@ +// Base class +.tooltip { + position: absolute; + z-index: $zindex-tooltip; + display: block; + // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element. + // So reset our font and text properties to avoid inheriting weird values. + @include reset-text(); + font-size: $font-size-sm; + // Allow breaking very long words so they don't overflow the tooltip's bounds + word-wrap: break-word; + opacity: 0; + + &.show { opacity: $tooltip-opacity; } + + &.tooltip-top, + &.bs-tether-element-attached-bottom { + padding: $tooltip-arrow-width 0; + margin-top: -$tooltip-margin; + + .tooltip-inner::before { + bottom: 0; + left: 50%; + margin-left: -$tooltip-arrow-width; + content: ""; + border-width: $tooltip-arrow-width $tooltip-arrow-width 0; + border-top-color: $tooltip-arrow-color; + } + } + &.tooltip-right, + &.bs-tether-element-attached-left { + padding: 0 $tooltip-arrow-width; + margin-left: $tooltip-margin; + + .tooltip-inner::before { + top: 50%; + left: 0; + margin-top: -$tooltip-arrow-width; + content: ""; + border-width: $tooltip-arrow-width $tooltip-arrow-width $tooltip-arrow-width 0; + border-right-color: $tooltip-arrow-color; + } + } + &.tooltip-bottom, + &.bs-tether-element-attached-top { + padding: $tooltip-arrow-width 0; + margin-top: $tooltip-margin; + + .tooltip-inner::before { + top: 0; + left: 50%; + margin-left: -$tooltip-arrow-width; + content: ""; + border-width: 0 $tooltip-arrow-width $tooltip-arrow-width; + border-bottom-color: $tooltip-arrow-color; + } + } + &.tooltip-left, + &.bs-tether-element-attached-right { + padding: 0 $tooltip-arrow-width; + margin-left: -$tooltip-margin; + + .tooltip-inner::before { + top: 50%; + right: 0; + margin-top: -$tooltip-arrow-width; + content: ""; + border-width: $tooltip-arrow-width 0 $tooltip-arrow-width $tooltip-arrow-width; + border-left-color: $tooltip-arrow-color; + } + } +} + +// Wrapper for the tooltip content +.tooltip-inner { + max-width: $tooltip-max-width; + padding: $tooltip-padding-y $tooltip-padding-x; + color: $tooltip-color; + text-align: center; + background-color: $tooltip-bg; + @include border-radius($border-radius); + + &::before { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + } +} diff --git a/csunplugged/static/scss/bootstrap/_transitions.scss b/csunplugged/static/scss/bootstrap/_transitions.scss new file mode 100644 index 000000000..86c04a5f8 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_transitions.scss @@ -0,0 +1,34 @@ +.fade { + opacity: 0; + @include transition($transition-fade); + + &.show { + opacity: 1; + } +} + +.collapse { + display: none; + &.show { + display: block; + } +} + +tr { + &.collapse.show { + display: table-row; + } +} + +tbody { + &.collapse.show { + display: table-row-group; + } +} + +.collapsing { + position: relative; + height: 0; + overflow: hidden; + @include transition($transition-collapse); +} diff --git a/csunplugged/static/scss/bootstrap/_type.scss b/csunplugged/static/scss/bootstrap/_type.scss new file mode 100644 index 000000000..13a64b06f --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_type.scss @@ -0,0 +1,143 @@ +// +// Headings +// + +h1, h2, h3, h4, h5, h6, +.h1, .h2, .h3, .h4, .h5, .h6 { + margin-bottom: $headings-margin-bottom; + font-family: $headings-font-family; + font-weight: $headings-font-weight; + line-height: $headings-line-height; + color: $headings-color; +} + +h1, .h1 { font-size: $font-size-h1; } +h2, .h2 { font-size: $font-size-h2; } +h3, .h3 { font-size: $font-size-h3; } +h4, .h4 { font-size: $font-size-h4; } +h5, .h5 { font-size: $font-size-h5; } +h6, .h6 { font-size: $font-size-h6; } + +.lead { + font-size: $lead-font-size; + font-weight: $lead-font-weight; +} + +// Type display classes +.display-1 { + font-size: $display1-size; + font-weight: $display1-weight; + line-height: $display-line-height; +} +.display-2 { + font-size: $display2-size; + font-weight: $display2-weight; + line-height: $display-line-height; +} +.display-3 { + font-size: $display3-size; + font-weight: $display3-weight; + line-height: $display-line-height; +} +.display-4 { + font-size: $display4-size; + font-weight: $display4-weight; + line-height: $display-line-height; +} + + +// +// Horizontal rules +// + +hr { + margin-top: $spacer-y; + margin-bottom: $spacer-y; + border: 0; + border-top: $hr-border-width solid $hr-border-color; +} + + +// +// Emphasis +// + +small, +.small { + font-size: $small-font-size; + font-weight: $font-weight-normal; +} + +mark, +.mark { + padding: $mark-padding; + background-color: $mark-bg; +} + + +// +// Lists +// + +.list-unstyled { + @include list-unstyled; +} + +// Inline turns list items into inline-block +.list-inline { + @include list-unstyled; +} +.list-inline-item { + display: inline-block; + + &:not(:last-child) { + margin-right: $list-inline-padding; + } +} + + +// +// Misc +// + +// Builds on `abbr` +.initialism { + font-size: 90%; + text-transform: uppercase; +} + +// Blockquotes +.blockquote { + padding: ($spacer / 2) $spacer; + margin-bottom: $spacer; + font-size: $blockquote-font-size; + border-left: $blockquote-border-width solid $blockquote-border-color; +} + +.blockquote-footer { + display: block; + font-size: 80%; // back to default font-size + color: $blockquote-small-color; + + &::before { + content: "\2014 \00A0"; // em dash, nbsp + } +} + +// Opposite alignment of blockquote +.blockquote-reverse { + padding-right: $spacer; + padding-left: 0; + text-align: right; + border-right: $blockquote-border-width solid $blockquote-border-color; + border-left: 0; +} + +.blockquote-reverse .blockquote-footer { + &::before { + content: ""; + } + &::after { + content: "\00A0 \2014"; // nbsp, em dash + } +} diff --git a/csunplugged/static/scss/bootstrap/_utilities.scss b/csunplugged/static/scss/bootstrap/_utilities.scss new file mode 100644 index 000000000..7d08ff2f8 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_utilities.scss @@ -0,0 +1,13 @@ +@import "utilities/align"; +@import "utilities/background"; +@import "utilities/borders"; +@import "utilities/clearfix"; +@import "utilities/display"; +@import "utilities/flex"; +@import "utilities/float"; +@import "utilities/position"; +@import "utilities/screenreaders"; +@import "utilities/sizing"; +@import "utilities/spacing"; +@import "utilities/text"; +@import "utilities/visibility"; diff --git a/csunplugged/static/scss/bootstrap/_variables.scss b/csunplugged/static/scss/bootstrap/_variables.scss new file mode 100644 index 000000000..36dc429c8 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/_variables.scss @@ -0,0 +1,961 @@ +// Variables +// +// Copy settings from this file into the provided `_custom.scss` to override +// the Bootstrap defaults without modifying key, versioned files. + + +// Table of Contents +// +// Colors +// Options +// Spacing +// Body +// Links +// Grid breakpoints +// Grid containers +// Grid columns +// Fonts +// Components +// Tables +// Buttons +// Forms +// Dropdowns +// Z-index master list +// Navbar +// Navs +// Pagination +// Jumbotron +// Form states and alerts +// Cards +// Tooltips +// Popovers +// Badges +// Modals +// Alerts +// Progress bars +// List group +// Image thumbnails +// Figures +// Breadcrumbs +// Carousel +// Close +// Code + +@mixin _assert-ascending($map, $map-name) { + $prev-key: null; + $prev-num: null; + @each $key, $num in $map { + @if $prev-num == null { + // Do nothing + } @else if not comparable($prev-num, $num) { + @warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !"; + } @else if $prev-num >= $num { + @warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !"; + } + $prev-key: $key; + $prev-num: $num; + } +} + +// Replace `$search` with `$replace` in `$string` +// @author Hugo Giraudel +// @param {String} $string - Initial string +// @param {String} $search - Substring to replace +// @param {String} $replace ('') - New value +// @return {String} - Updated string +@function str-replace($string, $search, $replace: "") { + $index: str-index($string, $search); + + @if $index { + @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); + } + + @return $string; +} + +@mixin _assert-starts-at-zero($map) { + $values: map-values($map); + $first-value: nth($values, 1); + @if $first-value != 0 { + @warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}."; + } +} + + +// General variable structure +// +// Variable format should follow the `$component-modifier-state-property` order. + + +// Colors +// +// Grayscale and brand colors for use across Bootstrap. + +// Start with assigning color names to specific hex values. +$white: #fff !default; +$black: #000 !default; +$red: #d9534f !default; +$orange: #f0ad4e !default; +$yellow: #ffd500 !default; +$green: #5cb85c !default; +$blue: #0275d8 !default; +$teal: #5bc0de !default; +$pink: #ff5b77 !default; +$purple: #613d7c !default; + +// Create grayscale +$gray-dark: #292b2c !default; +$gray: #464a4c !default; +$gray-light: #636c72 !default; +$gray-lighter: #eceeef !default; +$gray-lightest: #f7f7f9 !default; + +// Reassign color vars to semantic color scheme +$brand-primary: $blue !default; +$brand-success: $green !default; +$brand-info: $teal !default; +$brand-warning: $orange !default; +$brand-danger: $red !default; +$brand-inverse: $gray-dark !default; + + +// Options +// +// Quickly modify global styling by enabling or disabling optional features. + +$enable-rounded: true !default; +$enable-shadows: false !default; +$enable-gradients: false !default; +$enable-transitions: true !default; +$enable-hover-media-query: false !default; +$enable-grid-classes: true !default; +$enable-print-styles: true !default; + + +// Spacing +// +// Control the default styling of most Bootstrap elements by modifying these +// variables. Mostly focused on spacing. +// You can add more entries to the $spacers map, should you need more variation. + +$spacer: 1rem !default; +$spacer-x: $spacer !default; +$spacer-y: $spacer !default; +$spacers: ( + 0: ( + x: 0, + y: 0 + ), + 1: ( + x: ($spacer-x * .25), + y: ($spacer-y * .25) + ), + 2: ( + x: ($spacer-x * .5), + y: ($spacer-y * .5) + ), + 3: ( + x: $spacer-x, + y: $spacer-y + ), + 4: ( + x: ($spacer-x * 1.5), + y: ($spacer-y * 1.5) + ), + 5: ( + x: ($spacer-x * 3), + y: ($spacer-y * 3) + ) +) !default; +$border-width: 1px !default; + +// This variable affects the `.h-*` and `.w-*` classes. +$sizes: ( + 25: 25%, + 50: 50%, + 75: 75%, + 100: 100% +) !default; + +// Body +// +// Settings for the `<body>` element. + +$body-bg: $white !default; +$body-color: $gray-dark !default; +$inverse-bg: $gray-dark !default; +$inverse-color: $gray-lighter !default; + + +// Links +// +// Style anchor elements. + +$link-color: $brand-primary !default; +$link-decoration: none !default; +$link-hover-color: darken($link-color, 15%) !default; +$link-hover-decoration: underline !default; + + +// Grid breakpoints +// +// Define the minimum dimensions at which your layout will change, +// adapting to different screen sizes, for use in media queries. + +$grid-breakpoints: ( + xs: 0, + sm: 576px, + md: 768px, + lg: 992px, + xl: 1200px +) !default; +@include _assert-ascending($grid-breakpoints, "$grid-breakpoints"); +@include _assert-starts-at-zero($grid-breakpoints); + + +// Grid containers +// +// Define the maximum width of `.container` for different screen sizes. + +$container-max-widths: ( + sm: 540px, + md: 720px, + lg: 960px, + xl: 1140px +) !default; +@include _assert-ascending($container-max-widths, "$container-max-widths"); + + +// Grid columns +// +// Set the number of columns and specify the width of the gutters. + +$grid-columns: 12 !default; +$grid-gutter-width-base: 30px !default; +$grid-gutter-widths: ( + xs: $grid-gutter-width-base, + sm: $grid-gutter-width-base, + md: $grid-gutter-width-base, + lg: $grid-gutter-width-base, + xl: $grid-gutter-width-base +) !default; + +// Fonts +// +// Font, line-height, and color for body text, headings, and more. + +$font-family-sans-serif: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !default; +$font-family-serif: Georgia, "Times New Roman", Times, serif !default; +$font-family-monospace: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default; +$font-family-base: $font-family-sans-serif !default; + +$font-size-base: 1rem !default; // Assumes the browser default, typically `16px` +$font-size-lg: 1.25rem !default; +$font-size-sm: .875rem !default; +$font-size-xs: .75rem !default; + +$font-weight-normal: normal !default; +$font-weight-bold: bold !default; + +$font-weight-base: $font-weight-normal !default; +$line-height-base: 1.5 !default; + +$font-size-h1: 2.5rem !default; +$font-size-h2: 2rem !default; +$font-size-h3: 1.75rem !default; +$font-size-h4: 1.5rem !default; +$font-size-h5: 1.25rem !default; +$font-size-h6: 1rem !default; + +$headings-margin-bottom: ($spacer / 2) !default; +$headings-font-family: inherit !default; +$headings-font-weight: 500 !default; +$headings-line-height: 1.1 !default; +$headings-color: inherit !default; + +$display1-size: 6rem !default; +$display2-size: 5.5rem !default; +$display3-size: 4.5rem !default; +$display4-size: 3.5rem !default; + +$display1-weight: 300 !default; +$display2-weight: 300 !default; +$display3-weight: 300 !default; +$display4-weight: 300 !default; +$display-line-height: $headings-line-height !default; + +$lead-font-size: 1.25rem !default; +$lead-font-weight: 300 !default; + +$small-font-size: 80% !default; + +$text-muted: $gray-light !default; + +$abbr-border-color: $gray-light !default; + +$blockquote-small-color: $gray-light !default; +$blockquote-font-size: ($font-size-base * 1.25) !default; +$blockquote-border-color: $gray-lighter !default; +$blockquote-border-width: .25rem !default; + +$hr-border-color: rgba($black,.1) !default; +$hr-border-width: $border-width !default; + +$mark-padding: .2em !default; + +$dt-font-weight: $font-weight-bold !default; + +$kbd-box-shadow: inset 0 -.1rem 0 rgba($black,.25) !default; +$nested-kbd-font-weight: $font-weight-bold !default; + +$list-inline-padding: 5px !default; + + +// Components +// +// Define common padding and border radius sizes and more. + +$line-height-lg: (4 / 3) !default; +$line-height-sm: 1.5 !default; + +$border-radius: .25rem !default; +$border-radius-lg: .3rem !default; +$border-radius-sm: .2rem !default; + +$component-active-color: $white !default; +$component-active-bg: $brand-primary !default; + +$caret-width: .3em !default; + +$transition-base: all .2s ease-in-out !default; +$transition-fade: opacity .15s linear !default; +$transition-collapse: height .35s ease !default; + + +// Tables +// +// Customizes the `.table` component with basic values, each used across all table variations. + +$table-cell-padding: .75rem !default; +$table-sm-cell-padding: .3rem !default; + +$table-bg: transparent !default; + +$table-inverse-bg: $gray-dark !default; +$table-inverse-color: $body-bg !default; + +$table-bg-accent: rgba($black,.05) !default; +$table-bg-hover: rgba($black,.075) !default; +$table-bg-active: $table-bg-hover !default; + +$table-head-bg: $gray-lighter !default; +$table-head-color: $gray !default; + +$table-border-width: $border-width !default; +$table-border-color: $gray-lighter !default; + + +// Buttons +// +// For each of Bootstrap's buttons, define text, background and border color. + +$btn-padding-x: 1rem !default; +$btn-padding-y: .5rem !default; +$btn-line-height: 1.25 !default; +$btn-font-weight: $font-weight-normal !default; +$btn-box-shadow: inset 0 1px 0 rgba($white,.15), 0 1px 1px rgba($black,.075) !default; +$btn-focus-box-shadow: 0 0 0 2px rgba($brand-primary, .25) !default; +$btn-active-box-shadow: inset 0 3px 5px rgba($black,.125) !default; + +$btn-primary-color: $white !default; +$btn-primary-bg: $brand-primary !default; +$btn-primary-border: $btn-primary-bg !default; + +$btn-secondary-color: $gray-dark !default; +$btn-secondary-bg: $white !default; +$btn-secondary-border: #ccc !default; + +$btn-info-color: $white !default; +$btn-info-bg: $brand-info !default; +$btn-info-border: $btn-info-bg !default; + +$btn-success-color: $white !default; +$btn-success-bg: $brand-success !default; +$btn-success-border: $btn-success-bg !default; + +$btn-warning-color: $white !default; +$btn-warning-bg: $brand-warning !default; +$btn-warning-border: $btn-warning-bg !default; + +$btn-danger-color: $white !default; +$btn-danger-bg: $brand-danger !default; +$btn-danger-border: $btn-danger-bg !default; + +$btn-link-disabled-color: $gray-light !default; + +$btn-padding-x-sm: .5rem !default; +$btn-padding-y-sm: .25rem !default; + +$btn-padding-x-lg: 1.5rem !default; +$btn-padding-y-lg: .75rem !default; + +$btn-block-spacing-y: .5rem !default; +$btn-toolbar-margin: .5rem !default; + +// Allows for customizing button radius independently from global border radius +$btn-border-radius: $border-radius !default; +$btn-border-radius-lg: $border-radius-lg !default; +$btn-border-radius-sm: $border-radius-sm !default; + +$btn-transition: all .2s ease-in-out !default; + + +// Forms + +$input-padding-x: .75rem !default; +$input-padding-y: .5rem !default; +$input-line-height: 1.25 !default; + +$input-bg: $white !default; +$input-bg-disabled: $gray-lighter !default; + +$input-color: $gray !default; +$input-border-color: rgba($black,.15) !default; +$input-btn-border-width: $border-width !default; // For form controls and buttons +$input-box-shadow: inset 0 1px 1px rgba($black,.075) !default; + +$input-border-radius: $border-radius !default; +$input-border-radius-lg: $border-radius-lg !default; +$input-border-radius-sm: $border-radius-sm !default; + +$input-bg-focus: $input-bg !default; +$input-border-focus: lighten($brand-primary, 25%) !default; +$input-box-shadow-focus: $input-box-shadow, rgba($input-border-focus, .6) !default; +$input-color-focus: $input-color !default; + +$input-color-placeholder: $gray-light !default; + +$input-padding-x-sm: .5rem !default; +$input-padding-y-sm: .25rem !default; + +$input-padding-x-lg: 1.5rem !default; +$input-padding-y-lg: .75rem !default; + +$input-height: (($font-size-base * $input-line-height) + ($input-padding-y * 2)) !default; +$input-height-lg: (($font-size-lg * $line-height-lg) + ($input-padding-y-lg * 2)) !default; +$input-height-sm: (($font-size-sm * $line-height-sm) + ($input-padding-y-sm * 2)) !default; + +$input-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s !default; + +$form-text-margin-top: .25rem !default; +$form-feedback-margin-top: $form-text-margin-top !default; + +$form-check-margin-bottom: .5rem !default; +$form-check-input-gutter: 1.25rem !default; +$form-check-input-margin-y: .25rem !default; +$form-check-input-margin-x: .25rem !default; + +$form-check-inline-margin-x: .75rem !default; + +$form-group-margin-bottom: $spacer-y !default; + +$input-group-addon-bg: $gray-lighter !default; +$input-group-addon-border-color: $input-border-color !default; + +$cursor-disabled: not-allowed !default; + +$custom-control-gutter: 1.5rem !default; +$custom-control-spacer-x: 1rem !default; +$custom-control-spacer-y: .25rem !default; + +$custom-control-indicator-size: 1rem !default; +$custom-control-indicator-margin-y: (($line-height-base * 1rem) - $custom-control-indicator-size) / -2 !default; +$custom-control-indicator-bg: #ddd !default; +$custom-control-indicator-bg-size: 50% 50% !default; +$custom-control-indicator-box-shadow: inset 0 .25rem .25rem rgba($black,.1) !default; + +$custom-control-disabled-cursor: $cursor-disabled !default; +$custom-control-disabled-indicator-bg: $gray-lighter !default; +$custom-control-disabled-description-color: $gray-light !default; + +$custom-control-checked-indicator-color: $white !default; +$custom-control-checked-indicator-bg: $brand-primary !default; +$custom-control-checked-indicator-box-shadow: none !default; + +$custom-control-focus-indicator-box-shadow: 0 0 0 1px $body-bg, 0 0 0 3px $brand-primary !default; + +$custom-control-active-indicator-color: $white !default; +$custom-control-active-indicator-bg: lighten($brand-primary, 35%) !default; +$custom-control-active-indicator-box-shadow: none !default; + +$custom-checkbox-radius: $border-radius !default; +$custom-checkbox-checked-icon: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$custom-control-checked-indicator-color}' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"), "#", "%23") !default; + +$custom-checkbox-indeterminate-bg: $brand-primary !default; +$custom-checkbox-indeterminate-indicator-color: $custom-control-checked-indicator-color !default; +$custom-checkbox-indeterminate-icon: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='#{$custom-checkbox-indeterminate-indicator-color}' d='M0 2h4'/%3E%3C/svg%3E"), "#", "%23") !default; +$custom-checkbox-indeterminate-box-shadow: none !default; + +$custom-radio-radius: 50% !default; +$custom-radio-checked-icon: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='#{$custom-control-checked-indicator-color}'/%3E%3C/svg%3E"), "#", "%23") !default; + +$custom-select-padding-x: .75rem !default; +$custom-select-padding-y: .375rem !default; +$custom-select-indicator-padding: 1rem !default; // Extra padding to account for the presence of the background-image based indicator +$custom-select-line-height: $input-line-height !default; +$custom-select-color: $input-color !default; +$custom-select-disabled-color: $gray-light !default; +$custom-select-bg: $white !default; +$custom-select-disabled-bg: $gray-lighter !default; +$custom-select-bg-size: 8px 10px !default; // In pixels because image dimensions +$custom-select-indicator-color: #333 !default; +$custom-select-indicator: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E"), "#", "%23") !default; +$custom-select-border-width: $input-btn-border-width !default; +$custom-select-border-color: $input-border-color !default; +$custom-select-border-radius: $border-radius !default; + +$custom-select-focus-border-color: lighten($brand-primary, 25%) !default; +$custom-select-focus-box-shadow: inset 0 1px 2px rgba($black, .075), 0 0 5px rgba($custom-select-focus-border-color, .5) !default; + +$custom-select-sm-padding-y: .2rem !default; +$custom-select-sm-font-size: 75% !default; + +$custom-file-height: 2.5rem !default; +$custom-file-width: 14rem !default; +$custom-file-focus-box-shadow: 0 0 0 .075rem $white, 0 0 0 .2rem $brand-primary !default; + +$custom-file-padding-x: .5rem !default; +$custom-file-padding-y: 1rem !default; +$custom-file-line-height: 1.5 !default; +$custom-file-color: $gray !default; +$custom-file-bg: $white !default; +$custom-file-border-width: $border-width !default; +$custom-file-border-color: $input-border-color !default; +$custom-file-border-radius: $border-radius !default; +$custom-file-box-shadow: inset 0 .2rem .4rem rgba($black,.05) !default; +$custom-file-button-color: $custom-file-color !default; +$custom-file-button-bg: $gray-lighter !default; +$custom-file-text: ( + placeholder: ( + en: "Choose file..." + ), + button-label: ( + en: "Browse" + ) +) !default; + + +// Form validation icons +$form-icon-success-color: $brand-success !default; +$form-icon-success: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$form-icon-success-color}' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E"), "#", "%23") !default; + +$form-icon-warning-color: $brand-warning !default; +$form-icon-warning: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$form-icon-warning-color}' d='M4.4 5.324h-.8v-2.46h.8zm0 1.42h-.8V5.89h.8zM3.76.63L.04 7.075c-.115.2.016.425.26.426h7.397c.242 0 .372-.226.258-.426C6.726 4.924 5.47 2.79 4.253.63c-.113-.174-.39-.174-.494 0z'/%3E%3C/svg%3E"), "#", "%23") !default; + +$form-icon-danger-color: $brand-danger !default; +$form-icon-danger: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$form-icon-danger-color}' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23d9534f' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E"), "#", "%23") !default; + + +// Dropdowns +// +// Dropdown menu container and contents. + +$dropdown-min-width: 10rem !default; +$dropdown-padding-y: .5rem !default; +$dropdown-margin-top: .125rem !default; +$dropdown-bg: $white !default; +$dropdown-border-color: rgba($black,.15) !default; +$dropdown-border-width: $border-width !default; +$dropdown-divider-bg: $gray-lighter !default; +$dropdown-box-shadow: 0 .5rem 1rem rgba($black,.175) !default; + +$dropdown-link-color: $gray-dark !default; +$dropdown-link-hover-color: darken($gray-dark, 5%) !default; +$dropdown-link-hover-bg: $gray-lightest !default; + +$dropdown-link-active-color: $component-active-color !default; +$dropdown-link-active-bg: $component-active-bg !default; + +$dropdown-link-disabled-color: $gray-light !default; + +$dropdown-item-padding-x: 1.5rem !default; + +$dropdown-header-color: $gray-light !default; + + +// Z-index master list +// +// Warning: Avoid customizing these values. They're used for a bird's eye view +// of components dependent on the z-axis and are designed to all work together. + +$zindex-dropdown-backdrop: 990 !default; +$zindex-navbar: 1000 !default; +$zindex-dropdown: 1000 !default; +$zindex-fixed: 1030 !default; +$zindex-sticky: 1030 !default; +$zindex-modal-backdrop: 1040 !default; +$zindex-modal: 1050 !default; +$zindex-popover: 1060 !default; +$zindex-tooltip: 1070 !default; + + +// Navbar + +$navbar-border-radius: $border-radius !default; +$navbar-padding-x: $spacer !default; +$navbar-padding-y: ($spacer / 2) !default; + +$navbar-brand-padding-y: .25rem !default; + +$navbar-toggler-padding-x: .75rem !default; +$navbar-toggler-padding-y: .25rem !default; +$navbar-toggler-font-size: $font-size-lg !default; +$navbar-toggler-border-radius: $btn-border-radius !default; + +$navbar-inverse-color: rgba($white,.5) !default; +$navbar-inverse-hover-color: rgba($white,.75) !default; +$navbar-inverse-active-color: rgba($white,1) !default; +$navbar-inverse-disabled-color: rgba($white,.25) !default; +$navbar-inverse-toggler-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-inverse-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E"), "#", "%23") !default; +$navbar-inverse-toggler-border: rgba($white,.1) !default; + +$navbar-light-color: rgba($black,.5) !default; +$navbar-light-hover-color: rgba($black,.7) !default; +$navbar-light-active-color: rgba($black,.9) !default; +$navbar-light-disabled-color: rgba($black,.3) !default; +$navbar-light-toggler-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-light-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E"), "#", "%23") !default; +$navbar-light-toggler-border: rgba($black,.1) !default; + +// Navs + +$nav-item-margin: .2rem !default; +$nav-item-inline-spacer: 1rem !default; +$nav-link-padding: .5em 1em !default; +$nav-link-hover-bg: $gray-lighter !default; +$nav-disabled-link-color: $gray-light !default; + +$nav-tabs-border-color: #ddd !default; +$nav-tabs-border-width: $border-width !default; +$nav-tabs-border-radius: $border-radius !default; +$nav-tabs-link-hover-border-color: $gray-lighter !default; +$nav-tabs-active-link-hover-color: $gray !default; +$nav-tabs-active-link-hover-bg: $body-bg !default; +$nav-tabs-active-link-hover-border-color: #ddd !default; +$nav-tabs-justified-link-border-color: #ddd !default; +$nav-tabs-justified-active-link-border-color: $body-bg !default; + +$nav-pills-border-radius: $border-radius !default; +$nav-pills-active-link-color: $component-active-color !default; +$nav-pills-active-link-bg: $component-active-bg !default; + + +// Pagination + +$pagination-padding-x: .75rem !default; +$pagination-padding-y: .5rem !default; +$pagination-padding-x-sm: .5rem !default; +$pagination-padding-y-sm: .25rem !default; +$pagination-padding-x-lg: 1.5rem !default; +$pagination-padding-y-lg: .75rem !default; +$pagination-line-height: 1.25 !default; + +$pagination-color: $link-color !default; +$pagination-bg: $white !default; +$pagination-border-width: $border-width !default; +$pagination-border-color: #ddd !default; + +$pagination-hover-color: $link-hover-color !default; +$pagination-hover-bg: $gray-lighter !default; +$pagination-hover-border: #ddd !default; + +$pagination-active-color: $white !default; +$pagination-active-bg: $brand-primary !default; +$pagination-active-border: $brand-primary !default; + +$pagination-disabled-color: $gray-light !default; +$pagination-disabled-bg: $white !default; +$pagination-disabled-border: #ddd !default; + + +// Jumbotron + +$jumbotron-padding: 2rem !default; +$jumbotron-bg: $gray-lighter !default; + + +// Form states and alerts +// +// Define colors for form feedback states and, by default, alerts. + +$state-success-text: #3c763d !default; +$state-success-bg: #dff0d8 !default; +$state-success-border: darken($state-success-bg, 5%) !default; + +$state-info-text: #31708f !default; +$state-info-bg: #d9edf7 !default; +$state-info-border: darken($state-info-bg, 7%) !default; + +$state-warning-text: #8a6d3b !default; +$state-warning-bg: #fcf8e3 !default; +$mark-bg: $state-warning-bg !default; +$state-warning-border: darken($state-warning-bg, 5%) !default; + +$state-danger-text: #a94442 !default; +$state-danger-bg: #f2dede !default; +$state-danger-border: darken($state-danger-bg, 5%) !default; + + +// Cards + +$card-spacer-x: 1.25rem !default; +$card-spacer-y: .75rem !default; +$card-border-width: 1px !default; +$card-border-radius: $border-radius !default; +$card-border-color: rgba($black,.125) !default; +$card-border-radius-inner: calc(#{$card-border-radius} - #{$card-border-width}) !default; +$card-cap-bg: $gray-lightest !default; +$card-bg: $white !default; + +$card-link-hover-color: $white !default; + +$card-img-overlay-padding: 1.25rem !default; + +$card-deck-margin: ($grid-gutter-width-base / 2) !default; + +$card-columns-count: 3 !default; +$card-columns-gap: 1.25rem !default; +$card-columns-margin: $card-spacer-y !default; + + +// Tooltips + +$tooltip-max-width: 200px !default; +$tooltip-color: $white !default; +$tooltip-bg: $black !default; +$tooltip-opacity: .9 !default; +$tooltip-padding-y: 3px !default; +$tooltip-padding-x: 8px !default; +$tooltip-margin: 3px !default; + +$tooltip-arrow-width: 5px !default; +$tooltip-arrow-color: $tooltip-bg !default; + + +// Popovers + +$popover-inner-padding: 1px !default; +$popover-bg: $white !default; +$popover-max-width: 276px !default; +$popover-border-width: $border-width !default; +$popover-border-color: rgba($black,.2) !default; +$popover-box-shadow: 0 5px 10px rgba($black,.2) !default; + +$popover-title-bg: darken($popover-bg, 3%) !default; +$popover-title-padding-x: 14px !default; +$popover-title-padding-y: 8px !default; + +$popover-content-padding-x: 14px !default; +$popover-content-padding-y: 9px !default; + +$popover-arrow-width: 10px !default; +$popover-arrow-color: $popover-bg !default; + +$popover-arrow-outer-width: ($popover-arrow-width + 1px) !default; +$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default; + + +// Badges + +$badge-default-bg: $gray-light !default; +$badge-primary-bg: $brand-primary !default; +$badge-success-bg: $brand-success !default; +$badge-info-bg: $brand-info !default; +$badge-warning-bg: $brand-warning !default; +$badge-danger-bg: $brand-danger !default; + +$badge-color: $white !default; +$badge-link-hover-color: $white !default; +$badge-font-size: 75% !default; +$badge-font-weight: $font-weight-bold !default; +$badge-padding-x: .4em !default; +$badge-padding-y: .25em !default; + +$badge-pill-padding-x: .6em !default; +// Use a higher than normal value to ensure completely rounded edges when +// customizing padding or font-size on labels. +$badge-pill-border-radius: 10rem !default; + + +// Modals + +// Padding applied to the modal body +$modal-inner-padding: 15px !default; + +$modal-dialog-margin: 10px !default; +$modal-dialog-sm-up-margin-y: 30px !default; + +$modal-title-line-height: $line-height-base !default; + +$modal-content-bg: $white !default; +$modal-content-border-color: rgba($black,.2) !default; +$modal-content-border-width: $border-width !default; +$modal-content-xs-box-shadow: 0 3px 9px rgba($black,.5) !default; +$modal-content-sm-up-box-shadow: 0 5px 15px rgba($black,.5) !default; + +$modal-backdrop-bg: $black !default; +$modal-backdrop-opacity: .5 !default; +$modal-header-border-color: $gray-lighter !default; +$modal-footer-border-color: $modal-header-border-color !default; +$modal-header-border-width: $modal-content-border-width !default; +$modal-footer-border-width: $modal-header-border-width !default; +$modal-header-padding: 15px !default; + +$modal-lg: 800px !default; +$modal-md: 500px !default; +$modal-sm: 300px !default; + +$modal-transition: transform .3s ease-out !default; + + +// Alerts +// +// Define alert colors, border radius, and padding. + +$alert-padding-x: 1.25rem !default; +$alert-padding-y: .75rem !default; +$alert-margin-bottom: $spacer-y !default; +$alert-border-radius: $border-radius !default; +$alert-link-font-weight: $font-weight-bold !default; +$alert-border-width: $border-width !default; + +$alert-success-bg: $state-success-bg !default; +$alert-success-text: $state-success-text !default; +$alert-success-border: $state-success-border !default; + +$alert-info-bg: $state-info-bg !default; +$alert-info-text: $state-info-text !default; +$alert-info-border: $state-info-border !default; + +$alert-warning-bg: $state-warning-bg !default; +$alert-warning-text: $state-warning-text !default; +$alert-warning-border: $state-warning-border !default; + +$alert-danger-bg: $state-danger-bg !default; +$alert-danger-text: $state-danger-text !default; +$alert-danger-border: $state-danger-border !default; + + +// Progress bars + +$progress-height: 1rem !default; +$progress-font-size: .75rem !default; +$progress-bg: $gray-lighter !default; +$progress-border-radius: $border-radius !default; +$progress-box-shadow: inset 0 .1rem .1rem rgba($black,.1) !default; +$progress-bar-color: $white !default; +$progress-bar-bg: $brand-primary !default; +$progress-bar-animation-timing: 1s linear infinite !default; + +// List group + +$list-group-color: $body-color !default; +$list-group-bg: $white !default; +$list-group-border-color: rgba($black,.125) !default; +$list-group-border-width: $border-width !default; +$list-group-border-radius: $border-radius !default; + +$list-group-item-padding-x: 1.25rem !default; +$list-group-item-padding-y: .75rem !default; + +$list-group-hover-bg: $gray-lightest !default; +$list-group-active-color: $component-active-color !default; +$list-group-active-bg: $component-active-bg !default; +$list-group-active-border: $list-group-active-bg !default; +$list-group-active-text-color: lighten($list-group-active-bg, 50%) !default; + +$list-group-disabled-color: $gray-light !default; +$list-group-disabled-bg: $list-group-bg !default; +$list-group-disabled-text-color: $list-group-disabled-color !default; + +$list-group-link-color: $gray !default; +$list-group-link-heading-color: $gray-dark !default; +$list-group-link-hover-color: $list-group-link-color !default; + +$list-group-link-active-color: $list-group-color !default; +$list-group-link-active-bg: $gray-lighter !default; + + +// Image thumbnails + +$thumbnail-padding: .25rem !default; +$thumbnail-bg: $body-bg !default; +$thumbnail-border-width: $border-width !default; +$thumbnail-border-color: #ddd !default; +$thumbnail-border-radius: $border-radius !default; +$thumbnail-box-shadow: 0 1px 2px rgba($black,.075) !default; +$thumbnail-transition: all .2s ease-in-out !default; + + +// Figures + +$figure-caption-font-size: 90% !default; +$figure-caption-color: $gray-light !default; + + +// Breadcrumbs + +$breadcrumb-padding-y: .75rem !default; +$breadcrumb-padding-x: 1rem !default; +$breadcrumb-item-padding: .5rem !default; + +$breadcrumb-bg: $gray-lighter !default; +$breadcrumb-divider-color: $gray-light !default; +$breadcrumb-active-color: $gray-light !default; +$breadcrumb-divider: "/" !default; + + +// Carousel + +$carousel-control-color: $white !default; +$carousel-control-width: 15% !default; +$carousel-control-opacity: .5 !default; + +$carousel-indicator-width: 30px !default; +$carousel-indicator-height: 3px !default; +$carousel-indicator-spacer: 3px !default; +$carousel-indicator-active-bg: $white !default; + +$carousel-caption-width: 70% !default; +$carousel-caption-color: $white !default; + +$carousel-control-icon-width: 20px !default; + +$carousel-control-prev-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M4 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"), "#", "%23") !default; +$carousel-control-next-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M1.5 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"), "#", "%23") !default; + +$carousel-transition: transform .6s ease-in-out !default; + + +// Close + +$close-font-size: $font-size-base * 1.5 !default; +$close-font-weight: $font-weight-bold !default; +$close-color: $black !default; +$close-text-shadow: 0 1px 0 $white !default; + + +// Code + +$code-font-size: 90% !default; +$code-padding-x: .4rem !default; +$code-padding-y: .2rem !default; +$code-color: #bd4147 !default; +$code-bg: $gray-lightest !default; + +$kbd-color: $white !default; +$kbd-bg: $gray-dark !default; + +$pre-bg: $gray-lightest !default; +$pre-color: $gray-dark !default; +$pre-border-color: #ccc !default; +$pre-scrollable-max-height: 340px !default; diff --git a/csunplugged/static/scss/bootstrap/bootstrap-grid.scss b/csunplugged/static/scss/bootstrap/bootstrap-grid.scss new file mode 100644 index 000000000..182b9626b --- /dev/null +++ b/csunplugged/static/scss/bootstrap/bootstrap-grid.scss @@ -0,0 +1,43 @@ +// Bootstrap Grid only +// +// Includes relevant variables and mixins for the flexbox grid +// system, as well as the generated predefined classes (e.g., `.col-sm-4`). + +// +// Box sizing, responsive, and more +// + +@at-root { + @-ms-viewport { width: device-width; } +} + +html { + box-sizing: border-box; + -ms-overflow-style: scrollbar; +} + +*, +*::before, +*::after { + box-sizing: inherit; +} + + +// +// Variables +// + +@import "variables"; + +// +// Grid mixins +// + +@import "mixins/clearfix"; +@import "mixins/breakpoints"; +@import "mixins/grid-framework"; +@import "mixins/grid"; + +@import "custom"; + +@import "grid"; diff --git a/csunplugged/static/scss/bootstrap/bootstrap-reboot.scss b/csunplugged/static/scss/bootstrap/bootstrap-reboot.scss new file mode 100644 index 000000000..978b086a1 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/bootstrap-reboot.scss @@ -0,0 +1,10 @@ +// Bootstrap Reboot only +// +// Includes only Normalize and our custom Reboot reset. + +@import "variables"; +@import "mixins"; +@import "custom"; + +@import "normalize"; +@import "reboot"; diff --git a/csunplugged/static/scss/bootstrap/bootstrap.scss b/csunplugged/static/scss/bootstrap/bootstrap.scss new file mode 100644 index 000000000..88a60cafa --- /dev/null +++ b/csunplugged/static/scss/bootstrap/bootstrap.scss @@ -0,0 +1,54 @@ +/*! + * Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com) + * Copyright 2011-2017 The Bootstrap Authors + * Copyright 2011-2017 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +// Core variables and mixins +@import "variables"; +@import "mixins"; +@import "custom"; + +// Reset and dependencies +@import "normalize"; +@import "print"; + +// Core CSS +@import "reboot"; +@import "type"; +@import "images"; +@import "code"; +@import "grid"; +@import "tables"; +@import "forms"; +@import "buttons"; + +// Components +@import "transitions"; +@import "dropdown"; +@import "button-group"; +@import "input-group"; +@import "custom-forms"; +@import "nav"; +@import "navbar"; +@import "card"; +@import "breadcrumb"; +@import "pagination"; +@import "badge"; +@import "jumbotron"; +@import "alert"; +@import "progress"; +@import "media"; +@import "list-group"; +@import "responsive-embed"; +@import "close"; + +// Components w/ JavaScript +@import "modal"; +@import "tooltip"; +@import "popover"; +@import "carousel"; + +// Utility classes +@import "utilities"; diff --git a/csunplugged/static/scss/bootstrap/mixins/_alert.scss b/csunplugged/static/scss/bootstrap/mixins/_alert.scss new file mode 100644 index 000000000..6ed3a81ab --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_alert.scss @@ -0,0 +1,14 @@ +// Alerts + +@mixin alert-variant($background, $border, $body-color) { + background-color: $background; + border-color: $border; + color: $body-color; + + hr { + border-top-color: darken($border, 5%); + } + .alert-link { + color: darken($body-color, 10%); + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_background-variant.scss b/csunplugged/static/scss/bootstrap/mixins/_background-variant.scss new file mode 100644 index 000000000..54a734dcc --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_background-variant.scss @@ -0,0 +1,12 @@ +// Contextual backgrounds + +@mixin bg-variant($parent, $color) { + #{$parent} { + background-color: $color !important; + } + a#{$parent} { + @include hover-focus { + background-color: darken($color, 10%) !important; + } + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_badge.scss b/csunplugged/static/scss/bootstrap/mixins/_badge.scss new file mode 100644 index 000000000..9fa44b647 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_badge.scss @@ -0,0 +1,11 @@ +// Badges + +@mixin badge-variant($color) { + background-color: $color; + + &[href] { + @include hover-focus { + background-color: darken($color, 10%); + } + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_border-radius.scss b/csunplugged/static/scss/bootstrap/mixins/_border-radius.scss new file mode 100644 index 000000000..54f29f41d --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_border-radius.scss @@ -0,0 +1,35 @@ +// Single side border-radius + +@mixin border-radius($radius: $border-radius) { + @if $enable-rounded { + border-radius: $radius; + } +} + +@mixin border-top-radius($radius) { + @if $enable-rounded { + border-top-right-radius: $radius; + border-top-left-radius: $radius; + } +} + +@mixin border-right-radius($radius) { + @if $enable-rounded { + border-bottom-right-radius: $radius; + border-top-right-radius: $radius; + } +} + +@mixin border-bottom-radius($radius) { + @if $enable-rounded { + border-bottom-right-radius: $radius; + border-bottom-left-radius: $radius; + } +} + +@mixin border-left-radius($radius) { + @if $enable-rounded { + border-bottom-left-radius: $radius; + border-top-left-radius: $radius; + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_breakpoints.scss b/csunplugged/static/scss/bootstrap/mixins/_breakpoints.scss new file mode 100644 index 000000000..6fd2e8e1e --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_breakpoints.scss @@ -0,0 +1,95 @@ +// Breakpoint viewport sizes and media queries. +// +// Breakpoints are defined as a map of (name: minimum width), order from small to large: +// +// (xs: 0, sm: 576px, md: 768px) +// +// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default. + +// Name of the next breakpoint, or null for the last breakpoint. +// +// >> breakpoint-next(sm) +// md +// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px)) +// md +// >> breakpoint-next(sm, $breakpoint-names: (xs sm md)) +// md +@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) { + $n: index($breakpoint-names, $name); + @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null); +} + +// Minimum breakpoint width. Null for the smallest (first) breakpoint. +// +// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px)) +// 576px +@function breakpoint-min($name, $breakpoints: $grid-breakpoints) { + $min: map-get($breakpoints, $name); + @return if($min != 0, $min, null); +} + +// Maximum breakpoint width. Null for the largest (last) breakpoint. +// The maximum value is calculated as the minimum of the next one less 0.1. +// +// >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px)) +// 767px +@function breakpoint-max($name, $breakpoints: $grid-breakpoints) { + $next: breakpoint-next($name, $breakpoints); + @return if($next, breakpoint-min($next, $breakpoints) - 1px, null); +} + +// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront. +// Useful for making responsive utilities. +// +// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px)) +// "" (Returns a blank string) +// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px)) +// "-sm" +@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) { + @return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}"); +} + +// Media of at least the minimum breakpoint width. No query for the smallest breakpoint. +// Makes the @content apply to the given breakpoint and wider. +@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) { + $min: breakpoint-min($name, $breakpoints); + @if $min { + @media (min-width: $min) { + @content; + } + } @else { + @content; + } +} + +// Media of at most the maximum breakpoint width. No query for the largest breakpoint. +// Makes the @content apply to the given breakpoint and narrower. +@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) { + $max: breakpoint-max($name, $breakpoints); + @if $max { + @media (max-width: $max) { + @content; + } + } @else { + @content; + } +} + +// Media that spans multiple breakpoint widths. +// Makes the @content apply between the min and max breakpoints +@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) { + @include media-breakpoint-up($lower, $breakpoints) { + @include media-breakpoint-down($upper, $breakpoints) { + @content; + } + } +} + +// Media between the breakpoint's minimum and maximum widths. +// No minimum for the smallest breakpoint, and no maximum for the largest one. +// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower. +@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) { + @include media-breakpoint-between($name, $name, $breakpoints) { + @content; + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_buttons.scss b/csunplugged/static/scss/bootstrap/mixins/_buttons.scss new file mode 100644 index 000000000..f9981e326 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_buttons.scss @@ -0,0 +1,86 @@ +// Button variants +// +// Easily pump out default styles, as well as :hover, :focus, :active, +// and disabled options for all buttons + +@mixin button-variant($color, $background, $border) { + $active-background: darken($background, 10%); + $active-border: darken($border, 12%); + + color: $color; + background-color: $background; + border-color: $border; + @include box-shadow($btn-box-shadow); + + // Hover and focus styles are shared + @include hover { + color: $color; + background-color: $active-background; + border-color: $active-border; + } + &:focus, + &.focus { + // Avoid using mixin so we can pass custom focus shadow properly + @if $enable-shadows { + box-shadow: $btn-box-shadow, 0 0 0 2px rgba($border, .5); + } @else { + box-shadow: 0 0 0 2px rgba($border, .5); + } + } + + // Disabled comes first so active can properly restyle + &.disabled, + &:disabled { + background-color: $background; + border-color: $border; + } + + &:active, + &.active, + .show > &.dropdown-toggle { + color: $color; + background-color: $active-background; + background-image: none; // Remove the gradient for the pressed/active state + border-color: $active-border; + @include box-shadow($btn-active-box-shadow); + } +} + +@mixin button-outline-variant($color, $color-hover: #fff) { + color: $color; + background-image: none; + background-color: transparent; + border-color: $color; + + @include hover { + color: $color-hover; + background-color: $color; + border-color: $color; + } + + &:focus, + &.focus { + box-shadow: 0 0 0 2px rgba($color, .5); + } + + &.disabled, + &:disabled { + color: $color; + background-color: transparent; + } + + &:active, + &.active, + .show > &.dropdown-toggle { + color: $color-hover; + background-color: $color; + border-color: $color; + } +} + +// Button sizes +@mixin button-size($padding-y, $padding-x, $font-size, $border-radius) { + padding: $padding-y $padding-x; + font-size: $font-size; + @include border-radius($border-radius); +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_cards.scss b/csunplugged/static/scss/bootstrap/mixins/_cards.scss new file mode 100644 index 000000000..4b1232d8b --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_cards.scss @@ -0,0 +1,47 @@ +// Card variants + +@mixin card-variant($background, $border) { + background-color: $background; + border-color: $border; + + .card-header, + .card-footer { + background-color: transparent; + } +} + +@mixin card-outline-variant($color) { + background-color: transparent; + border-color: $color; +} + +// +// Inverse text within a card for use with dark backgrounds +// + +@mixin card-inverse { + color: rgba(255,255,255,.65); + + .card-header, + .card-footer { + background-color: transparent; + border-color: rgba(255,255,255,.2); + } + .card-header, + .card-footer, + .card-title, + .card-blockquote { + color: #fff; + } + .card-link, + .card-text, + .card-subtitle, + .card-blockquote .blockquote-footer { + color: rgba(255,255,255,.65); + } + .card-link { + @include hover-focus { + color: $card-link-hover-color; + } + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_clearfix.scss b/csunplugged/static/scss/bootstrap/mixins/_clearfix.scss new file mode 100644 index 000000000..b72cf2712 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_clearfix.scss @@ -0,0 +1,7 @@ +@mixin clearfix() { + &::after { + display: block; + content: ""; + clear: both; + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_float.scss b/csunplugged/static/scss/bootstrap/mixins/_float.scss new file mode 100644 index 000000000..b43116fa6 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_float.scss @@ -0,0 +1,9 @@ +@mixin float-left { + float: left !important; +} +@mixin float-right { + float: right !important; +} +@mixin float-none { + float: none !important; +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_forms.scss b/csunplugged/static/scss/bootstrap/mixins/_forms.scss new file mode 100644 index 000000000..c8aea9669 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_forms.scss @@ -0,0 +1,79 @@ +// Form validation states +// +// Used in _forms.scss to generate the form validation CSS for warnings, errors, +// and successes. + +@mixin form-control-validation($color) { + // Color the label and help text + .form-control-feedback, + .form-control-label, + .col-form-label, + .form-check-label, + .custom-control { + color: $color; + } + + // Set the border and box shadow on specific inputs to match + .form-control { + border-color: $color; + + &:focus { + @include box-shadow($input-box-shadow, 0 0 6px lighten($color, 20%)); + } + } + + // Set validation states also for addons + .input-group-addon { + color: $color; + border-color: $color; + background-color: lighten($color, 40%); + } +} + +// Form control focus state +// +// Generate a customized focus state and for any input with the specified color, +// which defaults to the `@input-border-focus` variable. +// +// We highly encourage you to not customize the default value, but instead use +// this to tweak colors on an as-needed basis. This aesthetic change is based on +// WebKit's default styles, but applicable to a wider range of browsers. Its +// usability and accessibility should be taken into account with any change. +// +// Example usage: change the default blue border and shadow to white for better +// contrast against a dark gray background. +@mixin form-control-focus() { + &:focus { + color: $input-color-focus; + background-color: $input-bg-focus; + border-color: $input-border-focus; + outline: none; + @include box-shadow($input-box-shadow-focus); + } +} + +// Form control sizing +// +// Relative text size, padding, and border-radii changes for form controls. For +// horizontal sizing, wrap controls in the predefined grid classes. `<select>` +// element gets special love because it's special, and that's a fact! + +@mixin input-size($parent, $input-height, $padding-y, $padding-x, $font-size, $line-height, $border-radius) { + #{$parent} { + height: $input-height; + padding: $padding-y $padding-x; + font-size: $font-size; + line-height: $line-height; + @include border-radius($border-radius); + } + + select#{$parent} { + height: $input-height; + line-height: $input-height; + } + + textarea#{$parent}, + select[multiple]#{$parent} { + height: auto; + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_gradients.scss b/csunplugged/static/scss/bootstrap/mixins/_gradients.scss new file mode 100644 index 000000000..8bfd97c4d --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_gradients.scss @@ -0,0 +1,37 @@ +// Gradients + +// Horizontal gradient, from left to right +// +// Creates two color stops, start and end, by specifying a color and position for each color stop. +@mixin gradient-x($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) { + background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); + background-repeat: repeat-x; +} + +// Vertical gradient, from top to bottom +// +// Creates two color stops, start and end, by specifying a color and position for each color stop. +@mixin gradient-y($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) { + background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); + background-repeat: repeat-x; +} + +@mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) { + background-repeat: repeat-x; + background-image: linear-gradient($deg, $start-color, $end-color); +} +@mixin gradient-x-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) { + background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color); + background-repeat: no-repeat; +} +@mixin gradient-y-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) { + background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color); + background-repeat: no-repeat; +} +@mixin gradient-radial($inner-color: #555, $outer-color: #333) { + background-image: radial-gradient(circle, $inner-color, $outer-color); + background-repeat: no-repeat; +} +@mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) { + background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent); +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_grid-framework.scss b/csunplugged/static/scss/bootstrap/mixins/_grid-framework.scss new file mode 100644 index 000000000..0aa814ab2 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_grid-framework.scss @@ -0,0 +1,65 @@ +// Framework grid generation +// +// Used only by Bootstrap to generate the correct number of grid classes given +// any value of `$grid-columns`. + +@mixin make-grid-columns($columns: $grid-columns, $gutters: $grid-gutter-widths, $breakpoints: $grid-breakpoints) { + // Common properties for all breakpoints + %grid-column { + position: relative; + width: 100%; + min-height: 1px; // Prevent columns from collapsing when empty + + @include make-gutters($gutters); + } + + @each $breakpoint in map-keys($breakpoints) { + $infix: breakpoint-infix($breakpoint, $breakpoints); + + // Allow columns to stretch full width below their breakpoints + @for $i from 1 through $columns { + .col#{$infix}-#{$i} { + @extend %grid-column; + } + } + .col#{$infix} { + @extend %grid-column; + } + + @include media-breakpoint-up($breakpoint, $breakpoints) { + // Provide basic `.col-{bp}` classes for equal-width flexbox columns + .col#{$infix} { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; + } + .col#{$infix}-auto { + flex: 0 0 auto; + width: auto; + } + + @for $i from 1 through $columns { + .col#{$infix}-#{$i} { + @include make-col($i, $columns); + } + } + + @each $modifier in (pull, push) { + @for $i from 0 through $columns { + .#{$modifier}#{$infix}-#{$i} { + @include make-col-modifier($modifier, $i, $columns) + } + } + } + + // `$columns - 1` because offsetting by the width of an entire row isn't possible + @for $i from 0 through ($columns - 1) { + @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-xs-0 + .offset#{$infix}-#{$i} { + @include make-col-modifier(offset, $i, $columns) + } + } + } + } + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_grid.scss b/csunplugged/static/scss/bootstrap/mixins/_grid.scss new file mode 100644 index 000000000..9cd8c7bbb --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_grid.scss @@ -0,0 +1,100 @@ +/// Grid system +// +// Generate semantic grid columns with these mixins. + +@mixin make-container($gutters: $grid-gutter-widths) { + position: relative; + margin-left: auto; + margin-right: auto; + + @each $breakpoint in map-keys($gutters) { + @include media-breakpoint-up($breakpoint) { + $gutter: map-get($gutters, $breakpoint); + padding-right: ($gutter / 2); + padding-left: ($gutter / 2); + } + } +} + + +// For each breakpoint, define the maximum width of the container in a media query +@mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) { + @each $breakpoint, $container-max-width in $max-widths { + @include media-breakpoint-up($breakpoint, $breakpoints) { + width: $container-max-width; + max-width: 100%; + } + } +} + +@mixin make-gutters($gutters: $grid-gutter-widths) { + @each $breakpoint in map-keys($gutters) { + @include media-breakpoint-up($breakpoint) { + $gutter: map-get($gutters, $breakpoint); + padding-right: ($gutter / 2); + padding-left: ($gutter / 2); + } + } +} + +@mixin make-row($gutters: $grid-gutter-widths) { + display: flex; + flex-wrap: wrap; + + @each $breakpoint in map-keys($gutters) { + @include media-breakpoint-up($breakpoint) { + $gutter: map-get($gutters, $breakpoint); + margin-right: ($gutter / -2); + margin-left: ($gutter / -2); + } + } +} + +@mixin make-col-ready($gutters: $grid-gutter-widths) { + position: relative; + // Prevent columns from becoming too narrow when at smaller grid tiers by + // always setting `width: 100%;`. This works because we use `flex` values + // later on to override this initial width. + width: 100%; + min-height: 1px; // Prevent collapsing + + @each $breakpoint in map-keys($gutters) { + @include media-breakpoint-up($breakpoint) { + $gutter: map-get($gutters, $breakpoint); + padding-right: ($gutter / 2); + padding-left: ($gutter / 2); + } + } +} + +@mixin make-col($size, $columns: $grid-columns) { + flex: 0 0 percentage($size / $columns); + // width: percentage($size / $columns); + // Add a `max-width` to ensure content within each column does not blow out + // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari + // do not appear to require this. + max-width: percentage($size / $columns); +} + +@mixin make-col-offset($size, $columns: $grid-columns) { + margin-left: percentage($size / $columns); +} + +@mixin make-col-push($size, $columns: $grid-columns) { + left: if($size > 0, percentage($size / $columns), auto); +} + +@mixin make-col-pull($size, $columns: $grid-columns) { + right: if($size > 0, percentage($size / $columns), auto); +} + +@mixin make-col-modifier($type, $size, $columns) { + // Work around the lack of dynamic mixin @include support (https://github.com/sass/sass/issues/626) + @if $type == push { + @include make-col-push($size, $columns); + } @else if $type == pull { + @include make-col-pull($size, $columns); + } @else if $type == offset { + @include make-col-offset($size, $columns); + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_hover.scss b/csunplugged/static/scss/bootstrap/mixins/_hover.scss new file mode 100644 index 000000000..6dd55e705 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_hover.scss @@ -0,0 +1,60 @@ +@mixin hover { + // TODO: re-enable along with mq4-hover-shim +// @if $enable-hover-media-query { +// // See Media Queries Level 4: https://drafts.csswg.org/mediaqueries/#hover +// // Currently shimmed by https://github.com/twbs/mq4-hover-shim +// @media (hover: hover) { +// &:hover { @content } +// } +// } +// @else { + &:hover { @content } +// } +} + +@mixin hover-focus { + @if $enable-hover-media-query { + &:focus { @content } + @include hover { @content } + } + @else { + &:focus, + &:hover { + @content + } + } +} + +@mixin plain-hover-focus { + @if $enable-hover-media-query { + &, + &:focus { + @content + } + @include hover { @content } + } + @else { + &, + &:focus, + &:hover { + @content + } + } +} + +@mixin hover-focus-active { + @if $enable-hover-media-query { + &:focus, + &:active { + @content + } + @include hover { @content } + } + @else { + &:focus, + &:active, + &:hover { + @content + } + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_image.scss b/csunplugged/static/scss/bootstrap/mixins/_image.scss new file mode 100644 index 000000000..c2b45f2ce --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_image.scss @@ -0,0 +1,36 @@ +// Image Mixins +// - Responsive image +// - Retina image + + +// Responsive image +// +// Keep images from scaling beyond the width of their parents. + +@mixin img-fluid { + // Part 1: Set a maximum relative to the parent + max-width: 100%; + // Part 2: Override the height to auto, otherwise images will be stretched + // when setting a width and height attribute on the img element. + height: auto; +} + + +// Retina image +// +// Short retina mixin for setting background-image and -size. + +@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) { + background-image: url($file-1x); + + // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio, + // but doesn't convert dppx=>dpi. + // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard. + // Compatibility info: http://caniuse.com/#feat=css-media-resolution + @media + only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx + only screen and (min-resolution: 2dppx) { // Standardized + background-image: url($file-2x); + background-size: $width-1x $height-1x; + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_list-group.scss b/csunplugged/static/scss/bootstrap/mixins/_list-group.scss new file mode 100644 index 000000000..3db5b096a --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_list-group.scss @@ -0,0 +1,28 @@ +// List Groups + +@mixin list-group-item-variant($state, $background, $color) { + .list-group-item-#{$state} { + color: $color; + background-color: $background; + } + + a.list-group-item-#{$state}, + button.list-group-item-#{$state} { + color: $color; + + .list-group-item-heading { + color: inherit; + } + + @include hover-focus { + color: $color; + background-color: darken($background, 5%); + } + + &.active { + color: #fff; + background-color: $color; + border-color: $color; + } + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_lists.scss b/csunplugged/static/scss/bootstrap/mixins/_lists.scss new file mode 100644 index 000000000..251856266 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_lists.scss @@ -0,0 +1,7 @@ +// Lists + +// Unstyled keeps list items block level, just removes default browser padding and list-style +@mixin list-unstyled { + padding-left: 0; + list-style: none; +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_nav-divider.scss b/csunplugged/static/scss/bootstrap/mixins/_nav-divider.scss new file mode 100644 index 000000000..fb3d12e9f --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_nav-divider.scss @@ -0,0 +1,10 @@ +// Horizontal dividers +// +// Dividers (basically an hr) within dropdowns and nav lists + +@mixin nav-divider($color: #e5e5e5) { + height: 1px; + margin: ($spacer-y / 2) 0; + overflow: hidden; + background-color: $color; +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_navbar-align.scss b/csunplugged/static/scss/bootstrap/mixins/_navbar-align.scss new file mode 100644 index 000000000..c454a4ffe --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_navbar-align.scss @@ -0,0 +1,9 @@ +// Navbar vertical align +// +// Vertically center elements in the navbar. +// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. + +// @mixin navbar-vertical-align($element-height) { +// margin-top: (($navbar-height - $element-height) / 2); +// margin-bottom: (($navbar-height - $element-height) / 2); +// } diff --git a/csunplugged/static/scss/bootstrap/mixins/_pagination.scss b/csunplugged/static/scss/bootstrap/mixins/_pagination.scss new file mode 100644 index 000000000..8cd9317cf --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_pagination.scss @@ -0,0 +1,21 @@ +// Pagination + +@mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) { + .page-link { + padding: $padding-y $padding-x; + font-size: $font-size; + } + + .page-item { + &:first-child { + .page-link { + @include border-left-radius($border-radius); + } + } + &:last-child { + .page-link { + @include border-right-radius($border-radius); + } + } + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_reset-text.scss b/csunplugged/static/scss/bootstrap/mixins/_reset-text.scss new file mode 100644 index 000000000..b95273097 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_reset-text.scss @@ -0,0 +1,17 @@ +@mixin reset-text { + font-family: $font-family-base; + // We deliberately do NOT reset font-size or word-wrap. + font-style: normal; + font-weight: $font-weight-normal; + letter-spacing: normal; + line-break: auto; + line-height: $line-height-base; + text-align: left; // Fallback for where `start` is not supported + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + white-space: normal; + word-break: normal; + word-spacing: normal; +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_resize.scss b/csunplugged/static/scss/bootstrap/mixins/_resize.scss new file mode 100644 index 000000000..83fa63791 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_resize.scss @@ -0,0 +1,6 @@ +// Resize anything + +@mixin resizable($direction) { + resize: $direction; // Options: horizontal, vertical, both + overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_screen-reader.scss b/csunplugged/static/scss/bootstrap/mixins/_screen-reader.scss new file mode 100644 index 000000000..c20858324 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_screen-reader.scss @@ -0,0 +1,32 @@ +// Only display content to screen readers +// +// See: http://a11yproject.com/posts/how-to-hide-content + +@mixin sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0,0,0,0); + border: 0; +} + +// Use in conjunction with .sr-only to only display content when it's focused. +// +// Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 +// +// Credit: HTML5 Boilerplate + +@mixin sr-only-focusable { + &:active, + &:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_size.scss b/csunplugged/static/scss/bootstrap/mixins/_size.scss new file mode 100644 index 000000000..b9dd48e8d --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_size.scss @@ -0,0 +1,6 @@ +// Sizing shortcuts + +@mixin size($width, $height: $width) { + width: $width; + height: $height; +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_table-row.scss b/csunplugged/static/scss/bootstrap/mixins/_table-row.scss new file mode 100644 index 000000000..84f1d305a --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_table-row.scss @@ -0,0 +1,30 @@ +// Tables + +@mixin table-row-variant($state, $background) { + // Exact selectors below required to override `.table-striped` and prevent + // inheritance to nested tables. + .table-#{$state} { + &, + > th, + > td { + background-color: $background; + } + } + + // Hover states for `.table-hover` + // Note: this is not available for cells or rows within `thead` or `tfoot`. + .table-hover { + $hover-background: darken($background, 5%); + + .table-#{$state} { + @include hover { + background-color: $hover-background; + + > td, + > th { + background-color: $hover-background; + } + } + } + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_text-emphasis.scss b/csunplugged/static/scss/bootstrap/mixins/_text-emphasis.scss new file mode 100644 index 000000000..9cd4b6a4f --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_text-emphasis.scss @@ -0,0 +1,12 @@ +// Typography + +@mixin text-emphasis-variant($parent, $color) { + #{$parent} { + color: $color !important; + } + a#{$parent} { + @include hover-focus { + color: darken($color, 10%) !important; + } + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_text-hide.scss b/csunplugged/static/scss/bootstrap/mixins/_text-hide.scss new file mode 100644 index 000000000..52a38a906 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_text-hide.scss @@ -0,0 +1,8 @@ +// CSS image replacement +@mixin text-hide() { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_text-truncate.scss b/csunplugged/static/scss/bootstrap/mixins/_text-truncate.scss new file mode 100644 index 000000000..5a40bf533 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_text-truncate.scss @@ -0,0 +1,8 @@ +// Text truncate +// Requires inline-block or block for proper styling + +@mixin text-truncate() { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} \ No newline at end of file diff --git a/csunplugged/static/scss/bootstrap/mixins/_transforms.scss b/csunplugged/static/scss/bootstrap/mixins/_transforms.scss new file mode 100644 index 000000000..4005c9d02 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_transforms.scss @@ -0,0 +1,14 @@ +// Applies the given styles only when the browser support CSS3 3D transforms. +@mixin if-supports-3d-transforms() { + @media (-webkit-transform-3d) { + // Old Safari, Old Android + // http://caniuse.com/#feat=css-featurequeries + // https://developer.mozilla.org/en-US/docs/Web/CSS/@media/-webkit-transform-3d + @content; + } + + @supports (transform: translate3d(0,0,0)) { + // The Proper Way: Using a CSS feature query + @content; + } +} diff --git a/csunplugged/static/scss/bootstrap/mixins/_visibility.scss b/csunplugged/static/scss/bootstrap/mixins/_visibility.scss new file mode 100644 index 000000000..88c50b05d --- /dev/null +++ b/csunplugged/static/scss/bootstrap/mixins/_visibility.scss @@ -0,0 +1,5 @@ +// Visibility + +@mixin invisible { + visibility: hidden !important; +} diff --git a/csunplugged/static/scss/bootstrap/utilities/_align.scss b/csunplugged/static/scss/bootstrap/utilities/_align.scss new file mode 100644 index 000000000..4dbbbc2db --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_align.scss @@ -0,0 +1,6 @@ +.align-baseline { vertical-align: baseline !important; } // Browser default +.align-top { vertical-align: top !important; } +.align-middle { vertical-align: middle !important; } +.align-bottom { vertical-align: bottom !important; } +.align-text-bottom { vertical-align: text-bottom !important; } +.align-text-top { vertical-align: text-top !important; } diff --git a/csunplugged/static/scss/bootstrap/utilities/_background.scss b/csunplugged/static/scss/bootstrap/utilities/_background.scss new file mode 100644 index 000000000..b9ac29523 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_background.scss @@ -0,0 +1,19 @@ +// +// Contextual backgrounds +// + +.bg-faded { + background-color: darken($body-bg, 3%); +} + +@include bg-variant('.bg-primary', $brand-primary); + +@include bg-variant('.bg-success', $brand-success); + +@include bg-variant('.bg-info', $brand-info); + +@include bg-variant('.bg-warning', $brand-warning); + +@include bg-variant('.bg-danger', $brand-danger); + +@include bg-variant('.bg-inverse', $brand-inverse); diff --git a/csunplugged/static/scss/bootstrap/utilities/_borders.scss b/csunplugged/static/scss/bootstrap/utilities/_borders.scss new file mode 100644 index 000000000..b256881e5 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_borders.scss @@ -0,0 +1,37 @@ +// +// Border +// + +.border-0 { border: 0 !important; } +.border-top-0 { border-top: 0 !important; } +.border-right-0 { border-right: 0 !important; } +.border-bottom-0 { border-bottom: 0 !important; } +.border-left-0 { border-left: 0 !important; } + +// +// Border-radius +// + +.rounded { + @include border-radius($border-radius); +} +.rounded-top { + @include border-top-radius($border-radius); +} +.rounded-right { + @include border-right-radius($border-radius); +} +.rounded-bottom { + @include border-bottom-radius($border-radius); +} +.rounded-left { + @include border-left-radius($border-radius); +} + +.rounded-circle { + border-radius: 50%; +} + +.rounded-0 { + border-radius: 0; +} diff --git a/csunplugged/static/scss/bootstrap/utilities/_clearfix.scss b/csunplugged/static/scss/bootstrap/utilities/_clearfix.scss new file mode 100644 index 000000000..e92522a94 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_clearfix.scss @@ -0,0 +1,3 @@ +.clearfix { + @include clearfix(); +} diff --git a/csunplugged/static/scss/bootstrap/utilities/_display.scss b/csunplugged/static/scss/bootstrap/utilities/_display.scss new file mode 100644 index 000000000..ae942a6fb --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_display.scss @@ -0,0 +1,18 @@ +// +// Display utilities +// + +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + .d#{$infix}-none { display: none !important; } + .d#{$infix}-inline { display: inline !important; } + .d#{$infix}-inline-block { display: inline-block !important; } + .d#{$infix}-block { display: block !important; } + .d#{$infix}-table { display: table !important; } + .d#{$infix}-table-cell { display: table-cell !important; } + .d#{$infix}-flex { display: flex !important; } + .d#{$infix}-inline-flex { display: inline-flex !important; } + } +} diff --git a/csunplugged/static/scss/bootstrap/utilities/_flex.scss b/csunplugged/static/scss/bootstrap/utilities/_flex.scss new file mode 100644 index 000000000..1b98aaa3f --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_flex.scss @@ -0,0 +1,48 @@ +// Flex variation +// +// Custom styles for additional flex alignment options. + +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + .flex#{$infix}-first { order: -1; } + .flex#{$infix}-last { order: 1; } + .flex#{$infix}-unordered { order: 0; } + + .flex#{$infix}-row { flex-direction: row !important; } + .flex#{$infix}-column { flex-direction: column !important; } + .flex#{$infix}-row-reverse { flex-direction: row-reverse !important; } + .flex#{$infix}-column-reverse { flex-direction: column-reverse !important; } + + .flex#{$infix}-wrap { flex-wrap: wrap !important; } + .flex#{$infix}-nowrap { flex-wrap: nowrap !important; } + .flex#{$infix}-wrap-reverse { flex-wrap: wrap-reverse !important; } + + .justify-content#{$infix}-start { justify-content: flex-start !important; } + .justify-content#{$infix}-end { justify-content: flex-end !important; } + .justify-content#{$infix}-center { justify-content: center !important; } + .justify-content#{$infix}-between { justify-content: space-between !important; } + .justify-content#{$infix}-around { justify-content: space-around !important; } + + .align-items#{$infix}-start { align-items: flex-start !important; } + .align-items#{$infix}-end { align-items: flex-end !important; } + .align-items#{$infix}-center { align-items: center !important; } + .align-items#{$infix}-baseline { align-items: baseline !important; } + .align-items#{$infix}-stretch { align-items: stretch !important; } + + .align-content#{$infix}-start { align-content: flex-start !important; } + .align-content#{$infix}-end { align-content: flex-end !important; } + .align-content#{$infix}-center { align-content: center !important; } + .align-content#{$infix}-between { align-content: space-between !important; } + .align-content#{$infix}-around { align-content: space-around !important; } + .align-content#{$infix}-stretch { align-content: stretch !important; } + + .align-self#{$infix}-auto { align-self: auto !important; } + .align-self#{$infix}-start { align-self: flex-start !important; } + .align-self#{$infix}-end { align-self: flex-end !important; } + .align-self#{$infix}-center { align-self: center !important; } + .align-self#{$infix}-baseline { align-self: baseline !important; } + .align-self#{$infix}-stretch { align-self: stretch !important; } + } +} diff --git a/csunplugged/static/scss/bootstrap/utilities/_float.scss b/csunplugged/static/scss/bootstrap/utilities/_float.scss new file mode 100644 index 000000000..01655e9a5 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_float.scss @@ -0,0 +1,9 @@ +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + .float#{$infix}-left { @include float-left; } + .float#{$infix}-right { @include float-right; } + .float#{$infix}-none { @include float-none; } + } +} diff --git a/csunplugged/static/scss/bootstrap/utilities/_position.scss b/csunplugged/static/scss/bootstrap/utilities/_position.scss new file mode 100644 index 000000000..2cf08bfa0 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_position.scss @@ -0,0 +1,23 @@ +// Positioning + +.fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: $zindex-fixed; +} + +.fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: $zindex-fixed; +} + +.sticky-top { + position: sticky; + top: 0; + z-index: $zindex-sticky; +} diff --git a/csunplugged/static/scss/bootstrap/utilities/_screenreaders.scss b/csunplugged/static/scss/bootstrap/utilities/_screenreaders.scss new file mode 100644 index 000000000..9f26fde03 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_screenreaders.scss @@ -0,0 +1,11 @@ +// +// Screenreaders +// + +.sr-only { + @include sr-only(); +} + +.sr-only-focusable { + @include sr-only-focusable(); +} diff --git a/csunplugged/static/scss/bootstrap/utilities/_sizing.scss b/csunplugged/static/scss/bootstrap/utilities/_sizing.scss new file mode 100644 index 000000000..a7dc3e49b --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_sizing.scss @@ -0,0 +1,10 @@ +// Width and height + +@each $prop, $abbrev in (width: w, height: h) { + @each $size, $length in $sizes { + .#{$abbrev}-#{$size} { #{$prop}: $length !important; } + } +} + +.mw-100 { max-width: 100% !important; } +.mh-100 { max-height: 100% !important; } diff --git a/csunplugged/static/scss/bootstrap/utilities/_spacing.scss b/csunplugged/static/scss/bootstrap/utilities/_spacing.scss new file mode 100644 index 000000000..6056e2b7e --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_spacing.scss @@ -0,0 +1,43 @@ +// Margin and Padding + +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + @each $prop, $abbrev in (margin: m, padding: p) { + @each $size, $lengths in $spacers { + $length-x: map-get($lengths, x); + $length-y: map-get($lengths, y); + + .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length-y $length-x !important; } + .#{$abbrev}t#{$infix}-#{$size} { #{$prop}-top: $length-y !important; } + .#{$abbrev}r#{$infix}-#{$size} { #{$prop}-right: $length-x !important; } + .#{$abbrev}b#{$infix}-#{$size} { #{$prop}-bottom: $length-y !important; } + .#{$abbrev}l#{$infix}-#{$size} { #{$prop}-left: $length-x !important; } + .#{$abbrev}x#{$infix}-#{$size} { + #{$prop}-right: $length-x !important; + #{$prop}-left: $length-x !important; + } + .#{$abbrev}y#{$infix}-#{$size} { + #{$prop}-top: $length-y !important; + #{$prop}-bottom: $length-y !important; + } + } + } + + // Some special margin utils + .m#{$infix}-auto { margin: auto !important; } + .mt#{$infix}-auto { margin-top: auto !important; } + .mr#{$infix}-auto { margin-right: auto !important; } + .mb#{$infix}-auto { margin-bottom: auto !important; } + .ml#{$infix}-auto { margin-left: auto !important; } + .mx#{$infix}-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my#{$infix}-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + } +} diff --git a/csunplugged/static/scss/bootstrap/utilities/_text.scss b/csunplugged/static/scss/bootstrap/utilities/_text.scss new file mode 100644 index 000000000..4ac90533a --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_text.scss @@ -0,0 +1,61 @@ +// +// Text +// + +// Alignment + +.text-justify { text-align: justify !important; } +.text-nowrap { white-space: nowrap !important; } +.text-truncate { @include text-truncate; } + +// Responsive alignment + +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + .text#{$infix}-left { text-align: left !important; } + .text#{$infix}-right { text-align: right !important; } + .text#{$infix}-center { text-align: center !important; } + } +} + +// Transformation + +.text-lowercase { text-transform: lowercase !important; } +.text-uppercase { text-transform: uppercase !important; } +.text-capitalize { text-transform: capitalize !important; } + +// Weight and italics + +.font-weight-normal { font-weight: $font-weight-normal; } +.font-weight-bold { font-weight: $font-weight-bold; } +.font-italic { font-style: italic; } + +// Contextual colors + +.text-white { + color: #fff !important; +} + +@include text-emphasis-variant('.text-muted', $text-muted); + +@include text-emphasis-variant('.text-primary', $brand-primary); + +@include text-emphasis-variant('.text-success', $brand-success); + +@include text-emphasis-variant('.text-info', $brand-info); + +@include text-emphasis-variant('.text-warning', $brand-warning); + +@include text-emphasis-variant('.text-danger', $brand-danger); + +// Font color + +@include text-emphasis-variant('.text-gray-dark', $gray-dark); + +// Misc + +.text-hide { + @include text-hide(); +} diff --git a/csunplugged/static/scss/bootstrap/utilities/_visibility.scss b/csunplugged/static/scss/bootstrap/utilities/_visibility.scss new file mode 100644 index 000000000..fcedc9cb9 --- /dev/null +++ b/csunplugged/static/scss/bootstrap/utilities/_visibility.scss @@ -0,0 +1,55 @@ +// +// Visibility utilities +// + +.invisible { + @include invisible(); +} + +// Responsive visibility utilities + +@each $bp in map-keys($grid-breakpoints) { + .hidden-#{$bp}-up { + @include media-breakpoint-up($bp) { + display: none !important; + } + } + .hidden-#{$bp}-down { + @include media-breakpoint-down($bp) { + display: none !important; + } + } +} + + +// Print utilities +// +// Media queries are placed on the inside to be mixin-friendly. + +.visible-print-block { + display: none !important; + + @media print { + display: block !important; + } +} +.visible-print-inline { + display: none !important; + + @media print { + display: inline !important; + } +} +.visible-print-inline-block { + display: none !important; + + @media print { + display: inline-block !important; + } +} + +.hidden-print { + @media print { + display: none !important; + } +} diff --git a/csunplugged/static/scss/website.scss b/csunplugged/static/scss/website.scss new file mode 100644 index 000000000..345b596fd --- /dev/null +++ b/csunplugged/static/scss/website.scss @@ -0,0 +1,22 @@ +@import "bootstrap/bootstrap"; + +img { + &#navbar-brand-logo { + height: 30px; + margin-right: 1rem; + } + &.resource-thumbnail { + max-height: 15rem; + } + &.topic-img-logo { + height: 200px; + object-fit: contain; + } +} +h1, h2, h3 { + color: #e33333; + margin-top: 1.5rem; + span.subtitle { + color: #888; + } +} diff --git a/csunplugged/templates/base.html b/csunplugged/templates/base.html index f1caa2ecc..7bda20aea 100644 --- a/csunplugged/templates/base.html +++ b/csunplugged/templates/base.html @@ -10,8 +10,7 @@ <meta name="author" content=""> <link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css"> {% load static %} - <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"> - <link rel="stylesheet" href="{% static 'css/website.css' %}"> + <link rel="stylesheet" href="{% static 'css/website.css' %}"> <!-- <link rel="icon" type="image/png" href="images/favicon.png"> --> </head> <body> diff --git a/docs/source/getting_started/install_developer.rst b/docs/source/getting_started/install_developer.rst index 7a60565e0..b1888501b 100644 --- a/docs/source/getting_started/install_developer.rst +++ b/docs/source/getting_started/install_developer.rst @@ -68,19 +68,20 @@ machines. Step 2: Install Python 3 and pip ================================================= -Install Python 3 with the following command in terminal: +Install Python 3 with the following command in terminal (you don't need +to enter the ``$`` character, this shows the start of your terminal prompt): -.. code-block:: none +.. code-block:: bash - sudo apt install python3 + $ sudo apt install python3 Then install Python 3 pip (pip is a package management system used to install and manage software packages written in Python) with the following command in terminal: -.. code-block:: none +.. code-block:: bash - sudo apt install python3-pip + $ sudo apt install python3-pip Step 3: Install Python virtualenv ================================================= @@ -90,9 +91,9 @@ This helps to prevent conflicts with dependencies. Install virtualenv with the following command in terminal: -.. code-block:: none +.. code-block:: bash - sudo pip3 install virtualenv + $ sudo pip3 install virtualenv .. note:: @@ -104,9 +105,9 @@ Step 4: Install Git Install Git (version control software) with the following command in terminal: -.. code-block:: none +.. code-block:: bash - sudo apt install git + $ sudo apt install git Step 5: Create GitHub account ================================================= @@ -124,17 +125,17 @@ address within the Git system installed on the machine. Set the name and email Git values following command in terminal: -.. code-block:: none +.. code-block:: bash - git config --global user.name “<your name>” - git config --global user.email “<your GitHub email>” + $ git config --global user.name “<your name>” + $ git config --global user.email “<your GitHub email>” For example: -.. code-block:: none +.. code-block:: bash - git config --global user.name “John Doe” - git config --global user.email [email protected]” + $ git config --global user.name “John Doe” + $ git config --global user.email [email protected]” .. note:: @@ -148,11 +149,11 @@ Postgres is an open source database system we use to store project data. Install Postgres and required connection packages with the following commands in terminal: -.. code-block:: none +.. code-block:: bash - sudo apt-get install postgresql - sudo apt-get install python-psycopg2 - sudo apt-get install libpq-dev + $ sudo apt-get install postgresql + $ sudo apt-get install python-psycopg2 + $ sudo apt-get install libpq-dev Step 8: Create user and database in Postgres ================================================= @@ -160,9 +161,9 @@ Step 8: Create user and database in Postgres Firstly type the following command in terminal to login to the Postgres server with the default ``postgres`` account: -.. code-block:: none +.. code-block:: bash - sudo -i -u postgres + $ sudo -i -u postgres The terminal prompt should have now changed and begins with ``postgres@``. Now enter the following commands to create a user (called a 'role'): @@ -172,7 +173,7 @@ Now enter the following commands to create a user (called a 'role'): Remember the user name and password you use, as you will need these in Step 13. -.. code-block:: none +.. code-block:: bash createuser --interactive --pwprompt Enter name of role to add: <your name> @@ -214,26 +215,26 @@ terminal to this folder. To clone (the Git term for download) the project folder, type the following command in terminal: -.. code-block:: none +.. code-block:: bash - git clone https://github.com/uccser/cs-unplugged.git + $ git clone https://github.com/uccser/cs-unplugged.git .. note:: If you connect to GitHub through SSH, then type: - .. code-block:: none + .. code-block:: bash - git clone [email protected]:uccser/cs-unplugged.git + $ git clone [email protected]:uccser/cs-unplugged.git Once Git has cloned the folder, type the following commands in terminal to change the working directory to inside the project repository and checkout to the development branch: -.. code-block:: none +.. code-block:: bash - cd cs-unplugged - git checkout develop + $ cd cs-unplugged + $ git checkout develop Step 10: Create virtual environment ================================================= @@ -243,19 +244,19 @@ environment. Type the following commands in terminal to create and activate a virtualenv named ``venv`` with the default Python set to Python 3. You can change the virtual environment name to whatever you wish. -.. code-block:: none +.. code-block:: bash - python -m virtualenv --python=python3.5 venv - . venv/bin/activate + $ python -m virtualenv --python=python3.5 venv + $ . venv/bin/activate .. note:: If you installed ``virtualenvwrapper``, then type to create a virtual environment called ``csunplugged``: - .. code-block:: none + .. code-block:: bash - mkvirtualenv --python=/usr/bin/python3.5 csunplugged + $ mkvirtualenv --python=/usr/bin/python3.5 csunplugged You should now have the name of your virtual environment before the terminal prompt. @@ -263,12 +264,18 @@ prompt. Step 11: Install project requirements ================================================= -To install the project requirements, type the following commands in terminal: +To install the project requirements, type the following commands in terminal from the project root folder (contains a file called +``requirements.txt``): -.. code-block:: none +.. code-block:: bash - sudo apt-get install libffi-dev - pip install -r requirements/local.txt + $ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - + $ sudo apt-get install -y nodejs + $ sudo apt-get install libffi-dev + $ pip install -r requirements/local.txt + $ cd csunplugged + $ npm install + $ sudo npm install gulp-cli --global .. warning:: @@ -314,14 +321,21 @@ To check the project works, change your working directory to the Type the following commands in terminal (we will cover these commands in more detail on the next page): -.. code-block:: none +.. code-block:: bash + + $ python manage.py migrate + $ python manage.py loaddata + $ python manage.py runserver + +Leave this terminal running and open a new terminal in the same +folder and type the following command: + +.. code-block:: bash - python manage.py migrate - python manage.py loaddata - python manage.py runserver + $ gulp -Now open your preferred web browser to ``localhost:8000/`` and you should -see the CS Unplugged homepage. +The final command should open your preferred web browser to +``localhost:3000/`` and you should see the CS Unplugged homepage. Congratulations if you made it this far and everything is working, you're all set to contribute to the CS Unplugged project.
typeddjango__django-stubs-2131
Bump django from 5.0.4 to 5.0.5 Bumps [django](https://github.com/django/django) from 5.0.4 to 5.0.5. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/django/django/commit/b6844c6e325e400d8475fde51339984201164893"><code>b6844c6</code></a> [5.0.x] Bumped version for 5.0.5 release.</li> <li><a href="https://github.com/django/django/commit/e1eecbaa14f4f488c79265f47aca6f9308103c54"><code>e1eecba</code></a> [5.0.x] Added release date for 5.0.5 and 4.2.12.</li> <li><a href="https://github.com/django/django/commit/9b5029f04851878923e04085591b29ee291718b6"><code>9b5029f</code></a> [5.0.x] Fixed <a href="https://redirect.github.com/django/django/issues/35426">#35426</a> -- Updated querysets to be a required argument of Generi...</li> <li><a href="https://github.com/django/django/commit/ac9e18f1c4f17d956d203779df1b22faeffa670f"><code>ac9e18f</code></a> [5.0.x] Refs <a href="https://redirect.github.com/django/django/issues/35359">#35359</a> -- Fixed OperationTests.test_add_generate_field() test on...</li> <li><a href="https://github.com/django/django/commit/59c3f8a539dcea6845ace20f2b5212f7378948ba"><code>59c3f8a</code></a> [5.0.x] Fixed <a href="https://redirect.github.com/django/django/issues/35427">#35427</a> -- Corrected help text for makemessages --extension in d...</li> <li><a href="https://github.com/django/django/commit/e18e9315a3e8b295cf3763b07cc3b4c3beffca32"><code>e18e931</code></a> [5.0.x] Refs <a href="https://redirect.github.com/django/django/issues/35422">#35422</a> -- Fixed typo in docs/releases/5.0.5.txt.</li> <li><a href="https://github.com/django/django/commit/c544f1a2237fd18a1e00fef8cbcd1cf7eccd5eb9"><code>c544f1a</code></a> [5.0.x] Fixed <a href="https://redirect.github.com/django/django/issues/35422">#35422</a> -- Fixed migrations crash when altering GeneratedField r...</li> <li><a href="https://github.com/django/django/commit/24f54c3b09ab4f19bfc11c5d7ba80985ed870103"><code>24f54c3</code></a> [5.0.x] Fixed <a href="https://redirect.github.com/django/django/issues/35359">#35359</a> -- Fixed migration operations ordering when adding field...</li> <li><a href="https://github.com/django/django/commit/fa202d5cb1f16b9bbfd9da72eb03125fabc34bb8"><code>fa202d5</code></a> [5.0.x] Refs <a href="https://redirect.github.com/django/django/issues/34007">#34007</a>, Refs <a href="https://redirect.github.com/django/django/issues/35359">#35359</a> -- Added Q.referenced_based_fields property.</li> <li><a href="https://github.com/django/django/commit/f29922b6ef10e913a12d569eec0a87d3ae208235"><code>f29922b</code></a> [5.0.x] Fixed <a href="https://redirect.github.com/django/django/issues/20744">#20744</a> -- Removed hint that arbitrary kwargs are allowed when c...</li> <li>Additional commits viewable in <a href="https://github.com/django/django/compare/5.0.4...5.0.5">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=django&package-manager=pip&previous-version=5.0.4&new-version=5.0.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
[ { "content": "#!/usr/bin/env python\nimport os\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, _dirs, files in os.walk(name):\n for file in files:\n if file.endswith(\".pyi\"):\n if os.path.sep in root:\n sub_root = root.split(os.path.sep, 1)[-1]\n file = os.path.join(sub_root, file)\n result.append(file)\n return result\n\n\nwith open(\"README.md\") as f:\n readme = f.read()\n\ndependencies = [\n \"django\",\n \"asgiref\",\n \"django-stubs-ext>=5.0.0\",\n \"tomli; python_version < '3.11'\",\n # Types:\n \"typing-extensions>=4.11.0\",\n \"types-PyYAML\",\n]\n\n# Keep compatible-mypy major.minor version pinned to what we use in CI (requirements.txt)\nextras_require = {\n \"compatible-mypy\": [\"mypy~=1.10.0\"],\n \"redis\": [\"redis\"],\n}\n\nsetup(\n name=\"django-stubs\",\n version=\"5.0.0\",\n description=\"Mypy stubs for Django\",\n long_description=readme,\n long_description_content_type=\"text/markdown\",\n license=\"MIT\",\n license_files=[\"LICENSE.md\"],\n url=\"https://github.com/typeddjango/django-stubs\",\n author=\"Maksim Kurnikov\",\n author_email=\"[email protected]\",\n maintainer=\"Marti Raudsepp\",\n maintainer_email=\"[email protected]\",\n py_modules=[],\n python_requires=\">=3.8\",\n install_requires=dependencies,\n extras_require=extras_require,\n packages=[\"django-stubs\", *find_packages(exclude=[\"scripts\"])],\n package_data={\n \"django-stubs\": find_stub_files(\"django-stubs\"),\n \"mypy_django_plugin\": [\"py.typed\"],\n },\n classifiers=[\n \"License :: OSI Approved :: MIT License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Typing :: Typed\",\n \"Framework :: Django\",\n \"Framework :: Django :: 4.1\",\n \"Framework :: Django :: 4.2\",\n \"Framework :: Django :: 5.0\",\n ],\n project_urls={\n \"Funding\": \"https://github.com/sponsors/typeddjango\",\n \"Release notes\": \"https://github.com/typeddjango/django-stubs/releases\",\n },\n)\n", "path": "setup.py" } ]
[ { "content": "#!/usr/bin/env python\nimport os\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, _dirs, files in os.walk(name):\n for file in files:\n if file.endswith(\".pyi\"):\n if os.path.sep in root:\n sub_root = root.split(os.path.sep, 1)[-1]\n file = os.path.join(sub_root, file)\n result.append(file)\n return result\n\n\nwith open(\"README.md\") as f:\n readme = f.read()\n\ndependencies = [\n \"django\",\n \"asgiref\",\n \"django-stubs-ext>=5.0.0\",\n \"tomli; python_version < '3.11'\",\n # Types:\n \"typing-extensions>=4.11.0\",\n \"types-PyYAML\",\n]\n\n# Keep compatible-mypy major.minor version pinned to what we use in CI (requirements.txt)\nextras_require = {\n \"compatible-mypy\": [\"mypy~=1.10.0\"],\n \"redis\": [\"redis\"],\n \"oracle\": [\"oracledb\"],\n}\n\nsetup(\n name=\"django-stubs\",\n version=\"5.0.0\",\n description=\"Mypy stubs for Django\",\n long_description=readme,\n long_description_content_type=\"text/markdown\",\n license=\"MIT\",\n license_files=[\"LICENSE.md\"],\n url=\"https://github.com/typeddjango/django-stubs\",\n author=\"Maksim Kurnikov\",\n author_email=\"[email protected]\",\n maintainer=\"Marti Raudsepp\",\n maintainer_email=\"[email protected]\",\n py_modules=[],\n python_requires=\">=3.8\",\n install_requires=dependencies,\n extras_require=extras_require,\n packages=[\"django-stubs\", *find_packages(exclude=[\"scripts\"])],\n package_data={\n \"django-stubs\": find_stub_files(\"django-stubs\"),\n \"mypy_django_plugin\": [\"py.typed\"],\n },\n classifiers=[\n \"License :: OSI Approved :: MIT License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Typing :: Typed\",\n \"Framework :: Django\",\n \"Framework :: Django :: 4.1\",\n \"Framework :: Django :: 4.2\",\n \"Framework :: Django :: 5.0\",\n ],\n project_urls={\n \"Funding\": \"https://github.com/sponsors/typeddjango\",\n \"Release notes\": \"https://github.com/typeddjango/django-stubs/releases\",\n },\n)\n", "path": "setup.py" } ]
diff --git a/django-stubs/contrib/gis/db/backends/oracle/features.pyi b/django-stubs/contrib/gis/db/backends/oracle/features.pyi index 5c4571cc7..9785b6e1b 100644 --- a/django-stubs/contrib/gis/db/backends/oracle/features.pyi +++ b/django-stubs/contrib/gis/db/backends/oracle/features.pyi @@ -1,5 +1,8 @@ +from typing import Any + from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.db.backends.oracle.features import DatabaseFeatures as OracleDatabaseFeatures +from django.utils.functional import cached_property class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures): supports_add_srs_entry: bool @@ -7,3 +10,5 @@ class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures): supports_geometry_field_unique_index: bool supports_perimeter_geodetic: bool supports_dwithin_distance_expr: bool + @cached_property + def django_test_skips(self) -> dict[str, Any]: ... # type: ignore[override] diff --git a/django-stubs/db/models/__init__.pyi b/django-stubs/db/models/__init__.pyi index 483225654..06c0383b9 100644 --- a/django-stubs/db/models/__init__.pyi +++ b/django-stubs/db/models/__init__.pyi @@ -91,6 +91,7 @@ from .lookups import Transform as Transform from .manager import Manager as Manager from .query import Prefetch as Prefetch from .query import QuerySet as QuerySet +from .query import aprefetch_related_objects as aprefetch_related_objects from .query import prefetch_related_objects as prefetch_related_objects from .query_utils import FilteredRelation as FilteredRelation from .query_utils import Q as Q diff --git a/django-stubs/db/models/query_utils.pyi b/django-stubs/db/models/query_utils.pyi index c6cfb2470..563072b24 100644 --- a/django-stubs/db/models/query_utils.pyi +++ b/django-stubs/db/models/query_utils.pyi @@ -13,6 +13,7 @@ from django.db.models.sql.compiler import SQLCompiler, _AsSqlType from django.db.models.sql.query import Query from django.db.models.sql.where import WhereNode from django.utils import tree +from django.utils.functional import cached_property PathInfo = namedtuple( "PathInfo", ["from_opts", "to_opts", "target_fields", "join_field", "m2m", "direct", "filtered_relation"] @@ -44,6 +45,8 @@ class Q(tree.Node): def flatten(self) -> Iterator[Incomplete]: ... def check(self, against: dict[str, Any], using: str = ...) -> bool: ... def deconstruct(self) -> tuple[str, Sequence[Any], dict[str, Any]]: ... + @cached_property + def referenced_base_fields(self) -> set[str]: ... class DeferredAttribute: field: Field diff --git a/mypy.ini b/mypy.ini index 0ac3d750f..0dd267fa9 100644 --- a/mypy.ini +++ b/mypy.ini @@ -27,5 +27,8 @@ plugins = disallow_untyped_defs = false disallow_incomplete_defs = false +[mypy-cryptography.*] +ignore_errors = true + [mypy.plugins.django-stubs] django_settings_module = scripts.django_tests_settings diff --git a/requirements.txt b/requirements.txt index 95b5eb2c0..e35b68505 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,10 +8,10 @@ pytest-shard==0.1.2 # Django deps: psycopg2-binary -Django==4.2.11; python_version < '3.10' -Django==5.0.4; python_version >= '3.10' +Django==4.2.12; python_version < '3.10' +Django==5.0.5; python_version >= '3.10' -e ./ext --e .[redis,compatible-mypy] +-e .[redis,compatible-mypy,oracle] # Overrides: mypy==1.10.0 diff --git a/scripts/stubtest/allowlist.txt b/scripts/stubtest/allowlist.txt index 44113453d..ef6a09219 100644 --- a/scripts/stubtest/allowlist.txt +++ b/scripts/stubtest/allowlist.txt @@ -393,6 +393,10 @@ django.urls.resolvers.URLPattern.lookup_str django.urls.resolvers.URLResolver.url_patterns django.urls.resolvers.URLResolver.urlconf_module django.utils.connection.BaseConnectionHandler.settings +django.db.models.Q.referenced_base_fields +django.db.models.query_utils.Q.referenced_base_fields +django.contrib.gis.db.models.Q.referenced_base_fields +django.db.backends.oracle.features.DatabaseFeatures.django_test_skips # Ignore missing inner `Meta` class, see PR #2000 for the related discussion django.contrib.auth.base_user.AbstractBaseUser.Meta diff --git a/scripts/stubtest/allowlist_todo.txt b/scripts/stubtest/allowlist_todo.txt index 45811f582..2c58335df 100644 --- a/scripts/stubtest/allowlist_todo.txt +++ b/scripts/stubtest/allowlist_todo.txt @@ -208,13 +208,9 @@ django.contrib.gis.db.backends.base.operations.BaseSpatialOperations.mariadb django.contrib.gis.db.backends.mysql.base django.contrib.gis.db.backends.mysql.features.DatabaseFeatures.unsupported_geojson_options django.contrib.gis.db.backends.mysql.introspection -django.contrib.gis.db.backends.oracle.adapter -django.contrib.gis.db.backends.oracle.base django.contrib.gis.db.backends.oracle.features.DatabaseFeatures.django_test_skips django.contrib.gis.db.backends.oracle.features.DatabaseFeatures.supports_tolerance_parameter django.contrib.gis.db.backends.oracle.features.DatabaseFeatures.unsupported_geojson_options -django.contrib.gis.db.backends.oracle.introspection -django.contrib.gis.db.backends.oracle.operations django.contrib.gis.db.backends.postgis.adapter.PostGISAdapter.prepare django.contrib.gis.db.backends.postgis.features.DatabaseFeatures.empty_intersection_returns_none django.contrib.gis.db.backends.postgis.features.DatabaseFeatures.supports_geography @@ -592,12 +588,8 @@ django.db.backends.mysql.features.DatabaseFeatures.supports_table_check_constrai django.db.backends.mysql.features.DatabaseFeatures.test_collations django.db.backends.mysql.introspection django.db.backends.mysql.schema.DatabaseSchemaEditor.sql_alter_column_comment -django.db.backends.oracle.base django.db.backends.oracle.features.DatabaseFeatures.introspected_field_types django.db.backends.oracle.features.DatabaseFeatures.supports_collation_on_charfield -django.db.backends.oracle.introspection -django.db.backends.oracle.operations -django.db.backends.oracle.utils django.db.backends.postgresql.base.DatabaseWrapper.Database django.db.backends.postgresql.base.DatabaseWrapper.ensure_role django.db.backends.postgresql.base.DatabaseWrapper.ops diff --git a/scripts/stubtest/allowlist_todo_django50.txt b/scripts/stubtest/allowlist_todo_django50.txt index 9da15e5aa..227ed3c2c 100644 --- a/scripts/stubtest/allowlist_todo_django50.txt +++ b/scripts/stubtest/allowlist_todo_django50.txt @@ -92,3 +92,12 @@ django.forms.fields_for_model django.forms.models.fields_for_model django.forms.widgets.ClearableFileInput.checked django.template.autoreload + +# Django + Oracle (new errors after 5.0.5 update) +django.db.backends.oracle.utils.dsn +django.db.backends.oracle.utils.BulkInsertMapper.NCLOB +django.db.backends.oracle.introspection.TableInfo +django.db.backends.oracle.base.DatabaseWrapper.oracledb_version +django.db.backends.oracle.base.DatabaseWrapper.ops +django.contrib.gis.db.backends.oracle.operations.OracleOperations.from_text +django.contrib.gis.db.backends.oracle.operations.OracleOperations.convert_extent diff --git a/setup.py b/setup.py index d056f7b2a..66bcca87b 100644 --- a/setup.py +++ b/setup.py @@ -34,6 +34,7 @@ def find_stub_files(name: str) -> List[str]: extras_require = { "compatible-mypy": ["mypy~=1.10.0"], "redis": ["redis"], + "oracle": ["oracledb"], } setup(
jazzband__django-axes-388
Release 4.5.0 If everyone is OK with the current implementation for the `credentials`, we can release a version 4.5.0. If iteration on the work is needed, please raise any concerns you have here. The contents of the changes for 4.5.0 from the current version are available for review in here: https://github.com/jazzband/django-axes/compare/4.4.3...development
[ { "content": "from __future__ import unicode_literals\n\n__version__ = '4.4.3'\n\ndefault_app_config = 'axes.apps.AppConfig'\n\n\ndef get_version():\n return __version__\n", "path": "axes/__init__.py" } ]
[ { "content": "from __future__ import unicode_literals\n\n__version__ = '4.5.0'\n\ndefault_app_config = 'axes.apps.AppConfig'\n\n\ndef get_version():\n return __version__\n", "path": "axes/__init__.py" } ]
diff --git a/CHANGES.txt b/CHANGES.txt index 11270e66..895b38cd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,29 @@ Changes ======= +4.5.0 (2018-12-25) +------------------ + +- Improve support for custom authentication credentials using the + ``AXES_USERNAME_FORM_FIELD`` and ``AXES_USERNAME_CALLABLE`` settings. + [mastacheata] + +- Updated behaviour for fetching username from request or credentials: + If no ``AXES_USERNAME_CALLABLE`` is configured, the optional + ``credentials`` that are supplied to the axes utility methods + are now the default source for client username and the HTTP + request POST is the fallback for fetching the user information. + ``AXES_USERNAME_CALLABLE`` implements an alternative signature with two + arguments ``request, credentials`` in addition to the old ``request`` + call argument signature in a backwards compatible fashion. + [aleksihakli] + +- Add official support for the Django 2.1 LTS version and Python 3.7. + [aleksihakli] + +- Improve the requirements, documentation, tests, and CI setup. + [aleksihakli] + 4.4.3 (2018-12-08) ------------------ diff --git a/axes/__init__.py b/axes/__init__.py index dec724db..f642bed7 100644 --- a/axes/__init__.py +++ b/axes/__init__.py @@ -1,6 +1,6 @@ from __future__ import unicode_literals -__version__ = '4.4.3' +__version__ = '4.5.0' default_app_config = 'axes.apps.AppConfig'
cookiecutter__cookiecutter-609
Drop distutils support I feel it's about time to drop **distutils** support as we rely on [extras_require of setuptools](https://pythonhosted.org/setuptools/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies) to handle **yaml** dependencies.. What's your opinion on this matter?
[ { "content": "#!/usr/bin/env python\n\nimport os\nimport sys\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nversion = \"1.3.0\"\n\nif sys.argv[-1] == 'publish':\n os.system('python setup.py sdist upload')\n os.system('python setup.py bdist_wheel upload')\n sys.exit()\n\nif sys.argv[-1] == 'tag':\n os.system(\"git tag -a %s -m 'version %s'\" % (version, version))\n os.system(\"git push --tags\")\n sys.exit()\n\nwith open('README.rst') as readme_file:\n readme = readme_file.read()\n\nwith open('HISTORY.rst') as history_file:\n history = history_file.read().replace('.. :changelog:', '')\n\nrequirements = [\n 'future>=0.15.2',\n 'binaryornot>=0.2.0',\n 'jinja2>=2.7',\n 'click>=5.0',\n 'whichcraft>=0.1.1'\n]\n\nlong_description = readme + '\\n\\n' + history\n\nif sys.argv[-1] == 'readme':\n print(long_description)\n sys.exit()\n\n\nsetup(\n name='cookiecutter',\n version=version,\n description=('A command-line utility that creates projects from project '\n 'templates, e.g. creating a Python package project from a '\n 'Python package project template.'),\n long_description=long_description,\n author='Audrey Roy',\n author_email='[email protected]',\n url='https://github.com/audreyr/cookiecutter',\n packages=[\n 'cookiecutter',\n ],\n package_dir={'cookiecutter': 'cookiecutter'},\n entry_points={\n 'console_scripts': [\n 'cookiecutter = cookiecutter.cli:main',\n ]\n },\n include_package_data=True,\n install_requires=requirements,\n extras_require={\n ':sys_platform==\"win32\" and python_version==\"2.7\"': [\n 'PyYAML>=3.10'\n ],\n ':sys_platform!=\"win32\" or python_version!=\"2.7\"': [\n 'ruamel.yaml>=0.10.12'\n ]\n },\n license='BSD',\n zip_safe=False,\n classifiers=[\n 'Development Status :: 5 - Production/Stable',\n 'Environment :: Console',\n 'Intended Audience :: Developers',\n 'Natural Language :: English',\n 'License :: OSI Approved :: BSD License',\n 'Programming Language :: Python',\n 'Programming Language :: Python :: 2',\n 'Programming Language :: Python :: 2.7',\n 'Programming Language :: Python :: 3',\n 'Programming Language :: Python :: 3.3',\n 'Programming Language :: Python :: 3.4',\n 'Programming Language :: Python :: 3.5',\n 'Programming Language :: Python :: Implementation :: CPython',\n 'Programming Language :: Python :: Implementation :: PyPy',\n 'Topic :: Software Development',\n ],\n keywords=(\n 'cookiecutter, Python, projects, project templates, Jinja2, '\n 'skeleton, scaffolding, project directory, setup.py, package, '\n 'packaging'\n ),\n)\n", "path": "setup.py" } ]
[ { "content": "#!/usr/bin/env python\n\nimport os\nimport sys\n\nfrom setuptools import setup\n\nversion = \"1.3.0\"\n\nif sys.argv[-1] == 'publish':\n os.system('python setup.py sdist upload')\n os.system('python setup.py bdist_wheel upload')\n sys.exit()\n\nif sys.argv[-1] == 'tag':\n os.system(\"git tag -a %s -m 'version %s'\" % (version, version))\n os.system(\"git push --tags\")\n sys.exit()\n\nwith open('README.rst') as readme_file:\n readme = readme_file.read()\n\nwith open('HISTORY.rst') as history_file:\n history = history_file.read().replace('.. :changelog:', '')\n\nrequirements = [\n 'future>=0.15.2',\n 'binaryornot>=0.2.0',\n 'jinja2>=2.7',\n 'click>=5.0',\n 'whichcraft>=0.1.1'\n]\n\nlong_description = readme + '\\n\\n' + history\n\nif sys.argv[-1] == 'readme':\n print(long_description)\n sys.exit()\n\n\nsetup(\n name='cookiecutter',\n version=version,\n description=('A command-line utility that creates projects from project '\n 'templates, e.g. creating a Python package project from a '\n 'Python package project template.'),\n long_description=long_description,\n author='Audrey Roy',\n author_email='[email protected]',\n url='https://github.com/audreyr/cookiecutter',\n packages=[\n 'cookiecutter',\n ],\n package_dir={'cookiecutter': 'cookiecutter'},\n entry_points={\n 'console_scripts': [\n 'cookiecutter = cookiecutter.cli:main',\n ]\n },\n include_package_data=True,\n install_requires=requirements,\n extras_require={\n ':sys_platform==\"win32\" and python_version==\"2.7\"': [\n 'PyYAML>=3.10'\n ],\n ':sys_platform!=\"win32\" or python_version!=\"2.7\"': [\n 'ruamel.yaml>=0.10.12'\n ]\n },\n license='BSD',\n zip_safe=False,\n classifiers=[\n 'Development Status :: 5 - Production/Stable',\n 'Environment :: Console',\n 'Intended Audience :: Developers',\n 'Natural Language :: English',\n 'License :: OSI Approved :: BSD License',\n 'Programming Language :: Python',\n 'Programming Language :: Python :: 2',\n 'Programming Language :: Python :: 2.7',\n 'Programming Language :: Python :: 3',\n 'Programming Language :: Python :: 3.3',\n 'Programming Language :: Python :: 3.4',\n 'Programming Language :: Python :: 3.5',\n 'Programming Language :: Python :: Implementation :: CPython',\n 'Programming Language :: Python :: Implementation :: PyPy',\n 'Topic :: Software Development',\n ],\n keywords=(\n 'cookiecutter, Python, projects, project templates, Jinja2, '\n 'skeleton, scaffolding, project directory, setup.py, package, '\n 'packaging'\n ),\n)\n", "path": "setup.py" } ]
diff --git a/setup.py b/setup.py index e6e63b923..200e53eee 100755 --- a/setup.py +++ b/setup.py @@ -3,10 +3,7 @@ import os import sys -try: - from setuptools import setup -except ImportError: - from distutils.core import setup +from setuptools import setup version = "1.3.0"
rotki__rotki-501
LBRY Credits cryptocompare price queries did not work ## Problem Definition LBRY cryptocompare queries stopped working. It seems that `LBRY` is known as `LBC` in cryptocompare. ## Task Fix the cryptocompare mapping
[ { "content": "WORLD_TO_CRYPTOCOMPARE = {\n 'DATAcoin': 'DATA',\n 'IOTA': 'MIOTA',\n 'XRB': 'NANO',\n 'AIR-2': 'AIR*',\n # In Rotkehlchen Bitswift is BITS-2 but in cryptocompare it's BITSW\n 'BITS-2': 'BITSW',\n # In Rotkehlchen BTM is Bitmark and BTM-2 is Bytom but in\n # Cryptocompare Bytom is BTM and Bitmark is BTMK\n 'BTM': 'BTMK',\n 'BTM-2': 'BTM',\n # In Rotkehlchen CCN-2 is Cannacoin and CCN is CustomContractNetwork\n 'CCN-2': 'CCN',\n # In Rotkehlchen FAIR-2 is FairGame and FAIR is FairCoin, but in\n # cryptocompare FairGame is FAIRG\n 'FAIR-2': 'FAIRG',\n # Almosst 100% certain that GPUC (https://coinmarketcap.com/currencies/gpucoin/)\n # is GPU in cryptocompare (https://www.cryptocompare.com/coins/gpu/overview)\n 'GPUC': 'GPU',\n # In Rotkehlchen we got 3 coins with KEY symbol. Cryptocompare does not have\n # data for KEY-2\n # KEY -> Selfkey\n # KEY-2 -> KEY\n # KEY-3 -> KeyCoin\n 'KEY-3': 'KEYC',\n # In Rotkehlchen KNC is KyberNetwork and KNC-2 is KingN coin. In cryptocompare\n # KNGN is KingN coin\n 'KNC-2': 'KNGN',\n # Liquidity network is LQD in Rotkehlchen but LQDN in Cryptocompare\n 'LQD': 'LQDN',\n # Monetaverde is as MNV in cryptocompare while it should be MCN\n # https://www.cryptocompare.com/coins/mnv/overview\n 'MCN': 'MNV',\n # Marscoin is as MRS in cryptocompare\n # https://www.cryptocompare.com/coins/mrs/overview\n 'MARS': 'MRS',\n # Marginless is not in cryptocompare. Asking for MRS will return MARScoin\n 'MRS': None,\n # Mazacoin is as MZC in cryptocompare\n 'MAZA': 'MZC',\n # NuBits is NBT in cryptocompare\n 'USNBT': 'NBT',\n # Polymath is POLY in Rotkehlchen and POLYN in cryptocompare\n 'POLY': 'POLYN',\n # Polybit is POLY-2 in Rotkehlchen and POLY in cryptocompare\n 'POLY-2': 'POLY',\n # YacCoin is YAC in cryptocompare\n 'YACC': 'YAC',\n # GoldCoin is GLD in cryptocompare, but GLC in most other places including Rotkehlcen\n 'GLC': 'GLD',\n # In Rotkehlchen we have GlobalCoin as GLC-2. In Cryptocompare it's GLC\n 'GLC-2': 'GLC',\n # In Rotkehlchen and everywhere else Bitbean is BITB but in cryptocompare BEAN\n 'BITB': 'BEAN',\n # For Rotkehlchen RCN is Ripio Credit Network and RCN-2 is Rcoin\n # Rcoin is RCOIN in cryptocompare\n 'RCN-2': 'RCOIN',\n # EDR is Endor Protocol in Rotkehlchen and EPT in cryptocompare\n 'EDR': 'EPT',\n # EDR-2 is E-Dinar coin in Rotkehlchen and EDR in cryptocompare\n 'EDR-2': 'EDR',\n # SPC is Spacechain in Rotkehlchen but APCC in cryptocompare.\n 'SPC': 'APCC',\n # Blocktrade is BTT-2 in Rotkehlchen but BKT in cryptocompare.\n 'BTT-2': 'BKT',\n # Ontology gas is ONG in Rotkehlchen but ONGAS in cryptocompare\n 'ONG': 'ONGAS',\n # SoMee.Social is ONG-2 in Rotkehlchen but ONG in cryptocompare\n 'ONG-2': 'ONG',\n # SLT is Smartlands in Rotkehlchen but SLST in cryptocompare\n 'SLT': 'SLST',\n # SLT-2 is Social Lending Network in Rotkehlchen but SLT in cryptocompare\n 'SLT-2': 'SLT',\n # PAI is Project Pai in Rotkehlchen but PPAI in cryptocompare\n 'PAI': 'PPAI',\n # PAI-2 is PCHAIN in Rotkehlchen but PAI in cryptocompare\n 'PAI-2': 'PAI',\n # CMT-2 is CometCoin in Rotkehlchen but CMTC in cryptocompare\n 'CMT-2': 'CMTC',\n # GXChain is GXC in Rotkehlcen and GXS in cryptocompare\n 'GXC': 'GXS',\n # Harvest Masternode Coin is in HC-2 in Rotkehlchen and HMN in cryptocompare\n 'HC-2': 'HMN',\n # For Rotkehlchen HOT is Holochain and HOT-2 is Hydro Protocol\n # But for cryptocompare HOT is Hydro Protocol and HOLO is HoloChain\n 'HOT': 'HOLO',\n 'HOT-2': 'HOT',\n # For Rotkehlchen YOYO is YOYOW but it's YOYOW in cryptocompare\n 'YOYOW': 'YOYOW',\n # For Rotkehlchen 0xBTC is 0xBTC but in cryptocompare it's capitalized\n '0xBTC': '0XBTC',\n # For Rotkehlchen ACC is AdCoin, ACC-2 is ACChain and ACC-3 is Accelerator network\n # In cryptocompare Accelerator Network is ACCN\n 'ACC-3': 'ACCN',\n # For Rotkehlchen ARB is Arbitrage coin and ARB-2 is ARbit but in cryptocompare\n # ARBT is arbitrage and ARB is ARbit\n 'ARB': 'ARBT',\n 'ARB-2': 'ARB',\n # For Rotkehlchen ARC is Advanced Technology Coin (Arctic) and ARC-2 is ArcadeCity\n # In Cryptocompare ARC* is ArcadeCity\n 'ARC-2': 'ARC*',\n # For Rotkehlchen ATX is Astoin Coin and ATX-2 is ArtexCoin but in\n # cryptocompare ASTO is Astoin Coin and ATX is ArtexCoin\n 'ATX': 'ASTO',\n 'ATX-2': 'ATX',\n # For Rotkehlchen AVA is Travala and AVA-2 is Avalon but in\n # cryptocompare AVALA is Travala and AVA is Avalon\n 'AVA': 'AVALA',\n 'AVA-2': 'AVA',\n # Symbol for B2BX is B2B is cryptocompare so we need to specify it\n 'B2BX': 'B2B',\n # For Rotkehlchen BBK is BrickBlock and BBK-2 is Bitblocks but in cryptocompare\n # BrickBlock is XBB and Bitblocks is BBK\n 'BBK': 'XBB',\n 'BBK-2': 'BBK',\n # For Rotkehlchen BBN is Banyan Network but in cryptocompare it's BNN\n 'BBN': 'BNN',\n # For Rotkehlchen BET is Dao.Casino and BET-2 is BetaCoin but in cryptocompare\n # Dao.Casino is DAOC and BetaCoin is BET\n 'BET': 'DAOC',\n 'BET-2': 'BET',\n # Bollenum (https://coinmarketcap.com/currencies/bolenum/) is BLN\n # in rotkehlchen but BLNM in cryptocompare\n 'BLN': 'BLNM',\n # ContentBox (https://coinmarketcap.com/currencies/contentbox/) is BOX-2\n # in rotkehlchen but BOX in cryptocompare\n 'BOX-2': 'BOX',\n # Bytether (https://www.cryptocompare.com/coins/byther/overview) is BTH\n # in rotkehlchen but BYTHER in cryptocompare\n 'BTH': 'BYTHER',\n # Bither (https://www.cryptocompare.com/coins/btr/overview) is BTR-2\n # in rotkehlchen but BTR in cryptocompare\n 'BTR-2': 'BTR',\n # For Rotkehlchen CAN is CanYaCoin and CAN-2 is Content And Ad Network\n # In cryptocompare, it's CAN and CADN\n 'CAN-2': 'CADN',\n # For Rotkehlchen CAT is Bitclave and CAT-2 is BlockCAT but in cryptocompare\n # Bitclave is BCAT and BlockCat is not supported\n 'CAT': 'BCAT',\n # For Rotkehlchen CET is CoinEX and CET-2 is DiceMoney but in cryptocompare\n # CoinEX is CET and DiceMoney is DICEM\n 'CET-2': 'DICEM',\n # For Rotkehlchen COS is Contentos but in cryptocompare it's CONT\n 'COS': 'CONT',\n # For Rotkehlchen CPC is CPChain and CPC-2 is CapriCoin but in cryptocompare\n # CPChain is CPCH and CapriCoin is CPC\n 'CPC': 'CPCH',\n 'CPC-2': 'CPC',\n # For Rotkehlchen CRC is CryCash and CRC-2 is CrowdCoin but in cryptocompare\n # Crycash is CRYC and CrowdCoin is CRC\n 'CRC': 'CRYC',\n 'CRC-2': 'CRC',\n # For Rotkehlchen CS is Credits but it's CRDTS in cryptocompare\n 'CS': 'CRDTS',\n # For Rotkehlchen CTX-2 is CarTaxi but it's CTX in cryptocompare\n 'CTX-2': 'CTX',\n # For Rotkehlchen DOW is DOW Coin Chain but it's Dow in cryptocompare\n 'DOW': 'Dow',\n # For Rotkehlchen EPY is Emphy Coin but it's EMPH in cryptocompare\n 'EPY': 'EMPHY',\n # For Rotkehlchen ERT is Eristica Coin but it's ERIS in cryptocompare\n 'ERT': 'ERIS',\n # For Rotkehlchen EVN is Envion and EVN-2 is EvenCoin, but in cryptocompare\n # Evencoin is EVENC\n 'EVN-2': 'EVENC',\n # For Rotkehlchen EXC is ExcaliburCoin and EXC-2 is EximChain Token but in\n # cryptocompare EXC is EximChain Token ans ExcaliburCoin is not supported\n 'EXC-2': 'EXC',\n # For Rotkehlchen FLX is Bitflux but it's FLX* in cryptocompare\n 'FLX': 'FLX*',\n # For Rotkehlchen FORK is ForkCoin and FORK-2 is GastroAdvisor. For\n # cryptocompare only GastroAdvisor exists as FORK.\n 'FORK-2': 'FORK',\n # For Rotkehlchen GBX is GoByte and GBX-2 is Globitex but in cryptocompare\n # Globitex is GBXT\n 'GBX-2': 'GBXT',\n # For Rotkehlchen GEN is Daostack but it's GENS in cryptocompare\n 'GEN': 'GENS',\n # For Rotkehlchen GENE is ParkGene and GENE-2 is Gene Source Code Chain,\n # in cryptocompare GENE-2 is GENE*\n 'GENE-2': 'GENE*',\n # For Rotkehlchen GOT is Go Network Token and GOT-2 is ParkinGo, cryptocompare\n # does not have ParkinGO and Go Network Token is GTK\n 'GOT': 'GTK',\n # For Rotkehlchen HMC is Hi Mutual Society and HMC-2 is Harmony Coin, in\n # cryptocompare HMC is the same but HMC* is (perhaps) Harmony Coin\n 'HMC-2': 'HMC*',\n # For Rotkehlchen INV is Invacio but it's INVC in cryptocompare\n 'INV': 'INVC',\n # For Rotkehlchen JOY is Joy but it's JOY* in cryptocompare\n 'JOY': 'JOY*',\n # For Rotkehlchen LNC is Blocklancer and LNC-2 is Linker Coin, but for\n # cryptocompare linker coin is LNKC\n 'LNC-2': 'LNKC',\n # For Rotkehlchen LOC is LockTrip but in cryptocompare it's LOCK\n 'LOC': 'LOCK',\n # For Rotkehlchen MAN is Matrix AI Network but in cryptocompare it's MXAI\n 'MAN': 'MXAI',\n # For Rotkehlchen MDT is Measurable Data Token but in cryptocompare it's MSDT\n 'MDT': 'MSDT',\n # For Rotkehlchen MNT is Media Network Token but in cryptocompare it's MNT*\n 'MNT': 'MNT*',\n # For Rotkehlchen MRP is MoneyReel but in cryptocompare it's MNRB\n 'MRP': 'MNRB',\n # For Rotkehlchen MTC is doc.com Token and MTC-2 is Mesh Network but in\n # cryptocompare Mesh Network is MTCMN\n 'MTC-2': 'MTCMN',\n # For Rotkehlchen MTN is Medical Token but it's MDCL in cryptocompare\n 'MTN': 'MDCL',\n # For Rotkehlchen OCC-2 is Original Cryptocoin but it's OCC in cryptocompare\n 'OCC-2': 'OCC',\n # For Rotkehlchen ORS is OriginSport Token and ORS-2 is ORS group, but in\n # cryptocompare OriginSport Token is OGSP and ORS Group is ORS\n 'ORS': 'OGSP',\n 'ORS-2': 'ORS',\n # For Rotkehlchen PRE is Presearch but it's SRCH in cryptocompare\n 'PRE': 'SRCH',\n # For Rotkehlchen PLA is Plair and PLA-2 is Playchip, but in cryptocompare\n # PLA is Playchip and Plair is PLAI\n 'PLA': 'PLAI',\n 'PLA-2': 'PLA',\n # For Rotkehlchen RDN is Raiden Network but it's RDNN in cryptocompare\n 'RDN': 'RDNN',\n # For Rotkehlchen SKB is SakuraBloom but it's SKRB in cryptocompare\n 'SKB': 'SKRB',\n # For Rotkehlchen SKR is SkrillaToken but it's SKR* in cryptocompare\n 'SKR': 'SKRT',\n # For Rotkehlchen SMART is SmartCash, and SMART-2 is SmartBillions, but in\n # cryptocompare SmartBillions is SMART*\n 'SMART-2': 'SMART*',\n # For Rotkehlchen SOUL is Phantasma and SOUL-2 is CryptoSoul. But cryptocompare\n # only has Phantasma as GOST\n 'SOUL': 'GOST',\n # For Rotkehlchen SPD is Spindle and SPD-2 is Stipend, but in cryptocompare\n # Spindle is SPND and Stipend is SPD\n 'SPD': 'SPND',\n 'SPD-2': 'SPD',\n # For Rotkehlchen SPX is Sp8de Token but it's SPCIE in cryptocompare\n 'SPX': 'SPCIE',\n # For Rotkehlchen STRC is Star Credits but it's SRC* in cryptocompare\n 'STRC': 'SRC*',\n # For Rotkehlchen TCH is ThoreCash and TCH-2 is TigerCash but cryptocompare\n # only has TigerCash as TCH\n 'TCH-2': 'TCH',\n # For Rotkehlchen TEAM is TokenStars Team but cryptocompare has it as TEAMT\n 'TEAM': 'TEAMT',\n # For Rotkehlchen VSF is Verisafe but it's CPLO in cryptocompare (the old name)\n 'VSF': 'CPLO',\n # For Rotkehlchen WEB is Webcoin and WEB-2 Webchain, but in cryptocompare\n # Webchain is WEBC\n 'WEB-2': 'WEBC',\n # For Rotkehlchen WIN is Winchain Token and WIN-2 WCoin, but in cryptocompare\n # Wcoin is WIN and there is no Winchain Token\n 'WIN-2': 'WIN',\n # For Rotkehlchen BlitzPredict is XBP but it's BPX in cryptocompare\n 'XBP': 'BPX',\n # For Cryptocompare PHX has not been updated to PHB\n 'PHB': 'PHX',\n}\n\n# TODO: For the ones missing from cryptocompare make sure to also\n# disallow price queries to cryptocompare for these assets\nKNOWN_TO_MISS_FROM_CRYPTOCOMPARE = (\n # This is just kraken's internal fee token\n 'KFEE',\n # This is just bittrex's internal credit token\n 'BTXCRD',\n # For us ACH is the Altcoin Herald token. For cryptocompare it's\n # Achievecoin\n # https://www.cryptocompare.com/coins/ach/overview\n 'ACH',\n # We got APH as Aphelion and APH-2 as a very shortlived Aphrodite coin\n # Cryptocompare has no data for Aphrodite coin\n 'APH-2',\n # Atomic coin (https://coinmarketcap.com/currencies/atomic-coin/) is not in\n # cryptocompare but is in paprika\n 'ATOM-2',\n # BORA (https://coinmarketcap.com/currencies/bora/)\n # is not in cryptocompare but is in paprika\n 'BORA',\n # BOXX (https://coinmarketcap.com/currencies/blockparty-boxx-token/)\n # is not in cryptocompare but is in paprika\n 'BOXX',\n # Block.Money is not in cryptocompare but it's in coin paprika\n # https://coinmarketcap.com/currencies/bloc-money/\n 'BLOC-2',\n # BTCTalkCoin is not in cryptocompare but it's in coin paprika\n # https://api.coinpaprika.com/v1/coins/talk-btctalkcoin and in coinmarketcap\n # https://coinmarketcap.com/currencies/btctalkcoin/#charts\n 'TALK',\n # CCN is CustomContractNetwork in Rotkehlchen but Cannacoin in cryptocompare\n # and cryptocompare does not have data for CustomContractNetwork\n 'CCN',\n # Dreamcoin (https://coinmarketcap.com/currencies/dreamcoin/#charts) is not\n # in cryptocompare.\n 'DRM',\n # KEY (bihu) (https://coinmarketcap.com/currencies/key/) is not in\n # cryptocompare. But it's in paprika\n 'KEY-2',\n # MRS (Marginless) is not in cryptocompare. There is a coin with that\n # symbol there, but it's the MARScoin\n 'MRS',\n # PRcoin, known as PRC-2 in Rotkehlcen has no data in cryptocompare\n 'PRC-2',\n # Wiki coin/token is not in cryptocompare but is in paprika wiki-wiki-token\n 'WIKI',\n # More token (https://coinmarketcap.com/currencies/more-coin/) is not in\n # cryptocompare but is in paprika\n 'MORE',\n # Mithril Ore token (https://coinmarketcap.com/currencies/mithril-ore/) is not in\n # cryptocompare but is in paprika\n 'MORE-2',\n # Aidus Token (https://coinmarketcap.com/currencies/aidus-token/) is not in\n # cryptocompare but is in paprika\n 'AID-2',\n # Cashbery coin (https://coinmarketcap.com/currencies/cashbery-coin/) is not\n # in cryptocompare but is in paprika\n 'CBC-2',\n # Cyber movie chain (https://coinmarketcap.com/currencies/cyber-movie-chain/)\n # is not in cryptocompare but is in paprika\n 'CMCT-2',\n # Moss (https://coinmarketcap.com/currencies/moss-coin/)\n # is not in cryptocompare but is in paprika\n 'MOC',\n # Solve.care (https://coinmarketcap.com/currencies/solve/) is not\n # in cryptocompare but is in paprika\n 'SOLVE',\n # Stronghold USD (https://coinmarketcap.com/currencies/stronghold-usd/)\n # is not in cryptocompare but is in paprika\n 'USDS-2',\n # HXRO (https://coinmarketcap.com/currencies/hxro/)\n # is not in cryptocompare but is in paprika\n 'HXRO',\n # SERV (https://coinmarketcap.com/currencies/serve/)\n # is not in cryptocompare but is in paprika\n 'SERV',\n # TTC (https://coinmarketcap.com/currencies/ttc-protocol/)\n # is not in cryptocompare but is in paprika\n # There is a \"titcoin\" as TTC in cryptocompare but that is wrong\n # https://www.cryptocompare.com/coins/ttc/overview\n 'TTC',\n # BlazeCoin (https://coinmarketcap.com/currencies/blazecoin/)\n # is not in cryptocompare but is in paprika\n 'BLZ-2',\n # Bitgem (https://coinmarketcap.com/currencies/bitgem/)\n # is not in cryptocompare but is in paprika\n 'BTG-2',\n # 1SG (https://coinmarketcap.com/currencies/1sg/)\n # is not in cryptocompare but is in paprika\n '1SG',\n # ACChain (https://coinmarketcap.com/currencies/acchain/)\n # is not in cryptocompare but is in paprika\n 'ACC-2',\n # PolyAI (https://coinmarketcap.com/currencies/poly-ai/)\n # is not in cryptocompare but is in paprika\n 'AI',\n # Akropolis (https://coinmarketcap.com/currencies/akropolis/)\n # is not in cryptocompare but is in paprika\n 'AKRO',\n # AiLink token (https://coinmarketcap.com/currencies/ailink-token/)\n # is not in cryptocompare but is in paprika\n 'ALI',\n # Bankcoin BCash (https://bankcoinbcash.com/)\n # is not in cryptocompare but is in paprika\n 'BCASH',\n # BitcapitalVendor (https://coinmarketcap.com/currencies/bitcapitalvendor/)\n # is not in cryptocompare but is in paprika\n 'BCV',\n # BitPark (https://coinmarketcap.com/currencies/bitpark-coin/)\n # is not in cryptocompare but is in paprika\n 'BITPARK',\n # BankCoin Cash (https://bankcoin-cash.com/)\n # is not in cryptocompare but is in paprika\n 'BKC',\n # Bionic (https://coinmarketcap.com/currencies/bionic/)\n # is not in cryptocompare but is in paprika\n 'BNC',\n # BrokerNekoNetwork (https://coinmarketcap.com/currencies/brokernekonetwork/)\n # is not in cryptocompare but is in paprika\n 'BNN',\n # BoxToken (https://coinmarketcap.com/currencies/contentbox/)\n # is not in cryptocompare but is in paprika\n 'BOX',\n # BitcoinOne (https://coinmarketcap.com/currencies/bitcoin-one/)\n # is not in cryptocompare but is in paprika\n 'BTCONE',\n # BitcoinToken (https://coinmarketcap.com/currencies/bitcoin-token/)\n # is not in cryptocompare but is in paprika\n 'BTK',\n # Bitether (https://coinmarketcap.com/currencies/bitether/)\n # is not in cryptocompare but is in paprika\n 'BTR',\n # Blue whale token (https://coinmarketcap.com/currencies/blue-whale-token/)\n # is not in cryptocompare but is in paprika\n 'BWX',\n # Carboneum (https://coinmarketcap.com/currencies/carboneum-c8-token/)\n # is not in cryptocompare but is in paprika\n 'C8',\n # Cloudbrid (https://www.cloudbric.io/)\n # is not in cryptocompare but is in paprika\n 'CLB',\n # COCOS-BCX (https://coinmarketcap.com/currencies/cocos-bcx/)\n # is not in cryptocompare but is in paprika\n 'COCOS',\n # CruiseBit (https://coinmarketcap.com/currencies/cruisebit/)\n # is not in cryptocompare but is in paprika\n 'CRBT',\n # Cryptosolartech (https://coinmarketcap.com/currencies/cryptosolartech/)\n # is not in cryptocompare but is in paprika\n 'CST',\n # Centauri (https://coinmarketcap.com/currencies/centauri/)\n # is not in cryptocompare but is in paprika\n 'CTX',\n # CyberFM (https://coinmarketcap.com/currencies/cyberfm/)\n # is not in cryptocompare but is in paprika\n 'CYFM',\n # CyberMusic (https://coinmarketcap.com/currencies/cybermusic/)\n # is not in cryptocompare but is in paprika\n 'CYMT',\n # CanonChain (https://coinmarketcap.com/currencies/cononchain/)\n # is not in cryptocompare but is in paprika\n 'CZR',\n # DACSEE (https://coinmarketcap.com/currencies/dacsee/)\n # is not in cryptocompare but is in paprika\n 'DACS',\n # Dalecoin (https://coinmarketcap.com/currencies/dalecoin/)\n # is not in cryptocompare but is in paprika\n 'DALC',\n # Digital Assets Exchange token\n # (https://coinmarketcap.com/currencies/digital-asset-exchange-token/)\n # is not in cryptocompare but is in paprika\n 'DAXT',\n # Deltachain (https://coinmarketcap.com/currencies/delta-chain/)\n # is not in cryptocompare but is in paprika\n 'DELTA',\n # Dew (https://coinmarketcap.com/currencies/dew/)\n # is not in cryptocompare but is in paprika\n 'DEW',\n # DEX (https://coinmarketcap.com/currencies/dex/)\n # is not in cryptocompare but is in paprika\n 'DEX',\n # DragonGlass (https://coinmarketcap.com/currencies/dragonglass/)\n # is not in cryptocompare but is in paprika\n 'DGS',\n # DigitalInsuranceToken (https://coinmarketcap.com/currencies/digital-insurance-token/)\n # is not in cryptocompare but is in paprika\n 'DIT',\n # DigitalTicks (https://www.coingecko.com/en/coins/digital-ticks) is not in\n # cryptocompate but is in paprika\n 'DTX-2',\n # E4Row (https://coinmarketcap.com/currencies/ether-for-the-rest-of-the-world/) is not in\n # cryptocompare but is in paprika\n 'E4ROW',\n # EAGLE (https://coinmarketcap.com/currencies/eaglecoin/) is not in\n # cryptocompare but is in paprika\n 'EAGLE',\n # OpenSource university (https://os.university/) is not in\n # cryptocompare but is in paprika\n 'EDU-2',\n # ExcaliburCoin (https://coinmarketcap.com/currencies/excaliburcoin/) is not\n # in cryptocompare but is in paprika\n 'EXC',\n # Fingerprint (https://fingerprintcoin.org/) is not\n # in cryptocompare but is in paprika\n 'FGP',\n # Formosa Fincial Token (https://coinmarketcap.com/currencies/formosa-financial/)\n # is not in cryptocompare but is in paprika\n 'FMF',\n # Fcoin token (https://coinmarketcap.com/currencies/ftoken/)\n # is not in cryptocompare but is in paprika\n 'FT-2',\n # Futurax (https://coinmarketcap.com/currencies/futurax/)\n # is not in cryptocompare but is in paprika\n 'FTXT',\n # FunctionX (https://coinmarketcap.com/currencies/function-x/)\n # is not in cryptocompare but is in paprika\n 'FX',\n # Flexacoin (https://coinmarketcap.com/currencies/flexacoin/)\n # is not in cryptocompare but is in paprika\n 'FXC',\n # Themis GET (https://coinmarketcap.com/currencies/themis/)\n # is not in cryptocompare but is in paprika\n 'GET-2',\n # ParkinGO (https://coinmarketcap.com/currencies/parkingo/)\n # is not in cryptocompare but is in paprika\n 'GOT-2',\n # GSENetwork (https://coinmarketcap.com/currencies/gsenetwork/)\n # is not in cryptocompare but is in paprika\n 'GSE',\n # Jury.Online Token (https://coinmarketcap.com/currencies/jury-online-token/)\n # is not in cryptocompare but is in paprika\n 'JOT',\n # KanadeCoin (https://coinmarketcap.com/currencies/kanadecoin/)\n # is not in cryptocompare but is in paprika\n 'KNDC',\n # KoraNetworkToken (https://coinmarketcap.com/currencies/kora-network-token/)\n # is not in cryptocompare but is in paprika\n 'KNT',\n # Knekted (https://coinmarketcap.com/currencies/knekted/)\n # is not in cryptocompare but is in paprika\n 'KNT-2',\n # 4NEW KWATT (https://coinmarketcap.com/currencies/4new/)\n # is not in cryptocompare but is in paprika\n 'KWATT',\n # Liquorchain Token (https://etherscan.io/address/0x4A37A91eec4C97F9090CE66d21D3B3Aadf1aE5aD)\n # is not in cryptocompare but is in paprika\n 'LCT-2',\n # LemoChain (https://coinmarketcap.com/currencies/lemochain/)\n # is not in cryptocompare but is in paprika\n 'LEMO',\n # Linkey (https://coinmarketcap.com/currencies/linkey/)\n # is not in cryptocompare but is in paprika\n 'LKY',\n # Lisk Machine Learning (https://coinmarketcap.com/currencies/lisk-machine-learning/)\n # is not in cryptocompare but is in paprika\n 'LML',\n # Locus Chain (https://etherscan.io/address/0xC64500DD7B0f1794807e67802F8Abbf5F8Ffb054)\n # is not in cryptocompare but is in paprika\n 'LOCUS',\n # LUNA Terra (https://coinmarketcap.com/currencies/terra/)\n # is not in cryptocompare but is in paprika\n 'LUNA-2',\n # Midas Protocol (https://coinmarketcap.com/currencies/midasprotocol/)\n # is not in cryptocompare but is in paprika\n 'MAS',\n # Matic (https://coinmarketcap.com/currencies/matic-network/)\n # is not in cryptocompare but is in paprika\n 'MATIC',\n # Meshbox (https://coinlib.io/coin/MESH/MeshBox)\n # is not in cryptocompare but is in paprika\n 'MESH',\n # Nami ICO (https://etherscan.io/address/0x8d80de8A78198396329dfA769aD54d24bF90E7aa)\n # is not in cryptocompate but is in paprika\n 'NAC',\n # For Rotkehlchen NCC is neurochain and NCC-2 is NeedsCoin and neither of them\n # is in cryptocompare but they are both in paprika\n 'NCC',\n 'NCC-2',\n # NDEX (https://coinmarketcap.com/currencies/ndex/)\n # is not in cryptocompare but is in paprika\n 'NDX',\n # NetKoin (https://coinmarketcap.com/currencies/netkoin/)\n # is not in cryptocompare but is in paprika\n 'NTK-2',\n # Nuggets (https://coinmarketcap.com/currencies/nuggets/)\n # is not in cryptocompare but is in paprika\n 'NUG',\n # OCtoin (https://coinmarketcap.com/currencies/octoin-coin/)\n # is not in cryptocompare but is in paprika\n 'OCC',\n # OptiToken (https://coinmarketcap.com/currencies/optitoken/)\n # is not in cryptocompare but is in paprika\n 'OPTI',\n # Wisepass (https://coinmarketcap.com/currencies/wisepass/)\n # is not in cryptocompare but is in paprika\n 'PASS-2',\n # Kleros (https://coinmarketcap.com/currencies/kleros/)\n # is not in cryptocompare but is in paprika\n # Note: Cryptocompare has SteamPunk as PNK ...\n 'PNK',\n # For Rotkehlchen POP is PopularCoin, and POP-2 is POP Chest Token, but in\n # cryptocompare POP Chest appears also as POP so I can only assume it's not\n # supported https://www.cryptocompare.com/coins/popc/overview\n 'POP-2',\n # Foresting (https://coinmarketcap.com/currencies/pton/)\n # is not in cryptocompare but is in paprika\n 'PTON',\n # Proton (https://coinmarketcap.com/currencies/proton-token/)\n # is not in cryptocompare but is in paprika. Cryptocompare has\n # Pink Taxi Token as PTT.\n 'PTT',\n # Pixel (https://coinmarketcap.com/currencies/pixel/)\n # is not in cryptocompare but is in paprika. Cryptocompare hasattr\n # Phalanx as PXL\n 'PXL',\n # Rublix (https://coinmarketcap.com/currencies/rublix/)\n # is not in cryptocompare but is in paprika\n 'RBLX',\n # Red Token (https://coinmarketcap.com/currencies/red/)\n # is not in cryptocompare but is in paprika\n 'RED',\n # Rusgas (https://coinmarketcap.com/currencies/rusgas/)\n # is not in cryptocompare but is in paprika\n 'RGS',\n # RemiCoin (https://coinmarketcap.com/currencies/remicoin/)\n # is not in cryptocompare but is in paprika\n 'RMC',\n # Rotharium (https://coinmarketcap.com/currencies/rotharium/)\n # is not in cryptocompare but is in paprika\n 'RTH',\n # SmartApplicationChain (https://coinmarketcap.com/currencies/smart-application-chain/)\n # is not in cryptocompare but is in paprika\n 'SAC',\n # snowball (https://etherscan.io/address/0x198A87b3114143913d4229Fb0f6D4BCb44aa8AFF)\n # is not in cryptocompare but is in paprika\n 'SNBL',\n # Soniq (https://coinmarketcap.com/currencies/soniq/)\n # is not in cryptocompare but is in paprika\n 'SONIQ',\n # CryptoSoul (https://coinmarketcap.com/currencies/cryptosoul/)\n # is not in cryptocompare but is in paprika\n 'SOUL-2',\n # Spin Protocol (https://coinmarketcap.com/currencies/spin-protocol/)\n # is not in cryptocompare but is in paprika\n 'SPIN',\n # Staker (https://coinmarketcap.com/currencies/staker/)\n # is not in cryptocompare but is in paprika\n 'STR',\n # TigerCash (https://coinmarketcap.com/currencies/tigercash/)\n # is not in cryptocompare but is in paprika\n 'TCH',\n # TercetNetwork (https://etherscan.io/address/0x28d7F432d24ba6020d1cbD4f28BEDc5a82F24320)\n # is not in cryptocompare but is in paprika\n 'TCNX',\n # Temco (https://coinmarketcap.com/currencies/temco/)\n # is not in cryptocompare but is in paprika\n 'TEMCO',\n # ThingsChain (https://coinmarketcap.com/currencies/thingschain/)\n # is not in cryptocompare but is in paprika\n 'TIC',\n # Tokok (https://coinmarketcap.com/currencies/tokok/)\n # is not in cryptocompare but is in paprika\n 'TOK',\n # Uchain (https://coinmarketcap.com/currencies/uchain/)\n # is not in cryptocompare but is in paprika\n 'UCN',\n # Veriblock (https://coinmarketcap.com/currencies/veriblock/)\n # is not in cryptocompare but is in paprika\n 'VBK',\n # Bitcoin Card (https://etherscan.io/address/0x9a9bB9b4b11BF8eccff84B58a6CCCCD4058A7f0D)\n # is not in cryptocompare but is in paprika\n 'VD',\n # VeriDocGlobal (https://coinmarketcap.com/currencies/veridocglobal/)\n # is not in cryptocompare but is in paprika\n 'VDG',\n # Vikky Token (https://coinmarketcap.com/currencies/vikkytoken/)\n # is not in cryptocompare but is in paprika\n 'VIKKY',\n # Wibson (https://coinmarketcap.com/currencies/wibson/)\n # is not in cryptocompare but is in paprika\n 'WIB',\n # Winchain Token (https://coinmarketcap.com/currencies/wintoken/)\n # is not in cryptocompare but is in paprika\n 'WIN',\n # Yggdrash (https://coinmarketcap.com/currencies/yeed/)\n # is not in cryptocompare but is in paprika\n 'YEED',\n # ZeusNetwork (https://coinmarketcap.com/currencies/zeusnetwork/)\n # is not in cryptocompare but is in paprika\n 'ZEUS',\n # BlockCat (https://coinmarketcap.com/currencies/blockcat/)\n # is not in cryptocompare but is in paprika\n 'CAT-2',\n)\n", "path": "rotkehlchen/constants/cryptocompare.py" } ]
[ { "content": "WORLD_TO_CRYPTOCOMPARE = {\n 'LBRY': 'LBC',\n 'DATAcoin': 'DATA',\n 'IOTA': 'MIOTA',\n 'XRB': 'NANO',\n 'AIR-2': 'AIR*',\n # In Rotkehlchen Bitswift is BITS-2 but in cryptocompare it's BITSW\n 'BITS-2': 'BITSW',\n # In Rotkehlchen BTM is Bitmark and BTM-2 is Bytom but in\n # Cryptocompare Bytom is BTM and Bitmark is BTMK\n 'BTM': 'BTMK',\n 'BTM-2': 'BTM',\n # In Rotkehlchen CCN-2 is Cannacoin and CCN is CustomContractNetwork\n 'CCN-2': 'CCN',\n # In Rotkehlchen FAIR-2 is FairGame and FAIR is FairCoin, but in\n # cryptocompare FairGame is FAIRG\n 'FAIR-2': 'FAIRG',\n # Almosst 100% certain that GPUC (https://coinmarketcap.com/currencies/gpucoin/)\n # is GPU in cryptocompare (https://www.cryptocompare.com/coins/gpu/overview)\n 'GPUC': 'GPU',\n # In Rotkehlchen we got 3 coins with KEY symbol. Cryptocompare does not have\n # data for KEY-2\n # KEY -> Selfkey\n # KEY-2 -> KEY\n # KEY-3 -> KeyCoin\n 'KEY-3': 'KEYC',\n # In Rotkehlchen KNC is KyberNetwork and KNC-2 is KingN coin. In cryptocompare\n # KNGN is KingN coin\n 'KNC-2': 'KNGN',\n # Liquidity network is LQD in Rotkehlchen but LQDN in Cryptocompare\n 'LQD': 'LQDN',\n # Monetaverde is as MNV in cryptocompare while it should be MCN\n # https://www.cryptocompare.com/coins/mnv/overview\n 'MCN': 'MNV',\n # Marscoin is as MRS in cryptocompare\n # https://www.cryptocompare.com/coins/mrs/overview\n 'MARS': 'MRS',\n # Marginless is not in cryptocompare. Asking for MRS will return MARScoin\n 'MRS': None,\n # Mazacoin is as MZC in cryptocompare\n 'MAZA': 'MZC',\n # NuBits is NBT in cryptocompare\n 'USNBT': 'NBT',\n # Polymath is POLY in Rotkehlchen and POLYN in cryptocompare\n 'POLY': 'POLYN',\n # Polybit is POLY-2 in Rotkehlchen and POLY in cryptocompare\n 'POLY-2': 'POLY',\n # YacCoin is YAC in cryptocompare\n 'YACC': 'YAC',\n # GoldCoin is GLD in cryptocompare, but GLC in most other places including Rotkehlcen\n 'GLC': 'GLD',\n # In Rotkehlchen we have GlobalCoin as GLC-2. In Cryptocompare it's GLC\n 'GLC-2': 'GLC',\n # In Rotkehlchen and everywhere else Bitbean is BITB but in cryptocompare BEAN\n 'BITB': 'BEAN',\n # For Rotkehlchen RCN is Ripio Credit Network and RCN-2 is Rcoin\n # Rcoin is RCOIN in cryptocompare\n 'RCN-2': 'RCOIN',\n # EDR is Endor Protocol in Rotkehlchen and EPT in cryptocompare\n 'EDR': 'EPT',\n # EDR-2 is E-Dinar coin in Rotkehlchen and EDR in cryptocompare\n 'EDR-2': 'EDR',\n # SPC is Spacechain in Rotkehlchen but APCC in cryptocompare.\n 'SPC': 'APCC',\n # Blocktrade is BTT-2 in Rotkehlchen but BKT in cryptocompare.\n 'BTT-2': 'BKT',\n # Ontology gas is ONG in Rotkehlchen but ONGAS in cryptocompare\n 'ONG': 'ONGAS',\n # SoMee.Social is ONG-2 in Rotkehlchen but ONG in cryptocompare\n 'ONG-2': 'ONG',\n # SLT is Smartlands in Rotkehlchen but SLST in cryptocompare\n 'SLT': 'SLST',\n # SLT-2 is Social Lending Network in Rotkehlchen but SLT in cryptocompare\n 'SLT-2': 'SLT',\n # PAI is Project Pai in Rotkehlchen but PPAI in cryptocompare\n 'PAI': 'PPAI',\n # PAI-2 is PCHAIN in Rotkehlchen but PAI in cryptocompare\n 'PAI-2': 'PAI',\n # CMT-2 is CometCoin in Rotkehlchen but CMTC in cryptocompare\n 'CMT-2': 'CMTC',\n # GXChain is GXC in Rotkehlcen and GXS in cryptocompare\n 'GXC': 'GXS',\n # Harvest Masternode Coin is in HC-2 in Rotkehlchen and HMN in cryptocompare\n 'HC-2': 'HMN',\n # For Rotkehlchen HOT is Holochain and HOT-2 is Hydro Protocol\n # But for cryptocompare HOT is Hydro Protocol and HOLO is HoloChain\n 'HOT': 'HOLO',\n 'HOT-2': 'HOT',\n # For Rotkehlchen YOYO is YOYOW but it's YOYOW in cryptocompare\n 'YOYOW': 'YOYOW',\n # For Rotkehlchen 0xBTC is 0xBTC but in cryptocompare it's capitalized\n '0xBTC': '0XBTC',\n # For Rotkehlchen ACC is AdCoin, ACC-2 is ACChain and ACC-3 is Accelerator network\n # In cryptocompare Accelerator Network is ACCN\n 'ACC-3': 'ACCN',\n # For Rotkehlchen ARB is Arbitrage coin and ARB-2 is ARbit but in cryptocompare\n # ARBT is arbitrage and ARB is ARbit\n 'ARB': 'ARBT',\n 'ARB-2': 'ARB',\n # For Rotkehlchen ARC is Advanced Technology Coin (Arctic) and ARC-2 is ArcadeCity\n # In Cryptocompare ARC* is ArcadeCity\n 'ARC-2': 'ARC*',\n # For Rotkehlchen ATX is Astoin Coin and ATX-2 is ArtexCoin but in\n # cryptocompare ASTO is Astoin Coin and ATX is ArtexCoin\n 'ATX': 'ASTO',\n 'ATX-2': 'ATX',\n # For Rotkehlchen AVA is Travala and AVA-2 is Avalon but in\n # cryptocompare AVALA is Travala and AVA is Avalon\n 'AVA': 'AVALA',\n 'AVA-2': 'AVA',\n # Symbol for B2BX is B2B is cryptocompare so we need to specify it\n 'B2BX': 'B2B',\n # For Rotkehlchen BBK is BrickBlock and BBK-2 is Bitblocks but in cryptocompare\n # BrickBlock is XBB and Bitblocks is BBK\n 'BBK': 'XBB',\n 'BBK-2': 'BBK',\n # For Rotkehlchen BBN is Banyan Network but in cryptocompare it's BNN\n 'BBN': 'BNN',\n # For Rotkehlchen BET is Dao.Casino and BET-2 is BetaCoin but in cryptocompare\n # Dao.Casino is DAOC and BetaCoin is BET\n 'BET': 'DAOC',\n 'BET-2': 'BET',\n # Bollenum (https://coinmarketcap.com/currencies/bolenum/) is BLN\n # in rotkehlchen but BLNM in cryptocompare\n 'BLN': 'BLNM',\n # ContentBox (https://coinmarketcap.com/currencies/contentbox/) is BOX-2\n # in rotkehlchen but BOX in cryptocompare\n 'BOX-2': 'BOX',\n # Bytether (https://www.cryptocompare.com/coins/byther/overview) is BTH\n # in rotkehlchen but BYTHER in cryptocompare\n 'BTH': 'BYTHER',\n # Bither (https://www.cryptocompare.com/coins/btr/overview) is BTR-2\n # in rotkehlchen but BTR in cryptocompare\n 'BTR-2': 'BTR',\n # For Rotkehlchen CAN is CanYaCoin and CAN-2 is Content And Ad Network\n # In cryptocompare, it's CAN and CADN\n 'CAN-2': 'CADN',\n # For Rotkehlchen CAT is Bitclave and CAT-2 is BlockCAT but in cryptocompare\n # Bitclave is BCAT and BlockCat is not supported\n 'CAT': 'BCAT',\n # For Rotkehlchen CET is CoinEX and CET-2 is DiceMoney but in cryptocompare\n # CoinEX is CET and DiceMoney is DICEM\n 'CET-2': 'DICEM',\n # For Rotkehlchen COS is Contentos but in cryptocompare it's CONT\n 'COS': 'CONT',\n # For Rotkehlchen CPC is CPChain and CPC-2 is CapriCoin but in cryptocompare\n # CPChain is CPCH and CapriCoin is CPC\n 'CPC': 'CPCH',\n 'CPC-2': 'CPC',\n # For Rotkehlchen CRC is CryCash and CRC-2 is CrowdCoin but in cryptocompare\n # Crycash is CRYC and CrowdCoin is CRC\n 'CRC': 'CRYC',\n 'CRC-2': 'CRC',\n # For Rotkehlchen CS is Credits but it's CRDTS in cryptocompare\n 'CS': 'CRDTS',\n # For Rotkehlchen CTX-2 is CarTaxi but it's CTX in cryptocompare\n 'CTX-2': 'CTX',\n # For Rotkehlchen DOW is DOW Coin Chain but it's Dow in cryptocompare\n 'DOW': 'Dow',\n # For Rotkehlchen EPY is Emphy Coin but it's EMPH in cryptocompare\n 'EPY': 'EMPHY',\n # For Rotkehlchen ERT is Eristica Coin but it's ERIS in cryptocompare\n 'ERT': 'ERIS',\n # For Rotkehlchen EVN is Envion and EVN-2 is EvenCoin, but in cryptocompare\n # Evencoin is EVENC\n 'EVN-2': 'EVENC',\n # For Rotkehlchen EXC is ExcaliburCoin and EXC-2 is EximChain Token but in\n # cryptocompare EXC is EximChain Token ans ExcaliburCoin is not supported\n 'EXC-2': 'EXC',\n # For Rotkehlchen FLX is Bitflux but it's FLX* in cryptocompare\n 'FLX': 'FLX*',\n # For Rotkehlchen FORK is ForkCoin and FORK-2 is GastroAdvisor. For\n # cryptocompare only GastroAdvisor exists as FORK.\n 'FORK-2': 'FORK',\n # For Rotkehlchen GBX is GoByte and GBX-2 is Globitex but in cryptocompare\n # Globitex is GBXT\n 'GBX-2': 'GBXT',\n # For Rotkehlchen GEN is Daostack but it's GENS in cryptocompare\n 'GEN': 'GENS',\n # For Rotkehlchen GENE is ParkGene and GENE-2 is Gene Source Code Chain,\n # in cryptocompare GENE-2 is GENE*\n 'GENE-2': 'GENE*',\n # For Rotkehlchen GOT is Go Network Token and GOT-2 is ParkinGo, cryptocompare\n # does not have ParkinGO and Go Network Token is GTK\n 'GOT': 'GTK',\n # For Rotkehlchen HMC is Hi Mutual Society and HMC-2 is Harmony Coin, in\n # cryptocompare HMC is the same but HMC* is (perhaps) Harmony Coin\n 'HMC-2': 'HMC*',\n # For Rotkehlchen INV is Invacio but it's INVC in cryptocompare\n 'INV': 'INVC',\n # For Rotkehlchen JOY is Joy but it's JOY* in cryptocompare\n 'JOY': 'JOY*',\n # For Rotkehlchen LNC is Blocklancer and LNC-2 is Linker Coin, but for\n # cryptocompare linker coin is LNKC\n 'LNC-2': 'LNKC',\n # For Rotkehlchen LOC is LockTrip but in cryptocompare it's LOCK\n 'LOC': 'LOCK',\n # For Rotkehlchen MAN is Matrix AI Network but in cryptocompare it's MXAI\n 'MAN': 'MXAI',\n # For Rotkehlchen MDT is Measurable Data Token but in cryptocompare it's MSDT\n 'MDT': 'MSDT',\n # For Rotkehlchen MNT is Media Network Token but in cryptocompare it's MNT*\n 'MNT': 'MNT*',\n # For Rotkehlchen MRP is MoneyReel but in cryptocompare it's MNRB\n 'MRP': 'MNRB',\n # For Rotkehlchen MTC is doc.com Token and MTC-2 is Mesh Network but in\n # cryptocompare Mesh Network is MTCMN\n 'MTC-2': 'MTCMN',\n # For Rotkehlchen MTN is Medical Token but it's MDCL in cryptocompare\n 'MTN': 'MDCL',\n # For Rotkehlchen OCC-2 is Original Cryptocoin but it's OCC in cryptocompare\n 'OCC-2': 'OCC',\n # For Rotkehlchen ORS is OriginSport Token and ORS-2 is ORS group, but in\n # cryptocompare OriginSport Token is OGSP and ORS Group is ORS\n 'ORS': 'OGSP',\n 'ORS-2': 'ORS',\n # For Rotkehlchen PRE is Presearch but it's SRCH in cryptocompare\n 'PRE': 'SRCH',\n # For Rotkehlchen PLA is Plair and PLA-2 is Playchip, but in cryptocompare\n # PLA is Playchip and Plair is PLAI\n 'PLA': 'PLAI',\n 'PLA-2': 'PLA',\n # For Rotkehlchen RDN is Raiden Network but it's RDNN in cryptocompare\n 'RDN': 'RDNN',\n # For Rotkehlchen SKB is SakuraBloom but it's SKRB in cryptocompare\n 'SKB': 'SKRB',\n # For Rotkehlchen SKR is SkrillaToken but it's SKR* in cryptocompare\n 'SKR': 'SKRT',\n # For Rotkehlchen SMART is SmartCash, and SMART-2 is SmartBillions, but in\n # cryptocompare SmartBillions is SMART*\n 'SMART-2': 'SMART*',\n # For Rotkehlchen SOUL is Phantasma and SOUL-2 is CryptoSoul. But cryptocompare\n # only has Phantasma as GOST\n 'SOUL': 'GOST',\n # For Rotkehlchen SPD is Spindle and SPD-2 is Stipend, but in cryptocompare\n # Spindle is SPND and Stipend is SPD\n 'SPD': 'SPND',\n 'SPD-2': 'SPD',\n # For Rotkehlchen SPX is Sp8de Token but it's SPCIE in cryptocompare\n 'SPX': 'SPCIE',\n # For Rotkehlchen STRC is Star Credits but it's SRC* in cryptocompare\n 'STRC': 'SRC*',\n # For Rotkehlchen TCH is ThoreCash and TCH-2 is TigerCash but cryptocompare\n # only has TigerCash as TCH\n 'TCH-2': 'TCH',\n # For Rotkehlchen TEAM is TokenStars Team but cryptocompare has it as TEAMT\n 'TEAM': 'TEAMT',\n # For Rotkehlchen VSF is Verisafe but it's CPLO in cryptocompare (the old name)\n 'VSF': 'CPLO',\n # For Rotkehlchen WEB is Webcoin and WEB-2 Webchain, but in cryptocompare\n # Webchain is WEBC\n 'WEB-2': 'WEBC',\n # For Rotkehlchen WIN is Winchain Token and WIN-2 WCoin, but in cryptocompare\n # Wcoin is WIN and there is no Winchain Token\n 'WIN-2': 'WIN',\n # For Rotkehlchen BlitzPredict is XBP but it's BPX in cryptocompare\n 'XBP': 'BPX',\n # For Cryptocompare PHX has not been updated to PHB\n 'PHB': 'PHX',\n}\n\n# TODO: For the ones missing from cryptocompare make sure to also\n# disallow price queries to cryptocompare for these assets\nKNOWN_TO_MISS_FROM_CRYPTOCOMPARE = (\n # This is just kraken's internal fee token\n 'KFEE',\n # This is just bittrex's internal credit token\n 'BTXCRD',\n # For us ACH is the Altcoin Herald token. For cryptocompare it's\n # Achievecoin\n # https://www.cryptocompare.com/coins/ach/overview\n 'ACH',\n # We got APH as Aphelion and APH-2 as a very shortlived Aphrodite coin\n # Cryptocompare has no data for Aphrodite coin\n 'APH-2',\n # Atomic coin (https://coinmarketcap.com/currencies/atomic-coin/) is not in\n # cryptocompare but is in paprika\n 'ATOM-2',\n # BORA (https://coinmarketcap.com/currencies/bora/)\n # is not in cryptocompare but is in paprika\n 'BORA',\n # BOXX (https://coinmarketcap.com/currencies/blockparty-boxx-token/)\n # is not in cryptocompare but is in paprika\n 'BOXX',\n # Block.Money is not in cryptocompare but it's in coin paprika\n # https://coinmarketcap.com/currencies/bloc-money/\n 'BLOC-2',\n # BTCTalkCoin is not in cryptocompare but it's in coin paprika\n # https://api.coinpaprika.com/v1/coins/talk-btctalkcoin and in coinmarketcap\n # https://coinmarketcap.com/currencies/btctalkcoin/#charts\n 'TALK',\n # CCN is CustomContractNetwork in Rotkehlchen but Cannacoin in cryptocompare\n # and cryptocompare does not have data for CustomContractNetwork\n 'CCN',\n # Dreamcoin (https://coinmarketcap.com/currencies/dreamcoin/#charts) is not\n # in cryptocompare.\n 'DRM',\n # KEY (bihu) (https://coinmarketcap.com/currencies/key/) is not in\n # cryptocompare. But it's in paprika\n 'KEY-2',\n # MRS (Marginless) is not in cryptocompare. There is a coin with that\n # symbol there, but it's the MARScoin\n 'MRS',\n # PRcoin, known as PRC-2 in Rotkehlcen has no data in cryptocompare\n 'PRC-2',\n # Wiki coin/token is not in cryptocompare but is in paprika wiki-wiki-token\n 'WIKI',\n # More token (https://coinmarketcap.com/currencies/more-coin/) is not in\n # cryptocompare but is in paprika\n 'MORE',\n # Mithril Ore token (https://coinmarketcap.com/currencies/mithril-ore/) is not in\n # cryptocompare but is in paprika\n 'MORE-2',\n # Aidus Token (https://coinmarketcap.com/currencies/aidus-token/) is not in\n # cryptocompare but is in paprika\n 'AID-2',\n # Cashbery coin (https://coinmarketcap.com/currencies/cashbery-coin/) is not\n # in cryptocompare but is in paprika\n 'CBC-2',\n # Cyber movie chain (https://coinmarketcap.com/currencies/cyber-movie-chain/)\n # is not in cryptocompare but is in paprika\n 'CMCT-2',\n # Moss (https://coinmarketcap.com/currencies/moss-coin/)\n # is not in cryptocompare but is in paprika\n 'MOC',\n # Solve.care (https://coinmarketcap.com/currencies/solve/) is not\n # in cryptocompare but is in paprika\n 'SOLVE',\n # Stronghold USD (https://coinmarketcap.com/currencies/stronghold-usd/)\n # is not in cryptocompare but is in paprika\n 'USDS-2',\n # HXRO (https://coinmarketcap.com/currencies/hxro/)\n # is not in cryptocompare but is in paprika\n 'HXRO',\n # SERV (https://coinmarketcap.com/currencies/serve/)\n # is not in cryptocompare but is in paprika\n 'SERV',\n # TTC (https://coinmarketcap.com/currencies/ttc-protocol/)\n # is not in cryptocompare but is in paprika\n # There is a \"titcoin\" as TTC in cryptocompare but that is wrong\n # https://www.cryptocompare.com/coins/ttc/overview\n 'TTC',\n # BlazeCoin (https://coinmarketcap.com/currencies/blazecoin/)\n # is not in cryptocompare but is in paprika\n 'BLZ-2',\n # Bitgem (https://coinmarketcap.com/currencies/bitgem/)\n # is not in cryptocompare but is in paprika\n 'BTG-2',\n # 1SG (https://coinmarketcap.com/currencies/1sg/)\n # is not in cryptocompare but is in paprika\n '1SG',\n # ACChain (https://coinmarketcap.com/currencies/acchain/)\n # is not in cryptocompare but is in paprika\n 'ACC-2',\n # PolyAI (https://coinmarketcap.com/currencies/poly-ai/)\n # is not in cryptocompare but is in paprika\n 'AI',\n # Akropolis (https://coinmarketcap.com/currencies/akropolis/)\n # is not in cryptocompare but is in paprika\n 'AKRO',\n # AiLink token (https://coinmarketcap.com/currencies/ailink-token/)\n # is not in cryptocompare but is in paprika\n 'ALI',\n # Bankcoin BCash (https://bankcoinbcash.com/)\n # is not in cryptocompare but is in paprika\n 'BCASH',\n # BitcapitalVendor (https://coinmarketcap.com/currencies/bitcapitalvendor/)\n # is not in cryptocompare but is in paprika\n 'BCV',\n # BitPark (https://coinmarketcap.com/currencies/bitpark-coin/)\n # is not in cryptocompare but is in paprika\n 'BITPARK',\n # BankCoin Cash (https://bankcoin-cash.com/)\n # is not in cryptocompare but is in paprika\n 'BKC',\n # Bionic (https://coinmarketcap.com/currencies/bionic/)\n # is not in cryptocompare but is in paprika\n 'BNC',\n # BrokerNekoNetwork (https://coinmarketcap.com/currencies/brokernekonetwork/)\n # is not in cryptocompare but is in paprika\n 'BNN',\n # BoxToken (https://coinmarketcap.com/currencies/contentbox/)\n # is not in cryptocompare but is in paprika\n 'BOX',\n # BitcoinOne (https://coinmarketcap.com/currencies/bitcoin-one/)\n # is not in cryptocompare but is in paprika\n 'BTCONE',\n # BitcoinToken (https://coinmarketcap.com/currencies/bitcoin-token/)\n # is not in cryptocompare but is in paprika\n 'BTK',\n # Bitether (https://coinmarketcap.com/currencies/bitether/)\n # is not in cryptocompare but is in paprika\n 'BTR',\n # Blue whale token (https://coinmarketcap.com/currencies/blue-whale-token/)\n # is not in cryptocompare but is in paprika\n 'BWX',\n # Carboneum (https://coinmarketcap.com/currencies/carboneum-c8-token/)\n # is not in cryptocompare but is in paprika\n 'C8',\n # Cloudbrid (https://www.cloudbric.io/)\n # is not in cryptocompare but is in paprika\n 'CLB',\n # COCOS-BCX (https://coinmarketcap.com/currencies/cocos-bcx/)\n # is not in cryptocompare but is in paprika\n 'COCOS',\n # CruiseBit (https://coinmarketcap.com/currencies/cruisebit/)\n # is not in cryptocompare but is in paprika\n 'CRBT',\n # Cryptosolartech (https://coinmarketcap.com/currencies/cryptosolartech/)\n # is not in cryptocompare but is in paprika\n 'CST',\n # Centauri (https://coinmarketcap.com/currencies/centauri/)\n # is not in cryptocompare but is in paprika\n 'CTX',\n # CyberFM (https://coinmarketcap.com/currencies/cyberfm/)\n # is not in cryptocompare but is in paprika\n 'CYFM',\n # CyberMusic (https://coinmarketcap.com/currencies/cybermusic/)\n # is not in cryptocompare but is in paprika\n 'CYMT',\n # CanonChain (https://coinmarketcap.com/currencies/cononchain/)\n # is not in cryptocompare but is in paprika\n 'CZR',\n # DACSEE (https://coinmarketcap.com/currencies/dacsee/)\n # is not in cryptocompare but is in paprika\n 'DACS',\n # Dalecoin (https://coinmarketcap.com/currencies/dalecoin/)\n # is not in cryptocompare but is in paprika\n 'DALC',\n # Digital Assets Exchange token\n # (https://coinmarketcap.com/currencies/digital-asset-exchange-token/)\n # is not in cryptocompare but is in paprika\n 'DAXT',\n # Deltachain (https://coinmarketcap.com/currencies/delta-chain/)\n # is not in cryptocompare but is in paprika\n 'DELTA',\n # Dew (https://coinmarketcap.com/currencies/dew/)\n # is not in cryptocompare but is in paprika\n 'DEW',\n # DEX (https://coinmarketcap.com/currencies/dex/)\n # is not in cryptocompare but is in paprika\n 'DEX',\n # DragonGlass (https://coinmarketcap.com/currencies/dragonglass/)\n # is not in cryptocompare but is in paprika\n 'DGS',\n # DigitalInsuranceToken (https://coinmarketcap.com/currencies/digital-insurance-token/)\n # is not in cryptocompare but is in paprika\n 'DIT',\n # DigitalTicks (https://www.coingecko.com/en/coins/digital-ticks) is not in\n # cryptocompate but is in paprika\n 'DTX-2',\n # E4Row (https://coinmarketcap.com/currencies/ether-for-the-rest-of-the-world/) is not in\n # cryptocompare but is in paprika\n 'E4ROW',\n # EAGLE (https://coinmarketcap.com/currencies/eaglecoin/) is not in\n # cryptocompare but is in paprika\n 'EAGLE',\n # OpenSource university (https://os.university/) is not in\n # cryptocompare but is in paprika\n 'EDU-2',\n # ExcaliburCoin (https://coinmarketcap.com/currencies/excaliburcoin/) is not\n # in cryptocompare but is in paprika\n 'EXC',\n # Fingerprint (https://fingerprintcoin.org/) is not\n # in cryptocompare but is in paprika\n 'FGP',\n # Formosa Fincial Token (https://coinmarketcap.com/currencies/formosa-financial/)\n # is not in cryptocompare but is in paprika\n 'FMF',\n # Fcoin token (https://coinmarketcap.com/currencies/ftoken/)\n # is not in cryptocompare but is in paprika\n 'FT-2',\n # Futurax (https://coinmarketcap.com/currencies/futurax/)\n # is not in cryptocompare but is in paprika\n 'FTXT',\n # FunctionX (https://coinmarketcap.com/currencies/function-x/)\n # is not in cryptocompare but is in paprika\n 'FX',\n # Flexacoin (https://coinmarketcap.com/currencies/flexacoin/)\n # is not in cryptocompare but is in paprika\n 'FXC',\n # Themis GET (https://coinmarketcap.com/currencies/themis/)\n # is not in cryptocompare but is in paprika\n 'GET-2',\n # ParkinGO (https://coinmarketcap.com/currencies/parkingo/)\n # is not in cryptocompare but is in paprika\n 'GOT-2',\n # GSENetwork (https://coinmarketcap.com/currencies/gsenetwork/)\n # is not in cryptocompare but is in paprika\n 'GSE',\n # Jury.Online Token (https://coinmarketcap.com/currencies/jury-online-token/)\n # is not in cryptocompare but is in paprika\n 'JOT',\n # KanadeCoin (https://coinmarketcap.com/currencies/kanadecoin/)\n # is not in cryptocompare but is in paprika\n 'KNDC',\n # KoraNetworkToken (https://coinmarketcap.com/currencies/kora-network-token/)\n # is not in cryptocompare but is in paprika\n 'KNT',\n # Knekted (https://coinmarketcap.com/currencies/knekted/)\n # is not in cryptocompare but is in paprika\n 'KNT-2',\n # 4NEW KWATT (https://coinmarketcap.com/currencies/4new/)\n # is not in cryptocompare but is in paprika\n 'KWATT',\n # Liquorchain Token (https://etherscan.io/address/0x4A37A91eec4C97F9090CE66d21D3B3Aadf1aE5aD)\n # is not in cryptocompare but is in paprika\n 'LCT-2',\n # LemoChain (https://coinmarketcap.com/currencies/lemochain/)\n # is not in cryptocompare but is in paprika\n 'LEMO',\n # Linkey (https://coinmarketcap.com/currencies/linkey/)\n # is not in cryptocompare but is in paprika\n 'LKY',\n # Lisk Machine Learning (https://coinmarketcap.com/currencies/lisk-machine-learning/)\n # is not in cryptocompare but is in paprika\n 'LML',\n # Locus Chain (https://etherscan.io/address/0xC64500DD7B0f1794807e67802F8Abbf5F8Ffb054)\n # is not in cryptocompare but is in paprika\n 'LOCUS',\n # LUNA Terra (https://coinmarketcap.com/currencies/terra/)\n # is not in cryptocompare but is in paprika\n 'LUNA-2',\n # Midas Protocol (https://coinmarketcap.com/currencies/midasprotocol/)\n # is not in cryptocompare but is in paprika\n 'MAS',\n # Matic (https://coinmarketcap.com/currencies/matic-network/)\n # is not in cryptocompare but is in paprika\n 'MATIC',\n # Meshbox (https://coinlib.io/coin/MESH/MeshBox)\n # is not in cryptocompare but is in paprika\n 'MESH',\n # Nami ICO (https://etherscan.io/address/0x8d80de8A78198396329dfA769aD54d24bF90E7aa)\n # is not in cryptocompate but is in paprika\n 'NAC',\n # For Rotkehlchen NCC is neurochain and NCC-2 is NeedsCoin and neither of them\n # is in cryptocompare but they are both in paprika\n 'NCC',\n 'NCC-2',\n # NDEX (https://coinmarketcap.com/currencies/ndex/)\n # is not in cryptocompare but is in paprika\n 'NDX',\n # NetKoin (https://coinmarketcap.com/currencies/netkoin/)\n # is not in cryptocompare but is in paprika\n 'NTK-2',\n # Nuggets (https://coinmarketcap.com/currencies/nuggets/)\n # is not in cryptocompare but is in paprika\n 'NUG',\n # OCtoin (https://coinmarketcap.com/currencies/octoin-coin/)\n # is not in cryptocompare but is in paprika\n 'OCC',\n # OptiToken (https://coinmarketcap.com/currencies/optitoken/)\n # is not in cryptocompare but is in paprika\n 'OPTI',\n # Wisepass (https://coinmarketcap.com/currencies/wisepass/)\n # is not in cryptocompare but is in paprika\n 'PASS-2',\n # Kleros (https://coinmarketcap.com/currencies/kleros/)\n # is not in cryptocompare but is in paprika\n # Note: Cryptocompare has SteamPunk as PNK ...\n 'PNK',\n # For Rotkehlchen POP is PopularCoin, and POP-2 is POP Chest Token, but in\n # cryptocompare POP Chest appears also as POP so I can only assume it's not\n # supported https://www.cryptocompare.com/coins/popc/overview\n 'POP-2',\n # Foresting (https://coinmarketcap.com/currencies/pton/)\n # is not in cryptocompare but is in paprika\n 'PTON',\n # Proton (https://coinmarketcap.com/currencies/proton-token/)\n # is not in cryptocompare but is in paprika. Cryptocompare has\n # Pink Taxi Token as PTT.\n 'PTT',\n # Pixel (https://coinmarketcap.com/currencies/pixel/)\n # is not in cryptocompare but is in paprika. Cryptocompare hasattr\n # Phalanx as PXL\n 'PXL',\n # Rublix (https://coinmarketcap.com/currencies/rublix/)\n # is not in cryptocompare but is in paprika\n 'RBLX',\n # Red Token (https://coinmarketcap.com/currencies/red/)\n # is not in cryptocompare but is in paprika\n 'RED',\n # Rusgas (https://coinmarketcap.com/currencies/rusgas/)\n # is not in cryptocompare but is in paprika\n 'RGS',\n # RemiCoin (https://coinmarketcap.com/currencies/remicoin/)\n # is not in cryptocompare but is in paprika\n 'RMC',\n # Rotharium (https://coinmarketcap.com/currencies/rotharium/)\n # is not in cryptocompare but is in paprika\n 'RTH',\n # SmartApplicationChain (https://coinmarketcap.com/currencies/smart-application-chain/)\n # is not in cryptocompare but is in paprika\n 'SAC',\n # snowball (https://etherscan.io/address/0x198A87b3114143913d4229Fb0f6D4BCb44aa8AFF)\n # is not in cryptocompare but is in paprika\n 'SNBL',\n # Soniq (https://coinmarketcap.com/currencies/soniq/)\n # is not in cryptocompare but is in paprika\n 'SONIQ',\n # CryptoSoul (https://coinmarketcap.com/currencies/cryptosoul/)\n # is not in cryptocompare but is in paprika\n 'SOUL-2',\n # Spin Protocol (https://coinmarketcap.com/currencies/spin-protocol/)\n # is not in cryptocompare but is in paprika\n 'SPIN',\n # Staker (https://coinmarketcap.com/currencies/staker/)\n # is not in cryptocompare but is in paprika\n 'STR',\n # TigerCash (https://coinmarketcap.com/currencies/tigercash/)\n # is not in cryptocompare but is in paprika\n 'TCH',\n # TercetNetwork (https://etherscan.io/address/0x28d7F432d24ba6020d1cbD4f28BEDc5a82F24320)\n # is not in cryptocompare but is in paprika\n 'TCNX',\n # Temco (https://coinmarketcap.com/currencies/temco/)\n # is not in cryptocompare but is in paprika\n 'TEMCO',\n # ThingsChain (https://coinmarketcap.com/currencies/thingschain/)\n # is not in cryptocompare but is in paprika\n 'TIC',\n # Tokok (https://coinmarketcap.com/currencies/tokok/)\n # is not in cryptocompare but is in paprika\n 'TOK',\n # Uchain (https://coinmarketcap.com/currencies/uchain/)\n # is not in cryptocompare but is in paprika\n 'UCN',\n # Veriblock (https://coinmarketcap.com/currencies/veriblock/)\n # is not in cryptocompare but is in paprika\n 'VBK',\n # Bitcoin Card (https://etherscan.io/address/0x9a9bB9b4b11BF8eccff84B58a6CCCCD4058A7f0D)\n # is not in cryptocompare but is in paprika\n 'VD',\n # VeriDocGlobal (https://coinmarketcap.com/currencies/veridocglobal/)\n # is not in cryptocompare but is in paprika\n 'VDG',\n # Vikky Token (https://coinmarketcap.com/currencies/vikkytoken/)\n # is not in cryptocompare but is in paprika\n 'VIKKY',\n # Wibson (https://coinmarketcap.com/currencies/wibson/)\n # is not in cryptocompare but is in paprika\n 'WIB',\n # Winchain Token (https://coinmarketcap.com/currencies/wintoken/)\n # is not in cryptocompare but is in paprika\n 'WIN',\n # Yggdrash (https://coinmarketcap.com/currencies/yeed/)\n # is not in cryptocompare but is in paprika\n 'YEED',\n # ZeusNetwork (https://coinmarketcap.com/currencies/zeusnetwork/)\n # is not in cryptocompare but is in paprika\n 'ZEUS',\n # BlockCat (https://coinmarketcap.com/currencies/blockcat/)\n # is not in cryptocompare but is in paprika\n 'CAT-2',\n)\n", "path": "rotkehlchen/constants/cryptocompare.py" } ]
diff --git a/docs/changelog.rst b/docs/changelog.rst index 6ec1bbfcd7..77f212c622 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,7 @@ Changelog ========= +* :bug:`500` Fix cryptocompare price queries for LBRY credits. * :feature:`-` Support WorldWideAssetExchange token for Bittrex after it got renamed to `WAXP <https://international.bittrex.com/Market/Index?MarketName=BTC-WAXP>`__ in that exchange. * :feature:`-` Added support for the following tokens diff --git a/rotkehlchen/constants/cryptocompare.py b/rotkehlchen/constants/cryptocompare.py index 619a895b94..9b6d210292 100644 --- a/rotkehlchen/constants/cryptocompare.py +++ b/rotkehlchen/constants/cryptocompare.py @@ -1,4 +1,5 @@ WORLD_TO_CRYPTOCOMPARE = { + 'LBRY': 'LBC', 'DATAcoin': 'DATA', 'IOTA': 'MIOTA', 'XRB': 'NANO',
typeddjango__django-stubs-390
[email protected] is out We need to test if everything works on this new version and update the dependency.
[ { "content": "import os\nfrom distutils.core import setup\nfrom typing import List\n\nfrom setuptools import find_packages\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, dirs, files in os.walk(name):\n for file in files:\n if file.endswith('.pyi'):\n if os.path.sep in root:\n sub_root = root.split(os.path.sep, 1)[-1]\n file = os.path.join(sub_root, file)\n result.append(file)\n return result\n\n\nwith open('README.md', 'r') as f:\n readme = f.read()\n\ndependencies = [\n 'mypy>=0.770,<0.780',\n 'typing-extensions',\n 'django',\n]\n\nsetup(\n name=\"django-stubs\",\n version=\"1.5.0\",\n description='Mypy stubs for Django',\n long_description=readme,\n long_description_content_type='text/markdown',\n license='MIT',\n url=\"https://github.com/typeddjango/django-stubs\",\n author=\"Maksim Kurnikov\",\n author_email=\"[email protected]\",\n py_modules=[],\n python_requires='>=3.6',\n install_requires=dependencies,\n packages=['django-stubs', *find_packages(exclude=['scripts'])],\n package_data={'django-stubs': find_stub_files('django-stubs')},\n classifiers=[\n 'Development Status :: 3 - Alpha',\n 'License :: OSI Approved :: MIT License',\n 'Programming Language :: Python :: 3.6',\n 'Programming Language :: Python :: 3.7'\n ],\n project_urls={\n 'Release notes': 'https://github.com/typeddjango/django-stubs/releases',\n },\n)\n", "path": "setup.py" } ]
[ { "content": "import os\nfrom distutils.core import setup\nfrom typing import List\n\nfrom setuptools import find_packages\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, dirs, files in os.walk(name):\n for file in files:\n if file.endswith('.pyi'):\n if os.path.sep in root:\n sub_root = root.split(os.path.sep, 1)[-1]\n file = os.path.join(sub_root, file)\n result.append(file)\n return result\n\n\nwith open('README.md', 'r') as f:\n readme = f.read()\n\ndependencies = [\n 'mypy>=0.780,<0.790',\n 'typing-extensions',\n 'django',\n]\n\nsetup(\n name=\"django-stubs\",\n version=\"1.5.0\",\n description='Mypy stubs for Django',\n long_description=readme,\n long_description_content_type='text/markdown',\n license='MIT',\n url=\"https://github.com/typeddjango/django-stubs\",\n author=\"Maksim Kurnikov\",\n author_email=\"[email protected]\",\n py_modules=[],\n python_requires='>=3.6',\n install_requires=dependencies,\n packages=['django-stubs', *find_packages(exclude=['scripts'])],\n package_data={'django-stubs': find_stub_files('django-stubs')},\n classifiers=[\n 'Development Status :: 3 - Alpha',\n 'License :: OSI Approved :: MIT License',\n 'Programming Language :: Python :: 3.6',\n 'Programming Language :: Python :: 3.7'\n ],\n project_urls={\n 'Release notes': 'https://github.com/typeddjango/django-stubs/releases',\n },\n)\n", "path": "setup.py" } ]
diff --git a/README.md b/README.md index 86bf7d9a2..b9d25f7fd 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,9 @@ We rely on different `django` and `mypy` versions: | django-stubs | mypy version | django version | python version | ------------ | ---- | ---- | ---- | -| 1.3.0 | 0.750 | 2.2.x | ^3.6 +| 1.5.0 | 0.780 | 2.2.x \|\| 3.x | ^3.6 +| 1.4.0 | 0.770 | 2.2.x \|\| 3.x | ^3.6 +| 1.3.0 | 0.750 | 2.2.x \|\| 3.x | ^3.6 | 1.2.0 | 0.730 | 2.2.x | ^3.6 | 1.1.0 | 0.720 | 2.2.x | ^3.6 | 0.12.x | old semantic analyzer (<0.711), dmypy support | 2.1.x | ^3.6 diff --git a/dev-requirements.txt b/dev-requirements.txt index 37b27957c..a845f69ce 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,5 @@ black -pytest-mypy-plugins==1.2.0 +pytest-mypy-plugins==1.3.0 psycopg2 flake8==3.7.9 flake8-pyi==19.3.0 diff --git a/scripts/enabled_test_modules.py b/scripts/enabled_test_modules.py index 4e0197841..49e519e66 100644 --- a/scripts/enabled_test_modules.py +++ b/scripts/enabled_test_modules.py @@ -185,6 +185,8 @@ ], 'files': [ 'Incompatible types in assignment (expression has type "IOBase", variable has type "File")', + 'Argument 1 to "TextIOWrapper" has incompatible type "File"; expected "BinaryIO"', + 'Incompatible types in assignment (expression has type "BinaryIO", variable has type "File")', ], 'filtered_relation': [ 'has no attribute "name"', @@ -378,6 +380,7 @@ 'responses': [ 'Argument 1 to "TextIOWrapper" has incompatible type "HttpResponse"; expected "IO[bytes]"', '"FileLike" has no attribute "closed"', + 'Argument 1 to "TextIOWrapper" has incompatible type "HttpResponse"; expected "BinaryIO"', ], 'reverse_lookup': [ "Cannot resolve keyword 'choice' into field" diff --git a/scripts/tests_extension_hook.py b/scripts/tests_extension_hook.py index f69d03410..228cc7675 100644 --- a/scripts/tests_extension_hook.py +++ b/scripts/tests_extension_hook.py @@ -1,5 +1,5 @@ -from pytest_mypy.collect import File -from pytest_mypy.item import YamlTestItem +from pytest_mypy_plugins.collect import File +from pytest_mypy_plugins.item import YamlTestItem def django_plugin_hook(test_item: YamlTestItem) -> None: diff --git a/setup.py b/setup.py index e66ed3c2c..b915b92d1 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ def find_stub_files(name: str) -> List[str]: readme = f.read() dependencies = [ - 'mypy>=0.770,<0.780', + 'mypy>=0.780,<0.790', 'typing-extensions', 'django', ]
CTFd__CTFd-796
Not possible to download files as anonymous user **Environment**: - CTFd Version/Commit: 2.0.0 from master - Operating System: Debian Stretch, Ubuntu 18.04, ... - Web Browser and Version: Firefox 63 **What happened?** * In admin, set visibility of challenges to public * Logout * Open challenge view (`/challenges`) * Click on a challenge with a file * Try to download the file (`/files/c378d661d2c9e103c4409cd4c92d801f/alice_bob.py` * => Error 403 **What did you expect to happen?** * ... * Click on a challenge with a file * Try to download the file * File downloads **How to reproduce your issue** _see above_ **Any associated stack traces or error logs** _none_
[ { "content": "import sys\nimport os\n\nfrom distutils.version import StrictVersion\nfrom flask import Flask\nfrom werkzeug.contrib.fixers import ProxyFix\nfrom jinja2 import FileSystemLoader\nfrom jinja2.sandbox import SandboxedEnvironment\nfrom six.moves import input\n\nfrom CTFd import utils\nfrom CTFd.utils.migrations import migrations, migrate, upgrade, stamp, create_database\nfrom CTFd.utils.sessions import CachingSessionInterface\nfrom CTFd.utils.updates import update_check\nfrom CTFd.utils.initialization import init_request_processors, init_template_filters, init_template_globals\nfrom CTFd.utils.events import socketio\nfrom CTFd.plugins import init_plugins\n\n# Hack to support Unicode in Python 2 properly\nif sys.version_info[0] < 3:\n reload(sys)\n sys.setdefaultencoding(\"utf-8\")\n\n__version__ = '2.0.0'\n\n\nclass CTFdFlask(Flask):\n def __init__(self, *args, **kwargs):\n \"\"\"Overriden Jinja constructor setting a custom jinja_environment\"\"\"\n self.jinja_environment = SandboxedBaseEnvironment\n self.session_interface = CachingSessionInterface(key_prefix='session')\n Flask.__init__(self, *args, **kwargs)\n\n def create_jinja_environment(self):\n \"\"\"Overridden jinja environment constructor\"\"\"\n return super(CTFdFlask, self).create_jinja_environment()\n\n\nclass SandboxedBaseEnvironment(SandboxedEnvironment):\n \"\"\"SandboxEnvironment that mimics the Flask BaseEnvironment\"\"\"\n def __init__(self, app, **options):\n if 'loader' not in options:\n options['loader'] = app.create_global_jinja_loader()\n # Disable cache entirely so that themes can be switched (#662)\n # If the cache is enabled, switching themes will cause odd rendering errors\n SandboxedEnvironment.__init__(self, cache_size=0, **options)\n self.app = app\n\n\nclass ThemeLoader(FileSystemLoader):\n \"\"\"Custom FileSystemLoader that switches themes based on the configuration value\"\"\"\n def __init__(self, searchpath, encoding='utf-8', followlinks=False):\n super(ThemeLoader, self).__init__(searchpath, encoding, followlinks)\n self.overriden_templates = {}\n\n def get_source(self, environment, template):\n # Check if the template has been overriden\n if template in self.overriden_templates:\n return self.overriden_templates[template], template, True\n\n # Check if the template requested is for the admin panel\n if template.startswith('admin/'):\n template = template[6:] # Strip out admin/\n template = \"/\".join(['admin', 'templates', template])\n return super(ThemeLoader, self).get_source(environment, template)\n\n # Load regular theme data\n theme = utils.get_config('ctf_theme')\n template = \"/\".join([theme, 'templates', template])\n return super(ThemeLoader, self).get_source(environment, template)\n\n\ndef confirm_upgrade():\n if sys.stdin.isatty():\n print(\"/*\\\\ CTFd has updated and must update the database! /*\\\\\")\n print(\"/*\\\\ Please backup your database before proceeding! /*\\\\\")\n print(\"/*\\\\ CTFd maintainers are not responsible for any data loss! /*\\\\\")\n if input('Run database migrations (Y/N)').lower().strip() == 'y':\n return True\n else:\n print('/*\\\\ Ignored database migrations... /*\\\\')\n return False\n else:\n return True\n\n\ndef run_upgrade():\n upgrade()\n utils.set_config('ctf_version', __version__)\n\n\ndef create_app(config='CTFd.config.Config'):\n app = CTFdFlask(__name__)\n with app.app_context():\n app.config.from_object(config)\n\n theme_loader = ThemeLoader(os.path.join(app.root_path, 'themes'), followlinks=True)\n app.jinja_loader = theme_loader\n\n from CTFd.models import db, Teams, Solves, Challenges, Fails, Flags, Tags, Files, Tracking\n\n url = create_database()\n\n # This allows any changes to the SQLALCHEMY_DATABASE_URI to get pushed back in\n # This is mostly so we can force MySQL's charset\n app.config['SQLALCHEMY_DATABASE_URI'] = str(url)\n\n # Register database\n db.init_app(app)\n\n # Register Flask-Migrate\n migrations.init_app(app, db)\n\n # Alembic sqlite support is lacking so we should just create_all anyway\n if url.drivername.startswith('sqlite'):\n db.create_all()\n stamp()\n else:\n # This creates tables instead of db.create_all()\n # Allows migrations to happen properly\n upgrade()\n\n from CTFd.models import ma\n\n ma.init_app(app)\n\n app.db = db\n app.VERSION = __version__\n\n from CTFd.cache import cache\n\n cache.init_app(app)\n app.cache = cache\n\n # If you have multiple workers you must have a shared cache\n socketio.init_app(\n app,\n async_mode=app.config.get('SOCKETIO_ASYNC_MODE'),\n message_queue=app.config.get('CACHE_REDIS_URL')\n )\n\n if app.config.get('REVERSE_PROXY'):\n app.wsgi_app = ProxyFix(app.wsgi_app)\n\n version = utils.get_config('ctf_version')\n\n # Upgrading from an older version of CTFd\n if version and (StrictVersion(version) < StrictVersion(__version__)):\n if confirm_upgrade():\n run_upgrade()\n else:\n exit()\n\n if not version:\n utils.set_config('ctf_version', __version__)\n\n if not utils.get_config('ctf_theme'):\n utils.set_config('ctf_theme', 'core')\n\n update_check(force=True)\n\n init_request_processors(app)\n init_template_filters(app)\n init_template_globals(app)\n\n # Importing here allows tests to use sensible names (e.g. api instead of api_bp)\n from CTFd.views import views\n from CTFd.teams import teams\n from CTFd.users import users\n from CTFd.challenges import challenges\n from CTFd.scoreboard import scoreboard\n from CTFd.auth import auth\n from CTFd.admin import admin\n from CTFd.api import api\n from CTFd.events import events\n from CTFd.errors import page_not_found, forbidden, general_error, gateway_error\n\n app.register_blueprint(views)\n app.register_blueprint(teams)\n app.register_blueprint(users)\n app.register_blueprint(challenges)\n app.register_blueprint(scoreboard)\n app.register_blueprint(auth)\n app.register_blueprint(api)\n app.register_blueprint(events)\n\n app.register_blueprint(admin)\n\n app.register_error_handler(404, page_not_found)\n app.register_error_handler(403, forbidden)\n app.register_error_handler(500, general_error)\n app.register_error_handler(502, gateway_error)\n\n init_plugins(app)\n\n return app\n", "path": "CTFd/__init__.py" } ]
[ { "content": "import sys\nimport os\n\nfrom distutils.version import StrictVersion\nfrom flask import Flask\nfrom werkzeug.contrib.fixers import ProxyFix\nfrom jinja2 import FileSystemLoader\nfrom jinja2.sandbox import SandboxedEnvironment\nfrom six.moves import input\n\nfrom CTFd import utils\nfrom CTFd.utils.migrations import migrations, migrate, upgrade, stamp, create_database\nfrom CTFd.utils.sessions import CachingSessionInterface\nfrom CTFd.utils.updates import update_check\nfrom CTFd.utils.initialization import init_request_processors, init_template_filters, init_template_globals\nfrom CTFd.utils.events import socketio\nfrom CTFd.plugins import init_plugins\n\n# Hack to support Unicode in Python 2 properly\nif sys.version_info[0] < 3:\n reload(sys)\n sys.setdefaultencoding(\"utf-8\")\n\n__version__ = '2.0.1'\n\n\nclass CTFdFlask(Flask):\n def __init__(self, *args, **kwargs):\n \"\"\"Overriden Jinja constructor setting a custom jinja_environment\"\"\"\n self.jinja_environment = SandboxedBaseEnvironment\n self.session_interface = CachingSessionInterface(key_prefix='session')\n Flask.__init__(self, *args, **kwargs)\n\n def create_jinja_environment(self):\n \"\"\"Overridden jinja environment constructor\"\"\"\n return super(CTFdFlask, self).create_jinja_environment()\n\n\nclass SandboxedBaseEnvironment(SandboxedEnvironment):\n \"\"\"SandboxEnvironment that mimics the Flask BaseEnvironment\"\"\"\n def __init__(self, app, **options):\n if 'loader' not in options:\n options['loader'] = app.create_global_jinja_loader()\n # Disable cache entirely so that themes can be switched (#662)\n # If the cache is enabled, switching themes will cause odd rendering errors\n SandboxedEnvironment.__init__(self, cache_size=0, **options)\n self.app = app\n\n\nclass ThemeLoader(FileSystemLoader):\n \"\"\"Custom FileSystemLoader that switches themes based on the configuration value\"\"\"\n def __init__(self, searchpath, encoding='utf-8', followlinks=False):\n super(ThemeLoader, self).__init__(searchpath, encoding, followlinks)\n self.overriden_templates = {}\n\n def get_source(self, environment, template):\n # Check if the template has been overriden\n if template in self.overriden_templates:\n return self.overriden_templates[template], template, True\n\n # Check if the template requested is for the admin panel\n if template.startswith('admin/'):\n template = template[6:] # Strip out admin/\n template = \"/\".join(['admin', 'templates', template])\n return super(ThemeLoader, self).get_source(environment, template)\n\n # Load regular theme data\n theme = utils.get_config('ctf_theme')\n template = \"/\".join([theme, 'templates', template])\n return super(ThemeLoader, self).get_source(environment, template)\n\n\ndef confirm_upgrade():\n if sys.stdin.isatty():\n print(\"/*\\\\ CTFd has updated and must update the database! /*\\\\\")\n print(\"/*\\\\ Please backup your database before proceeding! /*\\\\\")\n print(\"/*\\\\ CTFd maintainers are not responsible for any data loss! /*\\\\\")\n if input('Run database migrations (Y/N)').lower().strip() == 'y':\n return True\n else:\n print('/*\\\\ Ignored database migrations... /*\\\\')\n return False\n else:\n return True\n\n\ndef run_upgrade():\n upgrade()\n utils.set_config('ctf_version', __version__)\n\n\ndef create_app(config='CTFd.config.Config'):\n app = CTFdFlask(__name__)\n with app.app_context():\n app.config.from_object(config)\n\n theme_loader = ThemeLoader(os.path.join(app.root_path, 'themes'), followlinks=True)\n app.jinja_loader = theme_loader\n\n from CTFd.models import db, Teams, Solves, Challenges, Fails, Flags, Tags, Files, Tracking\n\n url = create_database()\n\n # This allows any changes to the SQLALCHEMY_DATABASE_URI to get pushed back in\n # This is mostly so we can force MySQL's charset\n app.config['SQLALCHEMY_DATABASE_URI'] = str(url)\n\n # Register database\n db.init_app(app)\n\n # Register Flask-Migrate\n migrations.init_app(app, db)\n\n # Alembic sqlite support is lacking so we should just create_all anyway\n if url.drivername.startswith('sqlite'):\n db.create_all()\n stamp()\n else:\n # This creates tables instead of db.create_all()\n # Allows migrations to happen properly\n upgrade()\n\n from CTFd.models import ma\n\n ma.init_app(app)\n\n app.db = db\n app.VERSION = __version__\n\n from CTFd.cache import cache\n\n cache.init_app(app)\n app.cache = cache\n\n # If you have multiple workers you must have a shared cache\n socketio.init_app(\n app,\n async_mode=app.config.get('SOCKETIO_ASYNC_MODE'),\n message_queue=app.config.get('CACHE_REDIS_URL')\n )\n\n if app.config.get('REVERSE_PROXY'):\n app.wsgi_app = ProxyFix(app.wsgi_app)\n\n version = utils.get_config('ctf_version')\n\n # Upgrading from an older version of CTFd\n if version and (StrictVersion(version) < StrictVersion(__version__)):\n if confirm_upgrade():\n run_upgrade()\n else:\n exit()\n\n if not version:\n utils.set_config('ctf_version', __version__)\n\n if not utils.get_config('ctf_theme'):\n utils.set_config('ctf_theme', 'core')\n\n update_check(force=True)\n\n init_request_processors(app)\n init_template_filters(app)\n init_template_globals(app)\n\n # Importing here allows tests to use sensible names (e.g. api instead of api_bp)\n from CTFd.views import views\n from CTFd.teams import teams\n from CTFd.users import users\n from CTFd.challenges import challenges\n from CTFd.scoreboard import scoreboard\n from CTFd.auth import auth\n from CTFd.admin import admin\n from CTFd.api import api\n from CTFd.events import events\n from CTFd.errors import page_not_found, forbidden, general_error, gateway_error\n\n app.register_blueprint(views)\n app.register_blueprint(teams)\n app.register_blueprint(users)\n app.register_blueprint(challenges)\n app.register_blueprint(scoreboard)\n app.register_blueprint(auth)\n app.register_blueprint(api)\n app.register_blueprint(events)\n\n app.register_blueprint(admin)\n\n app.register_error_handler(404, page_not_found)\n app.register_error_handler(403, forbidden)\n app.register_error_handler(500, general_error)\n app.register_error_handler(502, gateway_error)\n\n init_plugins(app)\n\n return app\n", "path": "CTFd/__init__.py" } ]
diff --git a/CHANGELOG.md b/CHANGELOG.md index af8d3d55c..7c1b60905 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,41 @@ -2.0.0 / 2018-12-2 +2.0.1 / 2018-12-09 +================== + +2.0.1 is a patch release to fix regressions and bugs in 2.0.0. + +If you are upgrading from a version prior to 2.0.0 please read the 2.0.0 change notes for instructions on updating to +2.0.0 before updating to 2.0.1. + +**General** +* Fix setting auth for `get_smtp()`. + * Add `MAIL_USEAUTH` to `config.py`. +* Add more mail documentation to `config.py`. +* Disable jinja cache properly by setting `cache_size` to 0 (#662) + Regression from 1.2.0. +* Fix downloading files as an anonymous user. +* Fix viewing challenges anonymously if they have empty requirements. Closes #789 + * Allow anonymous users to see see challenges with empty requirements or anonymized challenges +* Clean up admin mail settings to use new label/small structure +* Fix email confirmations and improve test. +* Fix password resets from double hashing passwords + +**Themes** +* Change `confirm.html` to use the variable user instead of team + +**API** +* Grant admin write access to verified field in UserSchema. +* Fix setting `mail_username`, `mail_password` +* Prevent overriding smtp attributes on config update +* Fix hint loading for admins by adding `/api/v1/hints/<id>?preview=true` for use by admins +* Fixing a bug where prerequisites could not be set for dynamic challenges due to a division by zero error where defaults were being set unnecessarily. + +**Exports** +* Fix syncing down an empty S3 bucket +* Fix `S3Uploader` in Python 3 and fix test +* Fix S3 sync function to only pull down files instead of trying to pull directories + + +2.0.0 / 2018-12-02 ================== 2.0.0 is a *significant*, backwards-incompaitble release. diff --git a/CTFd/__init__.py b/CTFd/__init__.py index 6dcd7fc1c..812d6e089 100644 --- a/CTFd/__init__.py +++ b/CTFd/__init__.py @@ -21,7 +21,7 @@ reload(sys) sys.setdefaultencoding("utf-8") -__version__ = '2.0.0' +__version__ = '2.0.1' class CTFdFlask(Flask):
typeddjango__django-stubs-414
Bump max mypy version I just updated `mypy` to `0.782` and got the following error: > ERROR: django-stubs 1.5.0 has requirement mypy<0.780,>=0.770, but you'll have mypy 0.782 which is incompatible. So far I have not encountered any issues despite this error (it still installed it regardless). Can the max version requirement be safely increased?
[ { "content": "import os\nfrom distutils.core import setup\nfrom typing import List\n\nfrom setuptools import find_packages\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, dirs, files in os.walk(name):\n for file in files:\n if file.endswith('.pyi'):\n if os.path.sep in root:\n sub_root = root.split(os.path.sep, 1)[-1]\n file = os.path.join(sub_root, file)\n result.append(file)\n return result\n\n\nwith open('README.md', 'r') as f:\n readme = f.read()\n\ndependencies = [\n 'mypy>=0.780,<0.790',\n 'typing-extensions',\n 'django',\n]\n\nsetup(\n name=\"django-stubs\",\n version=\"1.5.0\",\n description='Mypy stubs for Django',\n long_description=readme,\n long_description_content_type='text/markdown',\n license='MIT',\n url=\"https://github.com/typeddjango/django-stubs\",\n author=\"Maksim Kurnikov\",\n author_email=\"[email protected]\",\n py_modules=[],\n python_requires='>=3.6',\n install_requires=dependencies,\n packages=['django-stubs', *find_packages(exclude=['scripts'])],\n package_data={'django-stubs': find_stub_files('django-stubs')},\n classifiers=[\n 'Development Status :: 3 - Alpha',\n 'License :: OSI Approved :: MIT License',\n 'Programming Language :: Python :: 3.6',\n 'Programming Language :: Python :: 3.7',\n 'Programming Language :: Python :: 3.8'\n ],\n project_urls={\n 'Release notes': 'https://github.com/typeddjango/django-stubs/releases',\n },\n)\n", "path": "setup.py" } ]
[ { "content": "import os\nfrom distutils.core import setup\nfrom typing import List\n\nfrom setuptools import find_packages\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, dirs, files in os.walk(name):\n for file in files:\n if file.endswith('.pyi'):\n if os.path.sep in root:\n sub_root = root.split(os.path.sep, 1)[-1]\n file = os.path.join(sub_root, file)\n result.append(file)\n return result\n\n\nwith open('README.md', 'r') as f:\n readme = f.read()\n\ndependencies = [\n 'mypy>=0.782,<0.790',\n 'typing-extensions',\n 'django',\n]\n\nsetup(\n name=\"django-stubs\",\n version=\"1.5.0\",\n description='Mypy stubs for Django',\n long_description=readme,\n long_description_content_type='text/markdown',\n license='MIT',\n url=\"https://github.com/typeddjango/django-stubs\",\n author=\"Maksim Kurnikov\",\n author_email=\"[email protected]\",\n py_modules=[],\n python_requires='>=3.6',\n install_requires=dependencies,\n packages=['django-stubs', *find_packages(exclude=['scripts'])],\n package_data={'django-stubs': find_stub_files('django-stubs')},\n classifiers=[\n 'Development Status :: 3 - Alpha',\n 'License :: OSI Approved :: MIT License',\n 'Programming Language :: Python :: 3.6',\n 'Programming Language :: Python :: 3.7',\n 'Programming Language :: Python :: 3.8'\n ],\n project_urls={\n 'Release notes': 'https://github.com/typeddjango/django-stubs/releases',\n },\n)\n", "path": "setup.py" } ]
diff --git a/setup.py b/setup.py index 3a9d8276f..c41d1fc24 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ def find_stub_files(name: str) -> List[str]: readme = f.read() dependencies = [ - 'mypy>=0.780,<0.790', + 'mypy>=0.782,<0.790', 'typing-extensions', 'django', ]
fedora-infra__bodhi-1935
The CI yaml file is invalid yaml I noticed today that our CentOS CI service jobs have been failing for a week or two due to the yaml being invalid: ``` >>> with open('devel/ci/githubprb-project.yml') as yml: ... a = yaml.load(yml.read()) ... Traceback (most recent call last): File "<stdin>", line 2, in <module> File "/usr/lib64/python2.7/site-packages/yaml/__init__.py", line 71, in load return loader.get_single_data() File "/usr/lib64/python2.7/site-packages/yaml/constructor.py", line 37, in get_single_data node = self.get_single_node() File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 36, in get_single_node document = self.compose_document() File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 55, in compose_document node = self.compose_node(None, None) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 82, in compose_node node = self.compose_sequence_node(anchor) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 111, in compose_sequence_node node.value.append(self.compose_node(node, index)) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 82, in compose_node node = self.compose_sequence_node(anchor) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 111, in compose_sequence_node node.value.append(self.compose_node(node, index)) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 127, in compose_mapping_node while not self.check_event(MappingEndEvent): File "/usr/lib64/python2.7/site-packages/yaml/parser.py", line 98, in check_event self.current_event = self.state() File "/usr/lib64/python2.7/site-packages/yaml/parser.py", line 428, in parse_block_mapping_key if self.check_token(KeyToken): File "/usr/lib64/python2.7/site-packages/yaml/scanner.py", line 116, in check_token self.fetch_more_tokens() File "/usr/lib64/python2.7/site-packages/yaml/scanner.py", line 220, in fetch_more_tokens return self.fetch_value() File "/usr/lib64/python2.7/site-packages/yaml/scanner.py", line 576, in fetch_value self.get_mark()) yaml.scanner.ScannerError: mapping values are not allowed here in "<string>", line 20, column 99: ... ase review the Jenkins job. Hint: You can search for "JENKIES FA ... ^ ``` I personally am responsible, when I made https://github.com/fedora-infra/bodhi/commit/791d4e3ea98d252daa6fb4856cb394eb8b07d0b3. Shame! Anywyays, it's easy to fix and we should add a test that ensures the YAML is at least parseable.
[ { "content": "import __main__\n__requires__ = __main__.__requires__ = 'WebOb>=1.4.1'\nimport pkg_resources # noqa\n\n# The following two imports are required to shut up an\n# atexit error when running tests with python 2.7\nfrom setuptools import setup, find_packages # noqa\nimport logging # noqa\nimport multiprocessing # noqa\nimport os # noqa\nimport setuptools.command.egg_info # noqa\nimport sys # noqa\n\n\ndef get_requirements(requirements_file='requirements.txt'):\n \"\"\"\n Get the contents of a file listing the requirements.\n\n Args:\n requirements_file (str): path to a requirements file\n\n Returns:\n list: the list of requirements, or an empty list if\n `requirements_file` could not be opened or read\n \"\"\"\n lines = open(requirements_file).readlines()\n dependencies = []\n for line in lines:\n maybe_dep = line.strip()\n if maybe_dep.startswith('#'):\n # Skip pure comment lines\n continue\n if maybe_dep.startswith('git+'):\n # VCS reference for dev purposes, expect a trailing comment\n # with the normal requirement\n __, __, maybe_dep = maybe_dep.rpartition('#')\n else:\n # Ignore any trailing comment\n maybe_dep, __, __ = maybe_dep.partition('#')\n # Remove any whitespace and assume non-empty results are dependencies\n maybe_dep = maybe_dep.strip()\n if maybe_dep:\n dependencies.append(maybe_dep)\n return dependencies\n\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = open(os.path.join(here, 'README.rst')).read()\nVERSION = '3.0.0'\n# Possible options are at https://pypi.python.org/pypi?%3Aaction=list_classifiers\nCLASSIFIERS = [\n 'Development Status :: 5 - Production/Stable',\n 'Intended Audience :: Developers',\n 'Intended Audience :: System Administrators',\n 'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',\n 'Operating System :: POSIX :: Linux',\n 'Programming Language :: Python :: 2.7',\n 'Topic :: System :: Software Distribution']\nLICENSE = 'GPLv2+'\nMAINTAINER = 'Fedora Infrastructure Team'\nMAINTAINER_EMAIL = '[email protected]'\nPLATFORMS = ['Fedora', 'GNU/Linux']\nURL = 'https://github.com/fedora-infra/bodhi'\n\n\nsetuptools.command.egg_info.manifest_maker.template = 'BODHI_MANIFEST.in'\n\n\nsetup(\n name='bodhi',\n version=VERSION,\n description='bodhi common package',\n long_description=README,\n classifiers=CLASSIFIERS,\n license=LICENSE,\n maintainer=MAINTAINER,\n maintainer_email=MAINTAINER_EMAIL,\n platforms=PLATFORMS,\n url=URL,\n keywords='fedora',\n packages=['bodhi'],\n include_package_data=True,\n zip_safe=False,\n install_requires=[],\n tests_require=[\n 'flake8',\n 'pytest',\n 'pytest-cov',\n 'webtest',\n 'mock',\n ],\n)\n\n\nsetuptools.command.egg_info.manifest_maker.template = 'CLIENT_MANIFEST.in'\n\n\nsetup(\n name='bodhi-client',\n version=VERSION,\n description='bodhi client',\n long_description=README,\n classifiers=CLASSIFIERS,\n license=LICENSE,\n maintainer=MAINTAINER,\n maintainer_email=MAINTAINER_EMAIL,\n platforms=PLATFORMS,\n url=URL,\n keywords='fedora',\n packages=['bodhi.client'],\n include_package_data=False,\n zip_safe=False,\n install_requires=['click', 'iniparse', 'python-fedora >= 0.9.0', 'six'],\n entry_points=\"\"\"\\\n [console_scripts]\n bodhi = bodhi.client:cli\n \"\"\")\n\n\nsetuptools.command.egg_info.manifest_maker.template = 'SERVER_MANIFEST.in'\n# Due to https://github.com/pypa/setuptools/issues/808, we need to include the bodhi superpackage\n# and then remove it if we want find_packages() to find the bodhi.server package and its\n# subpackages without including the bodhi top level package.\nserver_packages = find_packages(\n exclude=['bodhi.client', 'bodhi.client.*', 'bodhi.tests', 'bodhi.tests.*'])\nserver_packages.remove('bodhi')\n\n\nsetup(\n name='bodhi-server',\n version=VERSION,\n description='bodhi server',\n long_description=README,\n classifiers=CLASSIFIERS + [\n 'Framework :: Pyramid',\n 'Programming Language :: JavaScript',\n \"Topic :: Internet :: WWW/HTTP\",\n \"Topic :: Internet :: WWW/HTTP :: WSGI :: Application\"],\n license=LICENSE,\n maintainer=MAINTAINER,\n maintainer_email=MAINTAINER_EMAIL,\n platforms=PLATFORMS,\n url=URL,\n keywords='web fedora pyramid',\n packages=server_packages,\n include_package_data=True,\n zip_safe=False,\n install_requires=get_requirements(),\n message_extractors={'.': []},\n entry_points=\"\"\"\\\n [paste.app_factory]\n main = bodhi.server:main\n [console_scripts]\n initialize_bodhi_db = bodhi.server.scripts.initializedb:main\n bodhi-clean-old-mashes = bodhi.server.scripts.clean_old_mashes:clean_up\n bodhi-dequeue-stable = bodhi.server.scripts.dequeue_stable:dequeue_stable\n bodhi-push = bodhi.server.push:push\n bodhi-expire-overrides = bodhi.server.scripts.expire_overrides:main\n bodhi-untag-branched = bodhi.server.scripts.untag_branched:main\n bodhi-approve-testing = bodhi.server.scripts.approve_testing:main\n bodhi-manage-releases = bodhi.server.scripts.manage_releases:main\n bodhi-check-policies = bodhi.server.scripts.check_policies:check\n [moksha.consumer]\n masher = bodhi.server.consumers.masher:Masher\n updates = bodhi.server.consumers.updates:UpdatesHandler\n signed = bodhi.server.consumers.signed:SignedHandler\n \"\"\",\n paster_plugins=['pyramid'])\n", "path": "setup.py" } ]
[ { "content": "import __main__\n__requires__ = __main__.__requires__ = 'WebOb>=1.4.1'\nimport pkg_resources # noqa\n\n# The following two imports are required to shut up an\n# atexit error when running tests with python 2.7\nfrom setuptools import setup, find_packages # noqa\nimport logging # noqa\nimport multiprocessing # noqa\nimport os # noqa\nimport setuptools.command.egg_info # noqa\nimport sys # noqa\n\n\ndef get_requirements(requirements_file='requirements.txt'):\n \"\"\"\n Get the contents of a file listing the requirements.\n\n Args:\n requirements_file (str): path to a requirements file\n\n Returns:\n list: the list of requirements, or an empty list if\n `requirements_file` could not be opened or read\n \"\"\"\n lines = open(requirements_file).readlines()\n dependencies = []\n for line in lines:\n maybe_dep = line.strip()\n if maybe_dep.startswith('#'):\n # Skip pure comment lines\n continue\n if maybe_dep.startswith('git+'):\n # VCS reference for dev purposes, expect a trailing comment\n # with the normal requirement\n __, __, maybe_dep = maybe_dep.rpartition('#')\n else:\n # Ignore any trailing comment\n maybe_dep, __, __ = maybe_dep.partition('#')\n # Remove any whitespace and assume non-empty results are dependencies\n maybe_dep = maybe_dep.strip()\n if maybe_dep:\n dependencies.append(maybe_dep)\n return dependencies\n\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = open(os.path.join(here, 'README.rst')).read()\nVERSION = '3.0.0'\n# Possible options are at https://pypi.python.org/pypi?%3Aaction=list_classifiers\nCLASSIFIERS = [\n 'Development Status :: 5 - Production/Stable',\n 'Intended Audience :: Developers',\n 'Intended Audience :: System Administrators',\n 'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',\n 'Operating System :: POSIX :: Linux',\n 'Programming Language :: Python :: 2.7',\n 'Topic :: System :: Software Distribution']\nLICENSE = 'GPLv2+'\nMAINTAINER = 'Fedora Infrastructure Team'\nMAINTAINER_EMAIL = '[email protected]'\nPLATFORMS = ['Fedora', 'GNU/Linux']\nURL = 'https://github.com/fedora-infra/bodhi'\n\n\nsetuptools.command.egg_info.manifest_maker.template = 'BODHI_MANIFEST.in'\n\n\nsetup(\n name='bodhi',\n version=VERSION,\n description='bodhi common package',\n long_description=README,\n classifiers=CLASSIFIERS,\n license=LICENSE,\n maintainer=MAINTAINER,\n maintainer_email=MAINTAINER_EMAIL,\n platforms=PLATFORMS,\n url=URL,\n keywords='fedora',\n packages=['bodhi'],\n include_package_data=True,\n zip_safe=False,\n install_requires=[],\n tests_require=[\n 'flake8',\n 'pytest',\n 'pytest-cov',\n 'pyyaml',\n 'webtest',\n 'mock',\n ],\n)\n\n\nsetuptools.command.egg_info.manifest_maker.template = 'CLIENT_MANIFEST.in'\n\n\nsetup(\n name='bodhi-client',\n version=VERSION,\n description='bodhi client',\n long_description=README,\n classifiers=CLASSIFIERS,\n license=LICENSE,\n maintainer=MAINTAINER,\n maintainer_email=MAINTAINER_EMAIL,\n platforms=PLATFORMS,\n url=URL,\n keywords='fedora',\n packages=['bodhi.client'],\n include_package_data=False,\n zip_safe=False,\n install_requires=['click', 'iniparse', 'python-fedora >= 0.9.0', 'six'],\n entry_points=\"\"\"\\\n [console_scripts]\n bodhi = bodhi.client:cli\n \"\"\")\n\n\nsetuptools.command.egg_info.manifest_maker.template = 'SERVER_MANIFEST.in'\n# Due to https://github.com/pypa/setuptools/issues/808, we need to include the bodhi superpackage\n# and then remove it if we want find_packages() to find the bodhi.server package and its\n# subpackages without including the bodhi top level package.\nserver_packages = find_packages(\n exclude=['bodhi.client', 'bodhi.client.*', 'bodhi.tests', 'bodhi.tests.*'])\nserver_packages.remove('bodhi')\n\n\nsetup(\n name='bodhi-server',\n version=VERSION,\n description='bodhi server',\n long_description=README,\n classifiers=CLASSIFIERS + [\n 'Framework :: Pyramid',\n 'Programming Language :: JavaScript',\n \"Topic :: Internet :: WWW/HTTP\",\n \"Topic :: Internet :: WWW/HTTP :: WSGI :: Application\"],\n license=LICENSE,\n maintainer=MAINTAINER,\n maintainer_email=MAINTAINER_EMAIL,\n platforms=PLATFORMS,\n url=URL,\n keywords='web fedora pyramid',\n packages=server_packages,\n include_package_data=True,\n zip_safe=False,\n install_requires=get_requirements(),\n message_extractors={'.': []},\n entry_points=\"\"\"\\\n [paste.app_factory]\n main = bodhi.server:main\n [console_scripts]\n initialize_bodhi_db = bodhi.server.scripts.initializedb:main\n bodhi-clean-old-mashes = bodhi.server.scripts.clean_old_mashes:clean_up\n bodhi-dequeue-stable = bodhi.server.scripts.dequeue_stable:dequeue_stable\n bodhi-push = bodhi.server.push:push\n bodhi-expire-overrides = bodhi.server.scripts.expire_overrides:main\n bodhi-untag-branched = bodhi.server.scripts.untag_branched:main\n bodhi-approve-testing = bodhi.server.scripts.approve_testing:main\n bodhi-manage-releases = bodhi.server.scripts.manage_releases:main\n bodhi-check-policies = bodhi.server.scripts.check_policies:check\n [moksha.consumer]\n masher = bodhi.server.consumers.masher:Masher\n updates = bodhi.server.consumers.updates:UpdatesHandler\n signed = bodhi.server.consumers.signed:SignedHandler\n \"\"\",\n paster_plugins=['pyramid'])\n", "path": "setup.py" } ]
diff --git a/bodhi/tests/test_ci.py b/bodhi/tests/test_ci.py new file mode 100644 index 0000000000..1ff3c882a1 --- /dev/null +++ b/bodhi/tests/test_ci.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# Copyright © 2017 Red Hat, Inc. +# +# This file is part of Bodhi. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +"""This module contains tests for the CI yaml file.""" +import os +import unittest + +import yaml + +from bodhi.tests.server import base + + +class YAMLLoadTest(unittest.TestCase): + """Ensure that the JJB template is parseable YAML.""" + def test_failure_comment(self): + """Ensure that the failure-comment is properly parsed.""" + with open(os.path.join(base.PROJECT_PATH, 'devel/ci/githubprb-project.yml')) as jjb_f: + jjb = jjb_f.read() + + jjb = yaml.safe_load(jjb) + + self.assertEqual( + jjb[0]['trigger']['triggers'][0]['github-pull-request']['failure-comment'], + ('This pull request fails CI testing. Please review the Jenkins job. Hint: You can ' + 'search for "JENKIES FAIL" in the console output to quickly find errors.')) diff --git a/devel/ansible/roles/dev/tasks/main.yml b/devel/ansible/roles/dev/tasks/main.yml index 1e80c31742..ef1fe959b0 100644 --- a/devel/ansible/roles/dev/tasks/main.yml +++ b/devel/ansible/roles/dev/tasks/main.yml @@ -68,6 +68,7 @@ - python2-sphinx - python2-sqlalchemy_schemadisplay - python2-waitress + - python2-yaml - python3-tox - redhat-rpm-config - vim-enhanced diff --git a/devel/ci/Dockerfile-header b/devel/ci/Dockerfile-header index 3d5d081843..0b9f691184 100644 --- a/devel/ci/Dockerfile-header +++ b/devel/ci/Dockerfile-header @@ -14,3 +14,4 @@ RUN dnf install -y \ python2-jinja2 \ python2-koji \ python2-librepo \ + python2-yaml \ diff --git a/devel/ci/githubprb-project.yml b/devel/ci/githubprb-project.yml index dfd74dd6e5..71417b1ae8 100644 --- a/devel/ci/githubprb-project.yml +++ b/devel/ci/githubprb-project.yml @@ -17,7 +17,7 @@ org-list: - fedora-infra cron: '* * * * *' - failure-comment: This pull request fails CI testing. Please review the Jenkins job. Hint: You can search for "JENKIES FAIL" in the console output to quickly find errors. + failure-comment: 'This pull request fails CI testing. Please review the Jenkins job. Hint: You can search for "JENKIES FAIL" in the console output to quickly find errors.' github-hooks: true permit-all: false trigger-phrase: 'jenkies test' diff --git a/setup.py b/setup.py index a79278ab51..06aee1cb0e 100644 --- a/setup.py +++ b/setup.py @@ -86,6 +86,7 @@ def get_requirements(requirements_file='requirements.txt'): 'flake8', 'pytest', 'pytest-cov', + 'pyyaml', 'webtest', 'mock', ],
dbt-labs__dbt-core-7932
[CT-2729] [Bug] Accidental copy-paste artifact for dbt retry ### Is this a new bug in dbt-core? - [X] I believe this is a new bug in dbt-core - [X] I have searched the existing issues, and I could not find an existing issue for this bug ### Current Behavior https://github.com/dbt-labs/dbt-core/blob/533988233ecc1b2391d2d6139e1d6be095e2d6cd/core/dbt/cli/main.py#L581 ### Expected Behavior Should be this instead: ```python # dbt retry ``` ### Steps To Reproduce N/A ### Relevant log output _No response_ ### Environment ```markdown - OS: - Python: - dbt: ``` ### Which database adapter are you using with dbt? _No response_ ### Additional Context _No response_
[ { "content": "from copy import copy\nfrom dataclasses import dataclass\nfrom typing import Callable, List, Optional, Union\n\nimport click\nfrom click.exceptions import (\n Exit as ClickExit,\n BadOptionUsage,\n NoSuchOption,\n UsageError,\n)\n\nfrom dbt.cli import requires, params as p\nfrom dbt.cli.exceptions import (\n DbtInternalException,\n DbtUsageException,\n)\nfrom dbt.contracts.graph.manifest import Manifest\nfrom dbt.contracts.results import (\n CatalogArtifact,\n RunExecutionResult,\n)\nfrom dbt.events.base_types import EventMsg\nfrom dbt.task.build import BuildTask\nfrom dbt.task.clean import CleanTask\nfrom dbt.task.compile import CompileTask\nfrom dbt.task.debug import DebugTask\nfrom dbt.task.deps import DepsTask\nfrom dbt.task.freshness import FreshnessTask\nfrom dbt.task.generate import GenerateTask\nfrom dbt.task.init import InitTask\nfrom dbt.task.list import ListTask\nfrom dbt.task.retry import RetryTask\nfrom dbt.task.run import RunTask\nfrom dbt.task.run_operation import RunOperationTask\nfrom dbt.task.seed import SeedTask\nfrom dbt.task.serve import ServeTask\nfrom dbt.task.show import ShowTask\nfrom dbt.task.snapshot import SnapshotTask\nfrom dbt.task.test import TestTask\n\n\n@dataclass\nclass dbtRunnerResult:\n \"\"\"Contains the result of an invocation of the dbtRunner\"\"\"\n\n success: bool\n\n exception: Optional[BaseException] = None\n result: Union[\n bool, # debug\n CatalogArtifact, # docs generate\n List[str], # list/ls\n Manifest, # parse\n None, # clean, deps, init, source\n RunExecutionResult, # build, compile, run, seed, snapshot, test, run-operation\n ] = None\n\n\n# Programmatic invocation\nclass dbtRunner:\n def __init__(\n self,\n manifest: Optional[Manifest] = None,\n callbacks: Optional[List[Callable[[EventMsg], None]]] = None,\n ):\n self.manifest = manifest\n\n if callbacks is None:\n callbacks = []\n self.callbacks = callbacks\n\n def invoke(self, args: List[str], **kwargs) -> dbtRunnerResult:\n try:\n dbt_ctx = cli.make_context(cli.name, args)\n dbt_ctx.obj = {\n \"manifest\": self.manifest,\n \"callbacks\": self.callbacks,\n \"_publications\": kwargs.get(\"publications\"),\n }\n\n for key, value in kwargs.items():\n dbt_ctx.params[key] = value\n # Hack to set parameter source to custom string\n dbt_ctx.set_parameter_source(key, \"kwargs\") # type: ignore\n\n result, success = cli.invoke(dbt_ctx)\n return dbtRunnerResult(\n result=result,\n success=success,\n )\n except requires.ResultExit as e:\n return dbtRunnerResult(\n result=e.result,\n success=False,\n )\n except requires.ExceptionExit as e:\n return dbtRunnerResult(\n exception=e.exception,\n success=False,\n )\n except (BadOptionUsage, NoSuchOption, UsageError) as e:\n return dbtRunnerResult(\n exception=DbtUsageException(e.message),\n success=False,\n )\n except ClickExit as e:\n if e.exit_code == 0:\n return dbtRunnerResult(success=True)\n return dbtRunnerResult(\n exception=DbtInternalException(f\"unhandled exit code {e.exit_code}\"),\n success=False,\n )\n except BaseException as e:\n return dbtRunnerResult(\n exception=e,\n success=False,\n )\n\n\n# dbt\[email protected](\n context_settings={\"help_option_names\": [\"-h\", \"--help\"]},\n invoke_without_command=True,\n no_args_is_help=True,\n epilog=\"Specify one of these sub-commands and you can find more help from there.\",\n)\[email protected]_context\[email protected]_selected_only\[email protected]\[email protected]_print\[email protected]_legacy_logger\[email protected]_fast\[email protected]_cache_events\[email protected]_format\[email protected]_format_file\[email protected]_level\[email protected]_level_file\[email protected]_path\[email protected]_debugging\[email protected]_parse\[email protected]_cache\[email protected]\[email protected]_width\[email protected]\[email protected]_timing_info\[email protected]_anonymous_usage_stats\[email protected]_threaded\[email protected]_parser\[email protected]_colors\[email protected]_colors_file\[email protected]_experimental_parser\[email protected]\[email protected]_check\[email protected]_error\[email protected]_error_options\[email protected]_json\ndef cli(ctx, **kwargs):\n \"\"\"An ELT tool for managing your SQL transformations and data models.\n For more documentation on these commands, visit: docs.getdbt.com\n \"\"\"\n\n\n# dbt build\[email protected](\"build\")\[email protected]_context\[email protected]\[email protected]_defer\[email protected]\[email protected]_fast\[email protected]_state\[email protected]_favor_state\[email protected]_refresh\[email protected]_selection\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]_type\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]_failures\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef build(ctx, **kwargs):\n \"\"\"Run all seeds, models, snapshots, and tests in DAG order\"\"\"\n task = BuildTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt clean\[email protected](\"clean\")\[email protected]_context\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]\[email protected]_profile\[email protected]\ndef clean(ctx, **kwargs):\n \"\"\"Delete all folders in the clean-targets list (usually the dbt_packages and target directories.)\"\"\"\n task = CleanTask(ctx.obj[\"flags\"], ctx.obj[\"project\"])\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt docs\[email protected]()\[email protected]_context\ndef docs(ctx, **kwargs):\n \"\"\"Generate or serve the documentation website for your project\"\"\"\n\n\n# dbt docs generate\[email protected](\"generate\")\[email protected]_context\[email protected]_docs\[email protected]\[email protected]_defer\[email protected]\[email protected]_state\[email protected]_favor_state\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]_catalog\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected](write=False)\ndef docs_generate(ctx, **kwargs):\n \"\"\"Generate the documentation website for your project\"\"\"\n task = GenerateTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt docs serve\[email protected](\"serve\")\[email protected]_context\[email protected]\[email protected]\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\ndef docs_serve(ctx, **kwargs):\n \"\"\"Serve the documentation website for your project\"\"\"\n task = ServeTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt compile\[email protected](\"compile\")\[email protected]_context\[email protected]\[email protected]_defer\[email protected]\[email protected]_state\[email protected]_favor_state\[email protected]_refresh\[email protected]_output_format\[email protected]_selection\[email protected]\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef compile(ctx, **kwargs):\n \"\"\"Generates executable SQL from source, model, test, and analysis files. Compiled SQL files are written to the\n target/ directory.\"\"\"\n task = CompileTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt show\[email protected](\"show\")\[email protected]_context\[email protected]\[email protected]_defer\[email protected]\[email protected]_state\[email protected]_favor_state\[email protected]_refresh\[email protected]_output_format\[email protected]_limit\[email protected]_selection\[email protected]\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef show(ctx, **kwargs):\n \"\"\"Generates executable SQL for a named resource or inline query, runs that SQL, and returns a preview of the\n results. Does not materialize anything to the warehouse.\"\"\"\n task = ShowTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt debug\[email protected](\"debug\")\[email protected]_context\[email protected]_connection\[email protected]_dir\[email protected]\[email protected]_dir_exists_false\[email protected]_dir\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\ndef debug(ctx, **kwargs):\n \"\"\"Show information on the current dbt environment and check dependencies, then test the database connection. Not to be confused with the --debug option which increases verbosity.\"\"\"\n\n task = DebugTask(\n ctx.obj[\"flags\"],\n None,\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt deps\[email protected](\"deps\")\[email protected]_context\[email protected]\[email protected]_dir_exists_false\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_profile\[email protected]\ndef deps(ctx, **kwargs):\n \"\"\"Pull the most recent version of the dependencies listed in packages.yml\"\"\"\n task = DepsTask(ctx.obj[\"flags\"], ctx.obj[\"project\"])\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt init\[email protected](\"init\")\[email protected]_context\n# for backwards compatibility, accept 'project_name' as an optional positional argument\[email protected](\"project_name\", required=False)\[email protected]\[email protected]_dir_exists_false\[email protected]_dir\[email protected]_profile_setup\[email protected]\[email protected]\[email protected]\[email protected]\ndef init(ctx, **kwargs):\n \"\"\"Initialize a new dbt project.\"\"\"\n task = InitTask(ctx.obj[\"flags\"], None)\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt list\[email protected](\"list\")\[email protected]_context\[email protected]\[email protected]_selection\[email protected]\[email protected]\[email protected]_keys\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]_type\[email protected]_select\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef list(ctx, **kwargs):\n \"\"\"List the resources in your project\"\"\"\n task = ListTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# Alias \"list\" to \"ls\"\nls = copy(cli.commands[\"list\"])\nls.hidden = True\ncli.add_command(ls, \"ls\")\n\n\n# dbt parse\[email protected](\"parse\")\[email protected]_context\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected](write_perf_info=True)\ndef parse(ctx, **kwargs):\n \"\"\"Parses the project and provides information on performance\"\"\"\n # manifest generation and writing happens in @requires.manifest\n\n return ctx.obj[\"manifest\"], True\n\n\n# dbt run\[email protected](\"run\")\[email protected]_context\[email protected]\[email protected]_defer\[email protected]_state\[email protected]_favor_state\[email protected]\[email protected]_fast\[email protected]_refresh\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef run(ctx, **kwargs):\n \"\"\"Compile SQL and execute against the current target database.\"\"\"\n task = RunTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt run\[email protected](\"retry\")\[email protected]_context\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_fast\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef retry(ctx, **kwargs):\n \"\"\"Retry the nodes that failed in the previous run.\"\"\"\n task = RetryTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt run operation\[email protected](\"run-operation\")\[email protected]_context\[email protected](\"macro\")\[email protected]\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef run_operation(ctx, **kwargs):\n \"\"\"Run the named macro with any supplied arguments.\"\"\"\n task = RunOperationTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt seed\[email protected](\"seed\")\[email protected]_context\[email protected]\[email protected]_refresh\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef seed(ctx, **kwargs):\n \"\"\"Load data from csv files into your data warehouse.\"\"\"\n task = SeedTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt snapshot\[email protected](\"snapshot\")\[email protected]_context\[email protected]\[email protected]_defer\[email protected]\[email protected]_state\[email protected]_favor_state\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef snapshot(ctx, **kwargs):\n \"\"\"Execute snapshots defined in your project\"\"\"\n task = SnapshotTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt source\[email protected]()\[email protected]_context\ndef source(ctx, **kwargs):\n \"\"\"Manage your project's sources\"\"\"\n\n\n# dbt source freshness\[email protected](\"freshness\")\[email protected]_context\[email protected]\[email protected]_path # TODO: Is this ok to re-use? We have three different output params, how much can we consolidate?\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef freshness(ctx, **kwargs):\n \"\"\"check the current freshness of the project's sources\"\"\"\n task = FreshnessTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# Alias \"source freshness\" to \"snapshot-freshness\"\nsnapshot_freshness = copy(cli.commands[\"source\"].commands[\"freshness\"]) # type: ignore\nsnapshot_freshness.hidden = True\ncli.commands[\"source\"].add_command(snapshot_freshness, \"snapshot-freshness\") # type: ignore\n\n\n# dbt test\[email protected](\"test\")\[email protected]_context\[email protected]\[email protected]_defer\[email protected]\[email protected]_fast\[email protected]_state\[email protected]_favor_state\[email protected]_selection\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]_failures\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef test(ctx, **kwargs):\n \"\"\"Runs tests on data in deployed models. Run this after `dbt run`\"\"\"\n task = TestTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# Support running as a module\nif __name__ == \"__main__\":\n cli()\n", "path": "core/dbt/cli/main.py" } ]
[ { "content": "from copy import copy\nfrom dataclasses import dataclass\nfrom typing import Callable, List, Optional, Union\n\nimport click\nfrom click.exceptions import (\n Exit as ClickExit,\n BadOptionUsage,\n NoSuchOption,\n UsageError,\n)\n\nfrom dbt.cli import requires, params as p\nfrom dbt.cli.exceptions import (\n DbtInternalException,\n DbtUsageException,\n)\nfrom dbt.contracts.graph.manifest import Manifest\nfrom dbt.contracts.results import (\n CatalogArtifact,\n RunExecutionResult,\n)\nfrom dbt.events.base_types import EventMsg\nfrom dbt.task.build import BuildTask\nfrom dbt.task.clean import CleanTask\nfrom dbt.task.compile import CompileTask\nfrom dbt.task.debug import DebugTask\nfrom dbt.task.deps import DepsTask\nfrom dbt.task.freshness import FreshnessTask\nfrom dbt.task.generate import GenerateTask\nfrom dbt.task.init import InitTask\nfrom dbt.task.list import ListTask\nfrom dbt.task.retry import RetryTask\nfrom dbt.task.run import RunTask\nfrom dbt.task.run_operation import RunOperationTask\nfrom dbt.task.seed import SeedTask\nfrom dbt.task.serve import ServeTask\nfrom dbt.task.show import ShowTask\nfrom dbt.task.snapshot import SnapshotTask\nfrom dbt.task.test import TestTask\n\n\n@dataclass\nclass dbtRunnerResult:\n \"\"\"Contains the result of an invocation of the dbtRunner\"\"\"\n\n success: bool\n\n exception: Optional[BaseException] = None\n result: Union[\n bool, # debug\n CatalogArtifact, # docs generate\n List[str], # list/ls\n Manifest, # parse\n None, # clean, deps, init, source\n RunExecutionResult, # build, compile, run, seed, snapshot, test, run-operation\n ] = None\n\n\n# Programmatic invocation\nclass dbtRunner:\n def __init__(\n self,\n manifest: Optional[Manifest] = None,\n callbacks: Optional[List[Callable[[EventMsg], None]]] = None,\n ):\n self.manifest = manifest\n\n if callbacks is None:\n callbacks = []\n self.callbacks = callbacks\n\n def invoke(self, args: List[str], **kwargs) -> dbtRunnerResult:\n try:\n dbt_ctx = cli.make_context(cli.name, args)\n dbt_ctx.obj = {\n \"manifest\": self.manifest,\n \"callbacks\": self.callbacks,\n \"_publications\": kwargs.get(\"publications\"),\n }\n\n for key, value in kwargs.items():\n dbt_ctx.params[key] = value\n # Hack to set parameter source to custom string\n dbt_ctx.set_parameter_source(key, \"kwargs\") # type: ignore\n\n result, success = cli.invoke(dbt_ctx)\n return dbtRunnerResult(\n result=result,\n success=success,\n )\n except requires.ResultExit as e:\n return dbtRunnerResult(\n result=e.result,\n success=False,\n )\n except requires.ExceptionExit as e:\n return dbtRunnerResult(\n exception=e.exception,\n success=False,\n )\n except (BadOptionUsage, NoSuchOption, UsageError) as e:\n return dbtRunnerResult(\n exception=DbtUsageException(e.message),\n success=False,\n )\n except ClickExit as e:\n if e.exit_code == 0:\n return dbtRunnerResult(success=True)\n return dbtRunnerResult(\n exception=DbtInternalException(f\"unhandled exit code {e.exit_code}\"),\n success=False,\n )\n except BaseException as e:\n return dbtRunnerResult(\n exception=e,\n success=False,\n )\n\n\n# dbt\[email protected](\n context_settings={\"help_option_names\": [\"-h\", \"--help\"]},\n invoke_without_command=True,\n no_args_is_help=True,\n epilog=\"Specify one of these sub-commands and you can find more help from there.\",\n)\[email protected]_context\[email protected]_selected_only\[email protected]\[email protected]_print\[email protected]_legacy_logger\[email protected]_fast\[email protected]_cache_events\[email protected]_format\[email protected]_format_file\[email protected]_level\[email protected]_level_file\[email protected]_path\[email protected]_debugging\[email protected]_parse\[email protected]_cache\[email protected]\[email protected]_width\[email protected]\[email protected]_timing_info\[email protected]_anonymous_usage_stats\[email protected]_threaded\[email protected]_parser\[email protected]_colors\[email protected]_colors_file\[email protected]_experimental_parser\[email protected]\[email protected]_check\[email protected]_error\[email protected]_error_options\[email protected]_json\ndef cli(ctx, **kwargs):\n \"\"\"An ELT tool for managing your SQL transformations and data models.\n For more documentation on these commands, visit: docs.getdbt.com\n \"\"\"\n\n\n# dbt build\[email protected](\"build\")\[email protected]_context\[email protected]\[email protected]_defer\[email protected]\[email protected]_fast\[email protected]_state\[email protected]_favor_state\[email protected]_refresh\[email protected]_selection\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]_type\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]_failures\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef build(ctx, **kwargs):\n \"\"\"Run all seeds, models, snapshots, and tests in DAG order\"\"\"\n task = BuildTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt clean\[email protected](\"clean\")\[email protected]_context\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]\[email protected]_profile\[email protected]\ndef clean(ctx, **kwargs):\n \"\"\"Delete all folders in the clean-targets list (usually the dbt_packages and target directories.)\"\"\"\n task = CleanTask(ctx.obj[\"flags\"], ctx.obj[\"project\"])\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt docs\[email protected]()\[email protected]_context\ndef docs(ctx, **kwargs):\n \"\"\"Generate or serve the documentation website for your project\"\"\"\n\n\n# dbt docs generate\[email protected](\"generate\")\[email protected]_context\[email protected]_docs\[email protected]\[email protected]_defer\[email protected]\[email protected]_state\[email protected]_favor_state\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]_catalog\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected](write=False)\ndef docs_generate(ctx, **kwargs):\n \"\"\"Generate the documentation website for your project\"\"\"\n task = GenerateTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt docs serve\[email protected](\"serve\")\[email protected]_context\[email protected]\[email protected]\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\ndef docs_serve(ctx, **kwargs):\n \"\"\"Serve the documentation website for your project\"\"\"\n task = ServeTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt compile\[email protected](\"compile\")\[email protected]_context\[email protected]\[email protected]_defer\[email protected]\[email protected]_state\[email protected]_favor_state\[email protected]_refresh\[email protected]_output_format\[email protected]_selection\[email protected]\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef compile(ctx, **kwargs):\n \"\"\"Generates executable SQL from source, model, test, and analysis files. Compiled SQL files are written to the\n target/ directory.\"\"\"\n task = CompileTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt show\[email protected](\"show\")\[email protected]_context\[email protected]\[email protected]_defer\[email protected]\[email protected]_state\[email protected]_favor_state\[email protected]_refresh\[email protected]_output_format\[email protected]_limit\[email protected]_selection\[email protected]\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef show(ctx, **kwargs):\n \"\"\"Generates executable SQL for a named resource or inline query, runs that SQL, and returns a preview of the\n results. Does not materialize anything to the warehouse.\"\"\"\n task = ShowTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt debug\[email protected](\"debug\")\[email protected]_context\[email protected]_connection\[email protected]_dir\[email protected]\[email protected]_dir_exists_false\[email protected]_dir\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\ndef debug(ctx, **kwargs):\n \"\"\"Show information on the current dbt environment and check dependencies, then test the database connection. Not to be confused with the --debug option which increases verbosity.\"\"\"\n\n task = DebugTask(\n ctx.obj[\"flags\"],\n None,\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt deps\[email protected](\"deps\")\[email protected]_context\[email protected]\[email protected]_dir_exists_false\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_profile\[email protected]\ndef deps(ctx, **kwargs):\n \"\"\"Pull the most recent version of the dependencies listed in packages.yml\"\"\"\n task = DepsTask(ctx.obj[\"flags\"], ctx.obj[\"project\"])\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt init\[email protected](\"init\")\[email protected]_context\n# for backwards compatibility, accept 'project_name' as an optional positional argument\[email protected](\"project_name\", required=False)\[email protected]\[email protected]_dir_exists_false\[email protected]_dir\[email protected]_profile_setup\[email protected]\[email protected]\[email protected]\[email protected]\ndef init(ctx, **kwargs):\n \"\"\"Initialize a new dbt project.\"\"\"\n task = InitTask(ctx.obj[\"flags\"], None)\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt list\[email protected](\"list\")\[email protected]_context\[email protected]\[email protected]_selection\[email protected]\[email protected]\[email protected]_keys\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]_type\[email protected]_select\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef list(ctx, **kwargs):\n \"\"\"List the resources in your project\"\"\"\n task = ListTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# Alias \"list\" to \"ls\"\nls = copy(cli.commands[\"list\"])\nls.hidden = True\ncli.add_command(ls, \"ls\")\n\n\n# dbt parse\[email protected](\"parse\")\[email protected]_context\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected](write_perf_info=True)\ndef parse(ctx, **kwargs):\n \"\"\"Parses the project and provides information on performance\"\"\"\n # manifest generation and writing happens in @requires.manifest\n\n return ctx.obj[\"manifest\"], True\n\n\n# dbt run\[email protected](\"run\")\[email protected]_context\[email protected]\[email protected]_defer\[email protected]_state\[email protected]_favor_state\[email protected]\[email protected]_fast\[email protected]_refresh\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef run(ctx, **kwargs):\n \"\"\"Compile SQL and execute against the current target database.\"\"\"\n task = RunTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt retry\[email protected](\"retry\")\[email protected]_context\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_fast\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef retry(ctx, **kwargs):\n \"\"\"Retry the nodes that failed in the previous run.\"\"\"\n task = RetryTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt run operation\[email protected](\"run-operation\")\[email protected]_context\[email protected](\"macro\")\[email protected]\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef run_operation(ctx, **kwargs):\n \"\"\"Run the named macro with any supplied arguments.\"\"\"\n task = RunOperationTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt seed\[email protected](\"seed\")\[email protected]_context\[email protected]\[email protected]_refresh\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef seed(ctx, **kwargs):\n \"\"\"Load data from csv files into your data warehouse.\"\"\"\n task = SeedTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt snapshot\[email protected](\"snapshot\")\[email protected]_context\[email protected]\[email protected]_defer\[email protected]\[email protected]_state\[email protected]_favor_state\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef snapshot(ctx, **kwargs):\n \"\"\"Execute snapshots defined in your project\"\"\"\n task = SnapshotTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# dbt source\[email protected]()\[email protected]_context\ndef source(ctx, **kwargs):\n \"\"\"Manage your project's sources\"\"\"\n\n\n# dbt source freshness\[email protected](\"freshness\")\[email protected]_context\[email protected]\[email protected]_path # TODO: Is this ok to re-use? We have three different output params, how much can we consolidate?\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef freshness(ctx, **kwargs):\n \"\"\"check the current freshness of the project's sources\"\"\"\n task = FreshnessTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# Alias \"source freshness\" to \"snapshot-freshness\"\nsnapshot_freshness = copy(cli.commands[\"source\"].commands[\"freshness\"]) # type: ignore\nsnapshot_freshness.hidden = True\ncli.commands[\"source\"].add_command(snapshot_freshness, \"snapshot-freshness\") # type: ignore\n\n\n# dbt test\[email protected](\"test\")\[email protected]_context\[email protected]\[email protected]_defer\[email protected]\[email protected]_fast\[email protected]_state\[email protected]_favor_state\[email protected]_selection\[email protected]\[email protected]_dir\[email protected]_dir\[email protected]\[email protected]\[email protected]\[email protected]_state\[email protected]_state\[email protected]_failures\[email protected]\[email protected]_path\[email protected]\[email protected]\[email protected]_check\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]_config\[email protected]\ndef test(ctx, **kwargs):\n \"\"\"Runs tests on data in deployed models. Run this after `dbt run`\"\"\"\n task = TestTask(\n ctx.obj[\"flags\"],\n ctx.obj[\"runtime_config\"],\n ctx.obj[\"manifest\"],\n )\n\n results = task.run()\n success = task.interpret_results(results)\n return results, success\n\n\n# Support running as a module\nif __name__ == \"__main__\":\n cli()\n", "path": "core/dbt/cli/main.py" } ]
diff --git a/core/dbt/cli/main.py b/core/dbt/cli/main.py index bd8d92a4d62..ac194a2e602 100644 --- a/core/dbt/cli/main.py +++ b/core/dbt/cli/main.py @@ -578,7 +578,7 @@ def run(ctx, **kwargs): return results, success -# dbt run +# dbt retry @cli.command("retry") @click.pass_context @p.project_dir
biopython__biopython-4577
AttributeError: 'SeqFeature' object has no attribute 'strand' ## Setup - **Biopython Version:** 1.82 - **Python Version:** 3.11.5 (main, Sep 27 2023, 11:42:37) [GCC 11.4.0] - **Operating System:** Linux-5.15.0-91-generic-x86_64-with-glibc2.35 - **Python Implementation:** CPython ## Expected Behaviour When processing GenBank files using Biopython, each gene feature should have a 'strand' attribute. ## Actual Behaviour The 'strand' attributes are missing for gene features in GenBank files. ## Steps to Reproduce 1. Run the following script to parse a GenBank file and check for the presence of 'strand' attributes in gene features: ```python from Bio import SeqIO import sys; print(sys.version) import platform; print(platform.python_implementation()); print(platform.platform()) import Bio; print(Bio.__version__) def check_strand_in_genes(genome_file): count = 0 for record in SeqIO.parse(genome_file, "genbank"): for feature in record.features: if feature.type == "gene": gene_name = feature.qualifiers.get('gene', ['Unknown'])[0] if hasattr(feature, 'strand'): print(f"'strand' attribute exists for {gene_name} in record {record.id}") count += 1 else: print(f"'strand' attribute does not exist for {gene_name} in record {record.id}") count += 1 if count >= 5: return # Replace 'genome_file.gb' with the path to your GenBank file # Example file: https://www.ncbi.nlm.nih.gov/nuccore/U00096.3/ check_strand_in_genes('sequence.gb') ``` 2. Note that the output indicates the absence of 'strand' attributes for the genes. ## Observed Output ```bash 3.11.5 (main, Sep 27 2023, 11:42:37) [GCC 11.4.0] CPython Linux-5.15.0-91-generic-x86_64-with-glibc2.35 1.82 'strand' attribute does not exist for thrL in record U00096.3 'strand' attribute does not exist for thrA in record U00096.3 'strand' attribute does not exist for thrB in record U00096.3 'strand' attribute does not exist for thrC in record U00096.3 'strand' attribute does not exist for yaaX in record U00096.3 ```
[ { "content": "# Copyright 1999-2003 by Jeffrey Chang. All rights reserved.\n#\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Please see the LICENSE file that should have been included as part of this\n# package.\n\"\"\"Collection of modules for dealing with biological data in Python.\n\nThe Biopython Project is an international association of developers\nof freely available Python tools for computational molecular biology.\n\nhttps://biopython.org\n\"\"\"\n\nimport os\nimport warnings\n\n__version__ = \"1.83.dev0\"\n\n\nclass MissingExternalDependencyError(Exception):\n \"\"\"Missing an external dependency.\n\n Used for things like missing command line tools. Important for our unit\n tests to allow skipping tests with missing external dependencies.\n \"\"\"\n\n\nclass MissingPythonDependencyError(MissingExternalDependencyError, ImportError):\n \"\"\"Missing an external python dependency (subclass of ImportError).\n\n Used for missing Python modules (rather than just a typical ImportError).\n Important for our unit tests to allow skipping tests with missing external\n python dependencies, while also allowing the exception to be caught as an\n ImportError.\n \"\"\"\n\n\nclass StreamModeError(ValueError):\n \"\"\"Incorrect stream mode (text vs binary).\n\n This error should be raised when a stream (file or file-like object)\n argument is in text mode while the receiving function expects binary mode,\n or vice versa.\n \"\"\"\n\n\nclass BiopythonWarning(Warning):\n \"\"\"Biopython warning.\n\n Biopython should use this warning (or subclasses of it), making it easy to\n silence all our warning messages should you wish to:\n\n >>> import warnings\n >>> from Bio import BiopythonWarning\n >>> warnings.simplefilter('ignore', BiopythonWarning)\n\n Consult the warnings module documentation for more details.\n \"\"\"\n\n\nclass BiopythonParserWarning(BiopythonWarning):\n \"\"\"Biopython parser warning.\n\n Some in-valid data files cannot be parsed and will trigger an exception.\n Where a reasonable interpretation is possible, Biopython will issue this\n warning to indicate a potential problem. To silence these warnings, use:\n\n >>> import warnings\n >>> from Bio import BiopythonParserWarning\n >>> warnings.simplefilter('ignore', BiopythonParserWarning)\n\n Consult the warnings module documentation for more details.\n \"\"\"\n\n\nclass BiopythonDeprecationWarning(BiopythonWarning):\n \"\"\"Biopython deprecation warning.\n\n Biopython uses this warning instead of the built in DeprecationWarning\n since those are ignored by default since Python 2.7.\n\n To silence all our deprecation warning messages, use:\n\n >>> import warnings\n >>> from Bio import BiopythonDeprecationWarning\n >>> warnings.simplefilter('ignore', BiopythonDeprecationWarning)\n\n Code marked as deprecated is likely to be removed in a future version\n of Biopython. To avoid removal of this code, please contact the Biopython\n developers via the mailing list or GitHub.\n \"\"\"\n\n\nclass BiopythonExperimentalWarning(BiopythonWarning):\n \"\"\"Biopython experimental code warning.\n\n Biopython uses this warning for experimental code ('alpha' or 'beta'\n level code) which is released as part of the standard releases to mark\n sub-modules or functions for early adopters to test & give feedback.\n\n Code issuing this warning is likely to change (or even be removed) in\n a subsequent release of Biopython. Such code should NOT be used for\n production/stable code. It should only be used if:\n\n - You are running the latest release of Biopython, or ideally the\n latest code from our repository.\n - You are subscribed to the biopython-dev mailing list to provide\n feedback on this code, and to be alerted of changes to it.\n\n If all goes well, experimental code would be promoted to stable in\n a subsequent release, and this warning removed from it.\n \"\"\"\n\n\n_parent_dir = os.path.dirname(os.path.dirname(__file__))\nif os.path.exists(os.path.join(_parent_dir, \"setup.py\")):\n # Looks like we are running from our source directory,\n # a bad idea except if installed in development mode.\n #\n # See https://setuptools.readthedocs.io/en/latest/userguide/development_mode.html\n # Do we have .../site-packages/biopython.egg-link present?\n #\n # Note \"pip install -e .\" currently calls setuptools internally\n import site\n\n _dev_mode = False\n for _p in site.getsitepackages():\n if os.path.isfile(os.path.join(_p, \"biopython.egg-link\")):\n _dev_mode = True\n break\n # Also check the user specific site packages\n if not _dev_mode and os.path.isfile(\n os.path.join(site.getusersitepackages(), \"biopython.egg-link\")\n ):\n _dev_mode = True\n if not _dev_mode:\n warnings.warn(\n \"You may be importing Biopython from inside the source tree.\"\n \" This is bad practice and might lead to downstream issues.\"\n \" In particular, you might encounter ImportErrors due to\"\n \" missing compiled C extensions. We recommend that you\"\n \" try running your code from outside the source tree.\"\n \" If you are outside the source tree then you have a\"\n \" setup.py file in an unexpected directory: \" + _parent_dir,\n BiopythonWarning,\n )\n", "path": "Bio/__init__.py" } ]
[ { "content": "# Copyright 1999-2003 by Jeffrey Chang. All rights reserved.\n#\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Please see the LICENSE file that should have been included as part of this\n# package.\n\"\"\"Collection of modules for dealing with biological data in Python.\n\nThe Biopython Project is an international association of developers\nof freely available Python tools for computational molecular biology.\n\nhttps://biopython.org\n\"\"\"\n\nimport os\nimport warnings\n\n__version__ = \"1.84.dev0\"\n\n\nclass MissingExternalDependencyError(Exception):\n \"\"\"Missing an external dependency.\n\n Used for things like missing command line tools. Important for our unit\n tests to allow skipping tests with missing external dependencies.\n \"\"\"\n\n\nclass MissingPythonDependencyError(MissingExternalDependencyError, ImportError):\n \"\"\"Missing an external python dependency (subclass of ImportError).\n\n Used for missing Python modules (rather than just a typical ImportError).\n Important for our unit tests to allow skipping tests with missing external\n python dependencies, while also allowing the exception to be caught as an\n ImportError.\n \"\"\"\n\n\nclass StreamModeError(ValueError):\n \"\"\"Incorrect stream mode (text vs binary).\n\n This error should be raised when a stream (file or file-like object)\n argument is in text mode while the receiving function expects binary mode,\n or vice versa.\n \"\"\"\n\n\nclass BiopythonWarning(Warning):\n \"\"\"Biopython warning.\n\n Biopython should use this warning (or subclasses of it), making it easy to\n silence all our warning messages should you wish to:\n\n >>> import warnings\n >>> from Bio import BiopythonWarning\n >>> warnings.simplefilter('ignore', BiopythonWarning)\n\n Consult the warnings module documentation for more details.\n \"\"\"\n\n\nclass BiopythonParserWarning(BiopythonWarning):\n \"\"\"Biopython parser warning.\n\n Some in-valid data files cannot be parsed and will trigger an exception.\n Where a reasonable interpretation is possible, Biopython will issue this\n warning to indicate a potential problem. To silence these warnings, use:\n\n >>> import warnings\n >>> from Bio import BiopythonParserWarning\n >>> warnings.simplefilter('ignore', BiopythonParserWarning)\n\n Consult the warnings module documentation for more details.\n \"\"\"\n\n\nclass BiopythonDeprecationWarning(BiopythonWarning):\n \"\"\"Biopython deprecation warning.\n\n Biopython uses this warning instead of the built in DeprecationWarning\n since those are ignored by default since Python 2.7.\n\n To silence all our deprecation warning messages, use:\n\n >>> import warnings\n >>> from Bio import BiopythonDeprecationWarning\n >>> warnings.simplefilter('ignore', BiopythonDeprecationWarning)\n\n Code marked as deprecated is likely to be removed in a future version\n of Biopython. To avoid removal of this code, please contact the Biopython\n developers via the mailing list or GitHub.\n \"\"\"\n\n\nclass BiopythonExperimentalWarning(BiopythonWarning):\n \"\"\"Biopython experimental code warning.\n\n Biopython uses this warning for experimental code ('alpha' or 'beta'\n level code) which is released as part of the standard releases to mark\n sub-modules or functions for early adopters to test & give feedback.\n\n Code issuing this warning is likely to change (or even be removed) in\n a subsequent release of Biopython. Such code should NOT be used for\n production/stable code. It should only be used if:\n\n - You are running the latest release of Biopython, or ideally the\n latest code from our repository.\n - You are subscribed to the biopython-dev mailing list to provide\n feedback on this code, and to be alerted of changes to it.\n\n If all goes well, experimental code would be promoted to stable in\n a subsequent release, and this warning removed from it.\n \"\"\"\n\n\n_parent_dir = os.path.dirname(os.path.dirname(__file__))\nif os.path.exists(os.path.join(_parent_dir, \"setup.py\")):\n # Looks like we are running from our source directory,\n # a bad idea except if installed in development mode.\n #\n # See https://setuptools.readthedocs.io/en/latest/userguide/development_mode.html\n # Do we have .../site-packages/biopython.egg-link present?\n #\n # Note \"pip install -e .\" currently calls setuptools internally\n import site\n\n _dev_mode = False\n for _p in site.getsitepackages():\n if os.path.isfile(os.path.join(_p, \"biopython.egg-link\")):\n _dev_mode = True\n break\n # Also check the user specific site packages\n if not _dev_mode and os.path.isfile(\n os.path.join(site.getusersitepackages(), \"biopython.egg-link\")\n ):\n _dev_mode = True\n if not _dev_mode:\n warnings.warn(\n \"You may be importing Biopython from inside the source tree.\"\n \" This is bad practice and might lead to downstream issues.\"\n \" In particular, you might encounter ImportErrors due to\"\n \" missing compiled C extensions. We recommend that you\"\n \" try running your code from outside the source tree.\"\n \" If you are outside the source tree then you have a\"\n \" setup.py file in an unexpected directory: \" + _parent_dir,\n BiopythonWarning,\n )\n", "path": "Bio/__init__.py" } ]
diff --git a/Bio/__init__.py b/Bio/__init__.py index 331e109c754..df94984ece4 100644 --- a/Bio/__init__.py +++ b/Bio/__init__.py @@ -15,7 +15,7 @@ import os import warnings -__version__ = "1.83.dev0" +__version__ = "1.84.dev0" class MissingExternalDependencyError(Exception): diff --git a/NEWS.rst b/NEWS.rst index 6907679edb2..638e639e0aa 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -62,6 +62,18 @@ possible, especially the following contributors: - Michiel de Hoon - Peter Cock +10 January 2024: Biopython 1.83 +=============================== + +This release of Biopython supports Python 3.8, 3.9, 3.10, 3.11 and 3.12. It +has also been tested on PyPy3.9 v7.3.13. Python 3.8 is approaching end of +life, our support for it is now deprecated. + +This release reverts the removal of the ``.strand``, ``.ref``, and ``.ref_db`` +attributes of the ``SeqFeature`` which was done without a deprecation period. +They are again aliases for ``.location.strand`` etc, but trigger deprecation +warnings. + 22 December 2023: Biopython 1.82 ================================
goauthentik__authentik-9516
2024.4.0 LongRunningTransaction **Describe the bug** Prometheus alert for a long running transaction. I think the transaction is ``` SELECT pg_advisory_unlock($1) ``` **To Reproduce** No activity, sitting idle **Expected behavior** Shouldn't have the alert **Screenshots** **Logs** **Version and Deployment (please complete the following information):** 2024.4.0 kubernetes **Additional context** Add any other context about the problem here.
[ { "content": "#!/usr/bin/env python\n\"\"\"System Migration handler\"\"\"\nfrom importlib.util import module_from_spec, spec_from_file_location\nfrom inspect import getmembers, isclass\nfrom os import environ, system\nfrom pathlib import Path\nfrom typing import Any\n\nfrom psycopg import Connection, Cursor, connect\nfrom structlog.stdlib import get_logger\n\nfrom authentik.lib.config import CONFIG\n\nLOGGER = get_logger()\nADV_LOCK_UID = 1000\nLOCKED = False\n\n\nclass CommandError(Exception):\n \"\"\"Error raised when a system_crit command fails\"\"\"\n\n\nclass BaseMigration:\n \"\"\"Base System Migration\"\"\"\n\n cur: Cursor\n con: Connection\n\n def __init__(self, cur: Any, con: Any):\n self.cur = cur\n self.con = con\n\n def system_crit(self, command: str):\n \"\"\"Run system command\"\"\"\n LOGGER.debug(\"Running system_crit command\", command=command)\n retval = system(command) # nosec\n if retval != 0:\n raise CommandError(\"Migration error\")\n\n def fake_migration(self, *app_migration: tuple[str, str]):\n \"\"\"Fake apply a list of migrations, arguments are\n expected to be tuples of (app_label, migration_name)\"\"\"\n for app, _migration in app_migration:\n self.system_crit(f\"./manage.py migrate {app} {_migration} --fake\")\n\n def needs_migration(self) -> bool:\n \"\"\"Return true if Migration needs to be run\"\"\"\n return False\n\n def run(self):\n \"\"\"Run the actual migration\"\"\"\n\n\ndef wait_for_lock(cursor: Cursor):\n \"\"\"lock an advisory lock to prevent multiple instances from migrating at once\"\"\"\n LOGGER.info(\"waiting to acquire database lock\")\n cursor.execute(\"SELECT pg_advisory_lock(%s)\", (ADV_LOCK_UID,))\n\n global LOCKED # noqa: PLW0603\n LOCKED = True\n\n\ndef release_lock(cursor: Cursor):\n \"\"\"Release database lock\"\"\"\n if not LOCKED:\n return\n LOGGER.info(\"releasing database lock\")\n cursor.execute(\"SELECT pg_advisory_unlock(%s)\", (ADV_LOCK_UID,))\n\n\ndef run_migrations():\n conn = connect(\n dbname=CONFIG.get(\"postgresql.name\"),\n user=CONFIG.get(\"postgresql.user\"),\n password=CONFIG.get(\"postgresql.password\"),\n host=CONFIG.get(\"postgresql.host\"),\n port=CONFIG.get_int(\"postgresql.port\"),\n sslmode=CONFIG.get(\"postgresql.sslmode\"),\n sslrootcert=CONFIG.get(\"postgresql.sslrootcert\"),\n sslcert=CONFIG.get(\"postgresql.sslcert\"),\n sslkey=CONFIG.get(\"postgresql.sslkey\"),\n )\n curr = conn.cursor()\n try:\n for migration_path in Path(__file__).parent.absolute().glob(\"system_migrations/*.py\"):\n spec = spec_from_file_location(\"lifecycle.system_migrations\", migration_path)\n if not spec:\n continue\n mod = module_from_spec(spec)\n spec.loader.exec_module(mod)\n\n for name, sub in getmembers(mod, isclass):\n if name != \"Migration\":\n continue\n migration = sub(curr, conn)\n if migration.needs_migration():\n wait_for_lock(curr)\n LOGGER.info(\"Migration needs to be applied\", migration=migration_path.name)\n migration.run()\n LOGGER.info(\"Migration finished applying\", migration=migration_path.name)\n release_lock(curr)\n LOGGER.info(\"applying django migrations\")\n environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"authentik.root.settings\")\n wait_for_lock(curr)\n try:\n from django.core.management import execute_from_command_line\n except ImportError as exc:\n raise ImportError(\n \"Couldn't import Django. Are you sure it's installed and \"\n \"available on your PYTHONPATH environment variable? Did you \"\n \"forget to activate a virtual environment?\"\n ) from exc\n execute_from_command_line([\"\", \"migrate_schemas\"])\n execute_from_command_line([\"\", \"migrate_schemas\", \"--schema\", \"template\", \"--tenant\"])\n execute_from_command_line(\n [\"\", \"check\"] + ([] if CONFIG.get_bool(\"debug\") else [\"--deploy\"])\n )\n finally:\n release_lock(curr)\n\n\nif __name__ == \"__main__\":\n run_migrations()\n", "path": "lifecycle/migrate.py" } ]
[ { "content": "#!/usr/bin/env python\n\"\"\"System Migration handler\"\"\"\nfrom importlib.util import module_from_spec, spec_from_file_location\nfrom inspect import getmembers, isclass\nfrom os import environ, system\nfrom pathlib import Path\nfrom typing import Any\n\nfrom psycopg import Connection, Cursor, connect\nfrom structlog.stdlib import get_logger\n\nfrom authentik.lib.config import CONFIG\n\nLOGGER = get_logger()\nADV_LOCK_UID = 1000\nLOCKED = False\n\n\nclass CommandError(Exception):\n \"\"\"Error raised when a system_crit command fails\"\"\"\n\n\nclass BaseMigration:\n \"\"\"Base System Migration\"\"\"\n\n cur: Cursor\n con: Connection\n\n def __init__(self, cur: Any, con: Any):\n self.cur = cur\n self.con = con\n\n def system_crit(self, command: str):\n \"\"\"Run system command\"\"\"\n LOGGER.debug(\"Running system_crit command\", command=command)\n retval = system(command) # nosec\n if retval != 0:\n raise CommandError(\"Migration error\")\n\n def fake_migration(self, *app_migration: tuple[str, str]):\n \"\"\"Fake apply a list of migrations, arguments are\n expected to be tuples of (app_label, migration_name)\"\"\"\n for app, _migration in app_migration:\n self.system_crit(f\"./manage.py migrate {app} {_migration} --fake\")\n\n def needs_migration(self) -> bool:\n \"\"\"Return true if Migration needs to be run\"\"\"\n return False\n\n def run(self):\n \"\"\"Run the actual migration\"\"\"\n\n\ndef wait_for_lock(cursor: Cursor):\n \"\"\"lock an advisory lock to prevent multiple instances from migrating at once\"\"\"\n LOGGER.info(\"waiting to acquire database lock\")\n cursor.execute(\"SELECT pg_advisory_lock(%s)\", (ADV_LOCK_UID,))\n\n global LOCKED # noqa: PLW0603\n LOCKED = True\n\n\ndef release_lock(cursor: Cursor):\n \"\"\"Release database lock\"\"\"\n if not LOCKED:\n return\n LOGGER.info(\"releasing database lock\")\n cursor.execute(\"SELECT pg_advisory_unlock(%s)\", (ADV_LOCK_UID,))\n\n\ndef run_migrations():\n conn = connect(\n dbname=CONFIG.get(\"postgresql.name\"),\n user=CONFIG.get(\"postgresql.user\"),\n password=CONFIG.get(\"postgresql.password\"),\n host=CONFIG.get(\"postgresql.host\"),\n port=CONFIG.get_int(\"postgresql.port\"),\n sslmode=CONFIG.get(\"postgresql.sslmode\"),\n sslrootcert=CONFIG.get(\"postgresql.sslrootcert\"),\n sslcert=CONFIG.get(\"postgresql.sslcert\"),\n sslkey=CONFIG.get(\"postgresql.sslkey\"),\n )\n curr = conn.cursor()\n try:\n for migration_path in Path(__file__).parent.absolute().glob(\"system_migrations/*.py\"):\n spec = spec_from_file_location(\"lifecycle.system_migrations\", migration_path)\n if not spec:\n continue\n mod = module_from_spec(spec)\n spec.loader.exec_module(mod)\n\n for name, sub in getmembers(mod, isclass):\n if name != \"Migration\":\n continue\n migration = sub(curr, conn)\n if migration.needs_migration():\n wait_for_lock(curr)\n LOGGER.info(\"Migration needs to be applied\", migration=migration_path.name)\n migration.run()\n LOGGER.info(\"Migration finished applying\", migration=migration_path.name)\n release_lock(curr)\n LOGGER.info(\"applying django migrations\")\n environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"authentik.root.settings\")\n wait_for_lock(curr)\n try:\n from django.core.management import execute_from_command_line\n except ImportError as exc:\n raise ImportError(\n \"Couldn't import Django. Are you sure it's installed and \"\n \"available on your PYTHONPATH environment variable? Did you \"\n \"forget to activate a virtual environment?\"\n ) from exc\n execute_from_command_line([\"\", \"migrate_schemas\"])\n execute_from_command_line([\"\", \"migrate_schemas\", \"--schema\", \"template\", \"--tenant\"])\n execute_from_command_line(\n [\"\", \"check\"] + ([] if CONFIG.get_bool(\"debug\") else [\"--deploy\"])\n )\n finally:\n release_lock(curr)\n curr.close()\n conn.close()\n\n\nif __name__ == \"__main__\":\n run_migrations()\n", "path": "lifecycle/migrate.py" } ]
diff --git a/lifecycle/migrate.py b/lifecycle/migrate.py index 42504c872f0d..a7f049a45484 100755 --- a/lifecycle/migrate.py +++ b/lifecycle/migrate.py @@ -117,6 +117,8 @@ def run_migrations(): ) finally: release_lock(curr) + curr.close() + conn.close() if __name__ == "__main__":
jupyterhub__jupyterhub-1526
Jupyterhub 0.8.0 radio buttons unclickable or ugly due to form-control class ``` jupyterhub --version 0.8.0 ``` I have some radio buttons in my spawner's `_option_form_default`: ``` return """<label for="type">Which type of instance do you want to launch?</label> <table> <tr> <td><input type="radio" name="type" value="c4.8xlarge" checked="checked"></td> <td>&nbsp;c4.8xlarge (36 CPU, 60GB RAM, $1.591/h)</td> </tr> <tr> <td><input type="radio" name="type" value="r4.8xlarge"></td> <td>&nbsp;r4.8xlarge (32 CPU, 244GB RAM, $2.341/h)</td> </tr> </table><br> """ ``` In `0.8.0` version these are unclickable. Removing `form-control` class introduced [here](https://github.com/jupyterhub/jupyterhub/blob/master/share/jupyter/hub/templates/spawn.html) fixes the issue for me. I also tried buttons like this: ``` <tr> <td><label> <input type="radio" name="type" value="c4.8xlarge"> &nbsp;c4.8xlarge (36 CPU, 60GB RAM, $1.591/h) </label></td> </tr> ``` These are clickable but look ugly with the `form-control` class. Removing the `form-control` class makes them both clickable and pretty :)
[ { "content": "\"\"\"JupyterHub version info\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nversion_info = (\n 0,\n 8,\n 2,\n 'dev',\n)\n\n__version__ = '.'.join(map(str, version_info))\n\n\ndef _check_version(hub_version, singleuser_version, log):\n \"\"\"Compare Hub and single-user server versions\"\"\"\n if not hub_version:\n log.warning(\"Hub has no version header, which means it is likely < 0.8. Expected %s\", __version__)\n return\n\n if not singleuser_version:\n log.warning(\"Single-user server has no version header, which means it is likely < 0.8. Expected %s\", __version__)\n return\n\n # compare minor X.Y versions\n if hub_version != singleuser_version:\n from distutils.version import LooseVersion as V\n hub_major_minor = V(hub_version).version[:2]\n singleuser_major_minor = V(singleuser_version).version[:2]\n extra = \"\"\n if singleuser_major_minor == hub_major_minor:\n # patch-level mismatch or lower, log difference at debug-level\n # because this should be fine\n log_method = log.debug\n else:\n # log warning-level for more significant mismatch, such as 0.8 vs 0.9, etc.\n log_method = log.warning\n extra = \" This could cause failure to authenticate and result in redirect loops!\"\n log_method(\n \"jupyterhub version %s != jupyterhub-singleuser version %s.\" + extra,\n hub_version,\n singleuser_version,\n )\n else:\n log.debug(\"jupyterhub and jupyterhub-singleuser both on version %s\" % hub_version)\n", "path": "jupyterhub/_version.py" } ]
[ { "content": "\"\"\"JupyterHub version info\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nversion_info = (\n 0,\n 8,\n 2,\n 'dev',\n)\n\n__version__ = '.'.join(map(str, version_info))\n\n\ndef _check_version(hub_version, singleuser_version, log):\n \"\"\"Compare Hub and single-user server versions\"\"\"\n if not hub_version:\n log.warning(\"Hub has no version header, which means it is likely < 0.8. Expected %s\", __version__)\n return\n\n if not singleuser_version:\n log.warning(\"Single-user server has no version header, which means it is likely < 0.8. Expected %s\", __version__)\n return\n\n # compare minor X.Y versions\n if hub_version != singleuser_version:\n from distutils.version import LooseVersion as V\n hub_major_minor = V(hub_version).version[:2]\n singleuser_major_minor = V(singleuser_version).version[:2]\n extra = \"\"\n if singleuser_major_minor == hub_major_minor:\n # patch-level mismatch or lower, log difference at debug-level\n # because this should be fine\n log_method = log.debug\n else:\n # log warning-level for more significant mismatch, such as 0.8 vs 0.9, etc.\n log_method = log.warning\n extra = \" This could cause failure to authenticate and result in redirect loops!\"\n log_method(\n \"jupyterhub version %s != jupyterhub-singleuser version %s.\" + extra,\n hub_version,\n singleuser_version,\n )\n else:\n log.debug(\"jupyterhub and jupyterhub-singleuser both on version %s\" % hub_version)\n", "path": "jupyterhub/_version.py" } ]
diff --git a/jupyterhub/_version.py b/jupyterhub/_version.py index eec6c65a76..e063b1c4ff 100644 --- a/jupyterhub/_version.py +++ b/jupyterhub/_version.py @@ -6,8 +6,8 @@ version_info = ( 0, 8, - 1, - # 'dev', + 2, + 'dev', ) __version__ = '.'.join(map(str, version_info)) diff --git a/share/jupyter/hub/templates/spawn.html b/share/jupyter/hub/templates/spawn.html index 3fb2c32b92..a28c0804dd 100644 --- a/share/jupyter/hub/templates/spawn.html +++ b/share/jupyter/hub/templates/spawn.html @@ -15,18 +15,10 @@ <h1>Spawner options</h1> <form enctype="multipart/form-data" id="spawn_form" action="{{url}}" method="post" role="form"> {{spawner_options_form | safe}} <br> - <input type="submit" value="Spawn" class="btn btn-jupyter"> + <input type="submit" value="Spawn" class="btn btn-jupyter form-control"> </form> </div> </div> {% endblock %} -{% block script %} -<script type="text/javascript"> -require(["jquery"], function ($) { - // add bootstrap form-control class to inputs - $("#spawn_form").find("input, select, textarea, button").addClass("form-control"); -}); -</script> -{% endblock %}
cowrie__cowrie-1434
Add mkdir as command **Is your feature request related to a problem? Please describe.** I see a lot of bots trying to build the .ssh directory or a tmp directory using mkdir. However, when the command is executed they get an error back that the command does not exist. **Describe the solution you'd like** Either have it create a virtual location (that only the attacker can see), or have it reply with a txtcommand with the following text: ``` mkdir: missing operand Try 'mkdir --help' for more information. ``` **Describe alternatives you've considered** Adding the command to txtcommands, but that does not seem to work properly (missing something?). **Additional context** Add any other context or screenshots about the feature request here.
[ { "content": "# Copyright (c) 2010 Upi Tamminen <[email protected]>\n# See the COPYRIGHT file for more information\n\n\n\"\"\"\nFilesystem related commands\n\"\"\"\n\nfrom __future__ import absolute_import, division\n\nimport copy\nimport getopt\nimport os.path\nimport re\n\nfrom twisted.python import log\n\nimport cowrie.shell.fs as fs\nfrom cowrie.shell.command import HoneyPotCommand\n\ncommands = {}\n\n\nclass command_grep(HoneyPotCommand):\n \"\"\"\n grep command\n \"\"\"\n\n def grep_get_contents(self, filename, match):\n try:\n contents = self.fs.file_contents(filename)\n self.grep_application(contents, match)\n except Exception:\n self.errorWrite(\"grep: {}: No such file or directory\\n\".format(filename))\n\n def grep_application(self, contents, match):\n match = os.path.basename(match).replace('\\\"', '').encode('utf8')\n matches = re.compile(match)\n contentsplit = contents.split(b'\\n')\n for line in contentsplit:\n if matches.search(line):\n self.writeBytes(line + b'\\n')\n\n def help(self):\n self.writeBytes(b'usage: grep [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\\n')\n self.writeBytes(b'\\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\\n')\n self.writeBytes(b'\\t[--context[=num]] [--directories=action] [--label] [--line-buffered]\\n')\n self.writeBytes(b'\\t[--null] [pattern] [file ...]\\n')\n\n def start(self):\n if not self.args:\n self.help()\n self.exit()\n return\n\n self.n = 10\n if self.args[0] == '>':\n pass\n else:\n try:\n optlist, args = getopt.getopt(self.args, 'abcDEFGHhIiJLlmnOoPqRSsUVvwxZA:B:C:e:f:')\n except getopt.GetoptError as err:\n self.errorWrite(\"grep: invalid option -- {}\\n\".format(err.opt))\n self.help()\n self.exit()\n return\n\n for opt in optlist:\n if opt == '-h':\n self.help()\n\n if not self.input_data:\n files = self.check_arguments('grep', args[1:])\n for pname in files:\n self.grep_get_contents(pname, args[0])\n else:\n self.grep_application(self.input_data, args[0])\n\n self.exit()\n\n def lineReceived(self, line):\n log.msg(eventid='cowrie.command.input',\n realm='grep',\n input=line,\n format='INPUT (%(realm)s): %(input)s')\n\n def handle_CTRL_D(self):\n self.exit()\n\n\ncommands['/bin/grep'] = command_grep\ncommands['grep'] = command_grep\ncommands['/bin/egrep'] = command_grep\ncommands['/bin/fgrep'] = command_grep\n\n\nclass command_tail(HoneyPotCommand):\n \"\"\"\n tail command\n \"\"\"\n\n def tail_get_contents(self, filename):\n try:\n contents = self.fs.file_contents(filename)\n self.tail_application(contents)\n except Exception:\n self.errorWrite(\"tail: cannot open `{}' for reading: No such file or directory\\n\".format(filename))\n\n def tail_application(self, contents):\n contentsplit = contents.split(b'\\n')\n lines = int(len(contentsplit))\n if lines < self.n:\n self.n = lines - 1\n i = 0\n for j in range((lines - self.n - 1), lines):\n self.writeBytes(contentsplit[j])\n if i < self.n:\n self.write('\\n')\n i += 1\n\n def start(self):\n self.n = 10\n if not self.args or self.args[0] == '>':\n return\n else:\n try:\n optlist, args = getopt.getopt(self.args, 'n:')\n except getopt.GetoptError as err:\n self.errorWrite(\"tail: invalid option -- '{}'\\n\".format(err.opt))\n self.exit()\n return\n\n for opt in optlist:\n if opt[0] == '-n':\n if not opt[1].isdigit():\n self.errorWrite(\"tail: illegal offset -- {}\\n\".format(opt[1]))\n else:\n self.n = int(opt[1])\n if not self.input_data:\n files = self.check_arguments(\"tail\", args)\n for pname in files:\n self.tail_get_contents(pname)\n else:\n self.tail_application(self.input_data)\n\n self.exit()\n\n def lineReceived(self, line):\n log.msg(eventid='cowrie.command.input',\n realm='tail',\n input=line,\n format='INPUT (%(realm)s): %(input)s')\n\n def handle_CTRL_D(self):\n self.exit()\n\n\ncommands['/bin/tail'] = command_tail\ncommands['/usr/bin/tail'] = command_tail\ncommands['tail'] = command_tail\n\n\nclass command_head(HoneyPotCommand):\n \"\"\"\n head command\n \"\"\"\n\n def head_application(self, contents):\n i = 0\n contentsplit = contents.split(b'\\n')\n for line in contentsplit:\n if i < self.n:\n self.writeBytes(line + b'\\n')\n i += 1\n\n def head_get_file_contents(self, filename):\n try:\n contents = self.fs.file_contents(filename)\n self.head_application(contents)\n except Exception:\n self.errorWrite(\"head: cannot open `{}' for reading: No such file or directory\\n\".format(filename))\n\n def start(self):\n self.n = 10\n if not self.args or self.args[0] == '>':\n return\n else:\n try:\n optlist, args = getopt.getopt(self.args, 'n:')\n except getopt.GetoptError as err:\n self.errorWrite(\"head: invalid option -- '{}'\\n\".format(err.opt))\n self.exit()\n return\n\n for opt in optlist:\n if opt[0] == '-n':\n if not opt[1].isdigit():\n self.errorWrite(\"head: illegal offset -- {}\\n\".format(opt[1]))\n else:\n self.n = int(opt[1])\n\n if not self.input_data:\n files = self.check_arguments(\"head\", args)\n for pname in files:\n self.head_get_file_contents(pname)\n else:\n self.head_application(self.input_data)\n self.exit()\n\n def lineReceived(self, line):\n log.msg(eventid='cowrie.command.input', realm='head', input=line,\n format='INPUT (%(realm)s): %(input)s')\n\n def handle_CTRL_D(self):\n self.exit()\n\n\ncommands['/bin/head'] = command_head\ncommands['/usr/bin/head'] = command_head\ncommands['head'] = command_head\n\n\nclass command_cd(HoneyPotCommand):\n \"\"\"\n cd command\n \"\"\"\n\n def call(self):\n if not self.args or self.args[0] == \"~\":\n pname = self.protocol.user.avatar.home\n else:\n pname = self.args[0]\n try:\n newpath = self.fs.resolve_path(pname, self.protocol.cwd)\n inode = self.fs.getfile(newpath)\n except Exception:\n pass\n if pname == \"-\":\n self.errorWrite('bash: cd: OLDPWD not set\\n')\n return\n if inode is None or inode is False:\n self.errorWrite('bash: cd: {}: No such file or directory\\n'.format(pname))\n return\n if inode[fs.A_TYPE] != fs.T_DIR:\n self.errorWrite('bash: cd: {}: Not a directory\\n'.format(pname))\n return\n self.protocol.cwd = newpath\n\n\ncommands['cd'] = command_cd\n\n\nclass command_rm(HoneyPotCommand):\n \"\"\"\n rm command\n \"\"\"\n def help(self):\n self.write(\n \"\"\"Usage: rm [OPTION]... [FILE]...\nRemove (unlink) the FILE(s).\n\n -f, --force ignore nonexistent files and arguments, never prompt\n -i prompt before every removal\n -I prompt once before removing more than three files, or\n when removing recursively; less intrusive than -i,\n while still giving protection against most mistakes\n --interactive[=WHEN] prompt according to WHEN: never, once (-I), or\n always (-i); without WHEN, prompt always\n --one-file-system when removing a hierarchy recursively, skip any\n directory that is on a file system different from\n that of the corresponding command line argument\n --no-preserve-root do not treat '/' specially\n --preserve-root do not remove '/' (default)\n -r, -R, --recursive remove directories and their contents recursively\n -d, --dir remove empty directories\n -v, --verbose explain what is being done\n --help display this help and exit\n --version output version information and exit\n\nBy default, rm does not remove directories. Use the --recursive (-r or -R)\noption to remove each listed directory, too, along with all of its contents.\n\nTo remove a file whose name starts with a '-', for example '-foo',\nuse one of these commands:\n rm -- -foo\n\n rm ./-foo\n\nNote that if you use rm to remove a file, it might be possible to recover\nsome of its contents, given sufficient expertise and/or time. For greater\nassurance that the contents are truly unrecoverable, consider using shred.\n\nGNU coreutils online help: <http://www.gnu.org/software/coreutils/>\nFull documentation at: <http://www.gnu.org/software/coreutils/rm>\nor available locally via: info '(coreutils) rm invocation'\\n\"\"\"\n )\n\n def paramError(self):\n self.errorWrite(\"Try 'rm --help' for more information\\n\")\n\n def call(self):\n recursive = False\n force = False\n verbose = False\n if not self.args:\n self.errorWrite(\"rm: missing operand\\n\")\n self.paramError()\n return\n\n try:\n optlist, args = getopt.gnu_getopt(self.args, 'rTfvh', ['help', 'recursive', 'force', 'verbose'])\n except getopt.GetoptError as err:\n self.errorWrite(\"rm: invalid option -- '{}'\\n\".format(err.opt))\n self.paramError()\n self.exit()\n return\n\n for o, a in optlist:\n if o in ('--recursive', '-r', '-R'):\n recursive = True\n elif o in ('--force', '-f'):\n force = True\n elif o in ('--verbose', '-v'):\n verbose = True\n elif o in ('--help', '-h'):\n self.help()\n return\n\n for f in args:\n pname = self.fs.resolve_path(f, self.protocol.cwd)\n try:\n # verify path to file exists\n dir = self.fs.get_path('/'.join(pname.split('/')[:-1]))\n # verify that the file itself exists\n self.fs.get_path(pname)\n except (IndexError, fs.FileNotFound):\n if not force:\n self.errorWrite(\n 'rm: cannot remove `{}\\': No such file or directory\\n'.format(f))\n continue\n basename = pname.split('/')[-1]\n for i in dir[:]:\n if i[fs.A_NAME] == basename:\n if i[fs.A_TYPE] == fs.T_DIR and not recursive:\n self.errorWrite('rm: cannot remove `{}\\': Is a directory\\n'.format(i[fs.A_NAME]))\n else:\n dir.remove(i)\n if verbose:\n if i[fs.A_TYPE] == fs.T_DIR:\n self.write('removed directory \\'{}\\'\\n'.format(i[fs.A_NAME]))\n else:\n self.write('removed \\'{}\\'\\n'.format(i[fs.A_NAME]))\n\n\ncommands['/bin/rm'] = command_rm\ncommands['rm'] = command_rm\n\n\nclass command_cp(HoneyPotCommand):\n \"\"\"\n cp command\n \"\"\"\n\n def call(self):\n if not len(self.args):\n self.errorWrite(\"cp: missing file operand\\n\")\n self.errorWrite(\"Try `cp --help' for more information.\\n\")\n return\n try:\n optlist, args = getopt.gnu_getopt(self.args,\n '-abdfiHlLPpRrsStTuvx')\n except getopt.GetoptError:\n self.errorWrite('Unrecognized option\\n')\n return\n recursive = False\n for opt in optlist:\n if opt[0] in ('-r', '-a', '-R'):\n recursive = True\n\n def resolv(pname):\n return self.fs.resolve_path(pname, self.protocol.cwd)\n\n if len(args) < 2:\n self.errorWrite(\"cp: missing destination file operand after `{}'\\n\".format(self.args[0]))\n self.errorWrite(\"Try `cp --help' for more information.\\n\")\n return\n sources, dest = args[:-1], args[-1]\n if len(sources) > 1 and not self.fs.isdir(resolv(dest)):\n self.errorWrite(\"cp: target `{}' is not a directory\\n\".format(dest))\n return\n\n if dest[-1] == '/' and not self.fs.exists(resolv(dest)) and \\\n not recursive:\n self.errorWrite(\n \"cp: cannot create regular file `{}': Is a directory\\n\".format(dest))\n return\n\n if self.fs.isdir(resolv(dest)):\n isdir = True\n else:\n isdir = False\n parent = os.path.dirname(resolv(dest))\n if not self.fs.exists(parent):\n self.errorWrite(\"cp: cannot create regular file \" + \"`{}': No such file or directory\\n\".format(dest))\n return\n\n for src in sources:\n if not self.fs.exists(resolv(src)):\n self.errorWrite(\n \"cp: cannot stat `{}': No such file or directory\\n\".format(src))\n continue\n if not recursive and self.fs.isdir(resolv(src)):\n self.errorWrite(\"cp: omitting directory `{}'\\n\".format(src))\n continue\n s = copy.deepcopy(self.fs.getfile(resolv(src)))\n if isdir:\n dir = self.fs.get_path(resolv(dest))\n outfile = os.path.basename(src)\n else:\n dir = self.fs.get_path(os.path.dirname(resolv(dest)))\n outfile = os.path.basename(dest.rstrip('/'))\n if outfile in [x[fs.A_NAME] for x in dir]:\n dir.remove([x for x in dir if x[fs.A_NAME] == outfile][0])\n s[fs.A_NAME] = outfile\n dir.append(s)\n\n\ncommands['/bin/cp'] = command_cp\ncommands['cp'] = command_cp\n\n\nclass command_mv(HoneyPotCommand):\n \"\"\"\n mv command\n \"\"\"\n\n def call(self):\n if not len(self.args):\n self.errorWrite(\"mv: missing file operand\\n\")\n self.errorWrite(\"Try `mv --help' for more information.\\n\")\n return\n\n try:\n optlist, args = getopt.gnu_getopt(self.args, '-bfiStTuv')\n except getopt.GetoptError:\n self.errorWrite('Unrecognized option\\n')\n self.exit()\n\n def resolv(pname):\n return self.fs.resolve_path(pname, self.protocol.cwd)\n\n if len(args) < 2:\n self.errorWrite(\"mv: missing destination file operand after `{}'\\n\".format(self.args[0]))\n self.errorWrite(\"Try `mv --help' for more information.\\n\")\n return\n sources, dest = args[:-1], args[-1]\n if len(sources) > 1 and not self.fs.isdir(resolv(dest)):\n self.errorWrite(\"mv: target `{}' is not a directory\\n\".format(dest))\n return\n\n if dest[-1] == '/' and not self.fs.exists(resolv(dest)) and len(sources) != 1:\n self.errorWrite(\n \"mv: cannot create regular file `{}': Is a directory\\n\".format(dest))\n return\n\n if self.fs.isdir(resolv(dest)):\n isdir = True\n else:\n isdir = False\n parent = os.path.dirname(resolv(dest))\n if not self.fs.exists(parent):\n self.errorWrite(\"mv: cannot create regular file \" + \"`{}': No such file or directory\\n\".format(dest))\n return\n\n for src in sources:\n if not self.fs.exists(resolv(src)):\n self.errorWrite(\n \"mv: cannot stat `{}': No such file or directory\\n\".format(src))\n continue\n s = self.fs.getfile(resolv(src))\n if isdir:\n dir = self.fs.get_path(resolv(dest))\n outfile = os.path.basename(src)\n else:\n dir = self.fs.get_path(os.path.dirname(resolv(dest)))\n outfile = os.path.basename(dest)\n if dir != os.path.dirname(resolv(src)):\n s[fs.A_NAME] = outfile\n dir.append(s)\n sdir = self.fs.get_path(os.path.dirname(resolv(src)))\n sdir.remove(s)\n else:\n s[fs.A_NAME] = outfile\n\n\ncommands['/bin/mv'] = command_mv\ncommands['mv'] = command_mv\n\n\nclass command_mkdir(HoneyPotCommand):\n \"\"\"\n mkdir command\n \"\"\"\n\n def call(self):\n for f in self.args:\n pname = self.fs.resolve_path(f, self.protocol.cwd)\n if self.fs.exists(pname):\n self.errorWrite(\n 'mkdir: cannot create directory `{}\\': File exists\\n'.format(f))\n return\n try:\n self.fs.mkdir(pname, 0, 0, 4096, 16877)\n except (fs.FileNotFound):\n self.errorWrite('mkdir: cannot create directory `{}\\': No such file or directory\\n'.format(f))\n return\n\n\ncommands['/bin/mkdir'] = command_mkdir\n\n\nclass command_rmdir(HoneyPotCommand):\n \"\"\"\n rmdir command\n \"\"\"\n\n def call(self):\n for f in self.args:\n pname = self.fs.resolve_path(f, self.protocol.cwd)\n try:\n if len(self.fs.get_path(pname)):\n self.errorWrite(\n 'rmdir: failed to remove `{}\\': Directory not empty\\n'.format(f))\n continue\n dir = self.fs.get_path('/'.join(pname.split('/')[:-1]))\n except (IndexError, fs.FileNotFound):\n dir = None\n fname = os.path.basename(f)\n if not dir or fname not in [x[fs.A_NAME] for x in dir]:\n self.errorWrite(\n 'rmdir: failed to remove `{}\\': No such file or directory\\n'.format(f))\n continue\n for i in dir[:]:\n if i[fs.A_NAME] == fname:\n if i[fs.A_TYPE] != fs.T_DIR:\n self.errorWrite(\"rmdir: failed to remove '{}': Not a directory\\n\".format(f))\n return\n dir.remove(i)\n break\n\n\ncommands['/bin/rmdir'] = command_rmdir\ncommands['rmdir'] = command_rmdir\n\n\nclass command_pwd(HoneyPotCommand):\n \"\"\"\n pwd command\n \"\"\"\n\n def call(self):\n self.write(self.protocol.cwd + '\\n')\n\n\ncommands['/bin/pwd'] = command_pwd\ncommands['pwd'] = command_pwd\n\n\nclass command_touch(HoneyPotCommand):\n \"\"\"\n touch command\n \"\"\"\n\n def call(self):\n if not len(self.args):\n self.errorWrite('touch: missing file operand\\n')\n self.errorWrite('Try `touch --help\\' for more information.\\n')\n return\n for f in self.args:\n pname = self.fs.resolve_path(f, self.protocol.cwd)\n if not self.fs.exists(os.path.dirname(pname)):\n self.errorWrite(\n 'touch: cannot touch `{}`: No such file or directory\\n'.format(pname))\n return\n if self.fs.exists(pname):\n # FIXME: modify the timestamp here\n continue\n # can't touch in special directories\n if any([pname.startswith(_p) for _p in fs.SPECIAL_PATHS]):\n self.errorWrite(\n 'touch: cannot touch `{}`: Permission denied\\n'.format(pname))\n return\n\n self.fs.mkfile(pname, 0, 0, 0, 33188)\n\n\ncommands['/bin/touch'] = command_touch\ncommands['touch'] = command_touch\ncommands['>'] = command_touch\n", "path": "src/cowrie/commands/fs.py" } ]
[ { "content": "# Copyright (c) 2010 Upi Tamminen <[email protected]>\n# See the COPYRIGHT file for more information\n\n\n\"\"\"\nFilesystem related commands\n\"\"\"\n\nfrom __future__ import absolute_import, division\n\nimport copy\nimport getopt\nimport os.path\nimport re\n\nfrom twisted.python import log\n\nimport cowrie.shell.fs as fs\nfrom cowrie.shell.command import HoneyPotCommand\n\ncommands = {}\n\n\nclass command_grep(HoneyPotCommand):\n \"\"\"\n grep command\n \"\"\"\n\n def grep_get_contents(self, filename, match):\n try:\n contents = self.fs.file_contents(filename)\n self.grep_application(contents, match)\n except Exception:\n self.errorWrite(\"grep: {}: No such file or directory\\n\".format(filename))\n\n def grep_application(self, contents, match):\n match = os.path.basename(match).replace('\\\"', '').encode('utf8')\n matches = re.compile(match)\n contentsplit = contents.split(b'\\n')\n for line in contentsplit:\n if matches.search(line):\n self.writeBytes(line + b'\\n')\n\n def help(self):\n self.writeBytes(b'usage: grep [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\\n')\n self.writeBytes(b'\\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\\n')\n self.writeBytes(b'\\t[--context[=num]] [--directories=action] [--label] [--line-buffered]\\n')\n self.writeBytes(b'\\t[--null] [pattern] [file ...]\\n')\n\n def start(self):\n if not self.args:\n self.help()\n self.exit()\n return\n\n self.n = 10\n if self.args[0] == '>':\n pass\n else:\n try:\n optlist, args = getopt.getopt(self.args, 'abcDEFGHhIiJLlmnOoPqRSsUVvwxZA:B:C:e:f:')\n except getopt.GetoptError as err:\n self.errorWrite(\"grep: invalid option -- {}\\n\".format(err.opt))\n self.help()\n self.exit()\n return\n\n for opt in optlist:\n if opt == '-h':\n self.help()\n\n if not self.input_data:\n files = self.check_arguments('grep', args[1:])\n for pname in files:\n self.grep_get_contents(pname, args[0])\n else:\n self.grep_application(self.input_data, args[0])\n\n self.exit()\n\n def lineReceived(self, line):\n log.msg(eventid='cowrie.command.input',\n realm='grep',\n input=line,\n format='INPUT (%(realm)s): %(input)s')\n\n def handle_CTRL_D(self):\n self.exit()\n\n\ncommands['/bin/grep'] = command_grep\ncommands['grep'] = command_grep\ncommands['/bin/egrep'] = command_grep\ncommands['/bin/fgrep'] = command_grep\n\n\nclass command_tail(HoneyPotCommand):\n \"\"\"\n tail command\n \"\"\"\n\n def tail_get_contents(self, filename):\n try:\n contents = self.fs.file_contents(filename)\n self.tail_application(contents)\n except Exception:\n self.errorWrite(\"tail: cannot open `{}' for reading: No such file or directory\\n\".format(filename))\n\n def tail_application(self, contents):\n contentsplit = contents.split(b'\\n')\n lines = int(len(contentsplit))\n if lines < self.n:\n self.n = lines - 1\n i = 0\n for j in range((lines - self.n - 1), lines):\n self.writeBytes(contentsplit[j])\n if i < self.n:\n self.write('\\n')\n i += 1\n\n def start(self):\n self.n = 10\n if not self.args or self.args[0] == '>':\n return\n else:\n try:\n optlist, args = getopt.getopt(self.args, 'n:')\n except getopt.GetoptError as err:\n self.errorWrite(\"tail: invalid option -- '{}'\\n\".format(err.opt))\n self.exit()\n return\n\n for opt in optlist:\n if opt[0] == '-n':\n if not opt[1].isdigit():\n self.errorWrite(\"tail: illegal offset -- {}\\n\".format(opt[1]))\n else:\n self.n = int(opt[1])\n if not self.input_data:\n files = self.check_arguments(\"tail\", args)\n for pname in files:\n self.tail_get_contents(pname)\n else:\n self.tail_application(self.input_data)\n\n self.exit()\n\n def lineReceived(self, line):\n log.msg(eventid='cowrie.command.input',\n realm='tail',\n input=line,\n format='INPUT (%(realm)s): %(input)s')\n\n def handle_CTRL_D(self):\n self.exit()\n\n\ncommands['/bin/tail'] = command_tail\ncommands['/usr/bin/tail'] = command_tail\ncommands['tail'] = command_tail\n\n\nclass command_head(HoneyPotCommand):\n \"\"\"\n head command\n \"\"\"\n\n def head_application(self, contents):\n i = 0\n contentsplit = contents.split(b'\\n')\n for line in contentsplit:\n if i < self.n:\n self.writeBytes(line + b'\\n')\n i += 1\n\n def head_get_file_contents(self, filename):\n try:\n contents = self.fs.file_contents(filename)\n self.head_application(contents)\n except Exception:\n self.errorWrite(\"head: cannot open `{}' for reading: No such file or directory\\n\".format(filename))\n\n def start(self):\n self.n = 10\n if not self.args or self.args[0] == '>':\n return\n else:\n try:\n optlist, args = getopt.getopt(self.args, 'n:')\n except getopt.GetoptError as err:\n self.errorWrite(\"head: invalid option -- '{}'\\n\".format(err.opt))\n self.exit()\n return\n\n for opt in optlist:\n if opt[0] == '-n':\n if not opt[1].isdigit():\n self.errorWrite(\"head: illegal offset -- {}\\n\".format(opt[1]))\n else:\n self.n = int(opt[1])\n\n if not self.input_data:\n files = self.check_arguments(\"head\", args)\n for pname in files:\n self.head_get_file_contents(pname)\n else:\n self.head_application(self.input_data)\n self.exit()\n\n def lineReceived(self, line):\n log.msg(eventid='cowrie.command.input', realm='head', input=line,\n format='INPUT (%(realm)s): %(input)s')\n\n def handle_CTRL_D(self):\n self.exit()\n\n\ncommands['/bin/head'] = command_head\ncommands['/usr/bin/head'] = command_head\ncommands['head'] = command_head\n\n\nclass command_cd(HoneyPotCommand):\n \"\"\"\n cd command\n \"\"\"\n\n def call(self):\n if not self.args or self.args[0] == \"~\":\n pname = self.protocol.user.avatar.home\n else:\n pname = self.args[0]\n try:\n newpath = self.fs.resolve_path(pname, self.protocol.cwd)\n inode = self.fs.getfile(newpath)\n except Exception:\n pass\n if pname == \"-\":\n self.errorWrite('bash: cd: OLDPWD not set\\n')\n return\n if inode is None or inode is False:\n self.errorWrite('bash: cd: {}: No such file or directory\\n'.format(pname))\n return\n if inode[fs.A_TYPE] != fs.T_DIR:\n self.errorWrite('bash: cd: {}: Not a directory\\n'.format(pname))\n return\n self.protocol.cwd = newpath\n\n\ncommands['cd'] = command_cd\n\n\nclass command_rm(HoneyPotCommand):\n \"\"\"\n rm command\n \"\"\"\n def help(self):\n self.write(\n \"\"\"Usage: rm [OPTION]... [FILE]...\nRemove (unlink) the FILE(s).\n\n -f, --force ignore nonexistent files and arguments, never prompt\n -i prompt before every removal\n -I prompt once before removing more than three files, or\n when removing recursively; less intrusive than -i,\n while still giving protection against most mistakes\n --interactive[=WHEN] prompt according to WHEN: never, once (-I), or\n always (-i); without WHEN, prompt always\n --one-file-system when removing a hierarchy recursively, skip any\n directory that is on a file system different from\n that of the corresponding command line argument\n --no-preserve-root do not treat '/' specially\n --preserve-root do not remove '/' (default)\n -r, -R, --recursive remove directories and their contents recursively\n -d, --dir remove empty directories\n -v, --verbose explain what is being done\n --help display this help and exit\n --version output version information and exit\n\nBy default, rm does not remove directories. Use the --recursive (-r or -R)\noption to remove each listed directory, too, along with all of its contents.\n\nTo remove a file whose name starts with a '-', for example '-foo',\nuse one of these commands:\n rm -- -foo\n\n rm ./-foo\n\nNote that if you use rm to remove a file, it might be possible to recover\nsome of its contents, given sufficient expertise and/or time. For greater\nassurance that the contents are truly unrecoverable, consider using shred.\n\nGNU coreutils online help: <http://www.gnu.org/software/coreutils/>\nFull documentation at: <http://www.gnu.org/software/coreutils/rm>\nor available locally via: info '(coreutils) rm invocation'\\n\"\"\"\n )\n\n def paramError(self):\n self.errorWrite(\"Try 'rm --help' for more information\\n\")\n\n def call(self):\n recursive = False\n force = False\n verbose = False\n if not self.args:\n self.errorWrite(\"rm: missing operand\\n\")\n self.paramError()\n return\n\n try:\n optlist, args = getopt.gnu_getopt(self.args, 'rTfvh', ['help', 'recursive', 'force', 'verbose'])\n except getopt.GetoptError as err:\n self.errorWrite(\"rm: invalid option -- '{}'\\n\".format(err.opt))\n self.paramError()\n self.exit()\n return\n\n for o, a in optlist:\n if o in ('--recursive', '-r', '-R'):\n recursive = True\n elif o in ('--force', '-f'):\n force = True\n elif o in ('--verbose', '-v'):\n verbose = True\n elif o in ('--help', '-h'):\n self.help()\n return\n\n for f in args:\n pname = self.fs.resolve_path(f, self.protocol.cwd)\n try:\n # verify path to file exists\n dir = self.fs.get_path('/'.join(pname.split('/')[:-1]))\n # verify that the file itself exists\n self.fs.get_path(pname)\n except (IndexError, fs.FileNotFound):\n if not force:\n self.errorWrite(\n 'rm: cannot remove `{}\\': No such file or directory\\n'.format(f))\n continue\n basename = pname.split('/')[-1]\n for i in dir[:]:\n if i[fs.A_NAME] == basename:\n if i[fs.A_TYPE] == fs.T_DIR and not recursive:\n self.errorWrite('rm: cannot remove `{}\\': Is a directory\\n'.format(i[fs.A_NAME]))\n else:\n dir.remove(i)\n if verbose:\n if i[fs.A_TYPE] == fs.T_DIR:\n self.write('removed directory \\'{}\\'\\n'.format(i[fs.A_NAME]))\n else:\n self.write('removed \\'{}\\'\\n'.format(i[fs.A_NAME]))\n\n\ncommands['/bin/rm'] = command_rm\ncommands['rm'] = command_rm\n\n\nclass command_cp(HoneyPotCommand):\n \"\"\"\n cp command\n \"\"\"\n\n def call(self):\n if not len(self.args):\n self.errorWrite(\"cp: missing file operand\\n\")\n self.errorWrite(\"Try `cp --help' for more information.\\n\")\n return\n try:\n optlist, args = getopt.gnu_getopt(self.args,\n '-abdfiHlLPpRrsStTuvx')\n except getopt.GetoptError:\n self.errorWrite('Unrecognized option\\n')\n return\n recursive = False\n for opt in optlist:\n if opt[0] in ('-r', '-a', '-R'):\n recursive = True\n\n def resolv(pname):\n return self.fs.resolve_path(pname, self.protocol.cwd)\n\n if len(args) < 2:\n self.errorWrite(\"cp: missing destination file operand after `{}'\\n\".format(self.args[0]))\n self.errorWrite(\"Try `cp --help' for more information.\\n\")\n return\n sources, dest = args[:-1], args[-1]\n if len(sources) > 1 and not self.fs.isdir(resolv(dest)):\n self.errorWrite(\"cp: target `{}' is not a directory\\n\".format(dest))\n return\n\n if dest[-1] == '/' and not self.fs.exists(resolv(dest)) and \\\n not recursive:\n self.errorWrite(\n \"cp: cannot create regular file `{}': Is a directory\\n\".format(dest))\n return\n\n if self.fs.isdir(resolv(dest)):\n isdir = True\n else:\n isdir = False\n parent = os.path.dirname(resolv(dest))\n if not self.fs.exists(parent):\n self.errorWrite(\"cp: cannot create regular file \" + \"`{}': No such file or directory\\n\".format(dest))\n return\n\n for src in sources:\n if not self.fs.exists(resolv(src)):\n self.errorWrite(\n \"cp: cannot stat `{}': No such file or directory\\n\".format(src))\n continue\n if not recursive and self.fs.isdir(resolv(src)):\n self.errorWrite(\"cp: omitting directory `{}'\\n\".format(src))\n continue\n s = copy.deepcopy(self.fs.getfile(resolv(src)))\n if isdir:\n dir = self.fs.get_path(resolv(dest))\n outfile = os.path.basename(src)\n else:\n dir = self.fs.get_path(os.path.dirname(resolv(dest)))\n outfile = os.path.basename(dest.rstrip('/'))\n if outfile in [x[fs.A_NAME] for x in dir]:\n dir.remove([x for x in dir if x[fs.A_NAME] == outfile][0])\n s[fs.A_NAME] = outfile\n dir.append(s)\n\n\ncommands['/bin/cp'] = command_cp\ncommands['cp'] = command_cp\n\n\nclass command_mv(HoneyPotCommand):\n \"\"\"\n mv command\n \"\"\"\n\n def call(self):\n if not len(self.args):\n self.errorWrite(\"mv: missing file operand\\n\")\n self.errorWrite(\"Try `mv --help' for more information.\\n\")\n return\n\n try:\n optlist, args = getopt.gnu_getopt(self.args, '-bfiStTuv')\n except getopt.GetoptError:\n self.errorWrite('Unrecognized option\\n')\n self.exit()\n\n def resolv(pname):\n return self.fs.resolve_path(pname, self.protocol.cwd)\n\n if len(args) < 2:\n self.errorWrite(\"mv: missing destination file operand after `{}'\\n\".format(self.args[0]))\n self.errorWrite(\"Try `mv --help' for more information.\\n\")\n return\n sources, dest = args[:-1], args[-1]\n if len(sources) > 1 and not self.fs.isdir(resolv(dest)):\n self.errorWrite(\"mv: target `{}' is not a directory\\n\".format(dest))\n return\n\n if dest[-1] == '/' and not self.fs.exists(resolv(dest)) and len(sources) != 1:\n self.errorWrite(\n \"mv: cannot create regular file `{}': Is a directory\\n\".format(dest))\n return\n\n if self.fs.isdir(resolv(dest)):\n isdir = True\n else:\n isdir = False\n parent = os.path.dirname(resolv(dest))\n if not self.fs.exists(parent):\n self.errorWrite(\"mv: cannot create regular file \" + \"`{}': No such file or directory\\n\".format(dest))\n return\n\n for src in sources:\n if not self.fs.exists(resolv(src)):\n self.errorWrite(\n \"mv: cannot stat `{}': No such file or directory\\n\".format(src))\n continue\n s = self.fs.getfile(resolv(src))\n if isdir:\n dir = self.fs.get_path(resolv(dest))\n outfile = os.path.basename(src)\n else:\n dir = self.fs.get_path(os.path.dirname(resolv(dest)))\n outfile = os.path.basename(dest)\n if dir != os.path.dirname(resolv(src)):\n s[fs.A_NAME] = outfile\n dir.append(s)\n sdir = self.fs.get_path(os.path.dirname(resolv(src)))\n sdir.remove(s)\n else:\n s[fs.A_NAME] = outfile\n\n\ncommands['/bin/mv'] = command_mv\ncommands['mv'] = command_mv\n\n\nclass command_mkdir(HoneyPotCommand):\n \"\"\"\n mkdir command\n \"\"\"\n\n def call(self):\n for f in self.args:\n pname = self.fs.resolve_path(f, self.protocol.cwd)\n if self.fs.exists(pname):\n self.errorWrite(\n 'mkdir: cannot create directory `{}\\': File exists\\n'.format(f))\n return\n try:\n self.fs.mkdir(pname, 0, 0, 4096, 16877)\n except (fs.FileNotFound):\n self.errorWrite('mkdir: cannot create directory `{}\\': No such file or directory\\n'.format(f))\n return\n\n\ncommands['/bin/mkdir'] = command_mkdir\ncommands['mkdir'] = command_mkdir\n\n\nclass command_rmdir(HoneyPotCommand):\n \"\"\"\n rmdir command\n \"\"\"\n\n def call(self):\n for f in self.args:\n pname = self.fs.resolve_path(f, self.protocol.cwd)\n try:\n if len(self.fs.get_path(pname)):\n self.errorWrite(\n 'rmdir: failed to remove `{}\\': Directory not empty\\n'.format(f))\n continue\n dir = self.fs.get_path('/'.join(pname.split('/')[:-1]))\n except (IndexError, fs.FileNotFound):\n dir = None\n fname = os.path.basename(f)\n if not dir or fname not in [x[fs.A_NAME] for x in dir]:\n self.errorWrite(\n 'rmdir: failed to remove `{}\\': No such file or directory\\n'.format(f))\n continue\n for i in dir[:]:\n if i[fs.A_NAME] == fname:\n if i[fs.A_TYPE] != fs.T_DIR:\n self.errorWrite(\"rmdir: failed to remove '{}': Not a directory\\n\".format(f))\n return\n dir.remove(i)\n break\n\n\ncommands['/bin/rmdir'] = command_rmdir\ncommands['rmdir'] = command_rmdir\n\n\nclass command_pwd(HoneyPotCommand):\n \"\"\"\n pwd command\n \"\"\"\n\n def call(self):\n self.write(self.protocol.cwd + '\\n')\n\n\ncommands['/bin/pwd'] = command_pwd\ncommands['pwd'] = command_pwd\n\n\nclass command_touch(HoneyPotCommand):\n \"\"\"\n touch command\n \"\"\"\n\n def call(self):\n if not len(self.args):\n self.errorWrite('touch: missing file operand\\n')\n self.errorWrite('Try `touch --help\\' for more information.\\n')\n return\n for f in self.args:\n pname = self.fs.resolve_path(f, self.protocol.cwd)\n if not self.fs.exists(os.path.dirname(pname)):\n self.errorWrite(\n 'touch: cannot touch `{}`: No such file or directory\\n'.format(pname))\n return\n if self.fs.exists(pname):\n # FIXME: modify the timestamp here\n continue\n # can't touch in special directories\n if any([pname.startswith(_p) for _p in fs.SPECIAL_PATHS]):\n self.errorWrite(\n 'touch: cannot touch `{}`: Permission denied\\n'.format(pname))\n return\n\n self.fs.mkfile(pname, 0, 0, 0, 33188)\n\n\ncommands['/bin/touch'] = command_touch\ncommands['touch'] = command_touch\ncommands['>'] = command_touch\n", "path": "src/cowrie/commands/fs.py" } ]
diff --git a/src/cowrie/commands/fs.py b/src/cowrie/commands/fs.py index 49153b1946..8a2422e476 100644 --- a/src/cowrie/commands/fs.py +++ b/src/cowrie/commands/fs.py @@ -517,6 +517,7 @@ def call(self): commands['/bin/mkdir'] = command_mkdir +commands['mkdir'] = command_mkdir class command_rmdir(HoneyPotCommand):
joke2k__faker-1235
French IBAN should be 27 char of length * Faker version: 4.1.1 ### Steps to reproduce ``` import faker from faker import Faker fake = Faker('fr_FR') fr_iban = fake.iban() fr_iban 'FR96505438725498141631455686' len(fr_iban) 28 ``` ### Expected behavior ``` >>> len(fr_iban) 27 ``` [As stated on wikipedia in France row](https://en.wikipedia.org/wiki/International_Bank_Account_Number#IBAN_formats_by_country) ### Actual behavior ``` >>> len(fr_iban) 28 ```
[ { "content": "from .. import Provider as BankProvider\n\n\nclass Provider(BankProvider):\n bban_format = '########################'\n country_code = 'FR'\n", "path": "faker/providers/bank/fr_FR/__init__.py" } ]
[ { "content": "from .. import Provider as BankProvider\n\n\nclass Provider(BankProvider):\n bban_format = '#######################'\n country_code = 'FR'\n", "path": "faker/providers/bank/fr_FR/__init__.py" } ]
diff --git a/faker/providers/bank/fr_FR/__init__.py b/faker/providers/bank/fr_FR/__init__.py index 0047f58dcd..f2ff8a98d9 100644 --- a/faker/providers/bank/fr_FR/__init__.py +++ b/faker/providers/bank/fr_FR/__init__.py @@ -2,5 +2,5 @@ class Provider(BankProvider): - bban_format = '########################' + bban_format = '#######################' country_code = 'FR' diff --git a/tests/providers/test_bank.py b/tests/providers/test_bank.py index c1f4cd195d..d06eb7fe0e 100644 --- a/tests/providers/test_bank.py +++ b/tests/providers/test_bank.py @@ -131,6 +131,22 @@ def test_iban(self): assert re.match(r"ES\d{22}", iban) +class TestFrFR(unittest.TestCase): + """Tests the bank provider for fr_FR locale""" + + def setUp(self): + self.fake = Faker('fr_FR') + Faker.seed(0) + + def test_bban(self): + bban = self.fake.bban() + assert re.match(r"\d{23}", bban) + + def test_iban(self): + iban = self.fake.iban() + assert re.match(r"FR\d{25}", iban) + + class TestEnPh: def test_swift(self, faker, num_samples):
jazzband__django-axes-586
Issue loading default settings on production server Just launching a project onto AWS (fargate) servers & we're unable to login due to a missing setting. Although it's one of the axes defaults, so it's not being loaded properly. This is happening only on the AWS setup, unable to replicate locally or within our docker setup which builds our fargate containers when running `docker-compose`. Which makes this an awkward issue to raise. Trying to login via admin results in the following; ```bash AttributeError: 'Settings' object has no attribute 'AXES_PROXY_ORDER' File "django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "django/views/decorators/cache.py", line 44, in _wrapped_view_func response = view_func(request, *args, **kwargs) File "django/contrib/admin/sites.py", line 399, in login return LoginView.as_view(**defaults)(request) File "django/views/generic/base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "django/utils/decorators.py", line 45, in _wrapper return bound_method(*args, **kwargs) File "django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper return view(request, *args, **kwargs) File "django/utils/decorators.py", line 45, in _wrapper return bound_method(*args, **kwargs) File "django/utils/decorators.py", line 142, in _wrapped_view response = view_func(request, *args, **kwargs) File "django/utils/decorators.py", line 45, in _wrapper return bound_method(*args, **kwargs) File "django/views/decorators/cache.py", line 44, in _wrapped_view_func response = view_func(request, *args, **kwargs) File "django/contrib/auth/views.py", line 61, in dispatch return super().dispatch(request, *args, **kwargs) File "django/views/generic/base.py", line 97, in dispatch return handler(request, *args, **kwargs) File "django/views/generic/edit.py", line 141, in post if form.is_valid(): File "django/forms/forms.py", line 185, in is_valid return self.is_bound and not self.errors File "django/forms/forms.py", line 180, in errors self.full_clean() File "django/forms/forms.py", line 382, in full_clean self._clean_form() File "django/forms/forms.py", line 409, in _clean_form cleaned_data = self.clean() File "django/contrib/auth/forms.py", line 205, in clean self.user_cache = authenticate(self.request, username=username, password=password) File "django/contrib/auth/__init__.py", line 73, in authenticate user = backend.authenticate(request, **credentials) File "axes/helpers.py", line 459, in inner return func(*args, **kwargs) File "axes/backends.py", line 44, in authenticate if AxesProxyHandler.is_allowed(request, credentials): File "axes/handlers/proxy.py", line 82, in is_allowed cls.update_request(request) File "axes/handlers/proxy.py", line 69, in update_request request.axes_ip_address = get_client_ip_address(request) File "axes/helpers.py", line 161, in get_client_ip_address proxy_order=settings.AXES_PROXY_ORDER, File "django/conf/__init__.py", line 80, in __getattr__ val = getattr(self._wrapped, name) ``` Looking at `django-appconf` we assume that the issues comes from this section of code; ```python prefix = getattr(meta, 'prefix', getattr(meta, 'app_label', None)) if prefix is None: # Figure out the prefix by looking one level up. # For 'django.contrib.sites.models', this would be 'sites'. model_module = sys.modules[new_class.__module__] prefix = model_module.__name__.split('.')[-2] ``` Therefore the solution to this would be to set the prefix via the meta in `AxesAppConf` to avoid sniffing the module name & be explicit about the setting prefix.
[ { "content": "from django.conf import settings\nfrom django.utils.translation import gettext_lazy as _\n\nfrom appconf import AppConf\n\n\nclass AxesAppConf(AppConf):\n # disable plugin when set to False\n ENABLED = True\n\n # see if the user has overridden the failure limit\n FAILURE_LIMIT = 3\n\n # see if the user has set axes to lock out logins after failure limit\n LOCK_OUT_AT_FAILURE = True\n\n # lock out with the combination of username and IP address\n LOCK_OUT_BY_COMBINATION_USER_AND_IP = False\n\n # lock out with username and never the IP or user agent\n ONLY_USER_FAILURES = False\n\n # lock out just for admin site\n ONLY_ADMIN_SITE = False\n\n # show Axes logs in admin\n ENABLE_ADMIN = True\n\n # lock out with the user agent, has no effect when ONLY_USER_FAILURES is set\n USE_USER_AGENT = False\n\n # use a specific username field to retrieve from login POST data\n USERNAME_FORM_FIELD = \"username\"\n\n # use a specific password field to retrieve from login POST data\n PASSWORD_FORM_FIELD = \"password\" # noqa\n\n # use a provided callable to transform the POSTed username into the one used in credentials\n USERNAME_CALLABLE = None\n\n # determine if given user should be always allowed to attempt authentication\n WHITELIST_CALLABLE = None\n\n # return custom lockout response if configured\n LOCKOUT_CALLABLE = None\n\n # reset the number of failed attempts after one successful attempt\n RESET_ON_SUCCESS = False\n\n DISABLE_ACCESS_LOG = False\n\n HANDLER = \"axes.handlers.database.AxesDatabaseHandler\"\n\n LOGGER = \"axes.watch_login\"\n\n LOCKOUT_TEMPLATE = None\n\n LOCKOUT_URL = None\n\n COOLOFF_TIME = None\n\n VERBOSE = True\n\n # whitelist and blacklist\n NEVER_LOCKOUT_WHITELIST = False\n\n NEVER_LOCKOUT_GET = False\n\n ONLY_WHITELIST = False\n\n IP_WHITELIST = None\n\n IP_BLACKLIST = None\n\n # message to show when locked out and have cooloff enabled\n COOLOFF_MESSAGE = _(\n \"Account locked: too many login attempts. Please try again later\"\n )\n\n # message to show when locked out and have cooloff disabled\n PERMALOCK_MESSAGE = _(\n \"Account locked: too many login attempts. Contact an admin to unlock your account.\"\n )\n\n # if your deployment is using reverse proxies, set this value to 'left-most' or 'right-most' per your configuration\n PROXY_ORDER = \"left-most\"\n\n # if your deployment is using reverse proxies, set this value to the number of proxies in front of Django\n PROXY_COUNT = None\n\n # if your deployment is using reverse proxies, set to your trusted proxy IP addresses prefixes if needed\n PROXY_TRUSTED_IPS = None\n\n # set to the names of request.META attributes that should be checked for the IP address of the client\n # if your deployment is using reverse proxies, ensure that the header attributes are securely set by the proxy\n # ensure that the client can not spoof the headers by setting them and sending them through the proxy\n META_PRECEDENCE_ORDER = getattr(\n settings,\n \"AXES_META_PRECEDENCE_ORDER\",\n getattr(settings, \"IPWARE_META_PRECEDENCE_ORDER\", (\"REMOTE_ADDR\",)),\n )\n\n # set to `True` if using with Django REST Framework\n REST_FRAMEWORK_ACTIVE = False\n", "path": "axes/conf.py" } ]
[ { "content": "from django.conf import settings\nfrom django.utils.translation import gettext_lazy as _\n\nfrom appconf import AppConf\n\n\nclass AxesAppConf(AppConf):\n class Meta:\n prefix = \"axes\"\n\n # disable plugin when set to False\n ENABLED = True\n\n # see if the user has overridden the failure limit\n FAILURE_LIMIT = 3\n\n # see if the user has set axes to lock out logins after failure limit\n LOCK_OUT_AT_FAILURE = True\n\n # lock out with the combination of username and IP address\n LOCK_OUT_BY_COMBINATION_USER_AND_IP = False\n\n # lock out with username and never the IP or user agent\n ONLY_USER_FAILURES = False\n\n # lock out just for admin site\n ONLY_ADMIN_SITE = False\n\n # show Axes logs in admin\n ENABLE_ADMIN = True\n\n # lock out with the user agent, has no effect when ONLY_USER_FAILURES is set\n USE_USER_AGENT = False\n\n # use a specific username field to retrieve from login POST data\n USERNAME_FORM_FIELD = \"username\"\n\n # use a specific password field to retrieve from login POST data\n PASSWORD_FORM_FIELD = \"password\" # noqa\n\n # use a provided callable to transform the POSTed username into the one used in credentials\n USERNAME_CALLABLE = None\n\n # determine if given user should be always allowed to attempt authentication\n WHITELIST_CALLABLE = None\n\n # return custom lockout response if configured\n LOCKOUT_CALLABLE = None\n\n # reset the number of failed attempts after one successful attempt\n RESET_ON_SUCCESS = False\n\n DISABLE_ACCESS_LOG = False\n\n HANDLER = \"axes.handlers.database.AxesDatabaseHandler\"\n\n LOGGER = \"axes.watch_login\"\n\n LOCKOUT_TEMPLATE = None\n\n LOCKOUT_URL = None\n\n COOLOFF_TIME = None\n\n VERBOSE = True\n\n # whitelist and blacklist\n NEVER_LOCKOUT_WHITELIST = False\n\n NEVER_LOCKOUT_GET = False\n\n ONLY_WHITELIST = False\n\n IP_WHITELIST = None\n\n IP_BLACKLIST = None\n\n # message to show when locked out and have cooloff enabled\n COOLOFF_MESSAGE = _(\n \"Account locked: too many login attempts. Please try again later\"\n )\n\n # message to show when locked out and have cooloff disabled\n PERMALOCK_MESSAGE = _(\n \"Account locked: too many login attempts. Contact an admin to unlock your account.\"\n )\n\n # if your deployment is using reverse proxies, set this value to 'left-most' or 'right-most' per your configuration\n PROXY_ORDER = \"left-most\"\n\n # if your deployment is using reverse proxies, set this value to the number of proxies in front of Django\n PROXY_COUNT = None\n\n # if your deployment is using reverse proxies, set to your trusted proxy IP addresses prefixes if needed\n PROXY_TRUSTED_IPS = None\n\n # set to the names of request.META attributes that should be checked for the IP address of the client\n # if your deployment is using reverse proxies, ensure that the header attributes are securely set by the proxy\n # ensure that the client can not spoof the headers by setting them and sending them through the proxy\n META_PRECEDENCE_ORDER = getattr(\n settings,\n \"AXES_META_PRECEDENCE_ORDER\",\n getattr(settings, \"IPWARE_META_PRECEDENCE_ORDER\", (\"REMOTE_ADDR\",)),\n )\n\n # set to `True` if using with Django REST Framework\n REST_FRAMEWORK_ACTIVE = False\n", "path": "axes/conf.py" } ]
diff --git a/axes/conf.py b/axes/conf.py index c6476896..59c838b3 100644 --- a/axes/conf.py +++ b/axes/conf.py @@ -5,6 +5,9 @@ class AxesAppConf(AppConf): + class Meta: + prefix = "axes" + # disable plugin when set to False ENABLED = True
pydantic__pydantic-4418
V1.10 release To do/decide: * [x] #2557 - **merged** * [x] #2745 - needs some tweaks, but we need to decide if it's a good idea before V2 * [x] #2190 - **deferred** * [x] cherry pick stuff from v1.9 branch, maybe just history #4350 * [x] #3346 * [x] #3593 - **deferred** * [x] #3946 * [x] #4028 - **API will change in v2** * [x] #4354 * [x] #4216 * [x] #4191 * [x] #3941 - revert or fix * [x] #4339 * [x] #4356
[ { "content": "__all__ = 'compiled', 'VERSION', 'version_info'\n\nVERSION = '1.9.2'\n\ntry:\n import cython # type: ignore\nexcept ImportError:\n compiled: bool = False\nelse: # pragma: no cover\n try:\n compiled = cython.compiled\n except AttributeError:\n compiled = False\n\n\ndef version_info() -> str:\n import platform\n import sys\n from importlib import import_module\n from pathlib import Path\n\n optional_deps = []\n for p in ('devtools', 'dotenv', 'email-validator', 'typing-extensions'):\n try:\n import_module(p.replace('-', '_'))\n except ImportError:\n continue\n optional_deps.append(p)\n\n info = {\n 'pydantic version': VERSION,\n 'pydantic compiled': compiled,\n 'install path': Path(__file__).resolve().parent,\n 'python version': sys.version,\n 'platform': platform.platform(),\n 'optional deps. installed': optional_deps,\n }\n return '\\n'.join('{:>30} {}'.format(k + ':', str(v).replace('\\n', ' ')) for k, v in info.items())\n", "path": "pydantic/version.py" } ]
[ { "content": "__all__ = 'compiled', 'VERSION', 'version_info'\n\nVERSION = '1.10.0a1'\n\ntry:\n import cython # type: ignore\nexcept ImportError:\n compiled: bool = False\nelse: # pragma: no cover\n try:\n compiled = cython.compiled\n except AttributeError:\n compiled = False\n\n\ndef version_info() -> str:\n import platform\n import sys\n from importlib import import_module\n from pathlib import Path\n\n optional_deps = []\n for p in ('devtools', 'dotenv', 'email-validator', 'typing-extensions'):\n try:\n import_module(p.replace('-', '_'))\n except ImportError:\n continue\n optional_deps.append(p)\n\n info = {\n 'pydantic version': VERSION,\n 'pydantic compiled': compiled,\n 'install path': Path(__file__).resolve().parent,\n 'python version': sys.version,\n 'platform': platform.platform(),\n 'optional deps. installed': optional_deps,\n }\n return '\\n'.join('{:>30} {}'.format(k + ':', str(v).replace('\\n', ' ')) for k, v in info.items())\n", "path": "pydantic/version.py" } ]
diff --git a/HISTORY.md b/HISTORY.md index 986ef9f7096..f4992d3970a 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,81 @@ +## v1.10.0a1 (2022-08-22) + +* Refactor the whole _pydantic_ `dataclass` decorator to really act like its standard lib equivalent. + It hence keeps `__eq__`, `__hash__`, ... and makes comparison with its non-validated version possible. + It also fixes usage of `frozen` dataclasses in fields and usage of `default_factory` in nested dataclasses. + The support of `Config.extra` has been added. + Finally, config customization directly via a `dict` is now possible, #2557 by @PrettyWood + <br/><br/> + **BREAKING CHANGES:** + - The `compiled` boolean (whether _pydantic_ is compiled with cython) has been moved from `main.py` to `version.py` + - Now that `Config.extra` is supported, `dataclass` ignores by default extra arguments (like `BaseModel`) +* Fix PEP487 `__set_name__` protocol in `BaseModel` for PrivateAttrs, #4407 by @tlambert03 +* Rename `master` to `main`, #4405 by @hramezani +* Fix `StrictStr` does not raise `ValidationError` when `max_length` is present in `Field`, #4388 by @hramezani +* Make `SecretStr` and `SecretBytes` hashable, #4387 by @chbndrhnns +* Fix `StrictBytes` does not raise `ValidationError` when `max_length` is present in `Field`, #4380 by @JeanArhancet +* Add support for bare `type`, #4375 by @hramezani +* Support Python 3.11, including binaries for 3.11 in PyPI, #4374 by @samuelcolvin +* Add support for `re.Pattern`, #4366 by @hramezani +* Fix `__post_init_post_parse__` is incorrectly passed keyword arguments when no `__post_init__` is defined, #4361 by @hramezani +* Fix implicitly importing `ForwardRef` and `Callable` from `pydantic.typing` instead of `typing` and also expose `MappingIntStrAny`, #4358 by @aminalaee +* remove `Any` types from the `dataclass` decorator so it can be used with the `disallow_any_expr` mypy option, #4356 by @DetachHead +* moved repo to `pydantic/pydantic`, #4348 by @yezz123 +* fix "extra fields not permitted" error when dataclass with `Extra.forbid` is validated multiple times, #4343 by @detachhead +* Add Python 3.9 and 3.10 examples to docs, #4339 by @Bobronium +* Discriminated union models now use `oneOf` instead of `anyOf` when generating OpenAPI schema definitions, #4335 by @MaxwellPayne +* Allow type checkers to infer inner type of `Json` type. `Json[list[str]]` will be now inferred as `list[str]`, + `Json[Any]` should be used instead of plain `Json`. + Runtime behaviour is not changed, #4332 by @Bobronium +* Allow empty string aliases by using a `alias is not None` check, rather than `bool(alias)`, #4253 by @sergeytsaplin +* Update `ForwardRef`s in `Field.outer_type_`, #4249 by @JacobHayes +* The use of `__dataclass_transform__` has been replaced by `typing_extensions.dataclass_transform`, which is the preferred way to mark pydantic models as a dataclass under [PEP 681](https://peps.python.org/pep-0681/), #4241 by @multimeric +* Use parent model's `Config` when validating nested `NamedTuple` fields, #4219 by @synek +* Update `BaseModel.construct` to work with aliased Fields, #4192 by @kylebamos +* Catch certain raised errors in `smart_deepcopy` and revert to `deepcopy` if so, #4184 by @coneybeare +* Add `Config.anystr_upper` and `to_upper` kwarg to constr and conbytes, #4165 by @satheler +* Fix JSON schema for `set` and `frozenset` when they include default values, #4155 by @aminalaee +* Teach the mypy plugin that methods decorated by `@validator` are classmethods, #4102 by @DMRobertson +* Improve mypy plugin's ability to detect required fields, #4086 by @richardxia +* Support fields of type `Type[]` in schema, #4051 by @aminalaee +* Add `default` value in JSON Schema when `const=True`, #4031 by @aminalaee +* Adds reserved word check to signature generation logic, #4011 by @strue36 +* Fix Json strategy failure for the complex nested field, #4005 by @sergiosim +* Add JSON-compatible float constraint `allow_inf_nan`, #3994 by @tiangolo +* Remove undefined behaviour when `env_prefix` had characters in common with `env_nested_delimiter`, #3975 by @arsenron +* Support generics model with `create_model`, #3945 by @hot123s +* allow submodels to overwrite extra field info, #3934 by @PrettyWood +* Document and test structural pattern matching ([PEP 636](https://peps.python.org/pep-0636/)) on `BaseModel`, #3920 by @irgolic +* Fix incorrect deserialization of python timedelta object to ISO 8601 for negative time deltas. + Minus was serialized in incorrect place ("P-1DT23H59M59.888735S" instead of correct "-P1DT23H59M59.888735S"), #3899 by @07pepa +* Fix validation of discriminated union fields with an alias when passing a model instance, #3846 by @chornsby +* Add a CockroachDsn type to validate CockroachDB connection strings. The type + supports the following schemes: `cockroachdb`, `cockroachdb+psycopg2` and `cockroachdb+asyncpg`, #3839 by @blubber +* Fix MyPy plugin to not override pre-existing `__init__` method in models, #3824 by @patrick91 +* Fix mypy version checking, #3783 by @KotlinIsland +* support overwriting dunder attributes of `BaseModel` instances, #3777 by @PrettyWood +* Added `ConstrainedDate` and `condate`, #3740 by @hottwaj +* Support `kw_only` in dataclasses, #3670 by @detachhead +* Add comparison method for `Color` class, #3646 by @aminalaee +* Drop support for python3.6, associated cleanup, #3605 by @samuelcolvin +* created new function `to_lower_camel()` for "non pascal case" camel case, #3463 by @schlerp +* Add checks to `default` and `default_factory` arguments in Mypy plugin, #3430 by @klaa97 +* fix mangling of `inspect.signature` for `BaseModel`, #3413 by @fix-inspect-signature +* Adds the `SecretField` abstract class so that all the current and future secret fields like `SecretStr` and `SecretBytes` will derive from it, #3409 by @expobrain +* Support multi hosts validation in `PostgresDsn`, #3337 by @rglsk +* Fix parsing of very small numeric timedelta values, #3315 by @samuelcolvin +* Update `SecretsSettingsSource` to respect `config.case_sensitive`, #3273 by @JeanArhancet +* Add MongoDB network data source name (DSN) schema, #3229 by @snosratiershad +* Add support for multiple dotenv files, #3222 by @rekyungmin +* Raise an explicit `ConfigError` when multiple fields are incorrectly set for a single validator, #3215 by @SunsetOrange +* Allow ellipsis on `Field`s inside `Annotated` for `TypedDicts` required, #3133 by @ezegomez +* Catch overflow errors in `int_validator`, #3112 by @ojii +* Adds a `__rich_repr__` method to `Representation` class which enables pretty printing with [Rich](https://github.com/willmcgugan/rich), #3099 by @willmcgugan +* Add percent encoding in `AnyUrl` and descendent types, #3061 by @FaresAhmedb +* `validate_arguments` decorator now supports `alias`, #3019 by @MAD-py +* Avoid `__dict__` and `__weakref__` attributes in `AnyUrl` and IP address fields, #2890 by @nuno-andre +* Add ability to use `Final` in a field type annotation, #2766 by @uriyyo + ## v1.9.2 (2022-08-11) **Revert Breaking Change**: _v1.9.1_ introduced a breaking change where model fields were diff --git a/changes/2557-PrettyWood.md b/changes/2557-PrettyWood.md deleted file mode 100644 index e9cb1c52a9a..00000000000 --- a/changes/2557-PrettyWood.md +++ /dev/null @@ -1,9 +0,0 @@ -Refactor the whole _pydantic_ `dataclass` decorator to really act like its standard lib equivalent. -It hence keeps `__eq__`, `__hash__`, ... and makes comparison with its non-validated version possible. -It also fixes usage of `frozen` dataclasses in fields and usage of `default_factory` in nested dataclasses. -The support of `Config.extra` has been added. -Finally, config customization directly via a `dict` is now possible. -<br/><br/> -**BREAKING CHANGES** -- The `compiled` boolean (whether _pydantic_ is compiled with cython) has been moved from `main.py` to `version.py` -- Now that `Config.extra` is supported, `dataclass` ignores by default extra arguments (like `BaseModel`) diff --git a/changes/2766-uriyyo.md b/changes/2766-uriyyo.md deleted file mode 100644 index 75db550eacc..00000000000 --- a/changes/2766-uriyyo.md +++ /dev/null @@ -1 +0,0 @@ -Add ability to use `Final` in a field type annotation. \ No newline at end of file diff --git a/changes/2890-nuno-andre.md b/changes/2890-nuno-andre.md deleted file mode 100644 index db8871641ae..00000000000 --- a/changes/2890-nuno-andre.md +++ /dev/null @@ -1 +0,0 @@ -Avoid `__dict__` and `__weakref__` attributes in `AnyUrl` and IP address fields. diff --git a/changes/3019-MAD-py.md b/changes/3019-MAD-py.md deleted file mode 100644 index 42e42dd8d8f..00000000000 --- a/changes/3019-MAD-py.md +++ /dev/null @@ -1 +0,0 @@ -`validate_arguments` decorator now supports `alias` \ No newline at end of file diff --git a/changes/3061-FaresAhmedb.md b/changes/3061-FaresAhmedb.md deleted file mode 100644 index 622dc0e7b3d..00000000000 --- a/changes/3061-FaresAhmedb.md +++ /dev/null @@ -1 +0,0 @@ -Add percent encoding in `AnyUrl` and descendent types diff --git a/changes/3099-willmcgugan.md b/changes/3099-willmcgugan.md deleted file mode 100644 index c4380b11e9f..00000000000 --- a/changes/3099-willmcgugan.md +++ /dev/null @@ -1 +0,0 @@ -Adds a `__rich_repr__` method to `Representation` class which enables pretty printing with [Rich](https://github.com/willmcgugan/rich) \ No newline at end of file diff --git a/changes/3112-ojii.md b/changes/3112-ojii.md deleted file mode 100644 index a4c6e144db4..00000000000 --- a/changes/3112-ojii.md +++ /dev/null @@ -1 +0,0 @@ -Catch overflow errors in `int_validator` \ No newline at end of file diff --git a/changes/3133-ezegomez.md b/changes/3133-ezegomez.md deleted file mode 100644 index d813f2ff33d..00000000000 --- a/changes/3133-ezegomez.md +++ /dev/null @@ -1 +0,0 @@ -Allow ellipsis on `Field`s inside `Annotated` for `TypedDicts` required. diff --git a/changes/3215-SunsetOrange.md b/changes/3215-SunsetOrange.md deleted file mode 100644 index dbcf23dfa12..00000000000 --- a/changes/3215-SunsetOrange.md +++ /dev/null @@ -1 +0,0 @@ -Raise an explicit `ConfigError` when multiple fields are incorrectly set for a single validator \ No newline at end of file diff --git a/changes/3222-rekyungmin.md b/changes/3222-rekyungmin.md deleted file mode 100644 index 4e30989e5a3..00000000000 --- a/changes/3222-rekyungmin.md +++ /dev/null @@ -1 +0,0 @@ -Add support for multiple dotenv files diff --git a/changes/3229-snosratiershad.md b/changes/3229-snosratiershad.md deleted file mode 100644 index 5eddf37c100..00000000000 --- a/changes/3229-snosratiershad.md +++ /dev/null @@ -1 +0,0 @@ -Add MongoDB network data source name (DSN) schema diff --git a/changes/3273-JeanArhancet.md b/changes/3273-JeanArhancet.md deleted file mode 100644 index 2d8b23be1e0..00000000000 --- a/changes/3273-JeanArhancet.md +++ /dev/null @@ -1 +0,0 @@ -Update `SecretsSettingsSource` to respect `config.case_sensitive` \ No newline at end of file diff --git a/changes/3315-samuelcolvin.md b/changes/3315-samuelcolvin.md deleted file mode 100644 index 47f38c5b6c0..00000000000 --- a/changes/3315-samuelcolvin.md +++ /dev/null @@ -1 +0,0 @@ -Fix parsing of very small numeric timedelta values diff --git a/changes/3337-rglsk.md b/changes/3337-rglsk.md deleted file mode 100644 index c0f2da37208..00000000000 --- a/changes/3337-rglsk.md +++ /dev/null @@ -1 +0,0 @@ -Support multi hosts validation in `PostgresDsn`. \ No newline at end of file diff --git a/changes/3409-expobrain.md b/changes/3409-expobrain.md deleted file mode 100644 index 714f9628aac..00000000000 --- a/changes/3409-expobrain.md +++ /dev/null @@ -1 +0,0 @@ -Adds the `SecretField` abstract class so that all the current and future secret fields like `SecretStr` and `SecretBytes` will derive from it. diff --git a/changes/3413-fix-inspect-signature.md b/changes/3413-fix-inspect-signature.md deleted file mode 100644 index 157650845da..00000000000 --- a/changes/3413-fix-inspect-signature.md +++ /dev/null @@ -1 +0,0 @@ -fix mangling of `inspect.signature` for `BaseModel` diff --git a/changes/3430-klaa97.md b/changes/3430-klaa97.md deleted file mode 100644 index ef4fd288acb..00000000000 --- a/changes/3430-klaa97.md +++ /dev/null @@ -1 +0,0 @@ -Add checks to `default` and `default_factory` arguments in Mypy plugin \ No newline at end of file diff --git a/changes/3463-schlerp.md b/changes/3463-schlerp.md deleted file mode 100644 index bb1fb75d3e4..00000000000 --- a/changes/3463-schlerp.md +++ /dev/null @@ -1 +0,0 @@ -created new function `to_lower_camel()` for "non pascal case" camel case. diff --git a/changes/3605-samuelcolvin.md b/changes/3605-samuelcolvin.md deleted file mode 100644 index 305c118e9df..00000000000 --- a/changes/3605-samuelcolvin.md +++ /dev/null @@ -1 +0,0 @@ -Drop support for python3.6, associated cleanup diff --git a/changes/3646-aminalaee.md b/changes/3646-aminalaee.md deleted file mode 100644 index 68c8084075f..00000000000 --- a/changes/3646-aminalaee.md +++ /dev/null @@ -1 +0,0 @@ -Add comparison method for `Color` class. diff --git a/changes/3670-detachhead.md b/changes/3670-detachhead.md deleted file mode 100644 index 2ce600fa185..00000000000 --- a/changes/3670-detachhead.md +++ /dev/null @@ -1 +0,0 @@ -Support `kw_only` in dataclasses \ No newline at end of file diff --git a/changes/3740-hottwaj.md b/changes/3740-hottwaj.md deleted file mode 100644 index 95bf6730288..00000000000 --- a/changes/3740-hottwaj.md +++ /dev/null @@ -1 +0,0 @@ -Added `ConstrainedDate` and `condate` diff --git a/changes/3777-PrettyWood.md b/changes/3777-PrettyWood.md deleted file mode 100644 index 97475e08505..00000000000 --- a/changes/3777-PrettyWood.md +++ /dev/null @@ -1 +0,0 @@ -support overwriting dunder attributes of `BaseModel` instances diff --git a/changes/3783-KotlinIsland.md b/changes/3783-KotlinIsland.md deleted file mode 100644 index 878d6fa61a1..00000000000 --- a/changes/3783-KotlinIsland.md +++ /dev/null @@ -1 +0,0 @@ -Fix mypy version checking. diff --git a/changes/3824-patrick91.md b/changes/3824-patrick91.md deleted file mode 100644 index cea6bad3a6d..00000000000 --- a/changes/3824-patrick91.md +++ /dev/null @@ -1 +0,0 @@ -Fix MyPy plugin to not override pre-existing `__init__` method in models. diff --git a/changes/3839-blubber.md b/changes/3839-blubber.md deleted file mode 100644 index 4295512014a..00000000000 --- a/changes/3839-blubber.md +++ /dev/null @@ -1,2 +0,0 @@ -Add a CockroachDsn type to validate CockroachDB connection strings. The type -supports the following schemes: `cockroachdb`, `cockroachdb+psycopg2` and `cockroachdb+asyncpg`. diff --git a/changes/3846-chornsby.md b/changes/3846-chornsby.md deleted file mode 100644 index f8daac8ffe7..00000000000 --- a/changes/3846-chornsby.md +++ /dev/null @@ -1 +0,0 @@ -Fix validation of discriminated union fields with an alias when passing a model instance diff --git a/changes/3899-07pepa.md b/changes/3899-07pepa.md deleted file mode 100644 index 47d195cb392..00000000000 --- a/changes/3899-07pepa.md +++ /dev/null @@ -1,2 +0,0 @@ -Fix incorrect deserialization of python timedelta object to ISO 8601 for negative time deltas. -Minus was serialized in incorrect place ("P-1DT23H59M59.888735S" instead of correct "-P1DT23H59M59.888735S") diff --git a/changes/3920-irgolic.md b/changes/3920-irgolic.md deleted file mode 100644 index 88645b58458..00000000000 --- a/changes/3920-irgolic.md +++ /dev/null @@ -1 +0,0 @@ -Document and test structural pattern matching ([PEP 636](https://peps.python.org/pep-0636/)) on `BaseModel` \ No newline at end of file diff --git a/changes/3934-PrettyWood.md b/changes/3934-PrettyWood.md deleted file mode 100644 index 5b3de819a7c..00000000000 --- a/changes/3934-PrettyWood.md +++ /dev/null @@ -1 +0,0 @@ -allow submodels to overwrite extra field info diff --git a/changes/3945-hot123s.md b/changes/3945-hot123s.md deleted file mode 100644 index 6405d0ad0a8..00000000000 --- a/changes/3945-hot123s.md +++ /dev/null @@ -1 +0,0 @@ -Support generics model with `create_model` \ No newline at end of file diff --git a/changes/3975-arsenron.md b/changes/3975-arsenron.md deleted file mode 100644 index 7aaea271cb5..00000000000 --- a/changes/3975-arsenron.md +++ /dev/null @@ -1 +0,0 @@ -Remove undefined behaviour when `env_prefix` had characters in common with `env_nested_delimiter` diff --git a/changes/3994-tiangolo.md b/changes/3994-tiangolo.md deleted file mode 100644 index e4bffdd6524..00000000000 --- a/changes/3994-tiangolo.md +++ /dev/null @@ -1 +0,0 @@ -Add JSON-compatible float constraint `allow_inf_nan` diff --git a/changes/4005-sergiosim.md b/changes/4005-sergiosim.md deleted file mode 100644 index abb526712d2..00000000000 --- a/changes/4005-sergiosim.md +++ /dev/null @@ -1 +0,0 @@ -Fix Json strategy failure for the complex nested field diff --git a/changes/4011-strue36.md b/changes/4011-strue36.md deleted file mode 100644 index 001654412d4..00000000000 --- a/changes/4011-strue36.md +++ /dev/null @@ -1 +0,0 @@ -Adds reserved word check to signature generation logic. diff --git a/changes/4031-aminalaee.md b/changes/4031-aminalaee.md deleted file mode 100644 index f694600d50d..00000000000 --- a/changes/4031-aminalaee.md +++ /dev/null @@ -1 +0,0 @@ -Add `default` value in JSON Schema when `const=True` diff --git a/changes/4051-aminalaee.md b/changes/4051-aminalaee.md deleted file mode 100644 index c3dfe19a2d6..00000000000 --- a/changes/4051-aminalaee.md +++ /dev/null @@ -1 +0,0 @@ -Support fields of type `Type[]` in schema. diff --git a/changes/4086-richardxia.md b/changes/4086-richardxia.md deleted file mode 100644 index bf71bc36bcf..00000000000 --- a/changes/4086-richardxia.md +++ /dev/null @@ -1 +0,0 @@ -Improve mypy plugin's ability to detect required fields. diff --git a/changes/4102-DMRobertson.md b/changes/4102-DMRobertson.md deleted file mode 100644 index aef7bcec258..00000000000 --- a/changes/4102-DMRobertson.md +++ /dev/null @@ -1 +0,0 @@ -Teach the mypy plugin that methods decorated by `@validator` are classmethods. \ No newline at end of file diff --git a/changes/4155-aminalaee.md b/changes/4155-aminalaee.md deleted file mode 100644 index 8eae2e1c3f4..00000000000 --- a/changes/4155-aminalaee.md +++ /dev/null @@ -1 +0,0 @@ -Fix JSON schema for `set` and `frozenset` when they include default values. diff --git a/changes/4165-satheler.md b/changes/4165-satheler.md deleted file mode 100644 index 82ba93abdf4..00000000000 --- a/changes/4165-satheler.md +++ /dev/null @@ -1 +0,0 @@ -Add `Config.anystr_upper` and `to_upper` kwarg to constr and conbytes. diff --git a/changes/4184-coneybeare.md b/changes/4184-coneybeare.md deleted file mode 100644 index f81d6fb3006..00000000000 --- a/changes/4184-coneybeare.md +++ /dev/null @@ -1 +0,0 @@ -Catch certain raised errors in `smart_deepcopy` and revert to `deepcopy` if so. diff --git a/changes/4192-kylebamos.md b/changes/4192-kylebamos.md deleted file mode 100644 index daa518d84b9..00000000000 --- a/changes/4192-kylebamos.md +++ /dev/null @@ -1 +0,0 @@ -Update BaseModel.construct to work with aliased Fields \ No newline at end of file diff --git a/changes/4219-synek.md b/changes/4219-synek.md deleted file mode 100644 index 3dfa1e9898d..00000000000 --- a/changes/4219-synek.md +++ /dev/null @@ -1 +0,0 @@ -Use parent model's `Config` when validating nested `NamedTuple` fields. diff --git a/changes/4241-multimeric.md b/changes/4241-multimeric.md deleted file mode 100644 index 51a4deace2f..00000000000 --- a/changes/4241-multimeric.md +++ /dev/null @@ -1 +0,0 @@ -The use of `__dataclass_transform__` has been replaced by `typing_extensions.dataclass_transform`, which is the preferred way to mark pydantic models as a dataclass under [PEP 681](https://peps.python.org/pep-0681/). diff --git a/changes/4249-JacobHayes.md b/changes/4249-JacobHayes.md deleted file mode 100644 index de031da79b5..00000000000 --- a/changes/4249-JacobHayes.md +++ /dev/null @@ -1 +0,0 @@ -Update `ForwardRef`s in `Field.outer_type_` diff --git a/changes/4253-sergeytsaplin.md b/changes/4253-sergeytsaplin.md deleted file mode 100644 index 6cdee03ca6c..00000000000 --- a/changes/4253-sergeytsaplin.md +++ /dev/null @@ -1 +0,0 @@ -Allow empty string aliases by using a `alias is not None` check, rather than `bool(alias)` diff --git a/changes/4332-Bobronium.md b/changes/4332-Bobronium.md deleted file mode 100644 index d66b8bca549..00000000000 --- a/changes/4332-Bobronium.md +++ /dev/null @@ -1,3 +0,0 @@ -Allow type checkers to infer inner type of `Json` type. `Json[list[str]]` will be now inferred as `list[str]`. -`Json[Any]` should be used instead of plain `Json`. -Runtime behaviour is not changed. diff --git a/changes/4335-MaxwellPayne.md b/changes/4335-MaxwellPayne.md deleted file mode 100644 index 5edafff49d8..00000000000 --- a/changes/4335-MaxwellPayne.md +++ /dev/null @@ -1 +0,0 @@ -Discriminated union models now use `oneOf` instead of `anyOf` when generating OpenAPI schema definitions. diff --git a/changes/4339-Bobronium.md b/changes/4339-Bobronium.md deleted file mode 100644 index b64eb4680c2..00000000000 --- a/changes/4339-Bobronium.md +++ /dev/null @@ -1 +0,0 @@ -Add Python 3.9 and 3.10 examples to docs diff --git a/changes/4343-detachhead.md b/changes/4343-detachhead.md deleted file mode 100644 index 8a9f424f48c..00000000000 --- a/changes/4343-detachhead.md +++ /dev/null @@ -1 +0,0 @@ -fix "extra fields not permitted" error when dataclass with `Extra.forbid` is validated multiple times \ No newline at end of file diff --git a/changes/4348-yezz123.md b/changes/4348-yezz123.md deleted file mode 100644 index 64516f4bef5..00000000000 --- a/changes/4348-yezz123.md +++ /dev/null @@ -1 +0,0 @@ -moved repo to `pydantic/pydantic` \ No newline at end of file diff --git a/changes/4356-DetachHead.md b/changes/4356-DetachHead.md deleted file mode 100644 index d8eac7ec168..00000000000 --- a/changes/4356-DetachHead.md +++ /dev/null @@ -1 +0,0 @@ -remove `Any` types from the `dataclass` decorator so it can be used with the `disallow_any_expr` mypy option \ No newline at end of file diff --git a/changes/4358-aminalaee.md b/changes/4358-aminalaee.md deleted file mode 100644 index 6f99312d4e2..00000000000 --- a/changes/4358-aminalaee.md +++ /dev/null @@ -1 +0,0 @@ -Fix implpicitly importing `ForwardRef` and `Callable` from `pydantic.typing` instead of `typing` and also expose `MappingIntStrAny`. diff --git a/changes/4361-hramezani.md b/changes/4361-hramezani.md deleted file mode 100644 index 72d9a7936d0..00000000000 --- a/changes/4361-hramezani.md +++ /dev/null @@ -1 +0,0 @@ -Fix `__post_init_post_parse__` is incorrectly passed keyword arguments when no `__post_init__` is defined diff --git a/changes/4366-hramezani.md b/changes/4366-hramezani.md deleted file mode 100644 index a70bedab388..00000000000 --- a/changes/4366-hramezani.md +++ /dev/null @@ -1 +0,0 @@ -Add support for `re.Pattern` diff --git a/changes/4374-samuelcolvin.md b/changes/4374-samuelcolvin.md deleted file mode 100644 index d06dd0fdd46..00000000000 --- a/changes/4374-samuelcolvin.md +++ /dev/null @@ -1 +0,0 @@ -Support Python 3.11, including binaries for 3.11 in PyPI. diff --git a/changes/4375-hramezani.md b/changes/4375-hramezani.md deleted file mode 100644 index fdd836cfaec..00000000000 --- a/changes/4375-hramezani.md +++ /dev/null @@ -1 +0,0 @@ -Add support for bare `type` diff --git a/changes/4380-JeanArhancet.md b/changes/4380-JeanArhancet.md deleted file mode 100644 index f8800423779..00000000000 --- a/changes/4380-JeanArhancet.md +++ /dev/null @@ -1 +0,0 @@ -Fix `StrictBytes` does not raise `ValidationError` when `max_length` is present in `Field` diff --git a/changes/4387-chbndrhnns.md b/changes/4387-chbndrhnns.md deleted file mode 100644 index f9f4900b2b0..00000000000 --- a/changes/4387-chbndrhnns.md +++ /dev/null @@ -1 +0,0 @@ -Make `SecretStr` and `SecretBytes` hashable diff --git a/changes/4388-hramezani.md b/changes/4388-hramezani.md deleted file mode 100644 index 19284ee0ce2..00000000000 --- a/changes/4388-hramezani.md +++ /dev/null @@ -1 +0,0 @@ -Fix `StrictStr` does not raise `ValidationError` when `max_length` is present in `Field` diff --git a/changes/4405-hramezani.md b/changes/4405-hramezani.md deleted file mode 100644 index 63edc13ef8c..00000000000 --- a/changes/4405-hramezani.md +++ /dev/null @@ -1 +0,0 @@ -Rename `master` to `main` diff --git a/changes/4407-tlambert03.md b/changes/4407-tlambert03.md deleted file mode 100644 index a4b567399d2..00000000000 --- a/changes/4407-tlambert03.md +++ /dev/null @@ -1 +0,0 @@ -Fix PEP487 `__set_name__` protocol in `BaseModel` for PrivateAttrs. diff --git a/pydantic/version.py b/pydantic/version.py index a9685eae14d..c07203622cc 100644 --- a/pydantic/version.py +++ b/pydantic/version.py @@ -1,6 +1,6 @@ __all__ = 'compiled', 'VERSION', 'version_info' -VERSION = '1.9.2' +VERSION = '1.10.0a1' try: import cython # type: ignore
HypothesisWorks__hypothesis-563
External pull requests currently fail the deploy task The build on #536 is currently failing because the decryption is trying to run and it doesn't have access to the decryption environment variables because it comes from @Zac-HD's fork rather than the main repo. The solution is just to have that task skip for external pull requests I think.
[ { "content": "#!/usr/bin/env python\n\n# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2017 David R. MacIver\n# ([email protected]), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full list of people who may hold copyright, and\n# consult the git log if you need to determine who owns an individual\n# contribution.\n#\n# This Source Code Form is subject to the terms of the Mozilla Public License,\n# v. 2.0. If a copy of the MPL was not distributed with this file, You can\n# obtain one at http://mozilla.org/MPL/2.0/.\n#\n# END HEADER\n\nfrom __future__ import division, print_function, absolute_import\n\nimport os\nimport sys\nimport random\nimport shutil\nimport subprocess\nfrom time import time, sleep\n\nimport hypothesistooling as tools\n\nsys.path.append(os.path.dirname(__file__)) # noqa\n\n\nDIST = os.path.join(tools.ROOT, 'dist')\n\n\nPENDING_STATUS = ('started', 'created')\n\n\nif __name__ == '__main__':\n\n print('Decrypting secrets')\n\n # We'd normally avoid the use of shell=True, but this is more or less\n # intended as an opaque string that was given to us by Travis that happens\n # to be a shell command that we run, and there are a number of good reasons\n # this particular instance is harmless and would be high effort to\n # convert (principally: Lack of programmatic generation of the string and\n # extensive use of environment variables in it), so we're making an\n # exception here.\n subprocess.check_call(\n 'openssl aes-256-cbc -K $encrypted_39cb4cc39a80_key '\n '-iv $encrypted_39cb4cc39a80_iv -in secrets.tar.enc '\n '-out secrets.tar -d',\n shell=True\n )\n\n subprocess.check_call([\n 'tar', '-xvf', 'secrets.tar',\n ])\n\n last_release = tools.latest_version()\n\n print('Current version: %s. Latest released version: %s' % (\n tools.__version__, last_release\n ))\n\n print('Building an sdist...')\n\n if os.path.exists(DIST):\n shutil.rmtree(DIST)\n\n subprocess.check_output([\n sys.executable, 'setup.py', 'sdist', '--dist-dir', DIST,\n ])\n\n if not tools.on_master():\n print('Not deploying due to not being on master')\n sys.exit(0)\n\n if not tools.has_source_changes(last_release):\n print('Not deploying due to no source changes')\n sys.exit(0)\n\n start_time = time()\n\n prev_pending = None\n\n # We time out after an hour, which is a stupidly long time and it should\n # never actually take that long: A full Travis run only takes about 20-30\n # minutes! This is really just here as a guard in case something goes\n # wrong and we're not paying attention so as to not be too mean to Travis..\n while time() <= start_time + 60 * 60:\n jobs = tools.build_jobs()\n\n failed_jobs = [\n (k, v)\n for k, vs in jobs.items()\n if k not in PENDING_STATUS + ('passed',)\n for v in vs\n ]\n\n if failed_jobs:\n print('Failing this due to failure of jobs %s' % (\n ', '.join('%s(%s)' % (s, j) for j, s in failed_jobs),\n ))\n sys.exit(1)\n else:\n pending = [j for s in PENDING_STATUS for j in jobs.get(s, ())]\n try:\n # This allows us to test the deploy job for a build locally.\n pending.remove('deploy')\n except ValueError:\n pass\n if pending:\n still_pending = set(pending)\n if prev_pending is None:\n print('Waiting for the following jobs to complete:')\n for p in sorted(still_pending):\n print(' * %s' % (p,))\n print()\n else:\n completed = prev_pending - still_pending\n if completed:\n print('%s completed since last check.' % (\n ', '.join(sorted(completed)),))\n prev_pending = still_pending\n naptime = 10.0 * (2 + random.random())\n print('Waiting %.2fs for %d more job%s to complete' % (\n naptime, len(pending), 's' if len(pending) > 1 else '',))\n sleep(naptime)\n else:\n break\n else:\n print(\"We've been waiting for an hour. That seems bad. Failing now.\")\n sys.exit(1)\n\n print('Looks good to release!')\n print('Now uploading to pypi.')\n\n subprocess.check_output([\n sys.executable, '-m', 'twine', 'upload',\n '--config-file', './.pypirc',\n os.path.join(DIST, '*'),\n ])\n\n print('Release seems good. Pushing the tag now.')\n\n tools.create_tag()\n sys.exit(0)\n", "path": "scripts/deploy.py" } ]
[ { "content": "#!/usr/bin/env python\n\n# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2017 David R. MacIver\n# ([email protected]), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full list of people who may hold copyright, and\n# consult the git log if you need to determine who owns an individual\n# contribution.\n#\n# This Source Code Form is subject to the terms of the Mozilla Public License,\n# v. 2.0. If a copy of the MPL was not distributed with this file, You can\n# obtain one at http://mozilla.org/MPL/2.0/.\n#\n# END HEADER\n\nfrom __future__ import division, print_function, absolute_import\n\nimport os\nimport sys\nimport random\nimport shutil\nimport subprocess\nfrom time import time, sleep\n\nimport hypothesistooling as tools\n\nsys.path.append(os.path.dirname(__file__)) # noqa\n\n\nDIST = os.path.join(tools.ROOT, 'dist')\n\n\nPENDING_STATUS = ('started', 'created')\n\n\nif __name__ == '__main__':\n if os.environ.get('TRAVIS_SECURE_ENV_VARS', None) != 'true':\n sys.exit(0)\n\n print('Decrypting secrets')\n\n # We'd normally avoid the use of shell=True, but this is more or less\n # intended as an opaque string that was given to us by Travis that happens\n # to be a shell command that we run, and there are a number of good reasons\n # this particular instance is harmless and would be high effort to\n # convert (principally: Lack of programmatic generation of the string and\n # extensive use of environment variables in it), so we're making an\n # exception here.\n subprocess.check_call(\n 'openssl aes-256-cbc -K $encrypted_39cb4cc39a80_key '\n '-iv $encrypted_39cb4cc39a80_iv -in secrets.tar.enc '\n '-out secrets.tar -d',\n shell=True\n )\n\n subprocess.check_call([\n 'tar', '-xvf', 'secrets.tar',\n ])\n\n last_release = tools.latest_version()\n\n print('Current version: %s. Latest released version: %s' % (\n tools.__version__, last_release\n ))\n\n print('Building an sdist...')\n\n if os.path.exists(DIST):\n shutil.rmtree(DIST)\n\n subprocess.check_output([\n sys.executable, 'setup.py', 'sdist', '--dist-dir', DIST,\n ])\n\n if not tools.on_master():\n print('Not deploying due to not being on master')\n sys.exit(0)\n\n if not tools.has_source_changes(last_release):\n print('Not deploying due to no source changes')\n sys.exit(0)\n\n start_time = time()\n\n prev_pending = None\n\n # We time out after an hour, which is a stupidly long time and it should\n # never actually take that long: A full Travis run only takes about 20-30\n # minutes! This is really just here as a guard in case something goes\n # wrong and we're not paying attention so as to not be too mean to Travis..\n while time() <= start_time + 60 * 60:\n jobs = tools.build_jobs()\n\n failed_jobs = [\n (k, v)\n for k, vs in jobs.items()\n if k not in PENDING_STATUS + ('passed',)\n for v in vs\n ]\n\n if failed_jobs:\n print('Failing this due to failure of jobs %s' % (\n ', '.join('%s(%s)' % (s, j) for j, s in failed_jobs),\n ))\n sys.exit(1)\n else:\n pending = [j for s in PENDING_STATUS for j in jobs.get(s, ())]\n try:\n # This allows us to test the deploy job for a build locally.\n pending.remove('deploy')\n except ValueError:\n pass\n if pending:\n still_pending = set(pending)\n if prev_pending is None:\n print('Waiting for the following jobs to complete:')\n for p in sorted(still_pending):\n print(' * %s' % (p,))\n print()\n else:\n completed = prev_pending - still_pending\n if completed:\n print('%s completed since last check.' % (\n ', '.join(sorted(completed)),))\n prev_pending = still_pending\n naptime = 10.0 * (2 + random.random())\n print('Waiting %.2fs for %d more job%s to complete' % (\n naptime, len(pending), 's' if len(pending) > 1 else '',))\n sleep(naptime)\n else:\n break\n else:\n print(\"We've been waiting for an hour. That seems bad. Failing now.\")\n sys.exit(1)\n\n print('Looks good to release!')\n print('Now uploading to pypi.')\n\n subprocess.check_output([\n sys.executable, '-m', 'twine', 'upload',\n '--config-file', './.pypirc',\n os.path.join(DIST, '*'),\n ])\n\n print('Release seems good. Pushing the tag now.')\n\n tools.create_tag()\n sys.exit(0)\n", "path": "scripts/deploy.py" } ]
diff --git a/scripts/deploy.py b/scripts/deploy.py index 5e829b5f4c..5a1dce31fd 100644 --- a/scripts/deploy.py +++ b/scripts/deploy.py @@ -38,6 +38,8 @@ if __name__ == '__main__': + if os.environ.get('TRAVIS_SECURE_ENV_VARS', None) != 'true': + sys.exit(0) print('Decrypting secrets')
ManageIQ__integration_tests-471
Paginator returns wrong rec_end() result When record is last one on it's own on the last page, rec_end() incorrectly shows 1, instead of rec_total() value.
[ { "content": "\"\"\"A set of functions for dealing with the paginator controls.\"\"\"\nimport cfme.fixtures.pytest_selenium as sel\nimport re\n\n_locator = '(//div[@id=\"paging_div\"] | //div[@id=\"records_div\"])'\n_next = '//img[@alt=\"Next\"]'\n_previous = '//img[@alt=\"Previous\"]'\n_first = '//img[@alt=\"First\"]'\n_last = '//img[@alt=\"Last\"]'\n_num_results = '//select[@id=\"ppsetting\" or @id=\"perpage_setting1\"]'\n_sort_by = '//select[@id=\"sort_choice\"]'\n_page_cell = '//td//td[contains(., \" of \")]'\n_check_all = '//input[@id=\"masterToggle\"]'\n\n\ndef _page_nums():\n return sel.element(_locator + _page_cell).text\n\n\ndef check_all():\n \"\"\" Returns the Check All locator.\"\"\"\n return sel.element(_locator + _check_all)\n\n\ndef next():\n \"\"\" Returns the Next button locator.\"\"\"\n btn = sel.element(_locator + _next)\n return btn\n\n\ndef previous():\n \"\"\" Returns the Previous button locator.\"\"\"\n btn = sel.element(_locator + _previous)\n return btn\n\n\ndef first():\n \"\"\" Returns the First button locator.\"\"\"\n btn = sel.element(_locator + _first)\n return btn\n\n\ndef last():\n \"\"\" Returns the Last button locator.\"\"\"\n btn = sel.element(_locator + _last)\n return btn\n\n\ndef results_per_page(num):\n \"\"\" Changes the number of results on a page.\n\n Args:\n num: A string, or a tuple of (type, value).\n \"\"\"\n select = sel.element(_locator + _num_results)\n sel.select(select, num)\n\n\ndef sort_by(sort):\n \"\"\" Changes the sort by field.\n\n Args:\n num: A string, or a tuple of (type, value).\n \"\"\"\n select = sel.element(_locator + _sort_by)\n sel.select(select, sort)\n\n\ndef rec_offset():\n \"\"\" Returns the first record offset.\"\"\"\n offset = re.search('\\((Item|Items)*\\s*(\\d+)', _page_nums())\n return offset.groups()[1]\n\n\ndef rec_end():\n \"\"\" Returns the record set index.\"\"\"\n offset = re.search('-(\\d+)', _page_nums())\n if offset:\n return offset.groups()[0]\n else:\n return '1'\n\n\ndef rec_total():\n \"\"\" Returns the total number of records.\"\"\"\n offset = re.search('(\\d+)\\)', _page_nums())\n return offset.groups()[0]\n", "path": "cfme/web_ui/paginator.py" } ]
[ { "content": "\"\"\"A set of functions for dealing with the paginator controls.\"\"\"\nimport cfme.fixtures.pytest_selenium as sel\nimport re\n\n_locator = '(//div[@id=\"paging_div\"] | //div[@id=\"records_div\"])'\n_next = '//img[@alt=\"Next\"]'\n_previous = '//img[@alt=\"Previous\"]'\n_first = '//img[@alt=\"First\"]'\n_last = '//img[@alt=\"Last\"]'\n_num_results = '//select[@id=\"ppsetting\" or @id=\"perpage_setting1\"]'\n_sort_by = '//select[@id=\"sort_choice\"]'\n_page_cell = '//td//td[contains(., \" of \")]'\n_check_all = '//input[@id=\"masterToggle\"]'\n\n\ndef _page_nums():\n return sel.element(_locator + _page_cell).text\n\n\ndef check_all():\n \"\"\" Returns the Check All locator.\"\"\"\n return sel.element(_locator + _check_all)\n\n\ndef next():\n \"\"\" Returns the Next button locator.\"\"\"\n btn = sel.element(_locator + _next)\n return btn\n\n\ndef previous():\n \"\"\" Returns the Previous button locator.\"\"\"\n btn = sel.element(_locator + _previous)\n return btn\n\n\ndef first():\n \"\"\" Returns the First button locator.\"\"\"\n btn = sel.element(_locator + _first)\n return btn\n\n\ndef last():\n \"\"\" Returns the Last button locator.\"\"\"\n btn = sel.element(_locator + _last)\n return btn\n\n\ndef results_per_page(num):\n \"\"\" Changes the number of results on a page.\n\n Args:\n num: A string, or a tuple of (type, value).\n \"\"\"\n select = sel.element(_locator + _num_results)\n sel.select(select, num)\n\n\ndef sort_by(sort):\n \"\"\" Changes the sort by field.\n\n Args:\n num: A string, or a tuple of (type, value).\n \"\"\"\n select = sel.element(_locator + _sort_by)\n sel.select(select, sort)\n\n\ndef rec_offset():\n \"\"\" Returns the first record offset.\"\"\"\n offset = re.search('\\((Item|Items)*\\s*(\\d+)', _page_nums())\n return offset.groups()[1]\n\n\ndef rec_end():\n \"\"\" Returns the record set index.\"\"\"\n offset = re.search('-(\\d+)', _page_nums())\n if offset:\n return offset.groups()[0]\n else:\n return rec_total()\n\n\ndef rec_total():\n \"\"\" Returns the total number of records.\"\"\"\n offset = re.search('(\\d+)\\)', _page_nums())\n return offset.groups()[0]\n", "path": "cfme/web_ui/paginator.py" } ]
diff --git a/cfme/web_ui/paginator.py b/cfme/web_ui/paginator.py index 3d33937dd4..d363040e3c 100644 --- a/cfme/web_ui/paginator.py +++ b/cfme/web_ui/paginator.py @@ -78,7 +78,7 @@ def rec_end(): if offset: return offset.groups()[0] else: - return '1' + return rec_total() def rec_total():
Parsl__parsl-2038
Parsl v1.1.0 Release Checklist ## Checklist Please edit the checklist if I've missed any items. ### Documentation updates : - [x] Update docs to point at 1.1.0 as the latest - [x] Make sure docs are not broken on readthedocs, since a broken doc build will stick on as stable till next release. - [x] Update changelog with summary of changes since 0.9.0 [@benclifford to take a crack at this] - [ ] Update Parsl tutorial repo with a 1.1.0 branch that folds in changes - [x] Add `Beta` tags to components/features that are not yet stable. ### Testing : - [ ] All testing should be green on Travis - [x] Update all configs in `parsl/parsl/configs` to match current best practices - [x] Update all test configs in `parsl/parsl/test/configs` - [x] Test notebooks/tutorials and basic tests on a Mac - [ ] Post news update on the website about release - [x] Site testing: - [x] Bridges2(PSC) [YY] - [ ] ~~Comet (SDSC)~~ Machine is getting replaced by Expanse - [x] Cori (NERSC) [YY/Yadu] - [x] Stampede2 (TACC) [Yadu] - [ ] ~~Frontera (TACC)~~ [Yadu, no access] - [x] Theta (ALCF) [YY] - [x] Bluewaters (NCSA) [ZZ] - [x] Summit (ORNL) [Yadu] - [ ] ~~CC-IN2P3 (French Grid)~~ [Yadu] - [x] Midway (RCC, UChicago) [YY] - [x] Open Science Grid - [x] AWS - [x] Kubernetes [ZZ] - [x] NSCC Singapore [ZZ] - [ ] Ad-Hoc clusters [YY] ### Release Tagging and pushing to PyPI I'll make an updated alpha to smoothen installation and site testing.
[ { "content": "\"\"\"Set module version.\n\n<Major>.<Minor>.<maintenance>[alpha/beta/..]\nAlphas will be numbered like this -> 0.4.0a0\n\"\"\"\nVERSION = '1.1.0a1'\n", "path": "parsl/version.py" } ]
[ { "content": "\"\"\"Set module version.\n\n<Major>.<Minor>.<maintenance>[alpha/beta/..]\nAlphas will be numbered like this -> 0.4.0a0\n\"\"\"\nVERSION = '1.1.0'\n", "path": "parsl/version.py" } ]
diff --git a/docs/devguide/changelog.rst b/docs/devguide/changelog.rst index 2d0ca49b78..2e19f3ac0e 100644 --- a/docs/devguide/changelog.rst +++ b/docs/devguide/changelog.rst @@ -5,7 +5,7 @@ Changelog Parsl 1.1.0 ----------- -Released (tentatively) on April 26th, 2021. +Released on April 26th, 2021. Parsl v1.1.0 includes 59 closed issues and 243 pull requests with contributions (code, tests, reviews and reports) from: diff --git a/parsl/version.py b/parsl/version.py index ff06e12af8..ce1c6f0e64 100644 --- a/parsl/version.py +++ b/parsl/version.py @@ -3,4 +3,4 @@ <Major>.<Minor>.<maintenance>[alpha/beta/..] Alphas will be numbered like this -> 0.4.0a0 """ -VERSION = '1.1.0a1' +VERSION = '1.1.0'
pulp__pulpcore-3469
Expose "get_url" via the plugin interface
[ { "content": "from pulpcore.app.role_util import ( # noqa\n assign_role,\n get_groups_with_perms,\n get_groups_with_perms_attached_perms,\n get_groups_with_perms_attached_roles,\n get_objects_for_group,\n get_objects_for_user,\n get_perms_for_model,\n get_users_with_perms,\n get_users_with_perms_attached_perms,\n get_users_with_perms_attached_roles,\n remove_role,\n)\n\nfrom pulpcore.app.util import get_artifact_url, gpg_verify, verify_signature # noqa\n", "path": "pulpcore/plugin/util.py" } ]
[ { "content": "from pulpcore.app.role_util import ( # noqa\n assign_role,\n get_groups_with_perms,\n get_groups_with_perms_attached_perms,\n get_groups_with_perms_attached_roles,\n get_objects_for_group,\n get_objects_for_user,\n get_perms_for_model,\n get_users_with_perms,\n get_users_with_perms_attached_perms,\n get_users_with_perms_attached_roles,\n remove_role,\n)\n\nfrom pulpcore.app.util import get_artifact_url, get_url, gpg_verify, verify_signature # noqa\n", "path": "pulpcore/plugin/util.py" } ]
diff --git a/CHANGES/plugin_api/3468.feature b/CHANGES/plugin_api/3468.feature new file mode 100644 index 0000000000..00aa879876 --- /dev/null +++ b/CHANGES/plugin_api/3468.feature @@ -0,0 +1 @@ +Exposed the ``get_url`` util function. diff --git a/pulpcore/plugin/util.py b/pulpcore/plugin/util.py index 63e249cc55..7947768c3b 100644 --- a/pulpcore/plugin/util.py +++ b/pulpcore/plugin/util.py @@ -12,4 +12,4 @@ remove_role, ) -from pulpcore.app.util import get_artifact_url, gpg_verify, verify_signature # noqa +from pulpcore.app.util import get_artifact_url, get_url, gpg_verify, verify_signature # noqa
open-mmlab__mmengine-684
config/utils.py haven't mmyolo ![aa791cf4fdac9e12eccfd0e54bb7136](https://user-images.githubusercontent.com/25839884/200160438-d0631694-003e-4ecc-ba77-e518d2ee96b2.png)
[ { "content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport ast\nimport os.path as osp\nimport re\nimport warnings\nfrom typing import Tuple\n\nfrom mmengine.fileio import load\nfrom mmengine.utils import check_file_exist\n\nPKG2PROJECT = {\n 'mmcls': 'mmcls',\n 'mmdet': 'mmdet',\n 'mmdet3d': 'mmdet3d',\n 'mmseg': 'mmsegmentation',\n 'mmaction2': 'mmaction2',\n 'mmtrack': 'mmtrack',\n 'mmpose': 'mmpose',\n 'mmedit': 'mmedit',\n 'mmocr': 'mmocr',\n 'mmgen': 'mmgen',\n 'mmfewshot': 'mmfewshot',\n 'mmrazor': 'mmrazor',\n 'mmflow': 'mmflow',\n 'mmhuman3d': 'mmhuman3d',\n 'mmrotate': 'mmrotate',\n 'mmselfsup': 'mmselfsup',\n}\n\n\ndef _get_cfg_metainfo(package_path: str, cfg_path: str) -> dict:\n \"\"\"Get target meta information from all 'metafile.yml' defined in `mode-\n index.yml` of external package.\n\n Args:\n package_path (str): Path of external package.\n cfg_path (str): Name of experiment config.\n\n Returns:\n dict: Meta information of target experiment.\n \"\"\"\n meta_index_path = osp.join(package_path, '.mim', 'model-index.yml')\n meta_index = load(meta_index_path)\n cfg_dict = dict()\n for meta_path in meta_index['Import']:\n meta_path = osp.join(package_path, '.mim', meta_path)\n cfg_meta = load(meta_path)\n for model_cfg in cfg_meta['Models']:\n if 'Config' not in model_cfg:\n warnings.warn(f'There is not `Config` define in {model_cfg}')\n continue\n cfg_name = model_cfg['Config'].partition('/')[-1]\n # Some config could have multiple weights, we only pick the\n # first one.\n if cfg_name in cfg_dict:\n continue\n cfg_dict[cfg_name] = model_cfg\n if cfg_path not in cfg_dict:\n raise ValueError(f'Expected configs: {cfg_dict.keys()}, but got '\n f'{cfg_path}')\n return cfg_dict[cfg_path]\n\n\ndef _get_external_cfg_path(package_path: str, cfg_file: str) -> str:\n \"\"\"Get config path of external package.\n\n Args:\n package_path (str): Path of external package.\n cfg_file (str): Name of experiment config.\n\n Returns:\n str: Absolute config path from external package.\n \"\"\"\n cfg_file = cfg_file.split('.')[0]\n model_cfg = _get_cfg_metainfo(package_path, cfg_file)\n cfg_path = osp.join(package_path, model_cfg['Config'])\n check_file_exist(cfg_path)\n return cfg_path\n\n\ndef _get_external_cfg_base_path(package_path: str, cfg_name: str) -> str:\n \"\"\"Get base config path of external package.\n\n Args:\n package_path (str): Path of external package.\n cfg_name (str): External relative config path with 'package::'.\n\n Returns:\n str: Absolute config path from external package.\n \"\"\"\n cfg_path = osp.join(package_path, '.mim', 'configs', cfg_name)\n check_file_exist(cfg_path)\n return cfg_path\n\n\ndef _get_package_and_cfg_path(cfg_path: str) -> Tuple[str, str]:\n \"\"\"Get package name and relative config path.\n\n Args:\n cfg_path (str): External relative config path with 'package::'.\n\n Returns:\n Tuple[str, str]: Package name and config path.\n \"\"\"\n if re.match(r'\\w*::\\w*/\\w*', cfg_path) is None:\n raise ValueError(\n '`_get_package_and_cfg_path` is used for get external package, '\n 'please specify the package name and relative config path, just '\n 'like `mmdet::faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py`')\n package_cfg = cfg_path.split('::')\n if len(package_cfg) > 2:\n raise ValueError('`::` should only be used to separate package and '\n 'config name, but found multiple `::` in '\n f'{cfg_path}')\n package, cfg_path = package_cfg\n assert package in PKG2PROJECT, 'mmengine does not support to load ' \\\n f'{package} config.'\n package = PKG2PROJECT[package]\n return package, cfg_path\n\n\nclass RemoveAssignFromAST(ast.NodeTransformer):\n \"\"\"Remove Assign node if the target's name match the key.\n\n Args:\n key (str): The target name of the Assign node.\n \"\"\"\n\n def __init__(self, key):\n self.key = key\n\n def visit_Assign(self, node):\n if (isinstance(node.targets[0], ast.Name)\n and node.targets[0].id == self.key):\n return None\n else:\n return node\n", "path": "mmengine/config/utils.py" } ]
[ { "content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport ast\nimport os.path as osp\nimport re\nimport warnings\nfrom typing import Tuple\n\nfrom mmengine.fileio import load\nfrom mmengine.utils import check_file_exist\n\nPKG2PROJECT = {\n 'mmcls': 'mmcls',\n 'mmdet': 'mmdet',\n 'mmdet3d': 'mmdet3d',\n 'mmseg': 'mmsegmentation',\n 'mmaction2': 'mmaction2',\n 'mmtrack': 'mmtrack',\n 'mmpose': 'mmpose',\n 'mmedit': 'mmedit',\n 'mmocr': 'mmocr',\n 'mmgen': 'mmgen',\n 'mmfewshot': 'mmfewshot',\n 'mmrazor': 'mmrazor',\n 'mmflow': 'mmflow',\n 'mmhuman3d': 'mmhuman3d',\n 'mmrotate': 'mmrotate',\n 'mmselfsup': 'mmselfsup',\n 'mmyolo': 'mmyolo',\n}\n\n\ndef _get_cfg_metainfo(package_path: str, cfg_path: str) -> dict:\n \"\"\"Get target meta information from all 'metafile.yml' defined in `mode-\n index.yml` of external package.\n\n Args:\n package_path (str): Path of external package.\n cfg_path (str): Name of experiment config.\n\n Returns:\n dict: Meta information of target experiment.\n \"\"\"\n meta_index_path = osp.join(package_path, '.mim', 'model-index.yml')\n meta_index = load(meta_index_path)\n cfg_dict = dict()\n for meta_path in meta_index['Import']:\n meta_path = osp.join(package_path, '.mim', meta_path)\n cfg_meta = load(meta_path)\n for model_cfg in cfg_meta['Models']:\n if 'Config' not in model_cfg:\n warnings.warn(f'There is not `Config` define in {model_cfg}')\n continue\n cfg_name = model_cfg['Config'].partition('/')[-1]\n # Some config could have multiple weights, we only pick the\n # first one.\n if cfg_name in cfg_dict:\n continue\n cfg_dict[cfg_name] = model_cfg\n if cfg_path not in cfg_dict:\n raise ValueError(f'Expected configs: {cfg_dict.keys()}, but got '\n f'{cfg_path}')\n return cfg_dict[cfg_path]\n\n\ndef _get_external_cfg_path(package_path: str, cfg_file: str) -> str:\n \"\"\"Get config path of external package.\n\n Args:\n package_path (str): Path of external package.\n cfg_file (str): Name of experiment config.\n\n Returns:\n str: Absolute config path from external package.\n \"\"\"\n cfg_file = cfg_file.split('.')[0]\n model_cfg = _get_cfg_metainfo(package_path, cfg_file)\n cfg_path = osp.join(package_path, model_cfg['Config'])\n check_file_exist(cfg_path)\n return cfg_path\n\n\ndef _get_external_cfg_base_path(package_path: str, cfg_name: str) -> str:\n \"\"\"Get base config path of external package.\n\n Args:\n package_path (str): Path of external package.\n cfg_name (str): External relative config path with 'package::'.\n\n Returns:\n str: Absolute config path from external package.\n \"\"\"\n cfg_path = osp.join(package_path, '.mim', 'configs', cfg_name)\n check_file_exist(cfg_path)\n return cfg_path\n\n\ndef _get_package_and_cfg_path(cfg_path: str) -> Tuple[str, str]:\n \"\"\"Get package name and relative config path.\n\n Args:\n cfg_path (str): External relative config path with 'package::'.\n\n Returns:\n Tuple[str, str]: Package name and config path.\n \"\"\"\n if re.match(r'\\w*::\\w*/\\w*', cfg_path) is None:\n raise ValueError(\n '`_get_package_and_cfg_path` is used for get external package, '\n 'please specify the package name and relative config path, just '\n 'like `mmdet::faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py`')\n package_cfg = cfg_path.split('::')\n if len(package_cfg) > 2:\n raise ValueError('`::` should only be used to separate package and '\n 'config name, but found multiple `::` in '\n f'{cfg_path}')\n package, cfg_path = package_cfg\n assert package in PKG2PROJECT, 'mmengine does not support to load ' \\\n f'{package} config.'\n package = PKG2PROJECT[package]\n return package, cfg_path\n\n\nclass RemoveAssignFromAST(ast.NodeTransformer):\n \"\"\"Remove Assign node if the target's name match the key.\n\n Args:\n key (str): The target name of the Assign node.\n \"\"\"\n\n def __init__(self, key):\n self.key = key\n\n def visit_Assign(self, node):\n if (isinstance(node.targets[0], ast.Name)\n and node.targets[0].id == self.key):\n return None\n else:\n return node\n", "path": "mmengine/config/utils.py" } ]
diff --git a/mmengine/config/utils.py b/mmengine/config/utils.py index 529a09a42b..7ff0b01de1 100644 --- a/mmengine/config/utils.py +++ b/mmengine/config/utils.py @@ -25,6 +25,7 @@ 'mmhuman3d': 'mmhuman3d', 'mmrotate': 'mmrotate', 'mmselfsup': 'mmselfsup', + 'mmyolo': 'mmyolo', }
searxng__searxng-471
[SIMPLE THEME]: Reddit search engine breaks Simple Theme "Image" tab Style. <!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SearXNG --> **Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG** Powered by searxng - 1.0.0-999-e4025cd1 **How did you install SearXNG?** SearXNG docker image with docker-compose. **What happened?** <!-- A clear and concise description of what the bug is. --> If you turn on reddit search engine from settings.yml it gets enabled for several categories including "Images." However, things get a little funny with the images tab as far as the formatting goes. As you can see in the image below, the results don't encompass the entire canvas but only a portion like they do with "General" tab. I believe this might be due to reddit returning search results vs images when you're in the image tab (image 2 below). You'll see these search results if you keep scrolling down. **How To Reproduce** <!-- How can we reproduce this issue? (as minimally and as precisely as possible) --> 1. Make sure reddit search engine is turned on for images category in settings or globally via settings.yml. 2. Search for something and go to images tab. 3. Notice the behavior where images only take up the left-hand side of the canvas. **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> Images should use the entire canvas like they do when reddit search engine is turned off (image 3) and search should only include images or gifs etc. **Screenshots & Logs** <!-- If applicable, add screenshots, logs to help explain your problem. --> ![image](https://user-images.githubusercontent.com/68975831/139709131-bf5468ea-d3de-41a6-994b-0e09ec3adcac.png) ![image](https://user-images.githubusercontent.com/68975831/139709582-a6b6194a-6941-4ddb-be66-85238a5784a2.png) ![image](https://user-images.githubusercontent.com/68975831/139710023-e5def10b-e633-481c-a6c9-0e0ab2c8fda3.png) **Alternatives** Remove Reddit search engine from images category by default so it doesn't get enabled from settings.yml. [SIMPLE THEME]: Reddit search engine breaks Simple Theme "Image" tab Style. <!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SearXNG --> **Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG** Powered by searxng - 1.0.0-999-e4025cd1 **How did you install SearXNG?** SearXNG docker image with docker-compose. **What happened?** <!-- A clear and concise description of what the bug is. --> If you turn on reddit search engine from settings.yml it gets enabled for several categories including "Images." However, things get a little funny with the images tab as far as the formatting goes. As you can see in the image below, the results don't encompass the entire canvas but only a portion like they do with "General" tab. I believe this might be due to reddit returning search results vs images when you're in the image tab (image 2 below). You'll see these search results if you keep scrolling down. **How To Reproduce** <!-- How can we reproduce this issue? (as minimally and as precisely as possible) --> 1. Make sure reddit search engine is turned on for images category in settings or globally via settings.yml. 2. Search for something and go to images tab. 3. Notice the behavior where images only take up the left-hand side of the canvas. **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> Images should use the entire canvas like they do when reddit search engine is turned off (image 3) and search should only include images or gifs etc. **Screenshots & Logs** <!-- If applicable, add screenshots, logs to help explain your problem. --> ![image](https://user-images.githubusercontent.com/68975831/139709131-bf5468ea-d3de-41a6-994b-0e09ec3adcac.png) ![image](https://user-images.githubusercontent.com/68975831/139709582-a6b6194a-6941-4ddb-be66-85238a5784a2.png) ![image](https://user-images.githubusercontent.com/68975831/139710023-e5def10b-e633-481c-a6c9-0e0ab2c8fda3.png) **Alternatives** Remove Reddit search engine from images category by default so it doesn't get enabled from settings.yml.
[ { "content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n\"\"\"\n Reddit\n\"\"\"\n\nimport json\nfrom datetime import datetime\nfrom urllib.parse import urlencode, urljoin, urlparse\n\n# about\nabout = {\n \"website\": 'https://www.reddit.com/',\n \"wikidata_id\": 'Q1136',\n \"official_api_documentation\": 'https://www.reddit.com/dev/api',\n \"use_official_api\": True,\n \"require_api_key\": False,\n \"results\": 'JSON',\n}\n\n# engine dependent config\ncategories = ['general', 'images', 'news', 'social media']\npage_size = 25\n\n# search-url\nbase_url = 'https://www.reddit.com/'\nsearch_url = base_url + 'search.json?{query}'\n\n\n# do search-request\ndef request(query, params):\n query = urlencode({'q': query, 'limit': page_size})\n params['url'] = search_url.format(query=query)\n\n return params\n\n\n# get response from search-request\ndef response(resp):\n img_results = []\n text_results = []\n\n search_results = json.loads(resp.text)\n\n # return empty array if there are no results\n if 'data' not in search_results:\n return []\n\n posts = search_results.get('data', {}).get('children', [])\n\n # process results\n for post in posts:\n data = post['data']\n\n # extract post information\n params = {\n 'url': urljoin(base_url, data['permalink']),\n 'title': data['title']\n }\n\n # if thumbnail field contains a valid URL, we need to change template\n thumbnail = data['thumbnail']\n url_info = urlparse(thumbnail)\n # netloc & path\n if url_info[1] != '' and url_info[2] != '':\n params['img_src'] = data['url']\n params['thumbnail_src'] = thumbnail\n params['template'] = 'images.html'\n img_results.append(params)\n else:\n created = datetime.fromtimestamp(data['created_utc'])\n content = data['selftext']\n if len(content) > 500:\n content = content[:500] + '...'\n params['content'] = content\n params['publishedDate'] = created\n text_results.append(params)\n\n # show images first and text results second\n return img_results + text_results\n", "path": "searx/engines/reddit.py" } ]
[ { "content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n\"\"\"\n Reddit\n\"\"\"\n\nimport json\nfrom datetime import datetime\nfrom urllib.parse import urlencode, urljoin, urlparse\n\n# about\nabout = {\n \"website\": 'https://www.reddit.com/',\n \"wikidata_id\": 'Q1136',\n \"official_api_documentation\": 'https://www.reddit.com/dev/api',\n \"use_official_api\": True,\n \"require_api_key\": False,\n \"results\": 'JSON',\n}\n\n# engine dependent config\ncategories = ['social media']\npage_size = 25\n\n# search-url\nbase_url = 'https://www.reddit.com/'\nsearch_url = base_url + 'search.json?{query}'\n\n\n# do search-request\ndef request(query, params):\n query = urlencode({'q': query, 'limit': page_size})\n params['url'] = search_url.format(query=query)\n\n return params\n\n\n# get response from search-request\ndef response(resp):\n img_results = []\n text_results = []\n\n search_results = json.loads(resp.text)\n\n # return empty array if there are no results\n if 'data' not in search_results:\n return []\n\n posts = search_results.get('data', {}).get('children', [])\n\n # process results\n for post in posts:\n data = post['data']\n\n # extract post information\n params = {\n 'url': urljoin(base_url, data['permalink']),\n 'title': data['title']\n }\n\n # if thumbnail field contains a valid URL, we need to change template\n thumbnail = data['thumbnail']\n url_info = urlparse(thumbnail)\n # netloc & path\n if url_info[1] != '' and url_info[2] != '':\n params['img_src'] = data['url']\n params['thumbnail_src'] = thumbnail\n params['template'] = 'images.html'\n img_results.append(params)\n else:\n created = datetime.fromtimestamp(data['created_utc'])\n content = data['selftext']\n if len(content) > 500:\n content = content[:500] + '...'\n params['content'] = content\n params['publishedDate'] = created\n text_results.append(params)\n\n # show images first and text results second\n return img_results + text_results\n", "path": "searx/engines/reddit.py" } ]
diff --git a/searx/engines/reddit.py b/searx/engines/reddit.py index ee734ace2f1..e84e772204b 100644 --- a/searx/engines/reddit.py +++ b/searx/engines/reddit.py @@ -18,7 +18,7 @@ } # engine dependent config -categories = ['general', 'images', 'news', 'social media'] +categories = ['social media'] page_size = 25 # search-url
encode__starlette-455
py.typed missing in published artifacts I didn’t check for earlier versions, but at least 0.11.4 on PyPI does not include `py.typed`. I assume this is an oversight, given it is mentioned in `setup.py`? https://github.com/encode/starlette/blob/77b84a08c1e4de0db64a197b58ac363a26c51d4f/setup.py#L49
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport re\n\nfrom setuptools import setup\n\n\ndef get_version(package):\n \"\"\"\n Return package version as listed in `__version__` in `init.py`.\n \"\"\"\n with open(os.path.join(package, \"__init__.py\")) as f:\n return re.search(\"__version__ = ['\\\"]([^'\\\"]+)['\\\"]\", f.read()).group(1)\n\n\ndef get_long_description():\n \"\"\"\n Return the README.\n \"\"\"\n with open(\"README.md\", encoding=\"utf8\") as f:\n return f.read()\n\n\ndef get_packages(package):\n \"\"\"\n Return root package and all sub-packages.\n \"\"\"\n return [\n dirpath\n for dirpath, dirnames, filenames in os.walk(package)\n if os.path.exists(os.path.join(dirpath, \"__init__.py\"))\n ]\n\n\nsetup(\n name=\"starlette\",\n python_requires=\">=3.6\",\n version=get_version(\"starlette\"),\n url=\"https://github.com/encode/starlette\",\n license=\"BSD\",\n description=\"The little ASGI library that shines.\",\n long_description=get_long_description(),\n long_description_content_type=\"text/markdown\",\n author=\"Tom Christie\",\n author_email=\"[email protected]\",\n packages=get_packages(\"starlette\"),\n package_data={\"starlette\": [\"py.typed\"]},\n data_files=[(\"\", [\"LICENSE.md\"])],\n extras_require={\n \"full\": [\n \"aiofiles\",\n \"asyncpg\",\n \"graphene\",\n \"itsdangerous\",\n \"jinja2\",\n \"python-multipart\",\n \"pyyaml\",\n \"requests\",\n \"ujson\",\n ]\n },\n classifiers=[\n \"Development Status :: 3 - Alpha\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Topic :: Internet :: WWW/HTTP\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.6\",\n \"Programming Language :: Python :: 3.7\",\n ],\n)\n", "path": "setup.py" } ]
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport re\n\nfrom setuptools import setup\n\n\ndef get_version(package):\n \"\"\"\n Return package version as listed in `__version__` in `init.py`.\n \"\"\"\n with open(os.path.join(package, \"__init__.py\")) as f:\n return re.search(\"__version__ = ['\\\"]([^'\\\"]+)['\\\"]\", f.read()).group(1)\n\n\ndef get_long_description():\n \"\"\"\n Return the README.\n \"\"\"\n with open(\"README.md\", encoding=\"utf8\") as f:\n return f.read()\n\n\ndef get_packages(package):\n \"\"\"\n Return root package and all sub-packages.\n \"\"\"\n return [\n dirpath\n for dirpath, dirnames, filenames in os.walk(package)\n if os.path.exists(os.path.join(dirpath, \"__init__.py\"))\n ]\n\n\nsetup(\n name=\"starlette\",\n python_requires=\">=3.6\",\n version=get_version(\"starlette\"),\n url=\"https://github.com/encode/starlette\",\n license=\"BSD\",\n description=\"The little ASGI library that shines.\",\n long_description=get_long_description(),\n long_description_content_type=\"text/markdown\",\n author=\"Tom Christie\",\n author_email=\"[email protected]\",\n packages=get_packages(\"starlette\"),\n package_data={\"starlette\": [\"py.typed\"]},\n data_files=[(\"\", [\"LICENSE.md\"])],\n extras_require={\n \"full\": [\n \"aiofiles\",\n \"asyncpg\",\n \"graphene\",\n \"itsdangerous\",\n \"jinja2\",\n \"python-multipart\",\n \"pyyaml\",\n \"requests\",\n \"ujson\",\n ]\n },\n classifiers=[\n \"Development Status :: 3 - Alpha\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Topic :: Internet :: WWW/HTTP\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.6\",\n \"Programming Language :: Python :: 3.7\",\n ],\n zip_safe=False,\n)\n", "path": "setup.py" } ]
diff --git a/setup.py b/setup.py index d6dfafb78..c3e304f0a 100644 --- a/setup.py +++ b/setup.py @@ -72,4 +72,5 @@ def get_packages(package): "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", ], + zip_safe=False, ) diff --git a/starlette/py.typed b/starlette/py.typed new file mode 100644 index 000000000..e69de29bb
napalm-automation__napalm-904
`get_lldp_neighbors_detail()` fails on Arista 7150S ```python In [1]: from napalm.eos import EOSDriver In [2]: from getpass import getpass In [3]: with EOSDriver("arista", "bewing", getpass()) as d: ...: print(d.get_lldp_neighbors_detail()) ...: Password: --------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-3-85f875e30fe3> in <module> 1 with EOSDriver("arista", "bewing", getpass()) as d: ----> 2 print(d.get_lldp_neighbors_detail()) 3 /mnt/c/Users/bewing/PycharmProjects/napalm/napalm/eos/eos.py in get_lldp_neighbors_detail(self, interface) 647 lldp_neighbors_out[interface] = [] 648 capabilities = neighbor.get("systemCapabilities", {}) --> 649 available_capabilities = self._transform_lldp_capab(capabilities.keys()) 650 enabled_capabilities = self._transform_lldp_capab( 651 [capab for capab, enabled in capabilities.items() if enabled] /mnt/c/Users/bewing/PycharmProjects/napalm/napalm/eos/eos.py in _transform_lldp_capab(self, capabilities) 616 617 def _transform_lldp_capab(self, capabilities): --> 618 return sorted([LLDP_CAPAB_TRANFORM_TABLE[c.lower()] for c in capabilities]) 619 620 def get_lldp_neighbors_detail(self, interface=""): /mnt/c/Users/bewing/PycharmProjects/napalm/napalm/eos/eos.py in <listcomp>(.0) 616 617 def _transform_lldp_capab(self, capabilities): --> 618 return sorted([LLDP_CAPAB_TRANFORM_TABLE[c.lower()] for c in capabilities]) 619 620 def get_lldp_neighbors_detail(self, interface=""): KeyError: 'stationonly' ```
[ { "content": "# Based on:\n# https://code.getnoc.com/noc/noc/blob/6f3db2a6e4b1ece77aaf4c4c98413e35ff64643a/sa/profiles/Arista/EOS/get_lldp_neighbors.py#L76-79\nLLDP_CAPAB_TRANFORM_TABLE = {\n \"other\": \"other\",\n \"repeater\": \"repeater\",\n \"bridge\": \"bridge\",\n \"wlanaccesspoint\": \"wlan-access-point\",\n \"router\": \"router\",\n \"telephone\": \"telephone\",\n \"docsis\": \"docsis-cable-device\",\n \"station\": \"station\",\n}\n", "path": "napalm/eos/constants.py" } ]
[ { "content": "# Based on:\n# https://code.getnoc.com/noc/noc/blob/6f3db2a6e4b1ece77aaf4c4c98413e35ff64643a/sa/profiles/Arista/EOS/get_lldp_neighbors.py#L76-79\nLLDP_CAPAB_TRANFORM_TABLE = {\n \"other\": \"other\",\n \"repeater\": \"repeater\",\n \"bridge\": \"bridge\",\n \"wlanaccesspoint\": \"wlan-access-point\",\n \"router\": \"router\",\n \"telephone\": \"telephone\",\n \"docsis\": \"docsis-cable-device\",\n \"station\": \"station\",\n \"stationonly\": \"station\",\n}\n", "path": "napalm/eos/constants.py" } ]
diff --git a/napalm/eos/constants.py b/napalm/eos/constants.py index c7f537dda..7e841e216 100644 --- a/napalm/eos/constants.py +++ b/napalm/eos/constants.py @@ -9,4 +9,5 @@ "telephone": "telephone", "docsis": "docsis-cable-device", "station": "station", + "stationonly": "station", } diff --git a/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue903/expected_result.json b/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue903/expected_result.json new file mode 100644 index 000000000..06ce6db6c --- /dev/null +++ b/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue903/expected_result.json @@ -0,0 +1,21 @@ +{ + "Ethernet22": [ + { + "parent_interface": "Ethernet22", + "remote_port": "000c.297b.d2a8", + "remote_port_description": "eth0", + "remote_system_name": "linux", + "remote_system_description": "CentOS Linux 7 (Core) Linux 4.9.46 #1 SMP PREEMPT Wed Aug 30 15:24:09 UTC 2017 x86_64", + "remote_chassis_id": "00:0C:29:7B:D2:A8", + "remote_system_capab": [ + "bridge", + "router", + "station", + "wlan-access-point" + ], + "remote_system_enable_capab": [ + "station" + ] + } + ] +} diff --git a/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue903/show_lldp_neighbors__detail.json b/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue903/show_lldp_neighbors__detail.json new file mode 100644 index 000000000..d5d621148 --- /dev/null +++ b/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue903/show_lldp_neighbors__detail.json @@ -0,0 +1,52 @@ +{ + "lldpNeighbors": { + "Ethernet22": { + "lldpNeighborInfo": [ + { + "systemCapabilities": { + "bridge": false, + "wlanAccessPoint": false, + "router": false, + "stationOnly": true + }, + "lastChangeTime": 1544636077.4653718, + "neighborInterfaceInfo": { + "portAndProtocolVlanEnabled": {}, + "linkAggregationStatus": "capableAndDisabled", + "unknownTlvs": [], + "interfaceIdType": "macAddress", + "interfaceId": "000c.297b.d2a8", + "interfaceDescription": "eth0", + "autoNegCapability": "capableAndEnabled", + "autoNegAdvertisedCapabilities": [ + "1000BASE-T (full-duplex)", + "Other" + ], + "protocolIdentityInfo": [], + "portAndProtocolVlanSupported": {}, + "operMauType": "10GBASE-LR", + "vlanNames": {}, + "linkAggregationInterfaceId": 0, + "unknownOrgDefinedTlvs": [] + }, + "neighborDiscoveryTime": 1544636077.4653718, + "lastContactTime": 1546981809.8182333, + "chassisId": "00c.297b.d2a8", + "systemName": "linux", + "systemDescription": "CentOS Linux 7 (Core) Linux 4.9.46 #1 SMP PREEMPT Wed Aug 30 15:24:09 UTC 2017 x86_64", + "ttl": 120, + "managementAddresses": [ + { + "oidString": "", + "interfaceNumType": "ifIndex", + "interfaceNum": 2, + "address": "10.199.1.22", + "addressType": "ipv4" + } + ], + "chassisIdType": "macAddress" + } + ] + } + } +}