diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..38a7478 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,92 @@ +# Git +# .git +# .gitignore +.gitattributes + + +# CI +.codeclimate.yml +.travis.yml +.taskcluster.yml + +# Docker +docker-compose.yml +Dockerfile +.docker +.dockerignore + +# Byte-compiled / optimized / DLL files +**/__pycache__/ +**/*.py[cod] + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.cache +nosetests.xml +coverage.xml + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Virtual environment +.env +.venv/ +venv/ + +# PyCharm +.idea + +# Python mode for VIM +.ropeproject +**/.ropeproject + +# Vim swap files +**/*.swp + +# VS Code +.vscode/ + +# Server config file +**/web_config.ini diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index a6a50a9..9b893e1 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -1,6 +1,6 @@ name: Automerge master into alberobotics -on: +on: push: branches: - "master" @@ -8,22 +8,24 @@ on: jobs: merge-master-into-alberobotics: runs-on: ubuntu-20.04 - env: - CI_COMMIT_MESSAGE: Continuous Integration Build Artifacts - CI_COMMIT_AUTHOR: Continuous Integration steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - - name: Set Git config + - name: Set up git run: | - git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" - git config --global user.email "marcoruzzon@users.noreply.github.com" - + git config --global user.name $USER_NAME + git config --global user.email $USER_EMAIL + env: + # see https://github.com/orgs/community/discussions/26560#discussioncomment-3531273 + USER_NAME: 'github-actions[bot]' + USER_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com' + - name: Get changed files id: changed-files uses: tj-actions/changed-files@v35 - + - name: Merge master into alberobotics run: | @@ -39,14 +41,14 @@ jobs: "src/modular/modular_data/cartesio/ModularBot_cartesio_multichain_config.yaml" ) - git fetch --unshallow + git fetch --unshallow git checkout alberobotics git merge --no-ff --no-commit master for file in "${to_keep[@]}"; do git reset HEAD $file - git checkout -- $file + git checkout -- $file done - git commit -m "merged master" + git commit -m "merged master" git push diff --git a/.github/workflows/create_pr.yaml b/.github/workflows/create_pr.yaml new file mode 100644 index 0000000..4321c50 --- /dev/null +++ b/.github/workflows/create_pr.yaml @@ -0,0 +1,65 @@ +name: Open PR for new modular_frontend version +# see https://github.com/orgs/community/discussions/26286#discussioncomment-3251208 +# on: +# create: +# branches: +# - 'ci/deps/modular_frontend-v[0-9]+.[0-9]+.[0-9]+*' +on: create + +jobs: + create-pr: + runs-on: ubuntu-latest + name: Create PR to update modular_frontend + # see https://github.com/orgs/community/discussions/26771#discussioncomment-3253330 + if: startsWith(github.ref_name, 'ci/deps/modular_frontend-') + env: + TARGET_BRANCH: feat/linfization + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up git + run: | + git config --global user.name $USER_NAME + git config --global user.email $USER_EMAIL + env: + # see https://github.com/orgs/community/discussions/26560#discussioncomment-3531273 + USER_NAME: 'github-actions[bot]' + USER_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com' + + # - name: Updated static docs + # run: | + # RELEASE_VERSION=$(echo $GITHUB_REF_NAME | sed -e s/.*modular_frontend-//) + # sed -i '/version/c\ \"version\" : \"'RELEASE_VERSION'\",' package.json + # npm ci + # npm run build:swagger + # git add docs + # git commit -m "📝 docs(Swagger): update static swagger docs" + + # - name: Commit version bump + # run: | + # RELEASE_VERSION=$(echo $GITHUB_REF_NAME | sed -e s/.*modular_frontend-//) + # sed -i '/version/c\ \"version\" : \"'RELEASE_VERSION'\",' package.json + # git add package.json + # git commit -m "📦 chore: bump version to RELEASE_VERSION" + + # - name: Push changes + # run: | + # git push -u origin HEAD + + - name: Open new PR + run: | + RELEASE_VERSION=$(echo $GITHUB_REF_NAME | sed -e s/.*modular_frontend-//) + gh pr create \ + --title "⬆️ chore(gui): Bump modular_frontend to $RELEASE_VERSION" \ + --body-file ./src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.$RELEASE_VERSION.md \ + --base ${{ env.TARGET_BRANCH }} \ + --label refactor \ + --assignee "m-tartari" \ + --reviewer "EdoardoRomiti" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Cleanup ssh configs + run: | + rm -rf ~/.ssh diff --git a/.gitignore b/.gitignore index 4c21ba0..36f5375 100644 --- a/.gitignore +++ b/.gitignore @@ -160,3 +160,6 @@ venv.bak/ # VS Code folder .vscode/* + +# Custom setting for API +src/modular/web/web_config.ini diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..171785f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,41 @@ +ARG BASE_IMAGE +FROM ${BASE_IMAGE} + +ARG RECIPES_BRANCH=master +ARG RECIPES_PROVIDER=https://github.com/ADVRHumanoids/multidof_recipes.git + +ARG FOREST_WS=$HOME/modular_ws +ARG USER_PWD=user +ARG MODE=&NoNe& +ARG JOBS=1 + +# run apt update as root +USER root +SHELL ["/bin/bash", "-ic"] +RUN sudo apt-get update + +USER user + +# Add github.com to known hosts +RUN mkdir -p -m 0700 $HOME/.ssh && ssh-keyscan github.com >> $HOME/.ssh/known_hosts + +# Initialize forest workspace +WORKDIR ${FOREST_WS} +RUN forest init +RUN echo "source $FOREST_WS/setup.bash" >> ~/.bashrc + +# Add recipes to forest workspace +RUN forest add-recipes https://github.com/ADVRHumanoids/multidof_recipes.git --tag $RECIPES_BRANCH + +# Install dependencies using forest +RUN --mount=type=ssh,uid=${USER_ID} forest grow concert_description -m ${MODE} -j${JOBS} --pwd ${USER_PWD} --clone-depth 1 \ + && forest grow iit-dagana-ros-pkg -m ${MODE} -j${JOBS} --pwd ${USER_PWD} --clone-depth 1 \ + && rm -fr $FOREST_WS/build + +# Build local version of modular +WORKDIR ${FOREST_WS}/src/modular +COPY --chown=user:user . ${FOREST_WS}/src/modular +RUN pip install -e . + +# Set entrypoint +CMD ./scripts/entrypoint.sh diff --git a/README.md b/README.md index b1ed3ec..c1e54a1 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ ## About The Project This project focuses on the development of an app for rapid model generation of modular robots, starting from a set of basic robotic modules. -This app will genereate URDF, SRDF and a complete ROS package, which can be used to simulate and control the robot. +This app will genereate URDF, SRDF and a complete ROS package, which can be used to simulate and control the robot. ![reconfigurable_pino](https://alberobotics.it/templates/yootheme/cache/reconfigurable_pino-2e1209e8.png) @@ -108,6 +108,29 @@ Get the `RobotBuilder` app from the latest release and make it executable (`chmo ## Usage +### Configs + +Several configurations can be modified for each deployment by creating a config file `src/modular/web/web_config.ini`. The most important ones are: + +```ini +[MODULAR_API] # Mandatory section + +# version of the API +version = 1 + +# When deploying the robot, return a zip file with the generated ROS package +download_on_deploy = true + +# Use flash sessions to have multiple users on a single server +enable_sessions = true + +# secret_key is used to sign the session cookie, it should be a random string +secret_key = FOO_BAR_BAZ + +# base_route adds a prefix to all API routes, it is best to leave it commented +# base_route = /linfa/api/v${MODULAR_API:version}/modular +``` + ### Run the GUI To use modular you need to start the python server. @@ -133,7 +156,7 @@ Then open from a browser to acces the graphical interface ### Use the python API Examples of how to use the python API are provided in the [scripts](https://github.com/ADVRHumanoids/modular_hhcm/tree/master/scripts) folder. - `create_modularbot.ipynb` shows an example of how to build a 6-DOF robot using Alberobotics modules and deploy URDF, SRDF, etc. into a ROS package -- `generate_concert_robot.ipynb` shows how to build and deploy the CONCERT modular robot +- `generate_concert_robot.ipynb` shows how to build and deploy the CONCERT modular robot ## Documentation diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6052d94 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,26 @@ +version: "3.8" +services: + + modular: + image: "${TARGET_IMAGE}" + container_name: modular + restart: 'unless-stopped' + build: + context: ./ + dockerfile: Dockerfile + ssh: + # mount the default ssh agent + - default + args: + - BASE_IMAGE + - RECIPES_BRANCH + - RECIPES_PROVIDER + - FOREST_WS + - USER_PWD + - MODE + - JOBS + ports: + - "5003:5003" + volumes: + # We might want to change the local path of the web_config.ini file + - ./src/modular/web/web_config.ini:${FOREST_WS}/src/modular/src/modular/web/web_config.ini diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh new file mode 100755 index 0000000..1ec376f --- /dev/null +++ b/scripts/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Start detached roscore +nohup roscore & + +# Start Modular Server +gunicorn --workers 1 --threads 4 --bind '0.0.0.0:5003' wsgi:app + +# Wait for any process to exit +wait -n + +# Exit with status of process that exited first +exit $? diff --git a/scripts/generate_concert_robot.ipynb b/scripts/generate_concert_robot.ipynb index 901eae3..b2b61a9 100644 --- a/scripts/generate_concert_robot.ipynb +++ b/scripts/generate_concert_robot.ipynb @@ -29,7 +29,7 @@ "outputs": [], "source": [ "#add mobile base\n", - "urdf_writer.add_mobile_platform()\n" + "urdf_writer.add_module('concert/mobile_platform_concert.json', 0, False)\n" ] }, { @@ -119,7 +119,7 @@ }, "outputs": [], "source": [ - "urdf_writer.remove_connectors()\n", + "urdf_writer.remove_all_connectors()\n", "\n", "# get srdf and joint_map\n", "urdf_writer.write_urdf()\n", diff --git a/scripts/generate_concert_robot_JSON.ipynb b/scripts/generate_concert_robot_JSON.ipynb index c2a70e5..bf8f4f9 100644 --- a/scripts/generate_concert_robot_JSON.ipynb +++ b/scripts/generate_concert_robot_JSON.ipynb @@ -29,7 +29,7 @@ "outputs": [], "source": [ "#add mobile base\n", - "urdf_writer.add_mobile_platform()\n" + "urdf_writer.add_module('concert/mobile_platform_concert.json', 0, False)\n" ] }, { @@ -119,7 +119,7 @@ }, "outputs": [], "source": [ - "urdf_writer.remove_connectors()\n", + "urdf_writer.remove_all_connectors()\n", "\n", "# get srdf and joint_map\n", "urdf_writer.write_urdf()\n", diff --git a/scripts/payload_calc.py b/scripts/payload_calc.py new file mode 100644 index 0000000..350df6b --- /dev/null +++ b/scripts/payload_calc.py @@ -0,0 +1,124 @@ +import pinocchio +import numpy as np +import scipy +import rospkg +import os + +rospack = rospkg.RosPack() +pkgpath = rospack.get_path('ModularBot') +urdfpath = os.path.join(pkgpath, 'urdf', 'ModularBot.urdf') + +urdf = open(urdfpath, 'r').read() + +# Load the urdf model +model = pinocchio.buildModelFromXML(urdf) + +# Create data required by the algorithms +data = model.createData() + +# Get the frame index for the end-effector (hard-coded for now) +frame_idx = model.getFrameId('TCP_gripper_A') + +lower_limits = model.lowerPositionLimit +upper_limits = model.upperPositionLimit + +nq = model.nq + +# for i in range(nq): +# print(model.names[i+1], lower_limits[i], upper_limits[i]) + +## LinSpace Sampling +# n_q_samples = 10 +# q_samples = np.empty((nq, n_q_samples)) +# # q_list = [] + +# for idx, lims in enumerate(zip(lower_limits, upper_limits)): +# q_idx_samples = np.linspace(lims[0], lims[1], n_q_samples) +# q_samples[idx] = q_idx_samples +# # q_list.append(q_idx_samples) +# print(q_samples) +# q_configurations = np.array(list(itertools.product(*q_samples))) +# n_samples = len(q_configurations) + +## Random Sampling +n_samples = 1000 +q_configurations = [pinocchio.randomConfiguration(model) for i in range(n_samples)] + +c = np.array([0, 0, -1, 0, 0, 0]) + +lb = np.zeros((nq)) +ub = np.array([0, 0, np.inf, 0, 0, 0]) + +worst_case_force = np.array([0, 0, np.inf, 0, 0, 0]) +worst_case_q = np.zeros((nq)) +worst_case_tau = np.zeros((nq)) +worst_case_b = np.zeros((nq)) +worst_case_A = np.zeros((nq, 6)) + +zeros = np.zeros((nq)) +q = np.zeros((nq)) +A = np.zeros((nq, 6)) +b = np.zeros((nq)) +tau_rated = 162.0 +tau_max = np.ones((nq))*tau_rated +tau_min = - tau_max + +# Compute the jacobian for all the samples +for idx, q in enumerate(q_configurations): + # q = np.array(q) + pinocchio.computeJointJacobians(model, data, q) + # pinocchio.framesForwardKinematics(model, data, q) + A = pinocchio.getFrameJacobian(model, data, frame_idx, pinocchio.ReferenceFrame.LOCAL_WORLD_ALIGNED)[:6].T * 1 # 9.81 + b = tau_max - np.abs(pinocchio.nonLinearEffects(model, data, q, zeros)) + tau = pinocchio.nonLinearEffects(model, data, q, zeros) + tau_available = [] + sign_J_z = np.sign(A[:,2]) + sign_tau = np.sign(tau) + ## method 1 + # for idx, torque in enumerate(tau): + # if torque <= tau_rated and sign_tau[idx] in [1]: + # tau_tmp = tau_rated - torque + # # if sign_J_z[idx] != sign_tau[idx] and sign_J_z[idx] != 0: + # # tau_tmp *= -1 + # if sign_J_z[idx] != 1: + # A[idx, 2] *= -1 + # tau_available.append(tau_tmp) + # elif torque >= -tau_rated and sign_tau[idx] in [-1]: + # tau_tmp = -tau_rated - torque + # # if sign_J_z[idx] != sign_tau[idx] and sign_J_z[idx] != 0: + # # tau_tmp *= -1 + # tau_tmp *= -1 + # if sign_J_z[idx] != 1: + # A[idx, 2] *= -1 + # tau_available.append(tau_tmp) + # elif sign_tau[idx] == 0: + # tau_available.append(tau_rated) + # else: + # tau_available.append(0.0) + # b = np.array(tau_available) + + ## method 2 + b1 = tau_max - tau + b2 = - tau_min + tau + b = np.concatenate((b1, b2)) + A1 = A + A2 = -A + A = np.vstack((A1, A2)) + + + sol = scipy.optimize.linprog(c, A_ub=A, b_ub=b, bounds=list(zip(lb, ub))) + + # print (idx) + + if (sol.success): + # print (sol.x / 9.81) + if sol.x[2]/9.81 < worst_case_force[2]/9.81: + worst_case_force = sol.x + worst_case_q = q + worst_case_tau = tau + worst_case_b = b + worst_case_A = A + +print (('Payload: ', worst_case_force[2]/9.81)) +print (('q: ', worst_case_q)) + diff --git a/scripts/payload_calc_test.py b/scripts/payload_calc_test.py new file mode 100644 index 0000000..fdf093a --- /dev/null +++ b/scripts/payload_calc_test.py @@ -0,0 +1,93 @@ +import pinocchio +import itertools +import numpy +import scipy +import rospkg +import os + +rospack = rospkg.RosPack() +pkgpath = rospack.get_path('ModularBot') +urdfpath = os.path.join(pkgpath, 'urdf', 'ModularBot.urdf') + +urdf = open(urdfpath, 'r').read() + +# Load the urdf model +model = pinocchio.buildModelFromUrdf(urdfpath) + +# Create data required by the algorithms +data = model.createData() + +# Get the frame index for the end-effector (hard-coded for now) +frame_idx = model.getFrameId('TCP_gripper_A') + +lower_limits = model.lowerPositionLimit +upper_limits = model.upperPositionLimit + +nq = model.nq + +n_q_samples = 2 + +q_samples = numpy.empty((nq, n_q_samples)) +# q_list = [] + +# for i in range(nq): +# print(model.names[i+1], lower_limits[i], upper_limits[i]) + +for idx, lims in enumerate(zip(lower_limits, upper_limits)): + + q_idx_samples = numpy.linspace(lims[0], lims[1], n_q_samples) + q_samples[idx] = q_idx_samples + # q_list.append(q_idx_samples) + +print(q_samples) + +q_configurations = list(itertools.product(*q_samples)) +n_samples = len(q_configurations) + +# other_qs = numpy.meshgrid(q_samples[0], q_samples[1], q_samples[2], q_samples[3], q_samples[4], q_samples[5]) +# print(other_qs) + +# print(n_samples) + +# Compute the jacobian for all the samples +jac_samples = numpy.empty((nq * n_samples, 6)) +tau_samples = numpy.empty((nq* n_samples)) +# jac_samples = numpy.zeros(nq*n_samples*6).reshape((nq * n_samples, 6)) +# tau_samples = numpy.zeros(nq*n_samples).reshape(nq* n_samples) +for idx, q in enumerate(q_configurations): + q = numpy.array(q) + pinocchio.computeJointJacobians(model, data, q) + pinocchio.framesForwardKinematics(model, data, q) + jac_samples[idx*nq:idx*nq+nq, :] = pinocchio.getFrameJacobian(model, data, frame_idx, pinocchio.ReferenceFrame.LOCAL_WORLD_ALIGNED)[:6].T * -9.81 + tau_samples[idx*nq:idx*nq+nq] = numpy.ones((nq))*162 - pinocchio.nonLinearEffects(model, data, q, numpy.zeros(nq)) + + # A = jac_samples[2, :, idx]*9.81 + # b = 162 - tau_samples[:, idx] + # x = b/A + # print(x) + # print(numpy.linalg.norm(A*x - b)) + +# A_eq = -jac_samples[:, :, 0].T * 9.81 +# for idx in range(1, n_samples): +# A_eq = numpy.concatenate((A_eq, -jac_samples[:, :, idx].T * 9.81)) +A_eq = jac_samples + +# b_eq = numpy.ones((nq))*162 - tau_samples[:, 0] +# for idx in range(1, n_samples): +# b_eq = numpy.concatenate((b_eq, numpy.ones((nq))*162 - tau_samples[:, idx])) +b_eq = tau_samples + +c = numpy.array([0, 0, -1, 0, 0, 0]) + +lb = numpy.zeros((nq)) +ub = numpy.array([0, 0, numpy.inf, 0, 0, 0]) + +sol = scipy.optimize.linprog(c, A_ub=A_eq, b_ub=b_eq, bounds=list(zip(lb, ub))) +# sol = numpy.linalg.solve(A_eq.T, b_eq.T) + +print (sol.status) +print (sol.message) +print (sol.success) +print (sol.x) + +print (sol.x / 9.81) \ No newline at end of file diff --git a/scripts/sim_discovery.py b/scripts/sim_discovery.py index 0760deb..04461ae 100644 --- a/scripts/sim_discovery.py +++ b/scripts/sim_discovery.py @@ -1,13 +1,36 @@ from modular.URDF_writer import * +import logging +FORMAT = '[%(levelname)s] [%(module)s]: %(message)s' +logging.basicConfig(format=FORMAT) +applogger = logging.getLogger("sim_discovery") + urdfwriter_kwargs_dict={ - 'verbose': True + 'verbose': True, + 'slave_desc_mode': 'use_pos', + 'logger': applogger, } -# 2nd instance of UrdfWriter class for the robot got from HW urdf_writer_fromHW = UrdfWriter(**urdfwriter_kwargs_dict) -reply = "{201: {active_ports: 15, esc_type: 50, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 1, robot_id: 201, topology: 4}, -1: {active_ports: 15, esc_type: 256, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 2, robot_id: -1, topology: 4}, 56: {active_ports: 3, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 3, robot_id: 56, topology: 2}, 53: {active_ports: 3, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 4, robot_id: 53, topology: 2}, 55: {active_ports: 1, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 5, robot_id: 55, topology: 1}, 11: {active_ports: 3, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 6, robot_id: 11, topology: 2}, 12: {active_ports: 1, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 7, robot_id: 12, topology: 1}, 31: {active_ports: 3, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 8, robot_id: 31, topology: 2}, 32: {active_ports: 1, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 9, robot_id: 32, topology: 1}, 41: {active_ports: 3, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 10, robot_id: 41, topology: 2}, 42: {active_ports: 1, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 11, robot_id: 42, topology: 1}, 21: {active_ports: 3, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 12, robot_id: 21, topology: 2}, 22: {active_ports: 1, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 13, robot_id: 22, topology: 1}}" +# old discovery with ids +# reply = "{201: {active_ports: 15, esc_type: 50, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 1, robot_id: 201, topology: 4}, -1: {active_ports: 15, esc_type: 256, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 2, robot_id: -1, topology: 4}, 56: {active_ports: 3, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 3, robot_id: 56, topology: 2}, 53: {active_ports: 3, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 4, robot_id: 53, topology: 2}, 55: {active_ports: 1, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 5, robot_id: 55, topology: 1}, 11: {active_ports: 3, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 6, robot_id: 11, topology: 2}, 12: {active_ports: 1, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 7, robot_id: 12, topology: 1}, 31: {active_ports: 3, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 8, robot_id: 31, topology: 2}, 32: {active_ports: 1, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 9, robot_id: 32, topology: 1}, 41: {active_ports: 3, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 10, robot_id: 41, topology: 2}, 42: {active_ports: 1, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 11, robot_id: 42, topology: 1}, 21: {active_ports: 3, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 12, robot_id: 21, topology: 2}, 22: {active_ports: 1, esc_type: 21, mod_id: 0, mod_rev: 0, mod_size: 0, mod_type: 0, position: 13, robot_id: 22, topology: 1}}" + +reply = "{1: {active_ports: 15, esc_type: 50, mod_id: 3, mod_rev: 0, mod_size: 0, mod_type: 2, position: 1, robot_id: 201, topology: 4}, 2: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 2, robot_id: -1, topology: 4}, 3: {active_ports: 3, esc_type: 21, mod_id: 8, mod_rev: 0, mod_size: 5, mod_type: 1, position: 3, robot_id: 21, topology: 2}, 4: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 4, robot_id: 22, topology: 1}, 5: {active_ports: 3, esc_type: 21, mod_id: 7, mod_rev: 0, mod_size: 5, mod_type: 1, position: 5, robot_id: 11, topology: 2}, 6: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 6, robot_id: 12, topology: 1}, 7: {active_ports: 3, esc_type: 21, mod_id: 7, mod_rev: 0, mod_size: 5, mod_type: 1, position: 7, robot_id: 31, topology: 2}, 8: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 8, robot_id: 32, topology: 1}, 9: {active_ports: 3, esc_type: 21, mod_id: 8, mod_rev: 0, mod_size: 5, mod_type: 1, position: 9, robot_id: 41, topology: 2}, 10: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 10, robot_id: 42, topology: 1}, 11: {active_ports: 3, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 11, robot_id: 55, topology: 2}, 12: {active_ports: 3, esc_type: 21, mod_id: 6, mod_rev: 0, mod_size: 4, mod_type: 1, position: 12, robot_id: 53, topology: 2}, 13: {active_ports: 3, esc_type: 21, mod_id: 4, mod_rev: 0, mod_size: 4, mod_type: 1, position: 13, robot_id: 51, topology: 2}, 14: {active_ports: 3, esc_type: 1280, mod_id: 6, mod_rev: 0, mod_size: 4, mod_type: 4, position: 14, robot_id: -1, topology: 2}, 15: {active_ports: 3, esc_type: 21, mod_id: 6, mod_rev: 0, mod_size: 4, mod_type: 1, position: 15, robot_id: 52, topology: 2}, 16: {active_ports: 3, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 16, robot_id: 56, topology: 2}, 17: {active_ports: 3, esc_type: 1280, mod_id: 6, mod_rev: 0, mod_size: 4, mod_type: 4, position: 17, robot_id: -1, topology: 2}, 18: {active_ports: 1, esc_type: 21, mod_id: 5, mod_rev: 0, mod_size: 4, mod_type: 1, position: 18, robot_id: 54, topology: 1}}" + +# CoNCERT robot without 3 legs +# reply = "{1: {active_ports: 13, esc_type: 50, mod_id: 3, mod_rev: 0, mod_size: 0, mod_type: 2, position: 1, robot_id: 201, topology: 3}, 2: {active_ports: 3, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 2, robot_id: -1, topology: 2}, 3: {active_ports: 3, esc_type: 21, mod_id: 7, mod_rev: 0, mod_size: 5, mod_type: 1, position: 3, robot_id: 11, topology: 2}, 4: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 4, robot_id: 12, topology: 1}, 5: {active_ports: 3, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 5, robot_id: 55, topology: 2}, 6: {active_ports: 3, esc_type: 21, mod_id: 6, mod_rev: 0, mod_size: 4, mod_type: 1, position: 6, robot_id: 53, topology: 2}, 7: {active_ports: 3, esc_type: 21, mod_id: 4, mod_rev: 0, mod_size: 4, mod_type: 1, position: 7, robot_id: 51, topology: 2}, 8: {active_ports: 3, esc_type: 1280, mod_id: 6, mod_rev: 0, mod_size: 4, mod_type: 4, position: 8, robot_id: -1, topology: 2}, 9: {active_ports: 3, esc_type: 21, mod_id: 6, mod_rev: 0, mod_size: 4, mod_type: 1, position: 9, robot_id: 52, topology: 2}, 10: {active_ports: 3, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 10, robot_id: 56, topology: 2}, 11: {active_ports: 3, esc_type: 1280, mod_id: 6, mod_rev: 0, mod_size: 4, mod_type: 4, position: 11, robot_id: -1, topology: 2}, 12: {active_ports: 1, esc_type: 21, mod_id: 5, mod_rev: 0, mod_size: 4, mod_type: 1, position: 12, robot_id: 54, topology: 1}}" + +# multi-hubs tests +# reply = "{1: {active_ports: 15, esc_type: 50, mod_id: 3, mod_rev: 0, mod_size: 0, mod_type: 2, position: 1, robot_id: 201, topology: 4}, 2: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 2, robot_id: -1, topology: 4}, 3: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 3, robot_id: -1, topology: 4}, 4: {active_ports: 3, esc_type: 21, mod_id: 8, mod_rev: 0, mod_size: 5, mod_type: 1, position: 4, robot_id: 21, topology: 2}, 5: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 5, robot_id: 22, topology: 1}, 6: {active_ports: 3, esc_type: 21, mod_id: 7, mod_rev: 0, mod_size: 5, mod_type: 1, position: 6, robot_id: 11, topology: 2}, 7: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 7, robot_id: 12, topology: 1}, 8: {active_ports: 3, esc_type: 21, mod_id: 7, mod_rev: 0, mod_size: 5, mod_type: 1, position: 8, robot_id: 31, topology: 2}, 9: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 9, robot_id: 32, topology: 1}, 10: {active_ports: 3, esc_type: 21, mod_id: 8, mod_rev: 0, mod_size: 5, mod_type: 1, position: 10, robot_id: 41, topology: 2}, 11: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 11, robot_id: 42, topology: 1}, 12: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 12, robot_id: 55, topology: 1}, 13: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 13, robot_id: -1, topology: 4}, 14: {active_ports: 1, esc_type: 21, mod_id: 6, mod_rev: 0, mod_size: 4, mod_type: 1, position: 14, robot_id: 53, topology: 1}, 15: {active_ports: 1, esc_type: 21, mod_id: 2, mod_rev: 0, mod_size: 2, mod_type: 1, position: 15, robot_id: 51, topology: 1}, 16: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 2, mod_type: 1, position: 16, robot_id: 61, topology: 1}, 17: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 3, position: 17, robot_id: 71, topology: 1}}" + +# reply = "{1: {active_ports: 15, esc_type: 50, mod_id: 3, mod_rev: 0, mod_size: 0, mod_type: 2, position: 1, robot_id: 201, topology: 4}, 2: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 2, robot_id: -1, topology: 4}, 3: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 3, robot_id: -1, topology: 4}, 4: {active_ports: 3, esc_type: 21, mod_id: 8, mod_rev: 0, mod_size: 5, mod_type: 1, position: 4, robot_id: 21, topology: 2}, 5: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 5, robot_id: 22, topology: 1}, 6: {active_ports: 3, esc_type: 21, mod_id: 7, mod_rev: 0, mod_size: 5, mod_type: 1, position: 6, robot_id: 11, topology: 2}, 7: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 7, robot_id: 12, topology: 1}, 8: {active_ports: 3, esc_type: 21, mod_id: 7, mod_rev: 0, mod_size: 5, mod_type: 1, position: 8, robot_id: 31, topology: 2}, 9: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 9, robot_id: 32, topology: 1}, 10: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 10, robot_id: -1, topology: 4}, 11: {active_ports: 3, esc_type: 21, mod_id: 8, mod_rev: 0, mod_size: 5, mod_type: 1, position: 11, robot_id: 41, topology: 2}, 12: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 12, robot_id: 42, topology: 1}, 13: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 13, robot_id: 42, topology: 1}, 14: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 14, robot_id: 55, topology: 1}, 15: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 15, robot_id: 55, topology: 1}, 16: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 16, robot_id: -1, topology: 4}, 17: {active_ports: 1, esc_type: 21, mod_id: 6, mod_rev: 0, mod_size: 4, mod_type: 1, position: 17, robot_id: 53, topology: 1}, 18: {active_ports: 1, esc_type: 21, mod_id: 2, mod_rev: 0, mod_size: 2, mod_type: 1, position: 18, robot_id: 51, topology: 1}, 19: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 2, mod_type: 1, position: 19, robot_id: 61, topology: 1}, 20: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 20, robot_id: -1, topology: 4}, 21: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 3, position: 21, robot_id: 71, topology: 1}, 22: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 22, robot_id: 71, topology: 1}, 23: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 23, robot_id: 71, topology: 1}}" + +# test scenario with hub tree depth > 2. not working yet! +# reply = "{1: {active_ports: 13, esc_type: 50, mod_id: 3, mod_rev: 0, mod_size: 0, mod_type: 2, position: 1, robot_id: 201, topology: 3}, 2: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 2, robot_id: -1, topology: 4}, 3: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 3, robot_id: -1, topology: 4}, 4: {active_ports: 3, esc_type: 21, mod_id: 8, mod_rev: 0, mod_size: 5, mod_type: 1, position: 4, robot_id: 21, topology: 2}, 5: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 5, robot_id: 22, topology: 1}, 6: {active_ports: 3, esc_type: 21, mod_id: 7, mod_rev: 0, mod_size: 5, mod_type: 1, position: 6, robot_id: 11, topology: 2}, 7: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 7, robot_id: 12, topology: 1}, 8: {active_ports: 3, esc_type: 21, mod_id: 7, mod_rev: 0, mod_size: 5, mod_type: 1, position: 8, robot_id: 31, topology: 2}, 9: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 9, robot_id: 32, topology: 1}, 10: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 10, robot_id: -1, topology: 4}, 11: {active_ports: 3, esc_type: 21, mod_id: 8, mod_rev: 0, mod_size: 5, mod_type: 1, position: 11, robot_id: 41, topology: 2}, 12: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 12, robot_id: 42, topology: 1}, 13: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 13, robot_id: -1, topology: 4}, 14: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 14, robot_id: 42, topology: 1}, 15: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 15, robot_id: 55, topology: 1}, 16: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 16, robot_id: 55, topology: 1}, 17: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 17, robot_id: 71, topology: 1}, 18: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 18, robot_id: 71, topology: 1}, 19: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 19, robot_id: -1, topology: 4}, 20: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 3, position: 20, robot_id: 71, topology: 1}, 21: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 21, robot_id: 71, topology: 1}, 22: {active_ports: 1, esc_type: 21, mod_id: 3, mod_rev: 0, mod_size: 4, mod_type: 1, position: 22, robot_id: 71, topology: 1}}" + +# mobile base only +# reply = "{1: {active_ports: 11, esc_type: 50, mod_id: 3, mod_rev: 0, mod_size: 0, mod_type: 2, position: 1, robot_id: 201, topology: 4}, 2: {active_ports: 15, esc_type: 256, mod_id: 4, mod_rev: 0, mod_size: 0, mod_type: 2, position: 2, robot_id: -1, topology: 4}, 3: {active_ports: 3, esc_type: 21, mod_id: 8, mod_rev: 0, mod_size: 5, mod_type: 1, position: 3, robot_id: 21, topology: 2}, 4: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 4, robot_id: 22, topology: 1}, 5: {active_ports: 3, esc_type: 21, mod_id: 7, mod_rev: 0, mod_size: 5, mod_type: 1, position: 5, robot_id: 11, topology: 2}, 6: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 6, robot_id: 12, topology: 1}, 7: {active_ports: 3, esc_type: 21, mod_id: 7, mod_rev: 0, mod_size: 5, mod_type: 1, position: 7, robot_id: 31, topology: 2}, 8: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 8, robot_id: 32, topology: 1}, 9: {active_ports: 3, esc_type: 21, mod_id: 8, mod_rev: 0, mod_size: 5, mod_type: 1, position: 9, robot_id: 41, topology: 2}, 10: {active_ports: 1, esc_type: 21, mod_id: 1, mod_rev: 0, mod_size: 5, mod_type: 5, position: 10, robot_id: 42, topology: 1}}" data = urdf_writer_fromHW.read_from_json(reply) diff --git a/setup.cfg b/setup.cfg index 6be53ea..f7dfc3b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,10 +29,14 @@ install_requires = defusedxml PyYaml rospkg + scipy + pin + apscheduler + gunicorn [options.packages.find] where = src [options.entry_points] console_scripts = - robot-design-studio = modular.web.RobotDesignStudio:main \ No newline at end of file + robot-design-studio = modular.web.RobotDesignStudio:main diff --git a/src/modular/ModelStats.py b/src/modular/ModelStats.py new file mode 100644 index 0000000..31d1e4e --- /dev/null +++ b/src/modular/ModelStats.py @@ -0,0 +1,165 @@ +import pinocchio +import numpy as np +import scipy.optimize + +from modular.enums import ModuleClass +class ModelStats: + def __init__(self, urdf_writer): + self.urdf_writer = urdf_writer + + # ensure the urdf string has been already generated + if getattr(self.urdf_writer, 'urdf_string', None) is None: + self.urdf_writer.write_urdf() + + self.update_model() + + def update_model(self): + # Load the urdf model + self.model = pinocchio.buildModelFromXML(self.urdf_writer.urdf_string) + + # Create data required by the algorithms + self.data = self.model.createData() + + # Get the tip link name + # HACK: we take the last chain in the list of chains. This should be changed to be the one selected by the user + if len(self.urdf_writer.listofchains) > 0: + self.tip_link_name = self.urdf_writer.find_chain_tip_link(self.urdf_writer.listofchains[-1]) + else: + self.tip_link_name = 'base_link' + + # Get the frame index for the end-effector + self.frame_idx = self.model.getFrameId(self.tip_link_name) # 'TCP_gripper_A' + + self.lower_limits = self.model.lowerPositionLimit + self.upper_limits = self.model.upperPositionLimit + + self.nq = self.model.nq + + def compute_payload(self, n_samples=10000): + ## Random Sampling + samples = n_samples + q_configurations = [pinocchio.randomConfiguration(self.model) for i in range(samples)] + + # Solve a linear programming problem to get the worst case force and therefore the worst case payload + # minimize: + # c @ x + # such that: + # A_ub @ x <= b_ub + # A_eq @ x == b_eq + # lb <= x <= ub + + c = np.array([0, 0, -1, 0, 0, 0]) + + lb = np.zeros(6) + ub = np.array([0, 0, np.inf, 0, 0, 0]) + + self.worst_case_force = np.array([0, 0, np.inf, 0, 0, 0]) + self.worst_case_q = np.zeros((self.nq)) + self.worst_case_tau = np.zeros((self.nq)) + self.worst_case_b = np.zeros((self.nq)) + self.worst_case_A = np.zeros((self.nq, 6)) + + zeros = np.zeros((self.nq)) + q = np.zeros((self.nq)) + A = np.zeros((self.nq, 6)) + b = np.zeros((self.nq)) + tau_rated = 162.0 + tau_max = np.ones((self.nq))*tau_rated + tau_min = - tau_max + + # Compute the jacobian and gravity torques for all the samples. Then, compute the worst case force -> overall payload + for idx, q in enumerate(q_configurations): + + pinocchio.computeJointJacobians(self.model, self.data, q) + # pinocchio.framesForwardKinematics(model, data, q) + A = pinocchio.getFrameJacobian(self.model, self.data, self.frame_idx, pinocchio.ReferenceFrame.LOCAL_WORLD_ALIGNED)[:6].T * 1 # 9.81 + tau = pinocchio.nonLinearEffects(self.model, self.data, q, zeros) + + b1 = tau_max - tau + b2 = - tau_min + tau + b = np.concatenate((b1, b2)) + A1 = A + A2 = -A + A = np.vstack((A1, A2)) + + sol = scipy.optimize.linprog(c, A_ub=A, b_ub=b, bounds=list(zip(lb, ub))) + + if (sol.success): + # print (sol.x / 9.81) + if sol.x[2]/9.81 < self.worst_case_force[2]/9.81: + self.worst_case_force = sol.x + self.worst_case_q = q + self.worst_case_tau = tau + self.worst_case_b = b + self.worst_case_A = A + + self.payload = self.worst_case_force[2]/9.81 + + return self.payload + + def get_payload(self): + return self.payload + + def compute_max_reach(self, n_samples=10000): + self.max_reach = None + return self.max_reach + + def get_max_reach(self): + return self.max_reach + + def compute_modules(self): + n_modules = 0 + for chain in self.urdf_writer.listofchains: + for module in chain: + if module.is_structural: + n_modules += 1 + self.n_modules = n_modules + return self.n_modules + + def get_modules(self): + return self.n_modules + + def compute_joint_modules(self): + n_joint_modules = 0 + for chain in self.urdf_writer.listofchains: + for module in chain: + if module in ModuleClass.joint_modules(): + n_joint_modules += 1 + self.n_joint_modules = n_joint_modules + return self.n_joint_modules + + def get_joint_modules(self): + return self.n_joint_modules + + def compute_stats(self, n_samples): + try: + self.payload = self.compute_payload(n_samples=n_samples) + except RuntimeError as e: + self.payload = None + + try: + self.max_reach = self.compute_max_reach(n_samples=n_samples) + except e: + self.max_reach = None + + try: + self.n_modules = self.compute_modules() + except e: + self.n_modules = None + + try: + self.n_joint_modules = self.compute_modules() + except e: + self.n_joint_modules = None + + return self.get_stats() + + def get_stats(self): + stats={ + 'modules': self.n_modules, + 'joint_modules': self.n_joint_modules, + 'payload': self.payload, + 'max_reach': self.max_reach + } + + return stats \ No newline at end of file diff --git a/src/modular/ModuleNode.py b/src/modular/ModuleNode.py index f19d5d1..3360aa2 100644 --- a/src/modular/ModuleNode.py +++ b/src/modular/ModuleNode.py @@ -9,36 +9,10 @@ import sys import os import tf -from enum import Enum + import anytree -from modular.utils import ResourceFinder - -class ModuleDescriptionFormat(Enum): - YAML = 1 # YAML format used internally in HHCM - JSON = 2 # JSON format used for the CONCERT project - -class KinematicsConvention(str, Enum): - """Kinematic convention used to define the rototranslation between two modules""" - DH_EXT = 'DH_ext' # extended Denavit-Hartenberg convention. See https://mediatum.ub.tum.de/doc/1280464/file.pdf - URDF = 'urdf' # URDF convention - AFFINE = 'affine_tf_matrix' # Affine trasformation matrix convention - -class ModuleType(str, Enum): - """Type of module""" - LINK = 'link' - JOINT = 'joint' - CUBE = 'cube' - WHEEL = 'wheel' - TOOL_EXCHANGER = 'tool_exchanger' - GRIPPER = 'gripper' - MOBILE_BASE = 'mobile_base' - BASE_LINK = 'base_link' - SIZE_ADAPTER = 'size_adapter' - SIMPLE_EE = 'simple_ee' - END_EFFECTOR = 'end_effector' - DRILL = 'drill' - DAGANA = 'dagana' +from modular.enums import ModuleDescriptionFormat, KinematicsConvention, ModuleType, ModuleClass # import collections.abc def update_nested_dict(d, u): @@ -105,7 +79,9 @@ def parse_dict(self, d): def type_dispatcher(self, d): """Dispatch the parsing of the dictionary d according to the module type""" - if self.owner.type in {ModuleType.LINK, ModuleType.GRIPPER, ModuleType.TOOL_EXCHANGER, ModuleType.SIZE_ADAPTER, ModuleType.END_EFFECTOR, ModuleType.DRILL}: + header_obj = getattr(self.owner, "header") + update_nested_dict(header_obj.__dict__, d['header']) + if self.owner.type in ModuleClass.link_modules() | ModuleClass.end_effector_modules() - {ModuleType.DAGANA}: if len(d['joints']) != 0: raise ValueError('A link must have no joints') if len(d['bodies']) != 1: @@ -136,7 +112,7 @@ def type_dispatcher(self, d): self.owner.size_in = d['bodies'][0]['connectors'][0]['size'] else: self.owner.flange_size = output_flange_size - elif self.owner.type in {ModuleType.JOINT, ModuleType.WHEEL}: + elif self.owner.type in ModuleClass.joint_modules(): if len(d['joints']) != 1: raise ValueError('A joint must have exactly one joint') if len(d['bodies']) != 2: @@ -185,7 +161,7 @@ def type_dispatcher(self, d): self.owner.CentAcESC = Module.Attribute(dict_joint['control_parameters']['xbot']) # xbot_gz self.owner.xbot_gz = Module.Attribute(dict_joint['control_parameters']['xbot_gz']) - elif self.owner.type in {ModuleType.CUBE, ModuleType.MOBILE_BASE}: + elif self.owner.type in ModuleClass.hub_modules(): if len(d['joints']) != 0: raise ValueError('A hub must have no joints') if len(d['bodies']) != 1: @@ -469,9 +445,9 @@ def get_homogeneous_matrix(self, reverse): pass def get_hub_connections_tf(self, reverse): - """Computes the homogeneous transformation matrices for the 4 cube connections""" + """Computes the homogeneous transformation matrices for the 4 hub connections""" origin, xaxis, yaxis, zaxis = (0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1) - max_num_con = 10 + max_num_con = 20 for i in range(1, max_num_con): if hasattr(self.kinematics, "connector_{}".format(i)): @@ -528,14 +504,15 @@ def get_transform(self, reverse): 'joint': self.get_proximal_distal_matrices, 'wheel': self.get_proximal_distal_matrices, 'link': self.get_homogeneous_matrix, + 'socket': self.get_homogeneous_matrix, 'size_adapter': self.get_homogeneous_matrix, 'tool_exchanger': self.get_homogeneous_matrix, 'end_effector': self.get_homogeneous_matrix, 'drill': self.get_homogeneous_matrix, 'dagana': lambda reverse: None, 'gripper': self.get_homogeneous_matrix, - 'cube': self.get_hub_connections_tf, # self.get_cube_connections_tf, - 'mobile_base': self.get_hub_connections_tf, # self.get_mobile_base_connections_tf, + 'cube': self.get_hub_connections_tf, + 'mobile_base': self.get_hub_connections_tf, 'base_link': tf.transformations.identity_matrix() } return switcher.get(x, 'Invalid type')(reverse) @@ -606,11 +583,20 @@ def module_from_yaml(filename, father=None, yaml_template=None, reverse=False): print(exc) # Create an instance of a ModuleNode class from the dictionary obtained from YAML result = ModuleNode(data, filename, format=ModuleDescriptionFormat.YAML, parent=father, template_dictionary=template_data) - # result.set_type(filename) result.get_transform(reverse) return result - +# +def module_from_yaml_dict(yaml_dict, father=None, yaml_template_dict=None, reverse=False): + """Function parsing YAML dictionary describing a generic module and returning an instance of a Module class""" + if yaml_template_dict: + template_dict = yaml_template_dict + else: + template_dict = {} + # Create an instance of a ModuleNode class from the dictionary obtained from YAML + result = ModuleNode(yaml_dict, yaml_dict['header']['name'], format=ModuleDescriptionFormat.YAML, parent=father, template_dictionary=template_dict) + result.get_transform(reverse) + return result # def module_from_json(filename, father=None, yaml_template=None, reverse=False): """Function parsing JSON file describing a generic module and returning an instance of a Module class""" @@ -632,6 +618,17 @@ def module_from_json(filename, father=None, yaml_template=None, reverse=False): result.get_transform(reverse) return result +# +def module_from_json_dict(json_dict, father=None, yaml_template_dict=None, reverse=False): + """Function parsing JSON dictionary describing a generic module and returning an instance of a Module class""" + if yaml_template_dict: + template_dict = yaml_template_dict + else: + template_dict = {} + # Create an instance of a ModuleNode class from the dictionary obtained from JSON + result = ModuleNode(json_dict, json_dict['header']['name'], format=ModuleDescriptionFormat.JSON, parent=father, template_dictionary=template_dict) + result.get_transform(reverse) + return result def main(): # module = module_from_yaml(sys.argv[1], None, False) diff --git a/src/modular/URDF_writer.py b/src/modular/URDF_writer.py index d52534a..9845c12 100644 --- a/src/modular/URDF_writer.py +++ b/src/modular/URDF_writer.py @@ -1,3 +1,8 @@ +#!/usr/bin/env python3 +# Disable some of the pylint violations in this file +# see https://pylint.pycqa.org/en/latest/user_guide/messages/message_control.html#block-disables +# pylint: disable=line-too-long, missing-function-docstring, missing-module-docstring + from __future__ import print_function from future.utils import iteritems from abc import ABCMeta, abstractmethod @@ -24,8 +29,10 @@ import copy from collections import OrderedDict -from modular.utils import ResourceFinder -import modular.ModuleNode as ModuleNode +from modular.utils import ResourceFinder, ModularResourcesManager +from modular.enums import ModuleType, ModuleClass +from modular.ModelStats import ModelStats +import modular.ModuleNode as ModuleNode import argparse import rospy @@ -66,6 +73,12 @@ # Use /tmp folder to store urdf, srdf, etc. path_name = "/tmp" +from enum import Enum +class SlaveDescMode(str, Enum): + """Slave description mode""" + USE_POSITIONS = 'use_pos' + USE_IDS = 'use_ids' + # noinspection PyPep8Naming def ordered_load(stream, Loader=yaml.SafeLoader, object_pairs_hook=OrderedDict): class OrderedLoader(Loader): @@ -166,6 +179,8 @@ def write_srdf(self, builder_joint_map=None): root = ET.Element('robot', name="ModularBot") + active_modules_chains = [] + groups = [] chains = [] joints = [] @@ -173,64 +188,54 @@ def write_srdf(self, builder_joint_map=None): end_effectors = [] groups_in_chains_group = [] groups_in_arms_group = [] - i = 0 - self.urdf_writer.print(self.urdf_writer.listofchains) - for joints_chain in self.urdf_writer.listofchains: - group_name = "chain" + self.urdf_writer.branch_switcher.get(i + 1) - # group_name = "arm" + self.urdf_writer.branch_switcher.get(i + 1) + active_modules_chains = self.urdf_writer.get_actuated_modules_chains() + self.urdf_writer.print(active_modules_chains) + + for idx, joints_chain in enumerate(active_modules_chains): + group_name = "chain" + self.urdf_writer.find_chain_tag(joints_chain) groups.append(ET.SubElement(root, 'group', name=group_name)) base_link = self.urdf_writer.find_chain_base_link(joints_chain) tip_link = self.urdf_writer.find_chain_tip_link(joints_chain) - chains.append(ET.SubElement(groups[i], 'chain', base_link=base_link, tip_link=tip_link)) - i += 1 - i = 0 - arms_group = ET.SubElement(root, 'group', name="arms") + chains.append(ET.SubElement(groups[idx], 'chain', base_link=base_link, tip_link=tip_link)) + + # Create groups for chains, arms and wheels. Also 'group_state' for homing chains_group = ET.SubElement(root, 'group', name="chains") + arms_group = ET.SubElement(root, 'group', name="arms") wheels_group = self.add_wheel_group_to_srdf(root, "wheels") group_state = ET.SubElement(root, 'group_state', name="home", group="chains") - for joints_chain in self.urdf_writer.listofchains: - group_name = "chain" + self.urdf_writer.branch_switcher.get(i + 1) + + for joints_chain in active_modules_chains: + group_name = "chain" + self.urdf_writer.find_chain_tag(joints_chain) groups_in_chains_group.append(ET.SubElement(chains_group, 'group', name=group_name)) - groups_in_arms_group.append(ET.SubElement(arms_group, 'group', name=group_name)) for joint_module in joints_chain: - if joint_module.type == 'joint': - # Homing state - if builder_joint_map is not None: - homing_value = float(builder_joint_map[joint_module.name]['angle']) - else: - homing_value = 0.1 - # self.urdf_writer.print(homing_value) - joints.append(ET.SubElement(group_state, 'joint', name=joint_module.name, value=str(homing_value))) - elif joint_module.type == 'dagana': - # Homing state - if builder_joint_map is not None: - homing_value = float(builder_joint_map[joint_module.dagana_joint_name]['angle']) - else: - homing_value = 0.1 - # self.urdf_writer.print(homing_value) - joints.append(ET.SubElement(group_state, 'joint', name=joint_module.dagana_joint_name, value=str(homing_value))) - elif joint_module.type == 'wheel': - # Homing state + # add joints chain to srdf end-effectors group + if joint_module.type in ModuleClass.end_effector_modules(): + groups_in_arms_group.append(ET.SubElement(arms_group, 'group', name=group_name)) + # TODO: add end-effector module to srdf end-effectors group. To be fixed for all end-effector types. + # add wheel module to srdf wheels group + if joint_module.type is ModuleType.WHEEL: + wheels += filter(lambda item: item is not None, [self.add_wheel_to_srdf(wheels_group, joint_module.name)]) + # add homing state for each joint-like module. Also create custom groups for some end-effectors + if joint_module.type in ModuleClass.joint_modules() | {ModuleType.DAGANA}: + joint_name = self.urdf_writer.get_joint_name(joint_module) if builder_joint_map is not None: - homing_value = float(builder_joint_map[joint_module.name]['angle']) + homing_value = float(builder_joint_map[joint_name]) else: homing_value = 0.1 - # self.urdf_writer.print(homing_value) - joints.append(ET.SubElement(group_state, 'joint', name=joint_module.name, value=str(homing_value))) - - #wheel_name = "wheel" + self.urdf_writer.branch_switcher.get(i + 1) # BUG: this is not correct. Probably better to get the tag from the name - wheels += filter(lambda item: item is not None, [self.add_wheel_to_srdf(wheels_group, joint_module.name)]) - elif joint_module.type == 'tool_exchanger': + joints.append(ET.SubElement(group_state, + 'joint', + name=joint_name, + value=str(homing_value))) + elif joint_module.type is ModuleType.TOOL_EXCHANGER: tool_exchanger_group = ET.SubElement(root, 'group', name="ToolExchanger") - end_effectors.append(ET.SubElement(tool_exchanger_group, 'joint', + end_effectors.append(ET.SubElement(tool_exchanger_group, + 'joint', name=joint_module.name + '_fixed_joint')) - elif joint_module.type == 'gripper': - hand_name = "hand" + self.urdf_writer.branch_switcher.get(i + 1) + elif joint_module.type is ModuleType.GRIPPER: + hand_name = "hand" + self.urdf_writer.find_chain_tag(joints_chain) self.add_hand_group_to_srdf(root, joint_module.name, hand_name) - # groups_in_hands_group.append(ET.SubElement(hands_group, 'group', name=hand_name)) end_effectors += filter(lambda item: item is not None, [self.add_gripper_to_srdf(root, joint_module.name, hand_name, group_name)]) - i += 1 xmlstr = xml.dom.minidom.parseString(ET.tostring(root)).toprettyxml(indent=" ") @@ -256,12 +261,12 @@ def write_joint_map(self, use_robot_id=False): joint_map['joint_map'][i] = "HUB_" + str(i) for joints_chain in self.urdf_writer.listofchains: for joint_module in joints_chain: - if joint_module.type not in {'joint', 'dagana', 'wheel', 'tool_exchanger', 'gripper', 'drill'}: + if joint_module.type in ModuleClass.nonactuated_modules(): continue i += 1 - if joint_module.type == 'tool_exchanger': + if joint_module.type is ModuleType.TOOL_EXCHANGER: name = joint_module.name + '_fixed_joint' - elif joint_module.type == 'gripper': + elif joint_module.type is ModuleType.GRIPPER: name = joint_module.name + '_fixed_joint' else: name = joint_module.name @@ -355,7 +360,6 @@ def write_srdf(self, builder_joint_map=None): groups_in_chains_group = [] groups_in_arms_group = [] # groups_in_hands_group = [] - i = 0 # MoveIt controller_list = [] @@ -388,15 +392,12 @@ def write_srdf(self, builder_joint_map=None): ompl.update([('planner_configs', copy.deepcopy(tmp_ompl['planner_configs']))]) self.urdf_writer.print(self.urdf_writer.listofchains) - for joints_chain in self.urdf_writer.listofchains: - group_name = "arm" + self.urdf_writer.branch_switcher.get(i + 1) - #group_name = "chain_"+str(i+1) + for idx, joints_chain in enumerate(self.urdf_writer.listofchains): + group_name = "arm" + self.urdf_writer.find_chain_tag(joints_chain) groups.append(ET.SubElement(root, 'group', name=group_name)) base_link = self.urdf_writer.find_chain_base_link(joints_chain) tip_link = self.urdf_writer.find_chain_tip_link(joints_chain) - chains.append(ET.SubElement(groups[i], 'chain', base_link=base_link, tip_link=tip_link)) - i += 1 - i = 0 + chains.append(ET.SubElement(groups[idx], 'chain', base_link=base_link, tip_link=tip_link)) arms_group = ET.SubElement(root, 'group', name="arms") #chains_group = ET.SubElement(root, 'group', name="chains") group_state = ET.SubElement(root, 'group_state', name="home", group="chains") @@ -404,21 +405,21 @@ def write_srdf(self, builder_joint_map=None): hands_group = ET.SubElement(root, 'group', name="hands") # MoveIt initial_poses.append(OrderedDict([('group', 'arms'), ('pose', 'home')])) - for joints_chain in self.urdf_writer.listofchains: - #group_name = "chain_"+str(i+1) + for idx, joints_chain in enumerate(self.urdf_writer.listofchains): + #group_name = "chain" + self.urdf_writer.find_chain_tag(joints_chain) #groups_in_chains_group.append(ET.SubElement(chains_group, 'group', name=group_name)) - group_name = "arm" + self.urdf_writer.branch_switcher.get(i + 1) - hand_name = "hand" + self.urdf_writer.branch_switcher.get(i + 1) + group_name = "arm" + self.urdf_writer.find_chain_tag(joints_chain) + hand_name = "hand" + self.urdf_writer.find_chain_tag(joints_chain) groups_in_arms_group.append(ET.SubElement(arms_group, 'group', name=group_name)) # MoveIt: create controller list controller_list.append(OrderedDict([('name', 'fake_'+group_name+'_controller'), ('joints', [])])) kinematics.update([(group_name, copy.deepcopy(tmp_kinematics['group_name']))]) ompl.update([(group_name, copy.deepcopy(tmp_ompl['group_name']))]) for joint_module in joints_chain: - if joint_module.type in {'joint', 'dagana', 'wheel'} : + if joint_module.type in ModuleClass.joint_modules() | {ModuleType.DAGANA}: # Homing state if builder_joint_map is not None: - homing_value = float(builder_joint_map[joint_module.name]['angle']) + homing_value = float(builder_joint_map[joint_module.name]) else: homing_value = 0.1 #self.urdf_writer.print(homing_value) @@ -426,24 +427,23 @@ def write_srdf(self, builder_joint_map=None): # Disable collision # disable_collision = ET.SubElement(root, 'disable_collisions', link1=joint_module.stator_name, link2=joint_module.distal_link_name, reason='Adjacent') # MoveIt: add joints to controller - controller_list[i]['joints'].append(joint_module.name) + controller_list[idx]['joints'].append(joint_module.name) hardware_interface_joints.append(joint_module.name) - elif joint_module.type == 'tool_exchanger': + elif joint_module.type is ModuleType.TOOL_EXCHANGER: tool_exchanger_group = ET.SubElement(root, 'group', name="ToolExchanger") end_effectors.append(ET.SubElement(tool_exchanger_group, 'joint', name=joint_module.name + '_fixed_joint')) - elif joint_module.type == 'gripper': + elif joint_module.type is ModuleType.GRIPPER: self.add_hand_group_to_srdf(root, joint_module.name, hand_name) # groups_in_hands_group.append(ET.SubElement(hands_group, 'group', name=hand_name)) end_effectors += filter(lambda item: item is not None, [self.add_gripper_to_srdf(root, joint_module.name, hand_name, group_name)]) controller_list.append(OrderedDict([('name', 'fake_' + hand_name + '_controller'), ('joints', [])])) - controller_list[i+1]['joints'].append(joint_module.name+'_finger_joint1') - controller_list[i+1]['joints'].append(joint_module.name + '_finger_joint2') + controller_list[idx+1]['joints'].append(joint_module.name+'_finger_joint1') + controller_list[idx+1]['joints'].append(joint_module.name + '_finger_joint2') hardware_interface_joints.append(joint_module.name + '_finger_joint1') initial_poses.append(OrderedDict([('group', hand_name), ('pose', 'open')])) ompl.update([(hand_name, copy.deepcopy(tmp_ompl['group_name']))]) ompl.update([('arm_'+hand_name, copy.deepcopy(tmp_ompl['group_name']))]) - i += 1 # MoveIt: add virtual joint # ET.SubElement(root, "virtual_joint", name="virtual_joint", type="floating", parent_frame="world", child_link="base_link") @@ -563,7 +563,6 @@ def write_lowlevel_config(self, use_robot_id=False): with open(basic_config_filename, 'r') as stream: try: lowlevel_config = ordered_load(stream, yaml.SafeLoader) - # cartesio_stack['EE']['base_link'] = self.urdf_writer.listofchains[0] self.urdf_writer.print(list(lowlevel_config.items())[0]) except yaml.YAMLError as exc: self.urdf_writer.print(exc) @@ -577,9 +576,9 @@ def write_lowlevel_config(self, use_robot_id=False): # HACK p += 1 for joint_module in joints_chain: - if joint_module.type not in {'joint', 'dagana', 'wheel', 'tool_exchanger', 'gripper'}: + if joint_module.type in ModuleClass.nonactuated_modules(): continue - if joint_module.type in { 'joint', 'wheel' }: + if joint_module.type in ModuleClass.joint_modules(): i += 1 lowlevel_config['GazeboXBotPlugin']['gains'][joint_module.name] = OrderedDict( [('p', 300), ('d', 20)]) @@ -595,7 +594,7 @@ def write_lowlevel_config(self, use_robot_id=False): # TODO: fix this if p > 1: value.pid.impedance = [500.0, 20.0, 1.0, 0.003, 0.99] - elif joint_module.type == 'tool_exchanger': + elif joint_module.type is ModuleType.TOOL_EXCHANGER: if use_robot_id: key = 'AinMsp432ESC_' + str(joint_module.robot_id) xbot_ecat_interface = [[int(joint_module.robot_id)], "libXBotEcat_ToolExchanger"] @@ -605,7 +604,7 @@ def write_lowlevel_config(self, use_robot_id=False): value = joint_module.AinMsp432ESC self.urdf_writer.print(yaml.dump(joint_module.AinMsp432ESC)) lowlevel_config['HALInterface']['IEndEffectors'].append(xbot_ecat_interface) - elif joint_module.type == 'gripper': + elif joint_module.type is ModuleType.GRIPPER: if use_robot_id: key = 'LpESC_' + str(joint_module.robot_id) xbot_ecat_interface = [[int(joint_module.robot_id)], "libXBotEcat_Gripper"] @@ -663,7 +662,7 @@ def remove_joint(self, joint_name): if pid.attrib['name'] == joint_name: self.pid_node.remove(pid) - # SRDF + # SRDF def add_gripper_to_srdf(self, root, gripper_name, hand_name, parent_group_name): return None @@ -699,14 +698,12 @@ def write_joint_map(self, use_robot_id=False): joint_map['joint_map'][i] = "HUB_" + str(i) for joints_chain in self.urdf_writer.listofchains: for joint_module in joints_chain: - if joint_module.type not in {'joint', 'dagana', 'wheel', 'tool_exchanger', 'gripper', 'drill'}: + if joint_module.type in ModuleClass.nonactuated_modules(): continue i += 1 - if joint_module.type == 'tool_exchanger': + if joint_module.type is ModuleType.TOOL_EXCHANGER: name = joint_module.name + '_fixed_joint' - elif joint_module.type == 'dagana': - name = joint_module.dagana_joint_name - elif joint_module.type == 'gripper': + elif joint_module.type is ModuleType.GRIPPER: name = joint_module.name fingers = [name + '_rightfinger', name + '_leftfinger'] if use_robot_id: @@ -714,7 +711,7 @@ def write_joint_map(self, use_robot_id=False): else: joint_map['albero_gripper_map'][i] = {'name': name, 'fingers': fingers} else: - name = joint_module.name + name = self.urdf_writer.get_joint_name(joint_module) if use_robot_id: joint_map['joint_map'][int(joint_module.robot_id)] = name @@ -758,10 +755,10 @@ def write_lowlevel_config(self, use_robot_id=False): i = 0 for joints_chain in self.urdf_writer.listofchains: for joint_module in joints_chain: - if joint_module.type not in {'joint', 'dagana', 'wheel', 'tool_exchanger', 'gripper', 'drill'}: + if joint_module.type in ModuleClass.nonactuated_modules(): continue i += 1 - if joint_module.type in ('tool_exchanger', 'gripper'): + if joint_module.type in {ModuleType.TOOL_EXCHANGER, ModuleType.GRIPPER}: if use_robot_id: mod_id = str(joint_module.robot_id) else: @@ -774,7 +771,7 @@ def write_lowlevel_config(self, use_robot_id=False): i = 0 for joints_chain in self.urdf_writer.listofchains: for joint_module in joints_chain: - if joint_module.type =='dagana': + if joint_module.type is ModuleType.DAGANA: attrs = [a for a in dir(joint_module.joint_gripper_adapter) if not a.startswith('__') and not callable(getattr(joint_module.joint_gripper_adapter, a))] attrs_with_prefix = [joint_module.name+"/" + x for x in attrs] @@ -852,21 +849,18 @@ def write_lowlevel_config(self, use_robot_id=False): # HACK p += 1 for joint_module in joints_chain: - if joint_module.type not in {'joint', 'dagana', 'wheel', 'tool_exchanger', 'gripper', 'drill'}: + if joint_module.type in ModuleClass.nonactuated_modules(): continue - if joint_module.type in ['joint', 'dagana']: - if joint_module.type == 'dagana': - key = joint_module.dagana_joint_name - else: - key = joint_module.name + if joint_module.type in {ModuleType.JOINT, ModuleType.DAGANA}: + key = self.urdf_writer.get_joint_name(joint_module) value = joint_module.CentAcESC # Remove parameters that are now not used by XBot2 (they are handled by the EtherCat master on a different config file) if hasattr(value, 'sign'): - del value.sign + del value.sign if hasattr(value, 'pos_offset'): - del value.pos_offset + del value.pos_offset if hasattr(value, 'max_current_A'): - del value.max_current_A + del value.max_current_A impd4_joint_config[key] = copy.deepcopy(value) impd4_joint_config[key].control_mode = 'D4_impedance_ctrl' @@ -899,16 +893,16 @@ def write_lowlevel_config(self, use_robot_id=False): # if p > 1: # value.pid.impedance = [500.0, 20.0, 1.0, 0.003, 0.99] - elif joint_module.type == 'wheel': - key = joint_module.name + elif joint_module.type is ModuleType.WHEEL: + key = self.urdf_writer.get_joint_name(joint_module) value = joint_module.CentAcESC # Remove parameters that are now not used by XBot2 (they are handled by the EtherCat master on a different config file) if hasattr(value, 'sign'): - del value.sign + del value.sign if hasattr(value, 'pos_offset'): - del value.pos_offset + del value.pos_offset if hasattr(value, 'max_current_A'): - del value.max_current_A + del value.max_current_A impd4_joint_config[key] = copy.deepcopy(value) impd4_joint_config[key].control_mode = '71_motor_vel_ctrl' @@ -922,31 +916,20 @@ def write_lowlevel_config(self, use_robot_id=False): if hasattr(idle_joint_config[key].pid, 'velocity'): del idle_joint_config[key].pid.velocity - elif joint_module.type == 'dagana': - key = joint_module.name - value = joint_module.CentAcESC - # Remove parameters that are now not used by XBot2 (they are handled by the EtherCat master on a different config file) - if hasattr(value, 'sign'): - del value.sign - if hasattr(value, 'pos_offset'): - del value.pos_offset - if hasattr(value, 'max_current_A'): - del value.max_current_A - - elif joint_module.type == 'tool_exchanger': + elif joint_module.type is ModuleType.TOOL_EXCHANGER: key = joint_module.name value = joint_module.AinMsp432ESC - elif joint_module.type == 'gripper': + elif joint_module.type is ModuleType.GRIPPER: key = joint_module.name + '_motor' value = joint_module.LpESC # Remove parameters that are now not used by XBot2 (they are handled by the EtherCat master on a different config file) if hasattr(value, 'sign'): - del value.sign + del value.sign if hasattr(value, 'pos_offset'): - del value.pos_offset + del value.pos_offset if hasattr(value, 'max_current_A'): - del value.max_current_A + del value.max_current_A impd4_joint_config[key] = copy.deepcopy(value) impd4_joint_config[key].control_mode = '3B_motor_pos_ctrl' @@ -957,9 +940,9 @@ def write_lowlevel_config(self, use_robot_id=False): # idle_joint_config[key] = copy.deepcopy(value) # idle_joint_config[key].control_mode = 'idle' # Remove parameters that are now not used by XBot2 (they are handled by the EtherCat master on a different config file) - # del idle_joint_config[key].sign - # del idle_joint_config[key].pos_offset - # del idle_joint_config[key].max_current_A + # del idle_joint_config[key].sign + # del idle_joint_config[key].pos_offset + # del idle_joint_config[key].max_current_A with open(xbot2_config_template, 'r') as stream: try: @@ -1022,15 +1005,37 @@ def write_lowlevel_config(self, use_robot_id=False): # noinspection PyUnresolvedReferences class UrdfWriter: - def __init__(self, - config_file='config_file.yaml', - control_plugin='xbot2', - elementree=None, - speedup=False, - parent=None, + def __init__(self, + config_file='config_file.yaml', + control_plugin='xbot2', + elementree=None, + speedup=False, + parent=None, floating_base=False, verbose=False, - logger=None): + logger=None, + slave_desc_mode='use_pos'): + self.config_file = config_file + self.resource_finder = ResourceFinder(self.config_file) + self.modular_resources_manager = ModularResourcesManager(self.resource_finder) + self.reset(control_plugin, + elementree, + speedup, + parent, + floating_base, + verbose, + logger, + slave_desc_mode) + + def reset(self, + control_plugin='xbot2', + elementree=None, + speedup=False, + parent=None, + floating_base=False, + verbose=False, + logger=None, + slave_desc_mode='use_pos'): # Setting this variable to True, speed up the robot building. # To be used when the urdf does not need to be shown at every iteration @@ -1050,21 +1055,16 @@ def __init__(self, self.set_floating_base(floating_base) if logger is None: - self.logger = logging.getLogger('URDF_writer') + self.logger = logging.getLogger('URDF_writer') else: self.logger = logger - + self.verbose = verbose if self.verbose and self.logger is not None: - self.logger.setLevel(logging.DEBUG) + self.logger.setLevel(logging.DEBUG) else: pass - self.config_file = config_file - - self.resource_finder = ResourceFinder(self.config_file) - self.resources_paths = [['resources_path'], ['external_resources', 'concert_resources_path']] - self.collision_elements = [] # Plugin class attribute. Can be XBot2Plugin, XBotCorePlugin or RosControlPlugin @@ -1090,7 +1090,7 @@ def __init__(self, #self.root = ET.fromstring(string) self.urdf_tree = ET.ElementTree(self.root) - + # change path to xacro library library_filename = self.resource_finder.get_filename('urdf/ModularBot.library.urdf.xacro', ['data_path']) control_filename = self.resource_finder.get_filename('urdf/ModularBot.control.urdf.xacro', ['data_path']) @@ -1106,8 +1106,9 @@ def __init__(self, self.root = elementree self.urdf_tree = ET.ElementTree(self.root) - self.tag_num = 1 + self.tag_num = 0 self.branch_switcher = { + 0: '', 1: '_A', 2: '_B', 3: '_C', @@ -1128,41 +1129,48 @@ def __init__(self, self.inverse_branch_switcher = {y: x for x, y in iteritems(self.branch_switcher)} - self.n_cubes = 0 - self.cube_switcher = { - 0: 'a', - 1: 'b', - 2: 'c', - 3: 'd', - 4: 'e', - 5: 'f', - 6: 'g', - 7: 'h' - } - - self.listofchains = [] - self.listofhubs = [] - self.origin, self.xaxis, self.yaxis, self.zaxis = (0, 0, 0.4), (1, 0, 0), (0, 1, 0), (0, 0, 1) - # add attribute corresponding to the connector transform - self.T_con = tf.transformations.translation_matrix((0, 0, 0.0)) # self.slavecube.geometry.connector_length)) - data = {'type': "base_link", 'name': "base_link", 'kinematics_convention': "urdf"} self.base_link = ModuleNode.ModuleNode(data, "base_link") setattr(self.base_link, 'name', "base_link") - setattr(self.base_link, 'tag', "_A") + setattr(self.base_link, 'tag', self.branch_switcher.get(self.tag_num)) setattr(self.base_link, 'flange_size', '3') setattr(self.base_link, 'i', 0) setattr(self.base_link, 'p', 0) setattr(self.base_link, 'Homogeneous_tf', tf.transformations.identity_matrix()) setattr(self.base_link, 'robot_id', 0) + setattr(self.base_link, 'current_port', 1) + #HACK: base_link does not have ports. + setattr(self.base_link, 'active_ports', "0011") + setattr(self.base_link, 'occupied_ports', "0001") + setattr(self.base_link, 'connectors', ['connector_0']) + setattr(self.base_link, 'connector_idx', 1) + setattr(self.base_link, 'is_structural', False) + setattr(self.base_link, 'mesh_names', []) + + self.listofchains = [[self.base_link]] + self.listofhubs = [] self.parent_module = self.base_link # update generator expression - self.update_generator() + self.update_generators() + + # map between name of the mesh and the module + self.mesh_to_module_map = {} + + self.urdf_string = self.process_urdf() + + self.model_stats = ModelStats(self) + + # set the slave description mode + try: + self.slave_desc_mode = SlaveDescMode(slave_desc_mode) + except ValueError: + self.slave_desc_mode = SlaveDescMode.USE_POSITIONS + self.info_print('Slave description mode not recognized! Defaulting to USE_POSITIONS') def set_floating_base(self, floating_base): """Set the floating base flag""" @@ -1189,6 +1197,12 @@ def info_print(self, *args): else: print(args) + def error_print(self, *args): + if isinstance(self.logger, logging.Logger): + self.logger.error(' '.join(str(a) for a in args)) + else: + print(args) + @staticmethod def find_module_from_id(module_id, modules): """Given the module id find the corresponding dictionary entry and return it""" @@ -1222,7 +1236,7 @@ def find_next_module_in_chain(module_id, modules): else: continue return found_module, found_module_id - + def sort_modules(self, modules_dict): ordered_chain = [None] * len(modules_dict) @@ -1233,11 +1247,11 @@ def sort_modules(self, modules_dict): try: ordered_chain[module_position - 1] = item - + except IndexError: self.print('unexpected module position {}, modules number: {}'.format(module_position, len(modules_dict))) return list() - + return ordered_chain @@ -1261,28 +1275,19 @@ def sort_modules_by_pos(self, modules_dict): # This method will be used when branches in the robot will be supported. def read_from_json(self, json_data): + # HACK: we keep track of how many sockets we have to add to insert a default offset + socket_counter = 0 # If a tree representing the topology was already instantiated, re-initialize and start from scratch if self.root != 0: self.print("Re-initialization") - self.__init__(config_file=self.config_file, - control_plugin=self.control_plugin, - speedup=self.speedup, + self.__init__(config_file=self.config_file, + control_plugin=self.control_plugin, + speedup=self.speedup, verbose=self.verbose, - logger=self.logger) - - # # Open the base xacro file - # filename = path_name + '/urdf/ModularBot_new.urdf.xacro' - # with codecs.open(filename, 'r') as f: - # string = f.read() - # # Instantiate an Element Tree - # self.root = ET.fromstring(string) - # self.urdf_tree = ET.ElementTree(self.root) - # self.print(ET.tostring(self.urdf_tree.getroot())) - - # Load the robot_id dictionary from yaml file - # opts = repl_option() - # robot_id_dict = yaml.safe_load(open(opts["robot_id_yaml"], 'r')) + logger=self.logger, + slave_desc_mode=self.slave_desc_mode) + robot_id_yaml = self.resource_finder.get_filename('robot_id.yaml') robot_id_dict = yaml.safe_load(open(robot_id_yaml, 'r')) @@ -1291,13 +1296,22 @@ def read_from_json(self, json_data): # Process the modules described in the json to create the tree modules_dict = yaml.safe_load(json_data) - modules_list = self.sort_modules_by_pos(modules_dict) + + if self.slave_desc_mode is SlaveDescMode.USE_POSITIONS: + # Sort the modules by position + modules_list = self.sort_modules_by_pos(modules_dict) + elif self.slave_desc_mode is SlaveDescMode.USE_IDS: + # Sort the modules by id + modules_list = self.sort_modules(modules_dict) + else: + raise ValueError('Slave description mode not recognized!') for module in modules_list: module_position = int(module['position']) module['robot_id'] = int(module['robot_id']) if module['robot_id'] != -1 else module_position*(-1) robot_id = module['robot_id'] + active_ports = int(module['active_ports']) mod_type = int(module['mod_type']) mod_id = int(module['mod_id']) @@ -1311,7 +1325,6 @@ def read_from_json(self, json_data): self.info_print("Id not recognized! Skipping add_module() for id", robot_id_dict.get(robot_id)) continue - self.info_print('Discovered module with ID:', robot_id) parent_position = None @@ -1345,98 +1358,45 @@ def read_from_json(self, json_data): if parent_position : parent = modules_list[parent_position -1] self.print('parent:', parent) - # # HACK: skip hub for discovery! - # if parent['robot_id'] == -1: - # parent = modules_list[parent['position'] -2] parent_id = int(parent['robot_id']) self.print('parent_id:', parent_id) - + parent_active_ports = int(parent['active_ports']) self.print('parent_active_ports:', parent_active_ports) parent_topology = int(parent['topology']) self.print('parent_topology:', parent_topology) - if self.verbose: - # Render tree - self.print(RenderTree(self.base_link)) - for pre, _, node in RenderTree(self.base_link): - self.print(pre, node, node.name, node.robot_id) - # treestr = u"%s%s" % (pre, node.name) - # self.print(treestr.ljust(8), node.name, node.robot_id) - - # parent_module = anytree.search.findall_by_attr(self.base_link, parent_id, name='robot_id')[0] - # self.print('parent_module:', parent_module, '\nparent name:', parent_module.name) - # self.select_module_from_name(parent_module.name) - # self.print(self.parent_module.name) - #TODO:replace with select_module_from_id + # select the correct parent module from its id and sets the correct current port self.select_module_from_id(parent_id) - # set the selected_port as occupied - mask = 1 << self.parent_module.selected_port - 1 + # set the current_port as occupied + mask = 1 << self.eth_to_physical_port_idx(self.parent_module.current_port) self.print(mask) self.print(self.parent_module.occupied_ports) self.parent_module.occupied_ports = "{0:04b}".format(int(self.parent_module.occupied_ports, 2) | mask) self.print(self.parent_module.occupied_ports) - #parent_module.occupied_ports[-selected_port] = 1 - #If the parent is a cube to support non-structural box we add a socket - if self.parent_module.type == 'cube': - if self.parent_module.is_structural == False: - self.add_socket() + #HACK: If the parent is a cube to support non-structural box we add a socket + if self.parent_module.type is ModuleType.CUBE: + if not self.parent_module.is_structural: + self.add_module('socket.yaml', {'x': float(socket_counter)}, reverse=False) + socket_counter += 1 - # # HACK: for CONCERT mobile base select directly the connector for the manipulator. Discovery of the legs is skipped for now! - # if parent_module.type == 'mobile_base': - # parent_module.selected_port = 5 - - # get which ports in the ESC slave are active - active_ports = int(module['active_ports']) - self.print('active_ports:', active_ports) + # HACK: manually set name of mobile platform to be 'mobile_base', instead of auto-generated name + module_name = None + if module_filename=='concert/mobile_platform_concert.json': + module_name = 'mobile_base' #add the module - if module_filename=='master_cube.yaml': - data = self.add_slave_cube(0, is_structural=False, robot_id=robot_id, active_ports=active_ports) - elif module_filename=='concert/mobile_platform_concert.json': - is_structural = True - if self.parent_module.type == 'mobile_base': - is_structural = False - data = self.add_mobile_platform(is_structural=is_structural, robot_id=robot_id, active_ports=active_ports) - # # leg + wheel 1 - # data = self.select_module_from_name('mobile_base_con1') - # wheel_data, steering_data = self.add_wheel_module(wheel_filename='concert/module_wheel_concert.json', - # steering_filename='concert/module_steering_concert_fl_rr.json', - # angle_offset=0.0, robot_id=(21,22)) - # # leg + wheel 2 - # data = self.select_module_from_name('mobile_base_con2') - # wheel_data, steering_data = self.add_wheel_module(wheel_filename='concert/module_wheel_concert.json', - # steering_filename='concert/module_steering_concert_fr_rl.json', - # angle_offset=0.0, robot_id=(11,12)) - # # leg + wheel 3 - # data = self.select_module_from_name('mobile_base_con3') - # wheel_data, steering_data = self.add_wheel_module(wheel_filename='concert/module_wheel_concert.json', - # steering_filename='concert/module_steering_concert_fr_rl.json', - # angle_offset=0.0, robot_id=(31,32)) - # # leg + wheel 4 - # data = self.select_module_from_name('mobile_base_con4') - # wheel_data, steering_data = self.add_wheel_module(wheel_filename='concert/module_wheel_concert.json', - # steering_filename='concert/module_steering_concert_fl_rr.json', - # angle_offset=0.0, robot_id=(41,42)) - else: - data = self.add_module(module_filename, 0, robot_id=robot_id, active_ports=active_ports) + data = self.add_module(module_filename, {}, reverse=False, robot_id=robot_id, active_ports=active_ports, module_name=module_name) - if self.verbose: - for pre, _, node in RenderTree(self.base_link): - self.print(pre, node, node.name, node.robot_id) - ## HACK: Manually add passive end effector for now! # self.add_simple_ee(0.0, 0.0, 0.135, mass=0.23) - # data = self.add_module('concert/passive_end_effector_panel.json', 0, False) - # data = self.add_module('experimental/passive_end_effector_pen.json', 0, False) + # data = self.add_module('concert/passive_end_effector_panel.json', {}, False) + # data = self.add_module('experimental/passive_end_effector_pen.json', {}, False) - # doc = xacro.parse(string) - # xacro.process_doc(doc, in_order=True) - # string = doc.toprettyxml(indent=' ') self.urdf_string = self.process_urdf() self.info_print("Discovery completed") @@ -1450,33 +1410,6 @@ def render_tree(self): return 0 - - def process_connections(self, connections_list, modules_list, name, m_type): - """Process connections of the module as described in the JSON as a list""" - self.print('enter!') - for child_id in connections_list[1:]: - self.print('child: ', child_id) - self.select_module_from_name(name) - self.print(self.parent_module.name) - if child_id != -1: - # Find child module to process searching by id - child = self.find_module_from_id(child_id, modules_list) - # If the processed module is a mastercube we need first to select the connector to which attach to - if m_type == 'mastercube': - _connector_index = connections_list.index(child_id) + 1 - con_name = name + '_con' + str(_connector_index) - self.select_module_from_name(con_name) - # Add the module - if child['type'] == 'master_cube': - data = self.add_slave_cube(0) - else: - data = self.add_module(child['type'] + '.yaml', 0) - # Update variables and process its connections - module_name = data['lastModule_name'] - module_type = data['lastModule_type'] - self.process_connections(child['connections'], modules_list, module_name, module_type) - - def read_file(self, file_str): """Open the URDF chosen from the front-end and import it as a ElemenTree tree""" # global root, urdf_tree @@ -1498,10 +1431,10 @@ def read_file(self, file_str): def process_urdf(self, xacro_mappings={}): """Process the urdf to convert from xacro and perform macro substitutions. Returns urdf string""" - + # write the urdf tree to a string xmlstr = xml.dom.minidom.parseString(ET.tostring(self.urdf_tree.getroot())).toprettyxml(indent=" ") - self.print(xmlstr) + # self.print(xmlstr) # parse the string to convert from xacro doc = xacro.parse(xmlstr) @@ -1528,16 +1461,17 @@ def add_to_chain(self, new_joint): # get tag_index, an integer representing on which branch of the robot the joint has been added tag_index = self.inverse_branch_switcher.get(new_joint.tag) + parent_tag_index = self.inverse_branch_switcher.get(new_joint.parent.tag) chain = [new_joint] self.print("tag_index: ", tag_index, "list of chains: ", len(self.listofchains)) - # if tag_index is bigger than the length of the list of chains, it means this chain hasn't been added yet. + # if tag_index (offseted by one, since now we start from 0) is bigger than the length of the list of chains, it means this chain hasn't been added yet. # then we need to append a new list representing the new chain formed by the new joint only - if tag_index > len(self.listofchains): + if tag_index > parent_tag_index: self.listofchains.append(chain) # if instead tag_index is not bigger it means the chain the new joint is part of has already beeen added. # then the new joint is appended to the list representing the chain it's part of. else: - self.listofchains[tag_index - 1].append(new_joint) + self.listofchains[tag_index].append(new_joint) def remove_from_chain(self, joint): """Remove joint from the list of the robot kinematic chains @@ -1552,446 +1486,20 @@ def remove_from_chain(self, joint): chain.remove(joint) self.listofchains = list(filter(None, self.listofchains)) - - # noinspection PyPep8Naming - def add_slave_cube(self, angle_offset, is_structural=True, robot_id=0, active_ports=1, connection_port=2): - """Method adding slave/master cube to the tree. - - Parameters - ---------- - angle_offset: float - Value of the angle between the parent module output frame and the cube input frame - - is_structural: float - Bool variable indicating if the box is a structural part of the robot or it's just used as computation unit away from the robot. - In the second case the different chains are placed in default locations in a xy plane - (the user will then be queried to specify their actual location once the robot model is recontructed) - - robot_id: int - Value of the robot_id set in the firmware of the module. - This is obtained in Discovery Mode when reading the JSON from the EtherCAT master. This is not used when in Bulding Mode. - - active_ports: int - The number of active ports of the cube (how many ports have established a connection to a module). - The value is the conversion to int of the 4-bit binary string where each bit represent one port (1 if port is active, 0 if port is unactive) - - Returns - ------- - data: dict - Dictionary with as entries all the relevant info on the newly added module. - In particular the updated and newly processed urdf string. - - """ - # global T_con, L_0a, n_cubes, parent_module - - # TODO: This part below the "if" is deprecated. It still uses "connectors" separate module. - # It was made to handle creating robots with multiple "boxes", which will be probably never done. - # If important should be reviewed and modify it as the part below the "else". - - if self.parent_module != self.base_link : - # add slave cube - self.print('add_slave_cube') - # Generate name according to the # of cubes already in the tree - name = 'L_0' + self.cube_switcher.get(self.n_cubes) - self.n_cubes += 1 - - slavecube = None - for resource_path in self.resources_paths: - filename = self.resource_finder.get_filename('yaml/master_cube.yaml', resource_path) - template_name = self.resource_finder.get_filename('yaml/template.yaml', ['resources_path']) - - # call the method that reads the yaml file describing the cube and instantiate a new module object - try: - slavecube = ModuleNode.module_from_yaml(filename, self.parent_module, template_name) - break - except FileNotFoundError: - continue - if slavecube is None: - raise FileNotFoundError(filename+' was not found in the available resources') - - setattr(slavecube, 'name', name) - - # Set attributes of the newly added module object - setattr(slavecube, 'i', self.parent_module.i) - setattr(slavecube, 'p', self.parent_module.p) - # flange_size is already set from the YAML file - # setattr(slavecube, 'flange_size', self.parent_module.flange_size) - - setattr(slavecube, 'angle_offset', angle_offset) - setattr(slavecube, 'robot_id', robot_id) - - # add the master cube to the xml tree - ET.SubElement(self.root, "xacro:add_slave_cube", type='cube', name=name, filename=filename) - self.add_connectors(slavecube) - - self.add_gazebo_element(slavecube.gazebo.body_1, slavecube.name) - - # # Get inverse of the transform of the connector - # T_con_inv = tf.transformations.inverse_matrix(self.T_con) - - # # Generate name and dict for the 1st connector module - # name_con1 = name + '_con1' - # data1 = {'Homogeneous_tf': T_con_inv, 'type': "con", 'name': name_con1, 'i': 0, 'p': 0, 'flange_size': 3} - # self.print('T_con_inv:', T_con_inv) - - # Generate name and dict for the 1st connector module - name_con1 = name + '_con1' - data1 = {'Homogeneous_tf': T_con_inv, 'type': "con", 'name': name_con1, 'i': 0, 'p': 0, 'flange_size': 3} - self.print('T_con_inv:', T_con_inv) - - if self.parent_module.type in { 'joint', 'wheel' }: - parent_distal_tf = self.parent_module.Distal_tf - elif self.parent_module.type == 'cube' or self.parent_module.type == 'mobile_base': - if self.parent_module.selected_port == 1: - parent_distal_tf = self.parent_module.Con_1_tf - elif self.parent_module.selected_port == 2: - parent_distal_tf = self.parent_module.Con_2_tf - elif self.parent_module.selected_port == 3: - parent_distal_tf = self.parent_module.Con_3_tf - elif self.parent_module.selected_port == 4: - parent_distal_tf = self.parent_module.Con_4_tf - elif self.parent_module.selected_port == 5: - parent_distal_tf = self.parent_module.Con_5_tf - else: - parent_distal_tf = self.parent_module.Homogeneous_tf - - if connection_port == 1: - cube_proximal_tf = slavecube.Con_1_tf - elif connection_port == 2: - cube_proximal_tf = slavecube.Con_2_tf - elif connection_port == 3: - cube_proximal_tf = slavecube.Con_3_tf - elif connection_port == 4: - cube_proximal_tf = slavecube.Con_4_tf - elif connection_port == 5: - cube_proximal_tf = slavecube.Con_5_tf - - # Get transform representing the output frame of the parent module after a rotation of angle_offset - parent_transform = ModuleNode.get_rototranslation(parent_distal_tf, - tf.transformations.rotation_matrix(angle_offset, - self.zaxis)) - cube_transform = ModuleNode.get_rototranslation(parent_transform, cube_proximal_tf) - - x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(cube_transform) - - # Generate the name of the fixed joint used to connect the cube - if self.parent_module.type == "cube" or self.parent_module.type == "mobile_base": - fixed_joint_name = 'FJ_' + self.parent_module.parent.name + '_' + name - else: - fixed_joint_name = 'FJ_' + self.parent_module.name + '_' + name - - # Select the name of the parent to use to generate the urdf. If the parent is a joint use the name of the - # dummy link attached to it - if self.parent_module.type == "joint": - parent_name = self.parent_module.distal_link_name - else: - parent_name = self.parent_module.name - - # Add the fixed joint to the xml tree - ET.SubElement( - self.root, - "xacro:add_fixed_joint", - type="fixed_joint", - name=fixed_joint_name, - father=parent_name, - child=name, - x=x, - y=y, - z=z, - roll=roll, - pitch=pitch, - yaw=yaw - ) - - if self.verbose: - # Render tree - for pre, _, node in anytree.render.RenderTree(self.base_link): - self.print("%s%s" % (pre, node.name)) - - if self.speedup: - self.urdf_string = "" - else: - # Process the urdf string by calling the process_urdf method. - # Parse, convert from xacro and write to string. - self.urdf_string = self.process_urdf() - - # Update the EtherCAT port connected to the electro-mechanical interface where the new module/slave will be added - # 1 2 3 4 - # o o o o - # | | | | - # com-exp upper port front port nothing - setattr(mastercube, 'selected_port', 3) - self.print('mastercube.selected_port :', mastercube.selected_port) - - # save the active ports as a binary string - setattr(mastercube, 'active_ports', "{0:04b}".format(active_ports)) - self.print('active_ports: ', mastercube.active_ports) - - # save the occupied ports as a binary string - setattr(mastercube, 'occupied_ports', "{0:04b}".format(active_ports)) - self.print('occupied_ports: ', mastercube.occupied_ports) - - - # Update the parent_module attribute of the URDF_writer class - self.parent_module = slavecube - - self.listofhubs.append(slavecube) - - # Create a dictionary containing the urdf string just processed and other parameters needed by the web app - data = {'result': self.urdf_string, - 'lastModule_type': 'mastercube', - 'lastModule_name': name, - 'flange_size': 3, - 'count': self.n_cubes} - - return data - - else: - # add master cube - self.print('add_master_cube') - # Generate name according to the # of cubes already in the tree - name = 'L_0' + self.cube_switcher.get(self.n_cubes) - self.n_cubes += 1 - - # self.T_con = tf.transformations.translation_matrix((0, 0, 0.1)) - # self.T_con = self.mastercube.geometry.connector_length)) - - mastercube = None - for resource_path in self.resources_paths: - filename = self.resource_finder.get_filename('yaml/master_cube.yaml', resource_path) - template_name = self.resource_finder.get_filename('yaml/template.yaml', ['resources_path']) - - # call the method that reads the yaml file describing the cube and instantiate a new module object - try: - mastercube = ModuleNode.module_from_yaml(filename, self.parent_module, template_name) - break - except FileNotFoundError: - continue - if mastercube is None: - raise FileNotFoundError(filename+' was not found in the available resources') - - # set attributes of the newly added module object - setattr(mastercube, 'name', name) - setattr(mastercube, 'i', 0) - setattr(mastercube, 'p', 0) - - setattr(mastercube, 'robot_id', robot_id) - - setattr(mastercube, 'is_structural', is_structural) - if is_structural: - # add the master cube to the xml tree - ET.SubElement(self.root, "xacro:add_master_cube", type='cube', name=name, filename=filename) - self.add_connectors(mastercube) - else: - # add the master cube to the xml tree - #ET.SubElement(self.root, "xacro:add_master_cube", type='cube', name=name, filename=filename) - #ET.SubElement(self.root, "xacro:add_connectors", type='connectors', name=name, filename=filename) - pass - - self.add_gazebo_element(mastercube.gazebo.body_1, mastercube.name) - - # # instantate a ModuleNode for branch 1 connector - # name_con1 = name + '_con1' - # data1 = {'Homogeneous_tf': mastercube.Con_1_tf, 'type': "con", 'name': name_con1, 'i': 0, 'p': 0, 'flange_size': 3} - # slavecube_con1 = ModuleNode.ModuleNode(data1, name_con1, parent=mastercube) - - # # instantate a ModuleNode for branch 2 connector - # name_con2 = name + '_con2' - # data2 = {'Homogeneous_tf': mastercube.Con_2_tf, 'type': "con", 'name': name_con2, 'i': 0, 'p': 0, 'flange_size': 3} - # slavecube_con2 = ModuleNode.ModuleNode(data2, name_con2, parent=mastercube) - - # # instantate a ModuleNode for branch 3 connector - # name_con3 = name + '_con3' - # data3 = {'Homogeneous_tf': mastercube.Con_3_tf, 'type': "con", 'name': name_con3, 'i': 0, 'p': 0, 'flange_size': 3} - # slavecube_con3 = ModuleNode.ModuleNode(data3, name_con3, parent=mastercube) - - # # instantate a ModuleNode for branch 4 connector - # name_con4 = name + '_con4' - # data4 = {'Homogeneous_tf': mastercube.Con_4_tf, 'type': "con", 'name': name_con4, 'i': 0, 'p': 0, 'flange_size': 3} - # slavecube_con4 = ModuleNode.ModuleNode(data4, name_con4, parent=mastercube) - - # Render tree - #for pre, _, node in anytree.render.RenderTree(self.base_link): - #self.print("%s%s" % (pre, node.name)) - - # new_Link = slavecube_con1 - # past_Link = parent_module - # new_Link.get_rototranslation(past_Link.Homogeneous_tf, tf.transformations.identity_matrix()) - # self.print(new_Link.z) - - # ET.SubElement(root, "xacro:add_master_cube", name=name) - - # fixed_joint_name = 'cube_joint' - # ET.SubElement(root, - # "xacro:add_fixed_joint", - # name=fixed_joint_name, - # type="fixed_joint", - # father=past_Link.name, - # child=new_Link.name, - # x=new_Link.x, - # y=new_Link.y, - # z=new_Link.z, - # roll=new_Link.roll, - # pitch=new_Link.pitch, - # yaw=new_Link.yaw) - - # update the urdf file, adding the new module - # string = write_urdf(path_name + '/urdf/ModularBot_test.urdf', urdf_tree) - - if self.speedup: - self.urdf_string = "" - else: - # Process the urdf string by calling the process_urdf method. Parse, convert from xacro and write to string. - self.urdf_string = self.process_urdf() - - # Update the EtherCAT port connected to the electro-mechanical interface where the new module/slave will be added - # 1 2 3 4 - # o o o o - # | | | | - # com-exp upper port front port nothing - setattr(mastercube, 'selected_port', 2) - self.print('mastercube.selected_port :', mastercube.selected_port) - - # save the active ports as a binary string - setattr(mastercube, 'active_ports', "{0:04b}".format(active_ports)) - self.print('active_ports: ', mastercube.active_ports) - - # save the occupied ports as a binary string - setattr(mastercube, 'occupied_ports', "0001") - self.print('occupied_ports: ', mastercube.occupied_ports) - - # # If parent topology is greater than 2 the parent is a switch/hub so we need to find the right port where the module is connected - # if active_ports >= 3: - # for port_idx in range(2, len(mastercube.active_ports) - 1) - # if mastercube.active_ports[-port_idx] == 1: - # mastercube.selected_port = port_idx - # break - - # if parent_active_ports == 3: - # self.parent_module.selected_port = 3 - # elif parent_active_ports == 5: - # self.parent_module.selected_port = 4 - # self.print('self.parent_module.selected_port: ', self.parent_module.selected_port) - - # Update the parent_module attribute of the URDF_writer class. A default connection is chosen. - #self.parent_module = slavecube_con3 - self.parent_module = mastercube - - self.listofhubs.append(mastercube) - - # Create a dictionary containing the urdf string just processed and other parameters needed by the web app - data = {'result': self.urdf_string, - 'lastModule_type': 'mastercube', - 'lastModule_name': name, - 'flange_size': 3, - 'count': self.n_cubes} - - return data - - - # noinspection PyPep8Naming - def add_mobile_platform(self, angle_offset=0.0, is_structural=True, robot_id=0, active_ports=1, connection_port=2): - """Method adding slave/master cube to the tree. - - Parameters - ---------- - angle_offset: float - Value of the angle between the parent module output frame and the cube input frame - - robot_id: int - Value of the robot_id set in the firmware of the module. - This is obtained in Discovery Mode when reading the JSON from the EtherCAT master. This is not used when in Bulding Mode. - - active_ports: int - The number of active ports of the cube (how many ports have established a connection to a module). - The value is the conversion to int of the 4-bit binary string where each bit represent one port (1 if port is active, 0 if port is unactive) - - Returns - ------- - data: dict - Dictionary with as entries all the relevant info on the newly added module. - In particular the updated and newly processed urdf string. - - """ - self.set_floating_base(True) # TODO: better way to do this? - - # if self.parent_module != self.base_link : - # self.print('mobile base can be have only base_link as parent!') - # self.parent_module = self.base_link - - self.print('add_mobile_platform') - # Generate name according to the # of cubes already in the tree - name = 'mobile_base' # _' + str(len(self.listofhubs)) - - mobilebase = None - for resource_path in self.resources_paths: - filename = self.resource_finder.get_filename('json/concert/mobile_platform_concert.json', resource_path) - template_name = self.resource_finder.get_filename('yaml/template.yaml', ['resources_path']) - - # call the method that reads the yaml file describing the cube and instantiate a new module object - try: - mobilebase = ModuleNode.module_from_json(filename, self.parent_module, template_name) - break - except FileNotFoundError: + def get_actuated_modules_chains(self): + active_modules_chains = [] + for modules_chain in self.listofchains: + # check number of joints and active modules in the chain. + joint_num = 0 + for joint_module in modules_chain: + if joint_module.type in ModuleClass.actuated_modules(): + joint_num += 1 + # If 0, skip it. The chain doesn't need to be added to the srdf in this case. + if joint_num == 0: continue - if mobilebase is None: - raise FileNotFoundError(filename+' was not found in the available resources') - - # set attributes of the newly added module object - setattr(mobilebase, 'name', name) - setattr(mobilebase, 'i', 0) - setattr(mobilebase, 'p', 0) - - setattr(mobilebase, 'robot_id', robot_id) - - setattr(mobilebase, 'n_child_hubs', 0) - setattr(mobilebase, 'is_structural', is_structural) - if is_structural: - # add the master cube to the xml tree - ET.SubElement(self.root, "xacro:add_mobile_base", type='mobile_base', name=mobilebase.name, filename=mobilebase.filename) - self.add_connectors(mobilebase) - else: - # the added module is a hub (not structural) extension to the mobile base - if self.parent_module.type == 'mobile_base': - # if the parent is a mobile base, the n_child_hubs attribute is incremented, in order to keep track of the number of hubs connected to the mobile base and therefore the number of ports occupied. This is needed to select the right connector where to connect the new module - self.parent_module.n_child_hubs += 1 - - self.add_gazebo_element(mobilebase.gazebo.body_1, mobilebase.name) - - if self.speedup: - self.urdf_string = "" - else: - # Process the urdf string by calling the process_urdf method. Parse, convert from xacro and write to string. - self.urdf_string = self.process_urdf() - - # Update the EtherCAT port connected to the electro-mechanical interface where the new module/slave will be added - # 1 2 3 4 - # o o o o - # | | | | - # com-exp upper port front port nothing - setattr(mobilebase, 'selected_port', 2) - self.print('mobilebase.selected_port :', mobilebase.selected_port) - - # save the active ports as a binary string - setattr(mobilebase, 'active_ports', "{0:04b}".format(active_ports)) - self.print('active_ports: ', mobilebase.active_ports) - - # save the occupied ports as a binary string - setattr(mobilebase, 'occupied_ports', "0001") - self.print('occupied_ports: ', mobilebase.occupied_ports) - - self.parent_module = mobilebase - - self.listofhubs.append(mobilebase) - - # Create a dictionary containing the urdf string just processed and other parameters needed by the web app - data = {'result': self.urdf_string, - 'lastModule_type': 'mobile_base', - 'lastModule_name': name, - 'flange_size': 3, - 'count': 1} - - return data + else: + active_modules_chains.append(modules_chain) + return active_modules_chains def get_ET(self): return self.urdf_tree @@ -2001,44 +1509,47 @@ def get_parent_module(self): @staticmethod def find_chain_tip_link(chain): - if chain[-1].children: - if "con_" in chain[-1].children[0].name: - tip_link = chain[-1].children[0].children[0].name - else: - tip_link = chain[-1].children[0].name - else: - if chain[-1].type in { 'joint', 'wheel' }: - tip_link = chain[-1].distal_link_name - if chain[-1].type == 'tool_exchanger': - tip_link = chain[-1].pen_name - if chain[-1].type == 'gripper': - tip_link = chain[-1].TCP_name - elif chain[-1].type in { 'simple_ee', 'link', 'size_adapter'}: - tip_link = chain[-1].name - elif chain[-1].type in { 'end_effector', 'drill'}: - tip_link = chain[-1].tcp_name - elif chain[-1].type == 'dagana': - tip_link = chain[-1].dagana_link_name + if chain[-1].type in ModuleClass.joint_modules(): + tip_link = chain[-1].distal_link_name + elif chain[-1].type in ModuleClass.link_modules() | ModuleClass.hub_modules(): + tip_link = chain[-1].name + elif chain[-1].type in ModuleClass.end_effector_modules() - {ModuleType.DAGANA}: + tip_link = chain[-1].tcp_name + elif chain[-1].type is ModuleType.DAGANA: + tip_link = chain[-1].dagana_link_name return tip_link @staticmethod def find_chain_base_link(chain): + if not chain[0].parent: + base_link = chain[0].name if "con_" in chain[0].parent.name: base_link = chain[0].parent.parent.name else: - base_link = chain[0].parent.name + if not chain[0].parent.is_structural and chain[0].parent.type in ModuleClass.hub_modules(): + base_link = chain[0].parent.parent.name + else: + base_link = chain[0].parent.name return base_link - - def update_generator(self): + @staticmethod + def find_chain_tag(chain): + return chain[-1].tag + + def update_generators(self): # Generator expression for list of urdf elements without the gazebo tag. # This is needed because of the change in the xacro file, as gazebo simulation tags # are now added from the start and this creates problems with the search nodes = set(self.root.findall("*")) gazebo_nodes = set(self.root.findall("./gazebo")) xacro_include_nodes = set(self.root.findall('./xacro:include', ns)) - filtered_nodes = nodes.difference(gazebo_nodes).difference(xacro_include_nodes) - self.gen = (node for node in filtered_nodes) + xacro_if_nodes = set(self.root.findall('./xacro:if', ns)) + # xacro_macro_nodes = set(self.root.findall('./xacro:macro', ns)) + xacro_property_nodes = set(self.root.findall('./xacro:property', ns)) + xacro_arg_nodes = set(self.root.findall('./xacro:arg', ns)) + filtered_nodes = nodes.difference(gazebo_nodes).difference(xacro_include_nodes).difference(xacro_if_nodes).difference(xacro_property_nodes).difference(xacro_arg_nodes) + self.urdf_nodes_generator = (node for node in filtered_nodes) + self.gazebo_nodes_generator = (node for node in gazebo_nodes) # Adds a table for simulation purposes def add_table(self): @@ -2063,163 +1574,59 @@ def add_table(self): self.parent_module = table + # Select the current connector of the new module + selected_connector = self.select_connector(table) + # Select the meshes to highlight in the GUI + selected_meshes = self.select_meshes(selected_connector, table) + if self.speedup: self.urdf_string = "" else: # Process the urdf string by calling the process_urdf method. Parse, convert from xacro and write to string self.urdf_string = self.process_urdf() - # Create a dictionary containing the urdf string just processed and other parameters needed by the web app - data = {'result': self.urdf_string, - 'lastModule_type': table.type, - 'lastModule_name': table.name, + # Create the dictionary with the relevant info on the selected module, so that the GUI can dispaly it. + data = {'name': table.name, + 'type': table.type, 'flange_size': table.flange_size, - 'count': table.i} + 'selected_connector': selected_connector, + 'selected_meshes': selected_meshes, + 'urdf_string': self.urdf_string} return data + + def add_drillbit(self, length=0.27, radius=0.012, mass=0.1): + drillbit_name = 'drillbit'+ self.parent_module.tag + ET.SubElement(self.root, + "xacro:add_cylinder", + type="drillbit", + name=drillbit_name, + size_z=str(length), + mass=str(mass), + radius=str(radius)) + self.parent_module.mesh_names.append(drillbit_name) - def move_socket(self, socket_name, x_offset=0.0, y_offset=0.0, z_offset=0.0, angle_offset=0.0): - socket = self.access_module_by_name(socket_name) - fixed_joint_name = 'L_' + str(socket.i) + socket.tag + '_fixed_joint_' + str(socket.p) - - # Update generator expression - self.update_generator() - - # From the list of xml elements find the ones with name corresponding to the relative joint, stator link - # and fixed joint before the stator link and remove them from the xml tree - for node in self.gen: - try: - if node.attrib['name'] == fixed_joint_name: - node.set('x', str(x_offset)) - node.set('y', str(y_offset)) - node.set('z', str(z_offset)) - node.set('yaw', str(angle_offset)) - except KeyError: - pass - - if self.speedup: - self.urdf_string = "" - else: - # Process the urdf string by calling the process_urdf method. Parse, convert from xacro and write to string - self.urdf_string = self.process_urdf() + trasl = tf.transformations.translation_matrix((0.0, 0.0, length)) + rot = tf.transformations.euler_matrix(0.0, 0.0, 0.0, 'sxyz') + transform = ModuleNode.get_rototranslation(trasl, rot) + x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(transform) - if self.verbose: - # Render tree - for pre, _, node in anytree.render.RenderTree(self.base_link): - self.print("%s%s" % (pre, node.name)) - - # Create a dictionary containing the urdf string just processed and other parameters needed by the web app - data = {'result': self.urdf_string, - 'lastModule_type': socket.type, - 'lastModule_name': socket.name, - 'flange_size': socket.flange_size, - 'count': socket.i} - - # Update the parent_module attribute of the URDF_writer class - self.parent_module = socket - - return data - - def add_socket(self, x_offset=0.0, y_offset=0.0, z_offset=0.0, angle_offset=0.0): - filename = 'socket.yaml' - # Set base_link as parent - self.parent_module = self.base_link - - new_socket = None - # Generate the path to the required YAML file - for resource_path in self.resources_paths: - module_name = self.resource_finder.get_filename('yaml/'+filename, resource_path) - template_name = self.resource_finder.get_filename('yaml/template.yaml', ['resources_path']) - - # create a ModuleNode instance for the socket - try: - new_socket = ModuleNode.module_from_yaml(module_name, self.parent_module, template_name, reverse=0) - break - except FileNotFoundError: - continue - if new_socket is None: - raise FileNotFoundError(filename+' was not found in the available resources') - - # assign a new tag to the chain - tag_letter = self.branch_switcher.get(self.tag_num) - setattr(new_socket, 'tag', tag_letter) - self.tag_num += 1 - - # Set attributes of the newly added module object - setattr(new_socket, 'i', self.parent_module.i) - setattr(new_socket, 'p', self.parent_module.p) - # flange_size is already set from the YAML file - # setattr(new_socket, 'flange_size', self.parent_module.flange_size) - - setattr(new_socket, 'angle_offset', angle_offset) - setattr(new_socket, 'robot_id', 0) - - # Update the EtherCAT port connected to the electro-mechanical interface where the new module/slave will be added - setattr(new_socket, 'selected_port', 2) - #self.print('selected_port :', new_socket.selected_port) - - # save the active ports as a binary string - setattr(new_socket, 'active_ports', "{0:04b}".format(3)) # TODO:change this - #self.print('active_ports: ', new_socket.active_ports) - - # save the occupied ports as a binary string - setattr(new_socket, 'occupied_ports', "0001") - #self.print('occupied_ports: ', new_socket.occupied_ports) - - setattr(new_socket, 'name', 'L_' + str(new_socket.i) + new_socket.tag) - ET.SubElement(self.root, - "xacro:add_socket", - type="link", - name=new_socket.name, - filename=new_socket.filename, - flange_size=str(new_socket.flange_size)) - - self.add_gazebo_element(new_socket.gazebo.body_1 , new_socket.name) - - if self.parent_module.type == 'cube' or self.parent_module.type == "mobile_base": - if self.parent_module.is_structural: - parent_name = self.parent_module.name - if self.parent_module.selected_port == 1: - interface_transform = self.parent_module.Con_1_tf - elif self.parent_module.selected_port == 2: - interface_transform = self.parent_module.Con_2_tf - elif self.parent_module.selected_port == 3: - interface_transform = self.parent_module.Con_3_tf - elif self.parent_module.selected_port == 4: - interface_transform = self.parent_module.Con_4_tf - elif self.parent_module.selected_port == 5: - interface_transform = self.parent_module.Con_5_tf - else: - parent_name = self.parent_module.parent.name - interface_transform = tf.transformations.identity_matrix() - else: - parent_name = self.parent_module.name - interface_transform = self.parent_module.Homogeneous_tf - - transform = ModuleNode.get_rototranslation(interface_transform, - tf.transformations.rotation_matrix(angle_offset, - self.zaxis)) - x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(transform) - x = str(x_offset) - y = str(y_offset) - z = str(z_offset) - - fixed_joint_name = 'L_' + str(new_socket.i) + new_socket.tag + '_fixed_joint_' + str(new_socket.p) + father_name = self.parent_module.tcp_name ET.SubElement(self.root, "xacro:add_fixed_joint", - name=fixed_joint_name, type="fixed_joint", - father=parent_name, - child=new_socket.name, + name="fixed_" + drillbit_name, + father=father_name, + child=drillbit_name, x=x, y=y, z=z, roll=roll, pitch=pitch, yaw=yaw) - - self.collision_elements.append((self.parent_module.name, new_socket.name)) + + self.collision_elements.append((father_name, drillbit_name)) if self.speedup: self.urdf_string = "" @@ -2227,44 +1634,24 @@ def add_socket(self, x_offset=0.0, y_offset=0.0, z_offset=0.0, angle_offset=0.0) # Process the urdf string by calling the process_urdf method. Parse, convert from xacro and write to string self.urdf_string = self.process_urdf() - # update the urdf file, adding the new module - # string = write_urdf(path_name + '/urdf/ModularBot_test.urdf', urdf_tree) - - if self.verbose: - # Render tree - for pre, _, node in anytree.render.RenderTree(self.base_link): - self.print("%s%s" % (pre, node.name)) - - # Create a dictionary containing the urdf string just processed and other parameters needed by the web app - data = {'result': self.urdf_string, - 'lastModule_type': new_socket.type, - 'lastModule_name': new_socket.name, - 'flange_size': new_socket.flange_size, - 'count': new_socket.i} - - # if new_module.name.endswith('_stator'): - # new_module.name = selected_module[:-7] - # last_module = anytree.search.findall_by_attr(L_0a, selected_module)[0] + return [drillbit_name, "fixed_" + drillbit_name] - # Update the parent_module attribute of the URDF_writer class - self.parent_module = new_socket - - # self.print(self.parent_module) - - return data - - def add_drillbit(self, length=0.27, radius=0.012, mass=0.1): - drillbit_name = 'drillbit'+ self.parent_module.tag + def add_handle(self, x_offset=0.0, y_offset=0.25, z_offset=-0.18, mass=0.330, radius=0.025): + handle_name = 'handle'+ self.parent_module.tag ET.SubElement(self.root, "xacro:add_cylinder", type="drillbit", - name=drillbit_name, - size_z=str(length), + name=handle_name, + size_z=str(abs(y_offset)), mass=str(mass), radius=str(radius)) + self.parent_module.mesh_names.append(handle_name) - trasl = tf.transformations.translation_matrix((0.0, 0.0, length)) - rot = tf.transformations.euler_matrix(0.0, 0.0, 0.0, 'sxyz') + trasl = tf.transformations.translation_matrix((x_offset, y_offset, z_offset)) + if y_offset >= 0.0: + rot = tf.transformations.euler_matrix(-1.57, 0.0, 0.0, 'sxyz') + else: + rot = tf.transformations.euler_matrix(1.57, 0.0, 0.0, 'sxyz') transform = ModuleNode.get_rototranslation(trasl, rot) x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(transform) @@ -2273,9 +1660,9 @@ def add_drillbit(self, length=0.27, radius=0.012, mass=0.1): ET.SubElement(self.root, "xacro:add_fixed_joint", type="fixed_joint", - name="fixed_" + drillbit_name, + name="fixed_" + handle_name, father=father_name, - child=drillbit_name, + child=handle_name, x=x, y=y, z=z, @@ -2283,7 +1670,31 @@ def add_drillbit(self, length=0.27, radius=0.012, mass=0.1): pitch=pitch, yaw=yaw) - self.collision_elements.append((father_name, drillbit_name)) + self.collision_elements.append((father_name, handle_name)) + + # Add also a frame on the handle gripping point + trasl = tf.transformations.translation_matrix((0.0, y_offset/2, z_offset)) + rot = tf.transformations.euler_matrix(0.0, 0.0, 0.0, 'sxyz') + transform = ModuleNode.get_rototranslation(trasl, rot) + x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(transform) + + handle_gripping_point_name = 'handle_gripping_point'+ self.parent_module.tag + ET.SubElement(self.root, + "xacro:add_fixed_joint", + type="fixed_joint", + name="fixed_" + handle_gripping_point_name, + father=father_name, + child=handle_gripping_point_name, + x=x, + y=y, + z=z, + roll=roll, + pitch=pitch, + yaw=yaw) + + ET.SubElement(self.root, + "link", + name=handle_gripping_point_name) if self.speedup: self.urdf_string = "" @@ -2291,14 +1702,7 @@ def add_drillbit(self, length=0.27, radius=0.012, mass=0.1): # Process the urdf string by calling the process_urdf method. Parse, convert from xacro and write to string self.urdf_string = self.process_urdf() - # Create a dictionary containing the urdf string just processed and other parameters needed by the web app - data = {'result': self.urdf_string, - 'lastModule_type': self.parent_module.type, - 'lastModule_name': self.parent_module.name, - 'flange_size': self.parent_module.flange_size, - 'count': self.parent_module.i} - - return data + return [handle_name, "fixed_" + handle_name, handle_gripping_point_name, "fixed_" + handle_gripping_point_name] # Add a cylinder as a fake end-effector def add_simple_ee(self, x_offset=0.0, y_offset=0.0, z_offset=0.0, angle_offset=0.0, mass=1.0, radius=0.02): @@ -2322,7 +1726,7 @@ def add_simple_ee(self, x_offset=0.0, y_offset=0.0, z_offset=0.0, angle_offset=0 radius=str(radius)) try: - self.add_gazebo_element(simple_ee.gazebo.body_1, simple_ee.name) + self.add_gazebo_element(simple_ee, simple_ee.gazebo.body_1, simple_ee.name) except AttributeError: pass @@ -2331,15 +1735,15 @@ def add_simple_ee(self, x_offset=0.0, y_offset=0.0, z_offset=0.0, angle_offset=0 rototrasl = ModuleNode.get_rototranslation(trasl, rot) setattr(simple_ee, 'Homogeneous_tf', rototrasl) - if self.parent_module.type=='joint': + if self.parent_module.type is ModuleType.JOINT: transform = ModuleNode.get_rototranslation(self.parent_module.Distal_tf, rototrasl) else: transform = ModuleNode.get_rototranslation(self.parent_module.Homogeneous_tf, rototrasl) x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(transform) fixed_joint_name = 'L_' + str(simple_ee.i) + '_fixed_joint_' + str(simple_ee.p) + simple_ee.tag - - if self.parent_module.type == 'joint': + + if self.parent_module.type is ModuleType.JOINT: father_name = 'L_' + str(self.parent_module.i) + self.parent_module.tag else: father_name = self.parent_module.name @@ -2359,8 +1763,14 @@ def add_simple_ee(self, x_offset=0.0, y_offset=0.0, z_offset=0.0, angle_offset=0 self.collision_elements.append((father_name, simple_ee.name)) - self.parent_module = simple_ee self.add_to_chain(simple_ee) + + self.parent_module = simple_ee + + # Select the current connector of the new module + selected_connector = self.select_connector(simple_ee) + # Select the meshes to highlight in the GUI + selected_meshes = self.select_meshes(selected_connector, simple_ee) if self.speedup: self.urdf_string = "" @@ -2368,35 +1778,62 @@ def add_simple_ee(self, x_offset=0.0, y_offset=0.0, z_offset=0.0, angle_offset=0 # Process the urdf string by calling the process_urdf method. Parse, convert from xacro and write to string self.urdf_string = self.process_urdf() - # Create a dictionary containing the urdf string just processed and other parameters needed by the web app - data = {'result': self.urdf_string, - 'lastModule_type': simple_ee.type, - 'lastModule_name': simple_ee.name, + # Create the dictionary with the relevant info on the selected module, so that the GUI can dispaly it. + data = {'name': simple_ee.name, + 'type': simple_ee.type, 'flange_size': simple_ee.flange_size, - 'count': simple_ee.i} + 'selected_connector': selected_connector, + 'selected_meshes': selected_meshes, + 'urdf_string': self.urdf_string} return data - def add_wheel_module(self, wheel_filename, steering_filename, angle_offset, reverse=False, robot_id=(0,0)): - steering_data = self.add_module(steering_filename, angle_offset, reverse, robot_id[0]) - wheel_data = self.add_module(wheel_filename, angle_offset, reverse, robot_id[1]) + def add_wheel_module(self, wheel_filename, steering_filename, offsets={}, reverse=False, robot_id=(0,0)): + steering_data = self.add_module(steering_filename, offsets, reverse, robot_id=robot_id[0]) + wheel_data = self.add_module(wheel_filename, offsets, reverse, robot_id=robot_id[1]) return wheel_data, steering_data - def add_module(self, filename, angle_offset, reverse=False, robot_id=0, active_ports=3): + def add_addon(self, addon_filename): + new_addon = None + try: + addons_dict = self.modular_resources_manager.get_available_addons_dict() + new_addon = addons_dict[addon_filename] + if new_addon['header']['type'] == 'drillbit': + self.parent_module.addon_elements += self.add_drillbit(length=new_addon['parameters']['length'], radius=new_addon['parameters']['radius'], mass=new_addon['parameters']['mass']) + elif new_addon['header']['type'] == 'handle': + self.parent_module.addon_elements += self.add_handle(x_offset=new_addon['parameters']['x_offset'], y_offset=new_addon['parameters']['y_offset'], z_offset=new_addon['parameters']['z_offset'], mass=new_addon['parameters']['mass'], radius=new_addon['parameters']['radius']) + else: + self.logger.info('Addon type not supported') + + except FileNotFoundError: + raise FileNotFoundError(addon_filename+' was not found in the available resources') + + + def add_module(self, filename, offsets={}, reverse=False, addons =[], robot_id=0, active_ports=3, is_structural=True, module_name=None): """Add a module specified by filename as child of the currently selected module. Parameters ---------- filename: str String with the name of the YAML file to load, describing the module parameters - angle_offset: float - Value of the angle between the parent module output frame and the module input frame + offsets: dict + Dictionary containing the various offsets ('x','y','z','roll','pitch','yaw') between the parent module output frame and the module input frame. Es. offsets = {'x': 1.0, 'y': 2.0, 'yaw': 1.57} reverse: bool Bool value expressing if the module is mounted in reverse direction (true) or in standard one (false). By default it is false. + Not used for hub types (cube, mobile base, etc.). + robot_id: int + Value of the robot_id set in the firmware of the module. + This is obtained in Discovery Mode when reading the JSON from the EtherCAT master. This is not used when in Bulding Mode. + active_ports: int + The number of active ports of the module (how many ports have established a connection to a module). + This is the integer conversion of the 4-bit binary string where each bit represent one port (1 if port is active, 0 if port is unactive) + is_structural: bool + Bool value expressing if the module is structural (true) or not (false). + Used only for hub types (cube, mobile base, etc.). Returns ------- @@ -2409,37 +1846,35 @@ def add_module(self, filename, angle_offset, reverse=False, robot_id=0, active_p self.print(path_name) self.print(filename) - new_module = None - # Generate the path and access the required YAML file - for resource_path in self.resources_paths: - template_name = self.resource_finder.get_filename('yaml/template.yaml', ['resources_path']) - try: - if filename.lower().endswith(('.yaml', '.yml')): - # Generate the path to the required YAML file - module_name = self.resource_finder.get_filename('yaml/'+filename, resource_path) - # Load the module from YAML and create a ModuleNode instance - new_module = ModuleNode.module_from_yaml(module_name, self.parent_module, template_name, reverse) - self.print("Module loaded from YAML: " + new_module.name) - elif filename.lower().endswith(('.json')): - # Generate the path to the required YAML file - module_name = self.resource_finder.get_filename('json/'+filename, resource_path) - # Load the module from YAML and create a ModuleNode instance - new_module = ModuleNode.module_from_json(module_name, self.parent_module, template_name, reverse) - self.print("Module loaded from JSON: " + new_module.name) - break - except FileNotFoundError: - continue - if new_module is None: - raise FileNotFoundError(filename+' was not found in the available resources') - - # If the parent is a connector module, it means we are starting a new branch from a cube. + try: + module_dict = self.modular_resources_manager.get_available_modules_dict()[filename] + template_dict = self.modular_resources_manager.get_available_modules_dict()['template.yaml'] + if filename.lower().endswith(('.yaml', '.yml')): + # Load the module from YAML and create a ModuleNode instance + new_module = ModuleNode.module_from_yaml_dict(module_dict, self.parent_module, template_dict, reverse) + self.print("Module loaded from YAML: " + new_module.name) + elif filename.lower().endswith(('.json')): + # Load the module from YAML and create a ModuleNode instance + new_module = ModuleNode.module_from_json_dict(module_dict, self.parent_module, template_dict, reverse) + self.print("Module loaded from JSON: " + new_module.name) + except KeyError: + raise KeyError(filename+' was not found in the available resources') + + # Socket module is a custom type. It behaves differently from other link modules because it has no electronics onboard. Its parent should always be the base_link. On the hardware it will actually be connected to a non-structural hub, which therefore will not be part of the URDF, so we consider the base_link to be the parent in any case. This means the ports of the hub will not actually be occupied, so potentially there is no limit to how many sockets could be connected (>3). + if new_module.type is ModuleType.SOCKET: + self.parent_module = new_module.parent = self.base_link + + # If the parent is a hub module, it means we are starting a new branch. # Then assign the correct tag (A, B, C, ...) to the new module (and therefore start a new branch) # by looking at the current tag_num (1, 2, 3, ...) and so at how many branches are already present in the robot. # If the parent is any other kind of module, assign as tag the same of his parent. - if self.parent_module.type == 'cube' or self.parent_module.type == 'mobile_base' : + if ( + self.parent_module.type in ModuleClass.hub_modules() | {ModuleType.BASE_LINK} + and new_module.type not in ModuleClass.hub_modules() + ): + self.tag_num += 1 tag_letter = self.branch_switcher.get(self.tag_num) setattr(new_module, 'tag', tag_letter) - self.tag_num += 1 else: setattr(new_module, 'tag', self.parent_module.tag) @@ -2451,65 +1886,129 @@ def add_module(self, filename, angle_offset, reverse=False, robot_id=0, active_p # flange_size is already set from the YAML file # setattr(new_module, 'flange_size', self.parent_module.flange_size) - setattr(new_module, 'angle_offset', angle_offset) + setattr(new_module, 'offsets', offsets) setattr(new_module, 'reverse', reverse) setattr(new_module, 'robot_id', robot_id) + # Attribute specifying if the module is structural or not. Useful for those types of modules that are not structural (e.g. hubs), in particular if they are present in the network and discovered by EtherCAT, but they are not part of the robot structure. + if hasattr(new_module.header, 'is_structural'): + setattr(new_module, 'is_structural', new_module.header.is_structural) + else: + # if the attribute is not present, set it, otherwise leave it as it is (it has been set from the YAML/JSON file) + setattr(new_module, 'is_structural', is_structural) + self.print("parent module:", self.parent_module.name, ", type :", self.parent_module.type) # Update the EtherCAT port connected to the electro-mechanical interface where the new module/slave will be added + ################################################# + # non-hub modules: # 1 2 3 4 # o o o o # | | | | # input port output port nothing nothing - setattr(new_module, 'selected_port', 2) - self.print('mastercube.selected_port :', new_module.selected_port) + ################################################# + # cube modules: + # 1 2 3 4 + # o o o o + # | | | | + # com-exp upper port front port nothing + ################################################# + setattr(new_module, 'current_port', 1) + self.print('new_module.current_port :', new_module.current_port) # save the active ports as a binary string - setattr(new_module, 'active_ports', "{0:04b}".format(active_ports)) + setattr(new_module, 'active_ports', "{0:04b}".format(active_ports)) self.print('active_ports: ', new_module.active_ports) # save the occupied ports as a binary string setattr(new_module, 'occupied_ports', "0001") self.print('occupied_ports: ', new_module.occupied_ports) + # add list of addons as attribute + setattr(new_module, 'addon_elements', []) + + # add list of urdf elements as attribute + setattr(new_module, 'xml_tree_elements', []) + + # add list of xml elements with an associated visual mesh as attribute + setattr(new_module, 'mesh_names', []) + + # add list of connectors names as attribute. The 0 connector is added by default. The others will be added by the add_connectors() method + setattr(new_module, 'connectors', ['connector_0']) + + # For certain types of modules, the model is considered as floating base, i.e. the base_link is not fixed to the world frame, but is connected through a floating joint. + # WARNING: this changes the behavior of the whole URDF not only for this module + if new_module.type in {'mobile_base'}: + self.set_floating_base(True) + # Depending on the type of the parent module and the new module, call the right method to add the new module. # Add the module to the correct chain via the 'add_to_chain' method. - - #if self.parent_module.type == "base_link": - if self.parent_module.type == 'joint': if new_module.type in { 'joint', 'wheel' }: # joint + joint self.print("joint + joint") - self.joint_after_joint(new_module, self.parent_module, angle_offset, reverse=reverse) + self.joint_after_joint(new_module, self.parent_module, offsets=offsets, reverse=reverse) + elif new_module.type in { 'cube', 'mobile_base' }: + # joint + hub + self.print("joint + hub") + self.hub_after_joint(new_module, self.parent_module, offsets=offsets, reverse=reverse, module_name=module_name) else: # joint + link self.print("joint + link") - self.link_after_joint(new_module, self.parent_module, angle_offset, reverse=reverse) + self.link_after_joint(new_module, self.parent_module, offsets=offsets, reverse=reverse) elif self.parent_module.type == 'wheel': # TODO: prevent adding modules after wheels in a better way (raise exception?) return {'result': 'ERROR: module cannot be added after wheel module. Select another chain or remove the wheel module.'} - elif self.parent_module.type == 'cube' or self.parent_module.type == "mobile_base": + elif self.parent_module.type in {'cube', "mobile_base"}: if new_module.type in { 'joint', 'wheel' }: - # cube + joint - self.joint_after_cube(new_module, self.parent_module, angle_offset, reverse=reverse) + # hub + joint + self.print("hub + joint") + self.joint_after_hub(new_module, self.parent_module, offsets=offsets, reverse=reverse) + elif new_module.type in { 'cube', 'mobile_base' }: + # hub + hub + self.print("hub + hub") + self.hub_after_hub(new_module, self.parent_module, offsets=offsets, reverse=reverse, module_name=module_name) else: - # cube + link - self.link_after_cube(new_module, self.parent_module, angle_offset, reverse=reverse) + # hub + link + self.print("hub + link") + self.link_after_hub(new_module, self.parent_module, offsets=offsets, reverse=reverse) else: if new_module.type in { 'joint', 'wheel' }: # link + joint self.print("link + joint") - self.joint_after_link(new_module, self.parent_module, angle_offset, reverse=reverse) + self.joint_after_link(new_module, self.parent_module, offsets=offsets, reverse=reverse) + elif new_module.type in { 'cube', 'mobile_base' }: + # link + hub + self.print("link + hub") + self.hub_after_link(new_module, self.parent_module, offsets=offsets, reverse=reverse, module_name=module_name) else: # link + link self.print("link + link") - self.link_after_link(new_module, self.parent_module, angle_offset, reverse=reverse) + self.link_after_link(new_module, self.parent_module, offsets=offsets, reverse=reverse) - # Add the module to the list of chains + # # TODO: check if this is correct + # # Add the module to the list of chains if there is at least a joint before it + # if new_module.i > 0: + # self.add_to_chain(new_module) self.add_to_chain(new_module) + # Update the parent_module attribute of the URDF_writer class + self.parent_module = new_module + + # Select the current connector of the new module + selected_connector = self.select_connector(new_module, port_idx=new_module.current_port) + # Select the meshes to highlight in the GUI + selected_meshes = self.select_meshes(selected_connector, new_module) + + for addon in addons: + try: + self.add_addon(addon_filename=addon) + except FileNotFoundError: + self.logger.error(f'Addon {addon} not found, skipping it') + + # add meshes to the map + self.mesh_to_module_map.update({k: new_module.name for k in new_module.mesh_names}) + if self.speedup: self.urdf_string = "" else: @@ -2522,55 +2021,119 @@ def add_module(self, filename, angle_offset, reverse=False, robot_id=0, active_p if self.verbose: # Render tree for pre, _, node in anytree.render.RenderTree(self.base_link): - self.print("%s%s" % (pre, node.name)) + self.print("%s%s: %d" % (pre, node.name, node.robot_id)) # Create a dictionary containing the urdf string just processed and other parameters needed by the web app - data = {'result': self.urdf_string, - 'lastModule_type': new_module.type, - 'lastModule_name': new_module.name, + data = {'name': new_module.name, + 'type': new_module.type, 'flange_size': new_module.flange_size, - 'count': new_module.i} - - # if new_module.name.endswith('_stator'): - # new_module.name = selected_module[:-7] - # last_module = anytree.search.findall_by_attr(L_0a, selected_module)[0] - - # Update the parent_module attribute of the URDF_writer class - self.parent_module = new_module - - # self.print(self.parent_module) + 'selected_connector': selected_connector, + 'selected_meshes': selected_meshes, + 'urdf_string': self.urdf_string} self.info_print("Module added to URDF: " + new_module.name + " (" + new_module.type + ")") return data - def add_gazebo_element(self, new_module_gazebo, new_module_name): + def add_gazebo_element(self, new_module_obj, gazebo_obj, new_module_name): """ Add a gazebo element to the new module """ # Add the gazebo element to the new module - if new_module_gazebo is not None: - gazebo_if_el = ET.SubElement(self.root, - 'xacro:if', - value="${GAZEBO_URDF}") - gazebo_el = ET.SubElement(gazebo_if_el, + if gazebo_obj is not None: + gazebo_el_name = 'gazebo_' + new_module_name + gazebo_if_el = ET.SubElement(self.root, + 'xacro:xacro_if_guard', + value="${GAZEBO_URDF}", + name = gazebo_el_name) + new_module_obj.xml_tree_elements.append(gazebo_el_name) + + gazebo_el = ET.SubElement(gazebo_if_el, 'gazebo', reference=new_module_name) - self.add_gazebo_element_children(new_module_gazebo, gazebo_el) - - def add_gazebo_element_children(self, new_module_gazebo, gazebo_element): + self.add_gazebo_element_children(gazebo_obj, gazebo_el) + + + def add_gazebo_element_children(self, gazebo_child_obj, gazebo_element): """ Add the gazebo element children to the new module """ - for key, value in vars(new_module_gazebo).items(): + for key, value in vars(gazebo_child_obj).items(): gazebo_child_el = ET.SubElement(gazebo_element, key) if isinstance(value, ModuleNode.Module.Attribute): - self.print(vars(value)) self.add_gazebo_element_children(value, gazebo_child_el) else: - self.print(value) gazebo_child_el.text = str(value) + + def update_module(self, selected_module=0, offsets={}, reverse=False, addons=[]): + if selected_module == 0: + selected_module = (self.parent_module) + # If the selected module is a connector module, select his parent (the hub) instead + if '_con' in selected_module.name: + selected_module = selected_module.parent + + self.info_print('Updating module: ' + str(selected_module.name)) + + # Update generator expression + self.update_generators() + + # Update offsets. MEMO: to be fixed! must apply offsets not overwrite + for node in self.urdf_nodes_generator: + try: + if node.attrib['name'] == selected_module.fixed_joint_name: + for key in offsets.keys(): + node.set(key, str(offsets[key])) + except (KeyError, AttributeError): + pass + + # update generator expression + self.update_generators() + + # remove addons + if(getattr(selected_module, 'addon_elements')): + for node in self.urdf_nodes_generator: + try: + if node.attrib['name'] in selected_module.addon_elements: + # remove mesh from list of meshes and from the map + if node.attrib['name'] in selected_module.mesh_names: + selected_module.mesh_names.remove(node.attrib['name']) + self.mesh_to_module_map.pop(node.attrib['name']) + # remove node from tree + self.root.remove(node) + except KeyError: + pass + + for addon in addons: + try: + self.add_addon(addon_filename=addon) + except FileNotFoundError: + self.logger.error(f'Addon {addon} not found, skipping it') + + self.mesh_to_module_map.update({k: selected_module.name for k in selected_module.mesh_names}) + + # Select the current connector of the new module + selected_connector = self.select_connector(selected_module, port_idx=selected_module.current_port) + # Select the meshes to highlight in the GUI + selected_meshes = self.select_meshes(selected_connector, selected_module) + + if self.speedup: + self.urdf_string = "" + else: + # Process the urdf string by calling the process_urdf method. Parse, convert from xacro and write to string + # Update the urdf file, removing the module + self.urdf_string = self.process_urdf() + + # Create a dictionary containing the urdf string just processed and other parameters needed by the web app + data = {'name': selected_module.name, + 'type': selected_module.type, + 'flange_size': selected_module.flange_size, + 'selected_connector': selected_connector, + 'selected_meshes': selected_meshes, + 'urdf_string': self.urdf_string} + + return data + def remove_module(self, selected_module=0): """Remove the selected module (and all its childs and descendants) and return info on its parent @@ -2578,8 +2141,7 @@ def remove_module(self, selected_module=0): Parameters ---------- selected_module: ModuleNode.ModuleNode - NodeModule object of the module to remove. Default value is 0, in which case the current parent_module is - selected as the module to be removed. + NodeModule object of the module to remove. Default value is 0, in which case the current parent_module is selected as the module to be removed. Returns ------- @@ -2588,199 +2150,68 @@ def remove_module(self, selected_module=0): In particular the updated and newly processed urdf string, so without the removed modules. """ - # global tag, n_cubes, parent_module - # If no selected_module argument was passed to the method, # select the current parent module to be the one to remove if selected_module == 0: selected_module = (self.parent_module) - # If the selected module is a connector module, select his parent (the cube) instead - if '_con' in selected_module.name: - selected_module = selected_module.parent - self.info_print('Removing module: ' + str(selected_module.name) + ' (and all its descendants)') - # If the selected module is NOT a cube start by first removing its child and descendants. - # There is a recursive call to this function inside the loop to remove each module. - if selected_module.type != 'cube': - self.print('eliminate child') - for child in selected_module.children: - self.remove_module(child) - - self.print(selected_module.children) - self.print(selected_module.parent.name) + # Remove the module childs and its descendants recursively + for child in selected_module.children: + self.print('eliminate child: ' + child.name + ' of type: ' + child.type + ' of parent: ' + selected_module.name) + self.remove_module(child) # update generator expression - self.update_generator() - #self.gen = (node for node in self.root.findall("*") if node.tag != 'gazebo') + self.update_generators() + + xml_elements_to_remove = [] + # remove addons + if(getattr(selected_module, 'addon_elements')): + xml_elements_to_remove += selected_module.addon_elements + # remove module xml elements + if(getattr(selected_module, 'xml_tree_elements')): + xml_elements_to_remove += selected_module.xml_tree_elements + + # remove all required xml elements from the tree + for node in self.urdf_nodes_generator: + try: + if node.attrib['name'] in xml_elements_to_remove: + # remove mesh from list of meshes and from the map + if node.attrib['name'] in selected_module.mesh_names: + selected_module.mesh_names.remove(node.attrib['name']) + self.mesh_to_module_map.pop(node.attrib['name']) + # remove node from tree + self.root.remove(node) + except KeyError: + pass - # switch depending on module type - if selected_module.type in { 'joint', 'wheel' }: - #remove the joints from the list of chains - self.remove_from_chain(selected_module) + # save parent of the module to remove. This will be the last element of the chain after removal, + # and its data will be returned by the function + father = selected_module.parent - # save parent of the module to remove. This will be the last element of the chain after removal, - # and it'll be returned by the function - father = selected_module.parent - - # From the list of xml elements find the ones with name corresponding to the relative joint, stator link - # and fixed joint before the stator link and remove them from the xml tree - for node in self.gen: - try: - if node.attrib['name'] == selected_module.name: - self.root.remove(node) - elif node.attrib['name'] == selected_module.stator_name: - self.root.remove(node) - elif node.attrib['name'] == selected_module.fixed_joint_stator_name: - self.root.remove(node) - elif node.attrib['name'] == selected_module.distal_link_name: - self.root.remove(node) - elif node.attrib['name'] == selected_module.distal_link_name + '_rotor_fast': - self.root.remove(node) - elif node.attrib['name'] == 'fixed_' + selected_module.distal_link_name + '_rotor_fast': - self.root.remove(node) - except KeyError: - pass + # remove the module from the list of chains + self.remove_from_chain(selected_module) + # switch depending on module type + if selected_module.type in ModuleClass.joint_modules(): self.control_plugin.remove_joint(selected_module.name) - # TODO: This is not working in the urdf. The ModuleNode obj is removed but the elment from the tree is not - elif selected_module.type == 'cube': - self.listofhubs.remove(selected_module) - # save parent of the module to remove. This will be the last element of the chain after removal, - # and its data will be returned by the function - father = selected_module.parent.parent - self.print(selected_module.parent.name) - - # update attribute representing number of cubes present in the model - self.n_cubes -= 1 - - # Remove childs of the cube (so connectors!) - for child in selected_module.children: - for node in self.gen: - try: - if node.attrib['name'] == child.name: - self.root.remove(node) - except KeyError: - pass - - # Remove the cube module from the xml tree - for node in self.gen: - try: - if node.attrib['name'] == selected_module.name: - self.root.remove(node) - except KeyError: - pass - - # selected_module.parent = None - - # select the father module of the cube - father_module = self.access_module_by_name(selected_module.parent.name) - - # Generate the name of the fixed joint between parent and cube - joint_name = 'FJ_' + father_module.parent.parent.name + '_' + father_module.name - self.print(joint_name) - - # Remove the fixed joint - for node in self.gen: - try: - if node.attrib['name'] == joint_name: - #self.print(joint_name) - self.root.remove(node) - except KeyError: - pass - - # before deleting father_module set his parent property to None. Otherwise this will mess up the obj tree - father_module.parent = None - - # delete object father_module - del father_module - elif selected_module.type == 'gripper': - #remove the gripper from their chain - self.remove_from_chain(selected_module) - - # save parent of the module to remove. This will be the last element of the chain after removal, - # and its data will be returned by the function - father = selected_module.parent - - # Generate te name of the fixed joint connecting the module with its parent - fixed_joint_name = str(selected_module.name) + '_fixed_joint' - - for node in self.gen: - try: - if node.attrib['name'] == fixed_joint_name: - self.root.remove(node) - elif node.attrib['name'] == selected_module.name: - self.root.remove(node) - except KeyError: - pass - + elif selected_module.type is ModuleType.GRIPPER: # TO BE FIXED: ok for ros_control. How will it be for xbot2? self.control_plugin.remove_joint(selected_module.name+'_finger_joint1') self.control_plugin.remove_joint(selected_module.name+'_finger_joint2') - elif selected_module.type == 'tool_exchanger': - #remove the tool exchanger from the chain - self.remove_from_chain(selected_module) - - # save parent of the module to remove. This will be the last element of the chain after removal, - # and its data will be returned by the function - father = selected_module.parent - - # Generate te name of the fixed joint connecting the module with its parent - fixed_joint_name = str(selected_module.name) + '_fixed_joint' - - for node in self.gen: - try: - if node.attrib['name'] == fixed_joint_name: - self.root.remove(node) - elif node.attrib['name'] == selected_module.name: - self.root.remove(node) - elif node.attrib['name'] == selected_module.pen_name: - self.root.remove(node) - elif node.attrib['name'] == 'fixed_'+selected_module.pen_name: - self.root.remove(node) - - except KeyError: - pass - - else: - # save parent of the module to remove. This will be the last element of the chain after removal, - # and its data will be returned by the function - father = selected_module.parent - - # Generate te name of the fixed joint connecting the module with its parent - fixed_joint_name = 'L_' + str(selected_module.i) + '_fixed_joint_' + str( - selected_module.p) + selected_module.tag - - for node in self.gen: - try: - if node.attrib['name'] == fixed_joint_name: - self.root.remove(node) - elif node.attrib['name'] == selected_module.name: - self.root.remove(node) - except KeyError: - pass + elif selected_module.type in ModuleClass.hub_modules(): + # if the module is a hub, remove it from the list of hubs + self.listofhubs.remove(selected_module) - # if selected_module.type == 'link': - # #root.remove(root.findall("*[@name=selected_module.name]", ns)[-1]) - # for node in self.gen: - # if node.attrib['name'] == selected_module.name: - # self.root.remove(node) - # self.gen = (node for node in self.root.findall("*") if node.tag != 'gazebo') - # elif selected_module.type == 'elbow': - # #root.remove(root.findall("*[@name=selected_module.name]", ns)[-1]) - # for node in self.gen: - # if node.attrib['name'] == selected_module.name: - # self.root.remove(node) - # self.gen = (node for node in self.root.findall("*") if node.tag != 'gazebo') - # elif selected_module.type == 'size_adapter': - # #root.remove(root.findall("*[@name=selected_module.name]", ns)[-1]) - # for node in self.gen: - # if node.attrib['name'] == selected_module.name: - # self.root.remove(node) - # self.gen = (node for node in self.root.findall("*") if node.tag != 'gazebo') + # if the parent module is a hub, decrease the tag number. A chain has been removed, tag should be reset accordingly + if ( + father.type in ModuleClass.hub_modules() | {ModuleType.BASE_LINK} + and selected_module.type not in ModuleClass.hub_modules() + ): + self.tag_num -= 1 if self.speedup: self.urdf_string = "" @@ -2789,31 +2220,25 @@ def remove_module(self, selected_module=0): # Update the urdf file, removing the module self.urdf_string = self.process_urdf() - # Update parent module attribute. TODO: understand why and if it's needed - if not self.parent_module.children: - self.parent_module = father + # Update the parent_module attribute of the URDF_writer class + self.parent_module = father - # Create a dictionary containing the urdf string just processed and other parameters needed by the web app - if father.type == 'cube': - data = {'result': self.urdf_string, - 'lastModule_type': father.type, - 'lastModule_name': father.name, - 'flange_size': father.flange_size, - 'count': self.n_cubes} - else: - data = {'result': self.urdf_string, - 'lastModule_type': father.type, - 'lastModule_name': father.name, - 'flange_size': father.flange_size, - 'count': father.i} - # data = jsonify(data) - - if '_con' in father.name: - self.tag_num -= 1 + # Select the current connector of the new module + selected_connector = self.select_connector(father, port_idx=self.connector_to_port_idx(father.connector_idx, father)) + # Select the meshes to highlight in the GUI + selected_meshes = self.select_meshes(selected_connector, father) + + + # Create a dictionary containing the urdf string just processed and other parameters needed by the web app + data = {'name': father.name, + 'type': father.type, + 'flange_size': father.flange_size, + 'selected_connector': selected_connector, + 'selected_meshes': selected_meshes, + 'urdf_string': self.urdf_string} # before deleting selected_module set his parent property to None. Otherwise this will mess up the obj tree selected_module.parent = None - # selected_module.parent.children = None # delete object selected_module del selected_module @@ -2873,226 +2298,392 @@ def access_module_by_name(self, queried_module_name): queried_module = anytree.search.findall_by_attr(self.base_link, queried_module_name)[0] self.print('queried_module.type: ', queried_module.type) - + # Update parent_module attribute self.parent_module = queried_module - return queried_module + return queried_module + + def select_module_from_id(self, id, current_port=None): + """Allows to select a module from the tree. An inner call to access_module_by_id sets the selected module as the + current parent module. Returns info on the selected module, so that the GUI can display it. + + Parameters + ---------- + id: int + The id of the module to select. It will be used to call the access_module_by_id method. + The corresponding object module data is then put in a dictionary and returned. + + current_port: int + Represent the current port. If the module is a hub/box it is used to select tjhe connector to be used. + + Returns + ------- + data: dict + The dictionary containing all necessary data about the selected module. + + """ + # global parent_module + self.print('id: ', id) + + # Call the access_module_by_id method to find the selected module + selected_module = self.access_module_by_id(id) + + # Select the current connector of the selected module + selected_connector = self.select_connector(selected_module, port_idx=current_port) + # Select the meshes to highlight in the GUI + selected_meshes = self.select_meshes(selected_connector, selected_module) + + # Create the dictionary with the relevant info on the selected module, so that the GUI can dispaly it. + data = {'name': selected_module.name, + 'type': selected_module.type, + 'flange_size': selected_module.flange_size, + 'selected_connector': selected_connector, + 'selected_meshes': selected_meshes, + 'urdf_string': self.urdf_string} + + return data + + def select_module_from_name(self, name, current_port=None): + """Allows to select a module from the tree. An inner call to access_module_by_name sets the selected module as the + current parent module. Returns info on the selected module, so that the GUI can display it. + + Parameters + ---------- + name: str + String with the name of the module to select or the name of the mesh clicked on the GUI. It will be used to call the access_module_by_name method. + The corresponding object module data is then put in a dictionary and returned. + + current_port: int + Represent the current port. If the module is a hub/box it is used to select tjhe connector to be used. + + Returns + ------- + data: dict + The dictionary containing all necessary data about the selected module. + + """ + + self.print(name) + + # If the name of the mesh clicked on the GUI is not the name of the module, but the name of the mesh, we need to + # find the module object from the mesh name. The mesh_to_module_map dictionary is used for this. Default value + # is the name itself, so if the name is not in the dictionary, it is the name of the module itself. + selected_module_name = self.mesh_to_module_map.get(name, name) + + # Call access_module_by_name to get the object with the requested name and sets it as parent. + # The method doing the real work is actually access_module_by_name + selected_module = self.access_module_by_name(selected_module_name) + + # Select the current connector of the selected module + selected_connector = self.select_connector(selected_module, connector_name=name, port_idx=current_port) + # Select the meshes to highlight in the GUI + selected_meshes = self.select_meshes(selected_connector, selected_module) + + # Create the dictionary with the relevant info on the selected module, so that the GUI can dispaly it. + data = {'name': selected_module.name, + 'type': selected_module.type, + 'flange_size': selected_module.flange_size, + 'selected_connector': selected_connector, + 'selected_meshes': selected_meshes, + 'urdf_string': self.urdf_string} + + return data + + + def port_to_connector_idx(self, port_idx, module): + """Convert the port index to the connector index, for the given module. + + Parameters + ---------- + port_idx: int + The index of the port to convert. + + module: ModuleNode.ModuleNode + The module to compute the connector index for. + + Returns + ------- + connector_idx: int + The index of the connector corresponding to the port index. + + """ + # MYNOTE: this part is used only in Discovery mode for now. + # TODO: this works only for hub trees of maximum depth 2. For deeper trees, this should be revised. + idx_offset = 0 + # If the hub is not structural, we need to take into account the other children the parent hub might have. + # If the hub is not structural, by default its parent must be a hub as well. Non-structural hubs can only be + # connected to structural hubs (or other non-structural hubs) and be a "children hub". Their only purpose is to + # "increase" the number of ports of its parent hub (and therefore its available connectors). + # The connectors are shared between the parent and children hubs, so their index must be computed accordingly. + if module.type in ModuleClass.hub_modules() and module.parent.type in ModuleClass.hub_modules() and not module.is_structural: + # # The current port used by the parent hub to connect to the hub we are computing the transforms of. + # parent_current_port = 1 << self.eth_to_physical_port_idx(module.parent.current_port) + # # The ports of the parent hub already occupied before adding the current hub. + # parent_already_occupied_ports = int(module.parent.occupied_ports, 2) & ~parent_current_port + # # The ports 1, 2 and 3 + # non_zero_ports = int("1110", 2) + # # The ports of the parent hub already occupied before adding the current hub, excluding the port 0. + # parent_ports_occupied_before_hub = (parent_already_occupied_ports & non_zero_ports) + # # The number of children the parent hub has before adding the current hub. + # n_children_before_hub = 0 + # for i in range(4): + # if parent_ports_occupied_before_hub & (1 << i): + # n_children_before_hub += 1 + + # The number of hubs children the parent hub has after adding the current hub. + parent_elder_hubs_children = module.parent.n_children_hubs - 1 + # The index offset is computed by looking at the number of children hubs and non-hubs the parent hub has before adding the current hub. + if parent_elder_hubs_children > 0: + # Count the number of non-structural hubs children the parent hub has (sieblings of the current hub) + # Remove the current hub from the count, should not be taken into account when counting the index. + nonstructural_hub_children = self.count_children_non_structural_hubs(module.parent, count=-1) + # We take into account the other hubs connected to get the right index. We have 4 connectors per hub, but since port 0 is occupied by the hub-hub connection, each child hub increase the index by 3 + idx_offset += (4-1)*nonstructural_hub_children + # We take into account that one port on the current hub (parent) is used to establish a connection with a second hub, and that should not be taken into account when counting the index + idx_offset -= 1*nonstructural_hub_children + # # Each hub sibling increases the index offset by 1! + # idx_offset += (1)*parent_elder_hubs_children + + # The number of non-hubs children the parent hub has before adding the current hub. + #parent_elder_nonhubs_children = n_children_before_hub - parent_elder_hubs_children + # # the number of non-hubs children increases the index offset by 1 (since each non-hub has 2 connectors, but one is used to connect to the parent hub). + # idx_offset +=(parent_elder_nonhubs_children)*1 + #MYNOTE: this is kind of magic + idx_offset += module.parent.current_port - 1 + + # indexes for connector and selected port are the same, unless the hub is connected to another non-structural hub + connector_idx = port_idx + idx_offset + + # We need to add an offset to the connector index introduced by the other non-structural hubs already connected to the current hub + if module.type in ModuleClass.hub_modules(): + # Count the number of non-structural hubs children the current hub has + nonstructural_hub_children = self.count_children_non_structural_hubs(module) + # We take into account the other hubs connected to get the right index. We have 4 connectors per hub, but since port 0 is occupied by the hub-hub connection, each child hub increase the index by 3 + connector_idx += (4-1)*nonstructural_hub_children + # We take into account that one port on the current hub (parent) is used to establish a connection with a second hub, and that should not be taken into account when counting the index + connector_idx -= 1*nonstructural_hub_children + + return connector_idx + + + def count_children_non_structural_hubs(self, module, count=0): + """Count all non-strucural hubs children and grandchildren of the given module recursively. + + Parameters + ---------- + module: ModuleNode.ModuleNode + The module to compute the offset for. + + count: int + The current offset count. Default value is 0. + + Returns + ------- + count: int + The offset of the connector index for the given module. + + """ + for child in module.children: + count = self.count_children_non_structural_hubs(child, count) + if child.type in ModuleClass.hub_modules() and not child.is_structural: + count += 1 + return count + + + def connector_to_port_idx(self, connector_idx, module): + """Convert the connector index to the port index. + + Parameters + ---------- + connector_idx: int + The index of the connector to convert. + + Returns + ------- + port_idx: int + The index of the port corresponding to the connector index. + + """ + # MYNOTE: this part is used only in Building mode for now. When the differences between the two modes will be removed, the implemantation of this function will be the reverse of the port_to_connector_idx function. + + # connector index is the same as the port index for the first 4 ports + port_idx = connector_idx + + return port_idx + + + def eth_to_physical_port_idx(self, eth_port_idx): + """Convert the EtherCAT port index to the physical port index. This is necessary because the EtherCAT master + scans the ports in a different order than the physical one. + + Parameters + ---------- + + eth_port_idx: int + The index of the EtherCAT port to convert. + + Returns + ------- + physical_port_idx: int + The index of the physical port corresponding to the EtherCAT port index. + + """ + eth_to_physical_port_map = { + 0: 0, + 1: 3, + 2: 1, + 3: 2 + } + return eth_to_physical_port_map[eth_port_idx] - def select_module_from_id(self, id, selected_port=None): - """Allows to select a module from the tree. An inner call to access_module_by_id sets the selected module as the - current parent module. Returns info on the selected module, so that the GUI can display it. + + def set_current_port(self, module, port_idx=None): + """Set the current port of the module, i.e. the one where the new module will be added to. + The current port is the first free one, i.e. the first one seen from the EtherCAT master scan. + If the port_idx argument is passed, the current port is set to the one specified by it. Parameters ---------- - id: int - The id of the module to select. It will be used to call the access_module_by_id method. - The corresponding object module data is then put in a dictionary and returned. + module: ModuleNode.ModuleNode + The object of the module to set the current port to. - selected_port: int - Represent the port selected if the module is a hub/box + port_idx: int + The index of the port to select as the current one. Returns ------- - data: dict - The dictionary containing all necessary data about the selected module. + module.current_port: int + The port selected as the current one. """ - # global parent_module - self.print('id: ', id) + # If the port index is not None, it means that the user has selected it from the GUI. Value is overwritten + if port_idx is not None: + module.current_port = port_idx + else: + #MYNOTE: this part is used only in Discovery mode for now. occupied ports gets updated only in Discovery mode for now + # binary XOR: the free ports are the ones that are active but not occupied + free_ports = int(module.active_ports, 2) ^ int(module.occupied_ports, 2) + self.print(module.name + " active_ports: " + module.active_ports + " - " + "occupied_ports: " + module.occupied_ports + " =") + self.print("{0:04b}".format(free_ports)) - # Call the access_module_by_id method to find the selected module - selected_module = self.access_module_by_id(id) + # remap the ports from the physical order to the EtherCAT order: 3, 2, 1, 0 -> 2, 1, 3, 0. + # See EtherCAT slave documentation for more info + free_ports_remapped = ((free_ports & int("0110", 2)) << 1) + ((free_ports & int("1000", 2)) >> 2) + self.print("{0:04b}".format(free_ports_remapped)) - # TODO: Replace this with select_ports - # binary XOR - free_ports = int(selected_module.active_ports, 2) ^ int(selected_module.occupied_ports, 2) - self.print("{0:04b}".format(free_ports)) + # By default the selected port is the first free one (the firt one seen from the EtherCAT master scan) + selected_eth_port = self.ffs(free_ports_remapped) + self.print('selected EtherCAT port :', selected_eth_port) - selected_module.selected_port = self.ffs(free_ports) - self.print('selected_module.selected_port :', selected_module.selected_port) - - # # If parent topology is greater than 2 the parent is a switch/hub so we need to find the right port where the module is connected - # if active_ports >= 3: - # for port_idx in range(2, len(mastercube.active_ports) - 1) - # if mastercube.active_ports[-port_idx] == 1: - # mastercube.selected_port = port_idx - # break - - # if parent_active_ports == 3: - # self.parent_module.selected_port = 3 - # elif parent_active_ports == 5: - # self.parent_module.selected_port = 4 - # self.print('self.parent_module.selected_port: ', self.parent_module.selected_port) + # MYNOTE: this part is not needed. We are not interested in the physical port index, but in the EtherCAT port index, so that it matches the order of the ports in the EtherCAT master scan. + # # remap the ports from the EtherCAT order to the physical order: 2, 1, 3, 0 -> 3, 2, 1, 0. + # selected_physical_port = self.eth_to_physical_port_idx(selected_eth_port) + # self.print('selected physical port :', selected_physical_port) - # Create the dictionary with the relevant info on the selected module, so that the GUI can dispaly it. - if selected_module.type == 'cube': - data = {'lastModule_type': selected_module.type, - 'lastModule_name': selected_module.name, - 'flange_size': selected_module.flange_size, - 'count': self.n_cubes} - else: - data = {'lastModule_type': selected_module.type, - 'lastModule_name': selected_module.name, - 'flange_size': selected_module.flange_size, - 'count': selected_module.i} + # Set the current_port attribute of the module + module.current_port = selected_eth_port - return data + self.print('module.current_port :', module.current_port) - def select_module_from_name(self, name, selected_port=None): - """Allows to select a module from the tree. An inner call to access_module_by_name sets the selected module as the - current parent module. Returns info on the selected module, so that the GUI can display it. + return module.current_port + + + def select_connector(self, module, connector_name=None, port_idx=None): + """Select the connector of the module to which the new module will be added to. + If no `connector_name` is passed, the connector is the first free one, i.e. the first one seen from the EtherCAT master scan. (Discovery mode) + Otherwise the connector name is selected as the one passed as argument. (Building mode) Parameters ---------- - name: str - String with the name of the module to select or the name of the mesh clicked on the GUI. It will be used to call the access_module_by_name method. - The corresponding object module data is then put in a dictionary and returned. + module: ModuleNode.ModuleNode + The object of the module to set the current port to. - selected_port: int - Represent the port selected if the module is a hub/box + connector_name: str + String with the name of the connector. Could come from the name of the mesh clicked on the GUI and associated to the connector. + + port_idx: int + The index of the port to select as the current one. Returns ------- - data: dict - The dictionary containing all necessary data about the selected module. - + selected_connector: str + The name of the connector currently selected. """ - self.print(name) - - # If the selected module is the stator of a joint modify the string so to select the joint itself. - # This is needed because from the GUI when you select a joint by clicking, the mesh corresponding to the stator - # is selected, while the module we want to access is the joint (the stator is not part of the tree, only urdf). - if name.endswith('_stator'): - # Take the joint when the mesh of the joint stator is selected - selected_module_name = name[:-7] - elif '_con' in name: - # Take the box as parent when a connector is selected - selected_module_name = name[:-5] - # Save the selected port. We take the connector index from the name and increment it b 1 to get the port - selected_port = int(name[-1]) + 1 - self.print(selected_port) + # If the selected mesh is the one of a connector, we need to set the right port + if connector_name in module.connectors: + # The connector index is retrieved from the list of connectors of the module + connector_idx = module.connectors.index(connector_name) + # Convert the connector index to the port index + current_port = self.connector_to_port_idx(connector_idx, module) + # TODO: the current port is not at the moment. This is currently done only in Discovery mode. In Building mode the current port is not used. + # Set the name of the selected connector + selected_connector = connector_name else: - selected_module_name = name + # Set the current port of the module + self.set_current_port(module, port_idx=port_idx) + # Convert the port index to the connector index + connector_idx = self.port_to_connector_idx(module.current_port, module) + # Set the name of the selected connector. If the index is out of range, it means that the module has only one connector, so we use as name the module name itself. + # TODO: add connectors also for modules with only one connector, so to avoid this and have a uniform behavior + if 0 <= connector_idx < len(module.connectors): + selected_connector = module.connectors[connector_idx] + else: + selected_connector = module.name - self.print(selected_module_name) + setattr(module, 'connector_idx', connector_idx) - # Call access_module_by_name to get the object with the requested name and sets it as parent. - # The method doing the real work is actually access_module_by_name - selected_module = self.access_module_by_name(selected_module_name) - self.print(selected_module.type) - self.print(selected_module.name) - self.print(selected_module.robot_id) - self.print(selected_module.active_ports) - self.print(selected_module.occupied_ports) - - # TODO: Replace this with select_ports - # binary XOR - free_ports = int(selected_module.active_ports, 2) ^ int(selected_module.occupied_ports, 2) - self.print("{0:04b}".format(free_ports)) + self.print('selected_connector :', selected_connector) - selected_module.selected_port = self.ffs(free_ports) - self.print('selected_module.selected_port :', selected_module.selected_port) - - # # If parent topology is greater than 2 the parent is a switch/hub so we need to find the right port where the module is connected - # if active_ports >= 3: - # for port_idx in range(2, len(mastercube.active_ports) - 1) - # if mastercube.active_ports[-port_idx] == 1: - # mastercube.selected_port = port_idx - # break - - # if parent_active_ports == 3: - # self.parent_module.selected_port = 3 - # elif parent_active_ports == 5: - # self.parent_module.selected_port = 4 - # self.print('self.parent_module.selected_port: ', self.parent_module.selected_port) - - # Select the correct port where to add the module to - if '_con' in name: - selected_module.selected_port = selected_port - - # # Update active and occupied port of the ESC and select the right port - # self.select_ports(selected_module, name) + return selected_connector + - # Create the dictionary with the relevant info on the selected module, so that the GUI can dispaly it. - if selected_module.type == 'cube': - data = {'lastModule_type': selected_module.type, - 'lastModule_name': selected_module.name, - 'flange_size': selected_module.flange_size, - 'count': self.n_cubes} + def select_meshes(self, selected_connector, module): + """Select the mesh of the module to be highlighted on the GUI. + + Parameters + ---------- + selected_connector: str + String with the name of the connector. + + module: ModuleNode.ModuleNode + The object of the module to select the mesh from. + + Returns + ------- + selected_mesh: list + The names of the meshes currently selected. + """ + + if selected_connector in module.connectors: + # If the selected mesh is the one of a connector, we select as mesh only the one associated to the connector + selected_meshes = [selected_connector] else: - data = {'lastModule_type': selected_module.type, - 'lastModule_name': selected_module.name, - 'flange_size': selected_module.flange_size, - 'count': selected_module.i} + # Otherwise we select all the meshes of the module + selected_meshes = module.mesh_names - return data + self.print('selected_mesh :', selected_meshes) - def select_ports(self, module, name): - # In building mode the port is not set by reading the EtherCAT infos, but from the user which selects the - # connector mesh with a mouse click - if '_con' in name: - # "Deactivate" ports which are not occupied. This is necessary if from the GUI the user selects a port - # but doesn't attach anything to it. - module.active_ports = module.occupied_ports # int(module.active_ports, 2) & int(module.occupied_ports, 2) - # Save the selected port - selected_port = int(name[-1]) - #self.print(selected_port) - # Set the selected_port as active - mask = 1 << selected_port - 1 - #self.print(mask) - #self.print(module.active_ports) - # binary OR - module.active_ports = "{0:04b}".format(int(module.active_ports, 2) | mask) - #self.print(module.active_ports) - #self.print(module.type) - #self.print(module.name) - #self.print(module.robot_id) - #self.print(module.active_ports) - #self.print(module.occupied_ports) - # binary XOR - free_ports = int(module.active_ports, 2) ^ int(module.occupied_ports, 2) - #self.print("{0:04b}".format(free_ports)) - - module.selected_port = self.ffs(free_ports) - #self.print('module.selected_port :', module.selected_port) - - # # If parent topology is greater than 2 the parent is a switch/hub so we need to find the right port where - # the module is connected if active_ports >= 3: for port_idx in range(2, len(mastercube.active_ports) - 1) if - # mastercube.active_ports[-port_idx] == 1: mastercube.selected_port = port_idx break - - # if parent_active_ports == 3: - # self.parent_module.selected_port = 3 - # elif parent_active_ports == 5: - # self.parent_module.selected_port = 4 - # #self.print('self.parent_module.selected_port: ', self.parent_module.selected_port) - - # Select the correct port where to add the module to - # if '_con' in name: - # module.selected_port = selected_port + return selected_meshes - return 0 @staticmethod def ffs(x): """Returns the index, counting from 0, of the least significant set bit in `x`. """ - return (x & -x).bit_length() - + return (x & -x).bit_length() - 1 + # TODO: handle reverse also for links def add_link(self, new_Link, parent_name, transform, reverse): x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(transform) - if new_Link.type == 'link': + if new_Link.type in ModuleClass.link_modules() - {ModuleType.SIZE_ADAPTER}: setattr(new_Link, 'name', 'L_' + str(new_Link.i) + '_link_' + str(new_Link.p) + new_Link.tag) - ET.SubElement(self.root, - "xacro:add_link", - type="link", - name=new_Link.name, - filename=new_Link.filename) - elif new_Link.type == 'dagana': + self.add_link_element(new_Link.name, new_Link, 'body_1') # , type='link') + + elif new_Link.type is ModuleType.DAGANA: setattr(new_Link, 'name', 'dagana' + new_Link.tag) ET.SubElement(self.root, "xacro:add_dagana", @@ -3105,6 +2696,10 @@ def add_link(self, new_Link, parent_name, transform, reverse): roll=roll, pitch=pitch, yaw=yaw) + # add the xacro:add_dagana element to the list of urdf elements + new_Link.xml_tree_elements.append(new_Link.name) + new_Link.mesh_names += [new_Link.name + '_top_link', new_Link.name + '_bottom_link'] + setattr(new_Link, 'dagana_joint_name', new_Link.name + '_claw_joint') setattr(new_Link, 'dagana_link_name', new_Link.name + '_bottom_link') setattr(new_Link, 'dagana_tcp_name', new_Link.name + '_tcp') @@ -3114,13 +2709,14 @@ def add_link(self, new_Link, parent_name, transform, reverse): type="pen", name=new_Link.tcp_name, father=new_Link.dagana_tcp_name, - filename=new_Link.filename, x="0.0", y="0.0", z="0.0", roll="0.0", pitch="0.0", yaw="0.0") + # add the xacro:add_tcp element to the list of urdf elements + new_Link.xml_tree_elements.append(new_Link.tcp_name) # the dagana gets added to the chain. it's needed in the joint map and in the config! # self.add_to_chain(new_Link) @@ -3128,13 +2724,26 @@ def add_link(self, new_Link, parent_name, transform, reverse): return - elif new_Link.type == 'drill': + elif new_Link.type is ModuleType.DRILL: setattr(new_Link, 'name', 'drill' + new_Link.tag) + self.add_link_element(new_Link.name, new_Link, 'body_1') # , type='link') + + setattr(new_Link, 'camera_name', 'drill_camera' + new_Link.tag) ET.SubElement(self.root, - "xacro:add_drill", + "xacro:add_realsense_d_camera", type="link", - name=new_Link.name, - filename=new_Link.filename) + name=new_Link.camera_name, + parent_name=new_Link.name) + # add the xacro:add_realsense_d_camera to the list of urdf elements + new_Link.xml_tree_elements.append(new_Link.camera_name) + new_Link.mesh_names.append(new_Link.camera_name) + + # + # # + # + # + # + x_ee, y_ee, z_ee, roll_ee, pitch_ee, yaw_ee = ModuleNode.get_xyzrpy(tf.transformations.numpy.array(new_Link.kinematics.link.pose)) setattr(new_Link, 'tcp_name', 'ee' + new_Link.tag) ET.SubElement(self.root, @@ -3142,22 +2751,22 @@ def add_link(self, new_Link, parent_name, transform, reverse): type="pen", name=new_Link.tcp_name, father=new_Link.name, - filename=new_Link.filename, x=x_ee, y=y_ee, z=z_ee, roll=roll_ee, pitch=pitch_ee, yaw=yaw_ee) + # add the xacro:add_tcp element to the list of urdf elements + new_Link.xml_tree_elements.append(new_Link.tcp_name) + # the drill gets added to the chain although it's not a joint. it's needed in the joint map and in the config! # self.add_to_chain(new_Link) - elif new_Link.type == 'end_effector': + + elif new_Link.type is ModuleType.END_EFFECTOR: setattr(new_Link, 'name', 'end_effector' + new_Link.tag) - ET.SubElement(self.root, - "xacro:add_link", - type="link", - name=new_Link.name, - filename=new_Link.filename) + self.add_link_element(new_Link.name, new_Link, 'body_1') # , type='link') + x_ee, y_ee, z_ee, roll_ee, pitch_ee, yaw_ee = ModuleNode.get_xyzrpy(tf.transformations.numpy.array(new_Link.kinematics.link.pose)) setattr(new_Link, 'tcp_name', 'ee' + new_Link.tag) ET.SubElement(self.root, @@ -3165,54 +2774,66 @@ def add_link(self, new_Link, parent_name, transform, reverse): type="pen", name=new_Link.tcp_name, father=new_Link.name, - filename=new_Link.filename, x=x_ee, y=y_ee, z=z_ee, roll=roll_ee, pitch=pitch_ee, yaw=yaw_ee) - elif new_Link.type == 'tool_exchanger': + # add the xacro:add_tcp element to the list of urdf elements + new_Link.xml_tree_elements.append(new_Link.tcp_name) + + elif new_Link.type is ModuleType.TOOL_EXCHANGER: setattr(new_Link, 'name', 'tool_exchanger' + new_Link.tag) - ET.SubElement(self.root, - "xacro:add_tool_exchanger", - type="tool_exchanger", - name=new_Link.name, - filename=new_Link.filename) + self.add_link_element(new_Link.name, new_Link, 'body_1') # , type='tool_exchanger') + # the end-effector gets added to the chain although it's not a joint. it's needed in the joint map and in the config! # self.add_to_chain(new_Link) # HACK: add pen after tool_exchanger - setattr(new_Link, 'pen_name', 'pen' + new_Link.tag) + setattr(new_Link, 'tcp_name', 'pen' + new_Link.tag) ET.SubElement(self.root, - "xacro:add_pen", + "xacro:add_tcp", type="pen", - name=new_Link.pen_name, - father=new_Link.name) - elif new_Link.type == 'gripper': + name=new_Link.tcp_name, + father=new_Link.name, + x="0.0", + y="0.0", + z="0.222", + roll="0.0", + pitch="0.0", + yaw="0.0") + # add the xacro:add_tcp element to the list of urdf elements + new_Link.xml_tree_elements.append(new_Link.tcp_name) + + elif new_Link.type is ModuleType.GRIPPER: setattr(new_Link, 'name', 'gripper' + new_Link.tag) - ET.SubElement(self.root, - "xacro:add_gripper_body", - type="gripper_body", - name=new_Link.name, - filename=new_Link.filename) + self.add_link_element(new_Link.name, new_Link, 'body_1') # , type='gripper_body') + # the end-effector gets added to the chain although it's not a joint. it's needed in the joint map and in the config! # self.add_to_chain(new_Link) # add fingers and tcp after gripper - setattr(new_Link, 'TCP_name', 'TCP_' + new_Link.name) + setattr(new_Link, 'tcp_name', 'TCP_' + new_Link.name) setattr(new_Link, 'joint_name_finger1', new_Link.name + '_finger_joint1') setattr(new_Link, 'joint_name_finger2', new_Link.name + '_finger_joint2') + + # TODO: add_gripper_fingers still use the xacro to load the yaml file and get the parameters. It should be changed to use the python function for uniformity ET.SubElement(self.root, "xacro:add_gripper_fingers", type="gripper_fingers", name=new_Link.name, joint_name_finger1=new_Link.joint_name_finger1, joint_name_finger2=new_Link.joint_name_finger2, - TCP_name=new_Link.TCP_name, + TCP_name=new_Link.tcp_name, filename=new_Link.filename) + # add the xacro:add_gripper_fingers element to the list of urdf elements + new_Link.xml_tree_elements.append(new_Link.name) + new_Link.mesh_names += [new_Link.name + '_finger1', new_Link.name + '_finger2'] + # TO BE FIXED: ok for ros_control. How will it be for xbot2? self.control_plugin.add_joint(new_Link.joint_name_finger1) self.control_plugin.add_joint(new_Link.joint_name_finger2) - elif new_Link.type == 'size_adapter': + + elif new_Link.type is ModuleType.SIZE_ADAPTER: setattr(new_Link, 'name', 'L_' + str(new_Link.i) + '_size_adapter_' + str(new_Link.p) + new_Link.tag) ET.SubElement(self.root, "xacro:add_size_adapter", @@ -3223,11 +2844,14 @@ def add_link(self, new_Link, parent_name, transform, reverse): # size_in=new_Link.size_in, # size_out=new_Link.size_out ) + # add the xacro:add_size_adapter element to the list of urdf elements + new_Link.xml_tree_elements.append(new_Link.name) + new_Link.mesh_names.append(new_Link.name) setattr(new_Link, 'flange_size', new_Link.size_out) - self.add_gazebo_element(new_Link.gazebo.body_1, new_Link.name) - - if new_Link.type == 'tool_exchanger' or new_Link.type == 'gripper' or new_Link.type == 'end_effector' or new_Link.type == 'drill': + self.add_gazebo_element(new_Link, new_Link.gazebo.body_1, new_Link.name) + + if new_Link.type in ModuleClass.end_effector_modules(): fixed_joint_name = new_Link.name + '_fixed_joint' else: fixed_joint_name = 'L_' + str(new_Link.i) + '_fixed_joint_' + str(new_Link.p) + new_Link.tag @@ -3244,61 +2868,25 @@ def add_link(self, new_Link, parent_name, transform, reverse): roll=roll, pitch=pitch, yaw=yaw) + # add the xacro:add_gripper_fingers element to the list of urdf elements + new_Link.xml_tree_elements.append(fixed_joint_name) + setattr(new_Link, 'fixed_joint_name', fixed_joint_name) return - # noinspection PyPep8Naming - def link_after_cube(self, new_Link, past_Cube, offset, reverse): - """Adds to the URDF tree a link module as a child of a cube module - - Parameters - ---------- - new_Link: ModuleNode.ModuleNode - ModuleNode object of the link module to add - - past_Cube: ModuleNode.ModuleNode - ModuleNode object of the cube module to which attach the link - - offset: float - Value of the angle between the parent module output frame and the module input frame - """ - setattr(new_Link, 'p', past_Cube.p + 1) - - self.print('past_Cube: ', past_Cube) - self.print('past_Cube.selected_port: ', past_Cube.selected_port) - - if past_Cube.is_structural: - parent_name = past_Cube.name - else: - parent_name = past_Cube.parent.name - - interface_transform = self.get_cube_output_transform(past_Cube) - - transform = self.get_proximal_transform(interface_transform, offset, reverse) + def get_hub_output_transform(self, hub): - # HACK: to handle 90° offset between PINO and CONCERT flanges - transform = self.apply_adapter_transform_rotation(transform, past_Cube.flange_size, new_Link.flange_size) - - self.add_link(new_Link, parent_name, transform, reverse) - - self.collision_elements.append((past_Cube.name, new_Link.name)) - - - def get_cube_output_transform(self, past_Cube): - # index for connector and selecte port are shifted by 1 - connector_idx = (past_Cube.selected_port -1) - # We take into account the other hubs connected to get the right index. We have 4 connectors per hub, but since ports and index are shifted by 1, each child hub increase the index by 3 - connector_idx += (past_Cube.n_child_hubs) * (4-1) - # We take into account that one port is used to establish a connection with a second hub, and that should not be taken into account when counting the index - connector_idx -= past_Cube.n_child_hubs - - connector_name = 'Con_' + str(connector_idx) + '_tf' - interface_transform = getattr(past_Cube, connector_name) - # if not past_Cube.is_structural: + connector_name = 'Con_' + str(hub.connector_idx) + '_tf' + try: + interface_transform = getattr(hub, connector_name) + except AttributeError: + self.error_print('AttributeError: ' + connector_name + ' not found in hub ' + hub.name + '. Either something went wrong during the discovery or the resources should be updated.') + raise AttributeError + # if not hub.is_structural: # interface_transform = tf.transformations.identity_matrix() - self.print('past_Cube.selected_port:', past_Cube.selected_port) + self.print('hub.current_port:', hub.current_port) self.print('interface_transform: ', interface_transform) return interface_transform @@ -3312,15 +2900,27 @@ def get_link_output_transform(self, past_Link): return past_Link.Homogeneous_tf - def get_proximal_transform(self, interface_transform, offset, reverse): + def get_joint_name(self, module): + if module.type in ModuleClass.joint_modules() | {ModuleType.DRILL}: + return module.name + elif module.type is ModuleType.DAGANA: + return module.dagana_joint_name + else: + return None + + def get_proximal_transform(self, interface_transform, offsets, reverse): + # compute offset + T = tf.transformations.translation_matrix((offsets.get('x', 0.0), offsets.get('y', 0.0), offsets.get('z', 0.0))) + R = tf.transformations.euler_matrix(offsets.get('roll', 0.0), offsets.get('pitch', 0.0), offsets.get('yaw', 0.0), 'sxyz') + offset_transform = tf.transformations.concatenate_matrices(T, R) + transform = ModuleNode.get_rototranslation(interface_transform, - tf.transformations.rotation_matrix(offset, - self.zaxis)) + offset_transform) # If the module is mounted in the opposite direction rotate the final frame by 180 deg., as per convention if reverse: transform = ModuleNode.get_rototranslation(transform, tf.transformations.rotation_matrix(3.14, self.yaxis)) - + return transform # HACK: to handle 90° offset between PINO and CONCERT flanges @@ -3335,22 +2935,120 @@ def apply_adapter_transform_rotation(self, interface_transform, size1, size2): return transform + def add_origin(self, parent_el, pose): + # x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(pose) # TODO: migrate to JSON format and use this + + ET.SubElement(parent_el, "origin", + xyz=str(pose.x) + " " + str(pose.y) + " " + str(pose.z), + rpy=str(pose.roll) + " " + str(pose.pitch) + " " + str(pose.yaw)) + + + def add_geometry(self, parent_el, geometry): + geometry_el = ET.SubElement(parent_el, "geometry") + if geometry.type == "mesh": + ET.SubElement(geometry_el, "mesh", + filename=geometry.parameters.file, + scale=' '.join(str(x) for x in geometry.parameters.scale)) + elif geometry.type == "box": + ET.SubElement(geometry_el, "box", + size=' '.join(str(x) for x in geometry.parameters.size)) + elif geometry.type == "cylinder": + ET.SubElement(geometry_el, "cylinder", + radius=str(geometry.parameters.radius), + length=str(geometry.parameters.length)) + elif geometry.type == "sphere": + ET.SubElement(geometry_el, "sphere", + radius=str(geometry.parameters.radius)) + + + def add_material(self, parent_el, color): + material_el = ET.SubElement(parent_el, "material", + name = color.material_name) + if hasattr(color, 'rgba'): + ET.SubElement(material_el, "color", + rgba=' '.join(str(x) for x in color.rgba)) + if hasattr(color, 'texture'): + ET.SubElement(material_el, "texture", + filename=color.texture.filename) + + + def add_inertial(self, parent_el, dynamics, gear_ratio=1.0): + inertial_el = ET.SubElement(parent_el, "inertial") + # We interpret the mass as a flag to enable/disable the inertial properties + if dynamics.mass: + ET.SubElement(inertial_el, "origin", + xyz=str(dynamics.CoM.x) + " " + str(dynamics.CoM.y) + " " + str(dynamics.CoM.z), + rpy=str(0) + " " + str(0) + " " + str(0)) + ET.SubElement(inertial_el, "mass", + value=str(dynamics.mass)) + ET.SubElement(inertial_el, "inertia", + ixx=str(dynamics.inertia_tensor.I_xx), + ixy=str(dynamics.inertia_tensor.I_xy), + ixz=str(dynamics.inertia_tensor.I_xz), + iyy=str(dynamics.inertia_tensor.I_yy), + iyz=str(dynamics.inertia_tensor.I_yz), + izz=str(gear_ratio*gear_ratio*dynamics.inertia_tensor.I_zz)) + # If the mass is 0.0 we set the inertial properties to a default value to avoid issues with the dynamics libraries using the URDF + else: + ET.SubElement(inertial_el, "mass", + value=str(1e-04)) + ET.SubElement(inertial_el, "inertia", + ixx=str(1e-09), + ixy=str(0), + ixz=str(0), + iyy=str(1e-09), + iyz=str(0), + izz=str(1e-09)) + + + def add_link_element(self, link_name, module_obj, body_name, is_geared=False): + link_el = ET.SubElement(self.root, + 'link', + name=link_name) + # Add the link to the list of urdf elements of the module + module_obj.xml_tree_elements.append(link_name) + module_obj.mesh_names.append(link_name) + + visual_bodies = getattr(module_obj.visual, body_name, None) + collision_bodies = getattr(module_obj.collision, body_name, None) + dynamics_body = getattr(module_obj.dynamics, body_name, None) + + for body in visual_bodies or []: + visual_el = ET.SubElement(link_el, + 'visual') + self.add_origin(visual_el, body.pose) + self.add_geometry(visual_el, body) + if hasattr(body.parameters, 'color'): + self.add_material(visual_el, body.parameters.color) + + for body in collision_bodies or []: + collision_el = ET.SubElement(link_el, + 'collision') + self.add_origin(collision_el, body.pose) + self.add_geometry(collision_el, body) + + if dynamics_body: + if is_geared: + self.add_inertial(link_el, dynamics_body, module_obj.actuator_data.gear_ratio) + else: + self.add_inertial(link_el, dynamics_body) + def add_joint(self, new_Joint, parent_name, transform, reverse): x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(transform) - if new_Joint.type == 'joint': + if new_Joint.type is ModuleType.JOINT: setattr(new_Joint, 'name', 'J' + str(new_Joint.i) + new_Joint.tag) setattr(new_Joint, 'distal_link_name', 'L_' + str(new_Joint.i) + new_Joint.tag) - elif new_Joint.type == 'wheel': + elif new_Joint.type is ModuleType.WHEEL: setattr(new_Joint, 'name', 'J_wheel' + new_Joint.tag) setattr(new_Joint, 'distal_link_name', 'wheel' + new_Joint.tag) setattr(new_Joint, 'stator_name', new_Joint.name + '_stator') - setattr(new_Joint, 'fixed_joint_stator_name', "fixed_" + new_Joint.name) + setattr(new_Joint, 'fixed_joint_name', "fixed_" + new_Joint.name) ET.SubElement(self.root, "xacro:add_fixed_joint", type="fixed_joint_stator", - name=new_Joint.fixed_joint_stator_name, - father=parent_name, # TODO: check! + name=new_Joint.fixed_joint_name, + father=parent_name, child=new_Joint.stator_name, x=x, y=y, @@ -3358,6 +3056,8 @@ def add_joint(self, new_Joint, parent_name, transform, reverse): roll=roll, pitch=pitch, yaw=yaw) + # add the xacro:add_fixed_joint element to the list of urdf elements + new_Joint.xml_tree_elements.append(new_Joint.fixed_joint_name) self.collision_elements.append((parent_name, new_Joint.stator_name)) @@ -3377,13 +3077,9 @@ def add_joint(self, new_Joint, parent_name, transform, reverse): prox_mesh_transform = mesh_transform x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(prox_mesh_transform) - ET.SubElement(self.root, - "xacro:add_proximal", - type="joint_stator", - name=new_Joint.stator_name, - filename=new_Joint.filename) - - self.add_gazebo_element(new_Joint.gazebo.body_1, new_Joint.stator_name) + # Add proximal link + self.add_link_element(new_Joint.stator_name, new_Joint, 'body_1') + self.add_gazebo_element(new_Joint, new_Joint.gazebo.body_1, new_Joint.stator_name) joint_transform = ModuleNode.get_rototranslation(tf.transformations.identity_matrix(), new_Joint.Proximal_tf) @@ -3411,10 +3107,12 @@ def add_joint(self, new_Joint, parent_name, transform, reverse): lower_lim=lower_lim, effort=effort, velocity=velocity) + # add the xacro:add_joint element to the list of urdf elements + new_Joint.xml_tree_elements.append(new_Joint.name) #### #ET.SubElement(self.xbot2_pid, "xacro:add_xbot2_pid", name=new_Joint.name, profile="small_mot") - self.control_plugin.add_joint(new_Joint.name, + self.control_plugin.add_joint(new_Joint.name, control_params=new_Joint.xbot_gz if hasattr(new_Joint, 'xbot_gz') else None) #### @@ -3425,27 +3123,26 @@ def add_joint(self, new_Joint, parent_name, transform, reverse): x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(dist_mesh_transform) - ET.SubElement(self.root, - "xacro:add_distal", - type="add_distal", - name=new_Joint.distal_link_name, - filename=new_Joint.filename) - + # Add distal link + self.add_link_element(new_Joint.distal_link_name, new_Joint, 'body_2') + self.add_gazebo_element(new_Joint, new_Joint.gazebo.body_2, new_Joint.distal_link_name) + + # Add proximal/distal links pair to the list of collision elements to ignore self.collision_elements.append((new_Joint.stator_name, new_Joint.distal_link_name)) - self.add_gazebo_element(new_Joint.gazebo.body_2, new_Joint.distal_link_name) - if reverse: new_Joint.Distal_tf = ModuleNode.get_rototranslation(new_Joint.Distal_tf, tf.transformations.rotation_matrix(3.14, self.yaxis)) # add the fast rotor part to the inertia of the link/rotor part as a new link. NOTE: right now this is # attached at the rotating part not to the fixed one (change it so to follow Pholus robot approach) + # TODO: create a switch between the different methods to consider the fast rotor part if hasattr(new_Joint.dynamics, 'body_2_fast'): + setattr(new_Joint, 'fixed_joint_rotor_fast_name', "fixed_" + new_Joint.distal_link_name + '_rotor_fast') ET.SubElement(self.root, "xacro:add_fixed_joint", type="fixed_joint", - name="fixed_" + new_Joint.distal_link_name + '_rotor_fast', + name=new_Joint.fixed_joint_rotor_fast_name, father=new_Joint.distal_link_name, # stator_name, # child=new_Joint.distal_link_name + '_rotor_fast', x=x, @@ -3454,53 +3151,243 @@ def add_joint(self, new_Joint, parent_name, transform, reverse): roll=roll, pitch=pitch, yaw=yaw) - ET.SubElement(self.root, - "xacro:add_rotor_fast", - type="add_rotor_fast", - name=new_Joint.distal_link_name + '_rotor_fast', - filename=new_Joint.filename, + # add the xacro:add_fixed_joint element to the list of urdf elements + new_Joint.xml_tree_elements.append(new_Joint.fixed_joint_rotor_fast_name) + + self.add_link_element(new_Joint.distal_link_name + '_rotor_fast', new_Joint, 'body_2_fast', is_geared=True) + + + def add_hub(self, new_Hub, parent_name, transform, hub_name=None): + x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(transform) + + if hub_name: + setattr(new_Hub, 'name', hub_name) + else: + setattr(new_Hub, 'name', 'L_' + str(new_Hub.i) + '_link_' + str(new_Hub.p) + new_Hub.tag) + + self.add_link_element(new_Hub.name, new_Hub, 'body_1') + self.add_gazebo_element(new_Hub, new_Hub.gazebo.body_1, new_Hub.name) + + self.add_connectors(new_Hub) + + fixed_joint_name = 'fixed_' + new_Hub.name + + ET.SubElement(self.root, + "xacro:add_fixed_joint", + name=fixed_joint_name, + type="fixed_joint", + father=parent_name, + child=new_Hub.name, x=x, y=y, z=z, roll=roll, pitch=pitch, yaw=yaw) + # add the xacro:add_fixed_joint element to the list of urdf elements + new_Hub.xml_tree_elements.append(fixed_joint_name) + setattr(new_Hub, 'fixed_joint_name', fixed_joint_name) + + if new_Hub.type is ModuleType.MOBILE_BASE: + ET.SubElement(self.root, + "xacro:add_mobile_base_sensors", + name=new_Hub.name + '_sensors', + parent_name=new_Hub.name) + # add the xacro:add_mobile_base_sensors element to the list of urdf elements + new_Hub.xml_tree_elements.append(new_Hub.name + '_sensors') + + # Add hub and parent links pair to the list of collision elements to ignore + self.collision_elements.append((parent_name, new_Hub.name)) + + + # noinspection PyPep8Naming + def link_after_hub(self, new_Link, past_Hub, offsets, reverse): + """Adds to the URDF tree a link module as a child of a hub module + + Parameters + ---------- + new_Link: ModuleNode.ModuleNode + ModuleNode object of the link module to add + + past_Hub: ModuleNode.ModuleNode + ModuleNode object of the hub module to which attach the link + + offsets: dict + Dictionary containing the various offsets ('x','y','z','roll','pitch','yaw') between the parent module output frame and the module input frame. Es. offsets = {'x': 1.0, 'y': 2.0, 'yaw': 1.57} + """ + setattr(new_Link, 'p', 0) # past_Hub.p + 1) + setattr(new_Link, 'i', 0) # past_Hub.i) + + if past_Hub.is_structural: + parent_name = past_Hub.name + else: + parent_name = past_Hub.parent.name + + interface_transform = self.get_hub_output_transform(past_Hub) + + transform = self.get_proximal_transform(interface_transform, offsets, reverse) + + # HACK: to handle 90° offset between PINO and CONCERT flanges + transform = self.apply_adapter_transform_rotation(transform, past_Hub.flange_size, new_Link.flange_size) + + self.add_link(new_Link, parent_name, transform, reverse) + + self.collision_elements.append((past_Hub.name, new_Link.name)) # noinspection PyPep8Naming - def joint_after_cube(self, new_Joint, past_Cube, offset, reverse): - """Adds to the URDF tree a joint module as a child of a cube module + def joint_after_hub(self, new_Joint, past_Hub, offsets, reverse): + """Adds to the URDF tree a joint module as a child of a hub module Parameters ---------- new_Joint: ModuleNode.ModuleNode ModuleNode object of the joint module to add - past_Cube: ModuleNode.ModuleNode - ModuleNode object of the cube module to which the joint will be attached + past_Hub: ModuleNode.ModuleNode + ModuleNode object of the hub module to which the joint will be attached - offset: float - Value of the angle between the parent module output frame and the module input frame + offsets: dict + Dictionary containing the various offsets ('x','y','z','roll','pitch','yaw') between the parent module output frame and the module input frame. Es. offsets = {'x': 1.0, 'y': 2.0, 'yaw': 1.57} """ - if past_Cube.is_structural: - parent_name = past_Cube.name + if past_Hub.is_structural: + parent_name = past_Hub.name else: - parent_name = past_Cube.parent.name + parent_name = past_Hub.parent.name - interface_transform = self.get_cube_output_transform(past_Cube) + interface_transform = self.get_hub_output_transform(past_Hub) - transform = self.get_proximal_transform(interface_transform, offset, reverse) + transform = self.get_proximal_transform(interface_transform, offsets, reverse) # HACK: to handle 90° offset between PINO and CONCERT flanges - transform = self.apply_adapter_transform_rotation(transform, past_Cube.flange_size, new_Joint.flange_size) + transform = self.apply_adapter_transform_rotation(transform, past_Hub.flange_size, new_Joint.flange_size) setattr(new_Joint, 'i', 1) setattr(new_Joint, 'p', 0) self.add_joint(new_Joint, parent_name, transform, reverse) + + def hub_after_hub(self, new_Hub, past_Hub, offsets, reverse, module_name=None): + """Adds to the URDF tree a hub module as a child of a hub module + + Parameters + ---------- + new_Hub: ModuleNode.ModuleNode + ModuleNode object of the hub module to add + + past_Hub: ModuleNode.ModuleNode + ModuleNode object of the hub module to which the hub will be attached + + offsets: dict + Dictionary containing the various offsets ('x','y','z','roll','pitch','yaw') between the parent module output frame and the module input frame. Es. offsets = {'x': 1.0, 'y': 2.0, 'yaw': 1.57} + """ + if past_Hub.is_structural: + parent_name = past_Hub.name + else: + parent_name = past_Hub.parent.name + + setattr(new_Hub, 'i', 0) + setattr(new_Hub, 'p', past_Hub.p + 1) + + interface_transform = self.get_hub_output_transform(past_Hub) + + transform = self.get_proximal_transform(interface_transform, offsets, reverse) + + # HACK: to handle 90° offset between PINO and CONCERT flanges + transform = self.apply_adapter_transform_rotation(transform, past_Hub.flange_size, new_Hub.flange_size) + + # Set the number of child hubs to 0 (it will be incremented when a child hub is added) + setattr(new_Hub, 'n_children_hubs', 0) + + if new_Hub.is_structural: + self.add_hub(new_Hub, parent_name, transform, hub_name=module_name) + else: + # HACK: we set the name of the non-structural hub to be the same as the parent. This is needed to correctly write the SRDF chains! + setattr(new_Hub, 'name', parent_name) + # HACK: we set the connectors of the non-structural hub to be the same as the parent. + new_Hub.connectors = past_Hub.connectors + # if the parent is a hub, the n_children_hubs attribute is incremented, in order to keep track of the number of hubs connected to the parent hub and therefore the number of ports occupied. This is needed to select the right connector where to connect the new module + self.parent_module.n_children_hubs += 1 + + # Add the hub to the list of hubs + self.listofhubs.append(new_Hub) + + + def hub_after_link(self, new_Hub, past_Link, offsets, reverse, module_name=None): + """Adds to the URDF tree a hub module as a child of a link module + + Parameters + ---------- + new_Hub: ModuleNode.ModuleNode + ModuleNode object of the hub module to add + + past_Link: ModuleNode.ModuleNode + ModuleNode object of the link module to which the hub will be attached + + offsets: dict + Dictionary containing the various offsets ('x','y','z','roll','pitch','yaw') between the parent module output frame and the module input frame. Es. offsets = {'x': 1.0, 'y': 2.0, 'yaw': 1.57} + """ + setattr(new_Hub, 'i', past_Link.i) + setattr(new_Hub, 'p', past_Link.p + 1) + + interface_transform = self.get_link_output_transform(past_Link) + + transform = self.get_proximal_transform(interface_transform, offsets, reverse=reverse) # TODO check reverse + + # HACK: to handle 90° offset between PINO and CONCERT flanges + transform = self.apply_adapter_transform_rotation(transform, past_Link.flange_size, new_Hub.flange_size) + + parent_name = past_Link.name + + # Set the number of child hubs to 0 (it will be incremented when a child hub is added) + setattr(new_Hub, 'n_children_hubs', 0) + + if new_Hub.is_structural: + self.add_hub(new_Hub, parent_name, transform, hub_name=module_name) + + # Add the hub to the list of hubs + self.listofhubs.append(new_Hub) + + + def hub_after_joint(self, new_Hub, past_Joint, offsets, reverse, module_name=None): + """Adds to the URDF tree a hub module as a child of a joint module + + Parameters + ---------- + new_Hub: ModuleNode.ModuleNode + ModuleNode object of the hub module to add + + past_Joint: ModuleNode.ModuleNode + ModuleNode object of the joint module to which the hub will be attached + + offsets: dict + Dictionary containing the various offsets ('x','y','z','roll','pitch','yaw') between the parent module output frame and the module input frame. Es. offsets = {'x': 1.0, 'y': 2.0, 'yaw': 1.57} + """ + setattr(new_Hub, 'i', past_Joint.i) + setattr(new_Hub, 'p', past_Joint.p + 1) + + interface_transform = self.get_joint_output_transform(past_Joint) + + transform = self.get_proximal_transform(interface_transform, offsets, reverse=reverse) # TODO check reverse + + # HACK: to handle 90° offset between PINO and CONCERT flanges + transform = self.apply_adapter_transform_rotation(transform, past_Joint.flange_size, new_Hub.flange_size) + + parent_name = past_Joint.distal_link_name + + # Set the number of child hubs to 0 (it will be incremented when a child hub is added) + setattr(new_Hub, 'n_children_hubs', 0) + + if new_Hub.is_structural: + self.add_hub(new_Hub, parent_name, transform, hub_name=module_name) + + # Add the hub to the list of hubs + self.listofhubs.append(new_Hub) + + # noinspection PyPep8Naming - def link_after_joint(self, new_Link, past_Joint, offset, reverse): + def link_after_joint(self, new_Link, past_Joint, offsets, reverse): """Adds to the URDF tree a link module as a child of a joint module Parameters @@ -3511,15 +3398,15 @@ def link_after_joint(self, new_Link, past_Joint, offset, reverse): past_Joint: ModuleNode.ModuleNode ModuleNode object of the joint module to which attach the link - offset: float - Value of the angle between the parent module output frame and the module input frame + offsets: dict + Dictionary containing the various offsets ('x','y','z','roll','pitch','yaw') between the parent module output frame and the module input frame. Es. offsets = {'x': 1.0, 'y': 2.0, 'yaw': 1.57} """ - + setattr(new_Link, 'i', past_Joint.i) setattr(new_Link, 'p', past_Joint.p + 1) interface_transform = self.get_joint_output_transform(past_Joint) - - transform = self.get_proximal_transform(interface_transform, offset, reverse) + + transform = self.get_proximal_transform(interface_transform, offsets, reverse) # HACK: to handle 90° offset between PINO and CONCERT flanges transform = self.apply_adapter_transform_rotation(transform, past_Joint.flange_size, new_Link.flange_size) @@ -3531,7 +3418,7 @@ def link_after_joint(self, new_Link, past_Joint, offset, reverse): self.collision_elements.append((past_Joint.distal_link_name, new_Link.name)) # noinspection PyPep8Naming - def joint_after_joint(self, new_Joint, past_Joint, offset, reverse): + def joint_after_joint(self, new_Joint, past_Joint, offsets, reverse): """Adds to the URDF tree a joint module as a child of a joint module Parameters @@ -3542,12 +3429,12 @@ def joint_after_joint(self, new_Joint, past_Joint, offset, reverse): past_Joint: ModuleNode.ModuleNode ModuleNode object of the joint module to which the joint will be attached - offset: float - Value of the angle between the parent module output frame and the module input frame + offsets: dict + Dictionary containing the various offsets ('x','y','z','roll','pitch','yaw') between the parent module output frame and the module input frame. Es. offsets = {'x': 1.0, 'y': 2.0, 'yaw': 1.57} """ interface_transform = self.get_joint_output_transform(past_Joint) - - transform = self.get_proximal_transform(interface_transform, offset, reverse) + + transform = self.get_proximal_transform(interface_transform, offsets, reverse) # HACK: to handle 90° offset between PINO and CONCERT flanges transform = self.apply_adapter_transform_rotation(transform, past_Joint.flange_size, new_Joint.flange_size) @@ -3560,7 +3447,7 @@ def joint_after_joint(self, new_Joint, past_Joint, offset, reverse): self.add_joint(new_Joint, parent_name, transform, reverse) # noinspection PyPep8Naming - def joint_after_link(self, new_Joint, past_Link, offset, reverse): + def joint_after_link(self, new_Joint, past_Link, offsets, reverse): """Adds to the URDF tree a joint module as a child of a link module Parameters @@ -3571,12 +3458,12 @@ def joint_after_link(self, new_Joint, past_Link, offset, reverse): past_Link: ModuleNode.ModuleNode ModuleNode object of the link module to which the joint will be attached - offset: float - Value of the angle between the parent module output frame and the module input frame + offsets: dict + Dictionary containing the various offsets ('x','y','z','roll','pitch','yaw') between the parent module output frame and the module input frame. Es. offsets = {'x': 1.0, 'y': 2.0, 'yaw': 1.57} """ interface_transform = self.get_link_output_transform(past_Link) - transform = self.get_proximal_transform(interface_transform, offset, reverse) + transform = self.get_proximal_transform(interface_transform, offsets, reverse) # HACK: to handle 90° offset between PINO and CONCERT flanges transform = self.apply_adapter_transform_rotation(transform, past_Link.flange_size, new_Joint.flange_size) @@ -3589,7 +3476,7 @@ def joint_after_link(self, new_Joint, past_Link, offset, reverse): self.add_joint(new_Joint, parent_name, transform, reverse) # noinspection PyPep8Naming - def link_after_link(self, new_Link, past_Link, offset, reverse): + def link_after_link(self, new_Link, past_Link, offsets, reverse): """Adds to the URDF tree a joint module as a child of a link module Parameters @@ -3600,15 +3487,16 @@ def link_after_link(self, new_Link, past_Link, offset, reverse): past_Link: ModuleNode.ModuleNode ModuleNode object of the link module to which the joint will be attached - offset: float - Value of the angle between the parent module output frame and the module input frame + offsets: dict + Dictionary containing the various offsets ('x','y','z','roll','pitch','yaw') between the parent module output frame and the module input frame. Es. offsets = {'x': 1.0, 'y': 2.0, 'yaw': 1.57} """ + setattr(new_Link, 'i', past_Link.i) setattr(new_Link, 'p', past_Link.p + 1) interface_transform = self.get_link_output_transform(past_Link) - transform = self.get_proximal_transform(interface_transform, offset, reverse) + transform = self.get_proximal_transform(interface_transform, offsets, reverse) # HACK: to handle 90° offset between PINO and CONCERT flanges transform = self.apply_adapter_transform_rotation(transform, past_Link.flange_size, new_Link.flange_size) @@ -3619,6 +3507,7 @@ def link_after_link(self, new_Link, past_Link, offset, reverse): self.collision_elements.append((past_Link.name, new_Link.name)) + # TODO: remove hard-coded values def write_problem_description_multi(self): basic_probdesc_filename = self.resource_finder.get_filename('cartesio/ModularBot_cartesio_IK_config.yaml', @@ -3642,7 +3531,8 @@ def write_problem_description_multi(self): i = 0 tasks = [] stack = [tasks] - for joints_chain in self.listofchains: + active_modules_chains = self.get_actuated_modules_chains() + for joints_chain in active_modules_chains: ee_name = "EE_" + str(i + 1) tasks.append(ee_name) probdesc['stack'] = stack @@ -3694,9 +3584,10 @@ def write_problem_description(self): self.print(list(probdesc.items())[0]) except yaml.YAMLError as exc: self.print(exc) - + self.print(probdesc.items()) - joints_chain = self.listofchains[0] + active_modules_chains = self.get_actuated_modules_chains() + joints_chain = active_modules_chains[0] tip_link = self.find_chain_tip_link(joints_chain) probdesc['EE']['distal_link'] = tip_link @@ -3717,13 +3608,13 @@ def write_problem_description(self): def write_lowlevel_config(self, use_robot_id=False): """Creates the low level config file needed by XBotCore """ lowlevel_config = self.control_plugin.write_lowlevel_config(use_robot_id) - + return lowlevel_config def write_joint_map(self, use_robot_id=False): """Creates the joint map needed by XBotCore """ joint_map = self.control_plugin.write_joint_map(use_robot_id) - + return joint_map def write_srdf(self, builder_joint_map=None, compute_acm=True): @@ -3828,36 +3719,37 @@ def write_urdf(self): return string_urdf_xbot # Save URDF/SRDF etc. in a directory with the specified robot_name - def deploy_robot(self, robot_name, deploy_dir=None): + def deploy_robot(self, robot_name='modularbot', deploy_dir=None): script = self.resource_finder.get_filename('deploy.sh', ['data_path']) - if deploy_dir is None: - deploy_dir = os.path.expanduser(self.resource_finder.cfg['deploy_dir']) - deploy_dir = os.path.expandvars(deploy_dir) + try: + if deploy_dir is None: + deploy_dir = self.resource_finder.get_expanded_path(['deploy_dir']) + if self.verbose: + output = subprocess.check_output([script, robot_name, "--destination-folder", deploy_dir, "-v"]) + else: + output = subprocess.check_output([script, robot_name, "--destination-folder", deploy_dir]) + except (subprocess.CalledProcessError, FileNotFoundError, RuntimeError) as e: + self.error_print(f"An error occurred when executing deploy script: {script}. Aborting.") + raise e - if self.verbose: - output = subprocess.check_output([script, robot_name, "--destination-folder", deploy_dir, "-v"]) - else: - output = subprocess.check_output([script, robot_name, "--destination-folder", deploy_dir]) - self.info_print(str(output, 'utf-8', 'ignore')) - hubs = self.findall_by_type(types=['cube', 'mobile_base']) + hubs = self.findall_by_type(types=ModuleClass.hub_modules()) if hubs is not None: - for hub_module in hubs: + for hub_module in (hub for hub in hubs if hub.is_structural): self.add_connectors(hub_module) return robot_name # Remove connectors when deploying the robot - def remove_connectors(self): + def remove_all_connectors(self): # update generator expression - self.update_generator() + self.update_generators() - # Remove the fixed joints that join the connectors to the boxes (by checking if 'con' is in the name of the child) # Catch KeyError when the node has no child element and continue with the loop. - for node in self.gen: + for node in self.urdf_nodes_generator: try: node_type = node.attrib['type'] if node_type == 'connectors': @@ -3867,40 +3759,42 @@ def remove_connectors(self): #self.print('missing type', node.attrib['name']) continue - # Process the urdf string by calling the process_urdf method. Parse, convert from xacro and write to string - # Update the urdf file, removing the module - string = self.process_urdf() - - if self.verbose: - # Render tree - for pre, _, node in anytree.render.RenderTree(self.base_link): - self.print("%s%s" % (pre, node.name)) - - return string def findall_by_type(self, types=[]): # Serch the tree by name for the selected module modulenodes = anytree.search.findall(self.base_link, filter_=lambda node: node.type in types) return modulenodes - + def add_connectors(self, modulenode): - max_num_con = 10 + max_num_con = 20 for i in range(1, max_num_con): if hasattr(modulenode, 'Con_{}_tf'.format(i)): con_tf = getattr(modulenode, 'Con_{}_tf'.format(i)) x, y, z, roll, pitch, yaw = ModuleNode.get_xyzrpy(con_tf) con_name = modulenode.name + '_con{}'.format(i) - ET.SubElement(self.root, - "xacro:add_connector", + ET.SubElement(self.root, + "xacro:add_connector", name=con_name, - type='connectors', - parent_name=modulenode.name, - x=x, - y=y, - z=z, - roll=roll, - pitch=pitch, + type='connectors', + parent_name=modulenode.name, + x=x, + y=y, + z=z, + roll=roll, + pitch=pitch, yaw=yaw) + modulenode.xml_tree_elements.append(con_name) + modulenode.mesh_names.append(con_name) + modulenode.connectors.append(con_name) + + def compute_payload(self, samples): + self.model_stats.update_model() + return self.model_stats.compute_payload(n_samples=samples) + + + def compute_stats(self, samples): + self.model_stats.update_model() + return self.model_stats.compute_stats(n_samples=samples) from contextlib import contextmanager @@ -3915,7 +3809,7 @@ def suppress_stdout(): """ old_stdout = sys.stdout sys.stdout = sys.stderr - try: + try: yield finally: sys.stdout = old_stdout @@ -3924,7 +3818,7 @@ def suppress_stdout(): def write_file_to_stdout(urdf_writer: UrdfWriter, homing_map, robot_name='modularbot'): import argparse - parser = argparse.ArgumentParser(prog='Modular URDF/SRDF generator and deployer', + parser = argparse.ArgumentParser(prog='Modular URDF/SRDF generator and deployer', usage='./script_name.py --output urdf writes URDF to stdout \n./script_name.py --deploy deploy_dir generates a ros package at deploy_dir') parser.add_argument('--output', '-o', required=False, choices=('urdf', 'srdf'), help='write requested file to stdout and exit') @@ -3944,8 +3838,8 @@ def write_file_to_stdout(urdf_writer: UrdfWriter, homing_map, robot_name='modula content = None with suppress_stdout(): - - urdf_writer.remove_connectors() + + urdf_writer.remove_all_connectors() if args.output == 'urdf': content = urdf_writer.process_urdf(xacro_mappings=xacro_mappings) @@ -3955,8 +3849,8 @@ def write_file_to_stdout(urdf_writer: UrdfWriter, homing_map, robot_name='modula urdf_writer.urdf_string = urdf_writer.process_urdf(xacro_mappings=xacro_mappings) content = urdf_writer.write_srdf(homing_map) open(f'/tmp/{robot_name}.srdf', 'w').write(content) - - if content is not None: + + if content is not None: print(content) if args.deploy is not None: @@ -3966,4 +3860,4 @@ def write_file_to_stdout(urdf_writer: UrdfWriter, homing_map, robot_name='modula urdf_writer.write_srdf(homing_map) urdf_writer.write_joint_map() - urdf_writer.deploy_robot(robot_name, args.deploy) \ No newline at end of file + urdf_writer.deploy_robot(robot_name, args.deploy) diff --git a/src/modular/enums.py b/src/modular/enums.py new file mode 100644 index 0000000..44e25b9 --- /dev/null +++ b/src/modular/enums.py @@ -0,0 +1,64 @@ +from enum import Enum + +class ModuleDescriptionFormat(Enum): + YAML = 1 # YAML format used internally in HHCM + JSON = 2 # JSON format used for the CONCERT project + +class KinematicsConvention(str, Enum): + """Kinematic convention used to define the rototranslation between two modules""" + DH_EXT = 'DH_ext' # extended Denavit-Hartenberg convention. See https://mediatum.ub.tum.de/doc/1280464/file.pdf + URDF = 'urdf' # URDF convention + AFFINE = 'affine_tf_matrix' # Affine trasformation matrix convention + +class ModuleType(str, Enum): + """Type of module""" + LINK = 'link' + JOINT = 'joint' + CUBE = 'cube' + WHEEL = 'wheel' + TOOL_EXCHANGER = 'tool_exchanger' + GRIPPER = 'gripper' + MOBILE_BASE = 'mobile_base' + BASE_LINK = 'base_link' + SIZE_ADAPTER = 'size_adapter' + SIMPLE_EE = 'simple_ee' + END_EFFECTOR = 'end_effector' + DRILL = 'drill' + DAGANA = 'dagana' + SOCKET = 'socket' + +class ModuleClass(set, Enum): + """Class of module""" + LINKS = {ModuleType.LINK, ModuleType.SIZE_ADAPTER, ModuleType.BASE_LINK, ModuleType.SOCKET} + JOINTS = {ModuleType.JOINT, ModuleType.WHEEL} + HUBS = {ModuleType.CUBE, ModuleType.MOBILE_BASE} + END_EFFECTORS = {ModuleType.GRIPPER, ModuleType.TOOL_EXCHANGER, ModuleType.END_EFFECTOR, ModuleType.DRILL, ModuleType.DAGANA, ModuleType.SIMPLE_EE} + PASSIVE_MODULES = {ModuleType.SIZE_ADAPTER, ModuleType.BASE_LINK, ModuleType.END_EFFECTOR, ModuleType.SIMPLE_EE, ModuleType.SOCKET} + # + @classmethod + def link_modules(cls): + return cls.LINKS + @classmethod + def joint_modules(cls): + return cls.JOINTS + @classmethod + def hub_modules(cls): + return cls.HUBS + @classmethod + def end_effector_modules(cls): + return cls.END_EFFECTORS + @classmethod + def all_modules(cls): + return cls.LINKS | cls.JOINTS | cls.HUBS | cls.END_EFFECTORS + @classmethod + def passive_modules(cls): + return cls.PASSIVE_MODULES + @classmethod + def active_modules(cls): + return cls.all_modules() - cls.passive_modules() + @classmethod + def nonactuated_modules(cls): + return cls.LINKS | cls.HUBS | cls.PASSIVE_MODULES + @classmethod + def actuated_modules(cls): + return cls.all_modules() - cls.nonactuated_modules() \ No newline at end of file diff --git a/src/modular/modular_data/cartesio/ModularBot_cartesio_IK_config.yaml b/src/modular/modular_data/cartesio/ModularBot_cartesio_IK_config.yaml index 625dcc7..15a9b2c 100644 --- a/src/modular/modular_data/cartesio/ModularBot_cartesio_IK_config.yaml +++ b/src/modular/modular_data/cartesio/ModularBot_cartesio_IK_config.yaml @@ -24,7 +24,7 @@ constraints: # indices: [0,1,2,3,4] EE: type: Cartesian - base_link: L_0_A + base_link: base_link distal_link: ee_A indices: [0,1,2,3,4] diff --git a/src/modular/modular_data/cartesio/ModularBot_cartesio_config.yaml b/src/modular/modular_data/cartesio/ModularBot_cartesio_config.yaml new file mode 100644 index 0000000..244e123 --- /dev/null +++ b/src/modular/modular_data/cartesio/ModularBot_cartesio_config.yaml @@ -0,0 +1,13 @@ + +stack: +- [EE] + + +EE: + type: Interaction + base_link: J1_A_stator + distal_link: tool_exchanger_A + stiffness: [1000.0, 1000.0, 1000.0, 200.0, 200.0, 200.0] + damping: [0.7, 0.7, 0.7, 0.7, 0.7, 0.7] + + diff --git a/src/modular/modular_data/configs/ModularBot_xbot2.yaml b/src/modular/modular_data/configs/ModularBot_xbot2.yaml index 80a483e..62bebd6 100644 --- a/src/modular/modular_data/configs/ModularBot_xbot2.yaml +++ b/src/modular/modular_data/configs/ModularBot_xbot2.yaml @@ -39,34 +39,9 @@ xbotcore_plugins: # different names and possibly different parameters homing: thread: rt_main - type: homing_example + type: homing params: time: { value: 5, type: double } - - cartesio_ik: - thread: rt_main - type: cartesio_rt - params: - problem_description: - value: $(rospack find ModularBot)/cartesio/ModularBot_cartesio_IK_config.yaml - type: file - solver: - value: OpenSot - type: string - enable_feedback: - value: false - type: bool - - cartesio_imp: - thread: rt_main - type: albero_cartesio_rt - params: - problem_description: - value: $(rospack find ModularBot)/cartesio/ModularBot_cartesio_Interaction_config.yaml - type: file - solver: {value: AlberoImpedance, type: string} - enable_feedback: {value: true, type: bool} - fc_map: {value: {grav: 0.2, dfl: 0.9}, type: map} # additional parameters that don't relate to any plugin xbotcore_param: diff --git a/src/modular/modular_data/configs/low_level/hal/ModularBot_ec_all.yaml b/src/modular/modular_data/configs/low_level/hal/ModularBot_ec_all.yaml index 28337bf..b3c822a 100644 --- a/src/modular/modular_data/configs/low_level/hal/ModularBot_ec_all.yaml +++ b/src/modular/modular_data/configs/low_level/hal/ModularBot_ec_all.yaml @@ -14,17 +14,21 @@ xbotcore_devices: config_ec_imp: value: $PWD/../joint_config/ModularBot_impd4.yaml type: yamlfile + + config_ec_pos: + value: $PWD/../joint_config/ModularBot_pos3b.yaml + type: yamlfile joint_id_map: &jim value: $PWD/../../joint_map/ModularBot_joint_map.yaml type: yamlfile - imu_ec: - names: [] - thread: rt_main - params: - robot_name: *rn - joint_id_map: *jim + # imu_ec: + # names: [] + # thread: rt_main + # params: + # robot_name: *rn + # joint_id_map: *jim pow_ec: names: [] diff --git a/src/modular/modular_data/deploy.sh b/src/modular/modular_data/deploy.sh index 489e75e..746f19e 100755 --- a/src/modular/modular_data/deploy.sh +++ b/src/modular/modular_data/deploy.sh @@ -28,12 +28,15 @@ else export DESTINATION_FOLDER="$HOME/albero_xbot2_ws/robots" fi +QUIET='-q' + # read arguments while test $# -gt 0 do case "$1" in -[vV] | --verbose) # add verbosity VERBOSITY='-v' + unset QUIET printf "Verbose mode ${GREEN}ON${NC}\n" ;; -[dD] | --destination-folder) # add destination folder @@ -153,8 +156,8 @@ printf "${GREEN}[3/9] Deployed cartesio configs${NC}\n" # Deploy launch files mkdir -p ./launch # - cartesio.launch -cp $SCRIPT_ROOT/launch/cartesio.launch ./launch/ModularBot_cartesio.launch $VERBOSITY || end_exec -sed -i -e "s+PACKAGE_NAME+${package_name}+g" ./launch/ModularBot_cartesio.launch +#cp $SCRIPT_ROOT/launch/cartesio.launch ./launch/ModularBot_cartesio.launch $VERBOSITY || end_exec +#sed -i -e "s+PACKAGE_NAME+${package_name}+g" ./launch/ModularBot_cartesio.launch # - ModularBot_ik.launch cp $SCRIPT_ROOT/launch/ModularBot_ik.launch ./launch/ModularBot_ik.launch $VERBOSITY || end_exec sed -i -e "s+PACKAGE_NAME+${package_name}+g" ./launch/ModularBot_ik.launch @@ -183,7 +186,7 @@ printf "${GREEN}[4/9] Deployed ModularBot launch files${NC}\n" #cp -TRf $SCRIPT_ROOT/moveit_launch ./launch $VERBOSITY || end_exec #printf "${GREEN}[4.5/9] Deployed moveit configs and launch files${NC}\n" -# # Deply meshes +# # Deply meshes # #NOTE: currently meshes are not deployed and instead taken from the modular_resources or concert_resources packages # mkdir -p -p ./database/${package_name}_fixed_base # cp -TRf $SCRIPT_ROOT/../modular_resources/models ./database $VERBOSITY || end_exec @@ -214,9 +217,10 @@ sed -i -e "s+/tmp/ModularBot+package://${package_name}+g" ./urdf/ModularBot.gaze # sed -i -e "s+package://modular/src/modular/modular_resources/models/modular/meshes+package://${package_name}/database/modular/meshes+g" ./urdf/ModularBot.gazebo.urdf printf "${GREEN}[8/9] Deployed URDF${NC}\n" -# # Deploy gazebo model -# # - modular_world.sdf -# cp $SCRIPT_ROOT/database/ModularBot_fixed_base/ModularBot_world.sdf ./database/${package_name}_fixed_base/${package_name}_world.sdf $VERBOSITY || end_exec +# Deploy gazebo model +mkdir -p ./gazebo +# - modular_world.sdf +cp $SCRIPT_ROOT/database/ModularBot_fixed_base/ModularBot_world.sdf ./gazebo/${package_name}_world.sdf $VERBOSITY || end_exec # # - manifest.xml # cp $SCRIPT_ROOT/database/ModularBot_fixed_base/manifest.xml ./database/${package_name}_fixed_base/manifest.xml $VERBOSITY || end_exec # sed -i -e "s+PACKAGE_NAME+${package_name}+g" ./database/${package_name}_fixed_base/manifest.xml @@ -228,9 +232,15 @@ printf "${GREEN}[8/9] Deployed URDF${NC}\n" # # $DESTINATION_FOLDER/${package_name}/urdf/ModularBot.urdf > \ # # $DESTINATION_FOLDER/${package_name}/database/${package_name}_fixed_base/${package_name}.sdf \ # # || end_exec -# printf "${GREEN}[9/9] Deployed gazebo model${NC}\n" +printf "${GREEN}[9/9] Deployed gazebo model${NC}\n" + +# Deployment completed +printf "\n${GREEN}[ \xE2\x9C\x94 ] Package ${YELLOW}${package_name}${GREEN} succesfully deployed into ${YELLOW}$DESTINATION_FOLDER${NC}\n" + +# create Zip for download +zip -r $QUIET $VERBOSITY /tmp/${package_name}.zip ./* || end_exec +printf "${GREEN}[ \xE2\x9C\x94 ] Generated temporary zip file ${YELLOW}/tmp/${package_name}.zip${NC}\n\n" # All done popd > /dev/null #hide print -printf "\n${GREEN}[ \xE2\x9C\x94 ] Package ${YELLOW}${package_name}${GREEN} succesfully deployed into ${YELLOW}$DESTINATION_FOLDER${NC}\n\n" -unset DESTINATION_FOLDER VERBOSITY SCRIPT_ROOT RED PURPLE GREEN ORANGE YELLOW NC package_name +unset DESTINATION_FOLDER VERBOSITY QUIET SCRIPT_ROOT RED PURPLE GREEN ORANGE YELLOW NC package_name diff --git a/src/modular/modular_data/launch/ModularBot_gazebo.launch b/src/modular/modular_data/launch/ModularBot_gazebo.launch index 1d47a00..ad63a42 100644 --- a/src/modular/modular_data/launch/ModularBot_gazebo.launch +++ b/src/modular/modular_data/launch/ModularBot_gazebo.launch @@ -28,7 +28,7 @@ - + diff --git a/src/modular/modular_data/urdf/ModularBot.library.urdf.xacro b/src/modular/modular_data/urdf/ModularBot.library.urdf.xacro index 9ef39a5..2c0f3fc 100644 --- a/src/modular/modular_data/urdf/ModularBot.library.urdf.xacro +++ b/src/modular/modular_data/urdf/ModularBot.library.urdf.xacro @@ -52,6 +52,12 @@ + + + + + + @@ -160,6 +166,10 @@ + + + + @@ -177,6 +187,14 @@ + + + + + + + + @@ -185,8 +203,8 @@ - - + + @@ -219,7 +237,7 @@ - + @@ -262,21 +280,9 @@ - - - - - - - - - - - - - - - + + + @@ -301,24 +307,6 @@ - - - - - - - - - - - - - - - - - - @@ -450,8 +438,7 @@ - - + diff --git a/src/modular/modular_resources b/src/modular/modular_resources index fe03604..4546e75 160000 --- a/src/modular/modular_resources +++ b/src/modular/modular_resources @@ -1 +1 @@ -Subproject commit fe0360418d3057a76f95e9d7add9e38be613a356 +Subproject commit 4546e75f6990b521c2174433785f0f79d3bc378b diff --git a/src/modular/module_params.yaml b/src/modular/module_params.yaml index ad9b328..2ac29de 100644 --- a/src/modular/module_params.yaml +++ b/src/modular/module_params.yaml @@ -34,12 +34,18 @@ 1: # base cube module 2: #size PINO flange 0: master_cube.yaml # rev 0 + 2: # non-structural base cube module / albero-box + 0: # no size associated + 0: master_cube_non_structural.yaml # rev 0 3: # mobile base pwrboard 0: # no size associated 0: concert/mobile_platform_concert.json 4: # mobile base ecat hub 0: #no size associated - 0: concert/mobile_platform_concert.json + 0: concert/mobile_platform_concert_non_structural.json + 5: # Y module (torso) + 4: #size CONCERT arm flange + 0: concert/module_Y_torso_concert.json # ... 3: #end effector module @@ -66,26 +72,31 @@ 0: module_link_elbow_90.yaml # rev 0 3: #passive link 10 cm 2: #size PINO flange - 0: module_link_straight_10_fraunhofer.yaml + 0: module_link_straight_100_fraunhofer.json 4: #size CONCERT arm flange - 0: concert/module_link_straight_10_concert.json + 0: concert/module_link_straight_100_concert.json 4: #passive link 20 cm 2: #size PINO flange - 0: concert/module_link_straight_20_fraunhofer.json + 0: module_link_straight_200_fraunhofer.json 4: #size CONCERT arm flange - 0: concert/module_link_straight_20_concert.json + 0: concert/module_link_straight_200_concert.json 5: #passive link 50 cm 2: #size PINO flange - 0: concert/module_link_straight_50_fraunhofer.json + 0: module_link_straight_500_fraunhofer.json 4: #size CONCERT arm flange - 0: concert/module_link_straight_50_concert.json + 0: concert/module_link_straight_500_concert.json 6: #passive link 40 cm 4: #size CONCERT arm flange - 0: concert/module_link_straight_40_concert.json + 0: concert/module_link_straight_400_concert.json 7: #passive link 30 cm 4: #size CONCERT arm flange - 0: concert/module_link_straight_30_concert.json + 0: concert/module_link_straight_300_concert.json + + 8: #passive link elbow 45° + 4: #size CONCERT arm flange + 0: concert/module_link_elbow_45_concert.json + # ... 5: #wheel module diff --git a/src/modular/robot_id.yaml b/src/modular/robot_id.yaml index ec443c7..2a9656c 100644 --- a/src/modular/robot_id.yaml +++ b/src/modular/robot_id.yaml @@ -44,3 +44,9 @@ # 54: concert/module_joint_elbow_B_concert.json # A0245 # 55: concert/module_joint_yaw_B_concert.json # A0246 # 56: concert/module_joint_yaw_B_concert.json # A0247 + +# new manipulator joints +# 61: concert/module_joint_yaw_A_concert.json # A0276 +62: concert/module_joint_yaw_A_concert.json # A0285 +63: concert/module_joint_elbow_A_concert.json # A0286 +64: concert/module_joint_yaw_A_concert.json # A0287 diff --git a/src/modular/utils.py b/src/modular/utils.py index a7be592..34dbf66 100644 --- a/src/modular/utils.py +++ b/src/modular/utils.py @@ -3,34 +3,56 @@ import os import subprocess import io +import json +import re +from numbers import Number +from collections.abc import Sequence class ResourceFinder: + """Class to find resources in the package""" def __init__(self, config_file='config_file.yaml'): self.cfg = self.get_yaml(config_file) + self.resources_paths = self.get_all_resources_paths() + + def get_all_resources_paths(self): + resources_paths = [] + # Add internal resources path. By default the path to the resources is at cfg['resources_path'] + resources_paths.append(['resources_path']) + # Add external resources paths. The paths are mapped at cfg['external_resources'] + for path in self.nested_access(['external_resources']): + resources_paths.append(['external_resources', path]) + return resources_paths + def nested_access(self, keylist): + """Access a nested dictionary""" val = dict(self.cfg) for key in keylist: val = val[key] return val def get_expanded_path(self, relative_path): - expanded_dir = os.path.expanduser(self.nested_access(relative_path)) - expanded_dir = os.path.expandvars(expanded_dir) - if '$' in expanded_dir: - expanded_dir = expanded_dir[1:] + # Expand the home directory + expanded_path = os.path.expanduser(self.nested_access(relative_path)) + # Expand environment variables + expanded_path = os.path.expandvars(expanded_path) + def path_substitution(match): + # Get the command to execute: $(cmd) + cmd = re.search(r"\$\(([^\)]+)\)", match.group()).group(1) + # Return the output of the command + cmd_output = subprocess.check_output(cmd.split(), stderr=subprocess.DEVNULL).decode('utf-8').rstrip() + return cmd_output + try: + # The dollar sign is used to execute a command and get the output. What is inside the parenthesis is substituted with the output of the command: $(cmd) -> output of cmd + expanded_path = re.sub(r"\$\(([^\)]+)\)", path_substitution, expanded_path) + except (subprocess.CalledProcessError, TypeError): + msg = 'Executing ' + expanded_path + ' resulted in an error. Path substitution cannot be completed. Are the required environment variables set?' + raise RuntimeError(msg) - if (expanded_dir.startswith('{',) and expanded_dir.endswith('}')) or (expanded_dir.startswith('(',) and expanded_dir.endswith(')')): - expanded_dir = expanded_dir[1:-1] - - try: - expanded_dir = subprocess.check_output(expanded_dir.split(), stderr=subprocess.DEVNULL).decode('utf-8').rstrip() - except subprocess.CalledProcessError: - expanded_dir = '' - - return expanded_dir + return expanded_path def find_resource_path(self, resource_name, relative_path=None): + """Return a relative filesystem path for specified resource""" if relative_path: if 'external_resources' in relative_path: resource_path = self.find_external_resource_path(resource_name, relative_path) @@ -41,10 +63,12 @@ def find_resource_path(self, resource_name, relative_path=None): return resource_path def find_external_resource_path(self, resource_name, relative_path=None): + """Return a filesystem path for specified external resource""" resource_path = '/'.join((self.get_expanded_path(relative_path), resource_name)) return resource_path def find_resource_absolute_path(self, resource_name, relative_path=None): + """Return an absolute filesystem path for specified resource""" curr_dir = os.path.dirname(os.path.abspath(__file__)) if relative_path: if 'external_resources' in relative_path: @@ -57,12 +81,14 @@ def find_resource_absolute_path(self, resource_name, relative_path=None): @staticmethod def is_resource_external(relative_path=None): + """Does the relative path means this is an external resource?""" if relative_path: if 'external_resources' in relative_path: return True return False def get_string(self, resource_name, relative_path=None): + """Return specified resource as a string""" resource_package = __name__ resource_path = self.find_resource_path(resource_name, relative_path) if self.is_resource_external(relative_path): @@ -74,6 +100,7 @@ def get_string(self, resource_name, relative_path=None): return resource_string def get_stream(self, resource_name, relative_path=None): + """Return a readable file-like object for specified resource""" resource_package = __name__ resource_path = self.find_resource_path(resource_name, relative_path) if self.is_resource_external(relative_path): @@ -83,6 +110,7 @@ def get_stream(self, resource_name, relative_path=None): return resource_stream def get_filename(self, resource_name, relative_path=None): + """Return a true filesystem path for specified resource""" resource_package = __name__ resource_path = self.find_resource_path(resource_name, relative_path) if self.is_resource_external(relative_path): @@ -90,8 +118,42 @@ def get_filename(self, resource_name, relative_path=None): else: resource_filename = pkg_resources.resource_filename(resource_package, resource_path) return resource_filename + + def get_listdir(self, resource_name, relative_path=None): + """List the contents of the named resource directory""" + resource_package = __name__ + resource_path = self.find_resource_path(resource_name, relative_path) + if self.resource_exists(resource_name, relative_path): + if self.is_resource_external(relative_path): + resource_listdir = os.listdir(resource_path) + else: + resource_listdir = pkg_resources.resource_listdir(resource_package, resource_path) + else: + resource_listdir = [] + return resource_listdir + + def resource_exists(self, resource_name, relative_path=None): + """Does the named resource exist?""" + resource_package = __name__ + resource_path = self.find_resource_path(resource_name, relative_path) + if self.is_resource_external(relative_path): + resource_exists = os.path.exists(resource_path) # TODO: check if correct + else: + resource_exists = pkg_resources.resource_exists(resource_package, resource_path) + return resource_exists + + def resource_isdir(self, resource_name, relative_path=None): + """Is the named resource a directory?""" + resource_package = __name__ + resource_path = self.find_resource_path(resource_name, relative_path) + if self.is_resource_external(relative_path): + resource_isdir = os.path.isdir(resource_path) + else: + resource_isdir = pkg_resources.resource_isdir(resource_package, resource_path) + return resource_isdir def get_yaml(self, resource_name, relative_path=None): + """Load the yaml file specified resource and return it as a dict""" with self.get_stream(resource_name, relative_path) as stream: try: yaml_dict = yaml.safe_load(stream) @@ -99,3 +161,186 @@ def get_yaml(self, resource_name, relative_path=None): yaml_dict = {} print(exc) return yaml_dict + + def get_json(self, resource_name, relative_path=None): + """Load the json file specified resource and return it as a dict""" + with self.get_stream(resource_name, relative_path) as stream: + try: + json_dict = json.load(stream) + except json.JSONDecodeError as exc: + json_dict = {} + print(exc) + return json_dict + +class ModularResourcesManager: + def __init__(self, resource_finder): + self.resource_finder = resource_finder + + self.default_offset_values = {"x":0.0, "y":0.0, "z": 0.0, "roll":0.0, "pitch":0.0, "yaw":0.0} + # dictionary with the keys being the module name and the values being a dictionary specifing + # the default values for the keys x, y, z, roll, pitch, yaw + self.default_offsets_dict = {} + # dictionary with the keys being the module name and the values being a dictionary specifing + # the allowed values for the keys x, y, z, roll, pitch, yaw (or a subset of them) + self.allowed_offsets_dict = {} + + self.available_modules_dict = {} + self.available_modules_headers = [] + self.init_available_modules() + + self.available_families = [] + self.init_available_families() + + self.available_addons_dict = {} + self.available_addons_headers = [] + self.init_available_addons() + + def expand_listdir(self, starting_path, res_path): + """Expand listdir to include subdirectories recursively""" + listdir = self.resource_finder.get_listdir(starting_path, res_path) + list_to_remove = [] + list_to_add = [] + for el in listdir: + if self.resource_finder.resource_isdir(starting_path + '/' + el, res_path): + new_listdir = self.expand_listdir(starting_path + '/'+ el, res_path) + new_listdir = [el + '/' + new_el for new_el in new_listdir] + list_to_remove.append(el) + list_to_add += new_listdir + for el in list_to_remove: + listdir.remove(el) + listdir += list_to_add + return listdir + + def set_default_offset_values(self, name, offset_dict): + """ + Set the default offset values for the modules and addons + The offset_dict is a dictionary with the keys x, y, z, roll, pitch, yaw (or a subset of them) and the values can be numbers or sequences. + + - If the value a number, the user can set any value for the offset (default is the dictionary entry value). + - If the value is an empty list, the user can set any value for the offset (default is 0.0). + - If the value is a sequence of allowed elements. The first element of the sequence is the default value. + This elements can either be numbers or a dictionaries with the keys 'label' and 'value' to show a label in the GUI and its numerical value respectively. + + example (yaml format): + + offsets: + x: 0.1 + y: [] + yaw:[0, {label: "-π/2", value: -1.5707963267948966}] + """ + if not isinstance(offset_dict, dict): + return + + self.default_offsets_dict[name] = self.default_offset_values.copy() + self.allowed_offsets_dict[name] = {} + + for key in offset_dict: + # If the value is is a number, set the default value + if isinstance(offset_dict[key], Number): + self.default_offset_values[name][key]=float(offset_dict[key]) + + # if the value is a sequence, use the first element to set the default value + elif isinstance(offset_dict[key], Sequence) and len(offset_dict[key]) > 0: + # if the first element is a number, set it as the default value + if isinstance(offset_dict[key][0], Number): + self.default_offset_values[name][key]=float(offset_dict[key][0]) + + # if the first element is a dictionary, set the default value to the value of the key 'value' + elif isinstance(offset_dict[key], dict) and 'value' in offset_dict[key][0]: + self.default_offset_values[name][key]=float(offset_dict[key][0]["value"]) + + # store the allowed values in a separate dictionary + self.allowed_offsets_dict[name][key]=[] + for subkey in offset_dict[key]: + if isinstance(offset_dict[key][subkey], Number): + self.allowed_offsets_dict[name][key].append(float(offset_dict[key][subkey])) + if isinstance(subkey, dict) and 'value' in offset_dict[key][subkey]: + self.allowed_offsets_dict[name][key].append(float(offset_dict[key][subkey]['value'])) + + def get_default_offset_values(self, name): + """ + Get the default offset values for the modules and addons + return a dictionary with the keys x, y, z, roll, pitch, yaw and float values. + """ + if name in self.default_offsets_dict: + return self.default_offsets_dict[name] + return self.default_offset_values + + def get_allowed_offset_values(self, name): + """ + Get the allowed offset values for the modules and addons + return a dictionary with the keys x, y, z, roll, pitch, yaw (or a subset of them) and float values. + """ + if name in self.allowed_offsets_dict: + return self.allowed_offsets_dict[name] + return {} + + + def init_available_modules(self): + for res_path in self.resource_finder.resources_paths: + resource_names_list = ['yaml/' + el for el in self.expand_listdir('yaml', res_path)] + resource_names_list += ['json/' + el for el in self.expand_listdir('json', res_path)] + for res_name in resource_names_list: + if res_name.endswith('.json'): + res_dict = self.resource_finder.get_json(res_name, res_path) + self.available_modules_dict[res_dict['header']['name']] = res_dict + self.available_modules_headers.append(res_dict['header']) + if 'offset' in res_dict['header']: + self.set_default_offset_values(res_dict['header']['name'], res_dict['header']['offset']) + elif res_name.endswith('.yaml'): + res_dict = self.resource_finder.get_yaml(res_name, res_path) + self.available_modules_dict[res_dict['header']['name']] = res_dict + self.available_modules_headers.append(res_dict['header']) + if 'offset' in res_dict['header']: + self.set_default_offset_values(res_dict['header']['name'], res_dict['header']['offset']) + + def init_available_families(self): + for res_path in self.resource_finder.resources_paths: + if self.resource_finder.resource_exists('families.yaml', res_path): + self.available_families += (self.resource_finder.get_yaml('families.yaml', res_path)['families']) + + def init_available_addons(self): + for res_path in self.resource_finder.resources_paths: + resource_names_list = ['module_addons/yaml/' + el for el in self.expand_listdir('module_addons/yaml', res_path)] + resource_names_list += ['module_addons/json/' + el for el in self.expand_listdir('module_addons/json', res_path)] + for res_name in resource_names_list: + if res_name.endswith('.json'): + res_dict = self.resource_finder.get_json(res_name, res_path) + self.available_addons_dict[res_dict['header']['name']] = res_dict + self.available_addons_headers.append(res_dict['header']) + elif res_name.endswith('.yaml'): + res_dict = self.resource_finder.get_yaml(res_name, res_path) + self.available_addons_dict[res_dict['header']['name']] = res_dict + self.available_addons_headers.append(res_dict['header']) + + def get_available_modules(self): + return self.available_modules_headers + + def get_available_modules_dict(self): + return self.available_modules_dict + + def get_available_module_types(self): + module_types = [el['type'] for el in self.available_modules_headers] + return list(dict.fromkeys(module_types)) + + def get_available_families(self): + return self.available_families + + def get_available_family_ids(self): + family_ids = [el['id'] for el in self.available_families] + return list(dict.fromkeys(family_ids)) + + def get_available_family_groups(self): + family_groups = [el['group'] for el in self.available_families] + return list(dict.fromkeys(family_groups)) + + def get_available_addons(self): + return self.available_addons_headers + + def get_available_addons_dict(self): + return self.available_addons_dict + + def get_available_addon_types(self): + addon_types = [el['type'] for el in self.available_addons_headers] + return list(dict.fromkeys(addon_types)) + \ No newline at end of file diff --git a/src/modular/web/RobotDesignStudio.py b/src/modular/web/RobotDesignStudio.py index 1fa6c3c..eb0fd25 100755 --- a/src/modular/web/RobotDesignStudio.py +++ b/src/modular/web/RobotDesignStudio.py @@ -3,32 +3,84 @@ # see https://pylint.pycqa.org/en/latest/user_guide/messages/message_control.html#block-disables # pylint: disable=logging-too-many-args # pylint: disable=protected-access, global-statement, broad-except, unused-variable -# pylint: disable=line-too-long, missing-function-docstring +# pylint: disable=line-too-long, missing-function-docstring, missing-module-docstring +# pylint: disable=wrong-import-position +# pylint: disable=import-error # import yaml import json import os import logging import sys +import re +import argparse +import subprocess from importlib import reload, util +from configparser import ConfigParser, ExtendedInterpolation +from typing import TypedDict +from datetime import datetime, timedelta +from uuid import uuid4 + +import numpy as np import rospy -from flask import Flask, Response, render_template, request, jsonify, send_from_directory, abort -from flask.logging import create_logger -import zmq +from flask import Flask, Response, render_template, request, jsonify, send_from_directory, abort, session, send_file +from apscheduler.schedulers.background import BackgroundScheduler import werkzeug from modular.URDF_writer import UrdfWriter +import modular.ModuleNode as ModuleNode +from modular.enums import ModuleClass + ec_srvs_spec = util.find_spec('ec_srvs') if ec_srvs_spec is not None: - from ec_srvs.srv import GetSlaveInfo, GetSlaveInfoRequest, GetSlaveInfoResponse + from ec_srvs.srv import GetSlaveInfo + + +# get backend version from git +try: + backend_version = subprocess.check_output(['git', 'describe', '--abbrev=1', '--always', '--dirty'], cwd=os.path.dirname(__file__)).decode().strip() +except subprocess.CalledProcessError as e: + backend_version = 'Unknown' + +# get fronetend version from manisfest file +frontend_version = 'Unknown' +manifest_path = os.path.join(os.path.dirname(__file__), 'modular_frontend', 'manifest.json') +with open(manifest_path) as f: + manifest_data = json.load(f) + if 'version' in manifest_data: + frontend_version = manifest_data['version'] + elif 'version_name' in manifest_data: + frontend_version = manifest_data['version_name'] + + +parser = argparse.ArgumentParser(prog='robot-design-studio', description='Robot Design Studio server') +parser.add_argument('-d', '--debug', required=False, action='store_true', default=False) +parser.add_argument('-v', '--verbose', required=False, action='store_true', default=False) +parser.add_argument('--use_ros_logger', required=False, action='store_true', default=False) +parser.add_argument('--slave_desc_mode', required=False, choices=('use_ids', 'use_pos'), default='use_pos') + +# parse only known args, see https://stackoverflow.com/a/59067873/22225741 +args = parser.parse_known_args()[0] + +# import custom server config (if any) +base_path, _ = os.path.split(__file__) +config = ConfigParser(interpolation=ExtendedInterpolation(), allow_no_value=True) +config.read(os.path.join(base_path, 'web_config.ini')) +host = config.get('MODULAR_SERVER', 'host', fallback='0.0.0.0') +port = config.getint('MODULAR_SERVER','port',fallback=5003) +gui_route = config.get('MODULAR_API','gui_route',fallback='') +api_base_route = config.get('MODULAR_API','base_route',fallback='') +secret_key = config.get('MODULAR_API','secret_key',fallback='secret_key') +enable_sessions = config.getboolean('MODULAR_API','enable_sessions',fallback=False) +enable_discovery = config.getboolean('MODULAR_API','enable_discovery',fallback=True) +download_on_deploy = config.getboolean('MODULAR_API','download_on_deploy',fallback=False) # initialize ros node rospy.init_node('robot_builder', disable_signals=True) # , log_level=rospy.DEBUG) # set if ROS logger should be used -use_ros_logger = False -if use_ros_logger: +if args.use_ros_logger: # roslogger = logging.getLogger('rosout') roslogger = logging.getLogger(f'rosout.{__name__}') logger = roslogger @@ -44,27 +96,28 @@ werkzeug_logger = logging.getLogger('werkzeug') # set verbosity levels -verbose=False -if verbose: +if args.verbose: logger.setLevel(logging.DEBUG) logger.debug('Starting server') werkzeug_logger.setLevel(logging.INFO) else: logger.setLevel(logging.INFO) werkzeug_logger.setLevel(logging.ERROR) - + + +template_folder='modular_frontend' +static_folder = 'modular_frontend' # '/static' +static_url_path = '' # determine if it's running on a Pyinstaller bundle if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'): - template_folder = os.path.join(sys._MEIPASS, 'modular/web/templates') - static_folder = os.path.join(sys._MEIPASS, 'modular/web/static') + template_folder = os.path.join(sys._MEIPASS, 'modular/web',template_folder) + static_folder = os.path.join(sys._MEIPASS, 'modular/web',static_folder) is_pyinstaller_bundle=True else: - static_folder='static' - template_folder='templates' - static_url_path='' is_pyinstaller_bundle=False -app = Flask(__name__, static_folder=static_folder, template_folder=template_folder, static_url_path='') +app = Flask(__name__, static_folder=static_folder, template_folder=template_folder, static_url_path=static_url_path) +app.secret_key = secret_key app.logger = logger if is_pyinstaller_bundle: @@ -74,335 +127,986 @@ app.logger.debug(static_folder) else: app.logger.debug('running in a normal Python process') - + urdfwriter_kwargs_dict={ - 'verbose': verbose, - 'logger': logger + 'verbose': args.verbose, + 'logger': logger, + 'slave_desc_mode': args.slave_desc_mode } -# Instance of UrdfWriter class -urdf_writer = UrdfWriter(**urdfwriter_kwargs_dict) -# 2nd instance of UrdfWriter class for the robot got from HW -urdf_writer_fromHW = UrdfWriter(**urdfwriter_kwargs_dict) +class SessionData(TypedDict): + # Instance of UrdfWriter class + urdf_writer: UrdfWriter + # 2nd instance of UrdfWriter class for the robot got from HW + urdf_writer_fromHW: UrdfWriter + # Flags defining which mode are in + building_mode_ON: bool + # Last time the session was updated + last_updated: datetime -# Flags defining which mode are in -building_mode_ON = True +# dictionary of sessions data +# sessions:dict[str, SessionData] = {} +sessions = {} -# load view_urdf.html -@app.route('/') -def index(): - return render_template('view_urdf.html') - -@app.route('/test') -def test(): - return render_template('test.html') - - -# call URDF_writer.py to modify the urdf -@app.route('/changeURDF/', methods=['POST']) -def changeURDF(): - filename = request.form.get('module_name', 0) - app.logger.debug(filename) - parent = request.form.get('parent', 0) - app.logger.debug(parent) - offset = float(request.form.get('angle_offset', 0)) - app.logger.debug(offset) - reverse = True if request.form.get('reverse', 0) == 'true' else False - app.logger.debug(reverse) - data = urdf_writer.add_module(filename, offset, reverse) - data = jsonify(data) - return data - -# call URDF_writer.py to modify the urdf -@app.route('/addWheel/', methods=['POST']) -def addWheel(): - wheel_filename = request.form.get('wheel_module_name', 0) - app.logger.debug(wheel_filename) - steering_filename = request.form.get('steering_module_name', 0) - app.logger.debug(steering_filename) - parent = request.form.get('parent', 0) - app.logger.debug(parent) - offset = float(request.form.get('angle_offset', 0)) - app.logger.debug(offset) - reverse = True if request.form.get('reverse', 0) == 'true' else False - app.logger.debug(reverse) - wheel_data, steering_data = urdf_writer.add_wheel_module(wheel_filename, steering_filename, offset, reverse) - data = jsonify(wheel_data) - return data - - -@app.route('/writeURDF/', methods=['POST']) -def writeURDF(): - global building_mode_ON - #string = request.form.get('string', 0) - # app.logger.debug(string) - # app.logger.debug (building_mode_ON) - app.logger.debug('jointMap') - json_jm = request.form.get('jointMap', 0) - app.logger.debug(json_jm) - builder_jm = json.loads(json_jm) - building_mode_ON = True if request.form.get('buildingModeON', 0) == 'true' else False - if building_mode_ON : - data = urdf_writer.write_urdf() - srdf = urdf_writer.write_srdf(builder_jm) - app.logger.debug(srdf) - joint_map = urdf_writer.write_joint_map() - lowlevel_config = urdf_writer.write_lowlevel_config() - # probdesc = urdf_writer.write_problem_description() - probdesc = urdf_writer.write_problem_description_multi() - # cartesio_stack = urdf_writer.write_cartesio_stack() - else: - data = urdf_writer_fromHW.write_urdf() - srdf = urdf_writer_fromHW.write_srdf(builder_jm) - app.logger.debug(srdf) - joint_map = urdf_writer_fromHW.write_joint_map(use_robot_id=True) - lowlevel_config = urdf_writer_fromHW.write_lowlevel_config(use_robot_id=True) - # probdesc = urdf_writer_fromHW.write_problem_description() - probdesc = urdf_writer_fromHW.write_problem_description_multi() - # cartesio_stack = urdf_writer_fromHW.write_cartesio_stack() - # app.logger.debug("\nSRDF\n") - # app.logger.debug(srdf) - # app.logger.debug("\nJoint Map\n") - # app.logger.debug(joint_map) - # app.logger.debug("\nCartesIO stack\n") - # app.logger.debug(cartesio_stack) - # data = jsonify(data) - return data - - -# call URDF_writer.py to add another master cube -@app.route('/addMasterCube/', methods=['POST']) -def addCube(): - filename = request.form.get('module_name', 0) - app.logger.debug(filename) - parent = request.form.get('parent', 0) - app.logger.debug(parent) - offset = float(request.form.get('angle_offset', 0)) - app.logger.debug(offset) - data = urdf_writer.add_slave_cube(offset) - data = jsonify(data) - return data - -# call URDF_writer.py to add another master cube -@app.route('/addMobilePlatform/', methods=['POST']) -def addMobilePlatform(): - filename = request.form.get('module_name', 0) - app.logger.debug(filename) - parent = request.form.get('parent', 0) - app.logger.debug(parent) - offset = float(request.form.get('angle_offset', 0)) - app.logger.debug(offset) - data = urdf_writer.add_mobile_platform(offset) - data = jsonify(data) - return data - - -# call URDF_writer.py to add another socket -@app.route('/addSocket/', methods=['POST']) -def addSocket(): - values = json.loads(request.form.get('values')) - offset = values['offset'] - app.logger.debug(offset) - angle_offset = values['angle_offset'] - app.logger.debug(angle_offset) - - global building_mode_ON - - building_mode_ON = True if request.form.get('buildingModeON', 0) == 'true' else False - - if building_mode_ON : - data = urdf_writer.add_socket(float(offset.get('x_offset')), float(offset.get('y_offset')), - float(offset.get('z_offset')), float(angle_offset)) - else: - data = urdf_writer_fromHW.move_socket("L_0_B", float(offset.get('x_offset')), float(offset.get('y_offset')), - float(offset.get('z_offset')), float(angle_offset)) - data = jsonify(data) - return data +def cleanup(): + now = datetime.now() + expired_sessions = [sid for sid, session_data in sessions.items() if now - session_data['last_updated'] > timedelta(minutes=30)] + for sid in expired_sessions: + del sessions[sid] +scheduler = BackgroundScheduler(daemon=True) +scheduler.add_job(cleanup, 'interval', minutes=30) +scheduler.start() -#TODO: to be included in the next versions -# call URDF_writer.py to move socket. TODO: remove hard-code of L_0_B socket for AutomationWare demo -@app.route('/moveSocket/', methods=['POST']) -def moveSocket(): - values = json.loads(request.form.get('values')) - app.logger.debug(values) - offset = values['offset'] - app.logger.debug(offset) - angle_offset = values['angle_offset'] - app.logger.debug(angle_offset) - data = urdf_writer_fromHW.move_socket("L_0_B", float(offset.get('x_offset')), float(offset.get('y_offset')), - float(offset.get('z_offset')), float(angle_offset)) - data = jsonify(data) - return data +def get_writer(sid:str) -> UrdfWriter: + if sid not in sessions: + raise 'No session found, refresh the page to start a new one' + if sessions[sid]['building_mode_ON'] : + return sessions[sid]['urdf_writer'] + else: + return sessions[sid]['urdf_writer_fromHW'] -# call URDF_writer.py to remove the last module -@app.route('/removeModule/', methods=['POST']) -def remove(): - parent = request.form.get('parent', 0) - data = urdf_writer.remove_module() - data = jsonify(data) - return data +def get_building_mode_ON(sid:str) -> bool: + if sid not in sessions: + raise 'No session found, refresh the page to start a new one' + return sessions[sid]['building_mode_ON'] +# load view_urdf.html +@app.route(f'{gui_route}/', methods=['GET']) +def index(): + if enable_sessions : + if'session_id' not in session: + session['session_id'] = str(uuid4()) + sid = session['session_id'] + else: + sid = 'default' + + if sid not in sessions: + sessions[sid] = SessionData( + urdf_writer= UrdfWriter(**urdfwriter_kwargs_dict), + urdf_writer_fromHW= UrdfWriter(**urdfwriter_kwargs_dict), + building_mode_ON= True, + last_updated= datetime.now(), + ) + + return render_template('index.html') + +# Get workspace mode +@app.route(f'{api_base_route}/mode', methods=['GET']) +def getMode(): + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True + + building_mode_ON=get_building_mode_ON(sid) + mode = 'Build' if building_mode_ON else 'Discover' + return jsonify({'mode': mode}), 200 + +# Get info about dicovery mode status +@app.route(f'{api_base_route}/mode/discovery', methods=['GET']) +def getDiscoveryStatus(): + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True -# update "last module" (and so shown buttons) when clicking on it -@app.route('/updateLastModule/', methods=['POST']) -def accessModule(): - parent = request.form.get('parent', 0) - data = urdf_writer.select_module_from_name(parent) - data = jsonify(data) - return data + try: + return Response( + status=200, + response=json.dumps({ 'available': enable_discovery}), + ) + except Exception as e: + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) +# Change mode and reset +# Request payload: +# - mode: [string]: "Build" or "Discover" +@app.route(f'{api_base_route}/mode', methods=['POST']) +def setMode(): + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True -#TODO: to be included in the next versions -# upload a URDF file and display it -@app.route('/openFile/', methods=['POST']) -def openFile(): - file_str = request.form.get('file', 0) - app.logger.debug(file_str) - data = urdf_writer.read_file(file_str) - app.logger.debug('data: %s', data) - data = jsonify(data) + try: + # Get the state of the toggle switch. Convert the boolean from Javascript to Python + mode = request.get_json()['mode'] + if mode!='Build' and mode!= 'Discover': + raise ValueError(f"Illegal value for mode: exprected 'Build' or 'Discover' but found {mode}.") + + sessions[sid]['building_mode_ON'] = mode == 'Build' + app.logger.debug(sessions[sid]['building_mode_ON']) + + # Re-initialize the two object instances + sessions[sid]['urdf_writer'].reset(**urdfwriter_kwargs_dict) + sessions[sid]['urdf_writer_fromHW'].reset(**urdfwriter_kwargs_dict) + + app.logger.info("Switched workspace mode to '%s'", mode) + return Response(status=204) + + except ValueError as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=400, + mimetype="application/json" + ) + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +# Get details about the current version of the app +@app.route(f'{api_base_route}/info', methods=['GET']) +def getInfo(): + """Get details about the current version of the app""" + try: + return Response( + status=200, + response=json.dumps({ "backend_version": backend_version, + "frontend_version": frontend_version }), + ) + except Exception as e: + # validation failed + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +# Get a list of the available modules +@app.route(f'{api_base_route}/resources/modules', methods=['GET']) +def resources_modules_get(): + """Get available modules + + :param families: Optionally the returned list can be filtered by their family of module. + :type families: List[str] + :param types: Optionally the returned list can filter results by their type of module. + :type types: List[str] + + :rtype: List[ModuleBase] + """ + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True + + query_params = request.args + try: + # Get the right writer instance depending on the mode + writer = get_writer(sid) + + #get complete list + modules = writer.modular_resources_manager.get_available_modules() + + # filter by family (from query params) + valid_families = writer.modular_resources_manager.get_available_family_ids() + + filter_families = query_params.getlist('families[]') + for t in filter_families: + if t not in valid_families: + raise ValueError(f"Illegal value for filter families: expected one of {valid_families} but found '{t}'.") + if len(filter_families) > 0: + modules = [el for el in modules if el['family'] in filter_families] + + # filter by type (from query params) + valid_types = writer.modular_resources_manager.get_available_module_types() + filter_types = query_params.getlist('types[]') + for t in filter_types: + if t not in valid_types: + raise ValueError(f"Illegal value for filter types: expected one of {valid_types} but found '{t}'.") + if len(filter_types) > 0: + modules = [el for el in modules if el['type'] in filter_types] + + # return filtered list + return Response( + response=json.dumps({"modules": modules}), + status=200, + mimetype="application/json" + ) + + except ValueError as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=400, + mimetype="application/json" + ) + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +# Get a list of the module types that can currently be added to the model. +@app.route(f'{api_base_route}/resources/modules/allowed', methods=['GET']) +def resources_modules_allowed_get(): + """Get a list of the module types that can currently be added to the model. + + :param ids: Optionally, you can provide one or more IDs of modules. (Currently not supported) + :type ids: List[str] + + :rtype: List[str] + """ + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True + + query_params = request.args + try: + # Get the right writer instance depending on the mode + writer = get_writer(sid) + building_mode_ON=get_building_mode_ON(sid) + + # get complete list of modules + # modules = writer.modular_resources_manager.get_available_modules() + + ids = query_params.getlist('ids[]') + if len(ids)>1: + return Response( + response=json.dumps({"message": 'Use of multiple ids at once is currently not supported'}), + status=501, + mimetype="application/json" + ) + elif len(ids)==1: + parent_type = writer.parent_module.type + + if building_mode_ON: + valid_types = writer.modular_resources_manager.get_available_module_types() + else: + # TODO: this list should come from a config file + valid_types = ['end_effector', 'interface_adapter'] + + + return Response( + response=json.dumps({"type": valid_types}), + status=200, + mimetype="application/json" + ) + + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +# Get a list of the available module addons +@app.route(f'{api_base_route}/resources/addons', methods=['GET']) +def resources_addons_get(): + """Get available addons + + :param families: Optionally the returned list can be filtered by their family of addons. + :type families: List[str] + :param types: Optionally the returned list can filter results by their type of addons. + :type types: List[str] + + :rtype: List[ModuleAddonsBase] + """ + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True + + query_params = request.args + try: + # Get the right writer instance depending on the mode + writer = get_writer(sid) + building_mode_ON=get_building_mode_ON(sid) + + #get complete list + addons = writer.modular_resources_manager.get_available_addons() + + # filter by family (from query params) + valid_families = writer.modular_resources_manager.get_available_family_ids() + + filter_families = query_params.getlist('families[]') + for t in filter_families: + if t not in valid_families: + raise ValueError(f"Illegal value for filter families: expected one of {valid_families} but found '{t}'.") + if len(filter_families) > 0: + addons = [el for el in addons if el['family'] in filter_families] + + # filter by type (from query params) + valid_types = writer.modular_resources_manager.get_available_addon_types() + filter_types = query_params.getlist('types[]') + for t in filter_types: + if t not in valid_types: + raise ValueError(f"Illegal value for filter types: expected one of {valid_types} but found '{t}'.") + if len(filter_types) > 0: + addons = [el for el in addons if el['type'] in filter_types] + + # return filtered list + return Response( + response=json.dumps({"addons": addons}), + status=200, + mimetype="application/json" + ) + + except ValueError as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=400, + mimetype="application/json" + ) + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +# Get a list of the available families of modules +@app.route(f'{api_base_route}/resources/families', methods=['GET']) +def resources_families_get(): + """Get a list of families of the available modules + + :param families: Optionally the returned list can be filtered by their family of module. + :type families: List[str] + :param groups: Optionally the returned list can filter results by their gruop. + :type groups: List[str] + + :rtype: List[ModuleFamilies] + """ + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True + + query_params = request.args + try: + # Get the right writer instance depending on the mode + writer = get_writer(sid) + building_mode_ON=get_building_mode_ON(sid) + + #get complete list + families = writer.modular_resources_manager.get_available_families() + + # filter by family (from query params) + valid_families = writer.modular_resources_manager.get_available_family_ids() + filter_families = query_params.getlist('families') + for t in filter_families: + if t not in valid_families: + raise ValueError(f"Illegal value for filter families: expected one of {valid_families} but found '{t}'.") + if len(filter_families) > 0: + families = [el for el in families if el['family'] in filter_families] + + # filter by group (from query params) + valid_groups = writer.modular_resources_manager.get_available_family_groups() + filter_groups = query_params.getlist('groups') + for t in filter_groups: + if t not in valid_groups: + raise ValueError(f"Illegal value for filter groups: expected one of {valid_groups} but found '{t}'.") + if len(filter_groups) > 0: + families = [el for el in families if el['group'] in filter_groups] + + # return filtered list + return Response( + response=json.dumps({"families": families}), + status=200, + mimetype="application/json" + ) + + except ValueError as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=400, + mimetype="application/json" + ) + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +# Validate the offsets provided by the user +def validate_offsets(writer, filename, offsets): + default_offsets = writer.modular_resources_manager.get_default_offset_values(filename) + allowed_offsets = writer.modular_resources_manager.get_allowed_offset_values(filename) + + # Analyze provided offsets and fill empty values + for key in ['x', 'y', 'z', 'roll', 'pitch', 'yaw']: + # if empty use default value + if key not in offsets: + offsets[key] = default_offsets[key] + + #otherwise the offset value must comply with the definition (when applicable) + elif key in allowed_offsets and offsets[key] not in allowed_offsets[key]: + raise ValueError('Offset value for '+key+' is inconsistent with the definition provided in'+filename+'!') + + return offsets + +@app.route(f'{api_base_route}/model/urdf/modules', methods=['POST']) +def addNewModule(): + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True + + req = request.get_json() + try: + writer = get_writer(sid) + building_mode_ON=get_building_mode_ON(sid) + + if building_mode_ON: + valid_types = writer.modular_resources_manager.get_available_module_types() + else: + # TODO: this list should come from a config file + valid_types = ['end_effector', 'interface_adapter'] + + if req['type'] not in valid_types: + return Response( + response=json.dumps({"message": f"In {'Build' if building_mode_ON else 'Discovery'} mode, modules of type {req['type']} cannot be added"}), + status=409, + mimetype="application/json" + ) + + + filename = req['name'] + app.logger.debug(filename) + + parent = req['parent'] if 'parent' in req else None + app.logger.debug(parent) + + # We update the selected module to the one selected in the GUI. If no module is selected, we don't update it, since the BE will keep track of the current parent + if parent: + writer.select_module_from_name(parent, None) + + offsets_requested = req['offsets_requested'] if 'offsets_requested' in req else {} # we use RPY notation + offsets_requested = validate_offsets(writer, filename, offsets_requested) + app.logger.debug(offsets_requested) + + reverse = True if 'reverse' in req and req['reverse'] == 'true' else False + app.logger.debug(reverse) + + addons = req['addons'] if 'addons' in req else [] + app.logger.debug(addons) + + module_data = writer.add_module(filename, offsets_requested, reverse, addons) + + return Response(response=json.dumps({'id': module_data['selected_connector'], + 'meshes': module_data['selected_meshes']}), + status=200, + mimetype="application/json") + + except ValueError as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=400, + mimetype="application/json" + ) + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +def writeRobotURDF(building_mode_ON, writer, builder_jm): + data = writer.write_urdf() + srdf = writer.write_srdf(builder_jm) + app.logger.debug(srdf) + if building_mode_ON : + joint_map = writer.write_joint_map() + lowlevel_config = writer.write_lowlevel_config() + else: + joint_map = writer.write_joint_map(use_robot_id=True) + lowlevel_config = writer.write_lowlevel_config(use_robot_id=True) + # probdesc = writer.write_problem_description() + probdesc = writer.write_problem_description_multi() + # cartesio_stack = writer.write_cartesio_stack() + + app.logger.debug("\nSRDF\n") + app.logger.debug(srdf) + app.logger.debug("\nJoint Map\n") + app.logger.debug(joint_map) + # app.logger.debug("\nCartesIO stack\n") + # app.logger.debug(cartesio_stack) return data - # request the urdf generated from the currently stored tree -@app.route('/requestURDF/', methods=['POST']) -def requestURDF(): - # building_mode_on_str = request.form.get('mode', 0) - # app.logger.debug(building_mode_on_str) - urdf_string = urdf_writer.process_urdf() - data = {'string': urdf_string} - app.logger.debug('data: %s', data) - data = jsonify(data) - return data +@app.route(f'{api_base_route}/model/urdf', methods=['GET']) +def getURDF(): + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True -# NOTE: this should not be needed anymore! Setting the static folder in the app constructor should be enough -# # upload on the server the /static folder -# @app.route('/') -# def send_file(path): -# return send_from_directory(app.static_folder, path) + try: + # Get the right writer instance depending on the mode + writer = get_writer(sid) + urdf_string = writer.urdf_string + + # replace path for remote access of STL meshes that will be served with '/meshes/' route + frontend_urdf_string = re.sub(r"(package:/)(/[^/]+)(/.*)", fr"\1{api_base_route}/resources/meshes\3", urdf_string) + + return Response( + response=frontend_urdf_string, + status=200, + mimetype='application/xml' + ) + except Exception as e: + # validation failed + app.logger.error( f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +# upload on the server the /modular_resources folder and the ones under cfg['esternal_resources'] +# This is needed to load the meshes of the modules (withot the need to put them in the /static folder) +@app.route(f'{api_base_route}/resources/meshes/', methods=['GET']) +def get_resources_meshes_file(path): + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True + # Get the right writer instance depending on the mode + writer = get_writer(sid) -# upload on the server the /modular_resources folder. -# This is needed to load the meshes of the modules (withot the need to put them in the /static folder) -@app.route('/modular_resources/') -def send_file(path): resources_paths = [] - resources_paths += [urdf_writer.resource_finder.find_resource_absolute_path('', ['resources_path'])] - - # upload also external resources (concert_resources, etc.) - external_paths_dict = urdf_writer.resource_finder.nested_access(['external_resources']) - external_paths = [ urdf_writer.resource_finder.get_expanded_path(['external_resources', p]) for p in external_paths_dict] - resources_paths += external_paths + for res_path in writer.resource_finder.resources_paths: + resources_paths += [writer.resource_finder.find_resource_absolute_path('', res_path)] - # if isinstance(resources_path, str): - # return send_from_directory(resources_path, path) - # else: - for res_path in resources_paths: + for res_path in resources_paths: try: return send_from_directory(res_path, path) except werkzeug.exceptions.NotFound: continue abort(404) - -#TODO: to be included in the next versions (requires ROS etc.) # send a request to the poller thread to get ECat topology and synchronize with hardware -@app.route('/syncHW/', methods=['POST']) -def syncHW(): +@app.route(f'{api_base_route}/model/urdf', methods=['PUT']) +def generateUrdfModelFromHardware(): + if not enable_discovery: + return Response( + response=json.dumps({"message": 'Robot discovery is disabled.'}), + status=409, + mimetype="application/json" + ) + srv_name = '/ec_client/get_slaves_description' - rospy.wait_for_service(srv_name) + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True + building_mode_ON = get_building_mode_ON(sid) + + if building_mode_ON: + return Response( + response=json.dumps({"message": 'Cannot generate model from connected hardware in Building mode.'}), + status=409, + mimetype="application/json" + ) try: - slave_description = rospy.ServiceProxy(srv_name, GetSlaveInfo) # pylint: disable=undefined-variable + rospy.wait_for_service(srv_name, 5) - except rospy.ServiceException as e: - app.logger.debug("Service call failed: %s",e) + try: + slave_description = rospy.ServiceProxy(srv_name, GetSlaveInfo) # pylint: disable=undefined-variable + + except rospy.ServiceException as e: + app.logger.debug("Service call failed: %s",e) + raise e + + reply = slave_description() + reply = reply.cmd_info.msg + app.logger.debug("Exit") + + writer = get_writer(sid) + writer.read_from_json(reply) + if writer.verbose: + writer.render_tree() + + return Response(status=204) + + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +def getModulesMap(sid:str): + chains=[] + + writer = get_writer(sid) + chains = writer.listofchains + + module_map={} + for chain in chains: + for el in chain: + try: + module_map[el.name] = ModuleNode.as_dumpable_dict(el.header) + except AttributeError as e: + continue + return module_map + +def getJointMap(sid:str): + chains=[] + + writer = get_writer(sid) + chains = writer.get_actuated_modules_chains() + + joint_map={} + for chain in chains: + for el in chain: + if el.type in ModuleClass.actuated_modules(): + try: + joint_name = writer.get_joint_name(el) + joint_data = { + 'type': el.actuator_data.type, # revolute, continuos, prismatic, etc. + 'value': 0.0, # homing position + 'min': el.actuator_data.lower_limit, # lower limit + 'max': el.actuator_data.upper_limit # upper limit + } + joint_map[joint_name] = joint_data + except AttributeError as e: + continue + return joint_map + +# get map of modules of robot: module_name -> module_data (header) +@app.route(f'{api_base_route}/model/urdf/modules/map', methods=['GET']) +def getModelModules(): + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True - reply = slave_description() - reply = reply.cmd_info.msg - app.logger.debug("Exit") + try: + ids = request.args.getlist('ids[]') + + module_map = getModulesMap(sid) + + if len(ids)==0: + filtered_module_map = module_map # if no ids are provided, return all modules + else: + filtered_module_map = {key: module_map[key] for key in ids} # filter modules by ids + + return Response( + response=json.dumps(filtered_module_map), + status=200, + mimetype="application/json" + ) + + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +# get map of joints of robot: joint_name -> joint_data (type, value, min, max) +@app.route(f'{api_base_route}/model/urdf/joints/map', methods=['GET']) +def getModelJointMap(): + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True - data = urdf_writer_fromHW.read_from_json(reply) - # data = urdf_writer_fromHW.read_from_json_alt(reply) - if urdf_writer_fromHW.verbose: - urdf_writer_fromHW.render_tree() - app.logger.debug('data: %s', data) - data = jsonify(data) - return data + try: + joint_map = getJointMap(sid) + + return Response( + response=json.dumps(joint_map), + status=200, + mimetype="application/json" + ) + + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +# Get the id of the module associated to a mesh and the list of all meshes associated to a module +@app.route(f'{api_base_route}/model/urdf/modules/meshes', methods=['GET']) +def module_meshes_get(): + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True + + writer = get_writer(sid) + mesh_ids = request.args.getlist('ids[]') + + if len(mesh_ids)>1: + return Response( + response=json.dumps({"message": 'Only one id at a time should be provided'}), + status=501, + mimetype="application/json" + ) + elif len(mesh_ids)==1: + mesh_id = mesh_ids[0] + # From the name of the mesh clicked on the GUI select the module associated to it + # Also sets the selected_connector to the one associated to the mesh + associated_module_data = writer.select_module_from_name(mesh_id, None) + + return Response(response=json.dumps({'id': associated_module_data['selected_connector'], + 'meshes': associated_module_data['selected_meshes']}), + status=200, + mimetype="application/json") +# call URDF_writer.py to remove the last module +@app.route(f'{api_base_route}/model/urdf/modules', methods=['DELETE']) +def removeModules(): + """Delete one or more modules from the robot model. By default it removes the last element. + + :param ids: Optionally, you can provide one or more IDs of modules to remove. (Currently not supported) + :type ids: List[str] + """ + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True + building_mode_ON=get_building_mode_ON(sid) + + if not building_mode_ON: + return Response( + response=json.dumps({"message": 'Cannot delete modules in Discovery mode.'}), + status=409, + mimetype="application/json" + ) -# Change mode and reset -@app.route('/changeMode/', methods=['POST']) -def changeMode(): - global building_mode_ON - - # Get the state of the toggle switch. Convert the boolean from Javascript to Python - building_mode_ON = True if request.form.get('buildingModeON', 0) == 'true' else False + try: + # Get the right writer instance depending on the mode + writer = get_writer(sid) + + ids = request.args.getlist('ids[]') + if len(ids)>1: + return Response( + response=json.dumps({"message": 'Deletion of multiple ids at once is currently not supported'}), + status=501, + mimetype="application/json" + ) + elif len(ids)==1: + writer.select_module_from_name(ids[0], None) + father_module_data = writer.remove_module() + return Response(response=json.dumps({'id': father_module_data['selected_connector'], + 'meshes': father_module_data['selected_meshes']}), + status=200, + mimetype="application/json") + + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + + +# call URDF_writer.py to update the last module +@app.route(f'{api_base_route}/model/urdf/modules', methods=['PUT']) +def updateModule(): + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True + + req = request.get_json() + + # Get the right writer instance depending on the mode + writer = get_writer(sid) - app.logger.debug(building_mode_ON) + try: + ids = request.args.getlist('ids[]') + if len(ids)>1: + return Response( + response=json.dumps({"message": 'Deletion of multiple ids at once is currently not supported'}), + status=501, + mimetype="application/json" + ) + elif len(ids)==1: + writer.select_module_from_name(ids[0], None) + + app.logger.debug(req['parent'] if 'parent' in req else 'no parent') + + offsets_requested = req['offsets_requested'] if 'offsets_requested' in req else {} # we use RPY notation + app.logger.debug(offsets_requested) + + reverse = True if 'reverse' in req and req['reverse'] == 'true' else False + app.logger.debug(reverse) + + addons = req['addons'] if 'addons' in req else [] + + updated_module_data = writer.update_module(offsets=offsets_requested, reverse=reverse, addons=addons) + + return Response(response=json.dumps({'id': updated_module_data['selected_connector'], + 'meshes': updated_module_data['selected_meshes']}), + status=200, + mimetype="application/json") + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) - # Re-initialize the two object instances - urdf_writer.__init__(**urdfwriter_kwargs_dict) - urdf_writer_fromHW.__init__(**urdfwriter_kwargs_dict) +# deploy the package of the built robot +@app.route(f'{api_base_route}/model/urdf', methods=['POST']) +def deployROSModel(): + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True - #data = urdf_writer_fromHW.read_file(file_str) - data = {'building mode': building_mode_ON} + try: + req = request.get_json() + name = req['name'] + builder_jm = req['jointMap'] - data = jsonify(data) - return data + # Get the right writer instance depending on the mode + writer = get_writer(sid) + building_mode_ON=get_building_mode_ON(sid) + writer.remove_all_connectors() # taken from removeConnectors(), to be removed and itergrated inside .deploy_robot() -# deploy the package of the built robot -@app.route('/deployRobot/', methods=['POST']) -def deployRobot(): - global building_mode_ON + writeRobotURDF(building_mode_ON, writer, builder_jm) - building_mode_ON = True if request.form.get('buildingModeON', 0) == 'true' else False - - if building_mode_ON : - name = request.form.get('name', 'ModularBot') app.logger.debug(name) - data = urdf_writer.deploy_robot(name) - else: - data = urdf_writer_fromHW.deploy_robot('modularbot') - #time.sleep(10) - return data + writer.deploy_robot(name) + + if download_on_deploy: + return send_file(f'/tmp/{name}.zip', as_attachment=True) + else: + return Response(status=204) + + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +# get current model stats +@app.route(f'{api_base_route}/model/stats', methods=['GET']) +def getModelStats(): + """Returns a set of statistics for the curent robot model. + """ + sid = session.get('session_id') if enable_sessions else 'default' + if sid not in sessions: + return 'No session found, refresh the page to start a new one', 404 + sessions[sid]['last_updated'] = datetime.now() + session.modified = True - -@app.route('/removeConnectors/', methods=['POST']) -def removeConnectors(): - global building_mode_ON - - building_mode_ON = True if request.form.get('buildingModeON', 0) == 'true' else False - - if building_mode_ON : - data = urdf_writer.remove_connectors() - else: - data = urdf_writer_fromHW.remove_connectors() - return data - - -def byteify(input): - if isinstance(input, dict): + try: + # Get the right writer instance depending on the mode + writer = get_writer(sid) + + stats = writer.compute_stats(samples=1000) + + response = dict() + if stats['modules']: + response["modules"]= { "label": 'Modules', "value": str(stats['modules']) } + if stats['payload'] and np.isfinite(stats['payload']): + response["payload"]= { "label": 'Payload', "value":"{:.2f}".format(stats['payload']), "unit": 'Kg' } + if stats['max_reach'] and np.isfinite(stats['max_reach']): + response["max_reach"]= { "label": 'Reach', "value": "{:.2f}".format(stats['max_reach']), "unit": 'm' } + if stats['joint_modules']: + response["joint_modules"]= { "label": 'Joints', "value": str(stats['modules']) } + + return Response( + response=json.dumps(response), + status=200, + mimetype="application/json" + ) + except RuntimeError as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'Error in computing stats -> {type(e).__name__}: {e}'}), + status=400, + mimetype="application/json" + ) + except Exception as e: + # validation failed + app.logger.error(f'{type(e).__name__}: {e}') + return Response( + response=json.dumps({"message": f'{type(e).__name__}: {e}'}), + status=500, + mimetype="application/json" + ) + +def byteify(input_raw): + if isinstance(input_raw, dict): return {byteify(key): byteify(value) - for key, value in input.items()} - elif isinstance(input, list): - return [byteify(element) for element in input] - elif isinstance(input, str): - return input.encode('utf-8') + for key, value in input_raw.items()} + elif isinstance(input_raw, list): + return [byteify(element) for element in input_raw] + elif isinstance(input_raw, str): + return input_raw.encode('utf-8') else: - return input + return input_raw def main(): - # Start Flask web-server - app.run(host='0.0.0.0', port=5000, debug=False, threaded=True) - # app.run(debug=False, threaded=True) + app.run(host=host, port=port, debug=args.debug, threaded=True) if __name__ == '__main__': diff --git a/src/modular/web/docs/index.html b/src/modular/web/docs/index.html index 8341e4c..dbfbc25 100644 --- a/src/modular/web/docs/index.html +++ b/src/modular/web/docs/index.html @@ -3,7 +3,7 @@ - linfa_backend_data docs + modular docs diff --git a/src/modular/web/docs/modular_swagger.yaml b/src/modular/web/docs/modular_swagger.yaml index 645a197..8527094 100644 --- a/src/modular/web/docs/modular_swagger.yaml +++ b/src/modular/web/docs/modular_swagger.yaml @@ -1,173 +1,114 @@ openapi: 3.0.0 info: title: Modular - version: 0.0.3 + version: 1.0.0-alpha.7.0 # description: Alberobitcs API for RobotBuilder contact: - email: edoardo.romiti@iit.it - name: Edoardo Romiti + email: alberobotics@iit.it + name: Alberobotics Team servers: - - url: http://0.0.0.0:5000 + # - url: http://localhost:5003 + - url: /linfa/api/v1/modular externalDocs: description: Github repository url: https://github.com/ADVRHumanoids/modular -components: - schemas: - FeedbackResponse: - type: object - properties: - result: # the updated URDF to render! - type: string - lastModule_type: - type: string - lastModule_name: - type: string - size: - type: number - format: integer - count: - type: number - format: integer - example: - result: "the updated URDF to render!" - lastModule_type: "joint" - lastModule_name: "L3_A" - size: 3 - count: 1 - - AddModuleRequest: - type: object - properties: - module_name: # The name of the type of module to add - type: string - parent: # The parent name - type: string - angle_offset: # The angle offset w.r.t the parent - type: number - format: float - reverse: - type: boolean - example: - module_name: "module_joint_yaw_ORANGE" - parent: "L3_A" - angle_offset: 0.5 - reverse: false - paths: - /changeURDF: - post: + /mode: + get: tags: - - modular - summary: makes an ajax request to the server to modify the URDF by adding the requested module - requestBody: - description: JSON containing the name of the module to add, the parent module and their respective orientation. - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/AddModuleRequest" + - Workspace + summary: get workspace mode responses: - "200": + 200: description: OK content: application/json: schema: - $ref: "#/components/schemas/FeedbackResponse" - #TBD - "400": - description: Bad Request - #TBD - "500": - description: Server Error + $ref: "#/components/schemas/WorkspaceModeGetResponse" + 500: + description: "INTERNAL SERVER ERROR" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" - /addMasterCube: # TODO: This should be merged under changeURDF post: tags: - - modular - summary: makes an ajax request to the server to modify the URDF by adding the requested cube + - Workspace + summary: set workspace mode and reset the robot instance requestBody: - description: JSON containing the name of the module to add, the parent module and their respective orientation. required: true content: application/json: schema: - $ref: "#/components/schemas/AddModuleRequest" + type: object + required: + - mode + properties: + mode: + type: string + example: Discovery responses: - "200": - description: OK + 204: + description: "NO CONTENT: The server successfully processed the request, and is not returning any content." + 400: + description: "BAD REQUEST" content: application/json: schema: - $ref: "#/components/schemas/FeedbackResponse" - #TBD - "400": - description: Bad Request - #TBD - "500": - description: Server Error + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Missing required parameter 'mode'." + 500: + description: "INTERNAL SERVER ERROR" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" - /addSocket: - post: + /model/urdf: + get: tags: - - modular - summary: add a Socket to the robot model (meaning adding a kinematic chain to the robot in practice) - requestBody: - description: JSON containing position and orientation of the socket. - required: true - content: - application/json: - schema: - type: object - properties: - values: - type: object - properties: - offset: - type: array - items: - type: number - format: float - example: [0.1, 0.2, 0.3] - angle_offset: - type: number - format: float - buildingModeON: - type: boolean - example: - values: - offset: [0.1, 0.2, 0.3] - angle_offset: 0.0 - buildingModeON: true + - Robot Model + summary: get the urdf generated from the currently stored tree + parameters: + - $ref: "#/components/parameters/modelIdFromQuery" responses: - "200": - description: OK + 200: + description: "OK: the URDF to render!" + content: + application/xml: + schema: + type: object + 500: + description: "INTERNAL SERVER ERROR" content: application/json: schema: - $ref: "#/components/schemas/FeedbackResponse" - #TBD - "400": - description: Bad Request - #TBD - "500": - description: Server Error + $ref: "#/components/schemas/ErrorMessage" - /writeURDF: - post: # PUT? + post: tags: - - modular - summary: makes an ajax request to the server to write the URDF in the filesystem (and SRDF, configs, etc.) + - Robot Model + summary: deploy the URDF of the robot in a ROS pakage requestBody: - description: JSON containing a boolean to determine whether or not building mode is activated and a joint map containing the value for the homing of the joints + description: JSON containing a mapping of the joint names and their homing value and the name of the ROS package to save required: true content: application/json: schema: type: object + required: + - jointMap properties: + name: + type: string + description: The name of the ROS package (default:'ModularBot') + example: "ModularBot5" jointMap: type: object + description: Mapping of the joint names and their homing value additionalProperties: type: object properties: @@ -179,234 +120,738 @@ paths: example: J1_A: 0.1 J2_A: 0.2 - buildingModeON: + path: + description: deployment path + type: string + overwrite: + description: Overwrite ROS package if already existing type: boolean responses: - "200": - description: OK + 204: + description: "NO CONTENT: The server successfully processed the request, and is not returning any content." + 400: + description: "BAD REQUEST" content: - text/plain: + application/json: schema: - type: string - example: "the URDF string. for logging purposes" - #TBD - "400": - description: Bad Request - #TBD - "500": - description: Server Error + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Missing required parameter jointMap." + 500: + description: "INTERNAL SERVER ERROR" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: string - /removeModule: - post: # DELETE? + put: tags: - - modular - summary: makes an ajax request to the server to remove the **last selected module** and its **children** - # requestBody: - # description: .... - # required: false - # content: - # application/json: - # schema: ... + - Robot Model + summary: Generate the URDF of the robot from the connected hardware modules responses: - "200": - description: OK + 200: + description: "OK: the gost URDF to render! (if in Build mode)" + content: + application/json: + schema: + $ref: "#/components/schemas/UrdfGetResponse" + application/xml: + schema: + type: string + 204: + description: "NO CONTENT: The server successfully processed the request, and is not returning any content (if in Discovery mode)." + # 409: + # description: "CONFLICT: The request could not be processed because of conflict in the current state of the resource" + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/ErrorMessage' + # example: + # message: "Cannot generate robot model in Build mode." + 500: + description: "INTERNAL SERVER ERROR" content: application/json: schema: - $ref: "#/components/schemas/FeedbackResponse" - #TBD - "400": - description: Bad Request - #TBD - "500": - description: Server Error + $ref: "#/components/schemas/ErrorMessage" - /updateLastModule: - post: # PUT? + /model/urdf/modules: + get: tags: - - modular - summary: makes an ajax request to the server to update the "last selected module" (and so shown buttons) when clicking on it from the front-end - requestBody: - description: JSON containing the name of the current parent module (last selected one) - required: true - content: - application/json: - schema: - type: object - properties: - parent: - type: string - example: "L2_A" + - Robot Model + summary: Get a list of the modules in the robot model + parameters: + - $ref: "#/components/parameters/familiesFromQuery" + - $ref: "#/components/parameters/moduleTypesFromQuery" responses: - "200": - description: OK + 200: + description: "OK" + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Module" + example: + modules: + - id: "J1_A" + family: "alberoboticsGenA" + type: "ActiveJoint" + product: "module_joint_yaw_ORANGE" + label: "Straight Joint" + offset: {} + - id: "J2_A" + family: "alberoboticsGenA" + type: "ActiveJoint" + product: "module_joint_double_elbow_ORANGE" + label: "Elbow Joint" + offset: {} + - id: "J3_A" + family: "alberoboticsGenA" + type: "EndEffector" + product: "module_tool_exchanger_heavy" + label: "Tool Exchanger" + offset: {} + - id: "J4_A" + family: "alberoboticsGenB" + type: "EndEffector" + product: "module_gripper" + label: "Gripper" + offset: + x: 1 + y: 2 + 400: + description: "BAD REQUEST" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Requested invalid 'types'" + 404: + description: "NOT FOUND" content: application/json: schema: - $ref: "#/components/schemas/FeedbackResponse" - #TBD - "400": - description: Bad Request - #TBD - "500": - description: Server Error + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Family 'foo' not found." + 500: + description: "INTERNAL SERVER ERROR" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + 501: + description: "NOT IMPLEMENTED: This implies future availability (e.g., a new feature of the API)." + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Filtering by family is currently not supported" - /openFile: post: tags: - - modular - summary: makes an ajax request to the server to upload a URDF file and display it + - Robot Model + summary: Add a new module to the robot model requestBody: - description: JSON containing the string of the read URDF required: true content: application/json: schema: - type: object - properties: - file: - type: string + $ref: "#/components/schemas/ModuleCreateDTO" + example: + family: "alberoboticsGenA" + type: "ActiveJoint" + product: "module_joint_yaw_ORANGE" + offset: + z: 0.05 + yaw: -1.571 + reverse: false + parent: "J1_A" + responses: - "200": - description: OK + 204: + description: "NO CONTENT: The server successfully processed the request, and is not returning any content." + 400: + description: "BAD REQUEST" content: application/json: schema: - type: object - properties: - parent: - type: string - example: "the updated URDF to render!" - #TBD - "400": - description: Bad Request - #TBD - "500": - description: Server Error + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Missing required parameter 'product'." + 403: + description: FORBIDDEN + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Cannot place module with type 'PassiveLink' after a module of type 'EndEffector'" + 404: + description: "NOT FOUND" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "No module found with varint 'foo'." + 409: + description: "CONFLICT: The request could not be processed because of conflict in the current state of the resource" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Cannot add modules in Discovery mode." + 500: + description: "INTERNAL SERVER ERROR" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + 501: + description: "NOT IMPLEMENTED: This implies future availability (e.g., a new feature of the API)." + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Offset along x,y,z axis is currently not supported" - /requestURDF: - post: # GET? + put: # or patch? tags: - - modular - summary: makes an ajax request to get the urdf generated from the currently stored tree + - Robot Model + summary: Edit a module's parameters requestBody: - description: JSON specifying if we are in building mode (true) or not (false) required: true content: application/json: schema: - type: object - properties: - mode: - type: boolean # True for building mode ON + $ref: "#/components/schemas/Module" + responses: - "200": - description: OK + 204: + description: "NO CONTENT: The server successfully processed the request, and is not returning any content." + 400: + description: "BAD REQUEST" content: application/json: schema: - type: object - properties: - parent: - type: string # the updated URDF to render! - #TBD - "400": - description: Bad Request - #TBD - "500": - description: Server Error + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Missing required parameter 'product'." + 403: + description: "FORBIDDEN" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Cannot place module with type 'PassiveLink' after a module of type 'EndEffector'" + 404: + description: "NOT FOUND" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "No module found with id 'foo'." + 409: + description: "CONFLICT: The request could not be processed because of conflict in the current state of the resource" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Cannot change module type in Discovery mode." + 500: + description: "INTERNAL SERVER ERROR" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + 501: + description: "NOT IMPLEMENTED: This implies future availability (e.g., a new feature of the API)." + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Offset along x,y,z axis is currently not supported" - /changeMode: - post: # GET? + delete: tags: - - modular - summary: makes an ajax request to change mode (Building vs Discovery) and reset the robot instance - requestBody: - description: JSON specifying if switching in building (true) or dicovery mode (false) - required: true - content: - application/json: - schema: - type: object - properties: - buildingModeON: - type: boolean # True for building mode ON + - Robot Model + summary: Delete a module from the robot model + parameters: + - in: query + name: ids + description: Optionally, you can provide one or more IDs of modules to remove. By default it removes the last element. + schema: + type: array + items: + type: string + style: form + explode: false + examples: + oneId: + summary: Example of a single ID + description: "equals to =`?ids=J1_A`" + value: ["J5_A"] # ?ids=5 + multipleIds: + summary: Example of multiple IDs + description: "equals to =`?ids=J1_A,J5_B,J0_D`" + value: ["J1_A", "J5_B", "J0_D"] # ?ids=J1_A,J5_B,J0_D responses: - "200": - description: OK + 204: + description: "NO CONTENT: The server successfully processed the request, and is not returning any content." + 304: + description: "NOT MODIFIED" content: application/json: schema: - type: object - properties: - buildingModeON: - type: boolean # True for building mode ON - #TBD - "400": - description: Bad Request - #TBD - "500": - description: Server Error + $ref: "#/components/schemas/ErrorMessage" + example: + message: "The current model has no modules" + 404: + description: "NOT FOUND" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "No module found with id 'J1_A'." + 409: + description: "CONFLICT: The request could not be processed because of conflict in the current state of the resource" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Cannot delete modules in Discovery mode." + 500: + description: "INTERNAL SERVER ERROR" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + 501: + description: "NOT IMPLEMENTED: This implies future availability (e.g., a new feature of the API)." + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Deletion of multiple modules at once is currently not supported" - /deployRobot: - post: # PUT? + /model/stats: + get: tags: - - modular - summary: makes an ajax request to the server to deploy the URDF of the robot in a ROS pakage to be saved in the filesystem - requestBody: - description: JSON containing a boolean to determine whether or not building mode is activated and the name of the ROS package to save - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - example: "ModularBot" - buildingModeON: - type: boolean + - Robot Model + summary: Get a set of statistics for the curent robot model responses: - "200": - description: OK + # 200: + # description: "OK: the URDF to render!" + # content: + # application/xml: + # schema: + # type: object + 500: + description: "INTERNAL SERVER ERROR" content: - text/plain: + application/json: schema: - type: string - example: "The URDF sting. Returned just for logging purposes..." - #TBD - "400": - description: Bad Request - #TBD - "500": - description: Server Error + $ref: "#/components/schemas/ErrorMessage" + 501: + description: "NOT IMPLEMENTED: This implies future availability (e.g., a new feature of the API)." + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Model statistics are currently not supported" - /removeConnectors: - post: # PUT? + /resources/modules: + get: tags: - - modular - summary: makes an ajax request to the server to remove the connectors from the model. To be called before making a write request and deploying a robot. - requestBody: - description: JSON containing a boolean to determine whether or not building mode is activated - required: true - content: - application/json: - schema: - type: object - properties: - buildingModeON: - type: boolean + - Store + summary: Get available modules + parameters: + - $ref: "#/components/parameters/familiesFromQuery" + - $ref: "#/components/parameters/moduleTypesFromQuery" responses: - "200": - description: OK + 200: + description: "OK" content: - text/plain: + application/json: schema: - type: string - example: "The URDF string without connectors" - #TBD - "400": - description: Bad Request - #TBD - "500": - description: Server Error + $ref: "#/components/schemas/ModuleBaseGetResponse" + 400: + description: "BAD REQUEST" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Requested invalid 'types'" + 404: + description: "NOT FOUND" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Family 'foo' not found." + 500: + description: "INTERNAL SERVER ERROR" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + 501: + description: "NOT IMPLEMENTED: This implies future availability (e.g., a new feature of the API)." + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Filtering by type is currently not supported" + + /resources/families: + get: + tags: + - Store + summary: Get a list of families of the available modules + parameters: + - $ref: "#/components/parameters/familiesFromQuery" + - $ref: "#/components/parameters/familyGroupFromQuery" + responses: + 200: + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/ModuleFamiliesGetResponse" + 500: + description: "INTERNAL SERVER ERROR" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + 501: + description: "NOT IMPLEMENTED: This implies future availability (e.g., a new feature of the API)." + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "Filtering by families is currently not supported" + + /resources/meshes/{path}: + parameters: + - $ref: "#/components/parameters/stlPathFromPath" + + get: + tags: + - Store + summary: file access for STL meshes + responses: + 200: + description: "OK: the STL to render!" + content: + model/stl: + schema: + type: object + 404: + description: "NOT FOUND" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" + example: + message: "No mesh found for path 'foo/bar/baz.stl'" + 500: + description: "INTERNAL SERVER ERROR" + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorMessage" +# Components +components: + #/components/parameters + parameters: + stlPathFromPath: + in: path + name: path + required: true + schema: + type: string + example: "foo/bar/baz.stl" + modelIdFromQuery: + in: query + name: id + description: "This query variable is unused and has been added to avoid [`react-three-fiber`](https://github.com/pmndrs/react-three-fiber) taking the cached model robot instead of fully reloading it. For details see " + schema: + type: string + examples: + id: + description: "equals to =`?id=u2lyCEBi`" + value: "u2lyCEBi" # ?ids=u2lyCEBi + familiesFromQuery: + in: query + name: "families[]" + description: "Optionally the returned list can be filtered by their family of module." + schema: + type: array + items: + type: string + style: form + explode: false + examples: + multipleTypes: + summary: Example of multiple families + description: "equals to `?families[]=alberoboticsGenA&families[]=alberoboticsGenB`" + value: ["alberoboticsGenA", "alberoboticsGenB"] # ?families[]=alberoboticsGenA&families[]=alberoboticsGenB + oneType: + summary: Example of a single family + description: "equals to `?families[]=alberoboticsGenA`" + value: ["alberoboticsGenA"] # ?families[]=alberoboticsGenA + familyGroupFromQuery: + in: query + name: "groups[]" + description: "Optionally the returned list can be filtered by their group." + schema: + type: array + items: + type: string + style: form + explode: false + examples: + multipleTypes: + summary: Example of multiple groups + description: "equals to `?groups[]=Alberobotics&families[]=CONCERT`" + value: ["Alberobotics", "CONCERT"] # ?groups[]=Alberobotics&groups[]=CONCERT + oneType: + summary: Example of a single group + description: "equals to `?groups[]=Alberobotics`" + value: ["Alberobotics"] # ?groups[]=Alberobotics + moduleTypesFromQuery: + in: query + name: "types[]" + description: "Optionally the returned list can filter results by their type of module." + schema: + type: array + items: + type: string + style: form + explode: false + examples: + multipleTypes: + summary: Example of multiple types + description: "equals to `?types[]=joint&types[]=link`" + value: ["joint", "link"] # ?types[]=joint,types[]=link + oneType: + summary: Example of a single type + description: "equals to `?types[]=Socket`" + value: ["Socket"] # ?types[]=Socket + #/components/schemas + schemas: + #ErrorMessage + ErrorMessage: + type: object + properties: + message: + type: string + description: "The error that triggered an exception" + WorkspaceModeGetResponse: + type: object + properties: + mode: + type: string + description: "The current workspace mode: 'Build' or 'Discover'" + example: "Build" # | 'Discover' + #URDF_model + UrdfGetResponse: + type: object + properties: + urdf: + description: the updated URDF to render! + type: string + # Families + ModuleFamily: + type: object + required: + - id + - group + - label + properties: + id: + type: string + description: family Id + example: alberoboticsGenB + group: + type: string + description: used to group similar families # potentially Ethercat's 0x1018:01, see https://infosys.beckhoff.com/content/1033/el252x/1856726667.html + example: Alberobotics + label: + type: string + description: label shown in the frontend + example: "CONCERT" + disabled: + type: boolean + description: represent the family as not selectable + example: true + ModuleFamiliesGetResponse: + type: object + required: + - families + properties: + families: + type: array + items: + $ref: "#/components/schemas/ModuleFamily" + example: + families: + - id: "alberoboticsGenA" + group: "Alberobotics" + label: "PINO v1" + - id: "alberoboticsGenB" + group: "Alberobotics" + label: "CONCERT" + disabled: true + # Modules + ModuleBase: + type: object + required: + - family + - type + - product + - label + properties: + family: + type: string + description: "Family Id" + example: "alberoboticsGenA" + type: + type: string + description: "Type of module ('ActiveJoint', 'PassiveJoint', 'EndEffector', 'Socket')" + example: "EndEffector" + product: + type: string + description: "product code / name of the module" # potentially Ethercat's 0x1018:02, see https://infosys.beckhoff.com/content/1033/el252x/1856726667.html + example: "module_joint_yaw_ORANGE" + label: + type: string + description: label shown in the frontend + example: "Straight Joint" + disabled: + type: boolean + description: represent the module as not selectable + example: true + ModuleBaseGetResponse: + type: object + required: + - modules + properties: + modules: + type: array + items: + $ref: "#/components/schemas/ModuleBase" + example: + modules: + - family: "alberoboticsGenA" + type: "ActiveJoint" + product: "module_joint_yaw_ORANGE" + label: "Straight Joint" + - family: "alberoboticsGenA" + type: "ActiveJoint" + product: "module_joint_double_elbow_ORANGE" + label: "Elbow Joint" + - family: "alberoboticsGenA" + type: "EndEffector" + product: "module_tool_exchanger_heavy" + label: "Tool Exchanger" + disabled: true + - family: "alberoboticsGenB" + type: "EndEffector" + product: "module_gripper" + label: "Gripper" + ModuleCreateDTO: + allOf: + - type: object + properties: + parentId: + type: string + offset: + $ref: "#/components/schemas/offset" + - $ref: "#/components/schemas/ModuleBase" + Module: + allOf: + - type: object + required: + - id + properties: + id: + type: string + - $ref: "#/components/schemas/ModuleCreateDTO" + example: + id: "J2_A" + family: "alberoboticsGenA" + type: "ActiveJoint" + product: "module_joint_yaw_ORANGE" + offset: + z: 0.05 + yaw: -1.571 + reverse: false + parent: "J1_A" + #Offset + poseQuat: + type: object + description: Pose with quaternion notation + properties: + x: + type: number + y: + type: number + z: + type: number + rx: + type: number + ry: + type: number + rz: + type: number + rw: + type: number + example: + x: 0.03 + ry: 0.083 + rz: 0.05 + poseRPY: + type: object + description: Pose with RPY notation + properties: + x: + type: number + y: + type: number + z: + type: number + roll: + type: number + pitch: + type: number + yaw: + type: number + example: + z: 0.05 + yaw: -1.571 + offset: + oneOf: + - $ref: "#/components/schemas/poseQuat" + - $ref: "#/components/schemas/poseRPY" diff --git a/src/modular/web/modular_frontend/asset-manifest.json b/src/modular/web/modular_frontend/asset-manifest.json new file mode 100644 index 0000000..d9a6ed6 --- /dev/null +++ b/src/modular/web/modular_frontend/asset-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "main.js": "/static/js/main.1ff7d330.js", + "static/js/915.89514730.chunk.js": "/static/js/915.89514730.chunk.js", + "service-worker.js": "/service-worker.js", + "index.html": "/index.html", + "main.1ff7d330.js.map": "/static/js/main.1ff7d330.js.map", + "915.89514730.chunk.js.map": "/static/js/915.89514730.chunk.js.map" + }, + "entrypoints": [ + "static/js/main.1ff7d330.js" + ] +} \ No newline at end of file diff --git a/src/modular/web/modular_frontend/assets/index-BqFtD4jC.js b/src/modular/web/modular_frontend/assets/index-BqFtD4jC.js new file mode 100644 index 0000000..70ae32f --- /dev/null +++ b/src/modular/web/modular_frontend/assets/index-BqFtD4jC.js @@ -0,0 +1,4157 @@ +var dj=Object.defineProperty;var fj=(t,e,n)=>e in t?dj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var io=(t,e,n)=>(fj(t,typeof e!="symbol"?e+"":e,n),n),dE=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var Ae=(t,e,n)=>(dE(t,e,"read from private field"),n?n.call(t):e.get(t)),rn=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},jt=(t,e,n,r)=>(dE(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var S_=(t,e,n,r)=>({set _(i){jt(t,e,i,n)},get _(){return Ae(t,e,r)}}),jn=(t,e,n)=>(dE(t,e,"access private method"),n);function hj(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var h1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function By(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Uu(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var ND={exports:{}},I2={},DD={exports:{}},er={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Hy=Symbol.for("react.element"),pj=Symbol.for("react.portal"),mj=Symbol.for("react.fragment"),gj=Symbol.for("react.strict_mode"),vj=Symbol.for("react.profiler"),yj=Symbol.for("react.provider"),xj=Symbol.for("react.context"),_j=Symbol.for("react.forward_ref"),bj=Symbol.for("react.suspense"),Sj=Symbol.for("react.memo"),wj=Symbol.for("react.lazy"),$4=Symbol.iterator;function Mj(t){return t===null||typeof t!="object"?null:(t=$4&&t[$4]||t["@@iterator"],typeof t=="function"?t:null)}var FD={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},UD=Object.assign,zD={};function og(t,e,n){this.props=t,this.context=e,this.refs=zD,this.updater=n||FD}og.prototype.isReactComponent={};og.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};og.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function BD(){}BD.prototype=og.prototype;function $A(t,e,n){this.props=t,this.context=e,this.refs=zD,this.updater=n||FD}var VA=$A.prototype=new BD;VA.constructor=$A;UD(VA,og.prototype);VA.isPureReactComponent=!0;var V4=Array.isArray,HD=Object.prototype.hasOwnProperty,WA={current:null},$D={key:!0,ref:!0,__self:!0,__source:!0};function VD(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)HD.call(e,r)&&!$D.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,Ce=z[de];if(0>>1;dei(me,oe))pei(Se,me)?(z[de]=Se,z[pe]=oe,de=pe):(z[de]=me,z[V]=oe,de=V);else if(pei(Se,oe))z[de]=Se,z[pe]=oe,de=pe;else break e}}return te}function i(z,te){var oe=z.sortIndex-te.sortIndex;return oe!==0?oe:z.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,p=null,g=3,v=!1,x=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(z){for(var te=n(c);te!==null;){if(te.callback===null)r(c);else if(te.startTime<=z)r(c),te.sortIndex=te.expirationTime,e(l,te);else break;te=n(c)}}function T(z){if(_=!1,w(z),!x)if(n(l)!==null)x=!0,ee(L);else{var te=n(c);te!==null&&ue(T,te.startTime-z)}}function L(z,te){x=!1,_&&(_=!1,y(F),F=-1),v=!0;var oe=g;try{for(w(te),p=n(l);p!==null&&(!(p.expirationTime>te)||z&&!H());){var de=p.callback;if(typeof de=="function"){p.callback=null,g=p.priorityLevel;var Ce=de(p.expirationTime<=te);te=t.unstable_now(),typeof Ce=="function"?p.callback=Ce:p===n(l)&&r(l),w(te)}else r(l);p=n(l)}if(p!==null)var Le=!0;else{var V=n(c);V!==null&&ue(T,V.startTime-te),Le=!1}return Le}finally{p=null,g=oe,v=!1}}var R=!1,P=null,F=-1,O=5,I=-1;function H(){return!(t.unstable_now()-Iz||125de?(z.sortIndex=oe,e(c,z),n(l)===null&&z===n(c)&&(_?(y(F),F=-1):_=!0,ue(T,oe-de))):(z.sortIndex=Ce,e(l,z),x||v||(x=!0,ee(L))),z},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(z){var te=g;return function(){var oe=g;g=te;try{return z.apply(this,arguments)}finally{g=oe}}}})(qD);XD.exports=qD;var Nj=XD.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Dj=D,Ea=Nj;function Ct(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gC=Object.prototype.hasOwnProperty,Fj=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,j4={},G4={};function Uj(t){return gC.call(G4,t)?!0:gC.call(j4,t)?!1:Fj.test(t)?G4[t]=!0:(j4[t]=!0,!1)}function zj(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Bj(t,e,n,r){if(e===null||typeof e>"u"||zj(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function So(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Os={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Os[t]=new So(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Os[e]=new So(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Os[t]=new So(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Os[t]=new So(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Os[t]=new So(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Os[t]=new So(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Os[t]=new So(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Os[t]=new So(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Os[t]=new So(t,5,!1,t.toLowerCase(),null,!1,!1)});var GA=/[\-:]([a-z])/g;function XA(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(GA,XA);Os[e]=new So(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(GA,XA);Os[e]=new So(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(GA,XA);Os[e]=new So(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Os[t]=new So(t,1,!1,t.toLowerCase(),null,!1,!1)});Os.xlinkHref=new So("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Os[t]=new So(t,1,!1,t.toLowerCase(),null,!0,!0)});function qA(t,e,n,r){var i=Os.hasOwnProperty(e)?Os[e]:null;(i!==null?i.type!==0:r||!(2a||i[o]!==s[a]){var l=` +`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{pE=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Z1(t):""}function Hj(t){switch(t.tag){case 5:return Z1(t.type);case 16:return Z1("Lazy");case 13:return Z1("Suspense");case 19:return Z1("SuspenseList");case 0:case 2:case 15:return t=mE(t.type,!1),t;case 11:return t=mE(t.type.render,!1),t;case 1:return t=mE(t.type,!0),t;default:return""}}function _C(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Zm:return"Fragment";case qm:return"Portal";case vC:return"Profiler";case ZA:return"StrictMode";case yC:return"Suspense";case xC:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case KD:return(t.displayName||"Context")+".Consumer";case YD:return(t._context.displayName||"Context")+".Provider";case YA:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case KA:return e=t.displayName||null,e!==null?e:_C(t.type)||"Memo";case kd:e=t._payload,t=t._init;try{return _C(t(e))}catch{}}return null}function $j(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _C(e);case 8:return e===ZA?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function lf(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function JD(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Vj(t){var e=JD(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function E_(t){t._valueTracker||(t._valueTracker=Vj(t))}function e6(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=JD(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function FS(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function bC(t,e){var n=e.checked;return ci({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function q4(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=lf(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function t6(t,e){e=e.checked,e!=null&&qA(t,"checked",e,!1)}function SC(t,e){t6(t,e);var n=lf(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?wC(t,e.type,n):e.hasOwnProperty("defaultValue")&&wC(t,e.type,lf(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Z4(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function wC(t,e,n){(e!=="number"||FS(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Y1=Array.isArray;function f0(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=C_.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Av(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var sv={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Wj=["Webkit","ms","Moz","O"];Object.keys(sv).forEach(function(t){Wj.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),sv[e]=sv[t]})});function s6(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||sv.hasOwnProperty(t)&&sv[t]?(""+e).trim():e+"px"}function o6(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=s6(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var jj=ci({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function CC(t,e){if(e){if(jj[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ct(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ct(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ct(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ct(62))}}function TC(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var AC=null;function QA(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var RC=null,h0=null,p0=null;function Q4(t){if(t=Wy(t)){if(typeof RC!="function")throw Error(Ct(280));var e=t.stateNode;e&&(e=D2(e),RC(t.stateNode,t.type,e))}}function a6(t){h0?p0?p0.push(t):p0=[t]:h0=t}function l6(){if(h0){var t=h0,e=p0;if(p0=h0=null,Q4(t),e)for(t=0;t>>=0,t===0?32:31-(nG(t)/rG|0)|0}var T_=64,A_=4194304;function K1(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function HS(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=K1(a):(s&=o,s!==0&&(r=K1(s)))}else o=n&~i,o!==0?r=K1(o):s!==0&&(r=K1(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function $y(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Hl(e),t[e]=n}function aG(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=av),aI=" ",lI=!1;function A6(t,e){switch(t){case"keyup":return NG.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function R6(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ym=!1;function FG(t,e){switch(t){case"compositionend":return R6(e);case"keypress":return e.which!==32?null:(lI=!0,aI);case"textInput":return t=e.data,t===aI&&lI?null:t;default:return null}}function UG(t,e){if(Ym)return t==="compositionend"||!o3&&A6(t,e)?(t=C6(),cS=r3=Xd=null,Ym=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=fI(n)}}function k6(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?k6(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function O6(){for(var t=window,e=FS();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=FS(t.document)}return e}function a3(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function XG(t){var e=O6(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&k6(n.ownerDocument.documentElement,n)){if(r!==null&&a3(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=hI(n,s);var o=hI(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Km=null,NC=null,cv=null,DC=!1;function pI(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;DC||Km==null||Km!==FS(r)||(r=Km,"selectionStart"in r&&a3(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),cv&&Ov(cv,r)||(cv=r,r=WS(NC,"onSelect"),0e0||(t.current=$C[e0],$C[e0]=null,e0--)}function Vr(t,e){e0++,$C[e0]=t.current,t.current=e}var cf={},qs=ff(cf),Bo=ff(!1),tp=cf;function F0(t,e){var n=t.type.contextTypes;if(!n)return cf;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Ho(t){return t=t.childContextTypes,t!=null}function GS(){Zr(Bo),Zr(qs)}function bI(t,e,n){if(qs.current!==cf)throw Error(Ct(168));Vr(qs,e),Vr(Bo,n)}function V6(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(Ct(108,$j(t)||"Unknown",i));return ci({},n,r)}function XS(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||cf,tp=qs.current,Vr(qs,t),Vr(Bo,Bo.current),!0}function SI(t,e,n){var r=t.stateNode;if(!r)throw Error(Ct(169));n?(t=V6(t,e,tp),r.__reactInternalMemoizedMergedChildContext=t,Zr(Bo),Zr(qs),Vr(qs,t)):Zr(Bo),Vr(Bo,n)}var mu=null,F2=!1,RE=!1;function W6(t){mu===null?mu=[t]:mu.push(t)}function sX(t){F2=!0,W6(t)}function hf(){if(!RE&&mu!==null){RE=!0;var t=0,e=wr;try{var n=mu;for(wr=1;t>=o,i-=o,bu=1<<32-Hl(e)+i|n<F?(O=P,P=null):O=P.sibling;var I=g(y,P,w[F],T);if(I===null){P===null&&(P=O);break}t&&P&&I.alternate===null&&e(y,P),S=s(I,S,F),R===null?L=I:R.sibling=I,R=I,P=O}if(F===w.length)return n(y,P),ei&&hh(y,F),L;if(P===null){for(;FF?(O=P,P=null):O=P.sibling;var H=g(y,P,I.value,T);if(H===null){P===null&&(P=O);break}t&&P&&H.alternate===null&&e(y,P),S=s(H,S,F),R===null?L=H:R.sibling=H,R=H,P=O}if(I.done)return n(y,P),ei&&hh(y,F),L;if(P===null){for(;!I.done;F++,I=w.next())I=p(y,I.value,T),I!==null&&(S=s(I,S,F),R===null?L=I:R.sibling=I,R=I);return ei&&hh(y,F),L}for(P=r(y,P);!I.done;F++,I=w.next())I=v(P,y,F,I.value,T),I!==null&&(t&&I.alternate!==null&&P.delete(I.key===null?F:I.key),S=s(I,S,F),R===null?L=I:R.sibling=I,R=I);return t&&P.forEach(function(Q){return e(y,Q)}),ei&&hh(y,F),L}function b(y,S,w,T){if(typeof w=="object"&&w!==null&&w.type===Zm&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case M_:e:{for(var L=w.key,R=S;R!==null;){if(R.key===L){if(L=w.type,L===Zm){if(R.tag===7){n(y,R.sibling),S=i(R,w.props.children),S.return=y,y=S;break e}}else if(R.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===kd&&EI(L)===R.type){n(y,R.sibling),S=i(R,w.props),S.ref=x1(y,R,w),S.return=y,y=S;break e}n(y,R);break}else e(y,R);R=R.sibling}w.type===Zm?(S=Gh(w.props.children,y.mode,T,w.key),S.return=y,y=S):(T=vS(w.type,w.key,w.props,null,y.mode,T),T.ref=x1(y,S,w),T.return=y,y=T)}return o(y);case qm:e:{for(R=w.key;S!==null;){if(S.key===R)if(S.tag===4&&S.stateNode.containerInfo===w.containerInfo&&S.stateNode.implementation===w.implementation){n(y,S.sibling),S=i(S,w.children||[]),S.return=y,y=S;break e}else{n(y,S);break}else e(y,S);S=S.sibling}S=FE(w,y.mode,T),S.return=y,y=S}return o(y);case kd:return R=w._init,b(y,S,R(w._payload),T)}if(Y1(w))return x(y,S,w,T);if(p1(w))return _(y,S,w,T);N_(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,S!==null&&S.tag===6?(n(y,S.sibling),S=i(S,w),S.return=y,y=S):(n(y,S),S=DE(w,y.mode,T),S.return=y,y=S),o(y)):n(y,S)}return b}var z0=q6(!0),Z6=q6(!1),YS=ff(null),KS=null,r0=null,d3=null;function f3(){d3=r0=KS=null}function h3(t){var e=YS.current;Zr(YS),t._currentValue=e}function jC(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function g0(t,e){KS=t,d3=r0=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Fo=!0),t.firstContext=null)}function ll(t){var e=t._currentValue;if(d3!==t)if(t={context:t,memoizedValue:e,next:null},r0===null){if(KS===null)throw Error(Ct(308));r0=t,KS.dependencies={lanes:0,firstContext:t}}else r0=r0.next=t;return e}var Ch=null;function p3(t){Ch===null?Ch=[t]:Ch.push(t)}function Y6(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,p3(e)):(n.next=i.next,i.next=n),e.interleaved=n,ku(t,r)}function ku(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Od=!1;function m3(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function K6(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Eu(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function nf(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,ur&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,ku(t,n)}return i=r.interleaved,i===null?(e.next=e,p3(r)):(e.next=i.next,i.next=e),r.interleaved=e,ku(t,n)}function dS(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,e3(t,n)}}function CI(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function QS(t,e,n,r){var i=t.updateQueue;Od=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var f=t.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=l))}if(s!==null){var p=i.baseState;o=0,f=c=l=null,a=s;do{var g=a.lane,v=a.eventTime;if((r&g)===g){f!==null&&(f=f.next={eventTime:v,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=t,_=a;switch(g=e,v=n,_.tag){case 1:if(x=_.payload,typeof x=="function"){p=x.call(v,p,g);break e}p=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=_.payload,g=typeof x=="function"?x.call(v,p,g):x,g==null)break e;p=ci({},p,g);break e;case 2:Od=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,g=i.effects,g===null?i.effects=[a]:g.push(a))}else v={eventTime:v,lane:g,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(c=f=v,l=p):f=f.next=v,o|=g;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;g=a,a=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(!0);if(f===null&&(l=p),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=f,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);ip|=o,t.lanes=o,t.memoizedState=p}}function TI(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var r=IE.transition;IE.transition={};try{t(!1),e()}finally{wr=n,IE.transition=r}}function pF(){return cl().memoizedState}function cX(t,e,n){var r=sf(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},mF(t))gF(e,n);else if(n=Y6(t,e,n,r),n!==null){var i=go();$l(n,t,r,i),vF(n,e,r)}}function uX(t,e,n){var r=sf(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(mF(t))gF(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Vl(a,o)){var l=e.interleaved;l===null?(i.next=i,p3(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=Y6(t,e,i,r),n!==null&&(i=go(),$l(n,t,r,i),vF(n,e,r))}}function mF(t){var e=t.alternate;return t===li||e!==null&&e===li}function gF(t,e){uv=e2=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function vF(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,e3(t,n)}}var t2={readContext:ll,useCallback:Bs,useContext:Bs,useEffect:Bs,useImperativeHandle:Bs,useInsertionEffect:Bs,useLayoutEffect:Bs,useMemo:Bs,useReducer:Bs,useRef:Bs,useState:Bs,useDebugValue:Bs,useDeferredValue:Bs,useTransition:Bs,useMutableSource:Bs,useSyncExternalStore:Bs,useId:Bs,unstable_isNewReconciler:!1},dX={readContext:ll,useCallback:function(t,e){return hc().memoizedState=[t,e===void 0?null:e],t},useContext:ll,useEffect:RI,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,hS(4194308,4,cF.bind(null,e,t),n)},useLayoutEffect:function(t,e){return hS(4194308,4,t,e)},useInsertionEffect:function(t,e){return hS(4,2,t,e)},useMemo:function(t,e){var n=hc();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=hc();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=cX.bind(null,li,t),[r.memoizedState,t]},useRef:function(t){var e=hc();return t={current:t},e.memoizedState=t},useState:AI,useDebugValue:w3,useDeferredValue:function(t){return hc().memoizedState=t},useTransition:function(){var t=AI(!1),e=t[0];return t=lX.bind(null,t[1]),hc().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=li,i=hc();if(ei){if(n===void 0)throw Error(Ct(407));n=n()}else{if(n=e(),Ss===null)throw Error(Ct(349));rp&30||tF(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,RI(rF.bind(null,r,s,t),[t]),r.flags|=2048,$v(9,nF.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=hc(),e=Ss.identifierPrefix;if(ei){var n=Su,r=bu;n=(r&~(1<<32-Hl(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Bv++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[wc]=e,t[Fv]=r,TF(t,e,!1,!1),e.stateNode=t;e:{switch(o=TC(n,r),n){case"dialog":Xr("cancel",t),Xr("close",t),i=r;break;case"iframe":case"object":case"embed":Xr("load",t),i=r;break;case"video":case"audio":for(i=0;i$0&&(e.flags|=128,r=!0,_1(s,!1),e.lanes=4194304)}else{if(!r)if(t=JS(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),_1(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ei)return Hs(e),null}else 2*ki()-s.renderingStartTime>$0&&n!==1073741824&&(e.flags|=128,r=!0,_1(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ki(),e.sibling=null,n=oi.current,Vr(oi,r?n&1|2:n&1),e):(Hs(e),null);case 22:case 23:return R3(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?pa&1073741824&&(Hs(e),e.subtreeFlags&6&&(e.flags|=8192)):Hs(e),null;case 24:return null;case 25:return null}throw Error(Ct(156,e.tag))}function xX(t,e){switch(c3(e),e.tag){case 1:return Ho(e.type)&&GS(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return B0(),Zr(Bo),Zr(qs),y3(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return v3(e),null;case 13:if(Zr(oi),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Ct(340));U0()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Zr(oi),null;case 4:return B0(),null;case 10:return h3(e.type._context),null;case 22:case 23:return R3(),null;case 24:return null;default:return null}}var F_=!1,Gs=!1,_X=typeof WeakSet=="function"?WeakSet:Set,Gt=null;function i0(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){bi(t,e,r)}else n.current=null}function eT(t,e,n){try{n()}catch(r){bi(t,e,r)}}var BI=!1;function bX(t,e){if(FC=$S,t=O6(),a3(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,f=0,p=t,g=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(a=o+i),p!==s||r!==0&&p.nodeType!==3||(l=o+r),p.nodeType===3&&(o+=p.nodeValue.length),(v=p.firstChild)!==null;)g=p,p=v;for(;;){if(p===t)break t;if(g===n&&++c===i&&(a=o),g===s&&++f===r&&(l=o),(v=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=v}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(UC={focusedElem:t,selectionRange:n},$S=!1,Gt=e;Gt!==null;)if(e=Gt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Gt=t;else for(;Gt!==null;){e=Gt;try{var x=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var _=x.memoizedProps,b=x.memoizedState,y=e.stateNode,S=y.getSnapshotBeforeUpdate(e.elementType===e.type?_:Ll(e.type,_),b);y.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ct(163))}}catch(T){bi(e,e.return,T)}if(t=e.sibling,t!==null){t.return=e.return,Gt=t;break}Gt=e.return}return x=BI,BI=!1,x}function dv(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&eT(e,n,s)}i=i.next}while(i!==r)}}function B2(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function tT(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function PF(t){var e=t.alternate;e!==null&&(t.alternate=null,PF(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[wc],delete e[Fv],delete e[HC],delete e[rX],delete e[iX])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function IF(t){return t.tag===5||t.tag===3||t.tag===4}function HI(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||IF(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function nT(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=jS));else if(r!==4&&(t=t.child,t!==null))for(nT(t,e,n),t=t.sibling;t!==null;)nT(t,e,n),t=t.sibling}function rT(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(rT(t,e,n),t=t.sibling;t!==null;)rT(t,e,n),t=t.sibling}var Is=null,Dl=!1;function bd(t,e,n){for(n=n.child;n!==null;)LF(t,e,n),n=n.sibling}function LF(t,e,n){if(Cc&&typeof Cc.onCommitFiberUnmount=="function")try{Cc.onCommitFiberUnmount(L2,n)}catch{}switch(n.tag){case 5:Gs||i0(n,e);case 6:var r=Is,i=Dl;Is=null,bd(t,e,n),Is=r,Dl=i,Is!==null&&(Dl?(t=Is,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Is.removeChild(n.stateNode));break;case 18:Is!==null&&(Dl?(t=Is,n=n.stateNode,t.nodeType===8?AE(t.parentNode,n):t.nodeType===1&&AE(t,n),Lv(t)):AE(Is,n.stateNode));break;case 4:r=Is,i=Dl,Is=n.stateNode.containerInfo,Dl=!0,bd(t,e,n),Is=r,Dl=i;break;case 0:case 11:case 14:case 15:if(!Gs&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&eT(n,e,o),i=i.next}while(i!==r)}bd(t,e,n);break;case 1:if(!Gs&&(i0(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){bi(n,e,a)}bd(t,e,n);break;case 21:bd(t,e,n);break;case 22:n.mode&1?(Gs=(r=Gs)||n.memoizedState!==null,bd(t,e,n),Gs=r):bd(t,e,n);break;default:bd(t,e,n)}}function $I(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new _X),e.forEach(function(r){var i=PX.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Al(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=ki()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wX(r/1960))-r,10t?16:t,qd===null)var r=!1;else{if(t=qd,qd=null,i2=0,ur&6)throw Error(Ct(331));var i=ur;for(ur|=4,Gt=t.current;Gt!==null;){var s=Gt,o=s.child;if(Gt.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lki()-T3?jh(t,0):C3|=n),$o(t,e)}function BF(t,e){e===0&&(t.mode&1?(e=A_,A_<<=1,!(A_&130023424)&&(A_=4194304)):e=1);var n=go();t=ku(t,e),t!==null&&($y(t,e,n),$o(t,n))}function RX(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),BF(t,n)}function PX(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(Ct(314))}r!==null&&r.delete(e),BF(t,n)}var HF;HF=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Bo.current)Fo=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Fo=!1,vX(t,e,n);Fo=!!(t.flags&131072)}else Fo=!1,ei&&e.flags&1048576&&j6(e,ZS,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;pS(t,e),t=e.pendingProps;var i=F0(e,qs.current);g0(e,n),i=_3(null,e,r,t,i,n);var s=b3();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ho(r)?(s=!0,XS(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,m3(e),i.updater=z2,e.stateNode=i,i._reactInternals=e,XC(e,r,t,n),e=YC(null,e,r,!0,s,n)):(e.tag=0,ei&&s&&l3(e),fo(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(pS(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=LX(r),t=Ll(r,t),i){case 0:e=ZC(null,e,r,t,n);break e;case 1:e=FI(null,e,r,t,n);break e;case 11:e=NI(null,e,r,t,n);break e;case 14:e=DI(null,e,r,Ll(r.type,t),n);break e}throw Error(Ct(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ll(r,i),ZC(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ll(r,i),FI(t,e,r,i,n);case 3:e:{if(MF(e),t===null)throw Error(Ct(387));r=e.pendingProps,s=e.memoizedState,i=s.element,K6(t,e),QS(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=H0(Error(Ct(423)),e),e=UI(t,e,r,n,i);break e}else if(r!==i){i=H0(Error(Ct(424)),e),e=UI(t,e,r,n,i);break e}else for(_a=tf(e.stateNode.containerInfo.firstChild),Sa=e,ei=!0,Fl=null,n=Z6(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(U0(),r===i){e=Ou(t,e,n);break e}fo(t,e,r,n)}e=e.child}return e;case 5:return Q6(e),t===null&&WC(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,zC(r,i)?o=null:s!==null&&zC(r,s)&&(e.flags|=32),wF(t,e),fo(t,e,o,n),e.child;case 6:return t===null&&WC(e),null;case 13:return EF(t,e,n);case 4:return g3(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=z0(e,null,r,n):fo(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ll(r,i),NI(t,e,r,i,n);case 7:return fo(t,e,e.pendingProps,n),e.child;case 8:return fo(t,e,e.pendingProps.children,n),e.child;case 12:return fo(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Vr(YS,r._currentValue),r._currentValue=o,s!==null)if(Vl(s.value,o)){if(s.children===i.children&&!Bo.current){e=Ou(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Eu(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),jC(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Ct(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),jC(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}fo(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,g0(e,n),i=ll(i),r=r(i),e.flags|=1,fo(t,e,r,n),e.child;case 14:return r=e.type,i=Ll(r,e.pendingProps),i=Ll(r.type,i),DI(t,e,r,i,n);case 15:return bF(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ll(r,i),pS(t,e),e.tag=1,Ho(r)?(t=!0,XS(e)):t=!1,g0(e,n),yF(e,r,i),XC(e,r,i,n),YC(null,e,r,!0,t,n);case 19:return CF(t,e,n);case 22:return SF(t,e,n)}throw Error(Ct(156,e.tag))};function $F(t,e){return m6(t,e)}function IX(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nl(t,e,n,r){return new IX(t,e,n,r)}function I3(t){return t=t.prototype,!(!t||!t.isReactComponent)}function LX(t){if(typeof t=="function")return I3(t)?1:0;if(t!=null){if(t=t.$$typeof,t===YA)return 11;if(t===KA)return 14}return 2}function of(t,e){var n=t.alternate;return n===null?(n=nl(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function vS(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")I3(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Zm:return Gh(n.children,i,s,e);case ZA:o=8,i|=8;break;case vC:return t=nl(12,n,e,i|2),t.elementType=vC,t.lanes=s,t;case yC:return t=nl(13,n,e,i),t.elementType=yC,t.lanes=s,t;case xC:return t=nl(19,n,e,i),t.elementType=xC,t.lanes=s,t;case QD:return $2(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case YD:o=10;break e;case KD:o=9;break e;case YA:o=11;break e;case KA:o=14;break e;case kd:o=16,r=null;break e}throw Error(Ct(130,t==null?t:typeof t,""))}return e=nl(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function Gh(t,e,n,r){return t=nl(7,t,r,e),t.lanes=n,t}function $2(t,e,n,r){return t=nl(22,t,r,e),t.elementType=QD,t.lanes=n,t.stateNode={isHidden:!1},t}function DE(t,e,n){return t=nl(6,t,null,e),t.lanes=n,t}function FE(t,e,n){return e=nl(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function kX(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vE(0),this.expirationTimes=vE(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vE(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function L3(t,e,n,r,i,s,o,a,l){return t=new kX(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=nl(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},m3(s),t}function OX(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(GF)}catch(t){console.error(t)}}GF(),GD.exports=Ra;var X2=GD.exports;const B_=By(X2);var XF,YI=X2;XF=mC.createRoot=YI.createRoot,mC.hydrateRoot=YI.hydrateRoot;function X(){return X=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(r.toString().match(/^(components|slots)$/))n[r]=X({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=t[r]||{},s=e[r];n[r]={},!s||!Object.keys(s)?n[r]=i:!i||!Object.keys(i)?n[r]=s:(n[r]=X({},s),Object.keys(i).forEach(o=>{n[r][o]=D3(i[o],s[o])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function zX(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:D3(e.components[n].defaultProps,r)}function Rt(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s=0)&&(n[i]=t[i]);return n}function yu(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function qF(t){if(!yu(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=qF(t[n])}),e}function vo(t,e,n={clone:!0}){const r=n.clone?X({},t):t;return yu(t)&&yu(e)&&Object.keys(e).forEach(i=>{i!=="__proto__"&&(yu(e[i])&&i in t&&yu(t[i])?r[i]=vo(t[i],e[i],n):n.clone?r[i]=yu(e[i])?qF(e[i]):e[i]:r[i]=e[i])}),r}const BX=Object.freeze(Object.defineProperty({__proto__:null,default:vo,isPlainObject:yu},Symbol.toStringTag,{value:"Module"})),HX=["values","unit","step"],$X=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>X({},n,{[r.key]:r.val}),{})};function ZF(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=Rt(t,HX),s=$X(e),o=Object.keys(s);function a(g){return`@media (min-width:${typeof e[g]=="number"?e[g]:g}${n})`}function l(g){return`@media (max-width:${(typeof e[g]=="number"?e[g]:g)-r/100}${n})`}function c(g,v){const x=o.indexOf(v);return`@media (min-width:${typeof e[g]=="number"?e[g]:g}${n}) and (max-width:${(x!==-1&&typeof e[o[x]]=="number"?e[o[x]]:v)-r/100}${n})`}function f(g){return o.indexOf(g)+1`@media (min-width:${F3[t]}px)`};function jo(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const s=r.breakpoints||KI;return e.reduce((o,a,l)=>(o[s.up(s.keys[l])]=n(e[l]),o),{})}if(typeof e=="object"){const s=r.breakpoints||KI;return Object.keys(e).reduce((o,a)=>{if(Object.keys(s.values||F3).indexOf(a)!==-1){const l=s.up(a);o[l]=n(e[a],a)}else{const l=a;o[l]=e[l]}return o},{})}return n(e)}function YF(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const s=t.up(i);return r[s]={},r},{}))||{}}function KF(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function jX(t,...e){const n=YF(t),r=[n,...e].reduce((i,s)=>vo(i,s),{});return KF(Object.keys(n),r)}function GX(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((i,s)=>{s{t[i]!=null&&(n[i]=!0)}),n}function Xh({values:t,breakpoints:e,base:n}){const r=n||GX(t,e),i=Object.keys(r);if(i.length===0)return t;let s;return i.reduce((o,a,l)=>(Array.isArray(t)?(o[a]=t[l]!=null?t[l]:t[s],s=l):typeof t=="object"?(o[a]=t[a]!=null?t[a]:t[s],s=a):o[a]=t,o),{})}function op(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;ni&&i[s]?i[s]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function a2(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=q2(t,n)||r,e&&(i=e(i,r,t)),i}function Ni(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,s=o=>{if(o[e]==null)return null;const a=o[e],l=o.theme,c=q2(l,r)||{};return jo(o,a,p=>{let g=a2(c,i,p);return p===g&&typeof p=="string"&&(g=a2(c,i,`${e}${p==="default"?"":gt(p)}`,p)),n===!1?g:{[n]:g}})};return s.propTypes={},s.filterProps=[e],s}function ZX(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const YX={m:"margin",p:"padding"},KX={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},QI={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},QX=ZX(t=>{if(t.length>2)if(QI[t])t=QI[t];else return[t];const[e,n]=t.split(""),r=YX[e],i=KX[n]||"";return Array.isArray(i)?i.map(s=>r+s):[r+i]}),U3=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],z3=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...U3,...z3];function Gy(t,e,n,r){var i;const s=(i=q2(t,e,!1))!=null?i:n;return typeof s=="number"?o=>typeof o=="string"?o:s*o:Array.isArray(s)?o=>typeof o=="string"?o:s[o]:typeof s=="function"?s:()=>{}}function B3(t){return Gy(t,"spacing",8)}function ap(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function JX(t,e){return n=>t.reduce((r,i)=>(r[i]=ap(e,n),r),{})}function eq(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=QX(n),s=JX(i,r),o=t[n];return jo(t,o,s)}function QF(t,e){const n=B3(t.theme);return Object.keys(t).map(r=>eq(t,e,r,n)).reduce(pv,{})}function yi(t){return QF(t,U3)}yi.propTypes={};yi.filterProps=U3;function xi(t){return QF(t,z3)}xi.propTypes={};xi.filterProps=z3;function tq(t=8){if(t.mui)return t;const e=B3({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(s=>{const o=e(s);return typeof o=="number"?`${o}px`:o}).join(" ");return n.mui=!0,n}function Z2(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(s=>{r[s]=i}),r),{}),n=r=>Object.keys(r).reduce((i,s)=>e[s]?pv(i,e[s](r)):i,{});return n.propTypes={},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function tl(t){return typeof t!="number"?t:`${t}px solid`}function ml(t,e){return Ni({prop:t,themeKey:"borders",transform:e})}const nq=ml("border",tl),rq=ml("borderTop",tl),iq=ml("borderRight",tl),sq=ml("borderBottom",tl),oq=ml("borderLeft",tl),aq=ml("borderColor"),lq=ml("borderTopColor"),cq=ml("borderRightColor"),uq=ml("borderBottomColor"),dq=ml("borderLeftColor"),fq=ml("outline",tl),hq=ml("outlineColor"),Y2=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=Gy(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:ap(e,r)});return jo(t,t.borderRadius,n)}return null};Y2.propTypes={};Y2.filterProps=["borderRadius"];Z2(nq,rq,iq,sq,oq,aq,lq,cq,uq,dq,Y2,fq,hq);const K2=t=>{if(t.gap!==void 0&&t.gap!==null){const e=Gy(t.theme,"spacing",8),n=r=>({gap:ap(e,r)});return jo(t,t.gap,n)}return null};K2.propTypes={};K2.filterProps=["gap"];const Q2=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=Gy(t.theme,"spacing",8),n=r=>({columnGap:ap(e,r)});return jo(t,t.columnGap,n)}return null};Q2.propTypes={};Q2.filterProps=["columnGap"];const J2=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=Gy(t.theme,"spacing",8),n=r=>({rowGap:ap(e,r)});return jo(t,t.rowGap,n)}return null};J2.propTypes={};J2.filterProps=["rowGap"];const pq=Ni({prop:"gridColumn"}),mq=Ni({prop:"gridRow"}),gq=Ni({prop:"gridAutoFlow"}),vq=Ni({prop:"gridAutoColumns"}),yq=Ni({prop:"gridAutoRows"}),xq=Ni({prop:"gridTemplateColumns"}),_q=Ni({prop:"gridTemplateRows"}),bq=Ni({prop:"gridTemplateAreas"}),Sq=Ni({prop:"gridArea"});Z2(K2,Q2,J2,pq,mq,gq,vq,yq,xq,_q,bq,Sq);function y0(t,e){return e==="grey"?e:t}const wq=Ni({prop:"color",themeKey:"palette",transform:y0}),Mq=Ni({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:y0}),Eq=Ni({prop:"backgroundColor",themeKey:"palette",transform:y0});Z2(wq,Mq,Eq);function ya(t){return t<=1&&t!==0?`${t*100}%`:t}const Cq=Ni({prop:"width",transform:ya}),H3=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const s=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||F3[n];return s?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${s}${t.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:ya(n)}};return jo(t,t.maxWidth,e)}return null};H3.filterProps=["maxWidth"];const Tq=Ni({prop:"minWidth",transform:ya}),Aq=Ni({prop:"height",transform:ya}),Rq=Ni({prop:"maxHeight",transform:ya}),Pq=Ni({prop:"minHeight",transform:ya});Ni({prop:"size",cssProperty:"width",transform:ya});Ni({prop:"size",cssProperty:"height",transform:ya});const Iq=Ni({prop:"boxSizing"});Z2(Cq,H3,Tq,Aq,Rq,Pq,Iq);const Lq={border:{themeKey:"borders",transform:tl},borderTop:{themeKey:"borders",transform:tl},borderRight:{themeKey:"borders",transform:tl},borderBottom:{themeKey:"borders",transform:tl},borderLeft:{themeKey:"borders",transform:tl},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:tl},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Y2},color:{themeKey:"palette",transform:y0},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:y0},backgroundColor:{themeKey:"palette",transform:y0},p:{style:xi},pt:{style:xi},pr:{style:xi},pb:{style:xi},pl:{style:xi},px:{style:xi},py:{style:xi},padding:{style:xi},paddingTop:{style:xi},paddingRight:{style:xi},paddingBottom:{style:xi},paddingLeft:{style:xi},paddingX:{style:xi},paddingY:{style:xi},paddingInline:{style:xi},paddingInlineStart:{style:xi},paddingInlineEnd:{style:xi},paddingBlock:{style:xi},paddingBlockStart:{style:xi},paddingBlockEnd:{style:xi},m:{style:yi},mt:{style:yi},mr:{style:yi},mb:{style:yi},ml:{style:yi},mx:{style:yi},my:{style:yi},margin:{style:yi},marginTop:{style:yi},marginRight:{style:yi},marginBottom:{style:yi},marginLeft:{style:yi},marginX:{style:yi},marginY:{style:yi},marginInline:{style:yi},marginInlineStart:{style:yi},marginInlineEnd:{style:yi},marginBlock:{style:yi},marginBlockStart:{style:yi},marginBlockEnd:{style:yi},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:K2},rowGap:{style:J2},columnGap:{style:Q2},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ya},maxWidth:{style:H3},minWidth:{transform:ya},height:{transform:ya},maxHeight:{transform:ya},minHeight:{transform:ya},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Xy=Lq;function kq(...t){const e=t.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function Oq(t,e){return typeof t=="function"?t(e):t}function JF(){function t(n,r,i,s){const o={[n]:r,theme:i},a=s[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:f,style:p}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const g=q2(i,c)||{};return p?p(o):jo(o,r,x=>{let _=a2(g,f,x);return x===_&&typeof x=="string"&&(_=a2(g,f,`${n}${x==="default"?"":gt(x)}`,x)),l===!1?_:{[l]:_}})}function e(n){var r;const{sx:i,theme:s={}}=n||{};if(!i)return null;const o=(r=s.unstable_sxConfig)!=null?r:Xy;function a(l){let c=l;if(typeof l=="function")c=l(s);else if(typeof l!="object")return l;if(!c)return null;const f=YF(s.breakpoints),p=Object.keys(f);let g=f;return Object.keys(c).forEach(v=>{const x=Oq(c[v],s);if(x!=null)if(typeof x=="object")if(o[v])g=pv(g,t(v,x,s,o));else{const _=jo({theme:s},x,b=>({[v]:b}));kq(_,x)?g[v]=e({sx:x,theme:s}):g=pv(g,_)}else g=pv(g,t(v,x,s,o))}),KF(p,g)}return Array.isArray(i)?i.map(a):a(i)}return e}const cg=JF();cg.filterProps=["sx"];function e8(t,e){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:n.palette.mode===t?e:{}}const Nq=["breakpoints","palette","spacing","shape"];function qy(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:s={}}=t,o=Rt(t,Nq),a=ZF(n),l=tq(i);let c=vo({breakpoints:a,direction:"ltr",components:{},palette:X({mode:"light"},r),spacing:l,shape:X({},WX,s)},o);return c.applyStyles=e8,c=e.reduce((f,p)=>vo(f,p),c),c.unstable_sxConfig=X({},Xy,o==null?void 0:o.unstable_sxConfig),c.unstable_sx=function(p){return cg({sx:p,theme:this})},c}const Dq=Object.freeze(Object.defineProperty({__proto__:null,default:qy,private_createBreakpoints:ZF,unstable_applyStyles:e8},Symbol.toStringTag,{value:"Module"}));function t8(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Fq=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Uq=t8(function(t){return Fq.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function zq(t){if(t.sheet)return t.sheet;for(var e=0;e0?Ls(ug,--Go):0,V0--,Vi===10&&(V0=1,tw--),Vi}function wa(){return Vi=Go2||jv(Vi)>3?"":" "}function Qq(t,e){for(;--e&&wa()&&!(Vi<48||Vi>102||Vi>57&&Vi<65||Vi>70&&Vi<97););return Zy(t,yS()+(e<6&&Ac()==32&&wa()==32))}function cT(t){for(;wa();)switch(Vi){case t:return Go;case 34:case 39:t!==34&&t!==39&&cT(Vi);break;case 40:t===41&&cT(t);break;case 92:wa();break}return Go}function Jq(t,e){for(;wa()&&t+Vi!==57;)if(t+Vi===84&&Ac()===47)break;return"/*"+Zy(e,Go-1)+"*"+ew(t===47?t:wa())}function eZ(t){for(;!jv(Ac());)wa();return Zy(t,Go)}function tZ(t){return a8(_S("",null,null,null,[""],t=o8(t),0,[0],t))}function _S(t,e,n,r,i,s,o,a,l){for(var c=0,f=0,p=o,g=0,v=0,x=0,_=1,b=1,y=1,S=0,w="",T=i,L=s,R=r,P=w;b;)switch(x=S,S=wa()){case 40:if(x!=108&&Ls(P,p-1)==58){lT(P+=pr(xS(S),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:P+=xS(S);break;case 9:case 10:case 13:case 32:P+=Kq(x);break;case 92:P+=Qq(yS()-1,7);continue;case 47:switch(Ac()){case 42:case 47:H_(nZ(Jq(wa(),yS()),e,n),l);break;default:P+="/"}break;case 123*_:a[c++]=bc(P)*y;case 125*_:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+f:y==-1&&(P=pr(P,/\f/g,"")),v>0&&bc(P)-p&&H_(v>32?eL(P+";",r,n,p-1):eL(pr(P," ","")+";",r,n,p-2),l);break;case 59:P+=";";default:if(H_(R=JI(P,e,n,c,f,i,a,w,T=[],L=[],p),s),S===123)if(f===0)_S(P,e,R,R,T,s,p,a,L);else switch(g===99&&Ls(P,3)===110?100:g){case 100:case 108:case 109:case 115:_S(t,R,R,r&&H_(JI(t,R,R,0,0,i,a,w,i,T=[],p),L),i,L,p,a,r?T:L);break;default:_S(P,R,R,R,[""],L,0,a,L)}}c=f=v=0,_=y=1,w=P="",p=o;break;case 58:p=1+bc(P),v=x;default:if(_<1){if(S==123)--_;else if(S==125&&_++==0&&Yq()==125)continue}switch(P+=ew(S),S*_){case 38:y=f>0?1:(P+="\f",-1);break;case 44:a[c++]=(bc(P)-1)*y,y=1;break;case 64:Ac()===45&&(P+=xS(wa())),g=Ac(),f=p=bc(w=P+=eZ(yS())),S++;break;case 45:x===45&&bc(P)==2&&(_=0)}}return s}function JI(t,e,n,r,i,s,o,a,l,c,f){for(var p=i-1,g=i===0?s:[""],v=W3(g),x=0,_=0,b=0;x0?g[y]+" "+S:pr(S,/&\f/g,g[y])))&&(l[b++]=w);return nw(t,e,n,i===0?$3:a,l,c,f)}function nZ(t,e,n){return nw(t,e,n,n8,ew(Zq()),Wv(t,2,-2),0)}function eL(t,e,n,r){return nw(t,e,n,V3,Wv(t,0,r),Wv(t,r+1,-1),r)}function x0(t,e){for(var n="",r=W3(t),i=0;i6)switch(Ls(t,e+1)){case 109:if(Ls(t,e+4)!==45)break;case 102:return pr(t,/(.+:)(.+)-([^]+)/,"$1"+hr+"$2-$3$1"+l2+(Ls(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~lT(t,"stretch")?l8(pr(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Ls(t,e+1)!==115)break;case 6444:switch(Ls(t,bc(t)-3-(~lT(t,"!important")&&10))){case 107:return pr(t,":",":"+hr)+t;case 101:return pr(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+hr+(Ls(t,14)===45?"inline-":"")+"box$3$1"+hr+"$2$3$1"+js+"$2box$3")+t}break;case 5936:switch(Ls(t,e+11)){case 114:return hr+t+js+pr(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return hr+t+js+pr(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return hr+t+js+pr(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return hr+t+js+t+t}return t}var dZ=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case V3:e.return=l8(e.value,e.length);break;case r8:return x0([S1(e,{value:pr(e.value,"@","@"+hr)})],i);case $3:if(e.length)return qq(e.props,function(s){switch(Xq(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return x0([S1(e,{props:[pr(s,/:(read-\w+)/,":"+l2+"$1")]})],i);case"::placeholder":return x0([S1(e,{props:[pr(s,/:(plac\w+)/,":"+hr+"input-$1")]}),S1(e,{props:[pr(s,/:(plac\w+)/,":"+l2+"$1")]}),S1(e,{props:[pr(s,/:(plac\w+)/,js+"input-$1")]})],i)}return""})}},fZ=[dZ],c8=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(_){var b=_.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(_),_.setAttribute("data-s",""))})}var i=e.stylisPlugins||fZ,s={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(_){for(var b=_.getAttribute("data-emotion").split(" "),y=1;y=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var MZ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},EZ=/[A-Z]|^ms/g,CZ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,g8=function(e){return e.charCodeAt(1)===45},nL=function(e){return e!=null&&typeof e!="boolean"},UE=t8(function(t){return g8(t)?t:t.replace(EZ,"-$&").toLowerCase()}),rL=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(CZ,function(r,i,s){return Sc={name:i,styles:s,next:Sc},i})}return MZ[e]!==1&&!g8(e)&&typeof n=="number"&&n!==0?n+"px":n};function Gv(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Sc={name:n.name,styles:n.styles,next:Sc},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Sc={name:r.name,styles:r.styles,next:Sc},r=r.next;var i=n.styles+";";return i}return TZ(t,e,n)}case"function":{if(t!==void 0){var s=Sc,o=n(t);return Sc=s,Gv(t,e,o)}break}}if(e==null)return n;var a=e[n];return a!==void 0?a:n}function TZ(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i96?LZ:kZ},lL=function(e,n,r){var i;if(n){var s=n.shouldForwardProp;i=e.__emotion_forwardProp&&s?function(o){return e.__emotion_forwardProp(o)&&s(o)}:s}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},OZ=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return p8(n,r,i),RZ(function(){return m8(n,r,i)}),null},NZ=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,s,o;n!==void 0&&(s=n.label,o=n.target);var a=lL(e,n,r),l=a||aL(i),c=!l("as");return function(){var f=arguments,p=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(s!==void 0&&p.push("label:"+s+";"),f[0]==null||f[0].raw===void 0)p.push.apply(p,f);else{p.push(f[0][0]);for(var g=f.length,v=1;ve(UZ(i)?n:i):e;return C.jsx(IZ,{styles:r})}function Z3(t,e){return uT(t,e)}const S8=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},zZ=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:b8,StyledEngineProvider:FZ,ThemeContext:Yy,css:hw,default:Z3,internal_processStyles:S8,keyframes:dg},Symbol.toStringTag,{value:"Module"}));function BZ(t){return Object.keys(t).length===0}function w8(t=null){const e=D.useContext(Yy);return!e||BZ(e)?t:e}const HZ=qy();function pw(t=HZ){return w8(t)}function M8({props:t,name:e,defaultTheme:n,themeId:r}){let i=pw(n);return r&&(i=i[r]||i),zX({theme:i,name:e,props:t})}const $Z=["sx"],VZ=t=>{var e,n;const r={systemProps:{},otherProps:{}},i=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:Xy;return Object.keys(t).forEach(s=>{i[s]?r.systemProps[s]=t[s]:r.otherProps[s]=t[s]}),r};function Ky(t){const{sx:e}=t,n=Rt(t,$Z),{systemProps:r,otherProps:i}=VZ(n);let s;return Array.isArray(e)?s=[r,...e]:typeof e=="function"?s=(...o)=>{const a=e(...o);return yu(a)?X({},r,a):r}:s=X({},r,e),X({},i,{sx:s})}const WZ=Object.freeze(Object.defineProperty({__proto__:null,default:cg,extendSxProp:Ky,unstable_createStyleFunctionSx:JF,unstable_defaultSxConfig:Xy},Symbol.toStringTag,{value:"Module"})),cL=t=>t,jZ=()=>{let t=cL;return{configure(e){t=e},generate(e){return t(e)},reset(){t=cL}}},GZ=jZ(),Y3=GZ,E8={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function bn(t,e,n="Mui"){const r=E8[e];return r?`${n}-${r}`:`${Y3.generate(t)}-${e}`}function XZ(t,e){return X({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}var Di={},C8={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(C8);var pf=C8.exports;const qZ=Uu(XX);function $m(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const ZZ=Object.freeze(Object.defineProperty({__proto__:null,default:$m},Symbol.toStringTag,{value:"Module"})),YZ=Uu(ZZ);var T8=pf;Object.defineProperty(Di,"__esModule",{value:!0});var qn=Di.alpha=I8;Di.blend=aY;Di.colorChannel=void 0;var Xv=Di.darken=Q3;Di.decomposeColor=ul;Di.emphasize=L8;var KZ=Di.getContrastRatio=nY;Di.getLuminance=c2;Di.hexToRgb=A8;Di.hslToRgb=P8;var qv=Di.lighten=J3;Di.private_safeAlpha=rY;Di.private_safeColorChannel=void 0;Di.private_safeDarken=iY;Di.private_safeEmphasize=oY;Di.private_safeLighten=sY;Di.recomposeColor=fg;Di.rgbToHex=tY;var uL=T8(qZ),QZ=T8(YZ);function K3(t,e=0,n=1){return(0,QZ.default)(t,e,n)}function A8(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function JZ(t){const e=t.toString(16);return e.length===1?`0${e}`:e}function ul(t){if(t.type)return t;if(t.charAt(0)==="#")return ul(A8(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,uL.default)(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,uL.default)(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}const R8=t=>{const e=ul(t);return e.values.slice(0,3).map((n,r)=>e.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Di.colorChannel=R8;const eY=(t,e)=>{try{return R8(t)}catch{return t}};Di.private_safeColorChannel=eY;function fg(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,s)=>s<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function tY(t){if(t.indexOf("#")===0)return t;const{values:e}=ul(t);return`#${e.map((n,r)=>JZ(r===3?Math.round(255*n):n)).join("")}`}function P8(t){t=ul(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,s=r*Math.min(i,1-i),o=(c,f=(c+n/30)%12)=>i-s*Math.max(Math.min(f-3,9-f,1),-1);let a="rgb";const l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),fg({type:a,values:l})}function c2(t){t=ul(t);let e=t.type==="hsl"||t.type==="hsla"?ul(P8(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function nY(t,e){const n=c2(t),r=c2(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function I8(t,e){return t=ul(t),e=K3(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,fg(t)}function rY(t,e,n){try{return I8(t,e)}catch{return t}}function Q3(t,e){if(t=ul(t),e=K3(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return fg(t)}function iY(t,e,n){try{return Q3(t,e)}catch{return t}}function J3(t,e){if(t=ul(t),e=K3(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return fg(t)}function sY(t,e,n){try{return J3(t,e)}catch{return t}}function L8(t,e=.15){return c2(t)>.5?Q3(t,e):J3(t,e)}function oY(t,e,n){try{return L8(t,e)}catch{return t}}function aY(t,e,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),s=ul(t),o=ul(e),a=[i(s.values[0],o.values[0]),i(s.values[1],o.values[1]),i(s.values[2],o.values[2])];return fg({type:"rgb",values:a})}const lY={black:"#000",white:"#fff"},Zv=lY,cY={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},uY=cY,dY={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},lm=dY,fY={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},cm=fY,hY={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},w1=hY,pY={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},um=pY,mY={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},dm=mY,gY={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},fm=gY,vY=["mode","contrastThreshold","tonalOffset"],dL={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Zv.white,default:Zv.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},BE={text:{primary:Zv.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Zv.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function fL(t,e,n,r){const i=r.light||r,s=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=qv(t.main,i):e==="dark"&&(t.dark=Xv(t.main,s)))}function yY(t="light"){return t==="dark"?{main:um[200],light:um[50],dark:um[400]}:{main:um[700],light:um[400],dark:um[800]}}function xY(t="light"){return t==="dark"?{main:lm[200],light:lm[50],dark:lm[400]}:{main:lm[500],light:lm[300],dark:lm[700]}}function _Y(t="light"){return t==="dark"?{main:cm[500],light:cm[300],dark:cm[700]}:{main:cm[700],light:cm[400],dark:cm[800]}}function bY(t="light"){return t==="dark"?{main:dm[400],light:dm[300],dark:dm[700]}:{main:dm[700],light:dm[500],dark:dm[900]}}function SY(t="light"){return t==="dark"?{main:fm[400],light:fm[300],dark:fm[700]}:{main:fm[800],light:fm[500],dark:fm[900]}}function wY(t="light"){return t==="dark"?{main:w1[400],light:w1[300],dark:w1[700]}:{main:"#ed6c02",light:w1[500],dark:w1[900]}}function MY(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=Rt(t,vY),s=t.primary||yY(e),o=t.secondary||xY(e),a=t.error||_Y(e),l=t.info||bY(e),c=t.success||SY(e),f=t.warning||wY(e);function p(_){return KZ(_,BE.text.primary)>=n?BE.text.primary:dL.text.primary}const g=({color:_,name:b,mainShade:y=500,lightShade:S=300,darkShade:w=700})=>{if(_=X({},_),!_.main&&_[y]&&(_.main=_[y]),!_.hasOwnProperty("main"))throw new Error(op(11,b?` (${b})`:"",y));if(typeof _.main!="string")throw new Error(op(12,b?` (${b})`:"",JSON.stringify(_.main)));return fL(_,"light",S,r),fL(_,"dark",w,r),_.contrastText||(_.contrastText=p(_.main)),_},v={dark:BE,light:dL};return vo(X({common:X({},Zv),mode:e,primary:g({color:s,name:"primary"}),secondary:g({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:a,name:"error"}),warning:g({color:f,name:"warning"}),info:g({color:l,name:"info"}),success:g({color:c,name:"success"}),grey:uY,contrastThreshold:n,getContrastText:p,augmentColor:g,tonalOffset:r},v[e]),i)}const EY=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function CY(t){return Math.round(t*1e5)/1e5}const hL={textTransform:"uppercase"},pL='"Roboto", "Helvetica", "Arial", sans-serif';function TY(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=pL,fontSize:i=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:f,pxToRem:p}=n,g=Rt(n,EY),v=i/14,x=p||(y=>`${y/c*v}rem`),_=(y,S,w,T,L)=>X({fontFamily:r,fontWeight:y,fontSize:x(S),lineHeight:w},r===pL?{letterSpacing:`${CY(T/S)}em`}:{},L,f),b={h1:_(s,96,1.167,-1.5),h2:_(s,60,1.2,-.5),h3:_(o,48,1.167,0),h4:_(o,34,1.235,.25),h5:_(o,24,1.334,0),h6:_(a,20,1.6,.15),subtitle1:_(o,16,1.75,.15),subtitle2:_(a,14,1.57,.1),body1:_(o,16,1.5,.15),body2:_(o,14,1.43,.15),button:_(a,14,1.75,.4,hL),caption:_(o,12,1.66,.4),overline:_(o,12,2.66,1,hL),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return vo(X({htmlFontSize:c,pxToRem:x,fontFamily:r,fontSize:i,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},b),g,{clone:!1})}const AY=.2,RY=.14,PY=.12;function Jr(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${AY})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${RY})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${PY})`].join(",")}const IY=["none",Jr(0,2,1,-1,0,1,1,0,0,1,3,0),Jr(0,3,1,-2,0,2,2,0,0,1,5,0),Jr(0,3,3,-2,0,3,4,0,0,1,8,0),Jr(0,2,4,-1,0,4,5,0,0,1,10,0),Jr(0,3,5,-1,0,5,8,0,0,1,14,0),Jr(0,3,5,-1,0,6,10,0,0,1,18,0),Jr(0,4,5,-2,0,7,10,1,0,2,16,1),Jr(0,5,5,-3,0,8,10,1,0,3,14,2),Jr(0,5,6,-3,0,9,12,1,0,3,16,2),Jr(0,6,6,-3,0,10,14,1,0,4,18,3),Jr(0,6,7,-4,0,11,15,1,0,4,20,3),Jr(0,7,8,-4,0,12,17,2,0,5,22,4),Jr(0,7,8,-4,0,13,19,2,0,5,24,4),Jr(0,7,9,-4,0,14,21,2,0,5,26,4),Jr(0,8,9,-5,0,15,22,2,0,6,28,5),Jr(0,8,10,-5,0,16,24,2,0,6,30,5),Jr(0,8,11,-5,0,17,26,2,0,6,32,5),Jr(0,9,11,-5,0,18,28,2,0,7,34,6),Jr(0,9,12,-6,0,19,29,2,0,7,36,6),Jr(0,10,13,-6,0,20,31,3,0,8,38,7),Jr(0,10,13,-6,0,21,33,3,0,8,40,7),Jr(0,10,14,-6,0,22,35,3,0,8,42,7),Jr(0,11,14,-7,0,23,36,3,0,9,44,8),Jr(0,11,15,-7,0,24,38,3,0,9,46,8)],LY=["duration","easing","delay"],kY={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},k8={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function mL(t){return`${Math.round(t)}ms`}function OY(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function NY(t){const e=X({},kY,t.easing),n=X({},k8,t.duration);return X({getAutoHeightDuration:OY,create:(i=["all"],s={})=>{const{duration:o=n.standard,easing:a=e.easeInOut,delay:l=0}=s;return Rt(s,LY),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof o=="string"?o:mL(o)} ${a} ${typeof l=="string"?l:mL(l)}`).join(",")}},t,{easing:e,duration:n})}const DY={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},FY=DY,UY=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function eR(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:s={}}=t,o=Rt(t,UY);if(t.vars)throw new Error(op(18));const a=MY(r),l=qy(t);let c=vo(l,{mixins:XZ(l.breakpoints,n),palette:a,shadows:IY.slice(),typography:TY(a,s),transitions:NY(i),zIndex:X({},FY)});return c=vo(c,o),c=e.reduce((f,p)=>vo(f,p),c),c.unstable_sxConfig=X({},Xy,o==null?void 0:o.unstable_sxConfig),c.unstable_sx=function(p){return cg({sx:p,theme:this})},c}const zY=eR(),mw=zY,lp="$$material";function En({props:t,name:e}){return M8({props:t,name:e,defaultTheme:mw,themeId:lp})}function BY({styles:t,themeId:e,defaultTheme:n={}}){const r=pw(n),i=typeof t=="function"?t(e&&r[e]||r):t;return C.jsx(b8,{styles:i})}function O8(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;ea!=="theme"&&a!=="sx"&&a!=="as"})(cg);return D.forwardRef(function(l,c){const f=pw(n),p=Ky(l),{className:g,component:v="div"}=p,x=Rt(p,HY);return C.jsx(s,X({as:v,ref:c,className:N8(g,i?i(r):r),theme:e&&f[e]||f},x))})}function pn(t,e,n="Mui"){const r={};return e.forEach(i=>{r[i]=bn(t,i,n)}),r}var D8={exports:{}},Er={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var tR=Symbol.for("react.element"),nR=Symbol.for("react.portal"),gw=Symbol.for("react.fragment"),vw=Symbol.for("react.strict_mode"),yw=Symbol.for("react.profiler"),xw=Symbol.for("react.provider"),_w=Symbol.for("react.context"),VY=Symbol.for("react.server_context"),bw=Symbol.for("react.forward_ref"),Sw=Symbol.for("react.suspense"),ww=Symbol.for("react.suspense_list"),Mw=Symbol.for("react.memo"),Ew=Symbol.for("react.lazy"),WY=Symbol.for("react.offscreen"),F8;F8=Symbol.for("react.module.reference");function gl(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case tR:switch(t=t.type,t){case gw:case yw:case vw:case Sw:case ww:return t;default:switch(t=t&&t.$$typeof,t){case VY:case _w:case bw:case Ew:case Mw:case xw:return t;default:return e}}case nR:return e}}}Er.ContextConsumer=_w;Er.ContextProvider=xw;Er.Element=tR;Er.ForwardRef=bw;Er.Fragment=gw;Er.Lazy=Ew;Er.Memo=Mw;Er.Portal=nR;Er.Profiler=yw;Er.StrictMode=vw;Er.Suspense=Sw;Er.SuspenseList=ww;Er.isAsyncMode=function(){return!1};Er.isConcurrentMode=function(){return!1};Er.isContextConsumer=function(t){return gl(t)===_w};Er.isContextProvider=function(t){return gl(t)===xw};Er.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===tR};Er.isForwardRef=function(t){return gl(t)===bw};Er.isFragment=function(t){return gl(t)===gw};Er.isLazy=function(t){return gl(t)===Ew};Er.isMemo=function(t){return gl(t)===Mw};Er.isPortal=function(t){return gl(t)===nR};Er.isProfiler=function(t){return gl(t)===yw};Er.isStrictMode=function(t){return gl(t)===vw};Er.isSuspense=function(t){return gl(t)===Sw};Er.isSuspenseList=function(t){return gl(t)===ww};Er.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===gw||t===yw||t===vw||t===Sw||t===ww||t===WY||typeof t=="object"&&t!==null&&(t.$$typeof===Ew||t.$$typeof===Mw||t.$$typeof===xw||t.$$typeof===_w||t.$$typeof===bw||t.$$typeof===F8||t.getModuleId!==void 0)};Er.typeOf=gl;D8.exports=Er;var gL=D8.exports;const jY=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function U8(t){const e=`${t}`.match(jY);return e&&e[1]||""}function z8(t,e=""){return t.displayName||t.name||U8(t)||e}function vL(t,e,n){const r=z8(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function GY(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return z8(t,"Component");if(typeof t=="object")switch(t.$$typeof){case gL.ForwardRef:return vL(t,t.render,"ForwardRef");case gL.Memo:return vL(t,t.type,"memo");default:return}}}const XY=Object.freeze(Object.defineProperty({__proto__:null,default:GY,getFunctionName:U8},Symbol.toStringTag,{value:"Module"})),qY=["ownerState"],ZY=["variants"],YY=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function KY(t){return Object.keys(t).length===0}function QY(t){return typeof t=="string"&&t.charCodeAt(0)>96}function HE(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const JY=qy(),eK=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function $_({defaultTheme:t,theme:e,themeId:n}){return KY(e)?t:e[n]||e}function tK(t){return t?(e,n)=>n[t]:null}function bS(t,e){let{ownerState:n}=e,r=Rt(e,qY);const i=typeof t=="function"?t(X({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(s=>bS(s,X({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:s=[]}=i;let a=Rt(i,ZY);return s.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props(X({ownerState:n},r,n)):Object.keys(l.props).forEach(f=>{(n==null?void 0:n[f])!==l.props[f]&&r[f]!==l.props[f]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style(X({ownerState:n},r,n)):l.style))}),a}return i}function nK(t={}){const{themeId:e,defaultTheme:n=JY,rootShouldForwardProp:r=HE,slotShouldForwardProp:i=HE}=t,s=o=>cg(X({},o,{theme:$_(X({},o,{defaultTheme:n,themeId:e}))}));return s.__mui_systemSx=!0,(o,a={})=>{S8(o,L=>L.filter(R=>!(R!=null&&R.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:f,skipSx:p,overridesResolver:g=tK(eK(c))}=a,v=Rt(a,YY),x=f!==void 0?f:c&&c!=="Root"&&c!=="root"||!1,_=p||!1;let b,y=HE;c==="Root"||c==="root"?y=r:c?y=i:QY(o)&&(y=void 0);const S=Z3(o,X({shouldForwardProp:y,label:b},v)),w=L=>typeof L=="function"&&L.__emotion_real!==L||yu(L)?R=>bS(L,X({},R,{theme:$_({theme:R.theme,defaultTheme:n,themeId:e})})):L,T=(L,...R)=>{let P=w(L);const F=R?R.map(w):[];l&&g&&F.push(H=>{const Q=$_(X({},H,{defaultTheme:n,themeId:e}));if(!Q.components||!Q.components[l]||!Q.components[l].styleOverrides)return null;const q=Q.components[l].styleOverrides,le={};return Object.entries(q).forEach(([ie,ee])=>{le[ie]=bS(ee,X({},H,{theme:Q}))}),g(H,le)}),l&&!x&&F.push(H=>{var Q;const q=$_(X({},H,{defaultTheme:n,themeId:e})),le=q==null||(Q=q.components)==null||(Q=Q[l])==null?void 0:Q.variants;return bS({variants:le},X({},H,{theme:q}))}),_||F.push(s);const O=F.length-R.length;if(Array.isArray(L)&&O>0){const H=new Array(O).fill("");P=[...L,...H],P.raw=[...L.raw,...H]}const I=S(P,...F);return o.muiName&&(I.muiName=o.muiName),I};return S.withConfig&&(T.withConfig=S.withConfig),T}}const B8=nK(),Xo=typeof window<"u"?D.useLayoutEffect:D.useEffect;function fT(...t){return t.reduce((e,n)=>n==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function Qy(t,e=166){let n;function r(...i){const s=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(s,e)}return r.clear=()=>{clearTimeout(n)},r}function rK(t,e){return()=>null}function mv(t,e){var n,r;return D.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(r=t.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Oi(t){return t&&t.ownerDocument||document}function Oc(t){return Oi(t).defaultView||window}function iK(t,e){return()=>null}function Yv(t,e){typeof t=="function"?t(e):t&&(t.current=e)}let yL=0;function sK(t){const[e,n]=D.useState(t),r=t||e;return D.useEffect(()=>{e==null&&(yL+=1,n(`mui-${yL}`))},[e]),r}const xL=pC.useId;function hg(t){if(xL!==void 0){const e=xL();return t??e}return sK(t)}function oK(t,e,n,r,i){return null}function Cu({controlled:t,default:e,name:n,state:r="value"}){const{current:i}=D.useRef(t!==void 0),[s,o]=D.useState(e),a=i?t:s,l=D.useCallback(c=>{i||o(c)},[]);return[a,l]}function ts(t){const e=D.useRef(t);return Xo(()=>{e.current=t}),D.useRef((...n)=>(0,e.current)(...n)).current}function Kr(...t){return D.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{Yv(n,e)})},t)}const _L={};function aK(t,e){const n=D.useRef(_L);return n.current===_L&&(n.current=t(e)),n}const lK=[];function cK(t){D.useEffect(t,lK)}class Jy{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Jy}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function Ah(){const t=aK(Jy.create).current;return cK(t.disposeEffect),t}let Cw=!0,hT=!1;const uK=new Jy,dK={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function fK(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&dK[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function hK(t){t.metaKey||t.altKey||t.ctrlKey||(Cw=!0)}function $E(){Cw=!1}function pK(){this.visibilityState==="hidden"&&hT&&(Cw=!0)}function mK(t){t.addEventListener("keydown",hK,!0),t.addEventListener("mousedown",$E,!0),t.addEventListener("pointerdown",$E,!0),t.addEventListener("touchstart",$E,!0),t.addEventListener("visibilitychange",pK,!0)}function gK(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return Cw||fK(e)}function Tw(){const t=D.useCallback(i=>{i!=null&&mK(i.ownerDocument)},[]),e=D.useRef(!1);function n(){return e.current?(hT=!0,uK.start(100,()=>{hT=!1}),e.current=!1,!0):!1}function r(i){return gK(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function H8(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}let hm;function $8(){if(hm)return hm;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),hm="reverse",t.scrollLeft>0?hm="default":(t.scrollLeft=1,t.scrollLeft===0&&(hm="negative")),document.body.removeChild(t),hm}function vK(t,e){const n=t.scrollLeft;if(e!=="rtl")return n;switch($8()){case"negative":return t.scrollWidth-t.clientWidth+n;case"reverse":return t.scrollWidth-t.clientWidth-n;default:return n}}const yK=t=>{const e=D.useRef({});return D.useEffect(()=>{e.current=t}),e.current},xK={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},_K=xK;function Sn(t,e,n=void 0){const r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((s,o)=>{if(o){const a=e(o);a!==""&&s.push(a),n&&n[o]&&s.push(n[o])}return s},[]).join(" ")}),r}const bK=D.createContext(null),V8=bK;function W8(){return D.useContext(V8)}const SK=typeof Symbol=="function"&&Symbol.for,wK=SK?Symbol.for("mui.nested"):"__THEME_NESTED__";function MK(t,e){return typeof e=="function"?e(t):X({},t,e)}function EK(t){const{children:e,theme:n}=t,r=W8(),i=D.useMemo(()=>{const s=r===null?n:MK(r,n);return s!=null&&(s[wK]=r!==null),s},[n,r]);return C.jsx(V8.Provider,{value:i,children:e})}const CK=["value"],j8=D.createContext();function TK(t){let{value:e}=t,n=Rt(t,CK);return C.jsx(j8.Provider,X({value:e??!0},n))}const ex=()=>{const t=D.useContext(j8);return t??!1},bL={};function SL(t,e,n,r=!1){return D.useMemo(()=>{const i=t&&e[t]||e;if(typeof n=="function"){const s=n(i),o=t?X({},e,{[t]:s}):s;return r?()=>o:o}return t?X({},e,{[t]:n}):X({},e,n)},[t,e,n,r])}function AK(t){const{children:e,theme:n,themeId:r}=t,i=w8(bL),s=W8()||bL,o=SL(r,i,n),a=SL(r,s,n,!0),l=o.direction==="rtl";return C.jsx(EK,{theme:a,children:C.jsx(Yy.Provider,{value:o,children:C.jsx(TK,{value:l,children:e})})})}const RK=["component","direction","spacing","divider","children","className","useFlexGap"],PK=qy(),IK=B8("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function LK(t){return M8({props:t,name:"MuiStack",defaultTheme:PK})}function kK(t,e){const n=D.Children.toArray(t).filter(Boolean);return n.reduce((r,i,s)=>(r.push(i),s({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],NK=({ownerState:t,theme:e})=>{let n=X({display:"flex",flexDirection:"column"},jo({theme:e},Xh({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=B3(e),i=Object.keys(e.breakpoints.values).reduce((l,c)=>((typeof t.spacing=="object"&&t.spacing[c]!=null||typeof t.direction=="object"&&t.direction[c]!=null)&&(l[c]=!0),l),{}),s=Xh({values:t.direction,base:i}),o=Xh({values:t.spacing,base:i});typeof s=="object"&&Object.keys(s).forEach((l,c,f)=>{if(!s[l]){const g=c>0?s[f[c-1]]:"column";s[l]=g}}),n=vo(n,jo({theme:e},o,(l,c)=>t.useFlexGap?{gap:ap(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${OK(c?s[c]:t.direction)}`]:ap(r,l)}}))}return n=jX(e.breakpoints,n),n};function DK(t={}){const{createStyledComponent:e=IK,useThemeProps:n=LK,componentName:r="MuiStack"}=t,i=()=>Sn({root:["root"]},l=>bn(r,l),{}),s=e(NK);return D.forwardRef(function(l,c){const f=n(l),p=Ky(f),{component:g="div",direction:v="column",spacing:x=0,divider:_,children:b,className:y,useFlexGap:S=!1}=p,w=Rt(p,RK),T={direction:v,spacing:x,useFlexGap:S},L=i();return C.jsx(s,X({as:g,ownerState:T,ref:c,className:N8(L.root,y)},w,{children:_?kK(b,_):b}))})}function G8(t){return C.jsx(BY,X({},t,{defaultTheme:mw,themeId:lp}))}const FK=(t,e)=>X({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),UK=t=>X({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),zK=(t,e=!1)=>{var n;const r={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([o,a])=>{var l;r[t.getColorSchemeSelector(o).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let i=X({html:FK(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:X({margin:0},UK(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const s=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return s&&(i=[i,s]),i};function BK(t){const e=En({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return C.jsxs(D.Fragment,{children:[C.jsx(G8,{styles:i=>zK(i,r)}),n]})}function Bu(){const t=pw(mw);return t[lp]||t}var tx={},VE={exports:{}},wL;function HK(){return wL||(wL=1,function(t){function e(n,r){if(n==null)return{};var i={},s=Object.keys(n),o,a;for(a=0;a=0)&&(i[o]=n[o]);return i}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(VE)),VE.exports}const X8=Uu(zZ),$K=Uu(BX),VK=Uu(qX),WK=Uu(XY),jK=Uu(Dq),GK=Uu(WZ);var pg=pf;Object.defineProperty(tx,"__esModule",{value:!0});var XK=tx.default=oQ;tx.shouldForwardProp=SS;tx.systemDefaultTheme=void 0;var Za=pg(_8()),pT=pg(HK()),ML=eQ(X8),qK=$K;pg(VK);pg(WK);var ZK=pg(jK),YK=pg(GK);const KK=["ownerState"],QK=["variants"],JK=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function q8(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(q8=function(r){return r?n:e})(t)}function eQ(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var n=q8(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var o=i?Object.getOwnPropertyDescriptor(t,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=t[s]}return r.default=t,n&&n.set(t,r),r}function tQ(t){return Object.keys(t).length===0}function nQ(t){return typeof t=="string"&&t.charCodeAt(0)>96}function SS(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const rQ=tx.systemDefaultTheme=(0,ZK.default)(),iQ=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function V_({defaultTheme:t,theme:e,themeId:n}){return tQ(e)?t:e[n]||e}function sQ(t){return t?(e,n)=>n[t]:null}function wS(t,e){let{ownerState:n}=e,r=(0,pT.default)(e,KK);const i=typeof t=="function"?t((0,Za.default)({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(s=>wS(s,(0,Za.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:s=[]}=i;let a=(0,pT.default)(i,QK);return s.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,Za.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(f=>{(n==null?void 0:n[f])!==l.props[f]&&r[f]!==l.props[f]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,Za.default)({ownerState:n},r,n)):l.style))}),a}return i}function oQ(t={}){const{themeId:e,defaultTheme:n=rQ,rootShouldForwardProp:r=SS,slotShouldForwardProp:i=SS}=t,s=o=>(0,YK.default)((0,Za.default)({},o,{theme:V_((0,Za.default)({},o,{defaultTheme:n,themeId:e}))}));return s.__mui_systemSx=!0,(o,a={})=>{(0,ML.internal_processStyles)(o,L=>L.filter(R=>!(R!=null&&R.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:f,skipSx:p,overridesResolver:g=sQ(iQ(c))}=a,v=(0,pT.default)(a,JK),x=f!==void 0?f:c&&c!=="Root"&&c!=="root"||!1,_=p||!1;let b,y=SS;c==="Root"||c==="root"?y=r:c?y=i:nQ(o)&&(y=void 0);const S=(0,ML.default)(o,(0,Za.default)({shouldForwardProp:y,label:b},v)),w=L=>typeof L=="function"&&L.__emotion_real!==L||(0,qK.isPlainObject)(L)?R=>wS(L,(0,Za.default)({},R,{theme:V_({theme:R.theme,defaultTheme:n,themeId:e})})):L,T=(L,...R)=>{let P=w(L);const F=R?R.map(w):[];l&&g&&F.push(H=>{const Q=V_((0,Za.default)({},H,{defaultTheme:n,themeId:e}));if(!Q.components||!Q.components[l]||!Q.components[l].styleOverrides)return null;const q=Q.components[l].styleOverrides,le={};return Object.entries(q).forEach(([ie,ee])=>{le[ie]=wS(ee,(0,Za.default)({},H,{theme:Q}))}),g(H,le)}),l&&!x&&F.push(H=>{var Q;const q=V_((0,Za.default)({},H,{defaultTheme:n,themeId:e})),le=q==null||(Q=q.components)==null||(Q=Q[l])==null?void 0:Q.variants;return wS({variants:le},(0,Za.default)({},H,{theme:q}))}),_||F.push(s);const O=F.length-R.length;if(Array.isArray(L)&&O>0){const H=new Array(O).fill("");P=[...L,...H],P.raw=[...L.raw,...H]}const I=S(P,...F);return o.muiName&&(I.muiName=o.muiName),I};return S.withConfig&&(T.withConfig=S.withConfig),T}}function Aw(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const aQ=t=>Aw(t)&&t!=="classes",La=aQ,lt=XK({themeId:lp,defaultTheme:mw,rootShouldForwardProp:La}),lQ=["theme"];function cQ(t){let{theme:e}=t,n=Rt(t,lQ);const r=e[lp];return C.jsx(AK,X({},n,{themeId:r?lp:void 0,theme:r||e}))}const EL=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)},uQ={fontFamily:"'Roboto', sans-serif",fontSize:16,h1:{fontFamily:"'Exo 2', sans-serif",fontWeight:600,fontSize:"1.625rem"},h2:{fontFamily:"'Exo 2', sans-serif",fontWeight:600,fontSize:"1.325rem"},h3:{fontFamily:"'Exo 2', sans-serif",fontWeight:600,fontSize:"1.125rem"},h4:{fontFamily:"'Exo 2', sans-serif",fontWeight:500,fontSize:"1.125rem"},h5:{fontFamily:"'Exo 2', sans-serif",fontWeight:400,fontSize:"1.125rem"},h6:{fontFamily:"'Exo 2', sans-serif",fontWeight:600,fontSize:"1rem"}},W_={mode:"dark",accent:{main:"#4be09c"},primary:{light:"#4be09c",main:"#33c69d",dark:"#008675"},secondary:{light:"#cceae9",main:"#00b1b9",dark:"#212e3d"},error:{main:"#ff3e4e"},warning:{main:"#ffc63b"},success:{main:"#00d475"},info:{main:"#00b1b9"},background:{default:"#0c1c2c",paper:"#212e3d"},data:{100:"#008e8e",200:"#78b5b3",300:"#cceae9",400:"#0079af",500:"#86b7d1",600:"#d6837b",700:"#988fd8",800:"#dbdbab",900:"#abd1ad"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#cccccc",A200:"#999999",A400:"#808080",A700:"#606060"},text:{primary:"#ffffff"}},dQ=eR({typography:uQ,palette:W_,components:{MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:W_.grey[800],borderColor:W_.grey[700],borderStyle:"dotted"}}},MuiDialog:{styleOverrides:{paper:{background:W_.background.paper}}}}});var mg=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},W0=typeof window>"u"||"Deno"in globalThis;function Ya(){}function fQ(t,e){return typeof t=="function"?t(e):t}function mT(t){return typeof t=="number"&&t>=0&&t!==1/0}function Z8(t,e){return Math.max(t+(e||0)-Date.now(),0)}function CL(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==rR(o,e.options))return!1}else if(!Kv(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||s&&!s(e))}function TL(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(cp(e.options.mutationKey)!==cp(s))return!1}else if(!Kv(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function rR(t,e){return((e==null?void 0:e.queryKeyHashFn)||cp)(t)}function cp(t){return JSON.stringify(t,(e,n)=>gT(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Kv(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!Kv(t[n],e[n])):!1}function Y8(t,e){if(t===e)return t;const n=AL(t)&&AL(e);if(n||gT(t)&&gT(e)){const r=n?t:Object.keys(t),i=r.length,s=n?e:Object.keys(e),o=s.length,a=n?[]:{};let l=0;for(let c=0;c{setTimeout(e,t)})}function vT(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Y8(t,e):e}function pQ(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function mQ(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var iR=Symbol(),Fh,zd,S0,ED,gQ=(ED=class extends mg{constructor(){super();rn(this,Fh,void 0);rn(this,zd,void 0);rn(this,S0,void 0);jt(this,S0,e=>{if(!W0&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Ae(this,zd)||this.setEventListener(Ae(this,S0))}onUnsubscribe(){var e;this.hasListeners()||((e=Ae(this,zd))==null||e.call(this),jt(this,zd,void 0))}setEventListener(e){var n;jt(this,S0,e),(n=Ae(this,zd))==null||n.call(this),jt(this,zd,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){Ae(this,Fh)!==e&&(jt(this,Fh,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof Ae(this,Fh)=="boolean"?Ae(this,Fh):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Fh=new WeakMap,zd=new WeakMap,S0=new WeakMap,ED),sR=new gQ,w0,Bd,M0,CD,vQ=(CD=class extends mg{constructor(){super();rn(this,w0,!0);rn(this,Bd,void 0);rn(this,M0,void 0);jt(this,M0,e=>{if(!W0&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Ae(this,Bd)||this.setEventListener(Ae(this,M0))}onUnsubscribe(){var e;this.hasListeners()||((e=Ae(this,Bd))==null||e.call(this),jt(this,Bd,void 0))}setEventListener(e){var n;jt(this,M0,e),(n=Ae(this,Bd))==null||n.call(this),jt(this,Bd,e(this.setOnline.bind(this)))}setOnline(e){Ae(this,w0)!==e&&(jt(this,w0,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return Ae(this,w0)}},w0=new WeakMap,Bd=new WeakMap,M0=new WeakMap,CD),d2=new vQ;function yQ(t){return Math.min(1e3*2**t,3e4)}function K8(t){return(t??"online")==="online"?d2.isOnline():!0}var Q8=class{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function WE(t){return t instanceof Q8}function J8(t){let e=!1,n=0,r=!1,i,s,o;const a=new Promise((y,S)=>{s=y,o=S}),l=y=>{var S;r||(x(new Q8(y)),(S=t.abort)==null||S.call(t))},c=()=>{e=!0},f=()=>{e=!1},p=()=>sR.isFocused()&&(t.networkMode==="always"||d2.isOnline())&&t.canRun(),g=()=>K8(t.networkMode)&&t.canRun(),v=y=>{var S;r||(r=!0,(S=t.onSuccess)==null||S.call(t,y),i==null||i(),s(y))},x=y=>{var S;r||(r=!0,(S=t.onError)==null||S.call(t,y),i==null||i(),o(y))},_=()=>new Promise(y=>{var S;i=w=>{(r||p())&&y(w)},(S=t.onPause)==null||S.call(t)}).then(()=>{var y;i=void 0,r||(y=t.onContinue)==null||y.call(t)}),b=()=>{if(r)return;let y;try{y=t.fn()}catch(S){y=Promise.reject(S)}Promise.resolve(y).then(v).catch(S=>{var P;if(r)return;const w=t.retry??(W0?0:3),T=t.retryDelay??yQ,L=typeof T=="function"?T(n,S):T,R=w===!0||typeof w=="number"&&np()?void 0:_()).then(()=>{e?x(S):b()})})};return{promise:a,cancel:l,continue:()=>(i==null||i(),a),cancelRetry:c,continueRetry:f,canStart:g,start:()=>(g()?b():_().then(b),a)}}function xQ(){let t=[],e=0,n=g=>{g()},r=g=>{g()},i=g=>setTimeout(g,0);const s=g=>{i=g},o=g=>{let v;e++;try{v=g()}finally{e--,e||c()}return v},a=g=>{e?t.push(g):i(()=>{n(g)})},l=g=>(...v)=>{a(()=>{g(...v)})},c=()=>{const g=t;t=[],g.length&&i(()=>{r(()=>{g.forEach(v=>{n(v)})})})};return{batch:o,batchCalls:l,schedule:a,setNotifyFunction:g=>{n=g},setBatchNotifyFunction:g=>{r=g},setScheduler:s}}var Ji=xQ(),Uh,TD,e7=(TD=class{constructor(){rn(this,Uh,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mT(this.gcTime)&&jt(this,Uh,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(W0?1/0:5*60*1e3))}clearGcTimeout(){Ae(this,Uh)&&(clearTimeout(Ae(this,Uh)),jt(this,Uh,void 0))}},Uh=new WeakMap,TD),E0,C0,qa,lo,Ay,zh,Nl,hu,AD,_Q=(AD=class extends e7{constructor(e){super();rn(this,Nl);rn(this,E0,void 0);rn(this,C0,void 0);rn(this,qa,void 0);rn(this,lo,void 0);rn(this,Ay,void 0);rn(this,zh,void 0);jt(this,zh,!1),jt(this,Ay,e.defaultOptions),this.setOptions(e.options),this.observers=[],jt(this,qa,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,jt(this,E0,e.state||bQ(this.options)),this.state=Ae(this,E0),this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...Ae(this,Ay),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Ae(this,qa).remove(this)}setData(e,n){const r=vT(this.state.data,e,this.options);return jn(this,Nl,hu).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){jn(this,Nl,hu).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=Ae(this,lo))==null?void 0:r.promise;return(i=Ae(this,lo))==null||i.cancel(e),n?n.then(Ya).catch(Ya):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Ae(this,E0))}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Z8(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=Ae(this,lo))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=Ae(this,lo))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Ae(this,qa).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(Ae(this,lo)&&(Ae(this,zh)?Ae(this,lo).cancel({revert:!0}):Ae(this,lo).cancelRetry()),this.scheduleGc()),Ae(this,qa).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||jn(this,Nl,hu).call(this,{type:"invalidate"})}fetch(e,n){var c,f,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Ae(this,lo))return Ae(this,lo).continueRetry(),Ae(this,lo).promise}if(e&&this.setOptions(e),!this.options.queryFn){const g=this.observers.find(v=>v.options.queryFn);g&&this.setOptions(g.options)}const r=new AbortController,i={queryKey:this.queryKey,meta:this.meta},s=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(jt(this,zh,!0),r.signal)})};s(i);const o=()=>!this.options.queryFn||this.options.queryFn===iR?Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)):(jt(this,zh,!1),this.options.persister?this.options.persister(this.options.queryFn,i,this):this.options.queryFn(i)),a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};s(a),(c=this.options.behavior)==null||c.onFetch(a,this),jt(this,C0,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=a.fetchOptions)==null?void 0:f.meta))&&jn(this,Nl,hu).call(this,{type:"fetch",meta:(p=a.fetchOptions)==null?void 0:p.meta});const l=g=>{var v,x,_,b;WE(g)&&g.silent||jn(this,Nl,hu).call(this,{type:"error",error:g}),WE(g)||((x=(v=Ae(this,qa).config).onError)==null||x.call(v,g,this),(b=(_=Ae(this,qa).config).onSettled)==null||b.call(_,this.state.data,g,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return jt(this,lo,J8({fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var v,x,_,b;if(g===void 0){l(new Error(`${this.queryHash} data is undefined`));return}this.setData(g),(x=(v=Ae(this,qa).config).onSuccess)==null||x.call(v,g,this),(b=(_=Ae(this,qa).config).onSettled)==null||b.call(_,g,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(g,v)=>{jn(this,Nl,hu).call(this,{type:"failed",failureCount:g,error:v})},onPause:()=>{jn(this,Nl,hu).call(this,{type:"pause"})},onContinue:()=>{jn(this,Nl,hu).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),Ae(this,lo).start()}},E0=new WeakMap,C0=new WeakMap,qa=new WeakMap,lo=new WeakMap,Ay=new WeakMap,zh=new WeakMap,Nl=new WeakSet,hu=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...t7(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return WE(i)&&i.revert&&Ae(this,C0)?{...Ae(this,C0),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Ji.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Ae(this,qa).notify({query:this,type:"updated",action:e})})},AD);function t7(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:K8(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function bQ(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var vc,RD,SQ=(RD=class extends mg{constructor(e={}){super();rn(this,vc,void 0);this.config=e,jt(this,vc,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??rR(i,n);let o=this.get(s);return o||(o=new _Q({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){Ae(this,vc).has(e.queryHash)||(Ae(this,vc).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=Ae(this,vc).get(e.queryHash);n&&(e.destroy(),n===e&&Ae(this,vc).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ji.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Ae(this,vc).get(e)}getAll(){return[...Ae(this,vc).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>CL(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>CL(e,r)):n}notify(e){Ji.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Ji.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ji.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},vc=new WeakMap,RD),yc,co,Bh,xc,Ld,PD,wQ=(PD=class extends e7{constructor(e){super();rn(this,xc);rn(this,yc,void 0);rn(this,co,void 0);rn(this,Bh,void 0);this.mutationId=e.mutationId,jt(this,co,e.mutationCache),jt(this,yc,[]),this.state=e.state||n7(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Ae(this,yc).includes(e)||(Ae(this,yc).push(e),this.clearGcTimeout(),Ae(this,co).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){jt(this,yc,Ae(this,yc).filter(n=>n!==e)),this.scheduleGc(),Ae(this,co).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Ae(this,yc).length||(this.state.status==="pending"?this.scheduleGc():Ae(this,co).remove(this))}continue(){var e;return((e=Ae(this,Bh))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,a,l,c,f,p,g,v,x,_,b,y,S,w,T,L,R,P;jt(this,Bh,J8({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(F,O)=>{jn(this,xc,Ld).call(this,{type:"failed",failureCount:F,error:O})},onPause:()=>{jn(this,xc,Ld).call(this,{type:"pause"})},onContinue:()=>{jn(this,xc,Ld).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Ae(this,co).canRun(this)}));const n=this.state.status==="pending",r=!Ae(this,Bh).canStart();try{if(!n){jn(this,xc,Ld).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=Ae(this,co).config).onMutate)==null?void 0:s.call(i,e,this));const O=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));O!==this.state.context&&jn(this,xc,Ld).call(this,{type:"pending",context:O,variables:e,isPaused:r})}const F=await Ae(this,Bh).start();return await((c=(l=Ae(this,co).config).onSuccess)==null?void 0:c.call(l,F,e,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,F,e,this.state.context)),await((v=(g=Ae(this,co).config).onSettled)==null?void 0:v.call(g,F,null,this.state.variables,this.state.context,this)),await((_=(x=this.options).onSettled)==null?void 0:_.call(x,F,null,e,this.state.context)),jn(this,xc,Ld).call(this,{type:"success",data:F}),F}catch(F){try{throw await((y=(b=Ae(this,co).config).onError)==null?void 0:y.call(b,F,e,this.state.context,this)),await((w=(S=this.options).onError)==null?void 0:w.call(S,F,e,this.state.context)),await((L=(T=Ae(this,co).config).onSettled)==null?void 0:L.call(T,void 0,F,this.state.variables,this.state.context,this)),await((P=(R=this.options).onSettled)==null?void 0:P.call(R,void 0,F,e,this.state.context)),F}finally{jn(this,xc,Ld).call(this,{type:"error",error:F})}}finally{Ae(this,co).runNext(this)}}},yc=new WeakMap,co=new WeakMap,Bh=new WeakMap,xc=new WeakSet,Ld=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ji.batch(()=>{Ae(this,yc).forEach(r=>{r.onMutationUpdate(e)}),Ae(this,co).notify({mutation:this,type:"updated",action:e})})},PD);function n7(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ha,Ry,ID,MQ=(ID=class extends mg{constructor(e={}){super();rn(this,ha,void 0);rn(this,Ry,void 0);this.config=e,jt(this,ha,new Map),jt(this,Ry,Date.now())}build(e,n,r){const i=new wQ({mutationCache:this,mutationId:++S_(this,Ry)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){const n=j_(e),r=Ae(this,ha).get(n)??[];r.push(e),Ae(this,ha).set(n,r),this.notify({type:"added",mutation:e})}remove(e){var r;const n=j_(e);if(Ae(this,ha).has(n)){const i=(r=Ae(this,ha).get(n))==null?void 0:r.filter(s=>s!==e);i&&(i.length===0?Ae(this,ha).delete(n):Ae(this,ha).set(n,i))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=(r=Ae(this,ha).get(j_(e)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===e}runNext(e){var r;const n=(r=Ae(this,ha).get(j_(e)))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Ji.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...Ae(this,ha).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(r=>TL(n,r))}findAll(e={}){return this.getAll().filter(n=>TL(e,n))}notify(e){Ji.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Ji.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ya))))}},ha=new WeakMap,Ry=new WeakMap,ID);function j_(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function EQ(t){return{onFetch:(e,n)=>{const r=async()=>{var x,_,b,y,S;const i=e.options,s=(b=(_=(x=e.fetchOptions)==null?void 0:x.meta)==null?void 0:_.fetchMore)==null?void 0:b.direction,o=((y=e.state.data)==null?void 0:y.pages)||[],a=((S=e.state.data)==null?void 0:S.pageParams)||[],l={pages:[],pageParams:[]};let c=!1;const f=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(e.signal.aborted?c=!0:e.signal.addEventListener("abort",()=>{c=!0}),e.signal)})},p=e.options.queryFn&&e.options.queryFn!==iR?e.options.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.options.queryHash}'`)),g=async(w,T,L)=>{if(c)return Promise.reject();if(T==null&&w.pages.length)return Promise.resolve(w);const R={queryKey:e.queryKey,pageParam:T,direction:L?"backward":"forward",meta:e.options.meta};f(R);const P=await p(R),{maxPages:F}=e.options,O=L?mQ:pQ;return{pages:O(w.pages,P,F),pageParams:O(w.pageParams,T,F)}};let v;if(s&&o.length){const w=s==="backward",T=w?CQ:PL,L={pages:o,pageParams:a},R=T(i,L);v=await g(L,R,w)}else{v=await g(l,a[0]??i.initialPageParam);const w=t??o.length;for(let T=1;T{var i,s;return(s=(i=e.options).persister)==null?void 0:s.call(i,r,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=r}}}function PL(t,{pages:e,pageParams:n}){const r=e.length-1;return t.getNextPageParam(e[r],e,n[r],n)}function CQ(t,{pages:e,pageParams:n}){var r;return(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n)}var _i,Hd,$d,T0,A0,Vd,R0,P0,LD,TQ=(LD=class{constructor(t={}){rn(this,_i,void 0);rn(this,Hd,void 0);rn(this,$d,void 0);rn(this,T0,void 0);rn(this,A0,void 0);rn(this,Vd,void 0);rn(this,R0,void 0);rn(this,P0,void 0);jt(this,_i,t.queryCache||new SQ),jt(this,Hd,t.mutationCache||new MQ),jt(this,$d,t.defaultOptions||{}),jt(this,T0,new Map),jt(this,A0,new Map),jt(this,Vd,0)}mount(){S_(this,Vd)._++,Ae(this,Vd)===1&&(jt(this,R0,sR.subscribe(async t=>{t&&(await this.resumePausedMutations(),Ae(this,_i).onFocus())})),jt(this,P0,d2.subscribe(async t=>{t&&(await this.resumePausedMutations(),Ae(this,_i).onOnline())})))}unmount(){var t,e;S_(this,Vd)._--,Ae(this,Vd)===0&&((t=Ae(this,R0))==null||t.call(this),jt(this,R0,void 0),(e=Ae(this,P0))==null||e.call(this),jt(this,P0,void 0))}isFetching(t){return Ae(this,_i).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return Ae(this,Hd).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=Ae(this,_i).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=Ae(this,_i).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(n.staleTime)&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return Ae(this,_i).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=Ae(this,_i).get(r.queryHash),s=i==null?void 0:i.state.data,o=fQ(e,s);if(o!==void 0)return Ae(this,_i).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return Ji.batch(()=>Ae(this,_i).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=Ae(this,_i).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=Ae(this,_i);Ji.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=Ae(this,_i),r={type:"active",...t};return Ji.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=Ji.batch(()=>Ae(this,_i).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Ya).catch(Ya)}invalidateQueries(t={},e={}){return Ji.batch(()=>{if(Ae(this,_i).findAll(t).forEach(r=>{r.invalidate()}),t.refetchType==="none")return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)})}refetchQueries(t={},e){const n={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=Ji.batch(()=>Ae(this,_i).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ya)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ya)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=Ae(this,_i).build(this,e);return n.isStaleByTime(e.staleTime)?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ya).catch(Ya)}fetchInfiniteQuery(t){return t.behavior=EQ(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ya).catch(Ya)}resumePausedMutations(){return d2.isOnline()?Ae(this,Hd).resumePausedMutations():Promise.resolve()}getQueryCache(){return Ae(this,_i)}getMutationCache(){return Ae(this,Hd)}getDefaultOptions(){return Ae(this,$d)}setDefaultOptions(t){jt(this,$d,t)}setQueryDefaults(t,e){Ae(this,T0).set(cp(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...Ae(this,T0).values()];let n={};return e.forEach(r=>{Kv(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){Ae(this,A0).set(cp(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...Ae(this,A0).values()];let n={};return e.forEach(r=>{Kv(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...Ae(this,$d).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=rR(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===iR&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...Ae(this,$d).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){Ae(this,_i).clear(),Ae(this,Hd).clear()}},_i=new WeakMap,Hd=new WeakMap,$d=new WeakMap,T0=new WeakMap,A0=new WeakMap,Vd=new WeakMap,R0=new WeakMap,P0=new WeakMap,LD),ko,Br,Py,uo,Hh,I0,_c,Iy,L0,k0,$h,Vh,Wd,O0,Wh,J1,Ly,yT,ky,xT,Oy,_T,Ny,bT,Dy,ST,Fy,wT,Uy,MT,P2,r7,kD,AQ=(kD=class extends mg{constructor(e,n){super();rn(this,Wh);rn(this,Ly);rn(this,ky);rn(this,Oy);rn(this,Ny);rn(this,Dy);rn(this,Fy);rn(this,Uy);rn(this,P2);rn(this,ko,void 0);rn(this,Br,void 0);rn(this,Py,void 0);rn(this,uo,void 0);rn(this,Hh,void 0);rn(this,I0,void 0);rn(this,_c,void 0);rn(this,Iy,void 0);rn(this,L0,void 0);rn(this,k0,void 0);rn(this,$h,void 0);rn(this,Vh,void 0);rn(this,Wd,void 0);rn(this,O0,new Set);this.options=n,jt(this,ko,e),jt(this,_c,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Ae(this,Br).addObserver(this),IL(Ae(this,Br),this.options)?jn(this,Wh,J1).call(this):this.updateResult(),jn(this,Ny,bT).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ET(Ae(this,Br),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ET(Ae(this,Br),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,jn(this,Dy,ST).call(this),jn(this,Fy,wT).call(this),Ae(this,Br).removeObserver(this)}setOptions(e,n){const r=this.options,i=Ae(this,Br);if(this.options=Ae(this,ko).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");jn(this,Uy,MT).call(this),Ae(this,Br).setOptions(this.options),r._defaulted&&!u2(this.options,r)&&Ae(this,ko).getQueryCache().notify({type:"observerOptionsUpdated",query:Ae(this,Br),observer:this});const s=this.hasListeners();s&&LL(Ae(this,Br),i,this.options,r)&&jn(this,Wh,J1).call(this),this.updateResult(n),s&&(Ae(this,Br)!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&jn(this,Ly,yT).call(this);const o=jn(this,ky,xT).call(this);s&&(Ae(this,Br)!==i||this.options.enabled!==r.enabled||o!==Ae(this,Wd))&&jn(this,Oy,_T).call(this,o)}getOptimisticResult(e){const n=Ae(this,ko).getQueryCache().build(Ae(this,ko),e),r=this.createResult(n,e);return PQ(this,r)&&(jt(this,uo,r),jt(this,I0,this.options),jt(this,Hh,Ae(this,Br).state)),r}getCurrentResult(){return Ae(this,uo)}trackResult(e,n){const r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),e[i])})}),r}trackProp(e){Ae(this,O0).add(e)}getCurrentQuery(){return Ae(this,Br)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=Ae(this,ko).defaultQueryOptions(e),r=Ae(this,ko).getQueryCache().build(Ae(this,ko),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(e){return jn(this,Wh,J1).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),Ae(this,uo)))}createResult(e,n){var P;const r=Ae(this,Br),i=this.options,s=Ae(this,uo),o=Ae(this,Hh),a=Ae(this,I0),c=e!==r?e.state:Ae(this,Py),{state:f}=e;let p={...f},g=!1,v;if(n._optimisticResults){const F=this.hasListeners(),O=!F&&IL(e,n),I=F&&LL(e,r,n,i);(O||I)&&(p={...p,...t7(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:x,errorUpdatedAt:_,status:b}=p;if(n.select&&p.data!==void 0)if(s&&p.data===(o==null?void 0:o.data)&&n.select===Ae(this,Iy))v=Ae(this,L0);else try{jt(this,Iy,n.select),v=n.select(p.data),v=vT(s==null?void 0:s.data,v,n),jt(this,L0,v),jt(this,_c,null)}catch(F){jt(this,_c,F)}else v=p.data;if(n.placeholderData!==void 0&&v===void 0&&b==="pending"){let F;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))F=s.data;else if(F=typeof n.placeholderData=="function"?n.placeholderData((P=Ae(this,k0))==null?void 0:P.state.data,Ae(this,k0)):n.placeholderData,n.select&&F!==void 0)try{F=n.select(F),jt(this,_c,null)}catch(O){jt(this,_c,O)}F!==void 0&&(b="success",v=vT(s==null?void 0:s.data,F,n),g=!0)}Ae(this,_c)&&(x=Ae(this,_c),v=Ae(this,L0),_=Date.now(),b="error");const y=p.fetchStatus==="fetching",S=b==="pending",w=b==="error",T=S&&y,L=v!==void 0;return{status:b,fetchStatus:p.fetchStatus,isPending:S,isSuccess:b==="success",isError:w,isInitialLoading:T,isLoading:T,data:v,dataUpdatedAt:p.dataUpdatedAt,error:x,errorUpdatedAt:_,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>c.dataUpdateCount||p.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!S,isLoadingError:w&&!L,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:w&&L,isStale:oR(e,n),refetch:this.refetch}}updateResult(e){const n=Ae(this,uo),r=this.createResult(Ae(this,Br),this.options);if(jt(this,Hh,Ae(this,Br).state),jt(this,I0,this.options),Ae(this,Hh).data!==void 0&&jt(this,k0,Ae(this,Br)),u2(r,n))return;jt(this,uo,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!Ae(this,O0).size)return!0;const l=new Set(a??Ae(this,O0));return this.options.throwOnError&&l.add("error"),Object.keys(Ae(this,uo)).some(c=>{const f=c;return Ae(this,uo)[f]!==n[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),jn(this,P2,r7).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&jn(this,Ny,bT).call(this)}},ko=new WeakMap,Br=new WeakMap,Py=new WeakMap,uo=new WeakMap,Hh=new WeakMap,I0=new WeakMap,_c=new WeakMap,Iy=new WeakMap,L0=new WeakMap,k0=new WeakMap,$h=new WeakMap,Vh=new WeakMap,Wd=new WeakMap,O0=new WeakMap,Wh=new WeakSet,J1=function(e){jn(this,Uy,MT).call(this);let n=Ae(this,Br).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ya)),n},Ly=new WeakSet,yT=function(){if(jn(this,Dy,ST).call(this),W0||Ae(this,uo).isStale||!mT(this.options.staleTime))return;const n=Z8(Ae(this,uo).dataUpdatedAt,this.options.staleTime)+1;jt(this,$h,setTimeout(()=>{Ae(this,uo).isStale||this.updateResult()},n))},ky=new WeakSet,xT=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Ae(this,Br)):this.options.refetchInterval)??!1},Oy=new WeakSet,_T=function(e){jn(this,Fy,wT).call(this),jt(this,Wd,e),!(W0||this.options.enabled===!1||!mT(Ae(this,Wd))||Ae(this,Wd)===0)&&jt(this,Vh,setInterval(()=>{(this.options.refetchIntervalInBackground||sR.isFocused())&&jn(this,Wh,J1).call(this)},Ae(this,Wd)))},Ny=new WeakSet,bT=function(){jn(this,Ly,yT).call(this),jn(this,Oy,_T).call(this,jn(this,ky,xT).call(this))},Dy=new WeakSet,ST=function(){Ae(this,$h)&&(clearTimeout(Ae(this,$h)),jt(this,$h,void 0))},Fy=new WeakSet,wT=function(){Ae(this,Vh)&&(clearInterval(Ae(this,Vh)),jt(this,Vh,void 0))},Uy=new WeakSet,MT=function(){const e=Ae(this,ko).getQueryCache().build(Ae(this,ko),this.options);if(e===Ae(this,Br))return;const n=Ae(this,Br);jt(this,Br,e),jt(this,Py,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},P2=new WeakSet,r7=function(e){Ji.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(Ae(this,uo))}),Ae(this,ko).getQueryCache().notify({query:Ae(this,Br),type:"observerResultsUpdated"})})},kD);function RQ(t,e){return e.enabled!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function IL(t,e){return RQ(t,e)||t.state.data!==void 0&&ET(t,e,e.refetchOnMount)}function ET(t,e,n){if(e.enabled!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&oR(t,e)}return!1}function LL(t,e,n,r){return(t!==e||r.enabled===!1)&&(!n.suspense||t.state.status!=="error")&&oR(t,n)}function oR(t,e){return e.enabled!==!1&&t.isStaleByTime(e.staleTime)}function PQ(t,e){return!u2(t.getCurrentResult(),e)}var jd,Gd,Oo,vu,N0,MS,zy,CT,OD,IQ=(OD=class extends mg{constructor(n,r){super();rn(this,N0);rn(this,zy);rn(this,jd,void 0);rn(this,Gd,void 0);rn(this,Oo,void 0);rn(this,vu,void 0);jt(this,jd,n),this.setOptions(r),this.bindMethods(),jn(this,N0,MS).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=Ae(this,jd).defaultMutationOptions(n),u2(this.options,r)||Ae(this,jd).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Ae(this,Oo),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&cp(r.mutationKey)!==cp(this.options.mutationKey)?this.reset():((i=Ae(this,Oo))==null?void 0:i.state.status)==="pending"&&Ae(this,Oo).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=Ae(this,Oo))==null||n.removeObserver(this)}onMutationUpdate(n){jn(this,N0,MS).call(this),jn(this,zy,CT).call(this,n)}getCurrentResult(){return Ae(this,Gd)}reset(){var n;(n=Ae(this,Oo))==null||n.removeObserver(this),jt(this,Oo,void 0),jn(this,N0,MS).call(this),jn(this,zy,CT).call(this)}mutate(n,r){var i;return jt(this,vu,r),(i=Ae(this,Oo))==null||i.removeObserver(this),jt(this,Oo,Ae(this,jd).getMutationCache().build(Ae(this,jd),this.options)),Ae(this,Oo).addObserver(this),Ae(this,Oo).execute(n)}},jd=new WeakMap,Gd=new WeakMap,Oo=new WeakMap,vu=new WeakMap,N0=new WeakSet,MS=function(){var r;const n=((r=Ae(this,Oo))==null?void 0:r.state)??n7();jt(this,Gd,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},zy=new WeakSet,CT=function(n){Ji.batch(()=>{var r,i,s,o,a,l,c,f;if(Ae(this,vu)&&this.hasListeners()){const p=Ae(this,Gd).variables,g=Ae(this,Gd).context;(n==null?void 0:n.type)==="success"?((i=(r=Ae(this,vu)).onSuccess)==null||i.call(r,n.data,p,g),(o=(s=Ae(this,vu)).onSettled)==null||o.call(s,n.data,null,p,g)):(n==null?void 0:n.type)==="error"&&((l=(a=Ae(this,vu)).onError)==null||l.call(a,n.error,p,g),(f=(c=Ae(this,vu)).onSettled)==null||f.call(c,void 0,n.error,p,g))}this.listeners.forEach(p=>{p(Ae(this,Gd))})})},OD),i7=D.createContext(void 0),mf=t=>{const e=D.useContext(i7);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},LQ=({client:t,children:e})=>(D.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),C.jsx(i7.Provider,{value:t,children:e})),s7=D.createContext(!1),kQ=()=>D.useContext(s7);s7.Provider;function OQ(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var NQ=D.createContext(OQ()),DQ=()=>D.useContext(NQ);function o7(t,e){return typeof t=="function"?t(...e):!!t}function FQ(){}var UQ=(t,e)=>{(t.suspense||t.throwOnError)&&(e.isReset()||(t.retryOnMount=!1))},zQ=t=>{D.useEffect(()=>{t.clearReset()},[t])},BQ=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&o7(n,[t.error,r]),HQ=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},$Q=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,VQ=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function WQ(t,e,n){const r=mf(n),i=kQ(),s=DQ(),o=r.defaultQueryOptions(t);o._optimisticResults=i?"isRestoring":"optimistic",HQ(o),UQ(o,s),zQ(s);const[a]=D.useState(()=>new e(r,o)),l=a.getOptimisticResult(o);if(D.useSyncExternalStore(D.useCallback(c=>{const f=i?()=>{}:a.subscribe(Ji.batchCalls(c));return a.updateResult(),f},[a,i]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),D.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),$Q(o,l))throw VQ(o,a,s);if(BQ({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw l.error;return o.notifyOnChangeProps?l:a.trackResult(l)}function Hu(t,e){return WQ(t,AQ,e)}function gg(t,e){const n=mf(e),[r]=D.useState(()=>new IQ(n,t));D.useEffect(()=>{r.setOptions(t)},[r,t]);const i=D.useSyncExternalStore(D.useCallback(o=>r.subscribe(Ji.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=D.useCallback((o,a)=>{r.mutate(o,a).catch(FQ)},[r]);if(i.error&&o7(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function a7(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e{const{color:e,fontSize:n,classes:r}=t,i={root:["root",e!=="inherit"&&`color${gt(e)}`,`fontSize${gt(n)}`]};return Sn(i,jQ,r)},qQ=lt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${gt(n.color)}`],e[`fontSize${gt(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,r,i,s,o,a,l,c,f,p,g,v,x;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=t.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((s=t.typography)==null||(o=s.pxToRem)==null?void 0:o.call(s,20))||"1.25rem",medium:((a=t.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=t.typography)==null||(f=c.pxToRem)==null?void 0:f.call(c,35))||"2.1875rem"}[e.fontSize],color:(p=(g=(t.vars||t).palette)==null||(g=g[e.color])==null?void 0:g.main)!=null?p:{action:(v=(t.vars||t).palette)==null||(v=v.action)==null?void 0:v.active,disabled:(x=(t.vars||t).palette)==null||(x=x.action)==null?void 0:x.disabled,inherit:void 0}[e.color]}}),TT=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiSvgIcon"}),{children:i,className:s,color:o="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:f=!1,titleAccess:p,viewBox:g="0 0 24 24"}=r,v=Rt(r,GQ),x=D.isValidElement(i)&&i.type==="svg",_=X({},r,{color:o,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:f,viewBox:g,hasSvgAsChild:x}),b={};f||(b.viewBox=g);const y=XQ(_);return C.jsxs(qQ,X({as:a,className:At(y.root,s),focusable:"false",color:c,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:n},b,v,x&&i.props,{ownerState:_,children:[x?i.props.children:i,p?C.jsx("title",{children:p}):null]}))});TT.muiName="SvgIcon";function bt(t,e){function n(r,i){return C.jsx(TT,X({"data-testid":`${e}Icon`,ref:i},r,{children:t}))}return n.muiName=TT.muiName,D.memo(D.forwardRef(n))}const ZQ={configure:t=>{Y3.configure(t)}},YQ=Object.freeze(Object.defineProperty({__proto__:null,capitalize:gt,createChainedFunction:fT,createSvgIcon:bt,debounce:Qy,deprecatedPropType:rK,isMuiElement:mv,ownerDocument:Oi,ownerWindow:Oc,requirePropFactory:iK,setRef:Yv,unstable_ClassNameGenerator:ZQ,unstable_useEnhancedEffect:Xo,unstable_useId:hg,unsupportedProp:oK,useControlled:Cu,useEventCallback:ts,useForkRef:Kr,useIsFocusVisible:Tw},Symbol.toStringTag,{value:"Module"}));var Ar={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var aR=Symbol.for("react.element"),lR=Symbol.for("react.portal"),Rw=Symbol.for("react.fragment"),Pw=Symbol.for("react.strict_mode"),Iw=Symbol.for("react.profiler"),Lw=Symbol.for("react.provider"),kw=Symbol.for("react.context"),KQ=Symbol.for("react.server_context"),Ow=Symbol.for("react.forward_ref"),Nw=Symbol.for("react.suspense"),Dw=Symbol.for("react.suspense_list"),Fw=Symbol.for("react.memo"),Uw=Symbol.for("react.lazy"),QQ=Symbol.for("react.offscreen"),l7;l7=Symbol.for("react.module.reference");function vl(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case aR:switch(t=t.type,t){case Rw:case Iw:case Pw:case Nw:case Dw:return t;default:switch(t=t&&t.$$typeof,t){case KQ:case kw:case Ow:case Uw:case Fw:case Lw:return t;default:return e}}case lR:return e}}}Ar.ContextConsumer=kw;Ar.ContextProvider=Lw;Ar.Element=aR;Ar.ForwardRef=Ow;Ar.Fragment=Rw;Ar.Lazy=Uw;Ar.Memo=Fw;Ar.Portal=lR;Ar.Profiler=Iw;Ar.StrictMode=Pw;Ar.Suspense=Nw;Ar.SuspenseList=Dw;Ar.isAsyncMode=function(){return!1};Ar.isConcurrentMode=function(){return!1};Ar.isContextConsumer=function(t){return vl(t)===kw};Ar.isContextProvider=function(t){return vl(t)===Lw};Ar.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===aR};Ar.isForwardRef=function(t){return vl(t)===Ow};Ar.isFragment=function(t){return vl(t)===Rw};Ar.isLazy=function(t){return vl(t)===Uw};Ar.isMemo=function(t){return vl(t)===Fw};Ar.isPortal=function(t){return vl(t)===lR};Ar.isProfiler=function(t){return vl(t)===Iw};Ar.isStrictMode=function(t){return vl(t)===Pw};Ar.isSuspense=function(t){return vl(t)===Nw};Ar.isSuspenseList=function(t){return vl(t)===Dw};Ar.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Rw||t===Iw||t===Pw||t===Nw||t===Dw||t===QQ||typeof t=="object"&&t!==null&&(t.$$typeof===Uw||t.$$typeof===Fw||t.$$typeof===Lw||t.$$typeof===kw||t.$$typeof===Ow||t.$$typeof===l7||t.getModuleId!==void 0)};Ar.typeOf=vl;function cR(t){return En}function AT(t,e){return AT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},AT(t,e)}function c7(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,AT(t,e)}const kL={disabled:!1},f2=Zt.createContext(null);var JQ=function(e){return e.scrollTop},ev="unmounted",mh="exited",gh="entering",Vm="entered",RT="exiting",$u=function(t){c7(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=i,a=o&&!o.isMounting?r.enter:r.appear,l;return s.appearStatus=null,r.in?a?(l=mh,s.appearStatus=gh):l=Vm:r.unmountOnExit||r.mountOnEnter?l=ev:l=mh,s.state={status:l},s.nextCallback=null,s}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===ev?{status:mh}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==gh&&o!==Vm&&(s=gh):(o===gh||o===Vm)&&(s=RT)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,a;return s=o=a=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,a=i.appear!==void 0?i.appear:o),{exit:s,enter:o,appear:a}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===gh){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:B_.findDOMNode(this);o&&JQ(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===mh&&this.setState({status:ev})},n.performEnter=function(i){var s=this,o=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[B_.findDOMNode(this),a],c=l[0],f=l[1],p=this.getTimeouts(),g=a?p.appear:p.enter;if(!i&&!o||kL.disabled){this.safeSetState({status:Vm},function(){s.props.onEntered(c)});return}this.props.onEnter(c,f),this.safeSetState({status:gh},function(){s.props.onEntering(c,f),s.onTransitionEnd(g,function(){s.safeSetState({status:Vm},function(){s.props.onEntered(c,f)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),a=this.props.nodeRef?void 0:B_.findDOMNode(this);if(!s||kL.disabled){this.safeSetState({status:mh},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:RT},function(){i.props.onExiting(a),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:mh},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(a){o&&(o=!1,s.nextCallback=null,i(a))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:B_.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!o||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],c=l[0],f=l[1];this.props.addEndListener(c,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===ev)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var a=Rt(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Zt.createElement(f2.Provider,{value:null},typeof o=="function"?o(i,a):Zt.cloneElement(Zt.Children.only(o),a))},e}(Zt.Component);$u.contextType=f2;$u.propTypes={};function pm(){}$u.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pm,onEntering:pm,onEntered:pm,onExit:pm,onExiting:pm,onExited:pm};$u.UNMOUNTED=ev;$u.EXITED=mh;$u.ENTERING=gh;$u.ENTERED=Vm;$u.EXITING=RT;const uR=$u;function eJ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dR(t,e){var n=function(s){return e&&D.isValidElement(s)?e(s):s},r=Object.create(null);return t&&D.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function tJ(t,e){t=t||{},e=e||{};function n(f){return f in e?e[f]:t[f]}var r=Object.create(null),i=[];for(var s in t)s in e?i.length&&(r[s]=i,i=[]):i.push(s);var o,a={};for(var l in e){if(r[l])for(o=0;ot.scrollTop;function j0(t,e){var n,r;const{timeout:i,easing:s,style:o={}}=t;return{duration:(n=o.transitionDuration)!=null?n:typeof i=="number"?i:i[e.mode]||0,easing:(r=o.transitionTimingFunction)!=null?r:typeof s=="object"?s[e.mode]:s,delay:o.transitionDelay}}function aJ(t){return bn("MuiCollapse",t)}pn("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const lJ=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],cJ=t=>{const{orientation:e,classes:n}=t,r={root:["root",`${e}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${e}`],wrapperInner:["wrapperInner",`${e}`]};return Sn(r,aJ,n)},uJ=lt("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.orientation],n.state==="entered"&&e.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&e.hidden]}})(({theme:t,ownerState:e})=>X({height:0,overflow:"hidden",transition:t.transitions.create("height")},e.orientation==="horizontal"&&{height:"auto",width:0,transition:t.transitions.create("width")},e.state==="entered"&&X({height:"auto",overflow:"visible"},e.orientation==="horizontal"&&{width:"auto"}),e.state==="exited"&&!e.in&&e.collapsedSize==="0px"&&{visibility:"hidden"})),dJ=lt("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(t,e)=>e.wrapper})(({ownerState:t})=>X({display:"flex",width:"100%"},t.orientation==="horizontal"&&{width:"auto",height:"100%"})),fJ=lt("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(t,e)=>e.wrapperInner})(({ownerState:t})=>X({width:"100%"},t.orientation==="horizontal"&&{width:"auto",height:"100%"})),d7=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiCollapse"}),{addEndListener:i,children:s,className:o,collapsedSize:a="0px",component:l,easing:c,in:f,onEnter:p,onEntered:g,onEntering:v,onExit:x,onExited:_,onExiting:b,orientation:y="vertical",style:S,timeout:w=k8.standard,TransitionComponent:T=uR}=r,L=Rt(r,lJ),R=X({},r,{orientation:y,collapsedSize:a}),P=cJ(R),F=Bu(),O=Ah(),I=D.useRef(null),H=D.useRef(),Q=typeof a=="number"?`${a}px`:a,q=y==="horizontal",le=q?"width":"height",ie=D.useRef(null),ee=Kr(n,ie),ue=pe=>Se=>{if(pe){const je=ie.current;Se===void 0?pe(je):pe(je,Se)}},z=()=>I.current?I.current[q?"clientWidth":"clientHeight"]:0,te=ue((pe,Se)=>{I.current&&q&&(I.current.style.position="absolute"),pe.style[le]=Q,p&&p(pe,Se)}),oe=ue((pe,Se)=>{const je=z();I.current&&q&&(I.current.style.position="");const{duration:it,easing:xe}=j0({style:S,timeout:w,easing:c},{mode:"enter"});if(w==="auto"){const et=F.transitions.getAutoHeightDuration(je);pe.style.transitionDuration=`${et}ms`,H.current=et}else pe.style.transitionDuration=typeof it=="string"?it:`${it}ms`;pe.style[le]=`${je}px`,pe.style.transitionTimingFunction=xe,v&&v(pe,Se)}),de=ue((pe,Se)=>{pe.style[le]="auto",g&&g(pe,Se)}),Ce=ue(pe=>{pe.style[le]=`${z()}px`,x&&x(pe)}),Le=ue(_),V=ue(pe=>{const Se=z(),{duration:je,easing:it}=j0({style:S,timeout:w,easing:c},{mode:"exit"});if(w==="auto"){const xe=F.transitions.getAutoHeightDuration(Se);pe.style.transitionDuration=`${xe}ms`,H.current=xe}else pe.style.transitionDuration=typeof je=="string"?je:`${je}ms`;pe.style[le]=Q,pe.style.transitionTimingFunction=it,b&&b(pe)}),me=pe=>{w==="auto"&&O.start(H.current||0,pe),i&&i(ie.current,pe)};return C.jsx(T,X({in:f,onEnter:te,onEntered:de,onEntering:oe,onExit:Ce,onExited:Le,onExiting:V,addEndListener:me,nodeRef:ie,timeout:w==="auto"?null:w},L,{children:(pe,Se)=>C.jsx(uJ,X({as:l,className:At(P.root,o,{entered:P.entered,exited:!f&&Q==="0px"&&P.hidden}[pe]),style:X({[q?"minWidth":"minHeight"]:Q},S),ref:ee},Se,{ownerState:X({},R,{state:pe}),children:C.jsx(dJ,{ownerState:X({},R,{state:pe}),className:P.wrapper,ref:I,children:C.jsx(fJ,{ownerState:X({},R,{state:pe}),className:P.wrapperInner,children:s})})}))}))});d7.muiSupportAuto=!0;const hJ=d7;function pJ(t){return bn("MuiPaper",t)}pn("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const mJ=["className","component","elevation","square","variant"],gJ=t=>{const{square:e,elevation:n,variant:r,classes:i}=t,s={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Sn(s,pJ,i)},vJ=lt("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return X({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&X({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${qn("#fff",EL(e.elevation))}, ${qn("#fff",EL(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),yJ=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiPaper"}),{className:i,component:s="div",elevation:o=1,square:a=!1,variant:l="elevation"}=r,c=Rt(r,mJ),f=X({},r,{component:s,elevation:o,square:a,variant:l}),p=gJ(f);return C.jsx(vJ,X({as:s,ownerState:f,className:At(p.root,i),ref:n},c))}),nx=yJ;function Rc(t){return typeof t=="string"}function tv(t,e,n){return t===void 0||Rc(t)?e:X({},e,{ownerState:X({},e.ownerState,n)})}function xJ(t,e,n=(r,i)=>r===i){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}const _J={disableDefaultClasses:!1},bJ=D.createContext(_J);function SJ(t){const{disableDefaultClasses:e}=D.useContext(bJ);return n=>e?"":t(n)}function gv(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function wJ(t,e,n){return typeof t=="function"?t(e,n):t}function f7(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function MJ(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=t;if(!e){const v=OL(n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),x=X({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),_=X({},n,i,r);return v.length>0&&(_.className=v),Object.keys(x).length>0&&(_.style=x),{props:_,internalRef:void 0}}const o=gv(X({},i,r)),a=NL(r),l=NL(i),c=e(o),f=OL(c==null?void 0:c.className,n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),p=X({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=X({},c,n,l,a);return f.length>0&&(g.className=f),Object.keys(p).length>0&&(g.style=p),{props:g,internalRef:c.ref}}const EJ=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Qi(t){var e;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:s=!1}=t,o=Rt(t,EJ),a=s?{}:wJ(r,i),{props:l,internalRef:c}=MJ(X({},o,{externalSlotProps:a})),f=Kr(c,a==null?void 0:a.ref,(e=t.additionalProps)==null?void 0:e.ref);return tv(n,X({},l,{ref:f}),i)}function CJ(t){const{className:e,classes:n,pulsate:r=!1,rippleX:i,rippleY:s,rippleSize:o,in:a,onExited:l,timeout:c}=t,[f,p]=D.useState(!1),g=At(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),v={width:o,height:o,top:-(o/2)+s,left:-(o/2)+i},x=At(n.child,f&&n.childLeaving,r&&n.childPulsate);return!a&&!f&&p(!0),D.useEffect(()=>{if(!a&&l!=null){const _=setTimeout(l,c);return()=>{clearTimeout(_)}}},[l,a,c]),C.jsx("span",{className:g,style:v,children:C.jsx("span",{className:x})})}const Ka=pn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),TJ=["center","classes","className"];let zw=t=>t,DL,FL,UL,zL;const PT=550,AJ=80,RJ=dg(DL||(DL=zw` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`)),PJ=dg(FL||(FL=zw` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`)),IJ=dg(UL||(UL=zw` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`)),LJ=lt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),kJ=lt(CJ,{name:"MuiTouchRipple",slot:"Ripple"})(zL||(zL=zw` + opacity: 0; + position: absolute; + + &.${0} { + opacity: 0.3; + transform: scale(1); + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + &.${0} { + animation-duration: ${0}ms; + } + + & .${0} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${0} { + opacity: 0; + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + & .${0} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${0}; + animation-duration: 2500ms; + animation-timing-function: ${0}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`),Ka.rippleVisible,RJ,PT,({theme:t})=>t.transitions.easing.easeInOut,Ka.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,Ka.child,Ka.childLeaving,PJ,PT,({theme:t})=>t.transitions.easing.easeInOut,Ka.childPulsate,IJ,({theme:t})=>t.transitions.easing.easeInOut),OJ=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:s={},className:o}=r,a=Rt(r,TJ),[l,c]=D.useState([]),f=D.useRef(0),p=D.useRef(null);D.useEffect(()=>{p.current&&(p.current(),p.current=null)},[l]);const g=D.useRef(!1),v=Ah(),x=D.useRef(null),_=D.useRef(null),b=D.useCallback(T=>{const{pulsate:L,rippleX:R,rippleY:P,rippleSize:F,cb:O}=T;c(I=>[...I,C.jsx(kJ,{classes:{ripple:At(s.ripple,Ka.ripple),rippleVisible:At(s.rippleVisible,Ka.rippleVisible),ripplePulsate:At(s.ripplePulsate,Ka.ripplePulsate),child:At(s.child,Ka.child),childLeaving:At(s.childLeaving,Ka.childLeaving),childPulsate:At(s.childPulsate,Ka.childPulsate)},timeout:PT,pulsate:L,rippleX:R,rippleY:P,rippleSize:F},f.current)]),f.current+=1,p.current=O},[s]),y=D.useCallback((T={},L={},R=()=>{})=>{const{pulsate:P=!1,center:F=i||L.pulsate,fakeElement:O=!1}=L;if((T==null?void 0:T.type)==="mousedown"&&g.current){g.current=!1;return}(T==null?void 0:T.type)==="touchstart"&&(g.current=!0);const I=O?null:_.current,H=I?I.getBoundingClientRect():{width:0,height:0,left:0,top:0};let Q,q,le;if(F||T===void 0||T.clientX===0&&T.clientY===0||!T.clientX&&!T.touches)Q=Math.round(H.width/2),q=Math.round(H.height/2);else{const{clientX:ie,clientY:ee}=T.touches&&T.touches.length>0?T.touches[0]:T;Q=Math.round(ie-H.left),q=Math.round(ee-H.top)}if(F)le=Math.sqrt((2*H.width**2+H.height**2)/3),le%2===0&&(le+=1);else{const ie=Math.max(Math.abs((I?I.clientWidth:0)-Q),Q)*2+2,ee=Math.max(Math.abs((I?I.clientHeight:0)-q),q)*2+2;le=Math.sqrt(ie**2+ee**2)}T!=null&&T.touches?x.current===null&&(x.current=()=>{b({pulsate:P,rippleX:Q,rippleY:q,rippleSize:le,cb:R})},v.start(AJ,()=>{x.current&&(x.current(),x.current=null)})):b({pulsate:P,rippleX:Q,rippleY:q,rippleSize:le,cb:R})},[i,b,v]),S=D.useCallback(()=>{y({},{pulsate:!0})},[y]),w=D.useCallback((T,L)=>{if(v.clear(),(T==null?void 0:T.type)==="touchend"&&x.current){x.current(),x.current=null,v.start(0,()=>{w(T,L)});return}x.current=null,c(R=>R.length>0?R.slice(1):R),p.current=L},[v]);return D.useImperativeHandle(n,()=>({pulsate:S,start:y,stop:w}),[S,y,w]),C.jsx(LJ,X({className:At(Ka.root,s.root,o),ref:_},a,{children:C.jsx(oJ,{component:null,exit:!0,children:l})}))}),NJ=OJ;function DJ(t){return bn("MuiButtonBase",t)}const FJ=pn("MuiButtonBase",["root","disabled","focusVisible"]),UJ=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],zJ=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:i}=t,o=Sn({root:["root",e&&"disabled",n&&"focusVisible"]},DJ,i);return n&&r&&(o.root+=` ${r}`),o},BJ=lt("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${FJ.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),HJ=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:s=!1,children:o,className:a,component:l="button",disabled:c=!1,disableRipple:f=!1,disableTouchRipple:p=!1,focusRipple:g=!1,LinkComponent:v="a",onBlur:x,onClick:_,onContextMenu:b,onDragLeave:y,onFocus:S,onFocusVisible:w,onKeyDown:T,onKeyUp:L,onMouseDown:R,onMouseLeave:P,onMouseUp:F,onTouchEnd:O,onTouchMove:I,onTouchStart:H,tabIndex:Q=0,TouchRippleProps:q,touchRippleRef:le,type:ie}=r,ee=Rt(r,UJ),ue=D.useRef(null),z=D.useRef(null),te=Kr(z,le),{isFocusVisibleRef:oe,onFocus:de,onBlur:Ce,ref:Le}=Tw(),[V,me]=D.useState(!1);c&&V&&me(!1),D.useImperativeHandle(i,()=>({focusVisible:()=>{me(!0),ue.current.focus()}}),[]);const[pe,Se]=D.useState(!1);D.useEffect(()=>{Se(!0)},[]);const je=pe&&!f&&!c;D.useEffect(()=>{V&&g&&!f&&pe&&z.current.pulsate()},[f,g,V,pe]);function it(ge,Xe,St=p){return ts(mt=>(Xe&&Xe(mt),!St&&z.current&&z.current[ge](mt),!0))}const xe=it("start",R),et=it("stop",b),Re=it("stop",y),Oe=it("stop",F),Te=it("stop",ge=>{V&&ge.preventDefault(),P&&P(ge)}),ze=it("start",H),ke=it("stop",O),rt=it("stop",I),tt=it("stop",ge=>{Ce(ge),oe.current===!1&&me(!1),x&&x(ge)},!1),ae=ts(ge=>{ue.current||(ue.current=ge.currentTarget),de(ge),oe.current===!0&&(me(!0),w&&w(ge)),S&&S(ge)}),G=()=>{const ge=ue.current;return l&&l!=="button"&&!(ge.tagName==="A"&&ge.href)},be=D.useRef(!1),$e=ts(ge=>{g&&!be.current&&V&&z.current&&ge.key===" "&&(be.current=!0,z.current.stop(ge,()=>{z.current.start(ge)})),ge.target===ge.currentTarget&&G()&&ge.key===" "&&ge.preventDefault(),T&&T(ge),ge.target===ge.currentTarget&&G()&&ge.key==="Enter"&&!c&&(ge.preventDefault(),_&&_(ge))}),Ze=ts(ge=>{g&&ge.key===" "&&z.current&&V&&!ge.defaultPrevented&&(be.current=!1,z.current.stop(ge,()=>{z.current.pulsate(ge)})),L&&L(ge),_&&ge.target===ge.currentTarget&&G()&&ge.key===" "&&!ge.defaultPrevented&&_(ge)});let We=l;We==="button"&&(ee.href||ee.to)&&(We=v);const Mt={};We==="button"?(Mt.type=ie===void 0?"button":ie,Mt.disabled=c):(!ee.href&&!ee.to&&(Mt.role="button"),c&&(Mt["aria-disabled"]=c));const pt=Kr(n,Le,ue),at=X({},r,{centerRipple:s,component:l,disabled:c,disableRipple:f,disableTouchRipple:p,focusRipple:g,tabIndex:Q,focusVisible:V}),Ie=zJ(at);return C.jsxs(BJ,X({as:We,className:At(Ie.root,a),ownerState:at,onBlur:tt,onClick:_,onContextMenu:et,onFocus:ae,onKeyDown:$e,onKeyUp:Ze,onMouseDown:xe,onMouseLeave:Te,onMouseUp:Oe,onDragLeave:Re,onTouchEnd:ke,onTouchMove:rt,onTouchStart:ze,ref:pt,tabIndex:c?-1:Q,type:ie},Mt,ee,{children:[o,je?C.jsx(NJ,X({ref:te,center:s},q)):null]}))}),Nu=HJ;function $J(t){return bn("MuiIconButton",t)}const VJ=pn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),WJ=["edge","children","className","color","disabled","disableFocusRipple","size"],jJ=t=>{const{classes:e,disabled:n,color:r,edge:i,size:s}=t,o={root:["root",n&&"disabled",r!=="default"&&`color${gt(r)}`,i&&`edge${gt(i)}`,`size${gt(s)}`]};return Sn(o,$J,e)},GJ=lt(Nu,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${gt(n.color)}`],n.edge&&e[`edge${gt(n.edge)}`],e[`size${gt(n.size)}`]]}})(({theme:t,ownerState:e})=>X({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:qn(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var n;const r=(n=(t.vars||t).palette)==null?void 0:n[e.color];return X({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&X({color:r==null?void 0:r.main},!e.disableRipple&&{"&:hover":X({},r&&{backgroundColor:t.vars?`rgba(${r.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:qn(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${VJ.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),XJ=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiIconButton"}),{edge:i=!1,children:s,className:o,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:f="medium"}=r,p=Rt(r,WJ),g=X({},r,{edge:i,color:a,disabled:l,disableFocusRipple:c,size:f}),v=jJ(g);return C.jsx(GJ,X({className:At(v.root,o),centerRipple:!0,focusRipple:!c,disabled:l,ref:n},p,{ownerState:g,children:s}))}),Vu=XJ,qJ=bt(C.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function ZJ(t){return bn("MuiTypography",t)}pn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const YJ=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],KJ=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:i,variant:s,classes:o}=t,a={root:["root",s,t.align!=="inherit"&&`align${gt(e)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Sn(a,ZJ,o)},QJ=lt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${gt(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>X({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),BL={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},JJ={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},eee=t=>JJ[t]||t,tee=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiTypography"}),i=eee(r.color),s=Ky(X({},r,{color:i})),{align:o="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:f=!1,paragraph:p=!1,variant:g="body1",variantMapping:v=BL}=s,x=Rt(s,YJ),_=X({},s,{align:o,color:i,className:a,component:l,gutterBottom:c,noWrap:f,paragraph:p,variant:g,variantMapping:v}),b=l||(p?"p":v[g]||BL[g])||"span",y=KJ(_);return C.jsx(QJ,X({as:b,ref:n,ownerState:_,className:At(y.root,a)},x))}),mr=tee,h7="base";function nee(t){return`${h7}--${t}`}function ree(t,e){return`${h7}-${t}-${e}`}function p7(t,e){const n=E8[e];return n?nee(n):ree(t,e)}function iee(t,e){const n={};return e.forEach(r=>{n[r]=p7(t,r)}),n}const see=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function oee(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function aee(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function lee(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||aee(t))}function cee(t){const e=[],n=[];return Array.from(t.querySelectorAll(see)).forEach((r,i)=>{const s=oee(r);s===-1||!lee(r)||(s===0?e.push(r):n.push({documentOrder:i,tabIndex:s,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function uee(){return!0}function dee(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:s=cee,isEnabled:o=uee,open:a}=t,l=D.useRef(!1),c=D.useRef(null),f=D.useRef(null),p=D.useRef(null),g=D.useRef(null),v=D.useRef(!1),x=D.useRef(null),_=Kr(e.ref,x),b=D.useRef(null);D.useEffect(()=>{!a||!x.current||(v.current=!n)},[n,a]),D.useEffect(()=>{if(!a||!x.current)return;const w=Oi(x.current);return x.current.contains(w.activeElement)||(x.current.hasAttribute("tabIndex")||x.current.setAttribute("tabIndex","-1"),v.current&&x.current.focus()),()=>{i||(p.current&&p.current.focus&&(l.current=!0,p.current.focus()),p.current=null)}},[a]),D.useEffect(()=>{if(!a||!x.current)return;const w=Oi(x.current),T=P=>{b.current=P,!(r||!o()||P.key!=="Tab")&&w.activeElement===x.current&&P.shiftKey&&(l.current=!0,f.current&&f.current.focus())},L=()=>{const P=x.current;if(P===null)return;if(!w.hasFocus()||!o()||l.current){l.current=!1;return}if(P.contains(w.activeElement)||r&&w.activeElement!==c.current&&w.activeElement!==f.current)return;if(w.activeElement!==g.current)g.current=null;else if(g.current!==null)return;if(!v.current)return;let F=[];if((w.activeElement===c.current||w.activeElement===f.current)&&(F=s(x.current)),F.length>0){var O,I;const H=!!((O=b.current)!=null&&O.shiftKey&&((I=b.current)==null?void 0:I.key)==="Tab"),Q=F[0],q=F[F.length-1];typeof Q!="string"&&typeof q!="string"&&(H?q.focus():Q.focus())}else P.focus()};w.addEventListener("focusin",L),w.addEventListener("keydown",T,!0);const R=setInterval(()=>{w.activeElement&&w.activeElement.tagName==="BODY"&&L()},50);return()=>{clearInterval(R),w.removeEventListener("focusin",L),w.removeEventListener("keydown",T,!0)}},[n,r,i,o,a,s]);const y=w=>{p.current===null&&(p.current=w.relatedTarget),v.current=!0,g.current=w.target;const T=e.props.onFocus;T&&T(w)},S=w=>{p.current===null&&(p.current=w.relatedTarget),v.current=!0};return C.jsxs(D.Fragment,{children:[C.jsx("div",{tabIndex:a?0:-1,onFocus:S,ref:c,"data-testid":"sentinelStart"}),D.cloneElement(e,{ref:_,onFocus:y}),C.jsx("div",{tabIndex:a?0:-1,onFocus:S,ref:f,"data-testid":"sentinelEnd"})]})}function fee(t){return typeof t=="function"?t():t}const m7=D.forwardRef(function(e,n){const{children:r,container:i,disablePortal:s=!1}=e,[o,a]=D.useState(null),l=Kr(D.isValidElement(r)?r.ref:null,n);if(Xo(()=>{s||a(fee(i)||document.body)},[i,s]),Xo(()=>{if(o&&!s)return Yv(n,o),()=>{Yv(n,null)}},[n,o,s]),s){if(D.isValidElement(r)){const c={ref:l};return D.cloneElement(r,c)}return C.jsx(D.Fragment,{children:r})}return C.jsx(D.Fragment,{children:o&&X2.createPortal(r,o)})});function hee(t){const e=Oi(t);return e.body===t?Oc(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function vv(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function HL(t){return parseInt(Oc(t).getComputedStyle(t).paddingRight,10)||0}function pee(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function $L(t,e,n,r,i){const s=[e,n,...r];[].forEach.call(t.children,o=>{const a=s.indexOf(o)===-1,l=!pee(o);a&&l&&vv(o,i)})}function jE(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function mee(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(hee(r)){const o=H8(Oi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${HL(r)+o}px`;const a=Oi(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${HL(l)+o}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=Oi(r).body;else{const o=r.parentElement,a=Oc(r);s=(o==null?void 0:o.nodeName)==="HTML"&&a.getComputedStyle(o).overflowY==="scroll"?o:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:o,property:a})=>{s?o.style.setProperty(a,s):o.style.removeProperty(a)})}}function gee(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class vee{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&vv(e.modalRef,!1);const i=gee(n);$L(n,e.mount,e.modalRef,i,!0);const s=jE(this.containers,o=>o.container===n);return s!==-1?(this.containers[s].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=jE(this.containers,s=>s.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=mee(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=jE(this.containers,o=>o.modals.indexOf(e)!==-1),s=this.containers[i];if(s.modals.splice(s.modals.indexOf(e),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),e.modalRef&&vv(e.modalRef,n),$L(s.container,e.mount,e.modalRef,s.hiddenSiblings,!1),this.containers.splice(i,1);else{const o=s.modals[s.modals.length-1];o.modalRef&&vv(o.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function yee(t){return typeof t=="function"?t():t}function xee(t){return t?t.props.hasOwnProperty("in"):!1}const _ee=new vee;function bee(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=_ee,closeAfterTransition:s=!1,onTransitionEnter:o,onTransitionExited:a,children:l,onClose:c,open:f,rootRef:p}=t,g=D.useRef({}),v=D.useRef(null),x=D.useRef(null),_=Kr(x,p),[b,y]=D.useState(!f),S=xee(l);let w=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(w=!1);const T=()=>Oi(v.current),L=()=>(g.current.modalRef=x.current,g.current.mount=v.current,g.current),R=()=>{i.mount(L(),{disableScrollLock:r}),x.current&&(x.current.scrollTop=0)},P=ts(()=>{const ee=yee(e)||T().body;i.add(L(),ee),x.current&&R()}),F=D.useCallback(()=>i.isTopModal(L()),[i]),O=ts(ee=>{v.current=ee,ee&&(f&&F()?R():x.current&&vv(x.current,w))}),I=D.useCallback(()=>{i.remove(L(),w)},[w,i]);D.useEffect(()=>()=>{I()},[I]),D.useEffect(()=>{f?P():(!S||!s)&&I()},[f,I,S,s,P]);const H=ee=>ue=>{var z;(z=ee.onKeyDown)==null||z.call(ee,ue),!(ue.key!=="Escape"||ue.which===229||!F())&&(n||(ue.stopPropagation(),c&&c(ue,"escapeKeyDown")))},Q=ee=>ue=>{var z;(z=ee.onClick)==null||z.call(ee,ue),ue.target===ue.currentTarget&&c&&c(ue,"backdropClick")};return{getRootProps:(ee={})=>{const ue=gv(t);delete ue.onTransitionEnter,delete ue.onTransitionExited;const z=X({},ue,ee);return X({role:"presentation"},z,{onKeyDown:H(z),ref:_})},getBackdropProps:(ee={})=>{const ue=ee;return X({"aria-hidden":!0},ue,{onClick:Q(ue),open:f})},getTransitionProps:()=>{const ee=()=>{y(!1),o&&o()},ue=()=>{y(!0),a&&a(),s&&I()};return{onEnter:fT(ee,l==null?void 0:l.props.onEnter),onExited:fT(ue,l==null?void 0:l.props.onExited)}},rootRef:_,portalRef:O,isTopModal:F,exited:b,hasTransition:S}}var Vo="top",dl="bottom",fl="right",Wo="left",hR="auto",rx=[Vo,dl,fl,Wo],G0="start",Qv="end",See="clippingParents",g7="viewport",M1="popper",wee="reference",VL=rx.reduce(function(t,e){return t.concat([e+"-"+G0,e+"-"+Qv])},[]),v7=[].concat(rx,[hR]).reduce(function(t,e){return t.concat([e,e+"-"+G0,e+"-"+Qv])},[]),Mee="beforeRead",Eee="read",Cee="afterRead",Tee="beforeMain",Aee="main",Ree="afterMain",Pee="beforeWrite",Iee="write",Lee="afterWrite",kee=[Mee,Eee,Cee,Tee,Aee,Ree,Pee,Iee,Lee];function Nc(t){return t?(t.nodeName||"").toLowerCase():null}function Ca(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function up(t){var e=Ca(t).Element;return t instanceof e||t instanceof Element}function ol(t){var e=Ca(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function pR(t){if(typeof ShadowRoot>"u")return!1;var e=Ca(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Oee(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},s=e.elements[n];!ol(s)||!Nc(s)||(Object.assign(s.style,r),Object.keys(i).forEach(function(o){var a=i[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function Nee(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],s=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=o.reduce(function(l,c){return l[c]="",l},{});!ol(i)||!Nc(i)||(Object.assign(i.style,a),Object.keys(s).forEach(function(l){i.removeAttribute(l)}))})}}const Dee={name:"applyStyles",enabled:!0,phase:"write",fn:Oee,effect:Nee,requires:["computeStyles"]};function Pc(t){return t.split("-")[0]}var qh=Math.max,h2=Math.min,X0=Math.round;function IT(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function y7(){return!/^((?!chrome|android).)*safari/i.test(IT())}function q0(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,s=1;e&&ol(t)&&(i=t.offsetWidth>0&&X0(r.width)/t.offsetWidth||1,s=t.offsetHeight>0&&X0(r.height)/t.offsetHeight||1);var o=up(t)?Ca(t):window,a=o.visualViewport,l=!y7()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,f=(r.top+(l&&a?a.offsetTop:0))/s,p=r.width/i,g=r.height/s;return{width:p,height:g,top:f,right:c+p,bottom:f+g,left:c,x:c,y:f}}function mR(t){var e=q0(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function x7(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&pR(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Du(t){return Ca(t).getComputedStyle(t)}function Fee(t){return["table","td","th"].indexOf(Nc(t))>=0}function gf(t){return((up(t)?t.ownerDocument:t.document)||window.document).documentElement}function Bw(t){return Nc(t)==="html"?t:t.assignedSlot||t.parentNode||(pR(t)?t.host:null)||gf(t)}function WL(t){return!ol(t)||Du(t).position==="fixed"?null:t.offsetParent}function Uee(t){var e=/firefox/i.test(IT()),n=/Trident/i.test(IT());if(n&&ol(t)){var r=Du(t);if(r.position==="fixed")return null}var i=Bw(t);for(pR(i)&&(i=i.host);ol(i)&&["html","body"].indexOf(Nc(i))<0;){var s=Du(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function ix(t){for(var e=Ca(t),n=WL(t);n&&Fee(n)&&Du(n).position==="static";)n=WL(n);return n&&(Nc(n)==="html"||Nc(n)==="body"&&Du(n).position==="static")?e:n||Uee(t)||e}function gR(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function yv(t,e,n){return qh(t,h2(e,n))}function zee(t,e,n){var r=yv(t,e,n);return r>n?n:r}function _7(){return{top:0,right:0,bottom:0,left:0}}function b7(t){return Object.assign({},_7(),t)}function S7(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Bee=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,b7(typeof e!="number"?e:S7(e,rx))};function Hee(t){var e,n=t.state,r=t.name,i=t.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Pc(n.placement),l=gR(a),c=[Wo,fl].indexOf(a)>=0,f=c?"height":"width";if(!(!s||!o)){var p=Bee(i.padding,n),g=mR(s),v=l==="y"?Vo:Wo,x=l==="y"?dl:fl,_=n.rects.reference[f]+n.rects.reference[l]-o[l]-n.rects.popper[f],b=o[l]-n.rects.reference[l],y=ix(s),S=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,w=_/2-b/2,T=p[v],L=S-g[f]-p[x],R=S/2-g[f]/2+w,P=yv(T,R,L),F=l;n.modifiersData[r]=(e={},e[F]=P,e.centerOffset=P-R,e)}}function $ee(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||x7(e.elements.popper,i)&&(e.elements.arrow=i))}const Vee={name:"arrow",enabled:!0,phase:"main",fn:Hee,effect:$ee,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z0(t){return t.split("-")[1]}var Wee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function jee(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:X0(n*i)/i||0,y:X0(r*i)/i||0}}function jL(t){var e,n=t.popper,r=t.popperRect,i=t.placement,s=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,f=t.roundOffsets,p=t.isFixed,g=o.x,v=g===void 0?0:g,x=o.y,_=x===void 0?0:x,b=typeof f=="function"?f({x:v,y:_}):{x:v,y:_};v=b.x,_=b.y;var y=o.hasOwnProperty("x"),S=o.hasOwnProperty("y"),w=Wo,T=Vo,L=window;if(c){var R=ix(n),P="clientHeight",F="clientWidth";if(R===Ca(n)&&(R=gf(n),Du(R).position!=="static"&&a==="absolute"&&(P="scrollHeight",F="scrollWidth")),R=R,i===Vo||(i===Wo||i===fl)&&s===Qv){T=dl;var O=p&&R===L&&L.visualViewport?L.visualViewport.height:R[P];_-=O-r.height,_*=l?1:-1}if(i===Wo||(i===Vo||i===dl)&&s===Qv){w=fl;var I=p&&R===L&&L.visualViewport?L.visualViewport.width:R[F];v-=I-r.width,v*=l?1:-1}}var H=Object.assign({position:a},c&&Wee),Q=f===!0?jee({x:v,y:_},Ca(n)):{x:v,y:_};if(v=Q.x,_=Q.y,l){var q;return Object.assign({},H,(q={},q[T]=S?"0":"",q[w]=y?"0":"",q.transform=(L.devicePixelRatio||1)<=1?"translate("+v+"px, "+_+"px)":"translate3d("+v+"px, "+_+"px, 0)",q))}return Object.assign({},H,(e={},e[T]=S?_+"px":"",e[w]=y?v+"px":"",e.transform="",e))}function Gee(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,s=n.adaptive,o=s===void 0?!0:s,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Pc(e.placement),variation:Z0(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,jL(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,jL(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Xee={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Gee,data:{}};var G_={passive:!0};function qee(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,s=i===void 0?!0:i,o=r.resize,a=o===void 0?!0:o,l=Ca(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach(function(f){f.addEventListener("scroll",n.update,G_)}),a&&l.addEventListener("resize",n.update,G_),function(){s&&c.forEach(function(f){f.removeEventListener("scroll",n.update,G_)}),a&&l.removeEventListener("resize",n.update,G_)}}const Zee={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qee,data:{}};var Yee={left:"right",right:"left",bottom:"top",top:"bottom"};function ES(t){return t.replace(/left|right|bottom|top/g,function(e){return Yee[e]})}var Kee={start:"end",end:"start"};function GL(t){return t.replace(/start|end/g,function(e){return Kee[e]})}function vR(t){var e=Ca(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function yR(t){return q0(gf(t)).left+vR(t).scrollLeft}function Qee(t,e){var n=Ca(t),r=gf(t),i=n.visualViewport,s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;var c=y7();(c||!c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a+yR(t),y:l}}function Jee(t){var e,n=gf(t),r=vR(t),i=(e=t.ownerDocument)==null?void 0:e.body,s=qh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=qh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+yR(t),l=-r.scrollTop;return Du(i||n).direction==="rtl"&&(a+=qh(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function xR(t){var e=Du(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function w7(t){return["html","body","#document"].indexOf(Nc(t))>=0?t.ownerDocument.body:ol(t)&&xR(t)?t:w7(Bw(t))}function xv(t,e){var n;e===void 0&&(e=[]);var r=w7(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),s=Ca(r),o=i?[s].concat(s.visualViewport||[],xR(r)?r:[]):r,a=e.concat(o);return i?a:a.concat(xv(Bw(o)))}function LT(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ete(t,e){var n=q0(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function XL(t,e,n){return e===g7?LT(Qee(t,n)):up(e)?ete(e,n):LT(Jee(gf(t)))}function tte(t){var e=xv(Bw(t)),n=["absolute","fixed"].indexOf(Du(t).position)>=0,r=n&&ol(t)?ix(t):t;return up(r)?e.filter(function(i){return up(i)&&x7(i,r)&&Nc(i)!=="body"}):[]}function nte(t,e,n,r){var i=e==="clippingParents"?tte(t):[].concat(e),s=[].concat(i,[n]),o=s[0],a=s.reduce(function(l,c){var f=XL(t,c,r);return l.top=qh(f.top,l.top),l.right=h2(f.right,l.right),l.bottom=h2(f.bottom,l.bottom),l.left=qh(f.left,l.left),l},XL(t,o,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function M7(t){var e=t.reference,n=t.element,r=t.placement,i=r?Pc(r):null,s=r?Z0(r):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(i){case Vo:l={x:o,y:e.y-n.height};break;case dl:l={x:o,y:e.y+e.height};break;case fl:l={x:e.x+e.width,y:a};break;case Wo:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=i?gR(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(s){case G0:l[c]=l[c]-(e[f]/2-n[f]/2);break;case Qv:l[c]=l[c]+(e[f]/2-n[f]/2);break}}return l}function Jv(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,s=n.strategy,o=s===void 0?t.strategy:s,a=n.boundary,l=a===void 0?See:a,c=n.rootBoundary,f=c===void 0?g7:c,p=n.elementContext,g=p===void 0?M1:p,v=n.altBoundary,x=v===void 0?!1:v,_=n.padding,b=_===void 0?0:_,y=b7(typeof b!="number"?b:S7(b,rx)),S=g===M1?wee:M1,w=t.rects.popper,T=t.elements[x?S:g],L=nte(up(T)?T:T.contextElement||gf(t.elements.popper),l,f,o),R=q0(t.elements.reference),P=M7({reference:R,element:w,strategy:"absolute",placement:i}),F=LT(Object.assign({},w,P)),O=g===M1?F:R,I={top:L.top-O.top+y.top,bottom:O.bottom-L.bottom+y.bottom,left:L.left-O.left+y.left,right:O.right-L.right+y.right},H=t.modifiersData.offset;if(g===M1&&H){var Q=H[i];Object.keys(I).forEach(function(q){var le=[fl,dl].indexOf(q)>=0?1:-1,ie=[Vo,dl].indexOf(q)>=0?"y":"x";I[q]+=Q[ie]*le})}return I}function rte(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,s=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?v7:l,f=Z0(r),p=f?a?VL:VL.filter(function(x){return Z0(x)===f}):rx,g=p.filter(function(x){return c.indexOf(x)>=0});g.length===0&&(g=p);var v=g.reduce(function(x,_){return x[_]=Jv(t,{placement:_,boundary:i,rootBoundary:s,padding:o})[Pc(_)],x},{});return Object.keys(v).sort(function(x,_){return v[x]-v[_]})}function ite(t){if(Pc(t)===hR)return[];var e=ES(t);return[GL(t),e,GL(e)]}function ste(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,f=n.boundary,p=n.rootBoundary,g=n.altBoundary,v=n.flipVariations,x=v===void 0?!0:v,_=n.allowedAutoPlacements,b=e.options.placement,y=Pc(b),S=y===b,w=l||(S||!x?[ES(b)]:ite(b)),T=[b].concat(w).reduce(function(V,me){return V.concat(Pc(me)===hR?rte(e,{placement:me,boundary:f,rootBoundary:p,padding:c,flipVariations:x,allowedAutoPlacements:_}):me)},[]),L=e.rects.reference,R=e.rects.popper,P=new Map,F=!0,O=T[0],I=0;I=0,ie=le?"width":"height",ee=Jv(e,{placement:H,boundary:f,rootBoundary:p,altBoundary:g,padding:c}),ue=le?q?fl:Wo:q?dl:Vo;L[ie]>R[ie]&&(ue=ES(ue));var z=ES(ue),te=[];if(s&&te.push(ee[Q]<=0),a&&te.push(ee[ue]<=0,ee[z]<=0),te.every(function(V){return V})){O=H,F=!1;break}P.set(H,te)}if(F)for(var oe=x?3:1,de=function(me){var pe=T.find(function(Se){var je=P.get(Se);if(je)return je.slice(0,me).every(function(it){return it})});if(pe)return O=pe,"break"},Ce=oe;Ce>0;Ce--){var Le=de(Ce);if(Le==="break")break}e.placement!==O&&(e.modifiersData[r]._skip=!0,e.placement=O,e.reset=!0)}}const ote={name:"flip",enabled:!0,phase:"main",fn:ste,requiresIfExists:["offset"],data:{_skip:!1}};function qL(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function ZL(t){return[Vo,fl,dl,Wo].some(function(e){return t[e]>=0})}function ate(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,s=e.modifiersData.preventOverflow,o=Jv(e,{elementContext:"reference"}),a=Jv(e,{altBoundary:!0}),l=qL(o,r),c=qL(a,i,s),f=ZL(l),p=ZL(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}const lte={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ate};function cte(t,e,n){var r=Pc(t),i=[Wo,Vo].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=s[0],a=s[1];return o=o||0,a=(a||0)*i,[Wo,fl].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function ute(t){var e=t.state,n=t.options,r=t.name,i=n.offset,s=i===void 0?[0,0]:i,o=v7.reduce(function(f,p){return f[p]=cte(p,e.rects,s),f},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=o}const dte={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ute};function fte(t){var e=t.state,n=t.name;e.modifiersData[n]=M7({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const hte={name:"popperOffsets",enabled:!0,phase:"read",fn:fte,data:{}};function pte(t){return t==="x"?"y":"x"}function mte(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,p=n.padding,g=n.tether,v=g===void 0?!0:g,x=n.tetherOffset,_=x===void 0?0:x,b=Jv(e,{boundary:l,rootBoundary:c,padding:p,altBoundary:f}),y=Pc(e.placement),S=Z0(e.placement),w=!S,T=gR(y),L=pte(T),R=e.modifiersData.popperOffsets,P=e.rects.reference,F=e.rects.popper,O=typeof _=="function"?_(Object.assign({},e.rects,{placement:e.placement})):_,I=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),H=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,Q={x:0,y:0};if(R){if(s){var q,le=T==="y"?Vo:Wo,ie=T==="y"?dl:fl,ee=T==="y"?"height":"width",ue=R[T],z=ue+b[le],te=ue-b[ie],oe=v?-F[ee]/2:0,de=S===G0?P[ee]:F[ee],Ce=S===G0?-F[ee]:-P[ee],Le=e.elements.arrow,V=v&&Le?mR(Le):{width:0,height:0},me=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:_7(),pe=me[le],Se=me[ie],je=yv(0,P[ee],V[ee]),it=w?P[ee]/2-oe-je-pe-I.mainAxis:de-je-pe-I.mainAxis,xe=w?-P[ee]/2+oe+je+Se+I.mainAxis:Ce+je+Se+I.mainAxis,et=e.elements.arrow&&ix(e.elements.arrow),Re=et?T==="y"?et.clientTop||0:et.clientLeft||0:0,Oe=(q=H==null?void 0:H[T])!=null?q:0,Te=ue+it-Oe-Re,ze=ue+xe-Oe,ke=yv(v?h2(z,Te):z,ue,v?qh(te,ze):te);R[T]=ke,Q[T]=ke-ue}if(a){var rt,tt=T==="x"?Vo:Wo,ae=T==="x"?dl:fl,G=R[L],be=L==="y"?"height":"width",$e=G+b[tt],Ze=G-b[ae],We=[Vo,Wo].indexOf(y)!==-1,Mt=(rt=H==null?void 0:H[L])!=null?rt:0,pt=We?$e:G-P[be]-F[be]-Mt+I.altAxis,at=We?G+P[be]+F[be]-Mt-I.altAxis:Ze,Ie=v&&We?zee(pt,G,at):yv(v?pt:$e,G,v?at:Ze);R[L]=Ie,Q[L]=Ie-G}e.modifiersData[r]=Q}}const gte={name:"preventOverflow",enabled:!0,phase:"main",fn:mte,requiresIfExists:["offset"]};function vte(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function yte(t){return t===Ca(t)||!ol(t)?vR(t):vte(t)}function xte(t){var e=t.getBoundingClientRect(),n=X0(e.width)/t.offsetWidth||1,r=X0(e.height)/t.offsetHeight||1;return n!==1||r!==1}function _te(t,e,n){n===void 0&&(n=!1);var r=ol(e),i=ol(e)&&xte(e),s=gf(e),o=q0(t,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Nc(e)!=="body"||xR(s))&&(a=yte(e)),ol(e)?(l=q0(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=yR(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function bte(t){var e=new Map,n=new Set,r=[];t.forEach(function(s){e.set(s.name,s)});function i(s){n.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&i(l)}}),r.push(s)}return t.forEach(function(s){n.has(s.name)||i(s)}),r}function Ste(t){var e=bte(t);return kee.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function wte(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Mte(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var YL={placement:"bottom",modifiers:[],strategy:"absolute"};function KL(){for(var t=arguments.length,e=new Array(t),n=0;nSn({root:["root"]},SJ(Ate)),Ote={},Nte=D.forwardRef(function(e,n){var r;const{anchorEl:i,children:s,direction:o,disablePortal:a,modifiers:l,open:c,placement:f,popperOptions:p,popperRef:g,slotProps:v={},slots:x={},TransitionProps:_}=e,b=Rt(e,Rte),y=D.useRef(null),S=Kr(y,n),w=D.useRef(null),T=Kr(w,g),L=D.useRef(T);Xo(()=>{L.current=T},[T]),D.useImperativeHandle(g,()=>w.current,[]);const R=Ite(f,o),[P,F]=D.useState(R),[O,I]=D.useState(kT(i));D.useEffect(()=>{w.current&&w.current.forceUpdate()}),D.useEffect(()=>{i&&I(kT(i))},[i]),Xo(()=>{if(!O||!c)return;const ie=z=>{F(z.placement)};let ee=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:z})=>{ie(z)}}];l!=null&&(ee=ee.concat(l)),p&&p.modifiers!=null&&(ee=ee.concat(p.modifiers));const ue=Tte(O,y.current,X({placement:R},p,{modifiers:ee}));return L.current(ue),()=>{ue.destroy(),L.current(null)}},[O,a,l,c,p,R]);const H={placement:P};_!==null&&(H.TransitionProps=_);const Q=kte(),q=(r=x.root)!=null?r:"div",le=Qi({elementType:q,externalSlotProps:v.root,externalForwardedProps:b,additionalProps:{role:"tooltip",ref:S},ownerState:e,className:Q.root});return C.jsx(q,X({},le,{children:typeof s=="function"?s(H):s}))}),Dte=D.forwardRef(function(e,n){const{anchorEl:r,children:i,container:s,direction:o="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:c,open:f,placement:p="bottom",popperOptions:g=Ote,popperRef:v,style:x,transition:_=!1,slotProps:b={},slots:y={}}=e,S=Rt(e,Pte),[w,T]=D.useState(!0),L=()=>{T(!1)},R=()=>{T(!0)};if(!l&&!f&&(!_||w))return null;let P;if(s)P=s;else if(r){const I=kT(r);P=I&&Lte(I)?Oi(I).body:Oi(null).body}const F=!f&&l&&(!_||w)?"none":void 0,O=_?{in:f,onEnter:L,onExited:R}:void 0;return C.jsx(m7,{disablePortal:a,container:P,children:C.jsx(Nte,X({anchorEl:r,direction:o,disablePortal:a,modifiers:c,ref:n,open:_?!w:f,placement:p,popperOptions:g,popperRef:v,slotProps:b,slots:y},S,{style:X({position:"fixed",top:0,left:0,display:F},x),TransitionProps:O,children:i}))})}),Fte=2;function C7(t,e){return t-e}function QL(t,e){var n;const{index:r}=(n=t.reduce((i,s,o)=>{const a=Math.abs(e-s);return i===null||a({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},$te=t=>t;let Y_;function ek(){return Y_===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Y_=CSS.supports("touch-action","none"):Y_=!0),Y_}function Vte(t){const{"aria-labelledby":e,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:s=!1,marks:o=!1,max:a=100,min:l=0,name:c,onChange:f,onChangeCommitted:p,orientation:g="horizontal",rootRef:v,scale:x=$te,step:_=1,shiftStep:b=10,tabIndex:y,value:S}=t,w=D.useRef(),[T,L]=D.useState(-1),[R,P]=D.useState(-1),[F,O]=D.useState(!1),I=D.useRef(0),[H,Q]=Cu({controlled:S,default:n??l,name:"Slider"}),q=f&&((Ie,ge,Xe)=>{const St=Ie.nativeEvent||Ie,mt=new St.constructor(St.type,St);Object.defineProperty(mt,"target",{writable:!0,value:{value:ge,name:c}}),f(mt,ge,Xe)}),le=Array.isArray(H);let ie=le?H.slice().sort(C7):[H];ie=ie.map(Ie=>Ie==null?l:$m(Ie,l,a));const ee=o===!0&&_!==null?[...Array(Math.floor((a-l)/_)+1)].map((Ie,ge)=>({value:l+_*ge})):o||[],ue=ee.map(Ie=>Ie.value),{isFocusVisibleRef:z,onBlur:te,onFocus:oe,ref:de}=Tw(),[Ce,Le]=D.useState(-1),V=D.useRef(),me=Kr(de,V),pe=Kr(v,me),Se=Ie=>ge=>{var Xe;const St=Number(ge.currentTarget.getAttribute("data-index"));oe(ge),z.current===!0&&Le(St),P(St),Ie==null||(Xe=Ie.onFocus)==null||Xe.call(Ie,ge)},je=Ie=>ge=>{var Xe;te(ge),z.current===!1&&Le(-1),P(-1),Ie==null||(Xe=Ie.onBlur)==null||Xe.call(Ie,ge)},it=(Ie,ge)=>{const Xe=Number(Ie.currentTarget.getAttribute("data-index")),St=ie[Xe],mt=ue.indexOf(St);let Be=ge;if(ee&&_==null){const vt=ue[ue.length-1];Be>vt?Be=vt:Bege=>{var Xe;if(_!==null){const St=Number(ge.currentTarget.getAttribute("data-index")),mt=ie[St];let Be=null;(ge.key==="ArrowLeft"||ge.key==="ArrowDown")&&ge.shiftKey||ge.key==="PageDown"?Be=Math.max(mt-b,l):((ge.key==="ArrowRight"||ge.key==="ArrowUp")&&ge.shiftKey||ge.key==="PageUp")&&(Be=Math.min(mt+b,a)),Be!==null&&(it(ge,Be),ge.preventDefault())}Ie==null||(Xe=Ie.onKeyDown)==null||Xe.call(Ie,ge)};Xo(()=>{if(r&&V.current.contains(document.activeElement)){var Ie;(Ie=document.activeElement)==null||Ie.blur()}},[r]),r&&T!==-1&&L(-1),r&&Ce!==-1&&Le(-1);const et=Ie=>ge=>{var Xe;(Xe=Ie.onChange)==null||Xe.call(Ie,ge),it(ge,ge.target.valueAsNumber)},Re=D.useRef();let Oe=g;s&&g==="horizontal"&&(Oe+="-reverse");const Te=({finger:Ie,move:ge=!1})=>{const{current:Xe}=V,{width:St,height:mt,bottom:Be,left:vt}=Xe.getBoundingClientRect();let qe;Oe.indexOf("vertical")===0?qe=(Be-Ie.y)/mt:qe=(Ie.x-vt)/St,Oe.indexOf("-reverse")!==-1&&(qe=1-qe);let ce;if(ce=Ute(qe,l,a),_)ce=Bte(ce,_,l);else{const fe=QL(ue,ce);ce=ue[fe]}ce=$m(ce,l,a);let Ne=0;if(le){ge?Ne=Re.current:Ne=QL(ie,ce),i&&(ce=$m(ce,ie[Ne-1]||-1/0,ie[Ne+1]||1/0));const fe=ce;ce=JL({values:ie,newValue:ce,index:Ne}),i&&ge||(Ne=ce.indexOf(fe),Re.current=Ne)}return{newValue:ce,activeIndex:Ne}},ze=ts(Ie=>{const ge=X_(Ie,w);if(!ge)return;if(I.current+=1,Ie.type==="mousemove"&&Ie.buttons===0){ke(Ie);return}const{newValue:Xe,activeIndex:St}=Te({finger:ge,move:!0});q_({sliderRef:V,activeIndex:St,setActive:L}),Q(Xe),!F&&I.current>Fte&&O(!0),q&&!Z_(Xe,H)&&q(Ie,Xe,St)}),ke=ts(Ie=>{const ge=X_(Ie,w);if(O(!1),!ge)return;const{newValue:Xe}=Te({finger:ge,move:!0});L(-1),Ie.type==="touchend"&&P(-1),p&&p(Ie,Xe),w.current=void 0,tt()}),rt=ts(Ie=>{if(r)return;ek()||Ie.preventDefault();const ge=Ie.changedTouches[0];ge!=null&&(w.current=ge.identifier);const Xe=X_(Ie,w);if(Xe!==!1){const{newValue:mt,activeIndex:Be}=Te({finger:Xe});q_({sliderRef:V,activeIndex:Be,setActive:L}),Q(mt),q&&!Z_(mt,H)&&q(Ie,mt,Be)}I.current=0;const St=Oi(V.current);St.addEventListener("touchmove",ze,{passive:!0}),St.addEventListener("touchend",ke,{passive:!0})}),tt=D.useCallback(()=>{const Ie=Oi(V.current);Ie.removeEventListener("mousemove",ze),Ie.removeEventListener("mouseup",ke),Ie.removeEventListener("touchmove",ze),Ie.removeEventListener("touchend",ke)},[ke,ze]);D.useEffect(()=>{const{current:Ie}=V;return Ie.addEventListener("touchstart",rt,{passive:ek()}),()=>{Ie.removeEventListener("touchstart",rt),tt()}},[tt,rt]),D.useEffect(()=>{r&&tt()},[r,tt]);const ae=Ie=>ge=>{var Xe;if((Xe=Ie.onMouseDown)==null||Xe.call(Ie,ge),r||ge.defaultPrevented||ge.button!==0)return;ge.preventDefault();const St=X_(ge,w);if(St!==!1){const{newValue:Be,activeIndex:vt}=Te({finger:St});q_({sliderRef:V,activeIndex:vt,setActive:L}),Q(Be),q&&!Z_(Be,H)&&q(ge,Be,vt)}I.current=0;const mt=Oi(V.current);mt.addEventListener("mousemove",ze,{passive:!0}),mt.addEventListener("mouseup",ke)},G=p2(le?ie[0]:l,l,a),be=p2(ie[ie.length-1],l,a)-G,$e=(Ie={})=>{const ge=gv(Ie),Xe={onMouseDown:ae(ge||{})},St=X({},ge,Xe);return X({},Ie,{ref:pe},St)},Ze=Ie=>ge=>{var Xe;(Xe=Ie.onMouseOver)==null||Xe.call(Ie,ge);const St=Number(ge.currentTarget.getAttribute("data-index"));P(St)},We=Ie=>ge=>{var Xe;(Xe=Ie.onMouseLeave)==null||Xe.call(Ie,ge),P(-1)};return{active:T,axis:Oe,axisProps:Hte,dragging:F,focusedThumbIndex:Ce,getHiddenInputProps:(Ie={})=>{var ge;const Xe=gv(Ie),St={onChange:et(Xe||{}),onFocus:Se(Xe||{}),onBlur:je(Xe||{}),onKeyDown:xe(Xe||{})},mt=X({},Xe,St);return X({tabIndex:y,"aria-labelledby":e,"aria-orientation":g,"aria-valuemax":x(a),"aria-valuemin":x(l),name:c,type:"range",min:t.min,max:t.max,step:t.step===null&&t.marks?"any":(ge=t.step)!=null?ge:void 0,disabled:r},Ie,mt,{style:X({},_K,{direction:s?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:$e,getThumbProps:(Ie={})=>{const ge=gv(Ie),Xe={onMouseOver:Ze(ge||{}),onMouseLeave:We(ge||{})};return X({},Ie,ge,Xe)},marks:ee,open:R,range:le,rootRef:pe,trackLeap:be,trackOffset:G,values:ie,getThumbStyle:Ie=>({pointerEvents:T!==-1&&T!==Ie?"none":void 0})}}const Wte=["onChange","maxRows","minRows","style","value"];function K_(t){return parseInt(t,10)||0}const jte={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Gte(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflowing}const Xte=D.forwardRef(function(e,n){const{onChange:r,maxRows:i,minRows:s=1,style:o,value:a}=e,l=Rt(e,Wte),{current:c}=D.useRef(a!=null),f=D.useRef(null),p=Kr(n,f),g=D.useRef(null),v=D.useCallback(()=>{const b=f.current,S=Oc(b).getComputedStyle(b);if(S.width==="0px")return{outerHeightStyle:0,overflowing:!1};const w=g.current;w.style.width=S.width,w.value=b.value||e.placeholder||"x",w.value.slice(-1)===` +`&&(w.value+=" ");const T=S.boxSizing,L=K_(S.paddingBottom)+K_(S.paddingTop),R=K_(S.borderBottomWidth)+K_(S.borderTopWidth),P=w.scrollHeight;w.value="x";const F=w.scrollHeight;let O=P;s&&(O=Math.max(Number(s)*F,O)),i&&(O=Math.min(Number(i)*F,O)),O=Math.max(O,F);const I=O+(T==="border-box"?L+R:0),H=Math.abs(O-P)<=1;return{outerHeightStyle:I,overflowing:H}},[i,s,e.placeholder]),x=D.useCallback(()=>{const b=v();if(Gte(b))return;const y=f.current;y.style.height=`${b.outerHeightStyle}px`,y.style.overflow=b.overflowing?"hidden":""},[v]);Xo(()=>{const b=()=>{x()};let y;const S=Qy(b),w=f.current,T=Oc(w);T.addEventListener("resize",S);let L;return typeof ResizeObserver<"u"&&(L=new ResizeObserver(b),L.observe(w)),()=>{S.clear(),cancelAnimationFrame(y),T.removeEventListener("resize",S),L&&L.disconnect()}},[v,x]),Xo(()=>{x()});const _=b=>{c||x(),r&&r(b)};return C.jsxs(D.Fragment,{children:[C.jsx("textarea",X({value:a,onChange:_,ref:p,rows:s,style:o},l)),C.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:g,tabIndex:-1,style:X({},jte.shadow,o,{paddingTop:0,paddingBottom:0})})]})});function tk(t){return typeof t.normalize<"u"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):t}function qte(t={}){const{ignoreAccents:e=!0,ignoreCase:n=!0,limit:r,matchFrom:i="any",stringify:s,trim:o=!1}=t;return(a,{inputValue:l,getOptionLabel:c})=>{let f=o?l.trim():l;n&&(f=f.toLowerCase()),e&&(f=tk(f));const p=f?a.filter(g=>{let v=(s||c)(g);return n&&(v=v.toLowerCase()),e&&(v=tk(v)),i==="start"?v.indexOf(f)===0:v.indexOf(f)>-1}):a;return typeof r=="number"?p.slice(0,r):p}}function Q_(t,e){for(let n=0;n{var e;return t.current!==null&&((e=t.current.parentElement)==null?void 0:e.contains(document.activeElement))};function Kte(t){const{unstable_isActiveElementInListbox:e=Yte,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:i=!1,autoSelect:s=!1,blurOnSelect:o=!1,clearOnBlur:a=!t.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:f=t.multiple?[]:null,disableClearable:p=!1,disableCloseOnSelect:g=!1,disabled:v,disabledItemsFocusable:x=!1,disableListWrap:_=!1,filterOptions:b=Zte,filterSelectedOptions:y=!1,freeSolo:S=!1,getOptionDisabled:w,getOptionKey:T,getOptionLabel:L=B=>{var ne;return(ne=B.label)!=null?ne:B},groupBy:R,handleHomeEndKeys:P=!t.freeSolo,id:F,includeInputInList:O=!1,inputValue:I,isOptionEqualToValue:H=(B,ne)=>B===ne,multiple:Q=!1,onChange:q,onClose:le,onHighlightChange:ie,onInputChange:ee,onOpen:ue,open:z,openOnFocus:te=!1,options:oe,readOnly:de=!1,selectOnFocus:Ce=!t.freeSolo,value:Le}=t,V=hg(F);let me=L;me=B=>{const ne=L(B);return typeof ne!="string"?String(ne):ne};const pe=D.useRef(!1),Se=D.useRef(!0),je=D.useRef(null),it=D.useRef(null),[xe,et]=D.useState(null),[Re,Oe]=D.useState(-1),Te=i?0:-1,ze=D.useRef(Te),[ke,rt]=Cu({controlled:Le,default:f,name:c}),[tt,ae]=Cu({controlled:I,default:"",name:c,state:"inputValue"}),[G,be]=D.useState(!1),$e=D.useCallback((B,ne)=>{if(!(Q?ke.length!(y&&(Q?ke:[ke]).some(ne=>ne!==null&&H(B,ne)))),{inputValue:at&&Mt?"":tt,getOptionLabel:me}):[],Xe=yK({filteredOptions:ge,value:ke,inputValue:tt});D.useEffect(()=>{const B=ke!==Xe.value;G&&!B||S&&!B||$e(null,ke)},[ke,$e,G,Xe.value,S]);const St=Ze&&ge.length>0&&!de,mt=ts(B=>{B===-1?je.current.focus():xe.querySelector(`[data-tag-index="${B}"]`).focus()});D.useEffect(()=>{Q&&Re>ke.length-1&&(Oe(-1),mt(-1))},[ke,Q,Re,mt]);function Be(B,ne){if(!it.current||B<0||B>=ge.length)return-1;let _e=B;for(;;){const ye=it.current.querySelector(`[data-option-index="${_e}"]`),we=x?!1:!ye||ye.disabled||ye.getAttribute("aria-disabled")==="true";if(ye&&ye.hasAttribute("tabindex")&&!we)return _e;if(ne==="next"?_e=(_e+1)%ge.length:_e=(_e-1+ge.length)%ge.length,_e===B)return-1}}const vt=ts(({event:B,index:ne,reason:_e="auto"})=>{if(ze.current=ne,ne===-1?je.current.removeAttribute("aria-activedescendant"):je.current.setAttribute("aria-activedescendant",`${V}-option-${ne}`),ie&&ie(B,ne===-1?null:ge[ne],_e),!it.current)return;const ye=it.current.querySelector(`[role="option"].${n}-focused`);ye&&(ye.classList.remove(`${n}-focused`),ye.classList.remove(`${n}-focusVisible`));let we=it.current;if(it.current.getAttribute("role")!=="listbox"&&(we=it.current.parentElement.querySelector('[role="listbox"]')),!we)return;if(ne===-1){we.scrollTop=0;return}const Qe=it.current.querySelector(`[data-option-index="${ne}"]`);if(Qe&&(Qe.classList.add(`${n}-focused`),_e==="keyboard"&&Qe.classList.add(`${n}-focusVisible`),we.scrollHeight>we.clientHeight&&_e!=="mouse"&&_e!=="touch")){const wt=Qe,Ft=we.clientHeight+we.scrollTop,zt=wt.offsetTop+wt.offsetHeight;zt>Ft?we.scrollTop=zt-we.clientHeight:wt.offsetTop-wt.offsetHeight*(R?1.3:0){if(!Ie)return;const Qe=Be((()=>{const wt=ge.length-1;if(ne==="reset")return Te;if(ne==="start")return 0;if(ne==="end")return wt;const Ft=ze.current+ne;return Ft<0?Ft===-1&&O?-1:_&&ze.current!==-1||Math.abs(ne)>1?0:wt:Ft>wt?Ft===wt+1&&O?-1:_||Math.abs(ne)>1?wt:0:Ft})(),_e);if(vt({index:Qe,reason:ye,event:B}),r&&ne!=="reset")if(Qe===-1)je.current.value=tt;else{const wt=me(ge[Qe]);je.current.value=wt,wt.toLowerCase().indexOf(tt.toLowerCase())===0&&tt.length>0&&je.current.setSelectionRange(tt.length,wt.length)}}),ce=()=>{const B=(ne,_e)=>{const ye=ne?me(ne):"",we=_e?me(_e):"";return ye===we};if(ze.current!==-1&&Xe.filteredOptions&&Xe.filteredOptions.length!==ge.length&&Xe.inputValue===tt&&(Q?ke.length===Xe.value.length&&Xe.value.every((ne,_e)=>me(ke[_e])===me(ne)):B(Xe.value,ke))){const ne=Xe.filteredOptions[ze.current];if(ne)return Q_(ge,_e=>me(_e)===me(ne))}return-1},Ne=D.useCallback(()=>{if(!Ie)return;const B=ce();if(B!==-1){ze.current=B;return}const ne=Q?ke[0]:ke;if(ge.length===0||ne==null){qe({diff:"reset"});return}if(it.current){if(ne!=null){const _e=ge[ze.current];if(Q&&_e&&Q_(ke,we=>H(_e,we))!==-1)return;const ye=Q_(ge,we=>H(we,ne));ye===-1?qe({diff:"reset"}):vt({index:ye});return}if(ze.current>=ge.length-1){vt({index:ge.length-1});return}vt({index:ze.current})}},[ge.length,Q?!1:ke,y,qe,vt,Ie,tt,Q]),fe=ts(B=>{Yv(it,B),B&&Ne()});D.useEffect(()=>{Ne()},[Ne]);const Fe=B=>{Ze||(We(!0),pt(!0),ue&&ue(B))},He=(B,ne)=>{Ze&&(We(!1),le&&le(B,ne))},ut=(B,ne,_e,ye)=>{if(Q){if(ke.length===ne.length&&ke.every((we,Qe)=>we===ne[Qe]))return}else if(ke===ne)return;q&&q(B,ne,_e,ye),rt(ne)},xt=D.useRef(!1),Xt=(B,ne,_e="selectOption",ye="options")=>{let we=_e,Qe=ne;if(Q){Qe=Array.isArray(ke)?ke.slice():[];const wt=Q_(Qe,Ft=>H(ne,Ft));wt===-1?Qe.push(ne):ye!=="freeSolo"&&(Qe.splice(wt,1),we="removeOption")}$e(B,Qe),ut(B,Qe,we,{option:ne}),!g&&(!B||!B.ctrlKey&&!B.metaKey)&&He(B,we),(o===!0||o==="touch"&&xt.current||o==="mouse"&&!xt.current)&&je.current.blur()};function vn(B,ne){if(B===-1)return-1;let _e=B;for(;;){if(ne==="next"&&_e===ke.length||ne==="previous"&&_e===-1)return-1;const ye=xe.querySelector(`[data-tag-index="${_e}"]`);if(!ye||!ye.hasAttribute("tabindex")||ye.disabled||ye.getAttribute("aria-disabled")==="true")_e+=ne==="next"?1:-1;else return _e}}const mn=(B,ne)=>{if(!Q)return;tt===""&&He(B,"toggleInput");let _e=Re;Re===-1?tt===""&&ne==="previous"&&(_e=ke.length-1):(_e+=ne==="next"?1:-1,_e<0&&(_e=0),_e===ke.length&&(_e=-1)),_e=vn(_e,ne),Oe(_e),mt(_e)},On=B=>{pe.current=!0,ae(""),ee&&ee(B,"","clear"),ut(B,Q?[]:null,"clear")},un=B=>ne=>{if(B.onKeyDown&&B.onKeyDown(ne),!ne.defaultMuiPrevented&&(Re!==-1&&["ArrowLeft","ArrowRight"].indexOf(ne.key)===-1&&(Oe(-1),mt(-1)),ne.which!==229))switch(ne.key){case"Home":Ie&&P&&(ne.preventDefault(),qe({diff:"start",direction:"next",reason:"keyboard",event:ne}));break;case"End":Ie&&P&&(ne.preventDefault(),qe({diff:"end",direction:"previous",reason:"keyboard",event:ne}));break;case"PageUp":ne.preventDefault(),qe({diff:-nk,direction:"previous",reason:"keyboard",event:ne}),Fe(ne);break;case"PageDown":ne.preventDefault(),qe({diff:nk,direction:"next",reason:"keyboard",event:ne}),Fe(ne);break;case"ArrowDown":ne.preventDefault(),qe({diff:1,direction:"next",reason:"keyboard",event:ne}),Fe(ne);break;case"ArrowUp":ne.preventDefault(),qe({diff:-1,direction:"previous",reason:"keyboard",event:ne}),Fe(ne);break;case"ArrowLeft":mn(ne,"previous");break;case"ArrowRight":mn(ne,"next");break;case"Enter":if(ze.current!==-1&&Ie){const _e=ge[ze.current],ye=w?w(_e):!1;if(ne.preventDefault(),ye)return;Xt(ne,_e,"selectOption"),r&&je.current.setSelectionRange(je.current.value.length,je.current.value.length)}else S&&tt!==""&&at===!1&&(Q&&ne.preventDefault(),Xt(ne,tt,"createOption","freeSolo"));break;case"Escape":Ie?(ne.preventDefault(),ne.stopPropagation(),He(ne,"escape")):l&&(tt!==""||Q&&ke.length>0)&&(ne.preventDefault(),ne.stopPropagation(),On(ne));break;case"Backspace":if(Q&&!de&&tt===""&&ke.length>0){const _e=Re===-1?ke.length-1:Re,ye=ke.slice();ye.splice(_e,1),ut(ne,ye,"removeOption",{option:ke[_e]})}break;case"Delete":if(Q&&!de&&tt===""&&ke.length>0&&Re!==-1){const _e=Re,ye=ke.slice();ye.splice(_e,1),ut(ne,ye,"removeOption",{option:ke[_e]})}break}},Nn=B=>{be(!0),te&&!pe.current&&Fe(B)},In=B=>{if(e(it)){je.current.focus();return}be(!1),Se.current=!0,pe.current=!1,s&&ze.current!==-1&&Ie?Xt(B,ge[ze.current],"blur"):s&&S&&tt!==""?Xt(B,tt,"blur","freeSolo"):a&&$e(B,ke),He(B,"blur")},or=B=>{const ne=B.target.value;tt!==ne&&(ae(ne),pt(!1),ee&&ee(B,ne,"input")),ne===""?!p&&!Q&&ut(B,null,"clear"):Fe(B)},Kn=B=>{const ne=Number(B.currentTarget.getAttribute("data-option-index"));ze.current!==ne&&vt({event:B,index:ne,reason:"mouse"})},Fr=B=>{vt({event:B,index:Number(B.currentTarget.getAttribute("data-option-index")),reason:"touch"}),xt.current=!0},gr=B=>{const ne=Number(B.currentTarget.getAttribute("data-option-index"));Xt(B,ge[ne],"selectOption"),xt.current=!1},ui=B=>ne=>{const _e=ke.slice();_e.splice(B,1),ut(ne,_e,"removeOption",{option:ke[B]})},ss=B=>{Ze?He(B,"toggleInput"):Fe(B)},Rr=B=>{B.currentTarget.contains(B.target)&&B.target.getAttribute("id")!==V&&B.preventDefault()},ji=B=>{B.currentTarget.contains(B.target)&&(je.current.focus(),Ce&&Se.current&&je.current.selectionEnd-je.current.selectionStart===0&&je.current.select(),Se.current=!1)},Ei=B=>{!v&&(tt===""||!Ze)&&ss(B)};let di=S&&tt.length>0;di=di||(Q?ke.length>0:ke!==null);let Gi=ge;return R&&(Gi=ge.reduce((B,ne,_e)=>{const ye=R(ne);return B.length>0&&B[B.length-1].group===ye?B[B.length-1].options.push(ne):B.push({key:_e,index:_e,group:ye,options:[ne]}),B},[])),v&&G&&In(),{getRootProps:(B={})=>X({"aria-owns":St?`${V}-listbox`:null},B,{onKeyDown:un(B),onMouseDown:Rr,onClick:ji}),getInputLabelProps:()=>({id:`${V}-label`,htmlFor:V}),getInputProps:()=>({id:V,value:tt,onBlur:In,onFocus:Nn,onChange:or,onMouseDown:Ei,"aria-activedescendant":Ie?"":null,"aria-autocomplete":r?"both":"list","aria-controls":St?`${V}-listbox`:void 0,"aria-expanded":St,autoComplete:"off",ref:je,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:v}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:On}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:ss}),getTagProps:({index:B})=>X({key:B,"data-tag-index":B,tabIndex:-1},!de&&{onDelete:ui(B)}),getListboxProps:()=>({role:"listbox",id:`${V}-listbox`,"aria-labelledby":`${V}-label`,ref:fe,onMouseDown:B=>{B.preventDefault()}}),getOptionProps:({index:B,option:ne})=>{var _e;const ye=(Q?ke:[ke]).some(Qe=>Qe!=null&&H(ne,Qe)),we=w?w(ne):!1;return{key:(_e=T==null?void 0:T(ne))!=null?_e:me(ne),tabIndex:-1,role:"option",id:`${V}-option-${B}`,onMouseMove:Kn,onClick:gr,onTouchStart:Fr,"data-option-index":B,"aria-disabled":we,"aria-selected":ye}},id:V,inputValue:tt,value:ke,dirty:di,expanded:Ie&&xe,popupOpen:Ie,focused:G||Re!==-1,anchorEl:xe,setAnchorEl:et,focusedTag:Re,groupedOptions:Gi}}var _R={};Object.defineProperty(_R,"__esModule",{value:!0});var T7=_R.default=void 0,Qte=ene(D),Jte=X8;function A7(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(A7=function(r){return r?n:e})(t)}function ene(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var n=A7(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var o=i?Object.getOwnPropertyDescriptor(t,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=t[s]}return r.default=t,n&&n.set(t,r),r}function tne(t){return Object.keys(t).length===0}function nne(t=null){const e=Qte.useContext(Jte.ThemeContext);return!e||tne(e)?t:e}T7=_R.default=nne;const rne=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],ine=lt(Dte,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),sne=D.forwardRef(function(e,n){var r;const i=T7(),s=En({props:e,name:"MuiPopper"}),{anchorEl:o,component:a,components:l,componentsProps:c,container:f,disablePortal:p,keepMounted:g,modifiers:v,open:x,placement:_,popperOptions:b,popperRef:y,transition:S,slots:w,slotProps:T}=s,L=Rt(s,rne),R=(r=w==null?void 0:w.root)!=null?r:l==null?void 0:l.Root,P=X({anchorEl:o,container:f,disablePortal:p,keepMounted:g,modifiers:v,open:x,placement:_,popperOptions:b,popperRef:y,transition:S},L);return C.jsx(ine,X({as:a,direction:i==null?void 0:i.direction,slots:{root:R},slotProps:T??c},P,{ref:n}))}),Hw=sne;function one(t){return bn("MuiListSubheader",t)}pn("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const ane=["className","color","component","disableGutters","disableSticky","inset"],lne=t=>{const{classes:e,color:n,disableGutters:r,inset:i,disableSticky:s}=t,o={root:["root",n!=="default"&&`color${gt(n)}`,!r&&"gutters",i&&"inset",!s&&"sticky"]};return Sn(o,one,e)},cne=lt("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${gt(n.color)}`],!n.disableGutters&&e.gutters,n.inset&&e.inset,!n.disableSticky&&e.sticky]}})(({theme:t,ownerState:e})=>X({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},e.color==="primary"&&{color:(t.vars||t).palette.primary.main},e.color==="inherit"&&{color:"inherit"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.inset&&{paddingLeft:72},!e.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})),R7=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiListSubheader"}),{className:i,color:s="default",component:o="li",disableGutters:a=!1,disableSticky:l=!1,inset:c=!1}=r,f=Rt(r,ane),p=X({},r,{color:s,component:o,disableGutters:a,disableSticky:l,inset:c}),g=lne(p);return C.jsx(cne,X({as:o,className:At(g.root,i),ref:n,ownerState:p},f))});R7.muiSkipListHighlight=!0;const une=R7,dne=bt(C.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function fne(t){return bn("MuiChip",t)}const hne=pn("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),dr=hne,pne=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],mne=t=>{const{classes:e,disabled:n,size:r,color:i,iconColor:s,onDelete:o,clickable:a,variant:l}=t,c={root:["root",l,n&&"disabled",`size${gt(r)}`,`color${gt(i)}`,a&&"clickable",a&&`clickableColor${gt(i)}`,o&&"deletable",o&&`deletableColor${gt(i)}`,`${l}${gt(i)}`],label:["label",`label${gt(r)}`],avatar:["avatar",`avatar${gt(r)}`,`avatarColor${gt(i)}`],icon:["icon",`icon${gt(r)}`,`iconColor${gt(s)}`],deleteIcon:["deleteIcon",`deleteIcon${gt(r)}`,`deleteIconColor${gt(i)}`,`deleteIcon${gt(l)}Color${gt(i)}`]};return Sn(c,fne,e)},gne=lt("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{color:r,iconColor:i,clickable:s,onDelete:o,size:a,variant:l}=n;return[{[`& .${dr.avatar}`]:e.avatar},{[`& .${dr.avatar}`]:e[`avatar${gt(a)}`]},{[`& .${dr.avatar}`]:e[`avatarColor${gt(r)}`]},{[`& .${dr.icon}`]:e.icon},{[`& .${dr.icon}`]:e[`icon${gt(a)}`]},{[`& .${dr.icon}`]:e[`iconColor${gt(i)}`]},{[`& .${dr.deleteIcon}`]:e.deleteIcon},{[`& .${dr.deleteIcon}`]:e[`deleteIcon${gt(a)}`]},{[`& .${dr.deleteIcon}`]:e[`deleteIconColor${gt(r)}`]},{[`& .${dr.deleteIcon}`]:e[`deleteIcon${gt(l)}Color${gt(r)}`]},e.root,e[`size${gt(a)}`],e[`color${gt(r)}`],s&&e.clickable,s&&r!=="default"&&e[`clickableColor${gt(r)})`],o&&e.deletable,o&&r!=="default"&&e[`deletableColor${gt(r)}`],e[l],e[`${l}${gt(r)}`]]}})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?t.palette.grey[700]:t.palette.grey[300];return X({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${dr.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${dr.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:n,fontSize:t.typography.pxToRem(12)},[`& .${dr.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${dr.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${dr.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${dr.icon}`]:X({marginLeft:5,marginRight:-6},e.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},e.iconColor===e.color&&X({color:t.vars?t.vars.palette.Chip.defaultIconColor:n},e.color!=="default"&&{color:"inherit"})),[`& .${dr.deleteIcon}`]:X({WebkitTapHighlightColor:"transparent",color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.26)`:qn(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:qn(t.palette.text.primary,.4)}},e.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},e.color!=="default"&&{color:t.vars?`rgba(${t.vars.palette[e.color].contrastTextChannel} / 0.7)`:qn(t.palette[e.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[e.color].contrastText}})},e.size==="small"&&{height:24},e.color!=="default"&&{backgroundColor:(t.vars||t).palette[e.color].main,color:(t.vars||t).palette[e.color].contrastText},e.onDelete&&{[`&.${dr.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:qn(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},e.onDelete&&e.color!=="default"&&{[`&.${dr.focusVisible}`]:{backgroundColor:(t.vars||t).palette[e.color].dark}})},({theme:t,ownerState:e})=>X({},e.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:qn(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},[`&.${dr.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:qn(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},e.clickable&&e.color!=="default"&&{[`&:hover, &.${dr.focusVisible}`]:{backgroundColor:(t.vars||t).palette[e.color].dark}}),({theme:t,ownerState:e})=>X({},e.variant==="outlined"&&{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${dr.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${dr.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${dr.avatar}`]:{marginLeft:4},[`& .${dr.avatarSmall}`]:{marginLeft:2},[`& .${dr.icon}`]:{marginLeft:4},[`& .${dr.iconSmall}`]:{marginLeft:2},[`& .${dr.deleteIcon}`]:{marginRight:5},[`& .${dr.deleteIconSmall}`]:{marginRight:3}},e.variant==="outlined"&&e.color!=="default"&&{color:(t.vars||t).palette[e.color].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.7)`:qn(t.palette[e.color].main,.7)}`,[`&.${dr.clickable}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:qn(t.palette[e.color].main,t.palette.action.hoverOpacity)},[`&.${dr.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.focusOpacity})`:qn(t.palette[e.color].main,t.palette.action.focusOpacity)},[`& .${dr.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.7)`:qn(t.palette[e.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[e.color].main}}})),vne=lt("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:n}=t,{size:r}=n;return[e.label,e[`label${gt(r)}`]]}})(({ownerState:t})=>X({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},t.variant==="outlined"&&{paddingLeft:11,paddingRight:11},t.size==="small"&&{paddingLeft:8,paddingRight:8},t.size==="small"&&t.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function rk(t){return t.key==="Backspace"||t.key==="Delete"}const yne=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiChip"}),{avatar:i,className:s,clickable:o,color:a="default",component:l,deleteIcon:c,disabled:f=!1,icon:p,label:g,onClick:v,onDelete:x,onKeyDown:_,onKeyUp:b,size:y="medium",variant:S="filled",tabIndex:w,skipFocusWhenDisabled:T=!1}=r,L=Rt(r,pne),R=D.useRef(null),P=Kr(R,n),F=te=>{te.stopPropagation(),x&&x(te)},O=te=>{te.currentTarget===te.target&&rk(te)&&te.preventDefault(),_&&_(te)},I=te=>{te.currentTarget===te.target&&(x&&rk(te)?x(te):te.key==="Escape"&&R.current&&R.current.blur()),b&&b(te)},H=o!==!1&&v?!0:o,Q=H||x?Nu:l||"div",q=X({},r,{component:Q,disabled:f,size:y,color:a,iconColor:D.isValidElement(p)&&p.props.color||a,onDelete:!!x,clickable:H,variant:S}),le=mne(q),ie=Q===Nu?X({component:l||"div",focusVisibleClassName:le.focusVisible},x&&{disableRipple:!0}):{};let ee=null;x&&(ee=c&&D.isValidElement(c)?D.cloneElement(c,{className:At(c.props.className,le.deleteIcon),onClick:F}):C.jsx(dne,{className:At(le.deleteIcon),onClick:F}));let ue=null;i&&D.isValidElement(i)&&(ue=D.cloneElement(i,{className:At(le.avatar,i.props.className)}));let z=null;return p&&D.isValidElement(p)&&(z=D.cloneElement(p,{className:At(le.icon,p.props.className)})),C.jsxs(gne,X({as:Q,className:At(le.root,s),disabled:H&&f?!0:void 0,onClick:v,onKeyDown:O,onKeyUp:I,ref:P,tabIndex:T&&f?-1:w,ownerState:q},ie,L,{children:[ue||z,C.jsx(vne,{className:At(le.label),ownerState:q,children:g}),ee]}))}),xne=yne;function vg({props:t,states:e,muiFormControl:n}){return e.reduce((r,i)=>(r[i]=t[i],n&&typeof t[i]>"u"&&(r[i]=n[i]),r),{})}const _ne=D.createContext(void 0),bR=_ne;function _p(){return D.useContext(bR)}function ik(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function m2(t,e=!1){return t&&(ik(t.value)&&t.value!==""||e&&ik(t.defaultValue)&&t.defaultValue!=="")}function bne(t){return t.startAdornment}function Sne(t){return bn("MuiInputBase",t)}const wne=pn("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),ma=wne,Mne=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],$w=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${gt(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},Vw=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},Ene=t=>{const{classes:e,color:n,disabled:r,error:i,endAdornment:s,focused:o,formControl:a,fullWidth:l,hiddenLabel:c,multiline:f,readOnly:p,size:g,startAdornment:v,type:x}=t,_={root:["root",`color${gt(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",o&&"focused",a&&"formControl",g&&g!=="medium"&&`size${gt(g)}`,f&&"multiline",v&&"adornedStart",s&&"adornedEnd",c&&"hiddenLabel",p&&"readOnly"],input:["input",r&&"disabled",x==="search"&&"inputTypeSearch",f&&"inputMultiline",g==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",v&&"inputAdornedStart",s&&"inputAdornedEnd",p&&"readOnly"]};return Sn(_,Sne,e)},Ww=lt("div",{name:"MuiInputBase",slot:"Root",overridesResolver:$w})(({theme:t,ownerState:e})=>X({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${ma.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&X({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),jw=lt("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Vw})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=X({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},s=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return X({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${ma.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus:-ms-input-placeholder":s,"&:focus::-ms-input-placeholder":s},[`&.${ma.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}),Cne=C.jsx(G8,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Tne=D.forwardRef(function(e,n){var r;const i=En({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:o,autoFocus:a,className:l,components:c={},componentsProps:f={},defaultValue:p,disabled:g,disableInjectingGlobalStyles:v,endAdornment:x,fullWidth:_=!1,id:b,inputComponent:y="input",inputProps:S={},inputRef:w,maxRows:T,minRows:L,multiline:R=!1,name:P,onBlur:F,onChange:O,onClick:I,onFocus:H,onKeyDown:Q,onKeyUp:q,placeholder:le,readOnly:ie,renderSuffix:ee,rows:ue,slotProps:z={},slots:te={},startAdornment:oe,type:de="text",value:Ce}=i,Le=Rt(i,Mne),V=S.value!=null?S.value:Ce,{current:me}=D.useRef(V!=null),pe=D.useRef(),Se=D.useCallback(Ie=>{},[]),je=Kr(pe,w,S.ref,Se),[it,xe]=D.useState(!1),et=_p(),Re=vg({props:i,muiFormControl:et,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Re.focused=et?et.focused:it,D.useEffect(()=>{!et&&g&&it&&(xe(!1),F&&F())},[et,g,it,F]);const Oe=et&&et.onFilled,Te=et&&et.onEmpty,ze=D.useCallback(Ie=>{m2(Ie)?Oe&&Oe():Te&&Te()},[Oe,Te]);Xo(()=>{me&&ze({value:V})},[V,ze,me]);const ke=Ie=>{if(Re.disabled){Ie.stopPropagation();return}H&&H(Ie),S.onFocus&&S.onFocus(Ie),et&&et.onFocus?et.onFocus(Ie):xe(!0)},rt=Ie=>{F&&F(Ie),S.onBlur&&S.onBlur(Ie),et&&et.onBlur?et.onBlur(Ie):xe(!1)},tt=(Ie,...ge)=>{if(!me){const Xe=Ie.target||pe.current;if(Xe==null)throw new Error(op(1));ze({value:Xe.value})}S.onChange&&S.onChange(Ie,...ge),O&&O(Ie,...ge)};D.useEffect(()=>{ze(pe.current)},[]);const ae=Ie=>{pe.current&&Ie.currentTarget===Ie.target&&pe.current.focus(),I&&I(Ie)};let G=y,be=S;R&&G==="input"&&(ue?be=X({type:void 0,minRows:ue,maxRows:ue},be):be=X({type:void 0,maxRows:T,minRows:L},be),G=Xte);const $e=Ie=>{ze(Ie.animationName==="mui-auto-fill-cancel"?pe.current:{value:"x"})};D.useEffect(()=>{et&&et.setAdornedStart(!!oe)},[et,oe]);const Ze=X({},i,{color:Re.color||"primary",disabled:Re.disabled,endAdornment:x,error:Re.error,focused:Re.focused,formControl:et,fullWidth:_,hiddenLabel:Re.hiddenLabel,multiline:R,size:Re.size,startAdornment:oe,type:de}),We=Ene(Ze),Mt=te.root||c.Root||Ww,pt=z.root||f.root||{},at=te.input||c.Input||jw;return be=X({},be,(r=z.input)!=null?r:f.input),C.jsxs(D.Fragment,{children:[!v&&Cne,C.jsxs(Mt,X({},pt,!Rc(Mt)&&{ownerState:X({},Ze,pt.ownerState)},{ref:n,onClick:ae},Le,{className:At(We.root,pt.className,l,ie&&"MuiInputBase-readOnly"),children:[oe,C.jsx(bR.Provider,{value:null,children:C.jsx(at,X({ownerState:Ze,"aria-invalid":Re.error,"aria-describedby":s,autoComplete:o,autoFocus:a,defaultValue:p,disabled:Re.disabled,id:b,onAnimationStart:$e,name:P,placeholder:le,readOnly:ie,required:Re.required,rows:ue,value:V,onKeyDown:Q,onKeyUp:q,type:de},be,!Rc(at)&&{as:G,ownerState:X({},Ze,be.ownerState)},{ref:je,className:At(We.input,be.className,ie&&"MuiInputBase-readOnly"),onBlur:rt,onChange:tt,onFocus:ke}))}),x,ee?ee(X({},Re,{startAdornment:oe})):null]}))]})}),SR=Tne;function Ane(t){return bn("MuiInput",t)}const Rne=X({},ma,pn("MuiInput",["root","underline","input"])),Fd=Rne;function Pne(t){return bn("MuiOutlinedInput",t)}const Ine=X({},ma,pn("MuiOutlinedInput",["root","notchedOutline","input"])),pc=Ine;function Lne(t){return bn("MuiFilledInput",t)}const kne=X({},ma,pn("MuiFilledInput",["root","underline","input"])),ga=kne,P7=bt(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function One(t){return bn("MuiAutocomplete",t)}const Xn=pn("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var sk,ok;const Nne=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],Dne=["ref"],Fne=cR(),Une=t=>{const{classes:e,disablePortal:n,expanded:r,focused:i,fullWidth:s,hasClearIcon:o,hasPopupIcon:a,inputFocused:l,popupOpen:c,size:f}=t,p={root:["root",r&&"expanded",i&&"focused",s&&"fullWidth",o&&"hasClearIcon",a&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${gt(f)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Sn(p,One,e)},zne=lt("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{fullWidth:r,hasClearIcon:i,hasPopupIcon:s,inputFocused:o,size:a}=n;return[{[`& .${Xn.tag}`]:e.tag},{[`& .${Xn.tag}`]:e[`tagSize${gt(a)}`]},{[`& .${Xn.inputRoot}`]:e.inputRoot},{[`& .${Xn.input}`]:e.input},{[`& .${Xn.input}`]:o&&e.inputFocused},e.root,r&&e.fullWidth,s&&e.hasPopupIcon,i&&e.hasClearIcon]}})({[`&.${Xn.focused} .${Xn.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Xn.clearIndicator}`]:{visibility:"visible"}},[`& .${Xn.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Xn.inputRoot}`]:{flexWrap:"wrap",[`.${Xn.hasPopupIcon}&, .${Xn.hasClearIcon}&`]:{paddingRight:30},[`.${Xn.hasPopupIcon}.${Xn.hasClearIcon}&`]:{paddingRight:56},[`& .${Xn.input}`]:{width:0,minWidth:30}},[`& .${Fd.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Fd.root}.${ma.sizeSmall}`]:{[`& .${Fd.input}`]:{padding:"2px 4px 3px 0"}},[`& .${pc.root}`]:{padding:9,[`.${Xn.hasPopupIcon}&, .${Xn.hasClearIcon}&`]:{paddingRight:39},[`.${Xn.hasPopupIcon}.${Xn.hasClearIcon}&`]:{paddingRight:65},[`& .${Xn.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Xn.endAdornment}`]:{right:9}},[`& .${pc.root}.${ma.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Xn.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${ga.root}`]:{paddingTop:19,paddingLeft:8,[`.${Xn.hasPopupIcon}&, .${Xn.hasClearIcon}&`]:{paddingRight:39},[`.${Xn.hasPopupIcon}.${Xn.hasClearIcon}&`]:{paddingRight:65},[`& .${ga.input}`]:{padding:"7px 4px"},[`& .${Xn.endAdornment}`]:{right:9}},[`& .${ga.root}.${ma.sizeSmall}`]:{paddingBottom:1,[`& .${ga.input}`]:{padding:"2.5px 4px"}},[`& .${ma.hiddenLabel}`]:{paddingTop:8},[`& .${ga.root}.${ma.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Xn.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${ga.root}.${ma.hiddenLabel}.${ma.sizeSmall}`]:{[`& .${Xn.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Xn.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Xn.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Xn.input}`]:{opacity:1}}}]}),Bne=lt("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(t,e)=>e.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Hne=lt(Vu,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(t,e)=>e.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),$ne=lt(Vu,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:t},e)=>X({},e.popupIndicator,t.popupOpen&&e.popupIndicatorOpen)})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Vne=lt(Hw,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Xn.option}`]:e.option},e.popper,n.disablePortal&&e.popperDisablePortal]}})(({theme:t})=>({zIndex:(t.vars||t).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]})),Wne=lt(nx,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(t,e)=>e.paper})(({theme:t})=>X({},t.typography.body1,{overflow:"auto"})),jne=lt("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(t,e)=>e.loading})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),Gne=lt("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(t,e)=>e.noOptions})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),Xne=lt("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(t,e)=>e.listbox})(({theme:t})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Xn.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Xn.focused}`]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Xn.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:qn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Xn.focused}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:qn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${Xn.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:qn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}})),qne=lt(une,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(t,e)=>e.groupLabel})(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,top:-8})),Zne=lt("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(t,e)=>e.groupUl})({padding:0,[`& .${Xn.option}`]:{paddingLeft:24}}),Yne=D.forwardRef(function(e,n){var r,i,s,o;const a=Fne({props:e,name:"MuiAutocomplete"}),{autoComplete:l=!1,autoHighlight:c=!1,autoSelect:f=!1,blurOnSelect:p=!1,ChipProps:g,className:v,clearIcon:x=sk||(sk=C.jsx(qJ,{fontSize:"small"})),clearOnBlur:_=!a.freeSolo,clearOnEscape:b=!1,clearText:y="Clear",closeText:S="Close",componentsProps:w={},defaultValue:T=a.multiple?[]:null,disableClearable:L=!1,disableCloseOnSelect:R=!1,disabled:P=!1,disabledItemsFocusable:F=!1,disableListWrap:O=!1,disablePortal:I=!1,filterSelectedOptions:H=!1,forcePopupIcon:Q="auto",freeSolo:q=!1,fullWidth:le=!1,getLimitTagsText:ie=ye=>`+${ye}`,getOptionLabel:ee,groupBy:ue,handleHomeEndKeys:z=!a.freeSolo,includeInputInList:te=!1,limitTags:oe=-1,ListboxComponent:de="ul",ListboxProps:Ce,loading:Le=!1,loadingText:V="Loading…",multiple:me=!1,noOptionsText:pe="No options",openOnFocus:Se=!1,openText:je="Open",PaperComponent:it=nx,PopperComponent:xe=Hw,popupIcon:et=ok||(ok=C.jsx(P7,{})),readOnly:Re=!1,renderGroup:Oe,renderInput:Te,renderOption:ze,renderTags:ke,selectOnFocus:rt=!a.freeSolo,size:tt="medium",slotProps:ae={}}=a,G=Rt(a,Nne),{getRootProps:be,getInputProps:$e,getInputLabelProps:Ze,getPopupIndicatorProps:We,getClearProps:Mt,getTagProps:pt,getListboxProps:at,getOptionProps:Ie,value:ge,dirty:Xe,expanded:St,id:mt,popupOpen:Be,focused:vt,focusedTag:qe,anchorEl:ce,setAnchorEl:Ne,inputValue:fe,groupedOptions:Fe}=Kte(X({},a,{componentName:"Autocomplete"})),He=!L&&!P&&Xe&&!Re,ut=(!q||Q===!0)&&Q!==!1,{onMouseDown:xt}=$e(),{ref:Xt}=Ce??{},vn=at(),{ref:mn}=vn,On=Rt(vn,Dne),un=Kr(mn,Xt),In=ee||(ye=>{var we;return(we=ye.label)!=null?we:ye}),or=X({},a,{disablePortal:I,expanded:St,focused:vt,fullWidth:le,getOptionLabel:In,hasClearIcon:He,hasPopupIcon:ut,inputFocused:qe===-1,popupOpen:Be,size:tt}),Kn=Une(or);let Fr;if(me&&ge.length>0){const ye=we=>X({className:Kn.tag,disabled:P},pt(we));ke?Fr=ke(ge,ye,or):Fr=ge.map((we,Qe)=>C.jsx(xne,X({label:In(we),size:tt},ye({index:Qe}),g)))}if(oe>-1&&Array.isArray(Fr)){const ye=Fr.length-oe;!vt&&ye>0&&(Fr=Fr.splice(0,oe),Fr.push(C.jsx("span",{className:Kn.tag,children:ie(ye)},Fr.length)))}const ui=Oe||(ye=>C.jsxs("li",{children:[C.jsx(qne,{className:Kn.groupLabel,ownerState:or,component:"div",children:ye.group}),C.jsx(Zne,{className:Kn.groupUl,ownerState:or,children:ye.children})]},ye.key)),Rr=ze||((ye,we)=>D.createElement("li",X({},ye,{key:ye.key}),In(we))),ji=(ye,we)=>{const Qe=Ie({option:ye,index:we});return Rr(X({},Qe,{className:Kn.option}),ye,{selected:Qe["aria-selected"],index:we,inputValue:fe},or)},Ei=(r=ae.clearIndicator)!=null?r:w.clearIndicator,di=(i=ae.paper)!=null?i:w.paper,Gi=(s=ae.popper)!=null?s:w.popper,B=(o=ae.popupIndicator)!=null?o:w.popupIndicator,ne=ye=>C.jsx(Vne,X({as:xe,disablePortal:I,style:{width:ce?ce.clientWidth:null},ownerState:or,role:"presentation",anchorEl:ce,open:Be},Gi,{className:At(Kn.popper,Gi==null?void 0:Gi.className),children:C.jsx(Wne,X({ownerState:or,as:it},di,{className:At(Kn.paper,di==null?void 0:di.className),children:ye}))}));let _e=null;return Fe.length>0?_e=ne(C.jsx(Xne,X({as:de,className:Kn.listbox,ownerState:or},On,Ce,{ref:un,children:Fe.map((ye,we)=>ue?ui({key:ye.key,group:ye.group,children:ye.options.map((Qe,wt)=>ji(Qe,ye.index+wt))}):ji(ye,we))}))):Le&&Fe.length===0?_e=ne(C.jsx(jne,{className:Kn.loading,ownerState:or,children:V})):Fe.length===0&&!q&&!Le&&(_e=ne(C.jsx(Gne,{className:Kn.noOptions,ownerState:or,role:"presentation",onMouseDown:ye=>{ye.preventDefault()},children:pe}))),C.jsxs(D.Fragment,{children:[C.jsx(zne,X({ref:n,className:At(Kn.root,v),ownerState:or},be(G),{children:Te({id:mt,disabled:P,fullWidth:!0,size:tt==="small"?"small":void 0,InputLabelProps:Ze(),InputProps:X({ref:Ne,className:Kn.inputRoot,startAdornment:Fr,onClick:ye=>{ye.target===ye.currentTarget&&xt(ye)}},(He||ut)&&{endAdornment:C.jsxs(Bne,{className:Kn.endAdornment,ownerState:or,children:[He?C.jsx(Hne,X({},Mt(),{"aria-label":y,title:y,ownerState:or},Ei,{className:At(Kn.clearIndicator,Ei==null?void 0:Ei.className),children:x})):null,ut?C.jsx($ne,X({},We(),{disabled:P,"aria-label":Be?S:je,title:Be?S:je,ownerState:or},B,{className:At(Kn.popupIndicator,B==null?void 0:B.className),children:et})):null]})}),inputProps:X({className:Kn.input,disabled:P,readOnly:Re},$e())})})),ce?_e:null]})}),Kne=Yne,Qne=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Jne={entering:{opacity:1},entered:{opacity:1}},ere=D.forwardRef(function(e,n){const r=Bu(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:o=!0,children:a,easing:l,in:c,onEnter:f,onEntered:p,onEntering:g,onExit:v,onExited:x,onExiting:_,style:b,timeout:y=i,TransitionComponent:S=uR}=e,w=Rt(e,Qne),T=D.useRef(null),L=Kr(T,a.ref,n),R=le=>ie=>{if(le){const ee=T.current;ie===void 0?le(ee):le(ee,ie)}},P=R(g),F=R((le,ie)=>{u7(le);const ee=j0({style:b,timeout:y,easing:l},{mode:"enter"});le.style.webkitTransition=r.transitions.create("opacity",ee),le.style.transition=r.transitions.create("opacity",ee),f&&f(le,ie)}),O=R(p),I=R(_),H=R(le=>{const ie=j0({style:b,timeout:y,easing:l},{mode:"exit"});le.style.webkitTransition=r.transitions.create("opacity",ie),le.style.transition=r.transitions.create("opacity",ie),v&&v(le)}),Q=R(x),q=le=>{s&&s(T.current,le)};return C.jsx(S,X({appear:o,in:c,nodeRef:T,onEnter:F,onEntered:O,onEntering:P,onExit:H,onExited:Q,onExiting:I,addEndListener:q,timeout:y},w,{children:(le,ie)=>D.cloneElement(a,X({style:X({opacity:0,visibility:le==="exited"&&!c?"hidden":void 0},Jne[le],b,a.props.style),ref:L},ie))}))}),I7=ere;function tre(t){return bn("MuiBackdrop",t)}pn("MuiBackdrop",["root","invisible"]);const nre=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],rre=t=>{const{classes:e,invisible:n}=t;return Sn({root:["root",n&&"invisible"]},tre,e)},ire=lt("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>X({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),sre=D.forwardRef(function(e,n){var r,i,s;const o=En({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:f={},componentsProps:p={},invisible:g=!1,open:v,slotProps:x={},slots:_={},TransitionComponent:b=I7,transitionDuration:y}=o,S=Rt(o,nre),w=X({},o,{component:c,invisible:g}),T=rre(w),L=(r=x.root)!=null?r:p.root;return C.jsx(b,X({in:v,timeout:y},S,{children:C.jsx(ire,X({"aria-hidden":!0},L,{as:(i=(s=_.root)!=null?s:f.Root)!=null?i:c,className:At(T.root,l,L==null?void 0:L.className),ownerState:X({},w,L==null?void 0:L.ownerState),classes:T,ref:n,children:a}))}))}),Uc=sre,ore=pn("MuiBox",["root"]),are=ore,lre=eR(),cre=$Y({themeId:lp,defaultTheme:lre,defaultClassName:are.root,generateClassName:Y3.generate}),_o=cre;function ure(t){return bn("MuiButton",t)}const dre=pn("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),J_=dre,fre=D.createContext({}),hre=fre,pre=D.createContext(void 0),mre=pre,gre=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],vre=t=>{const{color:e,disableElevation:n,fullWidth:r,size:i,variant:s,classes:o}=t,a={root:["root",s,`${s}${gt(e)}`,`size${gt(i)}`,`${s}Size${gt(i)}`,`color${gt(e)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${gt(i)}`],endIcon:["icon","endIcon",`iconSize${gt(i)}`]},l=Sn(a,ure,o);return X({},o,l)},L7=t=>X({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),yre=lt(Nu,{shouldForwardProp:t=>La(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${gt(n.color)}`],e[`size${gt(n.size)}`],e[`${n.variant}Size${gt(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var n,r;const i=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],s=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return X({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":X({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:qn(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:qn(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:qn(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:s,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":X({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${J_.focusVisible}`]:X({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${J_.disabled}`]:X({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${qn(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(n=(r=t.palette).getContrastText)==null?void 0:n.call(r,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${J_.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${J_.disabled}`]:{boxShadow:"none"}}),xre=lt("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,e[`iconSize${gt(n.size)}`]]}})(({ownerState:t})=>X({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},L7(t))),_re=lt("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,e[`iconSize${gt(n.size)}`]]}})(({ownerState:t})=>X({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},L7(t))),bre=D.forwardRef(function(e,n){const r=D.useContext(hre),i=D.useContext(mre),s=D3(r,e),o=En({props:s,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:f,disabled:p=!1,disableElevation:g=!1,disableFocusRipple:v=!1,endIcon:x,focusVisibleClassName:_,fullWidth:b=!1,size:y="medium",startIcon:S,type:w,variant:T="text"}=o,L=Rt(o,gre),R=X({},o,{color:l,component:c,disabled:p,disableElevation:g,disableFocusRipple:v,fullWidth:b,size:y,type:w,variant:T}),P=vre(R),F=S&&C.jsx(xre,{className:P.startIcon,ownerState:R,children:S}),O=x&&C.jsx(_re,{className:P.endIcon,ownerState:R,children:x}),I=i||"";return C.jsxs(yre,X({ownerState:R,className:At(r.className,P.root,f,I),component:c,disabled:p,focusRipple:!v,focusVisibleClassName:At(P.focusVisible,_),ref:n,type:w},L,{classes:P,children:[F,a,O]}))}),dp=bre;function Sre(t){return bn("PrivateSwitchBase",t)}pn("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const wre=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Mre=t=>{const{classes:e,checked:n,disabled:r,edge:i}=t,s={root:["root",n&&"checked",r&&"disabled",i&&`edge${gt(i)}`],input:["input"]};return Sn(s,Sre,e)},Ere=lt(Nu)(({ownerState:t})=>X({padding:9,borderRadius:"50%"},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12})),Cre=lt("input",{shouldForwardProp:La})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Tre=D.forwardRef(function(e,n){const{autoFocus:r,checked:i,checkedIcon:s,className:o,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:f=!1,icon:p,id:g,inputProps:v,inputRef:x,name:_,onBlur:b,onChange:y,onFocus:S,readOnly:w,required:T=!1,tabIndex:L,type:R,value:P}=e,F=Rt(e,wre),[O,I]=Cu({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),H=_p(),Q=te=>{S&&S(te),H&&H.onFocus&&H.onFocus(te)},q=te=>{b&&b(te),H&&H.onBlur&&H.onBlur(te)},le=te=>{if(te.nativeEvent.defaultPrevented)return;const oe=te.target.checked;I(oe),y&&y(te,oe)};let ie=l;H&&typeof ie>"u"&&(ie=H.disabled);const ee=R==="checkbox"||R==="radio",ue=X({},e,{checked:O,disabled:ie,disableFocusRipple:c,edge:f}),z=Mre(ue);return C.jsxs(Ere,X({component:"span",className:At(z.root,o),centerRipple:!0,focusRipple:!c,disabled:ie,tabIndex:null,role:void 0,onFocus:Q,onBlur:q,ownerState:ue,ref:n},F,{children:[C.jsx(Cre,X({autoFocus:r,checked:i,defaultChecked:a,className:z.input,disabled:ie,id:ee?g:void 0,name:_,onChange:le,readOnly:w,ref:x,required:T,ownerState:ue,tabIndex:L,type:R},R==="checkbox"&&P===void 0?{}:{value:P},v)),O?s:p]}))}),Are=Tre;function Rre(t){return bn("MuiCircularProgress",t)}pn("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Pre=["className","color","disableShrink","size","style","thickness","value","variant"];let Gw=t=>t,ak,lk,ck,uk;const Sd=44,Ire=dg(ak||(ak=Gw` + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +`)),Lre=dg(lk||(lk=Gw` + 0% { + stroke-dasharray: 1px, 200px; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -15px; + } + + 100% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -125px; + } +`)),kre=t=>{const{classes:e,variant:n,color:r,disableShrink:i}=t,s={root:["root",n,`color${gt(r)}`],svg:["svg"],circle:["circle",`circle${gt(n)}`,i&&"circleDisableShrink"]};return Sn(s,Rre,e)},Ore=lt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${gt(n.color)}`]]}})(({ownerState:t,theme:e})=>X({display:"inline-block"},t.variant==="determinate"&&{transition:e.transitions.create("transform")},t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main}),({ownerState:t})=>t.variant==="indeterminate"&&hw(ck||(ck=Gw` + animation: ${0} 1.4s linear infinite; + `),Ire)),Nre=lt("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),Dre=lt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${gt(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(({ownerState:t,theme:e})=>X({stroke:"currentColor"},t.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},t.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink&&hw(uk||(uk=Gw` + animation: ${0} 1.4s ease-in-out infinite; + `),Lre)),Fre=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiCircularProgress"}),{className:i,color:s="primary",disableShrink:o=!1,size:a=40,style:l,thickness:c=3.6,value:f=0,variant:p="indeterminate"}=r,g=Rt(r,Pre),v=X({},r,{color:s,disableShrink:o,size:a,thickness:c,value:f,variant:p}),x=kre(v),_={},b={},y={};if(p==="determinate"){const S=2*Math.PI*((Sd-c)/2);_.strokeDasharray=S.toFixed(3),y["aria-valuenow"]=Math.round(f),_.strokeDashoffset=`${((100-f)/100*S).toFixed(3)}px`,b.transform="rotate(-90deg)"}return C.jsx(Ore,X({className:At(x.root,i),style:X({width:a,height:a},b,l),ownerState:v,ref:n,role:"progressbar"},y,g,{children:C.jsx(Nre,{className:x.svg,ownerState:v,viewBox:`${Sd/2} ${Sd/2} ${Sd} ${Sd}`,children:C.jsx(Dre,{className:x.circle,style:_,ownerState:v,cx:Sd,cy:Sd,r:(Sd-c)/2,fill:"none",strokeWidth:c})})}))}),ka=Fre;function Ure(t){return bn("MuiModal",t)}pn("MuiModal",["root","hidden","backdrop"]);const zre=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Bre=t=>{const{open:e,exited:n,classes:r}=t;return Sn({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},Ure,r)},Hre=lt("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>X({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),$re=lt(Uc,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),Vre=D.forwardRef(function(e,n){var r,i,s,o,a,l;const c=En({name:"MuiModal",props:e}),{BackdropComponent:f=$re,BackdropProps:p,className:g,closeAfterTransition:v=!1,children:x,container:_,component:b,components:y={},componentsProps:S={},disableAutoFocus:w=!1,disableEnforceFocus:T=!1,disableEscapeKeyDown:L=!1,disablePortal:R=!1,disableRestoreFocus:P=!1,disableScrollLock:F=!1,hideBackdrop:O=!1,keepMounted:I=!1,onBackdropClick:H,open:Q,slotProps:q,slots:le}=c,ie=Rt(c,zre),ee=X({},c,{closeAfterTransition:v,disableAutoFocus:w,disableEnforceFocus:T,disableEscapeKeyDown:L,disablePortal:R,disableRestoreFocus:P,disableScrollLock:F,hideBackdrop:O,keepMounted:I}),{getRootProps:ue,getBackdropProps:z,getTransitionProps:te,portalRef:oe,isTopModal:de,exited:Ce,hasTransition:Le}=bee(X({},ee,{rootRef:n})),V=X({},ee,{exited:Ce}),me=Bre(V),pe={};if(x.props.tabIndex===void 0&&(pe.tabIndex="-1"),Le){const{onEnter:Oe,onExited:Te}=te();pe.onEnter=Oe,pe.onExited=Te}const Se=(r=(i=le==null?void 0:le.root)!=null?i:y.Root)!=null?r:Hre,je=(s=(o=le==null?void 0:le.backdrop)!=null?o:y.Backdrop)!=null?s:f,it=(a=q==null?void 0:q.root)!=null?a:S.root,xe=(l=q==null?void 0:q.backdrop)!=null?l:S.backdrop,et=Qi({elementType:Se,externalSlotProps:it,externalForwardedProps:ie,getSlotProps:ue,additionalProps:{ref:n,as:b},ownerState:V,className:At(g,it==null?void 0:it.className,me==null?void 0:me.root,!V.open&&V.exited&&(me==null?void 0:me.hidden))}),Re=Qi({elementType:je,externalSlotProps:xe,additionalProps:p,getSlotProps:Oe=>z(X({},Oe,{onClick:Te=>{H&&H(Te),Oe!=null&&Oe.onClick&&Oe.onClick(Te)}})),className:At(xe==null?void 0:xe.className,p==null?void 0:p.className,me==null?void 0:me.backdrop),ownerState:V});return!I&&!Q&&(!Le||Ce)?null:C.jsx(m7,{ref:oe,container:_,disablePortal:R,children:C.jsxs(Se,X({},et,{children:[!O&&f?C.jsx(je,X({},Re)):null,C.jsx(dee,{disableEnforceFocus:T,disableAutoFocus:w,disableRestoreFocus:P,isEnabled:de,open:Q,children:D.cloneElement(x,pe)})]}))})}),k7=Vre;function Wre(t){return bn("MuiDialog",t)}const jre=pn("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),GE=jre,Gre=D.createContext({}),O7=Gre,Xre=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],qre=lt(Uc,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),Zre=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:i,fullScreen:s}=t,o={root:["root"],container:["container",`scroll${gt(n)}`],paper:["paper",`paperScroll${gt(n)}`,`paperWidth${gt(String(r))}`,i&&"paperFullWidth",s&&"paperFullScreen"]};return Sn(o,Wre,e)},Yre=lt(k7,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),Kre=lt("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${gt(n.scroll)}`]]}})(({ownerState:t})=>X({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),Qre=lt(nx,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${gt(n.scroll)}`],e[`paperWidth${gt(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(({theme:t,ownerState:e})=>X({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${GE.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`,[`&.${GE.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${GE.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),Jre=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiDialog"}),i=Bu(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":a,BackdropComponent:l,BackdropProps:c,children:f,className:p,disableEscapeKeyDown:g=!1,fullScreen:v=!1,fullWidth:x=!1,maxWidth:_="sm",onBackdropClick:b,onClose:y,open:S,PaperComponent:w=nx,PaperProps:T={},scroll:L="paper",TransitionComponent:R=I7,transitionDuration:P=s,TransitionProps:F}=r,O=Rt(r,Xre),I=X({},r,{disableEscapeKeyDown:g,fullScreen:v,fullWidth:x,maxWidth:_,scroll:L}),H=Zre(I),Q=D.useRef(),q=ue=>{Q.current=ue.target===ue.currentTarget},le=ue=>{Q.current&&(Q.current=null,b&&b(ue),y&&y(ue,"backdropClick"))},ie=hg(a),ee=D.useMemo(()=>({titleId:ie}),[ie]);return C.jsx(Yre,X({className:At(H.root,p),closeAfterTransition:!0,components:{Backdrop:qre},componentsProps:{backdrop:X({transitionDuration:P,as:l},c)},disableEscapeKeyDown:g,onClose:y,open:S,ref:n,onClick:le,ownerState:I},O,{children:C.jsx(R,X({appear:!0,in:S,timeout:P,role:"presentation"},F,{children:C.jsx(Kre,{className:At(H.container),onMouseDown:q,ownerState:I,children:C.jsx(Qre,X({as:w,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":ie},T,{className:At(H.paper,T.className),ownerState:I,children:C.jsx(O7.Provider,{value:ee,children:f})}))})}))}))}),wR=Jre;function eie(t){return bn("MuiDialogActions",t)}pn("MuiDialogActions",["root","spacing"]);const tie=["className","disableSpacing"],nie=t=>{const{classes:e,disableSpacing:n}=t;return Sn({root:["root",!n&&"spacing"]},eie,e)},rie=lt("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>X({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),iie=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:s=!1}=r,o=Rt(r,tie),a=X({},r,{disableSpacing:s}),l=nie(a);return C.jsx(rie,X({className:At(l.root,i),ownerState:a,ref:n},o))}),MR=iie;function sie(t){return bn("MuiDialogContent",t)}pn("MuiDialogContent",["root","dividers"]);function oie(t){return bn("MuiDialogTitle",t)}const aie=pn("MuiDialogTitle",["root"]),lie=aie,cie=["className","dividers"],uie=t=>{const{classes:e,dividers:n}=t;return Sn({root:["root",n&&"dividers"]},sie,e)},die=lt("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(({theme:t,ownerState:e})=>X({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${lie.root} + &`]:{paddingTop:0}})),fie=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiDialogContent"}),{className:i,dividers:s=!1}=r,o=Rt(r,cie),a=X({},r,{dividers:s}),l=uie(a);return C.jsx(die,X({className:At(l.root,i),ownerState:a,ref:n},o))}),ER=fie,hie=["className","id"],pie=t=>{const{classes:e}=t;return Sn({root:["root"]},oie,e)},mie=lt(mr,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),gie=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiDialogTitle"}),{className:i,id:s}=r,o=Rt(r,hie),a=r,l=pie(a),{titleId:c=s}=D.useContext(O7);return C.jsx(mie,X({component:"h2",className:At(l.root,i),ownerState:a,ref:n,variant:"h6",id:s??c},o))}),CR=gie,vie=pn("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),dk=vie,yie=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],xie=t=>{const{classes:e,disableUnderline:n}=t,i=Sn({root:["root",!n&&"underline"],input:["input"]},Lne,e);return X({},e,i)},_ie=lt(Ww,{shouldForwardProp:t=>La(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...$w(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",s=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return X({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s}},[`&.${ga.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s},[`&.${ga.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ga.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ga.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ga.disabled}, .${ga.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${ga.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&X({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),bie=lt(jw,{name:"MuiFilledInput",slot:"Input",overridesResolver:Vw})(({theme:t,ownerState:e})=>X({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),N7=D.forwardRef(function(e,n){var r,i,s,o;const a=En({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:f=!1,inputComponent:p="input",multiline:g=!1,slotProps:v,slots:x={},type:_="text"}=a,b=Rt(a,yie),y=X({},a,{fullWidth:f,inputComponent:p,multiline:g,type:_}),S=xie(a),w={root:{ownerState:y},input:{ownerState:y}},T=v??c?vo(w,v??c):w,L=(r=(i=x.root)!=null?i:l.Root)!=null?r:_ie,R=(s=(o=x.input)!=null?o:l.Input)!=null?s:bie;return C.jsx(SR,X({slots:{root:L,input:R},componentsProps:T,fullWidth:f,inputComponent:p,multiline:g,ref:n,type:_},b,{classes:S}))});N7.muiName="Input";const D7=N7;function Sie(t){return bn("MuiFormControl",t)}pn("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const wie=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Mie=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${gt(n)}`,r&&"fullWidth"]};return Sn(i,Sie,e)},Eie=lt("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>X({},e.root,e[`margin${gt(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>X({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),Cie=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiFormControl"}),{children:i,className:s,color:o="primary",component:a="div",disabled:l=!1,error:c=!1,focused:f,fullWidth:p=!1,hiddenLabel:g=!1,margin:v="none",required:x=!1,size:_="medium",variant:b="outlined"}=r,y=Rt(r,wie),S=X({},r,{color:o,component:a,disabled:l,error:c,fullWidth:p,hiddenLabel:g,margin:v,required:x,size:_,variant:b}),w=Mie(S),[T,L]=D.useState(()=>{let q=!1;return i&&D.Children.forEach(i,le=>{if(!mv(le,["Input","Select"]))return;const ie=mv(le,["Select"])?le.props.input:le;ie&&bne(ie.props)&&(q=!0)}),q}),[R,P]=D.useState(()=>{let q=!1;return i&&D.Children.forEach(i,le=>{mv(le,["Input","Select"])&&(m2(le.props,!0)||m2(le.props.inputProps,!0))&&(q=!0)}),q}),[F,O]=D.useState(!1);l&&F&&O(!1);const I=f!==void 0&&!l?f:F;let H;const Q=D.useMemo(()=>({adornedStart:T,setAdornedStart:L,color:o,disabled:l,error:c,filled:R,focused:I,fullWidth:p,hiddenLabel:g,size:_,onBlur:()=>{O(!1)},onEmpty:()=>{P(!1)},onFilled:()=>{P(!0)},onFocus:()=>{O(!0)},registerEffect:H,required:x,variant:b}),[T,o,l,c,R,I,p,g,H,x,_,b]);return C.jsx(bR.Provider,{value:Q,children:C.jsx(Eie,X({as:a,ownerState:S,className:At(w.root,s),ref:n},y,{children:i}))})}),Xw=Cie,Tie=DK({createStyledComponent:lt("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>En({props:t,name:"MuiStack"})}),bp=Tie;function Aie(t){return bn("MuiFormHelperText",t)}const Rie=pn("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),fk=Rie;var hk;const Pie=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Iie=t=>{const{classes:e,contained:n,size:r,disabled:i,error:s,filled:o,focused:a,required:l}=t,c={root:["root",i&&"disabled",s&&"error",r&&`size${gt(r)}`,n&&"contained",a&&"focused",o&&"filled",l&&"required"]};return Sn(c,Aie,e)},Lie=lt("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${gt(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>X({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${fk.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${fk.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),kie=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiFormHelperText"}),{children:i,className:s,component:o="p"}=r,a=Rt(r,Pie),l=_p(),c=vg({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),f=X({},r,{component:o,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),p=Iie(f);return C.jsx(Lie,X({as:o,ownerState:f,className:At(p.root,s),ref:n},a,{children:i===" "?hk||(hk=C.jsx("span",{className:"notranslate",children:"​"})):i}))}),Oie=kie;function Nie(t){return bn("MuiFormLabel",t)}const Die=pn("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),_v=Die,Fie=["children","className","color","component","disabled","error","filled","focused","required"],Uie=t=>{const{classes:e,color:n,focused:r,disabled:i,error:s,filled:o,required:a}=t,l={root:["root",`color${gt(n)}`,i&&"disabled",s&&"error",o&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",s&&"error"]};return Sn(l,Nie,e)},zie=lt("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>X({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>X({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${_v.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${_v.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${_v.error}`]:{color:(t.vars||t).palette.error.main}})),Bie=lt("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${_v.error}`]:{color:(t.vars||t).palette.error.main}})),Hie=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiFormLabel"}),{children:i,className:s,component:o="label"}=r,a=Rt(r,Fie),l=_p(),c=vg({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),f=X({},r,{color:c.color||"primary",component:o,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),p=Uie(f);return C.jsxs(zie,X({as:o,ownerState:f,className:At(p.root,s),ref:n},a,{children:[i,c.required&&C.jsxs(Bie,{ownerState:f,"aria-hidden":!0,className:p.asterisk,children:[" ","*"]})]}))}),$ie=Hie,Vie=D.createContext(),pk=Vie;function Wie(t){return bn("MuiGrid",t)}const jie=[0,1,2,3,4,5,6,7,8,9,10],Gie=["column-reverse","column","row-reverse","row"],Xie=["nowrap","wrap-reverse","wrap"],E1=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],ey=pn("MuiGrid",["root","container","item","zeroMinWidth",...jie.map(t=>`spacing-xs-${t}`),...Gie.map(t=>`direction-xs-${t}`),...Xie.map(t=>`wrap-xs-${t}`),...E1.map(t=>`grid-xs-${t}`),...E1.map(t=>`grid-sm-${t}`),...E1.map(t=>`grid-md-${t}`),...E1.map(t=>`grid-lg-${t}`),...E1.map(t=>`grid-xl-${t}`)]),qie=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function _0(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function Zie({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,i)=>{let s={};if(e[i]&&(n=e[i]),!n)return r;if(n===!0)s={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")s={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const o=Xh({values:e.columns,breakpoints:t.breakpoints.values}),a=typeof o=="object"?o[i]:o;if(a==null)return r;const l=`${Math.round(n/a*1e8)/1e6}%`;let c={};if(e.container&&e.item&&e.columnSpacing!==0){const f=t.spacing(e.columnSpacing);if(f!=="0px"){const p=`calc(${l} + ${_0(f)})`;c={flexBasis:p,maxWidth:p}}}s=X({flexBasis:l,flexGrow:0,maxWidth:l},c)}return t.breakpoints.values[i]===0?Object.assign(r,s):r[t.breakpoints.up(i)]=s,r},{})}function Yie({theme:t,ownerState:e}){const n=Xh({values:e.direction,breakpoints:t.breakpoints.values});return jo({theme:t},n,r=>{const i={flexDirection:r};return r.indexOf("column")===0&&(i[`& > .${ey.item}`]={maxWidth:"none"}),i})}function F7({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(i=>{n===""&&e[i]!==0&&(n=i)});const r=Object.keys(t).sort((i,s)=>t[i]-t[s]);return r.slice(0,r.indexOf(n))}function Kie({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let i={};if(n&&r!==0){const s=Xh({values:r,breakpoints:t.breakpoints.values});let o;typeof s=="object"&&(o=F7({breakpoints:t.breakpoints.values,values:s})),i=jo({theme:t},s,(a,l)=>{var c;const f=t.spacing(a);return f!=="0px"?{marginTop:`-${_0(f)}`,[`& > .${ey.item}`]:{paddingTop:_0(f)}}:(c=o)!=null&&c.includes(l)?{}:{marginTop:0,[`& > .${ey.item}`]:{paddingTop:0}}})}return i}function Qie({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let i={};if(n&&r!==0){const s=Xh({values:r,breakpoints:t.breakpoints.values});let o;typeof s=="object"&&(o=F7({breakpoints:t.breakpoints.values,values:s})),i=jo({theme:t},s,(a,l)=>{var c;const f=t.spacing(a);return f!=="0px"?{width:`calc(100% + ${_0(f)})`,marginLeft:`-${_0(f)}`,[`& > .${ey.item}`]:{paddingLeft:_0(f)}}:(c=o)!=null&&c.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${ey.item}`]:{paddingLeft:0}}})}return i}function Jie(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(i=>{const s=t[i];Number(s)>0&&r.push(n[`spacing-${i}-${String(s)}`])}),r}const ese=lt("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:i,item:s,spacing:o,wrap:a,zeroMinWidth:l,breakpoints:c}=n;let f=[];r&&(f=Jie(o,c,e));const p=[];return c.forEach(g=>{const v=n[g];v&&p.push(e[`grid-${g}-${String(v)}`])}),[e.root,r&&e.container,s&&e.item,l&&e.zeroMinWidth,...f,i!=="row"&&e[`direction-xs-${String(i)}`],a!=="wrap"&&e[`wrap-xs-${String(a)}`],...p]}})(({ownerState:t})=>X({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),Yie,Kie,Qie,Zie);function tse(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const i=t[r];if(Number(i)>0){const s=`spacing-${r}-${String(i)}`;n.push(s)}}),n}const nse=t=>{const{classes:e,container:n,direction:r,item:i,spacing:s,wrap:o,zeroMinWidth:a,breakpoints:l}=t;let c=[];n&&(c=tse(s,l));const f=[];l.forEach(g=>{const v=t[g];v&&f.push(`grid-${g}-${String(v)}`)});const p={root:["root",n&&"container",i&&"item",a&&"zeroMinWidth",...c,r!=="row"&&`direction-xs-${String(r)}`,o!=="wrap"&&`wrap-xs-${String(o)}`,...f]};return Sn(p,Wie,e)},rse=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiGrid"}),{breakpoints:i}=Bu(),s=Ky(r),{className:o,columns:a,columnSpacing:l,component:c="div",container:f=!1,direction:p="row",item:g=!1,rowSpacing:v,spacing:x=0,wrap:_="wrap",zeroMinWidth:b=!1}=s,y=Rt(s,qie),S=v||x,w=l||x,T=D.useContext(pk),L=f?a||12:T,R={},P=X({},y);i.keys.forEach(I=>{y[I]!=null&&(R[I]=y[I],delete P[I])});const F=X({},s,{columns:L,container:f,direction:p,item:g,rowSpacing:S,columnSpacing:w,wrap:_,zeroMinWidth:b,spacing:x},R,{breakpoints:i.keys}),O=nse(F);return C.jsx(pk.Provider,{value:L,children:C.jsx(ese,X({ownerState:F,className:At(O.root,o),as:c,ref:n},P))})}),eb=rse,ise=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function OT(t){return`scale(${t}, ${t**2})`}const sse={entering:{opacity:1,transform:OT(1)},entered:{opacity:1,transform:"none"}},XE=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),U7=D.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:s,easing:o,in:a,onEnter:l,onEntered:c,onEntering:f,onExit:p,onExited:g,onExiting:v,style:x,timeout:_="auto",TransitionComponent:b=uR}=e,y=Rt(e,ise),S=Ah(),w=D.useRef(),T=Bu(),L=D.useRef(null),R=Kr(L,s.ref,n),P=ie=>ee=>{if(ie){const ue=L.current;ee===void 0?ie(ue):ie(ue,ee)}},F=P(f),O=P((ie,ee)=>{u7(ie);const{duration:ue,delay:z,easing:te}=j0({style:x,timeout:_,easing:o},{mode:"enter"});let oe;_==="auto"?(oe=T.transitions.getAutoHeightDuration(ie.clientHeight),w.current=oe):oe=ue,ie.style.transition=[T.transitions.create("opacity",{duration:oe,delay:z}),T.transitions.create("transform",{duration:XE?oe:oe*.666,delay:z,easing:te})].join(","),l&&l(ie,ee)}),I=P(c),H=P(v),Q=P(ie=>{const{duration:ee,delay:ue,easing:z}=j0({style:x,timeout:_,easing:o},{mode:"exit"});let te;_==="auto"?(te=T.transitions.getAutoHeightDuration(ie.clientHeight),w.current=te):te=ee,ie.style.transition=[T.transitions.create("opacity",{duration:te,delay:ue}),T.transitions.create("transform",{duration:XE?te:te*.666,delay:XE?ue:ue||te*.333,easing:z})].join(","),ie.style.opacity=0,ie.style.transform=OT(.75),p&&p(ie)}),q=P(g),le=ie=>{_==="auto"&&S.start(w.current||0,ie),r&&r(L.current,ie)};return C.jsx(b,X({appear:i,in:a,nodeRef:L,onEnter:O,onEntered:I,onEntering:F,onExit:Q,onExited:q,onExiting:H,addEndListener:le,timeout:_==="auto"?null:_},y,{children:(ie,ee)=>D.cloneElement(s,X({style:X({opacity:0,transform:OT(.75),visibility:ie==="exited"&&!a?"hidden":void 0},sse[ie],x,s.props.style),ref:R},ee))}))});U7.muiSupportAuto=!0;const NT=U7,ose=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],ase=t=>{const{classes:e,disableUnderline:n}=t,i=Sn({root:["root",!n&&"underline"],input:["input"]},Ane,e);return X({},e,i)},lse=lt(Ww,{shouldForwardProp:t=>La(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...$w(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),X({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Fd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Fd.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Fd.disabled}, .${Fd.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Fd.disabled}:before`]:{borderBottomStyle:"dotted"}})}),cse=lt(jw,{name:"MuiInput",slot:"Input",overridesResolver:Vw})({}),z7=D.forwardRef(function(e,n){var r,i,s,o;const a=En({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:f,fullWidth:p=!1,inputComponent:g="input",multiline:v=!1,slotProps:x,slots:_={},type:b="text"}=a,y=Rt(a,ose),S=ase(a),T={root:{ownerState:{disableUnderline:l}}},L=x??f?vo(x??f,T):T,R=(r=(i=_.root)!=null?i:c.Root)!=null?r:lse,P=(s=(o=_.input)!=null?o:c.Input)!=null?s:cse;return C.jsx(SR,X({slots:{root:R,input:P},slotProps:L,fullWidth:p,inputComponent:g,multiline:v,ref:n,type:b},y,{classes:S}))});z7.muiName="Input";const qw=z7;function use(t){return bn("MuiInputLabel",t)}pn("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const dse=["disableAnimation","margin","shrink","variant","className"],fse=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:s,variant:o,required:a}=t,l={root:["root",n&&"formControl",!s&&"animated",i&&"shrink",r&&r!=="normal"&&`size${gt(r)}`,o],asterisk:[a&&"asterisk"]},c=Sn(l,use,e);return X({},e,c)},hse=lt($ie,{shouldForwardProp:t=>La(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${_v.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>X({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&X({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&X({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&X({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),pse=D.forwardRef(function(e,n){const r=En({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:s,className:o}=r,a=Rt(r,dse),l=_p();let c=s;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const f=vg({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),p=X({},r,{disableAnimation:i,formControl:l,shrink:c,size:f.size,variant:f.variant,required:f.required,focused:f.focused}),g=fse(p);return C.jsx(hse,X({"data-shrink":c,ownerState:p,ref:n,className:At(g.root,o)},a,{classes:g}))}),mse=pse,gse=D.createContext({}),Tu=gse;function vse(t){return bn("MuiList",t)}pn("MuiList",["root","padding","dense","subheader"]);const yse=["children","className","component","dense","disablePadding","subheader"],xse=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return Sn({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},vse,e)},_se=lt("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>X({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),bse=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiList"}),{children:i,className:s,component:o="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,f=Rt(r,yse),p=D.useMemo(()=>({dense:a}),[a]),g=X({},r,{component:o,dense:a,disablePadding:l}),v=xse(g);return C.jsx(Tu.Provider,{value:p,children:C.jsxs(_se,X({as:o,className:At(v.root,s),ref:n,ownerState:g},f,{children:[c,i]}))})}),TR=bse;function Sse(t){return bn("MuiListItem",t)}const wse=pn("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Wm=wse,Mse=pn("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Ese=Mse;function Cse(t){return bn("MuiListItemSecondaryAction",t)}pn("MuiListItemSecondaryAction",["root","disableGutters"]);const Tse=["className"],Ase=t=>{const{disableGutters:e,classes:n}=t;return Sn({root:["root",e&&"disableGutters"]},Cse,n)},Rse=lt("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>X({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),B7=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,s=Rt(r,Tse),o=D.useContext(Tu),a=X({},r,{disableGutters:o.disableGutters}),l=Ase(a);return C.jsx(Rse,X({className:At(l.root,i),ownerState:a,ref:n},s))});B7.muiName="ListItemSecondaryAction";const Pse=B7,Ise=["className"],Lse=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],kse=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},Ose=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:s,disableGutters:o,disablePadding:a,divider:l,hasSecondaryAction:c,selected:f}=t;return Sn({root:["root",i&&"dense",!o&&"gutters",!a&&"padding",l&&"divider",s&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",f&&"selected"],container:["container"]},Sse,r)},Nse=lt("div",{name:"MuiListItem",slot:"Root",overridesResolver:kse})(({theme:t,ownerState:e})=>X({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&X({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${Ese.root}`]:{paddingRight:48}},{[`&.${Wm.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Wm.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:qn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Wm.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:qn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Wm.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Wm.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:qn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:qn(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),Dse=lt("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),Fse=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:s=!1,button:o=!1,children:a,className:l,component:c,components:f={},componentsProps:p={},ContainerComponent:g="li",ContainerProps:{className:v}={},dense:x=!1,disabled:_=!1,disableGutters:b=!1,disablePadding:y=!1,divider:S=!1,focusVisibleClassName:w,secondaryAction:T,selected:L=!1,slotProps:R={},slots:P={}}=r,F=Rt(r.ContainerProps,Ise),O=Rt(r,Lse),I=D.useContext(Tu),H=D.useMemo(()=>({dense:x||I.dense||!1,alignItems:i,disableGutters:b}),[i,I.dense,x,b]),Q=D.useRef(null);Xo(()=>{s&&Q.current&&Q.current.focus()},[s]);const q=D.Children.toArray(a),le=q.length&&mv(q[q.length-1],["ListItemSecondaryAction"]),ie=X({},r,{alignItems:i,autoFocus:s,button:o,dense:H.dense,disabled:_,disableGutters:b,disablePadding:y,divider:S,hasSecondaryAction:le,selected:L}),ee=Ose(ie),ue=Kr(Q,n),z=P.root||f.Root||Nse,te=R.root||p.root||{},oe=X({className:At(ee.root,te.className,l),disabled:_},O);let de=c||"li";return o&&(oe.component=c||"div",oe.focusVisibleClassName=At(Wm.focusVisible,w),de=Nu),le?(de=!oe.component&&!c?"div":de,g==="li"&&(de==="li"?de="div":oe.component==="li"&&(oe.component="div")),C.jsx(Tu.Provider,{value:H,children:C.jsxs(Dse,X({as:g,className:At(ee.container,v),ref:ue,ownerState:ie},F,{children:[C.jsx(z,X({},te,!Rc(z)&&{as:de,ownerState:X({},ie,te.ownerState)},oe,{children:q})),q.pop()]}))})):C.jsx(Tu.Provider,{value:H,children:C.jsxs(z,X({},te,{as:de,ref:ue},!Rc(z)&&{ownerState:X({},ie,te.ownerState)},oe,{children:[q,T&&C.jsx(Pse,{children:T})]}))})}),mc=Fse;function Use(t){return bn("MuiListItemIcon",t)}const mk=pn("MuiListItemIcon",["root","alignItemsFlexStart"]),zse=["className"],Bse=t=>{const{alignItems:e,classes:n}=t;return Sn({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},Use,n)},Hse=lt("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(({theme:t,ownerState:e})=>X({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},e.alignItems==="flex-start"&&{marginTop:8})),$se=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiListItemIcon"}),{className:i}=r,s=Rt(r,zse),o=D.useContext(Tu),a=X({},r,{alignItems:o.alignItems}),l=Bse(a);return C.jsx(Hse,X({className:At(l.root,i),ownerState:a,ref:n},s))}),gk=$se;function Vse(t){return bn("MuiListItemText",t)}const Wse=pn("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),g2=Wse,jse=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Gse=t=>{const{classes:e,inset:n,primary:r,secondary:i,dense:s}=t;return Sn({root:["root",n&&"inset",s&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},Vse,e)},Xse=lt("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${g2.primary}`]:e.primary},{[`& .${g2.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>X({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),qse=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiListItemText"}),{children:i,className:s,disableTypography:o=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:f,secondaryTypographyProps:p}=r,g=Rt(r,jse),{dense:v}=D.useContext(Tu);let x=l??i,_=f;const b=X({},r,{disableTypography:o,inset:a,primary:!!x,secondary:!!_,dense:v}),y=Gse(b);return x!=null&&x.type!==mr&&!o&&(x=C.jsx(mr,X({variant:v?"body2":"body1",className:y.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:x}))),_!=null&&_.type!==mr&&!o&&(_=C.jsx(mr,X({variant:"body2",className:y.secondary,color:"text.secondary",display:"block"},p,{children:_}))),C.jsxs(Xse,X({className:At(y.root,s),ownerState:b,ref:n},g,{children:[x,_]}))}),gc=qse,Zse=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function qE(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function vk(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function H7(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function C1(t,e,n,r,i,s){let o=!1,a=i(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(o)return!1;o=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!H7(a,s)||l)a=i(t,a,n);else return a.focus(),!0}return!1}const Yse=D.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:s=!1,children:o,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:f,variant:p="selectedMenu"}=e,g=Rt(e,Zse),v=D.useRef(null),x=D.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Xo(()=>{i&&v.current.focus()},[i]),D.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(w,{direction:T})=>{const L=!v.current.style.width;if(w.clientHeight{const T=v.current,L=w.key,R=Oi(T).activeElement;if(L==="ArrowDown")w.preventDefault(),C1(T,R,c,l,qE);else if(L==="ArrowUp")w.preventDefault(),C1(T,R,c,l,vk);else if(L==="Home")w.preventDefault(),C1(T,null,c,l,qE);else if(L==="End")w.preventDefault(),C1(T,null,c,l,vk);else if(L.length===1){const P=x.current,F=L.toLowerCase(),O=performance.now();P.keys.length>0&&(O-P.lastTime>500?(P.keys=[],P.repeating=!0,P.previousKeyMatched=!0):P.repeating&&F!==P.keys[0]&&(P.repeating=!1)),P.lastTime=O,P.keys.push(F);const I=R&&!P.repeating&&H7(R,P);P.previousKeyMatched&&(I||C1(T,R,!1,l,qE,P))?w.preventDefault():P.previousKeyMatched=!1}f&&f(w)},b=Kr(v,n);let y=-1;D.Children.forEach(o,(w,T)=>{if(!D.isValidElement(w)){y===T&&(y+=1,y>=o.length&&(y=-1));return}w.props.disabled||(p==="selectedMenu"&&w.props.selected||y===-1)&&(y=T),y===T&&(w.props.disabled||w.props.muiSkipListHighlight||w.type.muiSkipListHighlight)&&(y+=1,y>=o.length&&(y=-1))});const S=D.Children.map(o,(w,T)=>{if(T===y){const L={};return s&&(L.autoFocus=!0),w.props.tabIndex===void 0&&p==="selectedMenu"&&(L.tabIndex=0),D.cloneElement(w,L)}return w});return C.jsx(TR,X({role:"menu",ref:b,className:a,onKeyDown:_,tabIndex:i?0:-1},g,{children:S}))}),Kse=Yse;function Qse(t){return bn("MuiPopover",t)}pn("MuiPopover",["root","paper"]);const Jse=["onEntering"],eoe=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],toe=["slotProps"];function yk(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function xk(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function _k(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function ZE(t){return typeof t=="function"?t():t}const noe=t=>{const{classes:e}=t;return Sn({root:["root"],paper:["paper"]},Qse,e)},roe=lt(k7,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),$7=lt(nx,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),ioe=D.forwardRef(function(e,n){var r,i,s;const o=En({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:p="anchorEl",children:g,className:v,container:x,elevation:_=8,marginThreshold:b=16,open:y,PaperProps:S={},slots:w,slotProps:T,transformOrigin:L={vertical:"top",horizontal:"left"},TransitionComponent:R=NT,transitionDuration:P="auto",TransitionProps:{onEntering:F}={},disableScrollLock:O=!1}=o,I=Rt(o.TransitionProps,Jse),H=Rt(o,eoe),Q=(r=T==null?void 0:T.paper)!=null?r:S,q=D.useRef(),le=Kr(q,Q.ref),ie=X({},o,{anchorOrigin:c,anchorReference:p,elevation:_,marginThreshold:b,externalPaperSlotProps:Q,transformOrigin:L,TransitionComponent:R,transitionDuration:P,TransitionProps:I}),ee=noe(ie),ue=D.useCallback(()=>{if(p==="anchorPosition")return f;const Oe=ZE(l),ze=(Oe&&Oe.nodeType===1?Oe:Oi(q.current).body).getBoundingClientRect();return{top:ze.top+yk(ze,c.vertical),left:ze.left+xk(ze,c.horizontal)}},[l,c.horizontal,c.vertical,f,p]),z=D.useCallback(Oe=>({vertical:yk(Oe,L.vertical),horizontal:xk(Oe,L.horizontal)}),[L.horizontal,L.vertical]),te=D.useCallback(Oe=>{const Te={width:Oe.offsetWidth,height:Oe.offsetHeight},ze=z(Te);if(p==="none")return{top:null,left:null,transformOrigin:_k(ze)};const ke=ue();let rt=ke.top-ze.vertical,tt=ke.left-ze.horizontal;const ae=rt+Te.height,G=tt+Te.width,be=Oc(ZE(l)),$e=be.innerHeight-b,Ze=be.innerWidth-b;if(b!==null&&rt$e){const We=ae-$e;rt-=We,ze.vertical+=We}if(b!==null&&ttZe){const We=G-Ze;tt-=We,ze.horizontal+=We}return{top:`${Math.round(rt)}px`,left:`${Math.round(tt)}px`,transformOrigin:_k(ze)}},[l,p,ue,z,b]),[oe,de]=D.useState(y),Ce=D.useCallback(()=>{const Oe=q.current;if(!Oe)return;const Te=te(Oe);Te.top!==null&&(Oe.style.top=Te.top),Te.left!==null&&(Oe.style.left=Te.left),Oe.style.transformOrigin=Te.transformOrigin,de(!0)},[te]);D.useEffect(()=>(O&&window.addEventListener("scroll",Ce),()=>window.removeEventListener("scroll",Ce)),[l,O,Ce]);const Le=(Oe,Te)=>{F&&F(Oe,Te),Ce()},V=()=>{de(!1)};D.useEffect(()=>{y&&Ce()}),D.useImperativeHandle(a,()=>y?{updatePosition:()=>{Ce()}}:null,[y,Ce]),D.useEffect(()=>{if(!y)return;const Oe=Qy(()=>{Ce()}),Te=Oc(l);return Te.addEventListener("resize",Oe),()=>{Oe.clear(),Te.removeEventListener("resize",Oe)}},[l,y,Ce]);let me=P;P==="auto"&&!R.muiSupportAuto&&(me=void 0);const pe=x||(l?Oi(ZE(l)).body:void 0),Se=(i=w==null?void 0:w.root)!=null?i:roe,je=(s=w==null?void 0:w.paper)!=null?s:$7,it=Qi({elementType:je,externalSlotProps:X({},Q,{style:oe?Q.style:X({},Q.style,{opacity:0})}),additionalProps:{elevation:_,ref:le},ownerState:ie,className:At(ee.paper,Q==null?void 0:Q.className)}),xe=Qi({elementType:Se,externalSlotProps:(T==null?void 0:T.root)||{},externalForwardedProps:H,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:pe,open:y},ownerState:ie,className:At(ee.root,v)}),{slotProps:et}=xe,Re=Rt(xe,toe);return C.jsx(Se,X({},Re,!Rc(Se)&&{slotProps:et,disableScrollLock:O},{children:C.jsx(R,X({appear:!0,in:y,onEntering:Le,onExited:V,timeout:me},I,{children:C.jsx(je,X({},it,{children:g}))}))}))}),soe=ioe;function ooe(t){return bn("MuiMenu",t)}pn("MuiMenu",["root","paper","list"]);const aoe=["onEntering"],loe=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],coe={vertical:"top",horizontal:"right"},uoe={vertical:"top",horizontal:"left"},doe=t=>{const{classes:e}=t;return Sn({root:["root"],paper:["paper"],list:["list"]},ooe,e)},foe=lt(soe,{shouldForwardProp:t=>La(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),hoe=lt($7,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),poe=lt(Kse,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),moe=D.forwardRef(function(e,n){var r,i;const s=En({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:f={},onClose:p,open:g,PaperProps:v={},PopoverClasses:x,transitionDuration:_="auto",TransitionProps:{onEntering:b}={},variant:y="selectedMenu",slots:S={},slotProps:w={}}=s,T=Rt(s.TransitionProps,aoe),L=Rt(s,loe),R=ex(),P=X({},s,{autoFocus:o,disableAutoFocusItem:c,MenuListProps:f,onEntering:b,PaperProps:v,transitionDuration:_,TransitionProps:T,variant:y}),F=doe(P),O=o&&!c&&g,I=D.useRef(null),H=(z,te)=>{I.current&&I.current.adjustStyleForScrollbar(z,{direction:R?"rtl":"ltr"}),b&&b(z,te)},Q=z=>{z.key==="Tab"&&(z.preventDefault(),p&&p(z,"tabKeyDown"))};let q=-1;D.Children.map(a,(z,te)=>{D.isValidElement(z)&&(z.props.disabled||(y==="selectedMenu"&&z.props.selected||q===-1)&&(q=te))});const le=(r=S.paper)!=null?r:hoe,ie=(i=w.paper)!=null?i:v,ee=Qi({elementType:S.root,externalSlotProps:w.root,ownerState:P,className:[F.root,l]}),ue=Qi({elementType:le,externalSlotProps:ie,ownerState:P,className:F.paper});return C.jsx(foe,X({onClose:p,anchorOrigin:{vertical:"bottom",horizontal:R?"right":"left"},transformOrigin:R?coe:uoe,slots:{paper:le,root:S.root},slotProps:{root:ee,paper:ue},open:g,ref:n,transitionDuration:_,TransitionProps:X({onEntering:H},T),ownerState:P},L,{classes:x,children:C.jsx(poe,X({onKeyDown:Q,actions:I,autoFocus:o&&(q===-1||c),autoFocusItem:O,variant:y},f,{className:At(F.list,f.className),children:a}))}))}),goe=moe;function voe(t){return bn("MuiMenuItem",t)}const yoe=pn("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),T1=yoe,xoe=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],_oe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},boe=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:s,classes:o}=t,l=Sn({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",s&&"selected"]},voe,o);return X({},o,l)},Soe=lt(Nu,{shouldForwardProp:t=>La(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:_oe})(({theme:t,ownerState:e})=>X({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${T1.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:qn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${T1.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:qn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${T1.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:qn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:qn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${T1.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${T1.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${dk.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${dk.inset}`]:{marginLeft:52},[`& .${g2.root}`]:{marginTop:0,marginBottom:0},[`& .${g2.inset}`]:{paddingLeft:36},[`& .${mk.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&X({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${mk.root} svg`]:{fontSize:"1.25rem"}}))),woe=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:s="li",dense:o=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:f="menuitem",tabIndex:p,className:g}=r,v=Rt(r,xoe),x=D.useContext(Tu),_=D.useMemo(()=>({dense:o||x.dense||!1,disableGutters:l}),[x.dense,o,l]),b=D.useRef(null);Xo(()=>{i&&b.current&&b.current.focus()},[i]);const y=X({},r,{dense:_.dense,divider:a,disableGutters:l}),S=boe(r),w=Kr(b,n);let T;return r.disabled||(T=p!==void 0?p:-1),C.jsx(Tu.Provider,{value:_,children:C.jsx(Soe,X({ref:w,role:f,tabIndex:T,component:s,focusVisibleClassName:At(S.focusVisible,c),className:At(S.root,g)},v,{ownerState:y,classes:S}))})}),ty=woe;function Moe(t){return bn("MuiNativeSelect",t)}const Eoe=pn("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),AR=Eoe,Coe=["className","disabled","error","IconComponent","inputRef","variant"],Toe=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:o}=t,a={select:["select",n,r&&"disabled",i&&"multiple",o&&"error"],icon:["icon",`icon${gt(n)}`,s&&"iconOpen",r&&"disabled"]};return Sn(a,Moe,e)},V7=({ownerState:t,theme:e})=>X({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":X({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${AR.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),Aoe=lt("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:La,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${AR.multiple}`]:e.multiple}]}})(V7),W7=({ownerState:t,theme:e})=>X({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${AR.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),Roe=lt("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${gt(n.variant)}`],n.open&&e.iconOpen]}})(W7),Poe=D.forwardRef(function(e,n){const{className:r,disabled:i,error:s,IconComponent:o,inputRef:a,variant:l="standard"}=e,c=Rt(e,Coe),f=X({},e,{disabled:i,variant:l,error:s}),p=Toe(f);return C.jsxs(D.Fragment,{children:[C.jsx(Aoe,X({ownerState:f,className:At(p.select,r),disabled:i,ref:a||n},c)),e.multiple?null:C.jsx(Roe,{as:o,ownerState:f,className:p.icon})]})}),Ioe=Poe;var bk;const Loe=["children","classes","className","label","notched"],koe=lt("fieldset",{shouldForwardProp:La})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Ooe=lt("legend",{shouldForwardProp:La})(({ownerState:t,theme:e})=>X({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&X({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function Noe(t){const{className:e,label:n,notched:r}=t,i=Rt(t,Loe),s=n!=null&&n!=="",o=X({},t,{notched:r,withLabel:s});return C.jsx(koe,X({"aria-hidden":!0,className:e,ownerState:o},i,{children:C.jsx(Ooe,{ownerState:o,children:s?C.jsx("span",{children:n}):bk||(bk=C.jsx("span",{className:"notranslate",children:"​"}))})}))}const Doe=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Foe=t=>{const{classes:e}=t,r=Sn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Pne,e);return X({},e,r)},Uoe=lt(Ww,{shouldForwardProp:t=>La(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:$w})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return X({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${pc.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${pc.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${pc.focused} .${pc.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${pc.error} .${pc.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${pc.disabled} .${pc.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&X({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),zoe=lt(Noe,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),Boe=lt(jw,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Vw})(({theme:t,ownerState:e})=>X({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),j7=D.forwardRef(function(e,n){var r,i,s,o,a;const l=En({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:f=!1,inputComponent:p="input",label:g,multiline:v=!1,notched:x,slots:_={},type:b="text"}=l,y=Rt(l,Doe),S=Foe(l),w=_p(),T=vg({props:l,muiFormControl:w,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),L=X({},l,{color:T.color||"primary",disabled:T.disabled,error:T.error,focused:T.focused,formControl:w,fullWidth:f,hiddenLabel:T.hiddenLabel,multiline:v,size:T.size,type:b}),R=(r=(i=_.root)!=null?i:c.Root)!=null?r:Uoe,P=(s=(o=_.input)!=null?o:c.Input)!=null?s:Boe;return C.jsx(SR,X({slots:{root:R,input:P},renderSuffix:F=>C.jsx(zoe,{ownerState:L,className:S.notchedOutline,label:g!=null&&g!==""&&T.required?a||(a=C.jsxs(D.Fragment,{children:[g," ","*"]})):g,notched:typeof x<"u"?x:!!(F.startAdornment||F.filled||F.focused)}),fullWidth:f,inputComponent:p,multiline:v,ref:n,type:b},y,{classes:X({},S,{notchedOutline:null})}))});j7.muiName="Input";const RR=j7;function Hoe(t){return bn("MuiSelect",t)}const A1=pn("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Sk;const $oe=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Voe=lt("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${A1.select}`]:e.select},{[`&.${A1.select}`]:e[n.variant]},{[`&.${A1.error}`]:e.error},{[`&.${A1.multiple}`]:e.multiple}]}})(V7,{[`&.${A1.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Woe=lt("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${gt(n.variant)}`],n.open&&e.iconOpen]}})(W7),joe=lt("input",{shouldForwardProp:t=>Aw(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function wk(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Goe(t){return t==null||typeof t=="string"&&!t.trim()}const Xoe=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:o}=t,a={select:["select",n,r&&"disabled",i&&"multiple",o&&"error"],icon:["icon",`icon${gt(n)}`,s&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Sn(a,Hoe,e)},qoe=D.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":s,autoFocus:o,autoWidth:a,children:l,className:c,defaultOpen:f,defaultValue:p,disabled:g,displayEmpty:v,error:x=!1,IconComponent:_,inputRef:b,labelId:y,MenuProps:S={},multiple:w,name:T,onBlur:L,onChange:R,onClose:P,onFocus:F,onOpen:O,open:I,readOnly:H,renderValue:Q,SelectDisplayProps:q={},tabIndex:le,value:ie,variant:ee="standard"}=e,ue=Rt(e,$oe),[z,te]=Cu({controlled:ie,default:p,name:"Select"}),[oe,de]=Cu({controlled:I,default:f,name:"Select"}),Ce=D.useRef(null),Le=D.useRef(null),[V,me]=D.useState(null),{current:pe}=D.useRef(I!=null),[Se,je]=D.useState(),it=Kr(n,b),xe=D.useCallback(Be=>{Le.current=Be,Be&&me(Be)},[]),et=V==null?void 0:V.parentNode;D.useImperativeHandle(it,()=>({focus:()=>{Le.current.focus()},node:Ce.current,value:z}),[z]),D.useEffect(()=>{f&&oe&&V&&!pe&&(je(a?null:et.clientWidth),Le.current.focus())},[V,a]),D.useEffect(()=>{o&&Le.current.focus()},[o]),D.useEffect(()=>{if(!y)return;const Be=Oi(Le.current).getElementById(y);if(Be){const vt=()=>{getSelection().isCollapsed&&Le.current.focus()};return Be.addEventListener("click",vt),()=>{Be.removeEventListener("click",vt)}}},[y]);const Re=(Be,vt)=>{Be?O&&O(vt):P&&P(vt),pe||(je(a?null:et.clientWidth),de(Be))},Oe=Be=>{Be.button===0&&(Be.preventDefault(),Le.current.focus(),Re(!0,Be))},Te=Be=>{Re(!1,Be)},ze=D.Children.toArray(l),ke=Be=>{const vt=ze.find(qe=>qe.props.value===Be.target.value);vt!==void 0&&(te(vt.props.value),R&&R(Be,vt))},rt=Be=>vt=>{let qe;if(vt.currentTarget.hasAttribute("tabindex")){if(w){qe=Array.isArray(z)?z.slice():[];const ce=z.indexOf(Be.props.value);ce===-1?qe.push(Be.props.value):qe.splice(ce,1)}else qe=Be.props.value;if(Be.props.onClick&&Be.props.onClick(vt),z!==qe&&(te(qe),R)){const ce=vt.nativeEvent||vt,Ne=new ce.constructor(ce.type,ce);Object.defineProperty(Ne,"target",{writable:!0,value:{value:qe,name:T}}),R(Ne,Be)}w||Re(!1,vt)}},tt=Be=>{H||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Be.key)!==-1&&(Be.preventDefault(),Re(!0,Be))},ae=V!==null&&oe,G=Be=>{!ae&&L&&(Object.defineProperty(Be,"target",{writable:!0,value:{value:z,name:T}}),L(Be))};delete ue["aria-invalid"];let be,$e;const Ze=[];let We=!1;(m2({value:z})||v)&&(Q?be=Q(z):We=!0);const Mt=ze.map(Be=>{if(!D.isValidElement(Be))return null;let vt;if(w){if(!Array.isArray(z))throw new Error(op(2));vt=z.some(qe=>wk(qe,Be.props.value)),vt&&We&&Ze.push(Be.props.children)}else vt=wk(z,Be.props.value),vt&&We&&($e=Be.props.children);return D.cloneElement(Be,{"aria-selected":vt?"true":"false",onClick:rt(Be),onKeyUp:qe=>{qe.key===" "&&qe.preventDefault(),Be.props.onKeyUp&&Be.props.onKeyUp(qe)},role:"option",selected:vt,value:void 0,"data-value":Be.props.value})});We&&(w?Ze.length===0?be=null:be=Ze.reduce((Be,vt,qe)=>(Be.push(vt),qe{const{classes:e}=t;return e},PR={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>La(t)&&t!=="variant",slot:"Root"},Joe=lt(qw,PR)(""),eae=lt(RR,PR)(""),tae=lt(D7,PR)(""),G7=D.forwardRef(function(e,n){const r=En({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:s,classes:o={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:f=P7,id:p,input:g,inputProps:v,label:x,labelId:_,MenuProps:b,multiple:y=!1,native:S=!1,onClose:w,onOpen:T,open:L,renderValue:R,SelectDisplayProps:P,variant:F="outlined"}=r,O=Rt(r,Yoe),I=S?Ioe:Zoe,H=_p(),Q=vg({props:r,muiFormControl:H,states:["variant","error"]}),q=Q.variant||F,le=X({},r,{variant:q,classes:o}),ie=Qoe(le),ee=Rt(ie,Koe),ue=g||{standard:C.jsx(Joe,{ownerState:le}),outlined:C.jsx(eae,{label:x,ownerState:le}),filled:C.jsx(tae,{ownerState:le})}[q],z=Kr(n,ue.ref);return C.jsx(D.Fragment,{children:D.cloneElement(ue,X({inputComponent:I,inputProps:X({children:s,error:Q.error,IconComponent:f,variant:q,type:void 0,multiple:y},S?{id:p}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:_,MenuProps:b,onClose:w,onOpen:T,open:L,renderValue:R,SelectDisplayProps:X({id:p},P)},v,{classes:v?vo(ee,v.classes):ee},g?g.props.inputProps:{})},(y&&S||c)&&q==="outlined"?{notched:!0}:{},{ref:z,className:At(ue.props.className,a,ie.root)},!g&&{variant:q},O))})});G7.muiName="Select";const X7=G7,nae=t=>!t||!Rc(t);function rae(t){return bn("MuiSlider",t)}const iae=pn("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),rl=iae,sae=t=>{const{open:e}=t;return{offset:At(e&&rl.valueLabelOpen),circle:rl.valueLabelCircle,label:rl.valueLabelLabel}};function oae(t){const{children:e,className:n,value:r}=t,i=sae(t);return e?D.cloneElement(e,{className:At(e.props.className)},C.jsxs(D.Fragment,{children:[e.props.children,C.jsx("span",{className:At(i.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:i.circle,children:C.jsx("span",{className:i.label,children:r})})})]})):null}const aae=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"],lae=cR();function Mk(t){return t}const cae=lt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`color${gt(n.color)}`],n.size!=="medium"&&e[`size${gt(n.size)}`],n.marked&&e.marked,n.orientation==="vertical"&&e.vertical,n.track==="inverted"&&e.trackInverted,n.track===!1&&e.trackFalse]}})(({theme:t})=>{var e;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${rl.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${rl.dragging}`]:{[`& .${rl.thumb}, & .${rl.track}`]:{transition:"none"}},variants:[...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n},style:{color:(t.vars||t).palette[n].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),uae=lt("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(t,e)=>e.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),dae=lt("span",{name:"MuiSlider",slot:"Track",overridesResolver:(t,e)=>e.track})(({theme:t})=>{var e;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n,track:"inverted"},style:X({},t.vars?{backgroundColor:t.vars.palette.Slider[`${n}Track`],borderColor:t.vars.palette.Slider[`${n}Track`]}:X({backgroundColor:qv(t.palette[n].main,.62),borderColor:qv(t.palette[n].main,.62)},t.applyStyles("dark",{backgroundColor:Xv(t.palette[n].main,.5)}),t.applyStyles("dark",{borderColor:Xv(t.palette[n].main,.5)})))}))]}}),fae=lt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.thumb,e[`thumbColor${gt(n.color)}`],n.size!=="medium"&&e[`thumbSize${gt(n.size)}`]]}})(({theme:t})=>{var e;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${rl.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n},style:{[`&:hover, &.${rl.focusVisible}`]:X({},t.vars?{boxShadow:`0px 0px 0px 8px rgba(${t.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${qn(t.palette[n].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${rl.active}`]:X({},t.vars?{boxShadow:`0px 0px 0px 14px rgba(${t.vars.palette[n].mainChannel} / 0.16)}`}:{boxShadow:`0px 0px 0px 14px ${qn(t.palette[n].main,.16)}`})}})),{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}}]}}),hae=lt(oae,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(t,e)=>e.valueLabel})(({theme:t})=>X({zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${rl.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${rl.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),pae=lt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:t=>Aw(t)&&t!=="markActive",overridesResolver:(t,e)=>{const{markActive:n}=t;return[e.mark,n&&e.markActive]}})(({theme:t})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]})),mae=lt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:t=>Aw(t)&&t!=="markLabelActive",overridesResolver:(t,e)=>e.markLabel})(({theme:t})=>X({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]})),gae=t=>{const{disabled:e,dragging:n,marked:r,orientation:i,track:s,classes:o,color:a,size:l}=t,c={root:["root",e&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",a&&`color${gt(a)}`,l&&`size${gt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",e&&"disabled",l&&`thumbSize${gt(l)}`,a&&`thumbColor${gt(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Sn(c,rae,o)},vae=({children:t})=>t,yae=D.forwardRef(function(e,n){var r,i,s,o,a,l,c,f,p,g,v,x,_,b,y,S,w,T,L,R,P,F,O,I;const H=lae({props:e,name:"MuiSlider"}),Q=ex(),{"aria-label":q,"aria-valuetext":le,"aria-labelledby":ie,component:ee="span",components:ue={},componentsProps:z={},color:te="primary",classes:oe,className:de,disableSwap:Ce=!1,disabled:Le=!1,getAriaLabel:V,getAriaValueText:me,marks:pe=!1,max:Se=100,min:je=0,orientation:it="horizontal",shiftStep:xe=10,size:et="medium",step:Re=1,scale:Oe=Mk,slotProps:Te,slots:ze,track:ke="normal",valueLabelDisplay:rt="off",valueLabelFormat:tt=Mk}=H,ae=Rt(H,aae),G=X({},H,{isRtl:Q,max:Se,min:je,classes:oe,disabled:Le,disableSwap:Ce,orientation:it,marks:pe,color:te,size:et,step:Re,shiftStep:xe,scale:Oe,track:ke,valueLabelDisplay:rt,valueLabelFormat:tt}),{axisProps:be,getRootProps:$e,getHiddenInputProps:Ze,getThumbProps:We,open:Mt,active:pt,axis:at,focusedThumbIndex:Ie,range:ge,dragging:Xe,marks:St,values:mt,trackOffset:Be,trackLeap:vt,getThumbStyle:qe}=Vte(X({},G,{rootRef:n}));G.marked=St.length>0&&St.some(B=>B.label),G.dragging=Xe,G.focusedThumbIndex=Ie;const ce=gae(G),Ne=(r=(i=ze==null?void 0:ze.root)!=null?i:ue.Root)!=null?r:cae,fe=(s=(o=ze==null?void 0:ze.rail)!=null?o:ue.Rail)!=null?s:uae,Fe=(a=(l=ze==null?void 0:ze.track)!=null?l:ue.Track)!=null?a:dae,He=(c=(f=ze==null?void 0:ze.thumb)!=null?f:ue.Thumb)!=null?c:fae,ut=(p=(g=ze==null?void 0:ze.valueLabel)!=null?g:ue.ValueLabel)!=null?p:hae,xt=(v=(x=ze==null?void 0:ze.mark)!=null?x:ue.Mark)!=null?v:pae,Xt=(_=(b=ze==null?void 0:ze.markLabel)!=null?b:ue.MarkLabel)!=null?_:mae,vn=(y=(S=ze==null?void 0:ze.input)!=null?S:ue.Input)!=null?y:"input",mn=(w=Te==null?void 0:Te.root)!=null?w:z.root,On=(T=Te==null?void 0:Te.rail)!=null?T:z.rail,un=(L=Te==null?void 0:Te.track)!=null?L:z.track,Nn=(R=Te==null?void 0:Te.thumb)!=null?R:z.thumb,In=(P=Te==null?void 0:Te.valueLabel)!=null?P:z.valueLabel,or=(F=Te==null?void 0:Te.mark)!=null?F:z.mark,Kn=(O=Te==null?void 0:Te.markLabel)!=null?O:z.markLabel,Fr=(I=Te==null?void 0:Te.input)!=null?I:z.input,gr=Qi({elementType:Ne,getSlotProps:$e,externalSlotProps:mn,externalForwardedProps:ae,additionalProps:X({},nae(Ne)&&{as:ee}),ownerState:X({},G,mn==null?void 0:mn.ownerState),className:[ce.root,de]}),ui=Qi({elementType:fe,externalSlotProps:On,ownerState:G,className:ce.rail}),ss=Qi({elementType:Fe,externalSlotProps:un,additionalProps:{style:X({},be[at].offset(Be),be[at].leap(vt))},ownerState:X({},G,un==null?void 0:un.ownerState),className:ce.track}),Rr=Qi({elementType:He,getSlotProps:We,externalSlotProps:Nn,ownerState:X({},G,Nn==null?void 0:Nn.ownerState),className:ce.thumb}),ji=Qi({elementType:ut,externalSlotProps:In,ownerState:X({},G,In==null?void 0:In.ownerState),className:ce.valueLabel}),Ei=Qi({elementType:xt,externalSlotProps:or,ownerState:G,className:ce.mark}),di=Qi({elementType:Xt,externalSlotProps:Kn,ownerState:G,className:ce.markLabel}),Gi=Qi({elementType:vn,getSlotProps:Ze,externalSlotProps:Fr,ownerState:G});return C.jsxs(Ne,X({},gr,{children:[C.jsx(fe,X({},ui)),C.jsx(Fe,X({},ss)),St.filter(B=>B.value>=je&&B.value<=Se).map((B,ne)=>{const _e=p2(B.value,je,Se),ye=be[at].offset(_e);let we;return ke===!1?we=mt.indexOf(B.value)!==-1:we=ke==="normal"&&(ge?B.value>=mt[0]&&B.value<=mt[mt.length-1]:B.value<=mt[0])||ke==="inverted"&&(ge?B.value<=mt[0]||B.value>=mt[mt.length-1]:B.value>=mt[0]),C.jsxs(D.Fragment,{children:[C.jsx(xt,X({"data-index":ne},Ei,!Rc(xt)&&{markActive:we},{style:X({},ye,Ei.style),className:At(Ei.className,we&&ce.markActive)})),B.label!=null?C.jsx(Xt,X({"aria-hidden":!0,"data-index":ne},di,!Rc(Xt)&&{markLabelActive:we},{style:X({},ye,di.style),className:At(ce.markLabel,di.className,we&&ce.markLabelActive),children:B.label})):null]},ne)}),mt.map((B,ne)=>{const _e=p2(B,je,Se),ye=be[at].offset(_e),we=rt==="off"?vae:ut;return C.jsx(we,X({},!Rc(we)&&{valueLabelFormat:tt,valueLabelDisplay:rt,value:typeof tt=="function"?tt(Oe(B),ne):tt,index:ne,open:Mt===ne||pt===ne||rt==="on",disabled:Le},ji,{children:C.jsx(He,X({"data-index":ne},Rr,{className:At(ce.thumb,Rr.className,pt===ne&&ce.active,Ie===ne&&ce.focusVisible),style:X({},ye,qe(ne),Rr.style),children:C.jsx(vn,X({"data-index":ne,"aria-label":V?V(ne):q,"aria-valuenow":Oe(B),"aria-labelledby":ie,"aria-valuetext":me?me(Oe(B),ne):le,value:mt[ne]},Gi))}))}),ne)})]}))}),IR=yae;function xae(t){return bn("MuiTooltip",t)}const _ae=pn("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Zd=_ae,bae=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function Sae(t){return Math.round(t*1e5)/1e5}const wae=t=>{const{classes:e,disableInteractive:n,arrow:r,touch:i,placement:s}=t,o={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${gt(s.split("-")[0])}`],arrow:["arrow"]};return Sn(o,xae,e)},Mae=lt(Hw,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(({theme:t,ownerState:e,open:n})=>X({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!e.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},e.arrow&&{[`&[data-popper-placement*="bottom"] .${Zd.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Zd.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Zd.arrow}`]:X({},e.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Zd.arrow}`]:X({},e.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Eae=lt("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${gt(n.placement.split("-")[0])}`]]}})(({theme:t,ownerState:e})=>X({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:qn(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},e.arrow&&{position:"relative",margin:0},e.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${Sae(16/14)}em`,fontWeight:t.typography.fontWeightRegular},{[`.${Zd.popper}[data-popper-placement*="left"] &`]:X({transformOrigin:"right center"},e.isRtl?X({marginLeft:"14px"},e.touch&&{marginLeft:"24px"}):X({marginRight:"14px"},e.touch&&{marginRight:"24px"})),[`.${Zd.popper}[data-popper-placement*="right"] &`]:X({transformOrigin:"left center"},e.isRtl?X({marginRight:"14px"},e.touch&&{marginRight:"24px"}):X({marginLeft:"14px"},e.touch&&{marginLeft:"24px"})),[`.${Zd.popper}[data-popper-placement*="top"] &`]:X({transformOrigin:"center bottom",marginBottom:"14px"},e.touch&&{marginBottom:"24px"}),[`.${Zd.popper}[data-popper-placement*="bottom"] &`]:X({transformOrigin:"center top",marginTop:"14px"},e.touch&&{marginTop:"24px"})})),Cae=lt("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:qn(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let tb=!1;const Ek=new Jy;let R1={x:0,y:0};function nb(t,e){return(n,...r)=>{e&&e(n,...r),t(n,...r)}}const Tae=D.forwardRef(function(e,n){var r,i,s,o,a,l,c,f,p,g,v,x,_,b,y,S,w,T,L;const R=En({props:e,name:"MuiTooltip"}),{arrow:P=!1,children:F,components:O={},componentsProps:I={},describeChild:H=!1,disableFocusListener:Q=!1,disableHoverListener:q=!1,disableInteractive:le=!1,disableTouchListener:ie=!1,enterDelay:ee=100,enterNextDelay:ue=0,enterTouchDelay:z=700,followCursor:te=!1,id:oe,leaveDelay:de=0,leaveTouchDelay:Ce=1500,onClose:Le,onOpen:V,open:me,placement:pe="bottom",PopperComponent:Se,PopperProps:je={},slotProps:it={},slots:xe={},title:et,TransitionComponent:Re=NT,TransitionProps:Oe}=R,Te=Rt(R,bae),ze=D.isValidElement(F)?F:C.jsx("span",{children:F}),ke=Bu(),rt=ex(),[tt,ae]=D.useState(),[G,be]=D.useState(null),$e=D.useRef(!1),Ze=le||te,We=Ah(),Mt=Ah(),pt=Ah(),at=Ah(),[Ie,ge]=Cu({controlled:me,default:!1,name:"Tooltip",state:"open"});let Xe=Ie;const St=hg(oe),mt=D.useRef(),Be=ts(()=>{mt.current!==void 0&&(document.body.style.WebkitUserSelect=mt.current,mt.current=void 0),at.clear()});D.useEffect(()=>Be,[Be]);const vt=Qe=>{Ek.clear(),tb=!0,ge(!0),V&&!Xe&&V(Qe)},qe=ts(Qe=>{Ek.start(800+de,()=>{tb=!1}),ge(!1),Le&&Xe&&Le(Qe),We.start(ke.transitions.duration.shortest,()=>{$e.current=!1})}),ce=Qe=>{$e.current&&Qe.type!=="touchstart"||(tt&&tt.removeAttribute("title"),Mt.clear(),pt.clear(),ee||tb&&ue?Mt.start(tb?ue:ee,()=>{vt(Qe)}):vt(Qe))},Ne=Qe=>{Mt.clear(),pt.start(de,()=>{qe(Qe)})},{isFocusVisibleRef:fe,onBlur:Fe,onFocus:He,ref:ut}=Tw(),[,xt]=D.useState(!1),Xt=Qe=>{Fe(Qe),fe.current===!1&&(xt(!1),Ne(Qe))},vn=Qe=>{tt||ae(Qe.currentTarget),He(Qe),fe.current===!0&&(xt(!0),ce(Qe))},mn=Qe=>{$e.current=!0;const wt=ze.props;wt.onTouchStart&&wt.onTouchStart(Qe)},On=Qe=>{mn(Qe),pt.clear(),We.clear(),Be(),mt.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",at.start(z,()=>{document.body.style.WebkitUserSelect=mt.current,ce(Qe)})},un=Qe=>{ze.props.onTouchEnd&&ze.props.onTouchEnd(Qe),Be(),pt.start(Ce,()=>{qe(Qe)})};D.useEffect(()=>{if(!Xe)return;function Qe(wt){(wt.key==="Escape"||wt.key==="Esc")&&qe(wt)}return document.addEventListener("keydown",Qe),()=>{document.removeEventListener("keydown",Qe)}},[qe,Xe]);const Nn=Kr(ze.ref,ut,ae,n);!et&&et!==0&&(Xe=!1);const In=D.useRef(),or=Qe=>{const wt=ze.props;wt.onMouseMove&&wt.onMouseMove(Qe),R1={x:Qe.clientX,y:Qe.clientY},In.current&&In.current.update()},Kn={},Fr=typeof et=="string";H?(Kn.title=!Xe&&Fr&&!q?et:null,Kn["aria-describedby"]=Xe?St:null):(Kn["aria-label"]=Fr?et:null,Kn["aria-labelledby"]=Xe&&!Fr?St:null);const gr=X({},Kn,Te,ze.props,{className:At(Te.className,ze.props.className),onTouchStart:mn,ref:Nn},te?{onMouseMove:or}:{}),ui={};ie||(gr.onTouchStart=On,gr.onTouchEnd=un),q||(gr.onMouseOver=nb(ce,gr.onMouseOver),gr.onMouseLeave=nb(Ne,gr.onMouseLeave),Ze||(ui.onMouseOver=ce,ui.onMouseLeave=Ne)),Q||(gr.onFocus=nb(vn,gr.onFocus),gr.onBlur=nb(Xt,gr.onBlur),Ze||(ui.onFocus=vn,ui.onBlur=Xt));const ss=D.useMemo(()=>{var Qe;let wt=[{name:"arrow",enabled:!!G,options:{element:G,padding:4}}];return(Qe=je.popperOptions)!=null&&Qe.modifiers&&(wt=wt.concat(je.popperOptions.modifiers)),X({},je.popperOptions,{modifiers:wt})},[G,je]),Rr=X({},R,{isRtl:rt,arrow:P,disableInteractive:Ze,placement:pe,PopperComponentProp:Se,touch:$e.current}),ji=wae(Rr),Ei=(r=(i=xe.popper)!=null?i:O.Popper)!=null?r:Mae,di=(s=(o=(a=xe.transition)!=null?a:O.Transition)!=null?o:Re)!=null?s:NT,Gi=(l=(c=xe.tooltip)!=null?c:O.Tooltip)!=null?l:Eae,B=(f=(p=xe.arrow)!=null?p:O.Arrow)!=null?f:Cae,ne=tv(Ei,X({},je,(g=it.popper)!=null?g:I.popper,{className:At(ji.popper,je==null?void 0:je.className,(v=(x=it.popper)!=null?x:I.popper)==null?void 0:v.className)}),Rr),_e=tv(di,X({},Oe,(_=it.transition)!=null?_:I.transition),Rr),ye=tv(Gi,X({},(b=it.tooltip)!=null?b:I.tooltip,{className:At(ji.tooltip,(y=(S=it.tooltip)!=null?S:I.tooltip)==null?void 0:y.className)}),Rr),we=tv(B,X({},(w=it.arrow)!=null?w:I.arrow,{className:At(ji.arrow,(T=(L=it.arrow)!=null?L:I.arrow)==null?void 0:T.className)}),Rr);return C.jsxs(D.Fragment,{children:[D.cloneElement(ze,gr),C.jsx(Ei,X({as:Se??Hw,placement:pe,anchorEl:te?{getBoundingClientRect:()=>({top:R1.y,left:R1.x,right:R1.x,bottom:R1.y,width:0,height:0})}:tt,popperRef:In,open:tt?Xe:!1,id:St,transition:!0},ui,ne,{popperOptions:ss,children:({TransitionProps:Qe})=>C.jsx(di,X({timeout:ke.transitions.duration.shorter},Qe,_e,{children:C.jsxs(Gi,X({},ye,{children:[et,P?C.jsx(B,X({},we,{ref:be})):null]}))}))}))]})}),Au=Tae;function Aae(t){return bn("MuiSwitch",t)}const ao=pn("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Rae=["className","color","edge","size","sx"],Pae=cR(),Iae=t=>{const{classes:e,edge:n,size:r,color:i,checked:s,disabled:o}=t,a={root:["root",n&&`edge${gt(n)}`,`size${gt(r)}`],switchBase:["switchBase",`color${gt(i)}`,s&&"checked",o&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=Sn(a,Aae,e);return X({},e,l)},Lae=lt("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.edge&&e[`edge${gt(n.edge)}`],e[`size${gt(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${ao.thumb}`]:{width:16,height:16},[`& .${ao.switchBase}`]:{padding:4,[`&.${ao.checked}`]:{transform:"translateX(16px)"}}}}]}),kae=lt(Are,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.switchBase,{[`& .${ao.input}`]:e.input},n.color!=="default"&&e[`color${gt(n.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${ao.checked}`]:{transform:"translateX(20px)"},[`&.${ao.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${ao.checked} + .${ao.track}`]:{opacity:.5},[`&.${ao.disabled} + .${ao.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${ao.input}`]:{left:"-100%",width:"300%"}}),({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:qn(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(([,e])=>e.main&&e.light).map(([e])=>({props:{color:e},style:{[`&.${ao.checked}`]:{color:(t.vars||t).palette[e].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[e].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:qn(t.palette[e].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ao.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${e}DisabledColor`]:`${t.palette.mode==="light"?qv(t.palette[e].main,.62):Xv(t.palette[e].main,.55)}`}},[`&.${ao.checked} + .${ao.track}`]:{backgroundColor:(t.vars||t).palette[e].main}}}))]})),Oae=lt("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,e)=>e.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),Nae=lt("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,e)=>e.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Dae=D.forwardRef(function(e,n){const r=Pae({props:e,name:"MuiSwitch"}),{className:i,color:s="primary",edge:o=!1,size:a="medium",sx:l}=r,c=Rt(r,Rae),f=X({},r,{color:s,edge:o,size:a}),p=Iae(f),g=C.jsx(Nae,{className:p.thumb,ownerState:f});return C.jsxs(Lae,{className:At(p.root,i),sx:l,ownerState:f,children:[C.jsx(kae,X({type:"checkbox",icon:g,checkedIcon:g,ref:n,ownerState:f},c,{classes:X({},p,{root:p.switchBase})})),C.jsx(Oae,{className:p.track,ownerState:f})]})}),kl=Dae;function Fae(t){return bn("MuiTab",t)}const Uae=pn("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),eh=Uae,zae=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Bae=t=>{const{classes:e,textColor:n,fullWidth:r,wrapped:i,icon:s,label:o,selected:a,disabled:l}=t,c={root:["root",s&&o&&"labelIcon",`textColor${gt(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Sn(c,Fae,e)},Hae=lt(Nu,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.label&&n.icon&&e.labelIcon,e[`textColor${gt(n.textColor)}`],n.fullWidth&&e.fullWidth,n.wrapped&&e.wrapped]}})(({theme:t,ownerState:e})=>X({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${eh.iconWrapper}`]:X({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${eh.selected}`]:{opacity:1},[`&.${eh.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${eh.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${eh.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${eh.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${eh.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),$ae=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiTab"}),{className:i,disabled:s=!1,disableFocusRipple:o=!1,fullWidth:a,icon:l,iconPosition:c="top",indicator:f,label:p,onChange:g,onClick:v,onFocus:x,selected:_,selectionFollowsFocus:b,textColor:y="inherit",value:S,wrapped:w=!1}=r,T=Rt(r,zae),L=X({},r,{disabled:s,disableFocusRipple:o,selected:_,icon:!!l,iconPosition:c,label:!!p,fullWidth:a,textColor:y,wrapped:w}),R=Bae(L),P=l&&p&&D.isValidElement(l)?D.cloneElement(l,{className:At(R.iconWrapper,l.props.className)}):l,F=I=>{!_&&g&&g(I,S),v&&v(I)},O=I=>{b&&!_&&g&&g(I,S),x&&x(I)};return C.jsxs(Hae,X({focusRipple:!o,className:At(R.root,i),ref:n,role:"tab","aria-selected":_,disabled:s,onClick:F,onFocus:O,ownerState:L,tabIndex:_?0:-1},T,{children:[c==="top"||c==="start"?C.jsxs(D.Fragment,{children:[P,p]}):C.jsxs(D.Fragment,{children:[p,P]}),f]}))}),YE=$ae,Vae=D.createContext(),q7=Vae;function Wae(t){return bn("MuiTable",t)}pn("MuiTable",["root","stickyHeader"]);const jae=["className","component","padding","size","stickyHeader"],Gae=t=>{const{classes:e,stickyHeader:n}=t;return Sn({root:["root",n&&"stickyHeader"]},Wae,e)},Xae=lt("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>X({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":X({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},e.stickyHeader&&{borderCollapse:"separate"})),Ck="table",qae=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiTable"}),{className:i,component:s=Ck,padding:o="normal",size:a="medium",stickyHeader:l=!1}=r,c=Rt(r,jae),f=X({},r,{component:s,padding:o,size:a,stickyHeader:l}),p=Gae(f),g=D.useMemo(()=>({padding:o,size:a,stickyHeader:l}),[o,a,l]);return C.jsx(q7.Provider,{value:g,children:C.jsx(Xae,X({as:s,role:s===Ck?null:"table",ref:n,className:At(p.root,i),ownerState:f},c))})}),Zae=qae,Yae=D.createContext(),LR=Yae;function Kae(t){return bn("MuiTableBody",t)}pn("MuiTableBody",["root"]);const Qae=["className","component"],Jae=t=>{const{classes:e}=t;return Sn({root:["root"]},Kae,e)},ele=lt("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-row-group"}),tle={variant:"body"},Tk="tbody",nle=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiTableBody"}),{className:i,component:s=Tk}=r,o=Rt(r,Qae),a=X({},r,{component:s}),l=Jae(a);return C.jsx(LR.Provider,{value:tle,children:C.jsx(ele,X({className:At(l.root,i),as:s,ref:n,role:s===Tk?null:"rowgroup",ownerState:a},o))})}),rle=nle;function ile(t){return bn("MuiTableCell",t)}const sle=pn("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),ole=sle,ale=["align","className","component","padding","scope","size","sortDirection","variant"],lle=t=>{const{classes:e,variant:n,align:r,padding:i,size:s,stickyHeader:o}=t,a={root:["root",n,o&&"stickyHeader",r!=="inherit"&&`align${gt(r)}`,i!=="normal"&&`padding${gt(i)}`,`size${gt(s)}`]};return Sn(a,ile,e)},cle=lt("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`size${gt(n.size)}`],n.padding!=="normal"&&e[`padding${gt(n.padding)}`],n.align!=="inherit"&&e[`align${gt(n.align)}`],n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>X({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid + ${t.palette.mode==="light"?qv(qn(t.palette.divider,1),.88):Xv(qn(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},e.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},e.variant==="body"&&{color:(t.vars||t).palette.text.primary},e.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},e.size==="small"&&{padding:"6px 16px",[`&.${ole.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},e.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},e.padding==="none"&&{padding:0},e.align==="left"&&{textAlign:"left"},e.align==="center"&&{textAlign:"center"},e.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},e.align==="justify"&&{textAlign:"justify"},e.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),ule=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiTableCell"}),{align:i="inherit",className:s,component:o,padding:a,scope:l,size:c,sortDirection:f,variant:p}=r,g=Rt(r,ale),v=D.useContext(q7),x=D.useContext(LR),_=x&&x.variant==="head";let b;o?b=o:b=_?"th":"td";let y=l;b==="td"?y=void 0:!y&&_&&(y="col");const S=p||x&&x.variant,w=X({},r,{align:i,component:b,padding:a||(v&&v.padding?v.padding:"normal"),size:c||(v&&v.size?v.size:"medium"),sortDirection:f,stickyHeader:S==="head"&&v&&v.stickyHeader,variant:S}),T=lle(w);let L=null;return f&&(L=f==="asc"?"ascending":"descending"),C.jsx(cle,X({as:b,ref:n,className:At(T.root,s),"aria-sort":L,scope:y,ownerState:w},g))}),dle=ule,fle=bt(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),hle=bt(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function ple(t){return bn("MuiTableRow",t)}const mle=pn("MuiTableRow",["root","selected","hover","head","footer"]),Ak=mle,gle=["className","component","hover","selected"],vle=t=>{const{classes:e,selected:n,hover:r,head:i,footer:s}=t;return Sn({root:["root",n&&"selected",r&&"hover",i&&"head",s&&"footer"]},ple,e)},yle=lt("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.head&&e.head,n.footer&&e.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${Ak.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${Ak.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:qn(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:qn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),Rk="tr",xle=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiTableRow"}),{className:i,component:s=Rk,hover:o=!1,selected:a=!1}=r,l=Rt(r,gle),c=D.useContext(LR),f=X({},r,{component:s,hover:o,selected:a,head:c&&c.variant==="head",footer:c&&c.variant==="footer"}),p=vle(f);return C.jsx(yle,X({as:s,ref:n,className:At(p.root,i),role:s===Rk?null:"row",ownerState:f},l))}),_le=xle;function ble(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function Sle(t,e,n,r={},i=()=>{}){const{ease:s=ble,duration:o=300}=r;let a=null;const l=e[t];let c=!1;const f=()=>{c=!0},p=g=>{if(c){i(new Error("Animation cancelled"));return}a===null&&(a=g);const v=Math.min(1,(g-a)/o);if(e[t]=s(v)*(n-l)+l,v>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(p)};return l===n?(i(new Error("Element already at target position")),f):(requestAnimationFrame(p),f)}const wle=["onChange"],Mle={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Ele(t){const{onChange:e}=t,n=Rt(t,wle),r=D.useRef(),i=D.useRef(null),s=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Xo(()=>{const o=Qy(()=>{const l=r.current;s(),l!==r.current&&e(r.current)}),a=Oc(i.current);return a.addEventListener("resize",o),()=>{o.clear(),a.removeEventListener("resize",o)}},[e]),D.useEffect(()=>{s(),e(r.current)},[e]),C.jsx("div",X({style:Mle,ref:i},n))}function Cle(t){return bn("MuiTabScrollButton",t)}const Tle=pn("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Ale=Tle,Rle=["className","slots","slotProps","direction","orientation","disabled"],Ple=t=>{const{classes:e,orientation:n,disabled:r}=t;return Sn({root:["root",n,r&&"disabled"]},Cle,e)},Ile=lt(Nu,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.orientation&&e[n.orientation]]}})(({ownerState:t})=>X({width:40,flexShrink:0,opacity:.8,[`&.${Ale.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Lle=D.forwardRef(function(e,n){var r,i;const s=En({props:e,name:"MuiTabScrollButton"}),{className:o,slots:a={},slotProps:l={},direction:c}=s,f=Rt(s,Rle),p=ex(),g=X({isRtl:p},s),v=Ple(g),x=(r=a.StartScrollButtonIcon)!=null?r:fle,_=(i=a.EndScrollButtonIcon)!=null?i:hle,b=Qi({elementType:x,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g}),y=Qi({elementType:_,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g});return C.jsx(Ile,X({component:"div",className:At(v.root,o),ref:n,role:null,ownerState:g,tabIndex:null},f,{children:c==="left"?C.jsx(x,X({},b)):C.jsx(_,X({},y))}))}),kle=Lle;function Ole(t){return bn("MuiTabs",t)}const Nle=pn("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),KE=Nle,Dle=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Pk=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,Ik=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,rb=(t,e,n)=>{let r=!1,i=n(t,e);for(;i;){if(i===t.firstChild){if(r)return;r=!0}const s=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||s)i=n(t,i);else{i.focus();return}}},Fle=t=>{const{vertical:e,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:s,centered:o,scrollButtonsHideMobile:a,classes:l}=t;return Sn({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",s&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",o&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Ole,l)},Ule=lt("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${KE.scrollButtons}`]:e.scrollButtons},{[`& .${KE.scrollButtons}`]:n.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,n.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>X({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${KE.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),zle=lt("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.scroller,n.fixed&&e.fixed,n.hideScrollbar&&e.hideScrollbar,n.scrollableX&&e.scrollableX,n.scrollableY&&e.scrollableY]}})(({ownerState:t})=>X({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Ble=lt("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.flexContainer,n.vertical&&e.flexContainerVertical,n.centered&&e.centered]}})(({ownerState:t})=>X({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),Hle=lt("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>X({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),$le=lt(Ele)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lk={},Vle=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiTabs"}),i=Bu(),s=ex(),{"aria-label":o,"aria-labelledby":a,action:l,centered:c=!1,children:f,className:p,component:g="div",allowScrollButtonsMobile:v=!1,indicatorColor:x="primary",onChange:_,orientation:b="horizontal",ScrollButtonComponent:y=kle,scrollButtons:S="auto",selectionFollowsFocus:w,slots:T={},slotProps:L={},TabIndicatorProps:R={},TabScrollButtonProps:P={},textColor:F="primary",value:O,variant:I="standard",visibleScrollbar:H=!1}=r,Q=Rt(r,Dle),q=I==="scrollable",le=b==="vertical",ie=le?"scrollTop":"scrollLeft",ee=le?"top":"left",ue=le?"bottom":"right",z=le?"clientHeight":"clientWidth",te=le?"height":"width",oe=X({},r,{component:g,allowScrollButtonsMobile:v,indicatorColor:x,orientation:b,vertical:le,scrollButtons:S,textColor:F,variant:I,visibleScrollbar:H,fixed:!q,hideScrollbar:q&&!H,scrollableX:q&&!le,scrollableY:q&&le,centered:c&&!q,scrollButtonsHideMobile:!v}),de=Fle(oe),Ce=Qi({elementType:T.StartScrollButtonIcon,externalSlotProps:L.startScrollButtonIcon,ownerState:oe}),Le=Qi({elementType:T.EndScrollButtonIcon,externalSlotProps:L.endScrollButtonIcon,ownerState:oe}),[V,me]=D.useState(!1),[pe,Se]=D.useState(Lk),[je,it]=D.useState(!1),[xe,et]=D.useState(!1),[Re,Oe]=D.useState(!1),[Te,ze]=D.useState({overflow:"hidden",scrollbarWidth:0}),ke=new Map,rt=D.useRef(null),tt=D.useRef(null),ae=()=>{const qe=rt.current;let ce;if(qe){const fe=qe.getBoundingClientRect();ce={clientWidth:qe.clientWidth,scrollLeft:qe.scrollLeft,scrollTop:qe.scrollTop,scrollLeftNormalized:vK(qe,s?"rtl":"ltr"),scrollWidth:qe.scrollWidth,top:fe.top,bottom:fe.bottom,left:fe.left,right:fe.right}}let Ne;if(qe&&O!==!1){const fe=tt.current.children;if(fe.length>0){const Fe=fe[ke.get(O)];Ne=Fe?Fe.getBoundingClientRect():null}}return{tabsMeta:ce,tabMeta:Ne}},G=ts(()=>{const{tabsMeta:qe,tabMeta:ce}=ae();let Ne=0,fe;if(le)fe="top",ce&&qe&&(Ne=ce.top-qe.top+qe.scrollTop);else if(fe=s?"right":"left",ce&&qe){const He=s?qe.scrollLeftNormalized+qe.clientWidth-qe.scrollWidth:qe.scrollLeft;Ne=(s?-1:1)*(ce[fe]-qe[fe]+He)}const Fe={[fe]:Ne,[te]:ce?ce[te]:0};if(isNaN(pe[fe])||isNaN(pe[te]))Se(Fe);else{const He=Math.abs(pe[fe]-Fe[fe]),ut=Math.abs(pe[te]-Fe[te]);(He>=1||ut>=1)&&Se(Fe)}}),be=(qe,{animation:ce=!0}={})=>{ce?Sle(ie,rt.current,qe,{duration:i.transitions.duration.standard}):rt.current[ie]=qe},$e=qe=>{let ce=rt.current[ie];le?ce+=qe:(ce+=qe*(s?-1:1),ce*=s&&$8()==="reverse"?-1:1),be(ce)},Ze=()=>{const qe=rt.current[z];let ce=0;const Ne=Array.from(tt.current.children);for(let fe=0;feqe){fe===0&&(ce=qe);break}ce+=Fe[z]}return ce},We=()=>{$e(-1*Ze())},Mt=()=>{$e(Ze())},pt=D.useCallback(qe=>{ze({overflow:null,scrollbarWidth:qe})},[]),at=()=>{const qe={};qe.scrollbarSizeListener=q?C.jsx($le,{onChange:pt,className:At(de.scrollableX,de.hideScrollbar)}):null;const Ne=q&&(S==="auto"&&(je||xe)||S===!0);return qe.scrollButtonStart=Ne?C.jsx(y,X({slots:{StartScrollButtonIcon:T.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Ce},orientation:b,direction:s?"right":"left",onClick:We,disabled:!je},P,{className:At(de.scrollButtons,P.className)})):null,qe.scrollButtonEnd=Ne?C.jsx(y,X({slots:{EndScrollButtonIcon:T.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Le},orientation:b,direction:s?"left":"right",onClick:Mt,disabled:!xe},P,{className:At(de.scrollButtons,P.className)})):null,qe},Ie=ts(qe=>{const{tabsMeta:ce,tabMeta:Ne}=ae();if(!(!Ne||!ce)){if(Ne[ee]ce[ue]){const fe=ce[ie]+(Ne[ue]-ce[ue]);be(fe,{animation:qe})}}}),ge=ts(()=>{q&&S!==!1&&Oe(!Re)});D.useEffect(()=>{const qe=Qy(()=>{rt.current&&G()});let ce;const Ne=He=>{He.forEach(ut=>{ut.removedNodes.forEach(xt=>{var Xt;(Xt=ce)==null||Xt.unobserve(xt)}),ut.addedNodes.forEach(xt=>{var Xt;(Xt=ce)==null||Xt.observe(xt)})}),qe(),ge()},fe=Oc(rt.current);fe.addEventListener("resize",qe);let Fe;return typeof ResizeObserver<"u"&&(ce=new ResizeObserver(qe),Array.from(tt.current.children).forEach(He=>{ce.observe(He)})),typeof MutationObserver<"u"&&(Fe=new MutationObserver(Ne),Fe.observe(tt.current,{childList:!0})),()=>{var He,ut;qe.clear(),fe.removeEventListener("resize",qe),(He=Fe)==null||He.disconnect(),(ut=ce)==null||ut.disconnect()}},[G,ge]),D.useEffect(()=>{const qe=Array.from(tt.current.children),ce=qe.length;if(typeof IntersectionObserver<"u"&&ce>0&&q&&S!==!1){const Ne=qe[0],fe=qe[ce-1],Fe={root:rt.current,threshold:.99},He=vn=>{it(!vn[0].isIntersecting)},ut=new IntersectionObserver(He,Fe);ut.observe(Ne);const xt=vn=>{et(!vn[0].isIntersecting)},Xt=new IntersectionObserver(xt,Fe);return Xt.observe(fe),()=>{ut.disconnect(),Xt.disconnect()}}},[q,S,Re,f==null?void 0:f.length]),D.useEffect(()=>{me(!0)},[]),D.useEffect(()=>{G()}),D.useEffect(()=>{Ie(Lk!==pe)},[Ie,pe]),D.useImperativeHandle(l,()=>({updateIndicator:G,updateScrollButtons:ge}),[G,ge]);const Xe=C.jsx(Hle,X({},R,{className:At(de.indicator,R.className),ownerState:oe,style:X({},pe,R.style)}));let St=0;const mt=D.Children.map(f,qe=>{if(!D.isValidElement(qe))return null;const ce=qe.props.value===void 0?St:qe.props.value;ke.set(ce,St);const Ne=ce===O;return St+=1,D.cloneElement(qe,X({fullWidth:I==="fullWidth",indicator:Ne&&!V&&Xe,selected:Ne,selectionFollowsFocus:w,onChange:_,textColor:F,value:ce},St===1&&O===!1&&!qe.props.tabIndex?{tabIndex:0}:{}))}),Be=qe=>{const ce=tt.current,Ne=Oi(ce).activeElement;if(Ne.getAttribute("role")!=="tab")return;let Fe=b==="horizontal"?"ArrowLeft":"ArrowUp",He=b==="horizontal"?"ArrowRight":"ArrowDown";switch(b==="horizontal"&&s&&(Fe="ArrowRight",He="ArrowLeft"),qe.key){case Fe:qe.preventDefault(),rb(ce,Ne,Ik);break;case He:qe.preventDefault(),rb(ce,Ne,Pk);break;case"Home":qe.preventDefault(),rb(ce,null,Pk);break;case"End":qe.preventDefault(),rb(ce,null,Ik);break}},vt=at();return C.jsxs(Ule,X({className:At(de.root,p),ownerState:oe,ref:n,as:g},Q,{children:[vt.scrollButtonStart,vt.scrollbarSizeListener,C.jsxs(zle,{className:de.scroller,ownerState:oe,style:{overflow:Te.overflow,[le?`margin${s?"Left":"Right"}`:"marginBottom"]:H?void 0:-Te.scrollbarWidth},ref:rt,children:[C.jsx(Ble,{"aria-label":o,"aria-labelledby":a,"aria-orientation":b==="vertical"?"vertical":null,className:de.flexContainer,ownerState:oe,onKeyDown:Be,ref:tt,role:"tablist",children:mt}),V&&Xe]}),vt.scrollButtonEnd]}))}),Wle=Vle;function jle(t){return bn("MuiTextField",t)}pn("MuiTextField",["root"]);const Gle=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Xle={standard:qw,filled:D7,outlined:RR},qle=t=>{const{classes:e}=t;return Sn({root:["root"]},jle,e)},Zle=lt(Xw,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Yle=D.forwardRef(function(e,n){const r=En({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:s=!1,children:o,className:a,color:l="primary",defaultValue:c,disabled:f=!1,error:p=!1,FormHelperTextProps:g,fullWidth:v=!1,helperText:x,id:_,InputLabelProps:b,inputProps:y,InputProps:S,inputRef:w,label:T,maxRows:L,minRows:R,multiline:P=!1,name:F,onBlur:O,onChange:I,onFocus:H,placeholder:Q,required:q=!1,rows:le,select:ie=!1,SelectProps:ee,type:ue,value:z,variant:te="outlined"}=r,oe=Rt(r,Gle),de=X({},r,{autoFocus:s,color:l,disabled:f,error:p,fullWidth:v,multiline:P,required:q,select:ie,variant:te}),Ce=qle(de),Le={};te==="outlined"&&(b&&typeof b.shrink<"u"&&(Le.notched=b.shrink),Le.label=T),ie&&((!ee||!ee.native)&&(Le.id=void 0),Le["aria-describedby"]=void 0);const V=hg(_),me=x&&V?`${V}-helper-text`:void 0,pe=T&&V?`${V}-label`:void 0,Se=Xle[te],je=C.jsx(Se,X({"aria-describedby":me,autoComplete:i,autoFocus:s,defaultValue:c,fullWidth:v,multiline:P,name:F,rows:le,maxRows:L,minRows:R,type:ue,value:z,id:V,inputRef:w,onBlur:O,onChange:I,onFocus:H,placeholder:Q,inputProps:y},Le,S));return C.jsxs(Zle,X({className:At(Ce.root,a),disabled:f,error:p,fullWidth:v,ref:n,required:q,color:l,variant:te,ownerState:de},oe,{children:[T!=null&&T!==""&&C.jsx(mse,X({htmlFor:V,id:pe},b,{children:T})),ie?C.jsx(X7,X({"aria-describedby":me,id:V,labelId:pe,value:z,input:je},ee,{children:o})):je,x&&C.jsx(Oie,X({id:me},g,{children:x}))]}))}),yg=Yle,Kle=bt(C.jsx("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z"}),"BugReport"),Qle=bt(C.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),Jle=bt(C.jsx("path",{d:"m13.7826 15.1719 2.1213-2.1213 5.9963 5.9962-2.1213 2.1213zM17.5 10c1.93 0 3.5-1.57 3.5-3.5 0-.58-.16-1.12-.41-1.6l-2.7 2.7-1.49-1.49 2.7-2.7c-.48-.25-1.02-.41-1.6-.41C15.57 3 14 4.57 14 6.5c0 .41.08.8.21 1.16l-1.85 1.85-1.78-1.78.71-.71-1.41-1.41L12 3.49c-1.17-1.17-3.07-1.17-4.24 0L4.22 7.03l1.41 1.41H2.81l-.71.71 3.54 3.54.71-.71V9.15l1.41 1.41.71-.71 1.78 1.78-7.41 7.41 2.12 2.12L16.34 9.79c.36.13.75.21 1.16.21"}),"Construction"),ece=bt(C.jsx("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 12h-2v-2h2zm0-4h-2V6h2z"}),"Feedback"),tce=bt([C.jsx("path",{d:"M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1m0 13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5z"},"0"),C.jsx("path",{d:"M17.5 10.5c.88 0 1.73.09 2.5.26V9.24c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99M13 12.49v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26V11.9c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.3-4.5.83m4.5 1.84c-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26v-1.52c-.79-.16-1.64-.24-2.5-.24"},"1")],"MenuBook"),nce=bt(C.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h3l-1 1v2h12v-2l-1-1h3c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 13H4V5h16z"}),"Monitor"),rce=bt(C.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark"),ice=bt(C.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),sce=bt(C.jsx("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"Storage"),oce=bt(C.jsx("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"}),"Tune");function Z7(t,e){return function(){return t.apply(e,arguments)}}const{toString:ace}=Object.prototype,{getPrototypeOf:kR}=Object,Zw=(t=>e=>{const n=ace.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zc=t=>(t=t.toLowerCase(),e=>Zw(e)===t),Yw=t=>e=>typeof e===t,{isArray:xg}=Array,ny=Yw("undefined");function lce(t){return t!==null&&!ny(t)&&t.constructor!==null&&!ny(t.constructor)&&al(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Y7=zc("ArrayBuffer");function cce(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Y7(t.buffer),e}const uce=Yw("string"),al=Yw("function"),K7=Yw("number"),Kw=t=>t!==null&&typeof t=="object",dce=t=>t===!0||t===!1,CS=t=>{if(Zw(t)!=="object")return!1;const e=kR(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},fce=zc("Date"),hce=zc("File"),pce=zc("Blob"),mce=zc("FileList"),gce=t=>Kw(t)&&al(t.pipe),vce=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||al(t.append)&&((e=Zw(t))==="formdata"||e==="object"&&al(t.toString)&&t.toString()==="[object FormData]"))},yce=zc("URLSearchParams"),xce=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sx(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),xg(t))for(r=0,i=t.length;r0;)if(i=n[r],e===i.toLowerCase())return i;return null}const J7=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,e9=t=>!ny(t)&&t!==J7;function DT(){const{caseless:t}=e9(this)&&this||{},e={},n=(r,i)=>{const s=t&&Q7(e,i)||i;CS(e[s])&&CS(r)?e[s]=DT(e[s],r):CS(r)?e[s]=DT({},r):xg(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r(sx(e,(i,s)=>{n&&al(i)?t[s]=Z7(i,n):t[s]=i},{allOwnKeys:r}),t),bce=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Sce=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},wce=(t,e,n,r)=>{let i,s,o;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&kR(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Mce=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Ece=t=>{if(!t)return null;if(xg(t))return t;let e=t.length;if(!K7(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Cce=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&kR(Uint8Array)),Tce=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},Ace=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Rce=zc("HTMLFormElement"),Pce=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),kk=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Ice=zc("RegExp"),t9=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};sx(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},Lce=t=>{t9(t,(e,n)=>{if(al(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(al(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},kce=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return xg(t)?r(t):r(String(t).split(e)),n},Oce=()=>{},Nce=(t,e)=>(t=+t,Number.isFinite(t)?t:e),QE="abcdefghijklmnopqrstuvwxyz",Ok="0123456789",n9={DIGIT:Ok,ALPHA:QE,ALPHA_DIGIT:QE+QE.toUpperCase()+Ok},Dce=(t=16,e=n9.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Fce(t){return!!(t&&al(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Uce=t=>{const e=new Array(10),n=(r,i)=>{if(Kw(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const s=xg(r)?[]:{};return sx(r,(o,a)=>{const l=n(o,i+1);!ny(l)&&(s[a]=l)}),e[i]=void 0,s}}return r};return n(t,0)},zce=zc("AsyncFunction"),Bce=t=>t&&(Kw(t)||al(t))&&al(t.then)&&al(t.catch),ht={isArray:xg,isArrayBuffer:Y7,isBuffer:lce,isFormData:vce,isArrayBufferView:cce,isString:uce,isNumber:K7,isBoolean:dce,isObject:Kw,isPlainObject:CS,isUndefined:ny,isDate:fce,isFile:hce,isBlob:pce,isRegExp:Ice,isFunction:al,isStream:gce,isURLSearchParams:yce,isTypedArray:Cce,isFileList:mce,forEach:sx,merge:DT,extend:_ce,trim:xce,stripBOM:bce,inherits:Sce,toFlatObject:wce,kindOf:Zw,kindOfTest:zc,endsWith:Mce,toArray:Ece,forEachEntry:Tce,matchAll:Ace,isHTMLForm:Rce,hasOwnProperty:kk,hasOwnProp:kk,reduceDescriptors:t9,freezeMethods:Lce,toObjectSet:kce,toCamelCase:Pce,noop:Oce,toFiniteNumber:Nce,findKey:Q7,global:J7,isContextDefined:e9,ALPHABET:n9,generateString:Dce,isSpecCompliantForm:Fce,toJSONObject:Uce,isAsyncFn:zce,isThenable:Bce};function ar(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}ht.inherits(ar,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ht.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const r9=ar.prototype,i9={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{i9[t]={value:t}});Object.defineProperties(ar,i9);Object.defineProperty(r9,"isAxiosError",{value:!0});ar.from=(t,e,n,r,i,s)=>{const o=Object.create(r9);return ht.toFlatObject(t,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ar.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const Hce=null;function FT(t){return ht.isPlainObject(t)||ht.isArray(t)}function s9(t){return ht.endsWith(t,"[]")?t.slice(0,-2):t}function Nk(t,e,n){return t?t.concat(e).map(function(i,s){return i=s9(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function $ce(t){return ht.isArray(t)&&!t.some(FT)}const Vce=ht.toFlatObject(ht,{},null,function(e){return/^is[A-Z]/.test(e)});function Qw(t,e,n){if(!ht.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=ht.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,b){return!ht.isUndefined(b[_])});const r=n.metaTokens,i=n.visitor||f,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&ht.isSpecCompliantForm(e);if(!ht.isFunction(i))throw new TypeError("visitor must be a function");function c(x){if(x===null)return"";if(ht.isDate(x))return x.toISOString();if(!l&&ht.isBlob(x))throw new ar("Blob is not supported. Use a Buffer instead.");return ht.isArrayBuffer(x)||ht.isTypedArray(x)?l&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function f(x,_,b){let y=x;if(x&&!b&&typeof x=="object"){if(ht.endsWith(_,"{}"))_=r?_:_.slice(0,-2),x=JSON.stringify(x);else if(ht.isArray(x)&&$ce(x)||(ht.isFileList(x)||ht.endsWith(_,"[]"))&&(y=ht.toArray(x)))return _=s9(_),y.forEach(function(w,T){!(ht.isUndefined(w)||w===null)&&e.append(o===!0?Nk([_],T,s):o===null?_:_+"[]",c(w))}),!1}return FT(x)?!0:(e.append(Nk(b,_,s),c(x)),!1)}const p=[],g=Object.assign(Vce,{defaultVisitor:f,convertValue:c,isVisitable:FT});function v(x,_){if(!ht.isUndefined(x)){if(p.indexOf(x)!==-1)throw Error("Circular reference detected in "+_.join("."));p.push(x),ht.forEach(x,function(y,S){(!(ht.isUndefined(y)||y===null)&&i.call(e,y,ht.isString(S)?S.trim():S,_,g))===!0&&v(y,_?_.concat(S):[S])}),p.pop()}}if(!ht.isObject(t))throw new TypeError("data must be an object");return v(t),e}function Dk(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function OR(t,e){this._pairs=[],t&&Qw(t,this,e)}const o9=OR.prototype;o9.append=function(e,n){this._pairs.push([e,n])};o9.toString=function(e){const n=e?function(r){return e.call(this,r,Dk)}:Dk;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Wce(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function a9(t,e,n){if(!e)return t;const r=n&&n.encode||Wce,i=n&&n.serialize;let s;if(i?s=i(e,n):s=ht.isURLSearchParams(e)?e.toString():new OR(e,n).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Fk{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ht.forEach(this.handlers,function(r){r!==null&&e(r)})}}const l9={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},jce=typeof URLSearchParams<"u"?URLSearchParams:OR,Gce=typeof FormData<"u"?FormData:null,Xce=typeof Blob<"u"?Blob:null,qce={isBrowser:!0,classes:{URLSearchParams:jce,FormData:Gce,Blob:Xce},protocols:["http","https","file","blob","url","data"]},c9=typeof window<"u"&&typeof document<"u",Zce=(t=>c9&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),Yce=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Kce=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:c9,hasStandardBrowserEnv:Zce,hasStandardBrowserWebWorkerEnv:Yce},Symbol.toStringTag,{value:"Module"})),Mc={...Kce,...qce};function Qce(t,e){return Qw(t,new Mc.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return Mc.isNode&&ht.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Jce(t){return ht.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function eue(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r=n.length;return o=!o&&ht.isArray(i)?i.length:o,l?(ht.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!ht.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],s)&&ht.isArray(i[o])&&(i[o]=eue(i[o])),!a)}if(ht.isFormData(t)&&ht.isFunction(t.entries)){const n={};return ht.forEachEntry(t,(r,i)=>{e(Jce(r),i,n,0)}),n}return null}function tue(t,e,n){if(ht.isString(t))try{return(e||JSON.parse)(t),ht.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const NR={transitional:l9,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=ht.isObject(e);if(s&&ht.isHTMLForm(e)&&(e=new FormData(e)),ht.isFormData(e))return i?JSON.stringify(u9(e)):e;if(ht.isArrayBuffer(e)||ht.isBuffer(e)||ht.isStream(e)||ht.isFile(e)||ht.isBlob(e))return e;if(ht.isArrayBufferView(e))return e.buffer;if(ht.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Qce(e,this.formSerializer).toString();if((a=ht.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Qw(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),tue(e)):e}],transformResponse:[function(e){const n=this.transitional||NR.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&ht.isString(e)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?ar.from(a,ar.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mc.classes.FormData,Blob:Mc.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ht.forEach(["delete","get","head","post","put","patch"],t=>{NR.headers[t]={}});const DR=NR,nue=ht.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),rue=t=>{const e={};let n,r,i;return t&&t.split(` +`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||e[n]&&nue[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Uk=Symbol("internals");function P1(t){return t&&String(t).trim().toLowerCase()}function TS(t){return t===!1||t==null?t:ht.isArray(t)?t.map(TS):String(t)}function iue(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const sue=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function JE(t,e,n,r,i){if(ht.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!ht.isString(e)){if(ht.isString(r))return e.indexOf(r)!==-1;if(ht.isRegExp(r))return r.test(e)}}function oue(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function aue(t,e){const n=ht.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}let Jw=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function s(a,l,c){const f=P1(l);if(!f)throw new Error("header name must be a non-empty string");const p=ht.findKey(i,f);(!p||i[p]===void 0||c===!0||c===void 0&&i[p]!==!1)&&(i[p||l]=TS(a))}const o=(a,l)=>ht.forEach(a,(c,f)=>s(c,f,l));return ht.isPlainObject(e)||e instanceof this.constructor?o(e,n):ht.isString(e)&&(e=e.trim())&&!sue(e)?o(rue(e),n):e!=null&&s(n,e,r),this}get(e,n){if(e=P1(e),e){const r=ht.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return iue(i);if(ht.isFunction(n))return n.call(this,i,r);if(ht.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=P1(e),e){const r=ht.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||JE(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function s(o){if(o=P1(o),o){const a=ht.findKey(r,o);a&&(!n||JE(r,r[a],a,n))&&(delete r[a],i=!0)}}return ht.isArray(e)?e.forEach(s):s(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!e||JE(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const n=this,r={};return ht.forEach(this,(i,s)=>{const o=ht.findKey(r,s);if(o){n[o]=TS(i),delete n[s];return}const a=e?oue(s):String(s).trim();a!==s&&delete n[s],n[a]=TS(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return ht.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&ht.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Uk]=this[Uk]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=P1(o);r[a]||(aue(i,o),r[a]=!0)}return ht.isArray(e)?e.forEach(s):s(e),this}};Jw.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ht.reduceDescriptors(Jw.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});ht.freezeMethods(Jw);const Ru=Jw;function e5(t,e){const n=this||DR,r=e||n,i=Ru.from(r.headers);let s=r.data;return ht.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function d9(t){return!!(t&&t.__CANCEL__)}function ox(t,e,n){ar.call(this,t??"canceled",ar.ERR_CANCELED,e,n),this.name="CanceledError"}ht.inherits(ox,ar,{__CANCEL__:!0});function lue(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new ar("Request failed with status code "+n.status,[ar.ERR_BAD_REQUEST,ar.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const cue=Mc.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];ht.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ht.isString(r)&&o.push("path="+r),ht.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function uue(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function due(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function f9(t,e){return t&&!uue(e)?due(t,e):e}const fue=Mc.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(s){let o=s;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const a=ht.isString(o)?i(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function hue(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function pue(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),f=r[s];o||(o=c),n[i]=l,r[i]=c;let p=s,g=0;for(;p!==i;)g+=n[p++],p=p%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o{const s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-n,l=r(a),c=s<=o;n=s;const f={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&c?(o-s)/l:void 0,event:i};f[e?"download":"upload"]=!0,t(f)}}const mue=typeof XMLHttpRequest<"u",gue=mue&&function(t){return new Promise(function(n,r){let i=t.data;const s=Ru.from(t.headers).normalize();let{responseType:o,withXSRFToken:a}=t,l;function c(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let f;if(ht.isFormData(i)){if(Mc.hasStandardBrowserEnv||Mc.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((f=s.getContentType())!==!1){const[_,...b]=f?f.split(";").map(y=>y.trim()).filter(Boolean):[];s.setContentType([_||"multipart/form-data",...b].join("; "))}}let p=new XMLHttpRequest;if(t.auth){const _=t.auth.username||"",b=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(_+":"+b))}const g=f9(t.baseURL,t.url);p.open(t.method.toUpperCase(),a9(g,t.params,t.paramsSerializer),!0),p.timeout=t.timeout;function v(){if(!p)return;const _=Ru.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),y={data:!o||o==="text"||o==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:_,config:t,request:p};lue(function(w){n(w),c()},function(w){r(w),c()},y),p=null}if("onloadend"in p?p.onloadend=v:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(v)},p.onabort=function(){p&&(r(new ar("Request aborted",ar.ECONNABORTED,t,p)),p=null)},p.onerror=function(){r(new ar("Network Error",ar.ERR_NETWORK,t,p)),p=null},p.ontimeout=function(){let b=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const y=t.transitional||l9;t.timeoutErrorMessage&&(b=t.timeoutErrorMessage),r(new ar(b,y.clarifyTimeoutError?ar.ETIMEDOUT:ar.ECONNABORTED,t,p)),p=null},Mc.hasStandardBrowserEnv&&(a&&ht.isFunction(a)&&(a=a(t)),a||a!==!1&&fue(g))){const _=t.xsrfHeaderName&&t.xsrfCookieName&&cue.read(t.xsrfCookieName);_&&s.set(t.xsrfHeaderName,_)}i===void 0&&s.setContentType(null),"setRequestHeader"in p&&ht.forEach(s.toJSON(),function(b,y){p.setRequestHeader(y,b)}),ht.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),o&&o!=="json"&&(p.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&p.addEventListener("progress",zk(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",zk(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=_=>{p&&(r(!_||_.type?new ox(null,t,p):_),p.abort(),p=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const x=hue(g);if(x&&Mc.protocols.indexOf(x)===-1){r(new ar("Unsupported protocol "+x+":",ar.ERR_BAD_REQUEST,t));return}p.send(i||null)})},UT={http:Hce,xhr:gue};ht.forEach(UT,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Bk=t=>`- ${t}`,vue=t=>ht.isFunction(t)||t===null||t===!1,h9={getAdapter:t=>{t=ht.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since : +`+s.map(Bk).join(` +`):" "+Bk(s[0]):"as no adapter specified";throw new ar("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:UT};function t5(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ox(null,t)}function Hk(t){return t5(t),t.headers=Ru.from(t.headers),t.data=e5.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),h9.getAdapter(t.adapter||DR.adapter)(t).then(function(r){return t5(t),r.data=e5.call(t,t.transformResponse,r),r.headers=Ru.from(r.headers),r},function(r){return d9(r)||(t5(t),r&&r.response&&(r.response.data=e5.call(t,t.transformResponse,r.response),r.response.headers=Ru.from(r.response.headers))),Promise.reject(r)})}const $k=t=>t instanceof Ru?{...t}:t;function Y0(t,e){e=e||{};const n={};function r(c,f,p){return ht.isPlainObject(c)&&ht.isPlainObject(f)?ht.merge.call({caseless:p},c,f):ht.isPlainObject(f)?ht.merge({},f):ht.isArray(f)?f.slice():f}function i(c,f,p){if(ht.isUndefined(f)){if(!ht.isUndefined(c))return r(void 0,c,p)}else return r(c,f,p)}function s(c,f){if(!ht.isUndefined(f))return r(void 0,f)}function o(c,f){if(ht.isUndefined(f)){if(!ht.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function a(c,f,p){if(p in e)return r(c,f);if(p in t)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,f)=>i($k(c),$k(f),!0)};return ht.forEach(Object.keys(Object.assign({},t,e)),function(f){const p=l[f]||i,g=p(t[f],e[f],f);ht.isUndefined(g)&&p!==a||(n[f]=g)}),n}const p9="1.6.8",FR={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{FR[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Vk={};FR.transitional=function(e,n,r){function i(s,o){return"[Axios v"+p9+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(e===!1)throw new ar(i(o," has been removed"+(n?" in "+n:"")),ar.ERR_DEPRECATED);return n&&!Vk[o]&&(Vk[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,a):!0}};function yue(t,e,n){if(typeof t!="object")throw new ar("options must be an object",ar.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const a=t[s],l=a===void 0||o(a,s,t);if(l!==!0)throw new ar("option "+s+" must be "+l,ar.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ar("Unknown option "+s,ar.ERR_BAD_OPTION)}}const zT={assertOptions:yue,validators:FR},wd=zT.validators;let v2=class{constructor(e){this.defaults=e,this.interceptors={request:new Fk,response:new Fk}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+s):r.stack=s}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Y0(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&zT.assertOptions(r,{silentJSONParsing:wd.transitional(wd.boolean),forcedJSONParsing:wd.transitional(wd.boolean),clarifyTimeoutError:wd.transitional(wd.boolean)},!1),i!=null&&(ht.isFunction(i)?n.paramsSerializer={serialize:i}:zT.assertOptions(i,{encode:wd.function,serialize:wd.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&ht.merge(s.common,s[n.method]);s&&ht.forEach(["delete","get","head","post","put","patch","common"],x=>{delete s[x]}),n.headers=Ru.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(l=l&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});const c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let f,p=0,g;if(!l){const x=[Hk.bind(this),void 0];for(x.unshift.apply(x,a),x.push.apply(x,c),g=x.length,f=Promise.resolve(n);p{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(s,o,a){r.reason||(r.reason=new ox(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new m9(function(i){e=i}),cancel:e}}};const _ue=xue;function bue(t){return function(n){return t.apply(null,n)}}function Sue(t){return ht.isObject(t)&&t.isAxiosError===!0}const BT={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(BT).forEach(([t,e])=>{BT[e]=t});const wue=BT;function g9(t){const e=new AS(t),n=Z7(AS.prototype.request,e);return ht.extend(n,AS.prototype,e,{allOwnKeys:!0}),ht.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return g9(Y0(t,i))},n}const Yn=g9(DR);Yn.Axios=AS;Yn.CanceledError=ox;Yn.CancelToken=_ue;Yn.isCancel=d9;Yn.VERSION=p9;Yn.toFormData=Qw;Yn.AxiosError=ar;Yn.Cancel=Yn.CanceledError;Yn.all=function(e){return Promise.all(e)};Yn.spread=bue;Yn.isAxiosError=Sue;Yn.mergeConfig=Y0;Yn.AxiosHeaders=Ru;Yn.formToJSON=t=>u9(ht.isHTMLForm(t)?new FormData(t):t);Yn.getAdapter=h9.getAdapter;Yn.HttpStatusCode=wue;Yn.default=Yn;const{Axios:ube,AxiosError:Mue,CanceledError:dbe,isCancel:fbe,CancelToken:hbe,VERSION:pbe,all:mbe,Cancel:gbe,isAxiosError:vbe,spread:ybe,toFormData:xbe,AxiosHeaders:_be,HttpStatusCode:bbe,formToJSON:Sbe,getAdapter:wbe,mergeConfig:Mbe}=Yn;function v9(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;etypeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||Eue,Tue=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Aue=/\/\*[^]*?\*\/| +/g,Wk=/\n+/g,wh=(t,e)=>{let n="",r="",i="";for(let s in t){let o=t[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?wh(o,s):s+"{"+wh(o,s[1]=="k"?"":e)+"}":typeof o=="object"?r+=wh(o,e?e.replace(/([^,])+/g,a=>s.replace(/(^:.*)|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=wh.p?wh.p(s,o):s+":"+o+";")}return n+(e&&i?e+"{"+i+"}":i)+r},su={},y9=t=>{if(typeof t=="object"){let e="";for(let n in t)e+=n+y9(t[n]);return e}return t},Rue=(t,e,n,r,i)=>{let s=y9(t),o=su[s]||(su[s]=(l=>{let c=0,f=11;for(;c>>0;return"go"+f})(s));if(!su[o]){let l=s!==t?t:(c=>{let f,p,g=[{}];for(;f=Tue.exec(c.replace(Aue,""));)f[4]?g.shift():f[3]?(p=f[3].replace(Wk," ").trim(),g.unshift(g[0][p]=g[0][p]||{})):g[0][f[1]]=f[2].replace(Wk," ").trim();return g[0]})(t);su[o]=wh(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&su.g?su.g:null;return n&&(su.g=su[o]),((l,c,f,p)=>{p?c.data=c.data.replace(p,l):c.data.indexOf(l)===-1&&(c.data=f?l+c.data:c.data+l)})(su[o],e,r,a),o},Pue=(t,e,n)=>t.reduce((r,i,s)=>{let o=e[s];if(o&&o.call){let a=o(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=l?"."+l:a&&typeof a=="object"?a.props?"":wh(a,""):a===!1?"":a}return r+i+(o??"")},"");function UR(t){let e=this||{},n=t.call?t(e.p):t;return Rue(n.unshift?n.raw?Pue(n,[].slice.call(arguments,1),e.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(e.p):i),{}):n,Cue(e.target),e.g,e.o,e.k)}UR.bind({g:1});UR.bind({k:1});function jk(t,e){for(var n=0;n=0)&&(n[i]=t[i]);return n}function Gk(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Xk=function(){return""},b9=Zt.createContext({enqueueSnackbar:Xk,closeSnackbar:Xk}),vh={downXs:"@media (max-width:599.95px)",upSm:"@media (min-width:600px)"},qk=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},zR=function(e){return""+qk(e.vertical)+qk(e.horizontal)},ib=function(e){return!!e||e===0},sb="unmounted",mm="exited",gm="entering",I1="entered",Zk="exiting",BR=function(t){_9(e,t);function e(r){var i;i=t.call(this,r)||this;var s=r.appear,o;return i.appearStatus=null,r.in?s?(o=mm,i.appearStatus=gm):o=I1:r.unmountOnExit||r.mountOnEnter?o=sb:o=mm,i.state={status:o},i.nextCallback=null,i}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===sb?{status:mm}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==gm&&o!==I1&&(s=gm):(o===gm||o===I1)&&(s=Zk)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s=i,o=i;return i!=null&&typeof i!="number"&&typeof i!="string"&&(o=i.exit,s=i.enter),{exit:o,enter:s}},n.updateStatus=function(i,s){i===void 0&&(i=!1),s!==null?(this.cancelNextCallback(),s===gm?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===mm&&this.setState({status:sb})},n.performEnter=function(i){var s=this,o=this.props.enter,a=i,l=this.getTimeouts();if(!i&&!o){this.safeSetState({status:I1},function(){s.props.onEntered&&s.props.onEntered(s.node,a)});return}this.props.onEnter&&this.props.onEnter(this.node,a),this.safeSetState({status:gm},function(){s.props.onEntering&&s.props.onEntering(s.node,a),s.onTransitionEnd(l.enter,function(){s.safeSetState({status:I1},function(){s.props.onEntered&&s.props.onEntered(s.node,a)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts();if(!s){this.safeSetState({status:mm},function(){i.props.onExited&&i.props.onExited(i.node)});return}this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:Zk},function(){i.props.onExiting&&i.props.onExiting(i.node),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:mm},function(){i.props.onExited&&i.props.onExited(i.node)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(){o&&(o=!1,s.nextCallback=null,i())},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=i==null&&!this.props.addEndListener;if(!this.node||o){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===sb)return null;var s=this.props,o=s.children,a=ax(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return o(i,a)},x9(e,[{key:"node",get:function(){var i,s=(i=this.props.nodeRef)===null||i===void 0?void 0:i.current;if(!s)throw new Error("notistack - Custom snackbar is not refForwarding");return s}}]),e}(Zt.Component);function vm(){}BR.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:vm,onEntering:vm,onEntered:vm,onExit:vm,onExiting:vm,onExited:vm};function Yk(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function HT(t,e){return D.useMemo(function(){return t==null&&e==null?null:function(n){Yk(t,n),Yk(e,n)}},[t,e])}function y2(t){var e=t.timeout,n=t.style,r=n===void 0?{}:n,i=t.mode;return{duration:typeof e=="object"?e[i]||0:e,easing:r.transitionTimingFunction,delay:r.transitionDelay}}var $T={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},S9=function(e){e.scrollTop=e.scrollTop},Kk=function(e){return Math.round(e)+"ms"};function o0(t,e){t===void 0&&(t=["all"]);var n=e||{},r=n.duration,i=r===void 0?300:r,s=n.easing,o=s===void 0?$T.easeInOut:s,a=n.delay,l=a===void 0?0:a,c=Array.isArray(t)?t:[t];return c.map(function(f){var p=typeof i=="string"?i:Kk(i),g=typeof l=="string"?l:Kk(l);return f+" "+p+" "+o+" "+g}).join(",")}function Iue(t){return t&&t.ownerDocument||document}function w9(t){var e=Iue(t);return e.defaultView||window}function Lue(t,e){e===void 0&&(e=166);var n;function r(){for(var i=this,s=arguments.length,o=new Array(s),a=0;a-1,w=b.snacks.findIndex(y)>-1;if(S||w)return b}return i.handleDisplaySnack(Tr({},b,{queue:[].concat(b.queue,[_])}))}),v},i.handleDisplaySnack=function(s){var o=s.snacks;return o.length>=i.maxSnack?i.handleDismissOldest(s):i.processQueue(s)},i.processQueue=function(s){var o=s.queue,a=s.snacks;return o.length>0?Tr({},s,{snacks:[].concat(a,[o[0]]),queue:o.slice(1,o.length)}):s},i.handleDismissOldest=function(s){if(s.snacks.some(function(f){return!f.open||f.requestClose}))return s;var o=!1,a=!1,l=s.snacks.reduce(function(f,p){return f+(p.open&&p.persist?1:0)},0);l===i.maxSnack&&(a=!0);var c=s.snacks.map(function(f){return!o&&(!f.persist||a)?(o=!0,f.entered?(f.onClose&&f.onClose(null,"maxsnack",f.id),i.props.onClose&&i.props.onClose(null,"maxsnack",f.id),Tr({},f,{open:!1})):Tr({},f,{requestClose:!0})):Tr({},f)});return Tr({},s,{snacks:c})},i.handleEnteredSnack=function(s,o,a){if(!ib(a))throw new Error("handleEnteredSnack Cannot be called with undefined key");i.setState(function(l){var c=l.snacks;return{snacks:c.map(function(f){return f.id===a?Tr({},f,{entered:!0}):Tr({},f)})}})},i.handleCloseSnack=function(s,o,a){i.props.onClose&&i.props.onClose(s,o,a);var l=a===void 0;i.setState(function(c){var f=c.snacks,p=c.queue;return{snacks:f.map(function(g){return!l&&g.id!==a?Tr({},g):g.entered?Tr({},g,{open:!1}):Tr({},g,{requestClose:!0})}),queue:p.filter(function(g){return g.id!==a})}})},i.closeSnackbar=function(s){var o=i.state.snacks.find(function(a){return a.id===s});ib(s)&&o&&o.onClose&&o.onClose(null,"instructed",s),i.handleCloseSnack(null,"instructed",s)},i.handleExitedSnack=function(s,o){if(!ib(o))throw new Error("handleExitedSnack Cannot be called with undefined key");i.setState(function(a){var l=i.processQueue(Tr({},a,{snacks:a.snacks.filter(function(c){return c.id!==o})}));return l.queue.length===0?l:i.handleDismissOldest(l)})},i.enqueueSnackbar,i.closeSnackbar,i.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:i.enqueueSnackbar.bind(Gk(i)),closeSnackbar:i.closeSnackbar.bind(Gk(i))}},i}var n=e.prototype;return n.render=function(){var i=this,s=this.state.contextValue,o=this.props,a=o.domRoot,l=o.children,c=o.dense,f=c===void 0?!1:c,p=o.Components,g=p===void 0?{}:p,v=o.classes,x=this.state.snacks.reduce(function(b,y){var S,w=zR(y.anchorOrigin),T=b[w]||[];return Tr({},b,(S={},S[w]=[].concat(T,[y]),S))},{}),_=Object.keys(x).map(function(b){var y=x[b],S=y[0];return Zt.createElement(Kue,{key:b,dense:f,anchorOrigin:S.anchorOrigin,classes:v},y.map(function(w){return Zt.createElement(Zue,{key:w.id,snack:w,classes:v,Component:g[w.variant],onClose:i.handleCloseSnack,onEnter:i.props.onEnter,onExit:i.props.onExit,onExited:bv([i.handleExitedSnack,i.props.onExited],w.id),onEntered:bv([i.handleEnteredSnack,i.props.onEntered],w.id)})}))});return Zt.createElement(b9.Provider,{value:s},l,a?X2.createPortal(_,a):_)},x9(e,[{key:"maxSnack",get:function(){return this.props.maxSnack||Zh.maxSnack}}]),e}(D.Component),wo=function(){return D.useContext(b9)},Jue={VITE_MODULAR_BASE_PATH:"",VITE_MODULAR_BASE_MESH_PATH:"",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const iO=t=>{let e;const n=new Set,r=(f,p)=>{const g=typeof f=="function"?f(e):f;if(!Object.is(g,e)){const v=e;e=p??(typeof g!="object"||g===null)?g:Object.assign({},e,g),n.forEach(x=>x(e,v))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(Jue?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},ede=t=>t?iO(t):iO;var P9={exports:{}},I9={},L9={exports:{}},k9={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Q0=D;function tde(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var nde=typeof Object.is=="function"?Object.is:tde,rde=Q0.useState,ide=Q0.useEffect,sde=Q0.useLayoutEffect,ode=Q0.useDebugValue;function ade(t,e){var n=e(),r=rde({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return sde(function(){i.value=n,i.getSnapshot=e,l5(i)&&s({inst:i})},[t,n,e]),ide(function(){return l5(i)&&s({inst:i}),t(function(){l5(i)&&s({inst:i})})},[t]),ode(n),n}function l5(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!nde(t,n)}catch{return!0}}function lde(t,e){return e()}var cde=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?lde:ade;k9.useSyncExternalStore=Q0.useSyncExternalStore!==void 0?Q0.useSyncExternalStore:cde;L9.exports=k9;var ude=L9.exports;/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var tM=D,dde=ude;function fde(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var hde=typeof Object.is=="function"?Object.is:fde,pde=dde.useSyncExternalStore,mde=tM.useRef,gde=tM.useEffect,vde=tM.useMemo,yde=tM.useDebugValue;I9.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=mde(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=vde(function(){function l(v){if(!c){if(c=!0,f=v,v=r(v),i!==void 0&&o.hasValue){var x=o.value;if(i(x,v))return p=x}return p=v}if(x=p,hde(f,v))return x;var _=r(v);return i!==void 0&&i(x,_)?x:(f=v,p=_)}var c=!1,f,p,g=n===void 0?null:n;return[function(){return l(e())},g===null?void 0:function(){return l(g())}]},[e,n,r,i]);var a=pde(t,s[0],s[1]);return gde(function(){o.hasValue=!0,o.value=a},[a]),yde(a),a};P9.exports=I9;var xde=P9.exports;const _de=By(xde);var O9={VITE_MODULAR_BASE_PATH:"",VITE_MODULAR_BASE_MESH_PATH:"",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:bde}=Zt,{useSyncExternalStoreWithSelector:Sde}=_de;let sO=!1;const wde=t=>t;function Mde(t,e=wde,n){(O9?"production":void 0)!=="production"&&n&&!sO&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),sO=!0);const r=Sde(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return bde(r),r}const oO=t=>{(O9?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?ede(t):t,n=(r,i)=>Mde(e,r,i);return Object.assign(n,e),n},N9=t=>t?oO(t):oO;var x2={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */x2.exports;(function(t,e){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,f="__lodash_placeholder__",p=1,g=2,v=4,x=1,_=2,b=1,y=2,S=4,w=8,T=16,L=32,R=64,P=128,F=256,O=512,I=30,H="...",Q=800,q=16,le=1,ie=2,ee=3,ue=1/0,z=9007199254740991,te=17976931348623157e292,oe=NaN,de=4294967295,Ce=de-1,Le=de>>>1,V=[["ary",P],["bind",b],["bindKey",y],["curry",w],["curryRight",T],["flip",O],["partial",L],["partialRight",R],["rearg",F]],me="[object Arguments]",pe="[object Array]",Se="[object AsyncFunction]",je="[object Boolean]",it="[object Date]",xe="[object DOMException]",et="[object Error]",Re="[object Function]",Oe="[object GeneratorFunction]",Te="[object Map]",ze="[object Number]",ke="[object Null]",rt="[object Object]",tt="[object Promise]",ae="[object Proxy]",G="[object RegExp]",be="[object Set]",$e="[object String]",Ze="[object Symbol]",We="[object Undefined]",Mt="[object WeakMap]",pt="[object WeakSet]",at="[object ArrayBuffer]",Ie="[object DataView]",ge="[object Float32Array]",Xe="[object Float64Array]",St="[object Int8Array]",mt="[object Int16Array]",Be="[object Int32Array]",vt="[object Uint8Array]",qe="[object Uint8ClampedArray]",ce="[object Uint16Array]",Ne="[object Uint32Array]",fe=/\b__p \+= '';/g,Fe=/\b(__p \+=) '' \+/g,He=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ut=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,Xt=RegExp(ut.source),vn=RegExp(xt.source),mn=/<%-([\s\S]+?)%>/g,On=/<%([\s\S]+?)%>/g,un=/<%=([\s\S]+?)%>/g,Nn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,In=/^\w*$/,or=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kn=/[\\^$.*+?()[\]{}|]/g,Fr=RegExp(Kn.source),gr=/^\s+/,ui=/\s/,ss=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Rr=/\{\n\/\* \[wrapped with (.+)\] \*/,ji=/,? & /,Ei=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,di=/[()=,{}\[\]\/\s]/,Gi=/\\(\\)?/g,B=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ne=/\w*$/,_e=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,we=/^\[object .+?Constructor\]$/,Qe=/^0o[0-7]+$/i,wt=/^(?:0|[1-9]\d*)$/,Ft=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zt=/($^)/,dn=/['\n\r\u2028\u2029\\]/g,fn="\\ud800-\\udfff",wn="\\u0300-\\u036f",Cr="\\ufe20-\\ufe2f",Wr="\\u20d0-\\u20ff",Fi=wn+Cr+Wr,os="\\u2700-\\u27bf",Dn="a-z\\xdf-\\xf6\\xf8-\\xff",an="\\xac\\xb1\\xd7\\xf7",tr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",en="\\u2000-\\u206f",Ui=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",jr="A-Z\\xc0-\\xd6\\xd8-\\xde",Gr="\\ufe0e\\ufe0f",Cs=an+tr+en+Ui,xr="['’]",Pr="["+fn+"]",qo="["+Cs+"]",ti="["+Fi+"]",_r="\\d+",Oa="["+os+"]",Zl="["+Dn+"]",Ts="[^"+fn+Cs+_r+os+Dn+jr+"]",ju="\\ud83c[\\udffb-\\udfff]",bf="(?:"+ti+"|"+ju+")",Hc="[^"+fn+"]",Zo="(?:\\ud83c[\\udde6-\\uddff]){2}",yl="[\\ud800-\\udbff][\\udc00-\\udfff]",Mo="["+jr+"]",sn="\\u200d",$c="(?:"+Zl+"|"+Ts+")",W="(?:"+Mo+"|"+Ts+")",$="(?:"+xr+"(?:d|ll|m|re|s|t|ve))?",J="(?:"+xr+"(?:D|LL|M|RE|S|T|VE))?",Z=bf+"?",re="["+Gr+"]?",Ye="(?:"+sn+"(?:"+[Hc,Zo,yl].join("|")+")"+re+Z+")*",Ge="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Bt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Tt=re+Z+Ye,Lt="(?:"+[Oa,Zo,yl].join("|")+")"+Tt,qt="(?:"+[Hc+ti+"?",ti,Zo,yl,Pr].join("|")+")",_t=RegExp(xr,"g"),Pt=RegExp(ti,"g"),Ht=RegExp(ju+"(?="+ju+")|"+qt+Tt,"g"),ln=RegExp([Mo+"?"+Zl+"+"+$+"(?="+[qo,Mo,"$"].join("|")+")",W+"+"+J+"(?="+[qo,Mo+$c,"$"].join("|")+")",Mo+"?"+$c+"+"+$,Mo+"+"+J,Bt,Ge,_r,Lt].join("|"),"g"),Yt=RegExp("["+sn+fn+Fi+Gr+"]"),Ir=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Rn=-1,tn={};tn[ge]=tn[Xe]=tn[St]=tn[mt]=tn[Be]=tn[vt]=tn[qe]=tn[ce]=tn[Ne]=!0,tn[me]=tn[pe]=tn[at]=tn[je]=tn[Ie]=tn[it]=tn[et]=tn[Re]=tn[Te]=tn[ze]=tn[rt]=tn[G]=tn[be]=tn[$e]=tn[Mt]=!1;var Zn={};Zn[me]=Zn[pe]=Zn[at]=Zn[Ie]=Zn[je]=Zn[it]=Zn[ge]=Zn[Xe]=Zn[St]=Zn[mt]=Zn[Be]=Zn[Te]=Zn[ze]=Zn[rt]=Zn[G]=Zn[be]=Zn[$e]=Zn[Ze]=Zn[vt]=Zn[qe]=Zn[ce]=Zn[Ne]=!0,Zn[et]=Zn[Re]=Zn[Mt]=!1;var Lr={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},as={"&":"&","<":"<",">":">",'"':""","'":"'"},Gu={"&":"&","<":"<",">":">",""":'"',"'":"'"},Xu={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_x=parseFloat,IM=parseInt,Yo=typeof h1=="object"&&h1&&h1.Object===Object&&h1,LM=typeof self=="object"&&self&&self.Object===Object&&self,fi=Yo||LM||Function("return this")(),Cg=e&&!e.nodeType&&e,Xi=Cg&&!0&&t&&!t.nodeType&&t,Sf=Xi&&Xi.exports===Cg,qu=Sf&&Yo.process,qi=function(){try{var Ee=Xi&&Xi.require&&Xi.require("util").types;return Ee||qu&&qu.binding&&qu.binding("util")}catch{}}(),Rp=qi&&qi.isArrayBuffer,Pp=qi&&qi.isDate,Tg=qi&&qi.isMap,Ip=qi&&qi.isRegExp,Lp=qi&&qi.isSet,Vc=qi&&qi.isTypedArray;function Ur(Ee,st,Ke){switch(Ke.length){case 0:return Ee.call(st);case 1:return Ee.call(st,Ke[0]);case 2:return Ee.call(st,Ke[0],Ke[1]);case 3:return Ee.call(st,Ke[0],Ke[1],Ke[2])}return Ee.apply(st,Ke)}function Na(Ee,st,Ke,$t){for(var Mn=-1,Ln=Ee==null?0:Ee.length;++Mn-1}function Zu(Ee,st,Ke){for(var $t=-1,Mn=Ee==null?0:Ee.length;++$t-1;);return Ke}function Qu(Ee,st){for(var Ke=Ee.length;Ke--&&Jo(st,Ee[Ke],0)>-1;);return Ke}function ta(Ee,st){for(var Ke=Ee.length,$t=0;Ke--;)Ee[Ke]===st&&++$t;return $t}var Ex=Us(Lr),Cx=Us(as);function Ig(Ee){return"\\"+Xu[Ee]}function Lg(Ee,st){return Ee==null?n:Ee[st]}function Wc(Ee){return Yt.test(Ee)}function Cf(Ee){return Ir.test(Ee)}function Ju(Ee){for(var st,Ke=[];!(st=Ee.next()).done;)Ke.push(st.value);return Ke}function Tf(Ee){var st=-1,Ke=Array(Ee.size);return Ee.forEach(function($t,Mn){Ke[++st]=[Mn,$t]}),Ke}function ed(Ee,st){return function(Ke){return Ee(st(Ke))}}function na(Ee,st){for(var Ke=-1,$t=Ee.length,Mn=0,Ln=[];++Ke<$t;){var zr=Ee[Ke];(zr===st||zr===f)&&(Ee[Ke]=f,Ln[Mn++]=Ke)}return Ln}function Af(Ee){var st=-1,Ke=Array(Ee.size);return Ee.forEach(function($t){Ke[++st]=$t}),Ke}function Tx(Ee){var st=-1,Ke=Array(Ee.size);return Ee.forEach(function($t){Ke[++st]=[$t,$t]}),Ke}function td(Ee,st,Ke){for(var $t=Ke-1,Mn=Ee.length;++$t-1}function Bp(u,m){var E=this.__data__,N=nc(E,u);return N<0?(++this.size,E.push([u,m])):E[N][1]=m,this}ra.prototype.clear=Gx,ra.prototype.delete=Hg,ra.prototype.get=Xx,ra.prototype.has=qx,ra.prototype.set=Bp;function Eo(u){var m=-1,E=u==null?0:u.length;for(this.clear();++m=m?u:m)),u}function Ks(u,m,E,N,j,se){var ve,Me=m&p,Ue=m&g,dt=m&v;if(E&&(ve=j?E(u,N,j,se):E(u)),ve!==n)return ve;if(!si(u))return u;var ft=kn(u);if(ft){if(ve=BB(u),!Me)return ms(u,ve)}else{var yt=zs(u),Nt=yt==Re||yt==Oe;if(_d(u))return a1(u,Me);if(yt==rt||yt==me||Nt&&!j){if(ve=Ue||Nt?{}:QP(u),!Me)return Ue?u_(u,e_(ve,u)):$M(u,Xg(ve,u))}else{if(!Zn[yt])return j?u:{};ve=HB(u,yt,Me)}}se||(se=new Ri);var nn=se.get(u);if(nn)return nn;se.set(u,ve),T4(u)?u.forEach(function(_n){ve.add(Ks(_n,m,E,_n,u,se))}):E4(u)&&u.forEach(function(_n,Qn){ve.set(Qn,Ks(_n,m,E,Qn,u,se))});var xn=dt?Ue?rr:mi:Ue?Po:vs,Wn=ft?n:xn(u);return Ci(Wn||u,function(_n,Qn){Wn&&(Qn=_n,_n=u[Qn]),ia(ve,Qn,Ks(_n,m,E,Qn,u,se))}),ve}function qg(u){var m=vs(u);return function(E){return Wp(E,u,m)}}function Wp(u,m,E){var N=E.length;if(u==null)return!N;for(u=yn(u);N--;){var j=E[N],se=m[j],ve=u[j];if(ve===n&&!(j in u)||!se(ve))return!1}return!0}function Zg(u,m,E){if(typeof u!="function")throw new Ps(o);return d1(function(){u.apply(n,E)},m)}function Yc(u,m,E,N){var j=-1,se=Ko,ve=!0,Me=u.length,Ue=[],dt=m.length;if(!Me)return Ue;E&&(m=kr(m,As(E))),N?(se=Zu,ve=!1):m.length>=i&&(se=Zi,ve=!1,m=new tc(m));e:for(;++jj?0:j+E),N=N===n||N>j?j:$n(N),N<0&&(N+=j),N=E>N?0:R4(N);E0&&E(Me)?m>1?Hi(Me,m-1,E,N,j):Qo(j,Me):N||(j[j.length]=Me)}return j}var dd=nm(),$f=nm(!0);function Qs(u,m){return u&&dd(u,m,vs)}function fd(u,m){return u&&$f(u,m,vs)}function Kc(u,m){return ls(m,function(E){return nu(u[E])})}function oa(u,m){m=lc(m,u);for(var E=0,N=m.length;u!=null&&Em}function r_(u,m){return u!=null&&lr.call(u,m)}function Kg(u,m){return u!=null&&m in yn(u)}function BM(u,m,E){return u>=cs(m,E)&&u=120&&ft.length>=120)?new tc(ve&&ft):n}ft=u[0];var yt=-1,Nt=Me[0];e:for(;++yt-1;)Me!==u&&Jl.call(Me,Ue,1),Jl.call(u,Ue,1);return u}function fs(u,m){for(var E=u?m.length:0,N=E-1;E--;){var j=m[E];if(E==N||j!==se){var se=j;tu(j)?Jl.call(u,j,1):i1(u,j)}}return u}function $a(u,m){return u+Nf(zg()*(m-u+1))}function Co(u,m,E,N){for(var j=-1,se=Ai(Of((m-u)/(E||1)),0),ve=Ke(se);se--;)ve[N?se:++j]=u,u+=E;return ve}function xd(u,m){var E="";if(!u||m<1||m>z)return E;do m%2&&(E+=u),m=Nf(m/2),m&&(u+=u);while(m);return E}function cn(u,m){return ZM(t4(u,m,Io),u+"")}function i_(u){return Bf(om(u))}function t1(u,m){var E=om(u);return h_(E,rc(m,0,E.length))}function Jc(u,m,E,N){if(!si(u))return u;m=lc(m,u);for(var j=-1,se=m.length,ve=se-1,Me=u;Me!=null&&++jj?0:j+m),E=E>j?j:E,E<0&&(E+=j),j=m>E?0:E-m>>>0,m>>>=0;for(var se=Ke(j);++N>>1,ve=u[se];ve!==null&&!la(ve)&&(E?ve<=m:ve=i){var dt=m?null:gs(u);if(dt)return Af(dt);ve=!1,j=Zi,Ue=new tc}else Ue=m?[]:Me;e:for(;++N=N?u:eo(u,m,E)}var l_=kf||function(u){return fi.clearTimeout(u)};function a1(u,m){if(m)return u.slice();var E=u.length,N=Ng?Ng(E):new u.constructor(E);return u.copy(N),N}function em(u){var m=new u.constructor(u.byteLength);return new If(m).set(new If(u)),m}function HM(u,m){var E=m?em(u.buffer):u.buffer;return new u.constructor(E,u.byteOffset,u.byteLength)}function To(u){var m=new u.constructor(u.source,ne.exec(u));return m.lastIndex=u.lastIndex,m}function l1(u){return Sl?yn(Sl.call(u)):{}}function c_(u,m){var E=m?em(u.buffer):u.buffer;return new u.constructor(E,u.byteOffset,u.length)}function El(u,m){if(u!==m){var E=u!==n,N=u===null,j=u===u,se=la(u),ve=m!==n,Me=m===null,Ue=m===m,dt=la(m);if(!Me&&!dt&&!se&&u>m||se&&ve&&Ue&&!Me&&!dt||N&&ve&&Ue||!E&&Ue||!j)return 1;if(!N&&!se&&!dt&&u=Me)return Ue;var dt=E[N];return Ue*(dt=="desc"?-1:1)}}return u.index-m.index}function uc(u,m,E,N){for(var j=-1,se=u.length,ve=E.length,Me=-1,Ue=m.length,dt=Ai(se-ve,0),ft=Ke(Ue+dt),yt=!N;++Me1?E[j-1]:n,ve=j>2?E[2]:n;for(se=u.length>3&&typeof se=="function"?(j--,se):n,ve&&no(E[0],E[1],ve)&&(se=j<3?n:se,j=1),m=yn(m);++N-1?j[se?m[ve]:ve]:n}}function k(u){return zn(function(m){var E=m.length,N=E,j=us.prototype.thru;for(u&&m.reverse();N--;){var se=m[N];if(typeof se!="function")throw new Ps(o);if(j&&!ve&&rm(se)=="wrapper")var ve=new us([],!0)}for(N=ve?N:E;++N1&&ir.reverse(),ft&&UeMe))return!1;var dt=se.get(u),ft=se.get(m);if(dt&&ft)return dt==m&&ft==u;var yt=-1,Nt=!0,nn=E&_?new tc:n;for(se.set(u,m),se.set(m,u);++yt1?"& ":"")+m[N],m=m.join(E>2?", ":" "),u.replace(ss,`{ +/* [wrapped with `+m+`] */ +`)}function VB(u){return kn(u)||Jf(u)||!!(Fg&&u&&u[Fg])}function tu(u,m){var E=typeof u;return m=m??z,!!m&&(E=="number"||E!="symbol"&&wt.test(u))&&u>-1&&u%1==0&&u0){if(++m>=Q)return arguments[0]}else m=0;return u.apply(n,arguments)}}function h_(u,m){var E=-1,N=u.length,j=N-1;for(m=m===n?N:m;++E1?u[m-1]:n;return E=typeof E=="function"?(u.pop(),E):n,h4(u,E)});function p4(u){var m=Y(u);return m.__chain__=!0,m}function e$(u,m){return m(u),u}function p_(u,m){return m(u)}var t$=zn(function(u){var m=u.length,E=m?u[0]:0,N=this.__wrapped__,j=function(se){return Vp(se,u)};return m>1||this.__actions__.length||!(N instanceof hn)||!tu(E)?this.thru(j):(N=N.slice(E,+E+(m?1:0)),N.__actions__.push({func:p_,args:[j],thisArg:n}),new us(N,this.__chain__).thru(function(se){return m&&!se.length&&se.push(n),se}))});function n$(){return p4(this)}function r$(){return new us(this.value(),this.__chain__)}function i$(){this.__values__===n&&(this.__values__=A4(this.value()));var u=this.__index__>=this.__values__.length,m=u?n:this.__values__[this.__index__++];return{done:u,value:m}}function s$(){return this}function o$(u){for(var m,E=this;E instanceof zf;){var N=a4(E);N.__index__=0,N.__values__=n,m?j.__wrapped__=N:m=N;var j=N;E=E.__wrapped__}return j.__wrapped__=u,m}function a$(){var u=this.__wrapped__;if(u instanceof hn){var m=u;return this.__actions__.length&&(m=new hn(this)),m=m.reverse(),m.__actions__.push({func:p_,args:[YM],thisArg:n}),new us(m,this.__chain__)}return this.thru(YM)}function l$(){return oc(this.__wrapped__,this.__actions__)}var c$=Yf(function(u,m,E){lr.call(u,E)?++u[E]:Ha(u,E,1)});function u$(u,m,E){var N=kn(u)?Rg:zM;return E&&no(u,m,E)&&(m=n),N(u,gn(m,3))}function d$(u,m){var E=kn(u)?ls:Yg;return E(u,gn(m,3))}var f$=A(l4),h$=A(c4);function p$(u,m){return Hi(m_(u,m),1)}function m$(u,m){return Hi(m_(u,m),ue)}function g$(u,m,E){return E=E===n?1:$n(E),Hi(m_(u,m),E)}function m4(u,m){var E=kn(u)?Ci:sa;return E(u,gn(m,3))}function g4(u,m){var E=kn(u)?Ag:t_;return E(u,gn(m,3))}var v$=Yf(function(u,m,E){lr.call(u,E)?u[E].push(m):Ha(u,E,[m])});function y$(u,m,E,N){u=Ro(u)?u:om(u),E=E&&!N?$n(E):0;var j=u.length;return E<0&&(E=Ai(j+E,0)),__(u)?E<=j&&u.indexOf(m,E)>-1:!!j&&Jo(u,m,E)>-1}var x$=cn(function(u,m,E){var N=-1,j=typeof m=="function",se=Ro(u)?Ke(u.length):[];return sa(u,function(ve){se[++N]=j?Ur(m,ve,E):Nr(ve,m,E)}),se}),_$=Yf(function(u,m,E){Ha(u,E,m)});function m_(u,m){var E=kn(u)?kr:Qc;return E(u,gn(m,3))}function b$(u,m,E,N){return u==null?[]:(kn(m)||(m=m==null?[]:[m]),E=N?n:E,kn(E)||(E=E==null?[]:[E]),Gf(u,m,E))}var S$=Yf(function(u,m,E){u[E?0:1].push(m)},function(){return[[],[]]});function w$(u,m,E){var N=kn(u)?kp:Yl,j=arguments.length<3;return N(u,gn(m,4),E,j,sa)}function M$(u,m,E){var N=kn(u)?bx:Yl,j=arguments.length<3;return N(u,gn(m,4),E,j,t_)}function E$(u,m){var E=kn(u)?ls:Yg;return E(u,y_(gn(m,3)))}function C$(u){var m=kn(u)?Bf:i_;return m(u)}function T$(u,m,E){(E?no(u,m,E):m===n)?m=1:m=$n(m);var N=kn(u)?Wg:t1;return N(u,m)}function A$(u){var m=kn(u)?Jx:o_;return m(u)}function R$(u){if(u==null)return 0;if(Ro(u))return __(u)?Da(u):u.length;var m=zs(u);return m==Te||m==be?u.size:ds(u).length}function P$(u,m,E){var N=kn(u)?wf:n1;return E&&no(u,m,E)&&(m=n),N(u,gn(m,3))}var I$=cn(function(u,m){if(u==null)return[];var E=m.length;return E>1&&no(u,m[0],m[1])?m=[]:E>2&&no(m[0],m[1],m[2])&&(m=[m[0]]),Gf(u,Hi(m,1),[])}),g_=Px||function(){return fi.Date.now()};function L$(u,m){if(typeof m!="function")throw new Ps(o);return u=$n(u),function(){if(--u<1)return m.apply(this,arguments)}}function v4(u,m,E){return m=E?n:m,m=u&&m==null?u.length:m,Ve(u,P,n,n,n,n,m)}function y4(u,m){var E;if(typeof m!="function")throw new Ps(o);return u=$n(u),function(){return--u>0&&(E=m.apply(this,arguments)),u<=1&&(m=n),E}}var QM=cn(function(u,m,E){var N=b;if(E.length){var j=na(E,im(QM));N|=L}return Ve(u,N,m,E,j)}),x4=cn(function(u,m,E){var N=b|y;if(E.length){var j=na(E,im(x4));N|=L}return Ve(m,N,u,E,j)});function _4(u,m,E){m=E?n:m;var N=Ve(u,w,n,n,n,n,n,m);return N.placeholder=_4.placeholder,N}function b4(u,m,E){m=E?n:m;var N=Ve(u,T,n,n,n,n,n,m);return N.placeholder=b4.placeholder,N}function S4(u,m,E){var N,j,se,ve,Me,Ue,dt=0,ft=!1,yt=!1,Nt=!0;if(typeof u!="function")throw new Ps(o);m=Ga(m)||0,si(E)&&(ft=!!E.leading,yt="maxWait"in E,se=yt?Ai(Ga(E.maxWait)||0,m):se,Nt="trailing"in E?!!E.trailing:Nt);function nn(Ii){var Tl=N,iu=j;return N=j=n,dt=Ii,ve=u.apply(iu,Tl),ve}function xn(Ii){return dt=Ii,Me=d1(Qn,m),ft?nn(Ii):ve}function Wn(Ii){var Tl=Ii-Ue,iu=Ii-dt,H4=m-Tl;return yt?cs(H4,se-iu):H4}function _n(Ii){var Tl=Ii-Ue,iu=Ii-dt;return Ue===n||Tl>=m||Tl<0||yt&&iu>=se}function Qn(){var Ii=g_();if(_n(Ii))return ir(Ii);Me=d1(Qn,Wn(Ii))}function ir(Ii){return Me=n,Nt&&N?nn(Ii):(N=j=n,ve)}function ca(){Me!==n&&l_(Me),dt=0,N=Ue=j=Me=n}function ro(){return Me===n?ve:ir(g_())}function ua(){var Ii=g_(),Tl=_n(Ii);if(N=arguments,j=this,Ue=Ii,Tl){if(Me===n)return xn(Ue);if(yt)return l_(Me),Me=d1(Qn,m),nn(Ue)}return Me===n&&(Me=d1(Qn,m)),ve}return ua.cancel=ca,ua.flush=ro,ua}var k$=cn(function(u,m){return Zg(u,1,m)}),O$=cn(function(u,m,E){return Zg(u,Ga(m)||0,E)});function N$(u){return Ve(u,O)}function v_(u,m){if(typeof u!="function"||m!=null&&typeof m!="function")throw new Ps(o);var E=function(){var N=arguments,j=m?m.apply(this,N):N[0],se=E.cache;if(se.has(j))return se.get(j);var ve=u.apply(this,N);return E.cache=se.set(j,ve)||se,ve};return E.cache=new(v_.Cache||Eo),E}v_.Cache=Eo;function y_(u){if(typeof u!="function")throw new Ps(o);return function(){var m=arguments;switch(m.length){case 0:return!u.call(this);case 1:return!u.call(this,m[0]);case 2:return!u.call(this,m[0],m[1]);case 3:return!u.call(this,m[0],m[1],m[2])}return!u.apply(this,m)}}function D$(u){return y4(2,u)}var F$=a_(function(u,m){m=m.length==1&&kn(m[0])?kr(m[0],As(gn())):kr(Hi(m,1),As(gn()));var E=m.length;return cn(function(N){for(var j=-1,se=cs(N.length,E);++j=m}),Jf=Fn(function(){return arguments}())?Fn:function(u){return gi(u)&&lr.call(u,"callee")&&!Up.call(u,"callee")},kn=Ke.isArray,Q$=Rp?As(Rp):hi;function Ro(u){return u!=null&&x_(u.length)&&!nu(u)}function Pi(u){return gi(u)&&Ro(u)}function J$(u){return u===!0||u===!1||gi(u)&&Yi(u)==je}var _d=Lx||uE,eV=Pp?As(Pp):pi;function tV(u){return gi(u)&&u.nodeType===1&&!f1(u)}function nV(u){if(u==null)return!0;if(Ro(u)&&(kn(u)||typeof u=="string"||typeof u.splice=="function"||_d(u)||sm(u)||Jf(u)))return!u.length;var m=zs(u);if(m==Te||m==be)return!u.size;if(u1(u))return!ds(u).length;for(var E in u)if(lr.call(u,E))return!1;return!0}function rV(u,m){return ri(u,m)}function iV(u,m,E){E=typeof E=="function"?E:n;var N=E?E(u,m):n;return N===n?ri(u,m,n,E):!!N}function eE(u){if(!gi(u))return!1;var m=Yi(u);return m==et||m==xe||typeof u.message=="string"&&typeof u.name=="string"&&!f1(u)}function sV(u){return typeof u=="number"&&Ug(u)}function nu(u){if(!si(u))return!1;var m=Yi(u);return m==Re||m==Oe||m==Se||m==ae}function M4(u){return typeof u=="number"&&u==$n(u)}function x_(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=z}function si(u){var m=typeof u;return u!=null&&(m=="object"||m=="function")}function gi(u){return u!=null&&typeof u=="object"}var E4=Tg?As(Tg):pd;function oV(u,m){return u===m||ii(u,m,WM(m))}function aV(u,m,E){return E=typeof E=="function"?E:n,ii(u,m,WM(m),E)}function lV(u){return C4(u)&&u!=+u}function cV(u){if(GB(u))throw new Mn(s);return md(u)}function uV(u){return u===null}function dV(u){return u==null}function C4(u){return typeof u=="number"||gi(u)&&Yi(u)==ze}function f1(u){if(!gi(u)||Yi(u)!=rt)return!1;var m=Lf(u);if(m===null)return!0;var E=lr.call(m,"constructor")&&m.constructor;return typeof E=="function"&&E instanceof E&&od.call(E)==jc}var tE=Ip?As(Ip):gd;function fV(u){return M4(u)&&u>=-z&&u<=z}var T4=Lp?As(Lp):Gp;function __(u){return typeof u=="string"||!kn(u)&&gi(u)&&Yi(u)==$e}function la(u){return typeof u=="symbol"||gi(u)&&Yi(u)==Ze}var sm=Vc?As(Vc):Jg;function hV(u){return u===n}function pV(u){return gi(u)&&zs(u)==Mt}function mV(u){return gi(u)&&Yi(u)==pt}var gV=on(Wf),vV=on(function(u,m){return u<=m});function A4(u){if(!u)return[];if(Ro(u))return __(u)?Qr(u):ms(u);if(ec&&u[ec])return Ju(u[ec]());var m=zs(u),E=m==Te?Tf:m==be?Af:om;return E(u)}function ru(u){if(!u)return u===0?u:0;if(u=Ga(u),u===ue||u===-ue){var m=u<0?-1:1;return m*te}return u===u?u:0}function $n(u){var m=ru(u),E=m%1;return m===m?E?m-E:m:0}function R4(u){return u?rc($n(u),0,de):0}function Ga(u){if(typeof u=="number")return u;if(la(u))return oe;if(si(u)){var m=typeof u.valueOf=="function"?u.valueOf():u;u=si(m)?m+"":m}if(typeof u!="string")return u===0?u:+u;u=Np(u);var E=ye.test(u);return E||Qe.test(u)?IM(u.slice(2),E?2:8):_e.test(u)?oe:+u}function P4(u){return Ao(u,Po(u))}function yV(u){return u?rc($n(u),-z,z):u===0?u:0}function yr(u){return u==null?"":hs(u)}var xV=eu(function(u,m){if(u1(m)||Ro(m)){Ao(m,vs(m),u);return}for(var E in m)lr.call(m,E)&&ia(u,E,m[E])}),I4=eu(function(u,m){Ao(m,Po(m),u)}),b_=eu(function(u,m,E,N){Ao(m,Po(m),u,N)}),_V=eu(function(u,m,E,N){Ao(m,vs(m),u,N)}),bV=zn(Vp);function SV(u,m){var E=wl(u);return m==null?E:Xg(E,m)}var wV=cn(function(u,m){u=yn(u);var E=-1,N=m.length,j=N>2?m[2]:n;for(j&&no(m[0],m[1],j)&&(N=1);++E1),se}),Ao(u,rr(u),E),N&&(E=Ks(E,p|g|v,Dt));for(var j=m.length;j--;)i1(E,m[j]);return E});function HV(u,m){return k4(u,y_(gn(m)))}var $V=zn(function(u,m){return u==null?{}:Xf(u,m)});function k4(u,m){if(u==null)return{};var E=kr(rr(u),function(N){return[N]});return m=gn(m),Zp(u,E,function(N,j){return m(N,j[0])})}function VV(u,m,E){m=lc(m,u);var N=-1,j=m.length;for(j||(j=1,u=n);++Nm){var N=u;u=m,m=N}if(E||u%1||m%1){var j=zg();return cs(u+j*(m-u+_x("1e-"+((j+"").length-1))),m)}return $a(u,m)}var eW=d(function(u,m,E){return m=m.toLowerCase(),u+(E?D4(m):m)});function D4(u){return iE(yr(u).toLowerCase())}function F4(u){return u=yr(u),u&&u.replace(Ft,Ex).replace(Pt,"")}function tW(u,m,E){u=yr(u),m=hs(m);var N=u.length;E=E===n?N:rc($n(E),0,N);var j=E;return E-=m.length,E>=0&&u.slice(E,j)==m}function nW(u){return u=yr(u),u&&vn.test(u)?u.replace(xt,Cx):u}function rW(u){return u=yr(u),u&&Fr.test(u)?u.replace(Kn,"\\$&"):u}var iW=d(function(u,m,E){return u+(E?"-":"")+m.toLowerCase()}),sW=d(function(u,m,E){return u+(E?" ":"")+m.toLowerCase()}),oW=d_("toLowerCase");function aW(u,m,E){u=yr(u),m=$n(m);var N=m?Da(u):0;if(!m||N>=m)return u;var j=(m-N)/2;return Et(Nf(j),E)+u+Et(Of(j),E)}function lW(u,m,E){u=yr(u),m=$n(m);var N=m?Da(u):0;return m&&N>>0,E?(u=yr(u),u&&(typeof m=="string"||m!=null&&!tE(m))&&(m=hs(m),!m&&Wc(u))?cc(Qr(u),0,E):u.split(m,E)):[]}var mW=d(function(u,m,E){return u+(E?" ":"")+iE(m)});function gW(u,m,E){return u=yr(u),E=E==null?0:rc($n(E),0,u.length),m=hs(m),u.slice(E,E+m.length)==m}function vW(u,m,E){var N=Y.templateSettings;E&&no(u,m,E)&&(m=n),u=yr(u),m=b_({},m,N,De);var j=b_({},m.imports,N.imports,De),se=vs(j),ve=Rs(j,se),Me,Ue,dt=0,ft=m.interpolate||zt,yt="__p += '",Nt=zi((m.escape||zt).source+"|"+ft.source+"|"+(ft===un?B:zt).source+"|"+(m.evaluate||zt).source+"|$","g"),nn="//# sourceURL="+(lr.call(m,"sourceURL")?(m.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Rn+"]")+` +`;u.replace(Nt,function(_n,Qn,ir,ca,ro,ua){return ir||(ir=ca),yt+=u.slice(dt,ua).replace(dn,Ig),Qn&&(Me=!0,yt+=`' + +__e(`+Qn+`) + +'`),ro&&(Ue=!0,yt+=`'; +`+ro+`; +__p += '`),ir&&(yt+=`' + +((__t = (`+ir+`)) == null ? '' : __t) + +'`),dt=ua+_n.length,_n}),yt+=`'; +`;var xn=lr.call(m,"variable")&&m.variable;if(!xn)yt=`with (obj) { +`+yt+` +} +`;else if(di.test(xn))throw new Mn(a);yt=(Ue?yt.replace(fe,""):yt).replace(Fe,"$1").replace(He,"$1;"),yt="function("+(xn||"obj")+`) { +`+(xn?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(Me?", __e = _.escape":"")+(Ue?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+yt+`return __p +}`;var Wn=z4(function(){return Ln(se,nn+"return "+yt).apply(n,ve)});if(Wn.source=yt,eE(Wn))throw Wn;return Wn}function yW(u){return yr(u).toLowerCase()}function xW(u){return yr(u).toUpperCase()}function _W(u,m,E){if(u=yr(u),u&&(E||m===n))return Np(u);if(!u||!(m=hs(m)))return u;var N=Qr(u),j=Qr(m),se=Or(N,j),ve=Qu(N,j)+1;return cc(N,se,ve).join("")}function bW(u,m,E){if(u=yr(u),u&&(E||m===n))return u.slice(0,nd(u)+1);if(!u||!(m=hs(m)))return u;var N=Qr(u),j=Qu(N,Qr(m))+1;return cc(N,0,j).join("")}function SW(u,m,E){if(u=yr(u),u&&(E||m===n))return u.replace(gr,"");if(!u||!(m=hs(m)))return u;var N=Qr(u),j=Or(N,Qr(m));return cc(N,j).join("")}function wW(u,m){var E=I,N=H;if(si(m)){var j="separator"in m?m.separator:j;E="length"in m?$n(m.length):E,N="omission"in m?hs(m.omission):N}u=yr(u);var se=u.length;if(Wc(u)){var ve=Qr(u);se=ve.length}if(E>=se)return u;var Me=E-Da(N);if(Me<1)return N;var Ue=ve?cc(ve,0,Me).join(""):u.slice(0,Me);if(j===n)return Ue+N;if(ve&&(Me+=Ue.length-Me),tE(j)){if(u.slice(Me).search(j)){var dt,ft=Ue;for(j.global||(j=zi(j.source,yr(ne.exec(j))+"g")),j.lastIndex=0;dt=j.exec(ft);)var yt=dt.index;Ue=Ue.slice(0,yt===n?Me:yt)}}else if(u.indexOf(hs(j),Me)!=Me){var Nt=Ue.lastIndexOf(j);Nt>-1&&(Ue=Ue.slice(0,Nt))}return Ue+N}function MW(u){return u=yr(u),u&&Xt.test(u)?u.replace(ut,rd):u}var EW=d(function(u,m,E){return u+(E?" ":"")+m.toUpperCase()}),iE=d_("toUpperCase");function U4(u,m,E){return u=yr(u),m=E?n:m,m===n?Cf(u)?id(u):wx(u):u.match(m)||[]}var z4=cn(function(u,m){try{return Ur(u,n,m)}catch(E){return eE(E)?E:new Mn(E)}}),CW=zn(function(u,m){return Ci(m,function(E){E=dc(E),Ha(u,E,QM(u[E],u))}),u});function TW(u){var m=u==null?0:u.length,E=gn();return u=m?kr(u,function(N){if(typeof N[1]!="function")throw new Ps(o);return[E(N[0]),N[1]]}):[],cn(function(N){for(var j=-1;++jz)return[];var E=de,N=cs(u,de);m=gn(m),u-=de;for(var j=_l(N,m);++E0||m<0)?new hn(E):(u<0?E=E.takeRight(-u):u&&(E=E.drop(u)),m!==n&&(m=$n(m),E=m<0?E.dropRight(-m):E.take(m-u)),E)},hn.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},hn.prototype.toArray=function(){return this.take(de)},Qs(hn.prototype,function(u,m){var E=/^(?:filter|find|map|reject)|While$/.test(m),N=/^(?:head|last)$/.test(m),j=Y[N?"take"+(m=="last"?"Right":""):m],se=N||/^find/.test(m);j&&(Y.prototype[m]=function(){var ve=this.__wrapped__,Me=N?[1]:arguments,Ue=ve instanceof hn,dt=Me[0],ft=Ue||kn(ve),yt=function(Qn){var ir=j.apply(Y,Qo([Qn],Me));return N&&Nt?ir[0]:ir};ft&&E&&typeof dt=="function"&&dt.length!=1&&(Ue=ft=!1);var Nt=this.__chain__,nn=!!this.__actions__.length,xn=se&&!Nt,Wn=Ue&&!nn;if(!se&&ft){ve=Wn?ve:new hn(this);var _n=u.apply(ve,Me);return _n.__actions__.push({func:p_,args:[yt],thisArg:n}),new us(_n,Nt)}return xn&&Wn?u.apply(this,Me):(_n=this.thru(yt),xn?N?_n.value()[0]:_n.value():_n)})}),Ci(["pop","push","shift","sort","splice","unshift"],function(u){var m=Ql[u],E=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",N=/^(?:pop|shift)$/.test(u);Y.prototype[u]=function(){var j=arguments;if(N&&!this.__chain__){var se=this.value();return m.apply(kn(se)?se:[],j)}return this[E](function(ve){return m.apply(kn(ve)?ve:[],j)})}}),Qs(hn.prototype,function(u,m){var E=Y[m];if(E){var N=E.name+"";lr.call(qc,N)||(qc[N]=[]),qc[N].push({name:m,func:E})}}),qc[U(n,y).name]=[{name:"wrapper",func:n}],hn.prototype.clone=OM,hn.prototype.reverse=NM,hn.prototype.value=Ys,Y.prototype.at=t$,Y.prototype.chain=n$,Y.prototype.commit=r$,Y.prototype.next=i$,Y.prototype.plant=o$,Y.prototype.reverse=a$,Y.prototype.toJSON=Y.prototype.valueOf=Y.prototype.value=l$,Y.prototype.first=Y.prototype.head,ec&&(Y.prototype[ec]=s$),Y},Kl=Rx();Xi?((Xi.exports=Kl)._=Kl,Cg._=Kl):fi._=Kl}).call(h1)})(x2,x2.exports);var ry=x2.exports;let aO=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const Es="",Ede=["x","y","z","roll","pitch","yaw"];function Cde(t){return Ede.includes(t)}function D9(t){const e={};return Object.entries(t).forEach(([n,r])=>{if(!Cde(n))throw TypeError(`invalid key '${n}'found for ModuleOffsetDescription object`);e[n]=r.map(i=>typeof i=="number"?{value:i,label:i.toFixed(2)}:i)}),e}function F9(t){if(t.notation==="rpy")return{x:t.px,y:t.py,z:t.pz,roll:t.rx,pitch:t.ry,yaw:t.rz};if(t.notation==="quaternion")return{x:t.px,y:t.py,z:t.pz,rx:t.rx,ry:t.ry,rz:t.rz,rw:t.rw};throw new Error("invalid notation type for 'offset'")}const Tde=["application/zip","application/vnd.rar","application/x-rar-compressed","application/octet-stream","application/octet-stream","application/x-zip-compressed","multipart/x-zip"];function Ade(){const t=mf(),{enqueueSnackbar:e}=wo(),{setMeshId:n}=Dr();return gg({mutationFn:async(r,i)=>{const{data:s}=await Yn.post(`${Es}/model/urdf`,r,{responseType:"blob",...i});return s},onSuccess:(r,i)=>{if(r instanceof Blob&&Tde.includes(r.type)){const s=r.name??`${i.name??"modularbot"}.zip`,o=URL.createObjectURL(r),a=document.createElement("a");a.download=s,a.href=o,document.body.appendChild(a),console.info(`${s} downloadable at link ${a.href}`),a.click(),document.body.removeChild(a)}e("Deployment Succesful",{variant:"success"}),t.invalidateQueries({queryKey:["modular","model","urdf","modules","map"]}),t.invalidateQueries({queryKey:["modular","model","stats"]}),n()},onError:async r=>{var s,o,a;const i=JSON.parse(await((s=r.response)==null?void 0:s.data.text())??"{}");e(i.message??`The request to deploy the robot was made but no response received. +Error: ${(o=r.response)==null?void 0:o.status} ${(a=r.response)==null?void 0:a.statusText}.`,{style:{whiteSpace:"pre-line"},variant:"error"})}})}function Rde(){const t=mf(),{enqueueSnackbar:e}=wo(),{setMeshId:n,setSelected:r}=Dr();return gg({mutationFn:async i=>(await Yn.put(`${Es}/model/urdf`,i)).data,onSuccess:i=>{e("Generated model",{variant:"success"}),e("Passive end-effector must be added manually",{variant:"info"}),r(i),n()},onError:i=>{var s,o;console.error(i),e(i.response&&typeof i.response.data.message<"u"?`${i.response.data.message}`:`The request to generate the model was made but no response received. +Error: ${(s=i.response)==null?void 0:s.status} ${(o=i.response)==null?void 0:o.statusText}.`,{variant:"error",style:{whiteSpace:"pre-line"}})},onSettled:()=>{t.invalidateQueries({queryKey:["modular","model","urdf","modules","map"]}),t.invalidateQueries({queryKey:["modular","model","stats"]})}})}const Pde=async t=>(await Yn.get(`${Es}/model/urdf/joints/map`,t)).data;function U9(t){let e=["modular","model","urdf","modules","map"],n={};return typeof t.id<"u"&&(e.push(t.id),n.ids=[t.id]),wo(),Hu({queryKey:e,queryFn:async r=>{const i=await Yn.get(`${Es}/model/urdf/modules/map`,{...r,params:{...r==null?void 0:r.params,...n}}),s={};return Object.entries(i.data).forEach(([o,a])=>{s[o]={...a,offsets:typeof a.offsets<"u"?D9(a.offsets):void 0}}),s},enabled:t.enabled,refetchOnWindowFocus:!1})}function Ide(){const t=mf(),{enqueueSnackbar:e}=wo(),{setMeshId:n,setSelected:r}=Dr();return gg({mutationFn:async({offset:i,...s},o)=>(await Yn.post(`${Es}/model/urdf/modules`,{...s,offsets_requested:F9(i)},o)).data,onSuccess:i=>{r(i),n()},onError:i=>{var s,o;console.error(i),e(i.response&&typeof i.response.data.message<"u"?`${i.response.data.message}`:`The request to add a module was made but no response received. +Error: ${(s=i.response)==null?void 0:s.status} ${(o=i.response)==null?void 0:o.statusText}.`,{variant:"error",style:{whiteSpace:"pre-line"}})},onSettled:()=>{t.invalidateQueries({queryKey:["modular","model","urdf","modules","map"]}),t.invalidateQueries({queryKey:["modular","model","stats"]})}})}function Lde(){const t=mf(),{enqueueSnackbar:e}=wo(),{setMeshId:n}=Dr();return gg({mutationFn:async({payload:r,options:i})=>{const{offset:s,...o}=r;return await Yn.put(`${Es}/model/urdf/modules`,{...o,offsets_requested:F9(s)},i)},onSuccess:()=>{n()},onError:r=>{var i,s;console.error(r),e(r.response&&typeof r.response.data.message<"u"?`${r.response.data.message}`:`The request to edit a module was made but no response received. +Error: ${(i=r.response)==null?void 0:i.status} ${(s=r.response)==null?void 0:s.statusText}.`,{variant:"error",style:{whiteSpace:"pre-line"}})},onSettled(){t.invalidateQueries({queryKey:["modular","resources","modules","allowed"]}),t.invalidateQueries({queryKey:["modular","model","urdf","modules","map"]}),t.invalidateQueries({queryKey:["modular","model","stats"]})}})}function kde(){const t=mf(),{enqueueSnackbar:e}=wo(),{setMeshId:n,setSelected:r}=Dr();return gg({mutationFn:async i=>(await Yn.delete(`${Es}/model/urdf/modules`,i)).data,onSuccess:(i,s)=>{var o;e(typeof(s==null?void 0:s.params.ids)>"u"?"Deleted last module":`Deleted ${(o=s==null?void 0:s.params.ids)==null?void 0:o.length} modules`,{variant:"success"}),r(i),n()},onError:i=>{var s,o;console.error(i),e(i.response&&typeof i.response.data.message<"u"?`${i.response.data.message}`:`The request to delete a module was made but no response received. +Error: ${(s=i.response)==null?void 0:s.status} ${(o=i.response)==null?void 0:o.statusText}.`,{variant:"error",style:{whiteSpace:"pre-line"}})},onSettled:()=>{t.invalidateQueries({queryKey:["modular","model","urdf","modules","map"]}),t.invalidateQueries({queryKey:["modular","model","stats"]})}})}function Ode(t=!0){return Hu({queryKey:["modular","model","stats"],queryFn:async n=>(await Yn.get(`${Es}/model/stats`,n)).data,enabled:t,refetchOnWindowFocus:!1})}const Nde=async t=>await Yn.get(`${Es}/model/urdf/modules/meshes`,t);function Dde(){return Hu({queryKey:["modular","resources","families"],queryFn:async t=>(await Yn.get(`${Es}/resources/families`,t)).data.families,refetchOnWindowFocus:!1})}function Fde(t,e){let n=["modular","resources","modules"],r={};return e&&(n.push(e),r.families=[e]),Hu({queryKey:n,queryFn:async i=>(await Yn.get(`${Es}/resources/modules`,{...i,params:{...i==null?void 0:i.params,...r}})).data.modules.map(a=>({...a,offsets:typeof a.offsets<"u"?D9(a.offsets):void 0})),enabled:t,refetchOnWindowFocus:!1})}function Ude(t,e){let n=["modular","resources","addons"],r={};return e&&(n.push(e),r.families=[e]),Hu({queryKey:n,queryFn:async i=>(await Yn.get(`${Es}/resources/addons`,{...i,params:{...i==null?void 0:i.params,...r}})).data.addons,enabled:t,refetchOnWindowFocus:!1})}function zde(t,e){let n=["modular","resources","modules","allowed"],r={};return e&&(n.push(e),r.ids=[e]),Hu({queryKey:n,queryFn:async i=>(await Yn.get(`${Es}/resources/modules/allowed`,{...i,params:{...i==null?void 0:i.params,...r}})).data,enabled:t,refetchOnWindowFocus:!1})}const Dr=N9(t=>({meshId:aO(4),setMeshId:async()=>{var e,n;try{const r=await Pde();t(i=>{var s;for(const[o,a]of Object.entries(r))a.value=((s=i.jointMap[o])==null?void 0:s.value)??0;return{...i,meshId:aO(4),jointMap:r}})}catch(r){if(r instanceof Mue)wo().enqueueSnackbar(r.response&&typeof r.response.data.message<"u"?`${r.response.data.message}`:`The request for the updated joint map was made but no response received. +Error: ${(e=r.response)==null?void 0:e.status} ${(n=r.response)==null?void 0:n.statusText}.`,{variant:"error",style:{whiteSpace:"pre-line"}});else throw r}},selected:void 0,setSelected:e=>t(n=>({...n,selected:e})),jointMap:{},setJointMap:e=>t(n=>({...n,jointMap:e})),setJoint:(e,n,r,i,s)=>t(o=>({...o,jointMap:{...o.jointMap,[e]:{type:n,min:r===-1/0?-Math.PI*2:r,max:i===1/0?Math.PI*2:i,value:s??0}}})),setJointValue:(e,n)=>t(r=>({...r,jointMap:{...r.jointMap,[e]:{type:r.jointMap[e].type,min:r.jointMap[e].min,max:r.jointMap[e].max,value:n}}})),removeJoint:e=>t(n=>({...n,jointMap:ry.omit(n.jointMap,e)})),removeAllJoints:()=>t(e=>({...e,jointMap:{}}))}));function nM(){return Hu({queryKey:["modular","workspace","mode"],queryFn:async t=>(await Yn.get(`${Es}/mode`,t)).data.mode,refetchOnWindowFocus:!1})}function Bde(){const t=mf(),{enqueueSnackbar:e}=wo(),n=Dr(i=>i.setMeshId),r=Dr(i=>i.setSelected);return gg({mutationFn:async(i,s)=>await Yn.post(`${Es}/mode`,{mode:i},s),onMutate:async i=>{await t.cancelQueries({queryKey:["modular","workspace","mode"]});const s=t.getQueryData([["modular","workspace","mode"]]);return s&&t.setQueryData([["modular","workspace","mode"]],i),{previousState:s}},onError:(i,s,o)=>{var a,l;console.error(i),e(i.response&&typeof i.response.data.message<"u"?`${i.response.data.message}`:`The request to change worspace mode was made but no response received. +Error: ${(a=i.response)==null?void 0:a.status} ${(l=i.response)==null?void 0:l.statusText}.`,{variant:"error",style:{whiteSpace:"pre-line"}}),o!=null&&o.previousState&&t.setQueryData(["modular","workspace","mode"],o.previousState)},onSuccess:(i,s)=>{e(`Switched mode to ${s}`,{variant:"success"}),r(),n()},onSettled:()=>{t.invalidateQueries({queryKey:["modular","workspace","mode"]}),t.invalidateQueries({queryKey:["modular","resources","modules","allowed"]})}})}function Hde(){return Hu({queryKey:["modular","workspace","mode","discovery"],queryFn:async t=>(await Yn.get(`${Es}/mode/discovery`,t)).data.available,refetchOnWindowFocus:!1})}function $de(){return Hu({queryKey:["modular","workspace","info"],queryFn:async t=>(await Yn.get(`${Es}/info`,t)).data,refetchOnWindowFocus:!1})}function Vde(t,e){return t.type===e.type?t.name{var o;const{enqueueSnackbar:e}=wo(),n=Ude();Zt.useEffect(()=>{var a,l,c;if(n.status==="error"){const f=n.error.response&&typeof n.error.response.data.message<"u"?`Failed to get the list of the available addons. +Error ${(a=n.error.response)==null?void 0:a.status}: ${n.error.response.data.message}`:`Failed to get the list of the available addons. +Error ${(l=n.error.response)==null?void 0:l.status}: ${(c=n.error.response)==null?void 0:c.statusText}.`;e(f,{variant:"error",style:{whiteSpace:"pre-line"}})}});const r=((o=n.data)==null?void 0:o.filter(a=>{var l;return(l=t.validAddons)==null?void 0:l.includes(a.type)}))??[],i=r.length===0,s={};return r.forEach(a=>s[a.name]=a.label),C.jsxs("div",{"aria-label":"addon-selector",children:[C.jsx(mr,{variant:"h3",id:"addons-select-title","aria-label":"addons-select-title",color:i?"text.disabled":void 0,sx:{mt:1,mb:1},children:"Addons"}),C.jsx(Xw,{fullWidth:!0,size:"small",sx:{mb:1},children:C.jsx(X7,{multiple:!0,fullWidth:!0,displayEmpty:!0,id:"addons-select","aria-label":"addons-select",value:t.selected,onChange:t.setAddons,disabled:i,input:t.outlined?C.jsx(qw,{}):C.jsx(RR,{}),renderValue:a=>a.length===0?C.jsx(mr,{component:"em",color:"text.disabled",children:"None"}):a.map(l=>s[l]).join(", "),children:r.sort(Vde).map(a=>C.jsx(ty,{value:a.name,disabled:a.disabled,children:a.label},a.name))})})]})},Wde=({value:t,onChange:e,label:n="Family",ariaLabel:r="modules-family-selector"})=>{const[i,s]=Zt.useState(!1),{enqueueSnackbar:o}=wo(),a=Dde();return Zt.useEffect(()=>{if(a.status==="error"){const l=a.error.response?`(${a.error.response.status}) ${a.error.response.data.message}`:"The request for the list of available families of modules was made but no response was received";o(l,{variant:"error",style:{whiteSpace:"pre-line"}})}}),C.jsx(Kne,{freeSolo:!0,id:r,"aria-label":r,value:t,open:i,onOpen:()=>s(!0),onClose:()=>s(!1),onChange:(l,c)=>{e(c===null||typeof c=="string"?{id:c??"",label:c??"",group:""}:c)},isOptionEqualToValue:(l,c)=>l.id===c.id,getOptionLabel:l=>typeof l=="string"?l:l.label,getOptionDisabled:l=>l.disabled??!1,groupBy:l=>l.group,options:(a.data??[]).sort((l,c)=>-c.group.localeCompare(l.group)),loading:a.status==="pending",renderInput:l=>C.jsx(yg,{...l,label:n,InputProps:{...l.InputProps,endAdornment:C.jsxs(Zt.Fragment,{children:[a.isFetching?C.jsx(ka,{color:"inherit",size:20}):null,l.InputProps.endAdornment]})}})})},jde=lt(dp)(({theme:t})=>({background:t.palette.background.paper,borderColor:t.palette.grey[700]})),Gde=({module:t,disabled:e,...n})=>C.jsx(jde,{color:"inherit",variant:"outlined",size:"small",name:t.name,"aria-label":t.name,disabled:e||t.disabled,...n,children:t.label??t.name});var HR={},c5={};const Xde=Uu(YQ);var lO;function _g(){return lO||(lO=1,function(t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.createSvgIcon}});var e=Xde}(c5)),c5}var qde=pf;Object.defineProperty(HR,"__esModule",{value:!0});var B9=HR.default=void 0,Zde=qde(_g()),Yde=C;B9=HR.default=(0,Zde.default)((0,Yde.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");const Kde=t=>{const e=kde(),{data:n}=U9({enabled:!t.disabled}),r=Dr(i=>{var s;return(s=i.selected)==null?void 0:s.id});return C.jsxs(C.Fragment,{children:[C.jsx(Au,{title:"Delete last module",children:C.jsx("span",{children:C.jsx(Vu,{...t,disabled:t.disabled||Object.keys(n??{}).length===0,onClick:()=>e.mutate(r?{params:{ids:[r]}}:void 0),"aria-label":"delete-button",disableRipple:!0,children:C.jsx(B9,{})})})}),e.isPending&&C.jsx(Uc,{open:!0,"aria-label":"loading-screen",children:C.jsx(ka,{})})]})};var $R={},Qde=pf;Object.defineProperty($R,"__esModule",{value:!0});var H9=$R.default=void 0,Jde=Qde(_g()),efe=C;H9=$R.default=(0,Jde.default)((0,efe.jsx)("path",{d:"M9.19 6.35c-2.04 2.29-3.44 5.58-3.57 5.89L2 10.69l4.05-4.05c.47-.47 1.15-.68 1.81-.55zM11.17 17s3.74-1.55 5.89-3.7c5.4-5.4 4.5-9.62 4.21-10.57-.95-.3-5.17-1.19-10.57 4.21C8.55 9.09 7 12.83 7 12.83zm6.48-2.19c-2.29 2.04-5.58 3.44-5.89 3.57L13.31 22l4.05-4.05c.47-.47.68-1.15.55-1.81zM9 18c0 .83-.34 1.58-.88 2.12C6.94 21.3 2 22 2 22s.7-4.94 1.88-6.12C4.42 15.34 5.17 15 6 15c1.66 0 3 1.34 3 3m4-9c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2"}),"RocketLaunch");const tfe=lt(wR)(()=>({minHeight:"30vh",minWidth:"30vw","& .MuiDialog-paper":{}})),nfe=({open:t,onClose:e,module:n})=>{const{enqueueSnackbar:r}=wo(),i=Ide(),s=Dr(g=>{var v;return(v=g.selected)==null?void 0:v.id}),[o,a]=Zt.useState({...n,offset:{notation:"rpy",ref_frame:""},parent:s,addons:[]}),l=(g,v)=>{a({...o,offset:{...o.offset,[g]:v}})},c=g=>{a({...o,reverse:g.target.checked})},f=g=>{const{target:{value:v}}=g;a({...o,addons:typeof v=="string"?v.split(","):v})},p=()=>i.mutate(o,{onSuccess:()=>{r(`Added ${o.label}`,{variant:"success"}),e(!0)}});return t&&i.isPending?C.jsx(Uc,{open:!0,"aria-label":"loading-screen",children:C.jsx(ka,{})}):C.jsxs(tfe,{open:t,onClose:()=>e(!1),"aria-labelledby":"title-add-module-dialog","aria-describedby":"cofig-add-module-dialog",onKeyUp:g=>g.key==="Enter"&&p(),children:[C.jsx(CR,{id:"title-add-module-dialog",sx:{alignItems:"center",borderBottom:1,borderColor:"divider",marginBottom:"10px"},children:C.jsxs(mr,{variant:"h1",component:"div",children:["Add ",o.label," Module"]})}),C.jsxs(ER,{children:[n.offsets&&Object.keys(n.offsets).length>0&&C.jsx(IB,{offsetValues:o.offset,offsetsRanges:n.offsets,setOffsetEntry:l}),C.jsx(z9,{setAddons:f,selected:o.addons,validAddons:n.addons,outlined:!0}),n.reversible&&C.jsxs(bp,{direction:"row",children:[C.jsx(mr,{variant:"h3",id:"reverse-select-title","aria-label":"reverse-select-title",sx:{mt:1,mb:1},children:"Reverse"}),C.jsx(kl,{color:"primary",checked:o.reverse,onChange:c})]})]}),C.jsxs(MR,{children:[C.jsx(dp,{onClick:()=>e(!1),"aria-label":"cancel-button",children:"Cancel"}),C.jsx(dp,{onClick:p,"aria-label":"add-button",children:"Add Module"})]})]})},rfe=lt(wR)(()=>({minHeight:"30vh",minWidth:"30vw","& .MuiDialog-paper":{}})),ife=({open:t,onClose:e,module:n})=>{const{enqueueSnackbar:r}=wo(),i=Lde(),s=Dr(v=>{var x;return(x=v.selected)==null?void 0:x.id}),o=Dr(v=>v.setMeshId),[a,l]=Zt.useState({...n,offset:{notation:"rpy",ref_frame:""},addons:[]}),c=(v,x)=>{l({...a,offset:{...a.offset,[v]:x}})},f=v=>{l({...a,reverse:v.target.checked})},p=v=>{const{target:{value:x}}=v;l({...a,addons:typeof x=="string"?x.split(","):x})},g=()=>{i.mutate({payload:a,options:s?{params:{ids:[s]}}:void 0},{onSuccess:()=>{r(`Updated ${a.label}`,{variant:"success"}),e(!0)}}),o()};return t&&i.isPending?C.jsx(Uc,{open:!0,"aria-label":"loading-screen",children:C.jsx(ka,{})}):C.jsxs(rfe,{open:t,onClose:()=>e(!1),"aria-labelledby":"title-add-module-dialog","aria-describedby":"cofig-add-module-dialog",onKeyUp:v=>v.key==="Enter"&&g(),children:[C.jsxs(CR,{id:"title-add-module-dialog",sx:{alignItems:"center",borderBottom:1,borderColor:"divider",marginBottom:"10px"},children:[C.jsxs(mr,{variant:"h1",component:"div",children:[a.label," Module"]}),C.jsx(mr,{variant:"subtitle1",component:"div",color:"text.disabled",children:s})]}),C.jsxs(ER,{children:[n.offsets&&Object.keys(n.offsets).length>0&&C.jsx(IB,{offsetValues:a.offset,offsetsRanges:n.offsets,setOffsetEntry:c}),C.jsx(z9,{setAddons:p,selected:a.addons,validAddons:n.addons,outlined:!0}),n.reversible&&C.jsxs(bp,{direction:"row",children:[C.jsx(mr,{variant:"h3",id:"reverse-select-title","aria-label":"reverse-select-title",sx:{mt:1,mb:1},children:"Reverse"}),C.jsx(kl,{color:"primary",checked:a.reverse,onChange:f})]})]}),C.jsxs(MR,{children:[C.jsx(dp,{onClick:()=>e(!1),"aria-label":"cancel-button",children:"Cancel"}),C.jsx(dp,{onClick:g,"aria-label":"save-button",children:"Save"})]})]})},sfe=({onClose:t,...e})=>{const{enqueueSnackbar:n}=wo(),r=Dr(c=>{var f;return(f=c.selected)==null?void 0:f.id}),i=Dr(c=>c.setMeshId),{data:s,...o}=U9({enabled:!!r,id:r});Zt.useEffect(()=>{var c,f,p;if(o.status==="error"){const g=o.error.response&&typeof o.error.response.data.message<"u"?`Failed to get the list of the model's modules. +Error ${(c=o.error.response)==null?void 0:c.status}: ${o.error.response.data.message}`:`Failed to get the list of the model's modules. +Error ${(f=o.error.response)==null?void 0:f.status}: ${(p=o.error.response)==null?void 0:p.statusText}.`;n(g,{variant:"error",style:{whiteSpace:"pre-line"}})}});const a=c=>{c&&i(),t()};if(typeof r>"u"||o.isLoading||typeof s>"u")return C.jsx(Uc,{open:!0,"aria-label":"loading-screen",children:C.jsx(ka,{})});const l=s[r];return C.jsx(ife,{...e,module:l,onClose:a})},ofe=lt(wR)(()=>({minHeight:"30vh",minWidth:"30vw"})),afe=({open:t,onClose:e})=>{const[n,r]=Zt.useState("modularbot"),i=l=>r(l.target.value),s=Ade(),o=Dr(l=>l.jointMap),a={};return Object.entries(o).forEach(([l,c])=>a[l]=c.value),s.isPending?C.jsx(Uc,{open:!0,"aria-label":"loading-screen",children:C.jsx(ka,{})}):C.jsxs(ofe,{open:t,onClose:()=>e(!1),"aria-labelledby":"title-add-module-dialog","aria-describedby":"cofig-add-module-dialog",children:[C.jsx(CR,{id:"title-add-module-dialog",sx:{alignItems:"center",borderBottom:1,borderColor:"divider",marginBottom:"10px"},children:C.jsx(mr,{variant:"h1",component:"div",children:"Deploy Robot"})}),C.jsx(ER,{children:C.jsx(yg,{fullWidth:!0,id:"title-input",label:"Robot Name",variant:"standard",value:n,inputProps:{"aria-label":"mission-title-input"},onChange:i,sx:{mb:1.5}})}),C.jsxs(MR,{children:[C.jsx(dp,{onClick:()=>e(!1),"aria-label":"cancel-button",children:"Cancel"}),C.jsx(dp,{onClick:()=>{s.mutate({name:n,jointMap:a},{onSuccess:()=>e(!0)})},"aria-label":"deploy-button",children:"Deploy"})]})]})};/** + * @license + * Copyright 2010-2024 Three.js Authors + * SPDX-License-Identifier: MIT + */const rM="164",yh={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},xh={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},$9=0,VT=1,V9=2,lfe=3,W9=0,iM=1,Sv=2,Ol=3,Dc=0,yo=1,Do=2,Pu=0,Yh=1,WT=2,jT=3,GT=4,j9=5,Ud=100,G9=101,X9=102,q9=103,Z9=104,Y9=200,K9=201,Q9=202,J9=203,_2=204,b2=205,eU=206,tU=207,nU=208,rU=209,iU=210,sU=211,oU=212,aU=213,lU=214,cU=0,uU=1,dU=2,iy=3,fU=4,hU=5,pU=6,mU=7,cx=0,gU=1,vU=2,Ic=0,yU=1,xU=2,_U=3,VR=4,bU=5,SU=6,wU=7,XT="attached",MU="detached",sM=300,Fu=301,uf=302,sy=303,oy=304,bg=306,wu=1e3,Uo=1001,ay=1002,bs=1003,WR=1004,cfe=1004,a0=1005,ufe=1005,Mi=1006,wv=1007,dfe=1007,Bl=1008,ffe=1008,Fc=1009,EU=1010,CU=1011,jR=1012,GR=1013,fp=1014,ba=1015,Sg=1016,XR=1017,qR=1018,wg=1020,TU=35902,AU=1021,RU=1022,zo=1023,PU=1024,IU=1025,Kh=1026,J0=1027,ZR=1028,YR=1029,LU=1030,KR=1031,QR=1033,RS=33776,PS=33777,IS=33778,LS=33779,qT=35840,ZT=35841,YT=35842,KT=35843,QT=36196,JT=37492,eA=37496,tA=37808,nA=37809,rA=37810,iA=37811,sA=37812,oA=37813,aA=37814,lA=37815,cA=37816,uA=37817,dA=37818,fA=37819,hA=37820,pA=37821,kS=36492,mA=36494,gA=36495,kU=36283,vA=36284,yA=36285,xA=36286,OU=2200,NU=2201,DU=2202,ly=2300,cy=2301,OS=2302,Ph=2400,Ih=2401,uy=2402,oM=2500,JR=2501,hfe=0,pfe=1,mfe=2,FU=3200,UU=3201,vf=0,zU=1,xu="",ho="srgb",Wu="srgb-linear",aM="display-p3",ux="display-p3-linear",dy="linear",Hr="srgb",fy="rec709",hy="p3",gfe=0,_h=7680,vfe=7681,yfe=7682,xfe=7683,_fe=34055,bfe=34056,Sfe=5386,wfe=512,Mfe=513,Efe=514,Cfe=515,Tfe=516,Afe=517,Rfe=518,_A=519,BU=512,HU=513,$U=514,eP=515,VU=516,WU=517,jU=518,GU=519,py=35044,Pfe=35048,Ife=35040,Lfe=35045,kfe=35049,Ofe=35041,Nfe=35046,Dfe=35050,Ffe=35042,Ufe="100",bA="300 es",Ec=2e3,my=2001;class Bc{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const r=this._listeners[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let s=0,o=i.length;s>8&255]+$s[t>>16&255]+$s[t>>24&255]+"-"+$s[e&255]+$s[e>>8&255]+"-"+$s[e>>16&15|64]+$s[e>>24&255]+"-"+$s[n&63|128]+$s[n>>8&255]+"-"+$s[n>>16&255]+$s[n>>24&255]+$s[r&255]+$s[r>>8&255]+$s[r>>16&255]+$s[r>>24&255]).toLowerCase()}function wi(t,e,n){return Math.max(e,Math.min(n,t))}function tP(t,e){return(t%e+e)%e}function zfe(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function Bfe(t,e,n){return t!==e?(n-t)/(e-t):0}function Mv(t,e,n){return(1-n)*t+n*e}function Hfe(t,e,n,r){return Mv(t,e,1-Math.exp(-n*r))}function $fe(t,e=1){return e-Math.abs(tP(t,e*2)-e)}function Vfe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function Wfe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function jfe(t,e){return t+Math.floor(Math.random()*(e-t+1))}function Gfe(t,e){return t+Math.random()*(e-t)}function Xfe(t){return t*(.5-Math.random())}function qfe(t){t!==void 0&&(cO=t);let e=cO+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function Zfe(t){return t*Qh}function Yfe(t){return t*eg}function Kfe(t){return(t&t-1)===0&&t!==0}function Qfe(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Jfe(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function ehe(t,e,n,r,i){const s=Math.cos,o=Math.sin,a=s(n/2),l=o(n/2),c=s((e+r)/2),f=o((e+r)/2),p=s((e-r)/2),g=o((e-r)/2),v=s((r-e)/2),x=o((r-e)/2);switch(i){case"XYX":t.set(a*f,l*p,l*g,a*c);break;case"YZY":t.set(l*g,a*f,l*p,a*c);break;case"ZXZ":t.set(l*p,l*g,a*f,a*c);break;case"XZX":t.set(a*f,l*x,l*v,a*c);break;case"YXY":t.set(l*v,a*f,l*x,a*c);break;case"ZYZ":t.set(l*x,l*v,a*f,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function mo(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function Hn(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const jm={DEG2RAD:Qh,RAD2DEG:eg,generateUUID:Ma,clamp:wi,euclideanModulo:tP,mapLinear:zfe,inverseLerp:Bfe,lerp:Mv,damp:Hfe,pingpong:$fe,smoothstep:Vfe,smootherstep:Wfe,randInt:jfe,randFloat:Gfe,randFloatSpread:Xfe,seededRandom:qfe,degToRad:Zfe,radToDeg:Yfe,isPowerOfTwo:Kfe,ceilPowerOfTwo:Qfe,floorPowerOfTwo:Jfe,setQuaternionFromProperEuler:ehe,normalize:Hn,denormalize:mo};class ct{constructor(e=0,n=0){ct.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(wi(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),s=this.x-e.x,o=this.y-e.y;return this.x=s*r-o*i+e.x,this.y=s*i+o*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Bn{constructor(e,n,r,i,s,o,a,l,c){Bn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,s,o,a,l,c)}set(e,n,r,i,s,o,a,l,c){const f=this.elements;return f[0]=e,f[1]=i,f[2]=a,f[3]=n,f[4]=s,f[5]=l,f[6]=r,f[7]=o,f[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,s=this.elements,o=r[0],a=r[3],l=r[6],c=r[1],f=r[4],p=r[7],g=r[2],v=r[5],x=r[8],_=i[0],b=i[3],y=i[6],S=i[1],w=i[4],T=i[7],L=i[2],R=i[5],P=i[8];return s[0]=o*_+a*S+l*L,s[3]=o*b+a*w+l*R,s[6]=o*y+a*T+l*P,s[1]=c*_+f*S+p*L,s[4]=c*b+f*w+p*R,s[7]=c*y+f*T+p*P,s[2]=g*_+v*S+x*L,s[5]=g*b+v*w+x*R,s[8]=g*y+v*T+x*P,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],f=e[8];return n*o*f-n*a*c-r*s*f+r*a*l+i*s*c-i*o*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],f=e[8],p=f*o-a*c,g=a*l-f*s,v=c*s-o*l,x=n*p+r*g+i*v;if(x===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/x;return e[0]=p*_,e[1]=(i*c-f*r)*_,e[2]=(a*r-i*o)*_,e[3]=g*_,e[4]=(f*n-i*l)*_,e[5]=(i*s-a*n)*_,e[6]=v*_,e[7]=(r*l-c*n)*_,e[8]=(o*n-r*s)*_,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(r*l,r*c,-r*(l*o+c*a)+o+e,-i*c,i*l,-i*(-c*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(u5.makeScale(e,n)),this}rotate(e){return this.premultiply(u5.makeRotation(-e)),this}translate(e,n){return this.premultiply(u5.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const u5=new Bn;function XU(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const the={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function l0(t,e){return new the[t](e)}function gy(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function qU(){const t=gy("canvas");return t.style.display="block",t}const uO={};function ZU(t){t in uO||(uO[t]=!0,console.warn(t))}const dO=new Bn().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),fO=new Bn().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),ub={[Wu]:{transfer:dy,primaries:fy,toReference:t=>t,fromReference:t=>t},[ho]:{transfer:Hr,primaries:fy,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[ux]:{transfer:dy,primaries:hy,toReference:t=>t.applyMatrix3(fO),fromReference:t=>t.applyMatrix3(dO)},[aM]:{transfer:Hr,primaries:hy,toReference:t=>t.convertSRGBToLinear().applyMatrix3(fO),fromReference:t=>t.applyMatrix3(dO).convertLinearToSRGB()}},nhe=new Set([Wu,ux]),br={enabled:!0,_workingColorSpace:Wu,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!nhe.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=ub[e].toReference,i=ub[n].fromReference;return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return ub[t].primaries},getTransfer:function(t){return t===xu?dy:ub[t].transfer}};function b0(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function d5(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let ym;class YU{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{ym===void 0&&(ym=gy("canvas")),ym.width=e.width,ym.height=e.height;const r=ym.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=ym}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=gy("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),s=i.data;for(let o=0;o0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==sM)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case wu:e.x=e.x-Math.floor(e.x);break;case Uo:e.x=e.x<0?0:1;break;case ay:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case wu:e.y=e.y-Math.floor(e.y);break;case Uo:e.y=e.y<0?0:1;break;case ay:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Yr.DEFAULT_IMAGE=null;Yr.DEFAULT_MAPPING=sM;Yr.DEFAULT_ANISOTROPY=1;class Sr{constructor(e=0,n=0,r=0,i=1){Sr.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,r,i){return this.x=e,this.y=n,this.z=r,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,s=this.w,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i+o[12]*s,this.y=o[1]*n+o[5]*r+o[9]*i+o[13]*s,this.z=o[2]*n+o[6]*r+o[10]*i+o[14]*s,this.w=o[3]*n+o[7]*r+o[11]*i+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,s;const l=e.elements,c=l[0],f=l[4],p=l[8],g=l[1],v=l[5],x=l[9],_=l[2],b=l[6],y=l[10];if(Math.abs(f-g)<.01&&Math.abs(p-_)<.01&&Math.abs(x-b)<.01){if(Math.abs(f+g)<.1&&Math.abs(p+_)<.1&&Math.abs(x+b)<.1&&Math.abs(c+v+y-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const w=(c+1)/2,T=(v+1)/2,L=(y+1)/2,R=(f+g)/4,P=(p+_)/4,F=(x+b)/4;return w>T&&w>L?w<.01?(r=0,i=.707106781,s=.707106781):(r=Math.sqrt(w),i=R/r,s=P/r):T>L?T<.01?(r=.707106781,i=0,s=.707106781):(i=Math.sqrt(T),r=R/i,s=F/i):L<.01?(r=.707106781,i=.707106781,s=0):(s=Math.sqrt(L),r=P/s,i=F/s),this.set(r,i,s,n),this}let S=Math.sqrt((b-x)*(b-x)+(p-_)*(p-_)+(g-f)*(g-f));return Math.abs(S)<.001&&(S=1),this.x=(b-x)/S,this.y=(p-_)/S,this.z=(g-f)/S,this.w=Math.acos((c+v+y-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class KU extends Bc{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Sr(0,0,e,n),this.scissorTest=!1,this.viewport=new Sr(0,0,e,n);const i={width:e,height:n,depth:1};r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Mi,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},r);const s=new Yr(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace);s.flipY=!1,s.generateMipmaps=r.generateMipmaps,s.internalFormat=r.internalFormat,this.textures=[];const o=r.count;for(let a=0;a=0?1:-1,w=1-y*y;if(w>Number.EPSILON){const L=Math.sqrt(w),R=Math.atan2(L,y*S);b=Math.sin(b*R)/L,a=Math.sin(a*R)/L}const T=a*S;if(l=l*b+g*T,c=c*b+v*T,f=f*b+x*T,p=p*b+_*T,b===1-a){const L=1/Math.sqrt(l*l+c*c+f*f+p*p);l*=L,c*=L,f*=L,p*=L}}e[n]=l,e[n+1]=c,e[n+2]=f,e[n+3]=p}static multiplyQuaternionsFlat(e,n,r,i,s,o){const a=r[i],l=r[i+1],c=r[i+2],f=r[i+3],p=s[o],g=s[o+1],v=s[o+2],x=s[o+3];return e[n]=a*x+f*p+l*v-c*g,e[n+1]=l*x+f*g+c*p-a*v,e[n+2]=c*x+f*v+a*g-l*p,e[n+3]=f*x-a*p-l*g-c*v,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,r,i){return this._x=e,this._y=n,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){const r=e._x,i=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(r/2),f=a(i/2),p=a(s/2),g=l(r/2),v=l(i/2),x=l(s/2);switch(o){case"XYZ":this._x=g*f*p+c*v*x,this._y=c*v*p-g*f*x,this._z=c*f*x+g*v*p,this._w=c*f*p-g*v*x;break;case"YXZ":this._x=g*f*p+c*v*x,this._y=c*v*p-g*f*x,this._z=c*f*x-g*v*p,this._w=c*f*p+g*v*x;break;case"ZXY":this._x=g*f*p-c*v*x,this._y=c*v*p+g*f*x,this._z=c*f*x+g*v*p,this._w=c*f*p-g*v*x;break;case"ZYX":this._x=g*f*p-c*v*x,this._y=c*v*p+g*f*x,this._z=c*f*x-g*v*p,this._w=c*f*p+g*v*x;break;case"YZX":this._x=g*f*p+c*v*x,this._y=c*v*p+g*f*x,this._z=c*f*x-g*v*p,this._w=c*f*p-g*v*x;break;case"XZY":this._x=g*f*p-c*v*x,this._y=c*v*p-g*f*x,this._z=c*f*x+g*v*p,this._w=c*f*p+g*v*x;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],s=n[8],o=n[1],a=n[5],l=n[9],c=n[2],f=n[6],p=n[10],g=r+a+p;if(g>0){const v=.5/Math.sqrt(g+1);this._w=.25/v,this._x=(f-l)*v,this._y=(s-c)*v,this._z=(o-i)*v}else if(r>a&&r>p){const v=2*Math.sqrt(1+r-a-p);this._w=(f-l)/v,this._x=.25*v,this._y=(i+o)/v,this._z=(s+c)/v}else if(a>p){const v=2*Math.sqrt(1+a-r-p);this._w=(s-c)/v,this._x=(i+o)/v,this._y=.25*v,this._z=(l+f)/v}else{const v=2*Math.sqrt(1+p-r-a);this._w=(o-i)/v,this._x=(s+c)/v,this._y=(l+f)/v,this._z=.25*v}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(wi(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const r=e._x,i=e._y,s=e._z,o=e._w,a=n._x,l=n._y,c=n._z,f=n._w;return this._x=r*f+o*a+i*c-s*l,this._y=i*f+o*l+s*a-r*c,this._z=s*f+o*c+r*l-i*a,this._w=o*f-r*a-i*l-s*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,s=this._z,o=this._w;let a=o*e._w+r*e._x+i*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=r,this._y=i,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const v=1-n;return this._w=v*o+n*this._w,this._x=v*r+n*this._x,this._y=v*i+n*this._y,this._z=v*s+n*this._z,this.normalize(),this}const c=Math.sqrt(l),f=Math.atan2(c,a),p=Math.sin((1-n)*f)/c,g=Math.sin(n*f)/c;return this._w=o*p+this._w*g,this._x=r*p+this._x*g,this._y=i*p+this._y*g,this._z=s*p+this._z*g,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),r=Math.random(),i=Math.sqrt(1-r),s=Math.sqrt(r);return this.set(i*Math.sin(e),i*Math.cos(e),s*Math.sin(n),s*Math.cos(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class K{constructor(e=0,n=0,r=0){K.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(hO.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(hO.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,s=e.elements;return this.x=s[0]*n+s[3]*r+s[6]*i,this.y=s[1]*n+s[4]*r+s[7]*i,this.z=s[2]*n+s[5]*r+s[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,s=e.elements,o=1/(s[3]*n+s[7]*r+s[11]*i+s[15]);return this.x=(s[0]*n+s[4]*r+s[8]*i+s[12])*o,this.y=(s[1]*n+s[5]*r+s[9]*i+s[13])*o,this.z=(s[2]*n+s[6]*r+s[10]*i+s[14])*o,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*i-a*r),f=2*(a*n-s*i),p=2*(s*r-o*n);return this.x=n+l*c+o*p-a*f,this.y=r+l*f+a*c-s*p,this.z=i+l*p+s*f-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i,this.y=s[1]*n+s[5]*r+s[9]*i,this.z=s[2]*n+s[6]*r+s[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,s=e.z,o=n.x,a=n.y,l=n.z;return this.x=i*l-s*a,this.y=s*o-r*l,this.z=r*a-i*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return h5.copy(this).projectOnVector(e),this.sub(h5)}reflect(e){return this.sub(h5.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(wi(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,n=Math.random()*2-1,r=Math.sqrt(1-n*n);return this.x=r*Math.cos(e),this.y=n,this.z=r*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const h5=new K,hO=new sr;class xo{constructor(e=new K(1/0,1/0,1/0),n=new K(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;nthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Rl),Rl.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(O1),fb.subVectors(this.max,O1),xm.subVectors(e.a,O1),_m.subVectors(e.b,O1),bm.subVectors(e.c,O1),Md.subVectors(_m,xm),Ed.subVectors(bm,_m),th.subVectors(xm,bm);let n=[0,-Md.z,Md.y,0,-Ed.z,Ed.y,0,-th.z,th.y,Md.z,0,-Md.x,Ed.z,0,-Ed.x,th.z,0,-th.x,-Md.y,Md.x,0,-Ed.y,Ed.x,0,-th.y,th.x,0];return!p5(n,xm,_m,bm,fb)||(n=[1,0,0,0,1,0,0,0,1],!p5(n,xm,_m,bm,fb))?!1:(hb.crossVectors(Md,Ed),n=[hb.x,hb.y,hb.z],p5(n,xm,_m,bm,fb))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Rl).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Rl).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(au[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),au[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),au[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),au[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),au[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),au[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),au[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),au[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(au),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const au=[new K,new K,new K,new K,new K,new K,new K,new K],Rl=new K,db=new xo,xm=new K,_m=new K,bm=new K,Md=new K,Ed=new K,th=new K,O1=new K,fb=new K,hb=new K,nh=new K;function p5(t,e,n,r,i){for(let s=0,o=t.length-3;s<=o;s+=3){nh.fromArray(t,s);const a=i.x*Math.abs(nh.x)+i.y*Math.abs(nh.y)+i.z*Math.abs(nh.z),l=e.dot(nh),c=n.dot(nh),f=r.dot(nh);if(Math.max(-Math.max(l,c,f),Math.min(l,c,f))>a)return!1}return!0}const ahe=new xo,N1=new K,m5=new K;class Xs{constructor(e=new K,n=-1){this.isSphere=!0,this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):ahe.setFromPoints(e).getCenter(r);let i=0;for(let s=0,o=e.length;sthis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;N1.subVectors(e,this.center);const n=N1.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(N1,i/r),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(m5.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(N1.copy(e.center).add(m5)),this.expandByPoint(N1.copy(e.center).sub(m5))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const lu=new K,g5=new K,pb=new K,Cd=new K,v5=new K,mb=new K,y5=new K;class wp{constructor(e=new K,n=new K(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,lu)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=lu.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(lu.copy(this.origin).addScaledVector(this.direction,n),lu.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){g5.copy(e).add(n).multiplyScalar(.5),pb.copy(n).sub(e).normalize(),Cd.copy(this.origin).sub(g5);const s=e.distanceTo(n)*.5,o=-this.direction.dot(pb),a=Cd.dot(this.direction),l=-Cd.dot(pb),c=Cd.lengthSq(),f=Math.abs(1-o*o);let p,g,v,x;if(f>0)if(p=o*l-a,g=o*a-l,x=s*f,p>=0)if(g>=-x)if(g<=x){const _=1/f;p*=_,g*=_,v=p*(p+o*g+2*a)+g*(o*p+g+2*l)+c}else g=s,p=Math.max(0,-(o*g+a)),v=-p*p+g*(g+2*l)+c;else g=-s,p=Math.max(0,-(o*g+a)),v=-p*p+g*(g+2*l)+c;else g<=-x?(p=Math.max(0,-(-o*s+a)),g=p>0?-s:Math.min(Math.max(-s,-l),s),v=-p*p+g*(g+2*l)+c):g<=x?(p=0,g=Math.min(Math.max(-s,-l),s),v=g*(g+2*l)+c):(p=Math.max(0,-(o*s+a)),g=p>0?s:Math.min(Math.max(-s,-l),s),v=-p*p+g*(g+2*l)+c);else g=o>0?-s:s,p=Math.max(0,-(o*g+a)),v=-p*p+g*(g+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,p),i&&i.copy(g5).addScaledVector(pb,g),v}intersectSphere(e,n){lu.subVectors(e.center,this.origin);const r=lu.dot(this.direction),i=lu.dot(lu)-r*r,s=e.radius*e.radius;if(i>s)return null;const o=Math.sqrt(s-i),a=r-o,l=r+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,s,o,a,l;const c=1/this.direction.x,f=1/this.direction.y,p=1/this.direction.z,g=this.origin;return c>=0?(r=(e.min.x-g.x)*c,i=(e.max.x-g.x)*c):(r=(e.max.x-g.x)*c,i=(e.min.x-g.x)*c),f>=0?(s=(e.min.y-g.y)*f,o=(e.max.y-g.y)*f):(s=(e.max.y-g.y)*f,o=(e.min.y-g.y)*f),r>o||s>i||((s>r||isNaN(r))&&(r=s),(o=0?(a=(e.min.z-g.z)*p,l=(e.max.z-g.z)*p):(a=(e.max.z-g.z)*p,l=(e.min.z-g.z)*p),r>l||a>i)||((a>r||r!==r)&&(r=a),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,lu)!==null}intersectTriangle(e,n,r,i,s){v5.subVectors(n,e),mb.subVectors(r,e),y5.crossVectors(v5,mb);let o=this.direction.dot(y5),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Cd.subVectors(this.origin,e);const l=a*this.direction.dot(mb.crossVectors(Cd,mb));if(l<0)return null;const c=a*this.direction.dot(v5.cross(Cd));if(c<0||l+c>o)return null;const f=-a*Cd.dot(y5);return f<0?null:this.at(f/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Jt{constructor(e,n,r,i,s,o,a,l,c,f,p,g,v,x,_,b){Jt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,r,i,s,o,a,l,c,f,p,g,v,x,_,b)}set(e,n,r,i,s,o,a,l,c,f,p,g,v,x,_,b){const y=this.elements;return y[0]=e,y[4]=n,y[8]=r,y[12]=i,y[1]=s,y[5]=o,y[9]=a,y[13]=l,y[2]=c,y[6]=f,y[10]=p,y[14]=g,y[3]=v,y[7]=x,y[11]=_,y[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Jt().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/Sm.setFromMatrixColumn(e,0).length(),s=1/Sm.setFromMatrixColumn(e,1).length(),o=1/Sm.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*s,n[5]=r[5]*s,n[6]=r[6]*s,n[7]=0,n[8]=r[8]*o,n[9]=r[9]*o,n[10]=r[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,s=e.z,o=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),f=Math.cos(s),p=Math.sin(s);if(e.order==="XYZ"){const g=o*f,v=o*p,x=a*f,_=a*p;n[0]=l*f,n[4]=-l*p,n[8]=c,n[1]=v+x*c,n[5]=g-_*c,n[9]=-a*l,n[2]=_-g*c,n[6]=x+v*c,n[10]=o*l}else if(e.order==="YXZ"){const g=l*f,v=l*p,x=c*f,_=c*p;n[0]=g+_*a,n[4]=x*a-v,n[8]=o*c,n[1]=o*p,n[5]=o*f,n[9]=-a,n[2]=v*a-x,n[6]=_+g*a,n[10]=o*l}else if(e.order==="ZXY"){const g=l*f,v=l*p,x=c*f,_=c*p;n[0]=g-_*a,n[4]=-o*p,n[8]=x+v*a,n[1]=v+x*a,n[5]=o*f,n[9]=_-g*a,n[2]=-o*c,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const g=o*f,v=o*p,x=a*f,_=a*p;n[0]=l*f,n[4]=x*c-v,n[8]=g*c+_,n[1]=l*p,n[5]=_*c+g,n[9]=v*c-x,n[2]=-c,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const g=o*l,v=o*c,x=a*l,_=a*c;n[0]=l*f,n[4]=_-g*p,n[8]=x*p+v,n[1]=p,n[5]=o*f,n[9]=-a*f,n[2]=-c*f,n[6]=v*p+x,n[10]=g-_*p}else if(e.order==="XZY"){const g=o*l,v=o*c,x=a*l,_=a*c;n[0]=l*f,n[4]=-p,n[8]=c*f,n[1]=g*p+_,n[5]=o*f,n[9]=v*p-x,n[2]=x*p-v,n[6]=a*f,n[10]=_*p+g}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(lhe,e,che)}lookAt(e,n,r){const i=this.elements;return da.subVectors(e,n),da.lengthSq()===0&&(da.z=1),da.normalize(),Td.crossVectors(r,da),Td.lengthSq()===0&&(Math.abs(r.z)===1?da.x+=1e-4:da.z+=1e-4,da.normalize(),Td.crossVectors(r,da)),Td.normalize(),gb.crossVectors(da,Td),i[0]=Td.x,i[4]=gb.x,i[8]=da.x,i[1]=Td.y,i[5]=gb.y,i[9]=da.y,i[2]=Td.z,i[6]=gb.z,i[10]=da.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,s=this.elements,o=r[0],a=r[4],l=r[8],c=r[12],f=r[1],p=r[5],g=r[9],v=r[13],x=r[2],_=r[6],b=r[10],y=r[14],S=r[3],w=r[7],T=r[11],L=r[15],R=i[0],P=i[4],F=i[8],O=i[12],I=i[1],H=i[5],Q=i[9],q=i[13],le=i[2],ie=i[6],ee=i[10],ue=i[14],z=i[3],te=i[7],oe=i[11],de=i[15];return s[0]=o*R+a*I+l*le+c*z,s[4]=o*P+a*H+l*ie+c*te,s[8]=o*F+a*Q+l*ee+c*oe,s[12]=o*O+a*q+l*ue+c*de,s[1]=f*R+p*I+g*le+v*z,s[5]=f*P+p*H+g*ie+v*te,s[9]=f*F+p*Q+g*ee+v*oe,s[13]=f*O+p*q+g*ue+v*de,s[2]=x*R+_*I+b*le+y*z,s[6]=x*P+_*H+b*ie+y*te,s[10]=x*F+_*Q+b*ee+y*oe,s[14]=x*O+_*q+b*ue+y*de,s[3]=S*R+w*I+T*le+L*z,s[7]=S*P+w*H+T*ie+L*te,s[11]=S*F+w*Q+T*ee+L*oe,s[15]=S*O+w*q+T*ue+L*de,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],f=e[2],p=e[6],g=e[10],v=e[14],x=e[3],_=e[7],b=e[11],y=e[15];return x*(+s*l*p-i*c*p-s*a*g+r*c*g+i*a*v-r*l*v)+_*(+n*l*v-n*c*g+s*o*g-i*o*v+i*c*f-s*l*f)+b*(+n*c*p-n*a*v-s*o*p+r*o*v+s*a*f-r*c*f)+y*(-i*a*f-n*l*p+n*a*g+i*o*p-r*o*g+r*l*f)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],f=e[8],p=e[9],g=e[10],v=e[11],x=e[12],_=e[13],b=e[14],y=e[15],S=p*b*c-_*g*c+_*l*v-a*b*v-p*l*y+a*g*y,w=x*g*c-f*b*c-x*l*v+o*b*v+f*l*y-o*g*y,T=f*_*c-x*p*c+x*a*v-o*_*v-f*a*y+o*p*y,L=x*p*l-f*_*l-x*a*g+o*_*g+f*a*b-o*p*b,R=n*S+r*w+i*T+s*L;if(R===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/R;return e[0]=S*P,e[1]=(_*g*s-p*b*s-_*i*v+r*b*v+p*i*y-r*g*y)*P,e[2]=(a*b*s-_*l*s+_*i*c-r*b*c-a*i*y+r*l*y)*P,e[3]=(p*l*s-a*g*s-p*i*c+r*g*c+a*i*v-r*l*v)*P,e[4]=w*P,e[5]=(f*b*s-x*g*s+x*i*v-n*b*v-f*i*y+n*g*y)*P,e[6]=(x*l*s-o*b*s-x*i*c+n*b*c+o*i*y-n*l*y)*P,e[7]=(o*g*s-f*l*s+f*i*c-n*g*c-o*i*v+n*l*v)*P,e[8]=T*P,e[9]=(x*p*s-f*_*s-x*r*v+n*_*v+f*r*y-n*p*y)*P,e[10]=(o*_*s-x*a*s+x*r*c-n*_*c-o*r*y+n*a*y)*P,e[11]=(f*a*s-o*p*s-f*r*c+n*p*c+o*r*v-n*a*v)*P,e[12]=L*P,e[13]=(f*_*i-x*p*i+x*r*g-n*_*g-f*r*b+n*p*b)*P,e[14]=(x*a*i-o*_*i-x*r*l+n*_*l+o*r*b-n*a*b)*P,e[15]=(o*p*i-f*a*i+f*r*l-n*p*l-o*r*g+n*a*g)*P,this}scale(e){const n=this.elements,r=e.x,i=e.y,s=e.z;return n[0]*=r,n[4]*=i,n[8]*=s,n[1]*=r,n[5]*=i,n[9]*=s,n[2]*=r,n[6]*=i,n[10]*=s,n[3]*=r,n[7]*=i,n[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,r,i))}makeTranslation(e,n,r){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),s=1-r,o=e.x,a=e.y,l=e.z,c=s*o,f=s*a;return this.set(c*o+r,c*a-i*l,c*l+i*a,0,c*a+i*l,f*a+r,f*l-i*o,0,c*l-i*a,f*l+i*o,s*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,s,o){return this.set(1,r,s,0,e,1,o,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,s=n._x,o=n._y,a=n._z,l=n._w,c=s+s,f=o+o,p=a+a,g=s*c,v=s*f,x=s*p,_=o*f,b=o*p,y=a*p,S=l*c,w=l*f,T=l*p,L=r.x,R=r.y,P=r.z;return i[0]=(1-(_+y))*L,i[1]=(v+T)*L,i[2]=(x-w)*L,i[3]=0,i[4]=(v-T)*R,i[5]=(1-(g+y))*R,i[6]=(b+S)*R,i[7]=0,i[8]=(x+w)*P,i[9]=(b-S)*P,i[10]=(1-(g+_))*P,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let s=Sm.set(i[0],i[1],i[2]).length();const o=Sm.set(i[4],i[5],i[6]).length(),a=Sm.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),e.x=i[12],e.y=i[13],e.z=i[14],Pl.copy(this);const c=1/s,f=1/o,p=1/a;return Pl.elements[0]*=c,Pl.elements[1]*=c,Pl.elements[2]*=c,Pl.elements[4]*=f,Pl.elements[5]*=f,Pl.elements[6]*=f,Pl.elements[8]*=p,Pl.elements[9]*=p,Pl.elements[10]*=p,n.setFromRotationMatrix(Pl),r.x=s,r.y=o,r.z=a,this}makePerspective(e,n,r,i,s,o,a=Ec){const l=this.elements,c=2*s/(n-e),f=2*s/(r-i),p=(n+e)/(n-e),g=(r+i)/(r-i);let v,x;if(a===Ec)v=-(o+s)/(o-s),x=-2*o*s/(o-s);else if(a===my)v=-o/(o-s),x=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=p,l[12]=0,l[1]=0,l[5]=f,l[9]=g,l[13]=0,l[2]=0,l[6]=0,l[10]=v,l[14]=x,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,s,o,a=Ec){const l=this.elements,c=1/(n-e),f=1/(r-i),p=1/(o-s),g=(n+e)*c,v=(r+i)*f;let x,_;if(a===Ec)x=(o+s)*p,_=-2*p;else if(a===my)x=s*p,_=-1*p;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-g,l[1]=0,l[5]=2*f,l[9]=0,l[13]=-v,l[2]=0,l[6]=0,l[10]=_,l[14]=-x,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const Sm=new K,Pl=new Jt,lhe=new K(0,0,0),che=new K(1,1,1),Td=new K,gb=new K,da=new K,pO=new Jt,mO=new sr;class ns{constructor(e=0,n=0,r=0,i=ns.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,r=!0){const i=e.elements,s=i[0],o=i[4],a=i[8],l=i[1],c=i[5],f=i[9],p=i[2],g=i[6],v=i[10];switch(n){case"XYZ":this._y=Math.asin(wi(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-f,v),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(g,c),this._z=0);break;case"YXZ":this._x=Math.asin(-wi(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(a,v),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-p,s),this._z=0);break;case"ZXY":this._x=Math.asin(wi(g,-1,1)),Math.abs(g)<.9999999?(this._y=Math.atan2(-p,v),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-wi(p,-1,1)),Math.abs(p)<.9999999?(this._x=Math.atan2(g,v),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(wi(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-f,c),this._y=Math.atan2(-p,s)):(this._x=0,this._y=Math.atan2(a,v));break;case"XZY":this._z=Math.asin(-wi(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(g,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-f,v),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return pO.makeRotationFromQuaternion(e),this.setFromRotationMatrix(pO,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return mO.setFromEuler(this),this.setFromQuaternion(mO,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}ns.DEFAULT_ORDER="XYZ";class Jh{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,f=l.length;c0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),f.length>0&&(r.images=f),p.length>0&&(r.shapes=p),g.length>0&&(r.skeletons=g),v.length>0&&(r.animations=v),x.length>0&&(r.nodes=x)}return r.object=i,r;function o(a){const l=[];for(const c in a){const f=a[c];delete f.metadata,l.push(f)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(e,n,r,i,s){Il.subVectors(i,n),uu.subVectors(r,n),_5.subVectors(e,n);const o=Il.dot(Il),a=Il.dot(uu),l=Il.dot(_5),c=uu.dot(uu),f=uu.dot(_5),p=o*c-a*a;if(p===0)return s.set(0,0,0),null;const g=1/p,v=(c*l-a*f)*g,x=(o*f-a*l)*g;return s.set(1-v-x,x,v)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,du)===null?!1:du.x>=0&&du.y>=0&&du.x+du.y<=1}static getInterpolation(e,n,r,i,s,o,a,l){return this.getBarycoord(e,n,r,i,du)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,du.x),l.addScaledVector(o,du.y),l.addScaledVector(a,du.z),l)}static isFrontFacing(e,n,r,i){return Il.subVectors(r,n),uu.subVectors(e,n),Il.cross(uu).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Il.subVectors(this.c,this.b),uu.subVectors(this.a,this.b),Il.cross(uu).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return xa.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return xa.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,r,i,s){return xa.getInterpolation(e,this.a,this.b,this.c,n,r,i,s)}containsPoint(e){return xa.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return xa.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,s=this.c;let o,a;Em.subVectors(i,r),Cm.subVectors(s,r),b5.subVectors(e,r);const l=Em.dot(b5),c=Cm.dot(b5);if(l<=0&&c<=0)return n.copy(r);S5.subVectors(e,i);const f=Em.dot(S5),p=Cm.dot(S5);if(f>=0&&p<=f)return n.copy(i);const g=l*p-f*c;if(g<=0&&l>=0&&f<=0)return o=l/(l-f),n.copy(r).addScaledVector(Em,o);w5.subVectors(e,s);const v=Em.dot(w5),x=Cm.dot(w5);if(x>=0&&v<=x)return n.copy(s);const _=v*c-l*x;if(_<=0&&c>=0&&x<=0)return a=c/(c-x),n.copy(r).addScaledVector(Cm,a);const b=f*x-v*p;if(b<=0&&p-f>=0&&v-x>=0)return bO.subVectors(s,i),a=(p-f)/(p-f+(v-x)),n.copy(i).addScaledVector(bO,a);const y=1/(b+_+g);return o=_*y,a=g*y,n.copy(r).addScaledVector(Em,o).addScaledVector(Cm,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const QU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ad={h:0,s:0,l:0},yb={h:0,s:0,l:0};function M5(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class It{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,r)}set(e,n,r){if(n===void 0&&r===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,n,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=ho){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,br.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=br.workingColorSpace){return this.r=e,this.g=n,this.b=r,br.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=br.workingColorSpace){if(e=tP(e,1),n=wi(n,0,1),r=wi(r,0,1),n===0)this.r=this.g=this.b=r;else{const s=r<=.5?r*(1+n):r+n-r*n,o=2*r-s;this.r=M5(o,s,e+1/3),this.g=M5(o,s,e),this.b=M5(o,s,e-1/3)}return br.toWorkingColorSpace(this,i),this}setStyle(e,n=ho){function r(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,n);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,n);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=i[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(s,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=ho){const r=QU[e.toLowerCase()];return r!==void 0?this.setHex(r,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=b0(e.r),this.g=b0(e.g),this.b=b0(e.b),this}copyLinearToSRGB(e){return this.r=d5(e.r),this.g=d5(e.g),this.b=d5(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=ho){return br.fromWorkingColorSpace(Vs.copy(this),e),Math.round(wi(Vs.r*255,0,255))*65536+Math.round(wi(Vs.g*255,0,255))*256+Math.round(wi(Vs.b*255,0,255))}getHexString(e=ho){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=br.workingColorSpace){br.fromWorkingColorSpace(Vs.copy(this),n);const r=Vs.r,i=Vs.g,s=Vs.b,o=Math.max(r,i,s),a=Math.min(r,i,s);let l,c;const f=(a+o)/2;if(a===o)l=0,c=0;else{const p=o-a;switch(c=f<=.5?p/(o+a):p/(2-o-a),o){case r:l=(i-s)/p+(i0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(r.dispersion=this.dispersion),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapRotation!==void 0&&(r.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==Yh&&(r.blending=this.blending),this.side!==Dc&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==_2&&(r.blendSrc=this.blendSrc),this.blendDst!==b2&&(r.blendDst=this.blendDst),this.blendEquation!==Ud&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==iy&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==_A&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==_h&&(r.stencilFail=this.stencilFail),this.stencilZFail!==_h&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==_h&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(n){const s=i(e.textures),o=i(e.images);s.length>0&&(r.textures=s),o.length>0&&(r.images=o)}return r}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let s=0;s!==i;++s)r[s]=n[s].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class pl extends Ds{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new It(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ns,this.combine=cx,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const _u=mhe();function mhe(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(r[l]=0,r[l|256]=32768,i[l]=24,i[l|256]=24):c<-14?(r[l]=1024>>-c-14,r[l|256]=1024>>-c-14|32768,i[l]=-c-1,i[l|256]=-c-1):c<=15?(r[l]=c+15<<10,r[l|256]=c+15<<10|32768,i[l]=13,i[l|256]=13):c<128?(r[l]=31744,r[l|256]=64512,i[l]=24,i[l|256]=24):(r[l]=31744,r[l|256]=64512,i[l]=13,i[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,f=0;for(;!(c&8388608);)c<<=1,f-=8388608;c&=-8388609,f+=947912704,s[l]=c|f}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:s,exponentTable:o,offsetTable:a}}function Lo(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=wi(t,-65504,65504),_u.floatView[0]=t;const e=_u.uint32View[0],n=e>>23&511;return _u.baseTable[n]+((e&8388607)>>_u.shiftTable[n])}function nv(t){const e=t>>10;return _u.uint32View[0]=_u.mantissaTable[_u.offsetTable[e]+(t&1023)]+_u.exponentTable[e],_u.floatView[0]}const ghe={toHalfFloat:Lo,fromHalfFloat:nv},$i=new K,xb=new ct;class fr{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=py,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=ba,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return ZU("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,s=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],f=[];for(let p=0,g=c.length;p0&&(i[l]=f,s=!0)}s&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const f=i[c];this.setAttribute(c,f.clone(n))}const s=e.morphAttributes;for(const c in s){const f=[],p=s[c];for(let g=0,v=p.length;g0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s(e.far-e.near)**2))&&(SO.copy(s).invert(),rh.copy(e.ray).applyMatrix4(SO),!(r.boundingBox!==null&&rh.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,rh)))}_computeIntersections(e,n,r){let i;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,f=s.attributes.uv1,p=s.attributes.normal,g=s.groups,v=s.drawRange;if(a!==null)if(Array.isArray(o))for(let x=0,_=g.length;x<_;x++){const b=g[x],y=o[b.materialIndex],S=Math.max(b.start,v.start),w=Math.min(a.count,Math.min(b.start+b.count,v.start+v.count));for(let T=S,L=w;Tn.far?null:{distance:c,point:Cb.clone(),object:t}}function Tb(t,e,n,r,i,s,o,a,l,c){t.getVertexPosition(a,Am),t.getVertexPosition(l,Rm),t.getVertexPosition(c,Pm);const f=Mhe(t,e,n,r,Am,Rm,Pm,Eb);if(f){i&&(Sb.fromBufferAttribute(i,a),wb.fromBufferAttribute(i,l),Mb.fromBufferAttribute(i,c),f.uv=xa.getInterpolation(Eb,Am,Rm,Pm,Sb,wb,Mb,new ct)),s&&(Sb.fromBufferAttribute(s,a),wb.fromBufferAttribute(s,l),Mb.fromBufferAttribute(s,c),f.uv1=xa.getInterpolation(Eb,Am,Rm,Pm,Sb,wb,Mb,new ct)),o&&(MO.fromBufferAttribute(o,a),EO.fromBufferAttribute(o,l),CO.fromBufferAttribute(o,c),f.normal=xa.getInterpolation(Eb,Am,Rm,Pm,MO,EO,CO,new K),f.normal.dot(r.direction)>0&&f.normal.multiplyScalar(-1));const p={a,b:l,c,normal:new K,materialIndex:0};xa.getNormal(Am,Rm,Pm,p.normal),f.face=p}return f}class po extends Tn{constructor(e=1,n=1,r=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:s,depthSegments:o};const a=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],f=[],p=[];let g=0,v=0;x("z","y","x",-1,-1,r,n,e,o,s,0),x("z","y","x",1,-1,r,n,-e,o,s,1),x("x","z","y",1,1,e,r,n,i,o,2),x("x","z","y",1,-1,e,r,-n,i,o,3),x("x","y","z",1,-1,e,n,r,i,s,4),x("x","y","z",-1,-1,e,n,-r,i,s,5),this.setIndex(l),this.setAttribute("position",new Ut(c,3)),this.setAttribute("normal",new Ut(f,3)),this.setAttribute("uv",new Ut(p,2));function x(_,b,y,S,w,T,L,R,P,F,O){const I=T/P,H=L/F,Q=T/2,q=L/2,le=R/2,ie=P+1,ee=F+1;let ue=0,z=0;const te=new K;for(let oe=0;oe0?1:-1,f.push(te.x,te.y,te.z),p.push(Ce/P),p.push(1-oe/F),ue+=1}}for(let oe=0;oe0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class dx extends Jn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Jt,this.projectionMatrix=new Jt,this.projectionMatrixInverse=new Jt,this.coordinateSystem=Ec}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Rd=new K,TO=new ct,AO=new ct;let $r=class extends dx{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=eg*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Qh*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return eg*2*Math.atan(Math.tan(Qh*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,n,r){Rd.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Rd.x,Rd.y).multiplyScalar(-e/Rd.z),Rd.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(Rd.x,Rd.y).multiplyScalar(-e/Rd.z)}getViewSize(e,n){return this.getViewBounds(e,TO,AO),n.subVectors(AO,TO)}setViewOffset(e,n,r,i,s,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Qh*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,s=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*i/l,n-=o.offsetY*r/c,i*=o.width/l,r*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}};const Im=-90,Lm=1;class tz extends Jn{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new $r(Im,Lm,e,n);i.layers=this.layers,this.add(i);const s=new $r(Im,Lm,e,n);s.layers=this.layers,this.add(s);const o=new $r(Im,Lm,e,n);o.layers=this.layers,this.add(o);const a=new $r(Im,Lm,e,n);a.layers=this.layers,this.add(a);const l=new $r(Im,Lm,e,n);l.layers=this.layers,this.add(l);const c=new $r(Im,Lm,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,s,o,a,l]=n;for(const c of n)this.remove(c);if(e===Ec)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===my)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,f]=this.children,p=e.getRenderTarget(),g=e.getActiveCubeFace(),v=e.getActiveMipmapLevel(),x=e.xr.enabled;e.xr.enabled=!1;const _=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,s),e.setRenderTarget(r,1,i),e.render(n,o),e.setRenderTarget(r,2,i),e.render(n,a),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,c),r.texture.generateMipmaps=_,e.setRenderTarget(r,5,i),e.render(n,f),e.setRenderTarget(p,g,v),e.xr.enabled=x,r.texture.needsPMREMUpdate=!0}}class fx extends Yr{constructor(e,n,r,i,s,o,a,l,c,f){e=e!==void 0?e:[],n=n!==void 0?n:Fu,super(e,n,r,i,s,o,a,l,c,f),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class nz extends hl{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];this.texture=new fx(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Mi}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},i=new po(5,5,5),s=new Wl({name:"CubemapFromEquirect",uniforms:tg(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:yo,blending:Pu});s.uniforms.tEquirect.value=n;const o=new Vt(i,s),a=n.minFilter;return n.minFilter===Bl&&(n.minFilter=Mi),new tz(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n,r,i){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,r,i);e.setRenderTarget(s)}}const T5=new K,Ahe=new K,Rhe=new Bn;class gu{constructor(e=new K(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,r,i){return this.normal.set(e,n,r),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,r){const i=T5.subVectors(r,n).cross(Ahe.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const r=e.delta(T5),i=this.normal.dot(r);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/i;return s<0||s>1?null:n.copy(e.start).addScaledVector(r,s)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const r=n||Rhe.getNormalMatrix(e),i=this.coplanarPoint(T5).applyMatrix4(e),s=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const ih=new Xs,Ab=new K;class hx{constructor(e=new gu,n=new gu,r=new gu,i=new gu,s=new gu,o=new gu){this.planes=[e,n,r,i,s,o]}set(e,n,r,i,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(s),a[5].copy(o),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,n=Ec){const r=this.planes,i=e.elements,s=i[0],o=i[1],a=i[2],l=i[3],c=i[4],f=i[5],p=i[6],g=i[7],v=i[8],x=i[9],_=i[10],b=i[11],y=i[12],S=i[13],w=i[14],T=i[15];if(r[0].setComponents(l-s,g-c,b-v,T-y).normalize(),r[1].setComponents(l+s,g+c,b+v,T+y).normalize(),r[2].setComponents(l+o,g+f,b+x,T+S).normalize(),r[3].setComponents(l-o,g-f,b-x,T-S).normalize(),r[4].setComponents(l-a,g-p,b-_,T-w).normalize(),n===Ec)r[5].setComponents(l+a,g+p,b+_,T+w).normalize();else if(n===my)r[5].setComponents(a,p,_,w).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),ih.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),ih.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(ih)}intersectsSprite(e){return ih.center.set(0,0,0),ih.radius=.7071067811865476,ih.applyMatrix4(e.matrixWorld),this.intersectsSphere(ih)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let s=0;s<6;s++)if(n[s].distanceToPoint(r)0?e.max.x:e.min.x,Ab.y=i.normal.y>0?e.max.y:e.min.y,Ab.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Ab)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function rz(){let t=null,e=!1,n=null,r=null;function i(s,o){n(s,o),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(s){n=s},setContext:function(s){t=s}}}function Phe(t){const e=new WeakMap;function n(a,l){const c=a.array,f=a.usage,p=c.byteLength,g=t.createBuffer();t.bindBuffer(l,g),t.bufferData(l,c,f),a.onUploadCallback();let v;if(c instanceof Float32Array)v=t.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?v=t.HALF_FLOAT:v=t.UNSIGNED_SHORT;else if(c instanceof Int16Array)v=t.SHORT;else if(c instanceof Uint32Array)v=t.UNSIGNED_INT;else if(c instanceof Int32Array)v=t.INT;else if(c instanceof Int8Array)v=t.BYTE;else if(c instanceof Uint8Array)v=t.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)v=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:g,type:v,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:p}}function r(a,l,c){const f=l.array,p=l._updateRange,g=l.updateRanges;if(t.bindBuffer(c,a),p.count===-1&&g.length===0&&t.bufferSubData(c,0,f),g.length!==0){for(let v=0,x=g.length;v 0 + vec4 plane; + #ifdef ALPHA_TO_COVERAGE + float distanceToPlane, distanceGradient; + float clipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + if ( clipOpacity == 0.0 ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + float unionClipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + } + #pragma unroll_loop_end + clipOpacity *= 1.0 - unionClipOpacity; + #endif + diffuseColor.a *= clipOpacity; + if ( diffuseColor.a == 0.0 ) discard; + #else + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + bool clipped = true; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + } + #pragma unroll_loop_end + if ( clipped ) discard; + #endif + #endif +#endif`,Xhe=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif`,qhe=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,Zhe=`#if NUM_CLIPPING_PLANES > 0 + vClipPosition = - mvPosition.xyz; +#endif`,Yhe=`#if defined( USE_COLOR_ALPHA ) + diffuseColor *= vColor; +#elif defined( USE_COLOR ) + diffuseColor.rgb *= vColor; +#endif`,Khe=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) + varying vec3 vColor; +#endif`,Qhe=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + varying vec3 vColor; +#endif`,Jhe=`#if defined( USE_COLOR_ALPHA ) + vColor = vec4( 1.0 ); +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + vColor = vec3( 1.0 ); +#endif +#ifdef USE_COLOR + vColor *= color; +#endif +#ifdef USE_INSTANCING_COLOR + vColor.xyz *= instanceColor.xyz; +#endif`,epe=`#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 +#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) +float pow2( const in float x ) { return x*x; } +vec3 pow2( const in vec3 x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } +highp float rand( const in vec2 uv ) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + return fract( sin( sn ) * c ); +} +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; +#ifdef USE_ALPHAHASH + varying vec3 vPosition; +#endif +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); +} +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); +} +mat3 transposeMat3( const in mat3 m ) { + mat3 tmp; + tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); + tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); + tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); + return tmp; +} +float luminance( const in vec3 rgb ) { + const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); + return dot( weights, rgb ); +} +bool isPerspectiveMatrix( mat4 m ) { + return m[ 2 ][ 3 ] == - 1.0; +} +vec2 equirectUv( in vec3 dir ) { + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + return vec2( u, v ); +} +vec3 BRDF_Lambert( const in vec3 diffuseColor ) { + return RECIPROCAL_PI * diffuseColor; +} +vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} +float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} // validated`,tpe=`#ifdef ENVMAP_TYPE_CUBE_UV + #define cubeUV_minMipLevel 4.0 + #define cubeUV_minTileSize 16.0 + float getFace( vec3 direction ) { + vec3 absDirection = abs( direction ); + float face = - 1.0; + if ( absDirection.x > absDirection.z ) { + if ( absDirection.x > absDirection.y ) + face = direction.x > 0.0 ? 0.0 : 3.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } else { + if ( absDirection.z > absDirection.y ) + face = direction.z > 0.0 ? 2.0 : 5.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } + return face; + } + vec2 getUV( vec3 direction, float face ) { + vec2 uv; + if ( face == 0.0 ) { + uv = vec2( direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 1.0 ) { + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); + } else if ( face == 2.0 ) { + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); + } else if ( face == 3.0 ) { + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 4.0 ) { + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); + } else { + uv = vec2( direction.x, direction.y ) / abs( direction.z ); + } + return 0.5 * ( uv + 1.0 ); + } + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + float face = getFace( direction ); + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + mipInt = max( mipInt, cubeUV_minMipLevel ); + float faceSize = exp2( mipInt ); + highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; + if ( face > 2.0 ) { + uv.y += faceSize; + face -= 3.0; + } + uv.x += face * faceSize; + uv.x += filterInt * 3.0 * cubeUV_minTileSize; + uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); + uv.x *= CUBEUV_TEXEL_WIDTH; + uv.y *= CUBEUV_TEXEL_HEIGHT; + #ifdef texture2DGradEXT + return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; + #else + return texture2D( envMap, uv ).rgb; + #endif + } + #define cubeUV_r0 1.0 + #define cubeUV_m0 - 2.0 + #define cubeUV_r1 0.8 + #define cubeUV_m1 - 1.0 + #define cubeUV_r4 0.4 + #define cubeUV_m4 2.0 + #define cubeUV_r5 0.305 + #define cubeUV_m5 3.0 + #define cubeUV_r6 0.21 + #define cubeUV_m6 4.0 + float roughnessToMip( float roughness ) { + float mip = 0.0; + if ( roughness >= cubeUV_r1 ) { + mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; + } else if ( roughness >= cubeUV_r4 ) { + mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; + } else if ( roughness >= cubeUV_r5 ) { + mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; + } else if ( roughness >= cubeUV_r6 ) { + mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; + } else { + mip = - 2.0 * log2( 1.16 * roughness ); } + return mip; + } + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); + float mipF = fract( mip ); + float mipInt = floor( mip ); + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + if ( mipF == 0.0 ) { + return vec4( color0, 1.0 ); + } else { + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + return vec4( mix( color0, color1, mipF ), 1.0 ); + } + } +#endif`,npe=`vec3 transformedNormal = objectNormal; +#ifdef USE_TANGENT + vec3 transformedTangent = objectTangent; +#endif +#ifdef USE_BATCHING + mat3 bm = mat3( batchingMatrix ); + transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); + transformedNormal = bm * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = bm * transformedTangent; + #endif +#endif +#ifdef USE_INSTANCING + mat3 im = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); + transformedNormal = im * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = im * transformedTangent; + #endif +#endif +transformedNormal = normalMatrix * transformedNormal; +#ifdef FLIP_SIDED + transformedNormal = - transformedNormal; +#endif +#ifdef USE_TANGENT + transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; + #ifdef FLIP_SIDED + transformedTangent = - transformedTangent; + #endif +#endif`,rpe=`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif`,ipe=`#ifdef USE_DISPLACEMENTMAP + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); +#endif`,spe=`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); + totalEmissiveRadiance *= emissiveColor.rgb; +#endif`,ope=`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif`,ape="gl_FragColor = linearToOutputTexel( gl_FragColor );",lpe=` +const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( + vec3( 0.8224621, 0.177538, 0.0 ), + vec3( 0.0331941, 0.9668058, 0.0 ), + vec3( 0.0170827, 0.0723974, 0.9105199 ) +); +const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( + vec3( 1.2249401, - 0.2249404, 0.0 ), + vec3( - 0.0420569, 1.0420571, 0.0 ), + vec3( - 0.0196376, - 0.0786361, 1.0982735 ) +); +vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { + return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); +} +vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { + return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); +} +vec4 LinearTransferOETF( in vec4 value ) { + return value; +} +vec4 sRGBTransferOETF( in vec4 value ) { + return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); +} +vec4 LinearToLinear( in vec4 value ) { + return value; +} +vec4 LinearTosRGB( in vec4 value ) { + return sRGBTransferOETF( value ); +}`,cpe=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vec3 cameraToFrag; + if ( isOrthographic ) { + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + #else + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + #endif + #else + vec3 reflectVec = vReflect; + #endif + #ifdef ENVMAP_TYPE_CUBE + vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + #else + vec4 envColor = vec4( 0.0 ); + #endif + #ifdef ENVMAP_BLENDING_MULTIPLY + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_MIX ) + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_ADD ) + outgoingLight += envColor.xyz * specularStrength * reflectivity; + #endif +#endif`,upe=`#ifdef USE_ENVMAP + uniform float envMapIntensity; + uniform float flipEnvMap; + uniform mat3 envMapRotation; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif + +#endif`,dpe=`#ifdef USE_ENVMAP + uniform float reflectivity; + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif +#endif`,fpe=`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + #else + varying vec3 vReflect; + uniform float refractionRatio; + #endif +#endif`,hpe=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vWorldPosition = worldPosition.xyz; + #else + vec3 cameraToVertex; + if ( isOrthographic ) { + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vReflect = reflect( cameraToVertex, worldNormal ); + #else + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #endif +#endif`,ppe=`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,mpe=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,gpe=`#ifdef USE_FOG + #ifdef FOG_EXP2 + float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); + #else + float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); + #endif + gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); +#endif`,vpe=`#ifdef USE_FOG + uniform vec3 fogColor; + varying float vFogDepth; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,ype=`#ifdef USE_GRADIENTMAP + uniform sampler2D gradientMap; +#endif +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + #ifdef USE_GRADIENTMAP + return vec3( texture2D( gradientMap, coord ).r ); + #else + vec2 fw = fwidth( coord ) * 0.5; + return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); + #endif +}`,xpe=`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,_pe=`LambertMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularStrength = specularStrength;`,bpe=`varying vec3 vViewPosition; +struct LambertMaterial { + vec3 diffuseColor; + float specularStrength; +}; +void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Lambert +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Spe=`uniform bool receiveShadow; +uniform vec3 ambientLightColor; +#if defined( USE_LIGHT_PROBES ) + uniform vec3 lightProbe[ 9 ]; +#endif +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + float x = normal.x, y = normal.y, z = normal.z; + vec3 result = shCoefficients[ 0 ] * 0.886227; + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + return result; +} +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + return irradiance; +} +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + vec3 irradiance = ambientLightColor; + return irradiance; +} +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + #if defined ( LEGACY_LIGHTS ) + if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { + return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); + } + return 1.0; + #else + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + if ( cutoffDistance > 0.0 ) { + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + } + return distanceFalloff; + #endif +} +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + return smoothstep( coneCosine, penumbraCosine, angleCosine ); +} +#if NUM_DIR_LIGHTS > 0 + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + } +#endif +#if NUM_POINT_LIGHTS > 0 + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = pointLight.position - geometryPosition; + light.direction = normalize( lVector ); + float lightDistance = length( lVector ); + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } +#endif +#if NUM_SPOT_LIGHTS > 0 + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = spotLight.position - geometryPosition; + light.direction = normalize( lVector ); + float angleCos = dot( light.direction, spotLight.direction ); + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + if ( spotAttenuation > 0.0 ) { + float lightDistance = length( lVector ); + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } else { + light.color = vec3( 0.0 ); + light.visible = false; + } + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + uniform sampler2D ltc_1; uniform sampler2D ltc_2; + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; +#endif +#if NUM_HEMI_LIGHTS > 0 + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + return irradiance; + } +#endif`,wpe=`#ifdef USE_ENVMAP + vec3 getIBLIrradiance( const in vec3 normal ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); + return PI * envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 reflectVec = reflect( - viewDir, normal ); + reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); + return envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + #ifdef USE_ANISOTROPY + vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 bentNormal = cross( bitangent, viewDir ); + bentNormal = normalize( cross( bentNormal, bitangent ) ); + bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); + return getIBLRadiance( viewDir, bentNormal, roughness ); + #else + return vec3( 0.0 ); + #endif + } + #endif +#endif`,Mpe=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,Epe=`varying vec3 vViewPosition; +struct ToonMaterial { + vec3 diffuseColor; +}; +void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Cpe=`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength;`,Tpe=`varying vec3 vViewPosition; +struct BlinnPhongMaterial { + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; +}; +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; +} +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Ape=`PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); +vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); +float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); +material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); +#ifdef IOR + material.ior = ior; + #ifdef USE_SPECULAR + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + #ifdef USE_SPECULAR_COLORMAP + specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; + #endif + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + #else + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + #endif + material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; +#endif +#ifdef USE_CLEARCOAT + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + #ifdef USE_CLEARCOATMAP + material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; + #endif + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; + #endif + material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); +#endif +#ifdef USE_DISPERSION + material.dispersion = dispersion; +#endif +#ifdef USE_IRIDESCENCE + material.iridescence = iridescence; + material.iridescenceIOR = iridescenceIOR; + #ifdef USE_IRIDESCENCEMAP + material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; + #endif + #ifdef USE_IRIDESCENCE_THICKNESSMAP + material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; + #else + material.iridescenceThickness = iridescenceThicknessMaximum; + #endif +#endif +#ifdef USE_SHEEN + material.sheenColor = sheenColor; + #ifdef USE_SHEEN_COLORMAP + material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; + #endif + material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); + #ifdef USE_SHEEN_ROUGHNESSMAP + material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; + #endif +#endif +#ifdef USE_ANISOTROPY + #ifdef USE_ANISOTROPYMAP + mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); + vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; + vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; + #else + vec2 anisotropyV = anisotropyVector; + #endif + material.anisotropy = length( anisotropyV ); + if( material.anisotropy == 0.0 ) { + anisotropyV = vec2( 1.0, 0.0 ); + } else { + anisotropyV /= material.anisotropy; + material.anisotropy = saturate( material.anisotropy ); + } + material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); + material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; + material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; +#endif`,Rpe=`struct PhysicalMaterial { + vec3 diffuseColor; + float roughness; + vec3 specularColor; + float specularF90; + float dispersion; + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + #ifdef USE_IRIDESCENCE + float iridescence; + float iridescenceIOR; + float iridescenceThickness; + vec3 iridescenceFresnel; + vec3 iridescenceF0; + #endif + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif + #ifdef IOR + float ior; + #endif + #ifdef USE_TRANSMISSION + float transmission; + float transmissionAlpha; + float thickness; + float attenuationDistance; + vec3 attenuationColor; + #endif + #ifdef USE_ANISOTROPY + float anisotropy; + float alphaT; + vec3 anisotropyT; + vec3 anisotropyB; + #endif +}; +vec3 clearcoatSpecularDirect = vec3( 0.0 ); +vec3 clearcoatSpecularIndirect = vec3( 0.0 ); +vec3 sheenSpecularDirect = vec3( 0.0 ); +vec3 sheenSpecularIndirect = vec3(0.0 ); +vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { + float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); + float x2 = x * x; + float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); + return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); +} +float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + float a2 = pow2( alpha ); + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + return 0.5 / max( gv + gl, EPSILON ); +} +float D_GGX( const in float alpha, const in float dotNH ) { + float a2 = pow2( alpha ); + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; + return RECIPROCAL_PI * a2 / pow2( denom ); +} +#ifdef USE_ANISOTROPY + float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { + float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); + float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); + float v = 0.5 / ( gv + gl ); + return saturate(v); + } + float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { + float a2 = alphaT * alphaB; + highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); + highp float v2 = dot( v, v ); + float w2 = a2 / v2; + return RECIPROCAL_PI * a2 * pow2 ( w2 ); + } +#endif +#ifdef USE_CLEARCOAT + vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { + vec3 f0 = material.clearcoatF0; + float f90 = material.clearcoatF90; + float roughness = material.clearcoatRoughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + return F * ( V * D ); + } +#endif +vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { + vec3 f0 = material.specularColor; + float f90 = material.specularF90; + float roughness = material.roughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + #ifdef USE_IRIDESCENCE + F = mix( F, material.iridescenceFresnel, material.iridescence ); + #endif + #ifdef USE_ANISOTROPY + float dotTL = dot( material.anisotropyT, lightDir ); + float dotTV = dot( material.anisotropyT, viewDir ); + float dotTH = dot( material.anisotropyT, halfDir ); + float dotBL = dot( material.anisotropyB, lightDir ); + float dotBV = dot( material.anisotropyB, viewDir ); + float dotBH = dot( material.anisotropyB, halfDir ); + float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); + float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); + #else + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + #endif + return F * ( V * D ); +} +vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + float dotNV = saturate( dot( N, V ) ); + vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); + uv = uv * LUT_SCALE + LUT_BIAS; + return uv; +} +float LTC_ClippedSphereFormFactor( const in vec3 f ) { + float l = length( f ); + return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); +} +vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { + float x = dot( v1, v2 ); + float y = abs( x ); + float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; + float b = 3.4175940 + ( 4.1616724 + y ) * y; + float v = a / b; + float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + return cross( v1, v2 ) * theta_sintheta; +} +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); + mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + return vec3( result ); +} +#if defined( USE_SHEEN ) +float D_Charlie( float roughness, float dotNH ) { + float alpha = pow2( roughness ); + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); +} +float V_Neubelt( float dotNV, float dotNL ) { + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); +} +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + return sheenColor * ( D * V ); +} +#endif +float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + float r2 = roughness * roughness; + float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; + float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; + float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); + return saturate( DG * RECIPROCAL_PI ); +} +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); + const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); + vec4 r = roughness * c0 + c1; + float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; + vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; + return fab; +} +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + return specularColor * fab.x + specularF90 * fab.y; +} +#ifdef USE_IRIDESCENCE +void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#else +void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#endif + vec2 fab = DFGApprox( normal, viewDir, roughness ); + #ifdef USE_IRIDESCENCE + vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); + #else + vec3 Fr = specularColor; + #endif + vec3 FssEss = Fr * fab.x + specularF90 * fab.y; + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + singleScatter += FssEss; + multiScatter += Fms * Ems; +} +#if NUM_RECT_AREA_LIGHTS > 0 + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + vec3 normal = geometryNormal; + vec3 viewDir = geometryViewDir; + vec3 position = geometryPosition; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + } +#endif +void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #ifdef USE_CLEARCOAT + float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); + vec3 ccIrradiance = dotNLcc * directLight.color; + clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); + #endif + #ifdef USE_SHEEN + sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); + #endif + reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { + #ifdef USE_CLEARCOAT + clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + #ifdef USE_SHEEN + sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); + #endif + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + #ifdef USE_IRIDESCENCE + computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); + #else + computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + #endif + vec3 totalScattering = singleScattering + multiScattering; + vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; +} +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical +float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { + return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); +}`,Ppe=` +vec3 geometryPosition = - vViewPosition; +vec3 geometryNormal = normal; +vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); +vec3 geometryClearcoatNormal = vec3( 0.0 ); +#ifdef USE_CLEARCOAT + geometryClearcoatNormal = clearcoatNormal; +#endif +#ifdef USE_IRIDESCENCE + float dotNVi = saturate( dot( normal, geometryViewDir ) ); + if ( material.iridescenceThickness == 0.0 ) { + material.iridescence = 0.0; + } else { + material.iridescence = saturate( material.iridescence ); + } + if ( material.iridescence > 0.0 ) { + material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); + } +#endif +IncidentLight directLight; +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + getPointLightInfo( pointLight, geometryPosition, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + SpotLight spotLight; + vec4 spotColor; + vec3 spotLightCoord; + bool inSpotLightMap; + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + getSpotLightInfo( spotLight, geometryPosition, directLight ); + #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX + #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS + #else + #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #endif + #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) + spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; + inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); + spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); + directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; + #endif + #undef SPOT_LIGHT_MAP_INDEX + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + RectAreaLight rectAreaLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if defined( RE_IndirectDiffuse ) + vec3 iblIrradiance = vec3( 0.0 ); + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + #if defined( USE_LIGHT_PROBES ) + irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); + #endif + #if ( NUM_HEMI_LIGHTS > 0 ) + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); + } + #pragma unroll_loop_end + #endif +#endif +#if defined( RE_IndirectSpecular ) + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); +#endif`,Ipe=`#if defined( RE_IndirectDiffuse ) + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + irradiance += lightMapIrradiance; + #endif + #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + iblIrradiance += getIBLIrradiance( geometryNormal ); + #endif +#endif +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + #ifdef USE_ANISOTROPY + radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); + #else + radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); + #endif + #ifdef USE_CLEARCOAT + clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); + #endif +#endif`,Lpe=`#if defined( RE_IndirectDiffuse ) + RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); +#endif +#if defined( RE_IndirectSpecular ) + RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); +#endif`,kpe=`#if defined( USE_LOGDEPTHBUF ) + gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,Ope=`#if defined( USE_LOGDEPTHBUF ) + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; +#endif`,Npe=`#ifdef USE_LOGDEPTHBUF + varying float vFragDepth; + varying float vIsPerspective; +#endif`,Dpe=`#ifdef USE_LOGDEPTHBUF + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); +#endif`,Fpe=`#ifdef USE_MAP + vec4 sampledDiffuseColor = texture2D( map, vMapUv ); + #ifdef DECODE_VIDEO_TEXTURE + sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); + + #endif + diffuseColor *= sampledDiffuseColor; +#endif`,Upe=`#ifdef USE_MAP + uniform sampler2D map; +#endif`,zpe=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + #if defined( USE_POINTS_UV ) + vec2 uv = vUv; + #else + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; + #endif +#endif +#ifdef USE_MAP + diffuseColor *= texture2D( map, uv ); +#endif +#ifdef USE_ALPHAMAP + diffuseColor.a *= texture2D( alphaMap, uv ).g; +#endif`,Bpe=`#if defined( USE_POINTS_UV ) + varying vec2 vUv; +#else + #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + uniform mat3 uvTransform; + #endif +#endif +#ifdef USE_MAP + uniform sampler2D map; +#endif +#ifdef USE_ALPHAMAP + uniform sampler2D alphaMap; +#endif`,Hpe=`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); + metalnessFactor *= texelMetalness.b; +#endif`,$pe=`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,Vpe=`#ifdef USE_INSTANCING_MORPH + float morphTargetInfluences[MORPHTARGETS_COUNT]; + float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; + } +#endif`,Wpe=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) + vColor *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + #if defined( USE_COLOR_ALPHA ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; + #elif defined( USE_COLOR ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; + #endif + } +#endif`,jpe=`#ifdef USE_MORPHNORMALS + objectNormal *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; + } + #else + objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; + objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; + objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; + objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; + #endif +#endif`,Gpe=`#ifdef USE_MORPHTARGETS + #ifndef USE_INSTANCING_MORPH + uniform float morphTargetBaseInfluence; + #endif + #ifdef MORPHTARGETS_TEXTURE + #ifndef USE_INSTANCING_MORPH + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + #endif + uniform sampler2DArray morphTargetsTexture; + uniform ivec2 morphTargetsTextureSize; + vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { + int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; + int y = texelIndex / morphTargetsTextureSize.x; + int x = texelIndex - y * morphTargetsTextureSize.x; + ivec3 morphUV = ivec3( x, y, morphTargetIndex ); + return texelFetch( morphTargetsTexture, morphUV, 0 ); + } + #else + #ifndef USE_MORPHNORMALS + uniform float morphTargetInfluences[ 8 ]; + #else + uniform float morphTargetInfluences[ 4 ]; + #endif + #endif +#endif`,Xpe=`#ifdef USE_MORPHTARGETS + transformed *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; + } + #else + transformed += morphTarget0 * morphTargetInfluences[ 0 ]; + transformed += morphTarget1 * morphTargetInfluences[ 1 ]; + transformed += morphTarget2 * morphTargetInfluences[ 2 ]; + transformed += morphTarget3 * morphTargetInfluences[ 3 ]; + #ifndef USE_MORPHNORMALS + transformed += morphTarget4 * morphTargetInfluences[ 4 ]; + transformed += morphTarget5 * morphTargetInfluences[ 5 ]; + transformed += morphTarget6 * morphTargetInfluences[ 6 ]; + transformed += morphTarget7 * morphTargetInfluences[ 7 ]; + #endif + #endif +#endif`,qpe=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#ifdef FLAT_SHADED + vec3 fdx = dFdx( vViewPosition ); + vec3 fdy = dFdy( vViewPosition ); + vec3 normal = normalize( cross( fdx, fdy ) ); +#else + vec3 normal = normalize( vNormal ); + #ifdef DOUBLE_SIDED + normal *= faceDirection; + #endif +#endif +#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) + #ifdef USE_TANGENT + mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn = getTangentFrame( - vViewPosition, normal, + #if defined( USE_NORMALMAP ) + vNormalMapUv + #elif defined( USE_CLEARCOAT_NORMALMAP ) + vClearcoatNormalMapUv + #else + vUv + #endif + ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn[0] *= faceDirection; + tbn[1] *= faceDirection; + #endif +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + #ifdef USE_TANGENT + mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn2[0] *= faceDirection; + tbn2[1] *= faceDirection; + #endif +#endif +vec3 nonPerturbedNormal = normal;`,Zpe=`#ifdef USE_NORMALMAP_OBJECTSPACE + normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + #ifdef FLIP_SIDED + normal = - normal; + #endif + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + normal = normalize( normalMatrix * normal ); +#elif defined( USE_NORMALMAP_TANGENTSPACE ) + vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + mapN.xy *= normalScale; + normal = normalize( tbn * mapN ); +#elif defined( USE_BUMPMAP ) + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); +#endif`,Ype=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,Kpe=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,Qpe=`#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); + #ifdef USE_TANGENT + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + #endif +#endif`,Jpe=`#ifdef USE_NORMALMAP + uniform sampler2D normalMap; + uniform vec2 normalScale; +#endif +#ifdef USE_NORMALMAP_OBJECTSPACE + uniform mat3 normalMatrix; +#endif +#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) + mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { + vec3 q0 = dFdx( eye_pos.xyz ); + vec3 q1 = dFdy( eye_pos.xyz ); + vec2 st0 = dFdx( uv.st ); + vec2 st1 = dFdy( uv.st ); + vec3 N = surf_norm; + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); + return mat3( T * scale, B * scale, N ); + } +#endif`,eme=`#ifdef USE_CLEARCOAT + vec3 clearcoatNormal = nonPerturbedNormal; +#endif`,tme=`#ifdef USE_CLEARCOAT_NORMALMAP + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + clearcoatNormal = normalize( tbn2 * clearcoatMapN ); +#endif`,nme=`#ifdef USE_CLEARCOATMAP + uniform sampler2D clearcoatMap; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform sampler2D clearcoatRoughnessMap; +#endif`,rme=`#ifdef USE_IRIDESCENCEMAP + uniform sampler2D iridescenceMap; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform sampler2D iridescenceThicknessMap; +#endif`,ime=`#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif +#ifdef USE_TRANSMISSION +diffuseColor.a *= material.transmissionAlpha; +#endif +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,sme=`vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} +const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; +const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); +const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); +const float ShiftRight8 = 1. / 256.; +vec4 packDepthToRGBA( const in float v ) { + vec4 r = vec4( fract( v * PackFactors ), v ); + r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; +} +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors ); +} +vec2 packDepthToRG( in highp float v ) { + return packDepthToRGBA( v ).yx; +} +float unpackRGToDepth( const in highp vec2 v ) { + return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); +} +vec4 pack2HalfToRGBA( vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} +vec2 unpackRGBATo2Half( vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + return ( viewZ + near ) / ( near - far ); +} +float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { + return depth * ( near - far ) - near; +} +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} +float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { + return ( near * far ) / ( ( far - near ) * depth - far ); +}`,ome=`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif`,ame=`vec4 mvPosition = vec4( transformed, 1.0 ); +#ifdef USE_BATCHING + mvPosition = batchingMatrix * mvPosition; +#endif +#ifdef USE_INSTANCING + mvPosition = instanceMatrix * mvPosition; +#endif +mvPosition = modelViewMatrix * mvPosition; +gl_Position = projectionMatrix * mvPosition;`,lme=`#ifdef DITHERING + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); +#endif`,cme=`#ifdef DITHERING + vec3 dithering( vec3 color ) { + float grid_position = rand( gl_FragCoord.xy ); + vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); + dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); + return color + dither_shift_RGB; + } +#endif`,ume=`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); + roughnessFactor *= texelRoughness.g; +#endif`,dme=`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,fme=`#if NUM_SPOT_LIGHT_COORDS > 0 + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#if NUM_SPOT_LIGHT_MAPS > 0 + uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); + } + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + } + float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ + float occlusion = 1.0; + vec2 distribution = texture2DDistribution( shadow, uv ); + float hard_shadow = step( compare , distribution.x ); + if (hard_shadow != 1.0 ) { + float distance = compare - distribution.x ; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + } + return occlusion; + } + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + if ( frustumTest ) { + #if defined( SHADOWMAP_TYPE_PCF ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + #elif defined( SHADOWMAP_TYPE_VSM ) + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + #else + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + #endif + } + return shadow; + } + vec2 cubeToUV( vec3 v, float texelSizeY ) { + vec3 absV = abs( v ); + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + vec2 planar = v.xy; + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + if ( absV.z >= almostOne ) { + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + } else if ( absV.x >= almostOne ) { + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + } else if ( absV.y >= almostOne ) { + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + } + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + } + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + float shadow = 1.0; + vec3 lightToPosition = shadowCoord.xyz; + + float lightToPositionLength = length( lightToPosition ); + if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { + float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; + vec3 bd3D = normalize( lightToPosition ); + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + shadow = ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + #else + shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + #endif + } + return shadow; + } +#endif`,hme=`#if NUM_SPOT_LIGHT_COORDS > 0 + uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif +#endif`,pme=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) + vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + vec4 shadowWorldPosition; +#endif +#if defined( USE_SHADOWMAP ) + #if NUM_DIR_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif +#endif +#if NUM_SPOT_LIGHT_COORDS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { + shadowWorldPosition = worldPosition; + #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; + #endif + vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end +#endif`,mme=`float getShadowMask() { + float shadow = 1.0; + #ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + } + #pragma unroll_loop_end + #endif + #endif + return shadow; +}`,gme=`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,vme=`#ifdef USE_SKINNING + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + uniform highp sampler2D boneTexture; + mat4 getBoneMatrix( const in float i ) { + int size = textureSize( boneTexture, 0 ).x; + int j = int( i ) * 4; + int x = j % size; + int y = j / size; + vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); + vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); + vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); + vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); + return mat4( v1, v2, v3, v4 ); + } +#endif`,yme=`#ifdef USE_SKINNING + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + transformed = ( bindMatrixInverse * skinned ).xyz; +#endif`,xme=`#ifdef USE_SKINNING + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + #ifdef USE_TANGENT + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #endif +#endif`,_me=`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,bme=`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,Sme=`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif`,wme=`#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +uniform float toneMappingExposure; +vec3 LinearToneMapping( vec3 color ) { + return saturate( toneMappingExposure * color ); +} +vec3 ReinhardToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); +} +vec3 OptimizedCineonToneMapping( vec3 color ) { + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); +} +vec3 RRTAndODTFit( vec3 v ) { + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; +} +vec3 ACESFilmicToneMapping( vec3 color ) { + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + color *= toneMappingExposure / 0.6; + color = ACESInputMat * color; + color = RRTAndODTFit( color ); + color = ACESOutputMat * color; + return saturate( color ); +} +const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( + vec3( 1.6605, - 0.1246, - 0.0182 ), + vec3( - 0.5876, 1.1329, - 0.1006 ), + vec3( - 0.0728, - 0.0083, 1.1187 ) +); +const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( + vec3( 0.6274, 0.0691, 0.0164 ), + vec3( 0.3293, 0.9195, 0.0880 ), + vec3( 0.0433, 0.0113, 0.8956 ) +); +vec3 agxDefaultContrastApprox( vec3 x ) { + vec3 x2 = x * x; + vec3 x4 = x2 * x2; + return + 15.5 * x4 * x2 + - 40.14 * x4 * x + + 31.96 * x4 + - 6.868 * x2 * x + + 0.4298 * x2 + + 0.1191 * x + - 0.00232; +} +vec3 AgXToneMapping( vec3 color ) { + const mat3 AgXInsetMatrix = mat3( + vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), + vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), + vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) + ); + const mat3 AgXOutsetMatrix = mat3( + vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), + vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), + vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) + ); + const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; + color *= toneMappingExposure; + color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; + color = AgXInsetMatrix * color; + color = max( color, 1e-10 ); color = log2( color ); + color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); + color = clamp( color, 0.0, 1.0 ); + color = agxDefaultContrastApprox( color ); + color = AgXOutsetMatrix * color; + color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); + color = LINEAR_REC2020_TO_LINEAR_SRGB * color; + color = clamp( color, 0.0, 1.0 ); + return color; +} +vec3 NeutralToneMapping( vec3 color ) { + const float StartCompression = 0.8 - 0.04; + const float Desaturation = 0.15; + color *= toneMappingExposure; + float x = min( color.r, min( color.g, color.b ) ); + float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; + color -= offset; + float peak = max( color.r, max( color.g, color.b ) ); + if ( peak < StartCompression ) return color; + float d = 1. - StartCompression; + float newPeak = 1. - d * d / ( peak + d - StartCompression ); + color *= newPeak / peak; + float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); + return mix( color, vec3( newPeak ), g ); +} +vec3 CustomToneMapping( vec3 color ) { return color; }`,Mme=`#ifdef USE_TRANSMISSION + material.transmission = transmission; + material.transmissionAlpha = 1.0; + material.thickness = thickness; + material.attenuationDistance = attenuationDistance; + material.attenuationColor = attenuationColor; + #ifdef USE_TRANSMISSIONMAP + material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; + #endif + #ifdef USE_THICKNESSMAP + material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; + #endif + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = inverseTransformDirection( normal, viewMatrix ); + vec4 transmitted = getIBLVolumeRefraction( + n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, + material.attenuationColor, material.attenuationDistance ); + material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); + totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); +#endif`,Eme=`#ifdef USE_TRANSMISSION + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + #ifdef USE_TRANSMISSIONMAP + uniform sampler2D transmissionMap; + #endif + #ifdef USE_THICKNESSMAP + uniform sampler2D thicknessMap; + #endif + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + varying vec3 vWorldPosition; + float w0( float a ) { + return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); + } + float w1( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); + } + float w2( float a ){ + return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); + } + float w3( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * a ); + } + float g0( float a ) { + return w0( a ) + w1( a ); + } + float g1( float a ) { + return w2( a ) + w3( a ); + } + float h0( float a ) { + return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); + } + float h1( float a ) { + return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); + } + vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { + uv = uv * texelSize.zw + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + float g0x = g0( fuv.x ); + float g1x = g1( fuv.x ); + float h0x = h0( fuv.x ); + float h1x = h1( fuv.x ); + float h0y = h0( fuv.y ); + float h1y = h1( fuv.y ); + vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); + } + vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { + vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); + vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); + vec2 fLodSizeInv = 1.0 / fLodSize; + vec2 cLodSizeInv = 1.0 / cLodSize; + vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); + vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); + return mix( fSample, cSample, fract( lod ) ); + } + vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + return normalize( refractionVector ) * thickness * modelScale; + } + float applyIorToRoughness( const in float roughness, const in float ior ) { + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + } + vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { + float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); + } + vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { + if ( isinf( attenuationDistance ) ) { + return vec3( 1.0 ); + } else { + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; + } + } + vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, + const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, + const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, + const in vec3 attenuationColor, const in float attenuationDistance ) { + vec4 transmittedLight; + vec3 transmittance; + #ifdef USE_DISPERSION + float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; + vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); + for ( int i = 0; i < 3; i ++ ) { + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + + vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); + transmittedLight[ i ] = transmissionSample[ i ]; + transmittedLight.a += transmissionSample.a; + transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; + } + transmittedLight.a /= 3.0; + + #else + + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); + + #endif + vec3 attenuatedColor = transmittance * transmittedLight.rgb; + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; + return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); + } +#endif`,Cme=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + varying vec2 vNormalMapUv; +#endif +#ifdef USE_EMISSIVEMAP + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_SPECULARMAP + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,Tme=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + uniform mat3 mapTransform; + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + uniform mat3 alphaMapTransform; + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + uniform mat3 lightMapTransform; + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + uniform mat3 aoMapTransform; + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + uniform mat3 bumpMapTransform; + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + uniform mat3 normalMapTransform; + varying vec2 vNormalMapUv; +#endif +#ifdef USE_DISPLACEMENTMAP + uniform mat3 displacementMapTransform; + varying vec2 vDisplacementMapUv; +#endif +#ifdef USE_EMISSIVEMAP + uniform mat3 emissiveMapTransform; + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + uniform mat3 metalnessMapTransform; + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + uniform mat3 roughnessMapTransform; + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + uniform mat3 anisotropyMapTransform; + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + uniform mat3 clearcoatMapTransform; + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform mat3 clearcoatNormalMapTransform; + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform mat3 clearcoatRoughnessMapTransform; + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + uniform mat3 sheenColorMapTransform; + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + uniform mat3 sheenRoughnessMapTransform; + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + uniform mat3 iridescenceMapTransform; + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform mat3 iridescenceThicknessMapTransform; + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SPECULARMAP + uniform mat3 specularMapTransform; + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + uniform mat3 specularColorMapTransform; + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + uniform mat3 specularIntensityMapTransform; + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,Ame=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + vUv = vec3( uv, 1 ).xy; +#endif +#ifdef USE_MAP + vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ALPHAMAP + vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_LIGHTMAP + vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_AOMAP + vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_BUMPMAP + vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_NORMALMAP + vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_DISPLACEMENTMAP + vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_EMISSIVEMAP + vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_METALNESSMAP + vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ROUGHNESSMAP + vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ANISOTROPYMAP + vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOATMAP + vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCEMAP + vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_COLORMAP + vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULARMAP + vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_COLORMAP + vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_TRANSMISSIONMAP + vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_THICKNESSMAP + vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; +#endif`,Rme=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 + vec4 worldPosition = vec4( transformed, 1.0 ); + #ifdef USE_BATCHING + worldPosition = batchingMatrix * worldPosition; + #endif + #ifdef USE_INSTANCING + worldPosition = instanceMatrix * worldPosition; + #endif + worldPosition = modelMatrix * worldPosition; +#endif`;const Pme=`varying vec2 vUv; +uniform mat3 uvTransform; +void main() { + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + gl_Position = vec4( position.xy, 1.0, 1.0 ); +}`,Ime=`uniform sampler2D t2D; +uniform float backgroundIntensity; +varying vec2 vUv; +void main() { + vec4 texColor = texture2D( t2D, vUv ); + #ifdef DECODE_VIDEO_TEXTURE + texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,Lme=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,kme=`#ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; +#elif defined( ENVMAP_TYPE_CUBE_UV ) + uniform sampler2D envMap; +#endif +uniform float flipEnvMap; +uniform float backgroundBlurriness; +uniform float backgroundIntensity; +uniform mat3 backgroundRotation; +varying vec3 vWorldDirection; +#include +void main() { + #ifdef ENVMAP_TYPE_CUBE + vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); + #else + vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,Ome=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,Nme=`uniform samplerCube tCube; +uniform float tFlip; +uniform float opacity; +varying vec3 vWorldDirection; +void main() { + vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); + gl_FragColor = texColor; + gl_FragColor.a *= opacity; + #include + #include +}`,Dme=`#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vHighPrecisionZW = gl_Position.zw; +}`,Fme=`#if DEPTH_PACKING == 3200 + uniform float opacity; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + vec4 diffuseColor = vec4( 1.0 ); + #include + #if DEPTH_PACKING == 3200 + diffuseColor.a = opacity; + #endif + #include + #include + #include + #include + #include + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + #if DEPTH_PACKING == 3200 + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + #elif DEPTH_PACKING == 3201 + gl_FragColor = packDepthToRGBA( fragCoordZ ); + #endif +}`,Ume=`#define DISTANCE +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vWorldPosition = worldPosition.xyz; +}`,zme=`#define DISTANCE +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +#include +void main () { + vec4 diffuseColor = vec4( 1.0 ); + #include + #include + #include + #include + #include + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); + gl_FragColor = packDepthToRGBA( dist ); +}`,Bme=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include +}`,Hme=`uniform sampler2D tEquirect; +varying vec3 vWorldDirection; +#include +void main() { + vec3 direction = normalize( vWorldDirection ); + vec2 sampleUV = equirectUv( direction ); + gl_FragColor = texture2D( tEquirect, sampleUV ); + #include + #include +}`,$me=`uniform float scale; +attribute float lineDistance; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vLineDistance = scale * lineDistance; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,Vme=`uniform vec3 diffuse; +uniform float opacity; +uniform float dashSize; +uniform float totalSize; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + if ( mod( vLineDistance, totalSize ) > dashSize ) { + discard; + } + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,Wme=`#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,jme=`uniform vec3 diffuse; +uniform float opacity; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; + #else + reflectedLight.indirectDiffuse += vec3( 1.0 ); + #endif + #include + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + vec3 outgoingLight = reflectedLight.indirectDiffuse; + #include + #include + #include + #include + #include + #include + #include +}`,Gme=`#define LAMBERT +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,Xme=`#define LAMBERT +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,qme=`#define MATCAP +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; +}`,Zme=`#define MATCAP +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; + #ifdef USE_MATCAP + vec4 matcapColor = texture2D( matcap, uv ); + #else + vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); + #endif + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + #include + #include + #include + #include + #include + #include +}`,Yme=`#define NORMAL +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + vViewPosition = - mvPosition.xyz; +#endif +}`,Kme=`#define NORMAL +uniform float opacity; +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); + #include + #include + #include + #include + gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); + #ifdef OPAQUE + gl_FragColor.a = 1.0; + #endif +}`,Qme=`#define PHONG +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,Jme=`#define PHONG +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,e0e=`#define STANDARD +varying vec3 vViewPosition; +#ifdef USE_TRANSMISSION + varying vec3 vWorldPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +#ifdef USE_TRANSMISSION + vWorldPosition = worldPosition.xyz; +#endif +}`,t0e=`#define STANDARD +#ifdef PHYSICAL + #define IOR + #define USE_SPECULAR +#endif +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; +#ifdef IOR + uniform float ior; +#endif +#ifdef USE_SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + #ifdef USE_SPECULAR_COLORMAP + uniform sampler2D specularColorMap; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif +#endif +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif +#ifdef USE_DISPERSION + uniform float dispersion; +#endif +#ifdef USE_IRIDESCENCE + uniform float iridescence; + uniform float iridescenceIOR; + uniform float iridescenceThicknessMinimum; + uniform float iridescenceThicknessMaximum; +#endif +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + #ifdef USE_SHEEN_COLORMAP + uniform sampler2D sheenColorMap; + #endif + #ifdef USE_SHEEN_ROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif +#ifdef USE_ANISOTROPY + uniform vec2 anisotropyVector; + #ifdef USE_ANISOTROPYMAP + uniform sampler2D anisotropyMap; + #endif +#endif +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + #include + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + #ifdef USE_SHEEN + float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); + outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; + #endif + #ifdef USE_CLEARCOAT + float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; + #endif + #include + #include + #include + #include + #include + #include +}`,n0e=`#define TOON +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +}`,r0e=`#define TOON +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include +}`,i0e=`uniform float size; +uniform float scale; +#include +#include +#include +#include +#include +#include +#ifdef USE_POINTS_UV + varying vec2 vUv; + uniform mat3 uvTransform; +#endif +void main() { + #ifdef USE_POINTS_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + #endif + #include + #include + #include + #include + #include + #include + gl_PointSize = size; + #ifdef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + #endif + #include + #include + #include + #include +}`,s0e=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,o0e=`#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,a0e=`uniform vec3 color; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + #include + #include + #include +}`,l0e=`uniform float rotation; +uniform vec2 center; +#include +#include +#include +#include +#include +void main() { + #include + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + #ifndef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + #endif + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + gl_Position = projectionMatrix * mvPosition; + #include + #include + #include +}`,c0e=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include +}`,Vn={alphahash_fragment:Ihe,alphahash_pars_fragment:Lhe,alphamap_fragment:khe,alphamap_pars_fragment:Ohe,alphatest_fragment:Nhe,alphatest_pars_fragment:Dhe,aomap_fragment:Fhe,aomap_pars_fragment:Uhe,batching_pars_vertex:zhe,batching_vertex:Bhe,begin_vertex:Hhe,beginnormal_vertex:$he,bsdfs:Vhe,iridescence_fragment:Whe,bumpmap_pars_fragment:jhe,clipping_planes_fragment:Ghe,clipping_planes_pars_fragment:Xhe,clipping_planes_pars_vertex:qhe,clipping_planes_vertex:Zhe,color_fragment:Yhe,color_pars_fragment:Khe,color_pars_vertex:Qhe,color_vertex:Jhe,common:epe,cube_uv_reflection_fragment:tpe,defaultnormal_vertex:npe,displacementmap_pars_vertex:rpe,displacementmap_vertex:ipe,emissivemap_fragment:spe,emissivemap_pars_fragment:ope,colorspace_fragment:ape,colorspace_pars_fragment:lpe,envmap_fragment:cpe,envmap_common_pars_fragment:upe,envmap_pars_fragment:dpe,envmap_pars_vertex:fpe,envmap_physical_pars_fragment:wpe,envmap_vertex:hpe,fog_vertex:ppe,fog_pars_vertex:mpe,fog_fragment:gpe,fog_pars_fragment:vpe,gradientmap_pars_fragment:ype,lightmap_pars_fragment:xpe,lights_lambert_fragment:_pe,lights_lambert_pars_fragment:bpe,lights_pars_begin:Spe,lights_toon_fragment:Mpe,lights_toon_pars_fragment:Epe,lights_phong_fragment:Cpe,lights_phong_pars_fragment:Tpe,lights_physical_fragment:Ape,lights_physical_pars_fragment:Rpe,lights_fragment_begin:Ppe,lights_fragment_maps:Ipe,lights_fragment_end:Lpe,logdepthbuf_fragment:kpe,logdepthbuf_pars_fragment:Ope,logdepthbuf_pars_vertex:Npe,logdepthbuf_vertex:Dpe,map_fragment:Fpe,map_pars_fragment:Upe,map_particle_fragment:zpe,map_particle_pars_fragment:Bpe,metalnessmap_fragment:Hpe,metalnessmap_pars_fragment:$pe,morphinstance_vertex:Vpe,morphcolor_vertex:Wpe,morphnormal_vertex:jpe,morphtarget_pars_vertex:Gpe,morphtarget_vertex:Xpe,normal_fragment_begin:qpe,normal_fragment_maps:Zpe,normal_pars_fragment:Ype,normal_pars_vertex:Kpe,normal_vertex:Qpe,normalmap_pars_fragment:Jpe,clearcoat_normal_fragment_begin:eme,clearcoat_normal_fragment_maps:tme,clearcoat_pars_fragment:nme,iridescence_pars_fragment:rme,opaque_fragment:ime,packing:sme,premultiplied_alpha_fragment:ome,project_vertex:ame,dithering_fragment:lme,dithering_pars_fragment:cme,roughnessmap_fragment:ume,roughnessmap_pars_fragment:dme,shadowmap_pars_fragment:fme,shadowmap_pars_vertex:hme,shadowmap_vertex:pme,shadowmask_pars_fragment:mme,skinbase_vertex:gme,skinning_pars_vertex:vme,skinning_vertex:yme,skinnormal_vertex:xme,specularmap_fragment:_me,specularmap_pars_fragment:bme,tonemapping_fragment:Sme,tonemapping_pars_fragment:wme,transmission_fragment:Mme,transmission_pars_fragment:Eme,uv_pars_fragment:Cme,uv_pars_vertex:Tme,uv_vertex:Ame,worldpos_vertex:Rme,background_vert:Pme,background_frag:Ime,backgroundCube_vert:Lme,backgroundCube_frag:kme,cube_vert:Ome,cube_frag:Nme,depth_vert:Dme,depth_frag:Fme,distanceRGBA_vert:Ume,distanceRGBA_frag:zme,equirect_vert:Bme,equirect_frag:Hme,linedashed_vert:$me,linedashed_frag:Vme,meshbasic_vert:Wme,meshbasic_frag:jme,meshlambert_vert:Gme,meshlambert_frag:Xme,meshmatcap_vert:qme,meshmatcap_frag:Zme,meshnormal_vert:Yme,meshnormal_frag:Kme,meshphong_vert:Qme,meshphong_frag:Jme,meshphysical_vert:e0e,meshphysical_frag:t0e,meshtoon_vert:n0e,meshtoon_frag:r0e,points_vert:i0e,points_frag:s0e,shadow_vert:o0e,shadow_frag:a0e,sprite_vert:l0e,sprite_frag:c0e},Ot={common:{diffuse:{value:new It(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Bn},alphaMap:{value:null},alphaMapTransform:{value:new Bn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Bn}},envmap:{envMap:{value:null},envMapRotation:{value:new Bn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Bn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Bn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Bn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Bn},normalScale:{value:new ct(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Bn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Bn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Bn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Bn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new It(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new It(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Bn},alphaTest:{value:0},uvTransform:{value:new Bn}},sprite:{diffuse:{value:new It(16777215)},opacity:{value:1},center:{value:new ct(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Bn},alphaMap:{value:null},alphaMapTransform:{value:new Bn},alphaTest:{value:0}}},Ul={basic:{uniforms:oo([Ot.common,Ot.specularmap,Ot.envmap,Ot.aomap,Ot.lightmap,Ot.fog]),vertexShader:Vn.meshbasic_vert,fragmentShader:Vn.meshbasic_frag},lambert:{uniforms:oo([Ot.common,Ot.specularmap,Ot.envmap,Ot.aomap,Ot.lightmap,Ot.emissivemap,Ot.bumpmap,Ot.normalmap,Ot.displacementmap,Ot.fog,Ot.lights,{emissive:{value:new It(0)}}]),vertexShader:Vn.meshlambert_vert,fragmentShader:Vn.meshlambert_frag},phong:{uniforms:oo([Ot.common,Ot.specularmap,Ot.envmap,Ot.aomap,Ot.lightmap,Ot.emissivemap,Ot.bumpmap,Ot.normalmap,Ot.displacementmap,Ot.fog,Ot.lights,{emissive:{value:new It(0)},specular:{value:new It(1118481)},shininess:{value:30}}]),vertexShader:Vn.meshphong_vert,fragmentShader:Vn.meshphong_frag},standard:{uniforms:oo([Ot.common,Ot.envmap,Ot.aomap,Ot.lightmap,Ot.emissivemap,Ot.bumpmap,Ot.normalmap,Ot.displacementmap,Ot.roughnessmap,Ot.metalnessmap,Ot.fog,Ot.lights,{emissive:{value:new It(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Vn.meshphysical_vert,fragmentShader:Vn.meshphysical_frag},toon:{uniforms:oo([Ot.common,Ot.aomap,Ot.lightmap,Ot.emissivemap,Ot.bumpmap,Ot.normalmap,Ot.displacementmap,Ot.gradientmap,Ot.fog,Ot.lights,{emissive:{value:new It(0)}}]),vertexShader:Vn.meshtoon_vert,fragmentShader:Vn.meshtoon_frag},matcap:{uniforms:oo([Ot.common,Ot.bumpmap,Ot.normalmap,Ot.displacementmap,Ot.fog,{matcap:{value:null}}]),vertexShader:Vn.meshmatcap_vert,fragmentShader:Vn.meshmatcap_frag},points:{uniforms:oo([Ot.points,Ot.fog]),vertexShader:Vn.points_vert,fragmentShader:Vn.points_frag},dashed:{uniforms:oo([Ot.common,Ot.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Vn.linedashed_vert,fragmentShader:Vn.linedashed_frag},depth:{uniforms:oo([Ot.common,Ot.displacementmap]),vertexShader:Vn.depth_vert,fragmentShader:Vn.depth_frag},normal:{uniforms:oo([Ot.common,Ot.bumpmap,Ot.normalmap,Ot.displacementmap,{opacity:{value:1}}]),vertexShader:Vn.meshnormal_vert,fragmentShader:Vn.meshnormal_frag},sprite:{uniforms:oo([Ot.sprite,Ot.fog]),vertexShader:Vn.sprite_vert,fragmentShader:Vn.sprite_frag},background:{uniforms:{uvTransform:{value:new Bn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Vn.background_vert,fragmentShader:Vn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Bn}},vertexShader:Vn.backgroundCube_vert,fragmentShader:Vn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Vn.cube_vert,fragmentShader:Vn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Vn.equirect_vert,fragmentShader:Vn.equirect_frag},distanceRGBA:{uniforms:oo([Ot.common,Ot.displacementmap,{referencePosition:{value:new K},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Vn.distanceRGBA_vert,fragmentShader:Vn.distanceRGBA_frag},shadow:{uniforms:oo([Ot.lights,Ot.fog,{color:{value:new It(0)},opacity:{value:1}}]),vertexShader:Vn.shadow_vert,fragmentShader:Vn.shadow_frag}};Ul.physical={uniforms:oo([Ul.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Bn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Bn},clearcoatNormalScale:{value:new ct(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Bn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Bn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Bn},sheen:{value:0},sheenColor:{value:new It(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Bn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Bn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Bn},transmissionSamplerSize:{value:new ct},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Bn},attenuationDistance:{value:0},attenuationColor:{value:new It(0)},specularColor:{value:new It(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Bn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Bn},anisotropyVector:{value:new ct},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Bn}}]),vertexShader:Vn.meshphysical_vert,fragmentShader:Vn.meshphysical_frag};const Rb={r:0,b:0,g:0},sh=new ns,u0e=new Jt;function d0e(t,e,n,r,i,s,o){const a=new It(0);let l=s===!0?0:1,c,f,p=null,g=0,v=null;function x(S){let w=S.isScene===!0?S.background:null;return w&&w.isTexture&&(w=(S.backgroundBlurriness>0?n:e).get(w)),w}function _(S){let w=!1;const T=x(S);T===null?y(a,l):T&&T.isColor&&(y(T,1),w=!0);const L=t.xr.getEnvironmentBlendMode();L==="additive"?r.buffers.color.setClear(0,0,0,1,o):L==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,o),(t.autoClear||w)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil)}function b(S,w){const T=x(w);T&&(T.isCubeTexture||T.mapping===bg)?(f===void 0&&(f=new Vt(new po(1,1,1),new Wl({name:"BackgroundCubeMaterial",uniforms:tg(Ul.backgroundCube.uniforms),vertexShader:Ul.backgroundCube.vertexShader,fragmentShader:Ul.backgroundCube.fragmentShader,side:yo,depthTest:!1,depthWrite:!1,fog:!1})),f.geometry.deleteAttribute("normal"),f.geometry.deleteAttribute("uv"),f.onBeforeRender=function(L,R,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(f.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(f)),sh.copy(w.backgroundRotation),sh.x*=-1,sh.y*=-1,sh.z*=-1,T.isCubeTexture&&T.isRenderTargetTexture===!1&&(sh.y*=-1,sh.z*=-1),f.material.uniforms.envMap.value=T,f.material.uniforms.flipEnvMap.value=T.isCubeTexture&&T.isRenderTargetTexture===!1?-1:1,f.material.uniforms.backgroundBlurriness.value=w.backgroundBlurriness,f.material.uniforms.backgroundIntensity.value=w.backgroundIntensity,f.material.uniforms.backgroundRotation.value.setFromMatrix4(u0e.makeRotationFromEuler(sh)),f.material.toneMapped=br.getTransfer(T.colorSpace)!==Hr,(p!==T||g!==T.version||v!==t.toneMapping)&&(f.material.needsUpdate=!0,p=T,g=T.version,v=t.toneMapping),f.layers.enableAll(),S.unshift(f,f.geometry,f.material,0,0,null)):T&&T.isTexture&&(c===void 0&&(c=new Vt(new va(2,2),new Wl({name:"BackgroundMaterial",uniforms:tg(Ul.background.uniforms),vertexShader:Ul.background.vertexShader,fragmentShader:Ul.background.fragmentShader,side:Dc,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=T,c.material.uniforms.backgroundIntensity.value=w.backgroundIntensity,c.material.toneMapped=br.getTransfer(T.colorSpace)!==Hr,T.matrixAutoUpdate===!0&&T.updateMatrix(),c.material.uniforms.uvTransform.value.copy(T.matrix),(p!==T||g!==T.version||v!==t.toneMapping)&&(c.material.needsUpdate=!0,p=T,g=T.version,v=t.toneMapping),c.layers.enableAll(),S.unshift(c,c.geometry,c.material,0,0,null))}function y(S,w){S.getRGB(Rb,JU(t)),r.buffers.color.setClear(Rb.r,Rb.g,Rb.b,w,o)}return{getClearColor:function(){return a},setClearColor:function(S,w=1){a.set(S),l=w,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(S){l=S,y(a,l)},render:_,addToRenderList:b}}function f0e(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),r={},i=g(null);let s=i,o=!1;function a(I,H,Q,q,le){let ie=!1;const ee=p(q,Q,H);s!==ee&&(s=ee,c(s.object)),ie=v(I,q,Q,le),ie&&x(I,q,Q,le),le!==null&&e.update(le,t.ELEMENT_ARRAY_BUFFER),(ie||o)&&(o=!1,T(I,H,Q,q),le!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(le).buffer))}function l(){return t.createVertexArray()}function c(I){return t.bindVertexArray(I)}function f(I){return t.deleteVertexArray(I)}function p(I,H,Q){const q=Q.wireframe===!0;let le=r[I.id];le===void 0&&(le={},r[I.id]=le);let ie=le[H.id];ie===void 0&&(ie={},le[H.id]=ie);let ee=ie[q];return ee===void 0&&(ee=g(l()),ie[q]=ee),ee}function g(I){const H=[],Q=[],q=[];for(let le=0;le=0){const oe=le[z];let de=ie[z];if(de===void 0&&(z==="instanceMatrix"&&I.instanceMatrix&&(de=I.instanceMatrix),z==="instanceColor"&&I.instanceColor&&(de=I.instanceColor)),oe===void 0||oe.attribute!==de||de&&oe.data!==de.data)return!0;ee++}return s.attributesNum!==ee||s.index!==q}function x(I,H,Q,q){const le={},ie=H.attributes;let ee=0;const ue=Q.getAttributes();for(const z in ue)if(ue[z].location>=0){let oe=ie[z];oe===void 0&&(z==="instanceMatrix"&&I.instanceMatrix&&(oe=I.instanceMatrix),z==="instanceColor"&&I.instanceColor&&(oe=I.instanceColor));const de={};de.attribute=oe,oe&&oe.data&&(de.data=oe.data),le[z]=de,ee++}s.attributes=le,s.attributesNum=ee,s.index=q}function _(){const I=s.newAttributes;for(let H=0,Q=I.length;H=0){let te=le[ue];if(te===void 0&&(ue==="instanceMatrix"&&I.instanceMatrix&&(te=I.instanceMatrix),ue==="instanceColor"&&I.instanceColor&&(te=I.instanceColor)),te!==void 0){const oe=te.normalized,de=te.itemSize,Ce=e.get(te);if(Ce===void 0)continue;const Le=Ce.buffer,V=Ce.type,me=Ce.bytesPerElement,pe=V===t.INT||V===t.UNSIGNED_INT||te.gpuType===GR;if(te.isInterleavedBufferAttribute){const Se=te.data,je=Se.stride,it=te.offset;if(Se.isInstancedInterleavedBuffer){for(let xe=0;xe0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";R="mediump"}return R==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=n.precision!==void 0?n.precision:"highp";const f=l(c);f!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",f,"instead."),c=f);const p=n.logarithmicDepthBuffer===!0,g=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),v=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),x=t.getParameter(t.MAX_TEXTURE_SIZE),_=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),b=t.getParameter(t.MAX_VERTEX_ATTRIBS),y=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),S=t.getParameter(t.MAX_VARYING_VECTORS),w=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),T=v>0,L=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:p,maxTextures:g,maxVertexTextures:v,maxTextureSize:x,maxCubemapSize:_,maxAttributes:b,maxVertexUniforms:y,maxVaryings:S,maxFragmentUniforms:w,vertexTextures:T,maxSamples:L}}function m0e(t){const e=this;let n=null,r=0,i=!1,s=!1;const o=new gu,a=new Bn,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(p,g){const v=p.length!==0||g||r!==0||i;return i=g,r=p.length,v},this.beginShadows=function(){s=!0,f(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(p,g){n=f(p,g,0)},this.setState=function(p,g,v){const x=p.clippingPlanes,_=p.clipIntersection,b=p.clipShadows,y=t.get(p);if(!i||x===null||x.length===0||s&&!b)s?f(null):c();else{const S=s?0:r,w=S*4;let T=y.clippingState||null;l.value=T,T=f(x,g,w,v);for(let L=0;L!==w;++L)T[L]=n[L];y.clippingState=T,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=S}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function f(p,g,v,x){const _=p!==null?p.length:0;let b=null;if(_!==0){if(b=l.value,x!==!0||b===null){const y=v+_*4,S=g.matrixWorldInverse;a.getNormalMatrix(S),(b===null||b.length0){const c=new nz(l.height);return c.fromEquirectangularTexture(t,o),e.set(o,c),o.addEventListener("dispose",i),n(c.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:r,dispose:s}}class il extends dx{constructor(e=-1,n=1,r=1,i=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,r,i,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let s=r-e,o=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,f=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=f*this.view.offsetY,l=a-f*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const c0=4,RO=[.125,.215,.35,.446,.526,.582],Mh=20,A5=new il,PO=new It;let R5=null,P5=0,I5=0,L5=!1;const bh=(1+Math.sqrt(5))/2,km=1/bh,IO=[new K(-bh,km,0),new K(bh,km,0),new K(-km,0,bh),new K(km,0,bh),new K(0,bh,-km),new K(0,bh,km),new K(-1,1,-1),new K(1,1,-1),new K(-1,1,1),new K(1,1,1)];class SA{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,r=.1,i=100){R5=this._renderer.getRenderTarget(),P5=this._renderer.getActiveCubeFace(),I5=this._renderer.getActiveMipmapLevel(),L5=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,r,i,s),n>0&&this._blur(s,0,0,n),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=OO(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=kO(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?w:0,w,w),f.setRenderTarget(i),_&&f.render(x,a),f.render(e,a)}x.geometry.dispose(),x.material.dispose(),f.toneMapping=g,f.autoClear=p,e.background=b}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===Fu||e.mapping===uf;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=OO()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=kO());const s=i?this._cubemapMaterial:this._equirectMaterial,o=new Vt(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;Pb(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(o,A5)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;const i=this._lodPlanes.length;for(let s=1;sMh&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${Mh}`);const y=[];let S=0;for(let P=0;Pw-c0?i-w+c0:0),R=4*(this._cubeSize-T);Pb(n,L,R,3*T,2*T),l.setRenderTarget(n),l.render(p,A5)}}function v0e(t){const e=[],n=[],r=[];let i=t;const s=t-c0+1+RO.length;for(let o=0;ot-c0?l=RO[o-t+c0-1]:o===0&&(l=0),r.push(l);const c=1/(a-2),f=-c,p=1+c,g=[f,f,p,f,p,p,f,f,p,p,f,p],v=6,x=6,_=3,b=2,y=1,S=new Float32Array(_*x*v),w=new Float32Array(b*x*v),T=new Float32Array(y*x*v);for(let R=0;R2?0:-1,O=[P,F,0,P+2/3,F,0,P+2/3,F+1,0,P,F,0,P+2/3,F+1,0,P,F+1,0];S.set(O,_*x*R),w.set(g,b*x*R);const I=[R,R,R,R,R,R];T.set(I,y*x*R)}const L=new Tn;L.setAttribute("position",new fr(S,_)),L.setAttribute("uv",new fr(w,b)),L.setAttribute("faceIndex",new fr(T,y)),e.push(L),i>c0&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function LO(t,e,n){const r=new hl(t,e,n);return r.texture.mapping=bg,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Pb(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function y0e(t,e,n){const r=new Float32Array(Mh),i=new K(0,1,0);return new Wl({name:"SphericalGaussianBlur",defines:{n:Mh,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:sP(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `,blending:Pu,depthTest:!1,depthWrite:!1})}function kO(){return new Wl({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:sP(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `,blending:Pu,depthTest:!1,depthWrite:!1})}function OO(){return new Wl({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:sP(),fragmentShader:` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `,blending:Pu,depthTest:!1,depthWrite:!1})}function sP(){return` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function x0e(t){let e=new WeakMap,n=null;function r(a){if(a&&a.isTexture){const l=a.mapping,c=l===sy||l===oy,f=l===Fu||l===uf;if(c||f){let p=e.get(a);const g=p!==void 0?p.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==g)return n===null&&(n=new SA(t)),p=c?n.fromEquirectangular(a,p):n.fromCubemap(a,p),p.texture.pmremVersion=a.pmremVersion,e.set(a,p),p.texture;if(p!==void 0)return p.texture;{const v=a.image;return c&&v&&v.height>0||f&&v&&i(v)?(n===null&&(n=new SA(t)),p=c?n.fromEquirectangular(a):n.fromCubemap(a),p.texture.pmremVersion=a.pmremVersion,e.set(a,p),a.addEventListener("dispose",s),p.texture):null}}}return a}function i(a){let l=0;const c=6;for(let f=0;fe.maxTextureSize&&(R=Math.ceil(L/e.maxTextureSize),L=e.maxTextureSize);const P=new Float32Array(L*R*4*p),F=new lM(P,L,R,p);F.type=ba,F.needsUpdate=!0;const O=T*4;for(let H=0;H0)return t;const i=e*n;let s=NO[i];if(s===void 0&&(s=new Float32Array(i),NO[i]=s),e!==0){r.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(s,a)}return s}function rs(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n":" "} ${a}: ${n[o]}`)}return r.join(` +`)}function xge(t){const e=br.getPrimaries(br.workingColorSpace),n=br.getPrimaries(t);let r;switch(e===n?r="":e===hy&&n===fy?r="LinearDisplayP3ToLinearSRGB":e===fy&&n===hy&&(r="LinearSRGBToLinearDisplayP3"),t){case Wu:case ux:return[r,"LinearTransferOETF"];case ho:case aM:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[r,"LinearTransferOETF"]}}function $O(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const s=/ERROR: 0:(\d+)/.exec(i);if(s){const o=parseInt(s[1]);return n.toUpperCase()+` + +`+i+` + +`+yge(t.getShaderSource(e),o)}else return i}function _ge(t,e){const n=xge(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function bge(t,e){let n;switch(e){case yU:n="Linear";break;case xU:n="Reinhard";break;case _U:n="OptimizedCineon";break;case VR:n="ACESFilmic";break;case SU:n="AgX";break;case wU:n="Neutral";break;case bU:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Sge(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(rv).join(` +`)}function wge(t){const e=[];for(const n in t){const r=t[n];r!==!1&&e.push("#define "+n+" "+r)}return e.join(` +`)}function Mge(t,e){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function wA(t){return t.replace(Ege,Tge)}const Cge=new Map;function Tge(t,e){let n=Vn[e];if(n===void 0){const r=Cge.get(e);if(r!==void 0)n=Vn[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return wA(n)}const Age=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function jO(t){return t.replace(Age,Rge)}function Rge(t,e,n,r){let i="";for(let s=parseInt(e);s0&&(b+=` +`),y=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x].filter(rv).join(` +`),y.length>0&&(y+=` +`)):(b=[GO(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+f:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(rv).join(` +`),y=[GO(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+f:"",n.envMap?"#define "+p:"",g?"#define CUBEUV_TEXEL_WIDTH "+g.texelWidth:"",g?"#define CUBEUV_TEXEL_HEIGHT "+g.texelHeight:"",g?"#define CUBEUV_MAX_MIP "+g.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Ic?"#define TONE_MAPPING":"",n.toneMapping!==Ic?Vn.tonemapping_pars_fragment:"",n.toneMapping!==Ic?bge("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Vn.colorspace_pars_fragment,_ge("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` +`].filter(rv).join(` +`)),o=wA(o),o=VO(o,n),o=WO(o,n),a=wA(a),a=VO(a,n),a=WO(a,n),o=jO(o),a=jO(a),n.isRawShaderMaterial!==!0&&(S=`#version 300 es +`,b=[v,"#define attribute in","#define varying out","#define texture2D texture"].join(` +`)+` +`+b,y=["#define varying in",n.glslVersion===bA?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===bA?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`)+` +`+y);const w=S+b+o,T=S+y+a,L=HO(i,i.VERTEX_SHADER,w),R=HO(i,i.FRAGMENT_SHADER,T);i.attachShader(_,L),i.attachShader(_,R),n.index0AttributeName!==void 0?i.bindAttribLocation(_,0,n.index0AttributeName):n.morphTargets===!0&&i.bindAttribLocation(_,0,"position"),i.linkProgram(_);function P(H){if(t.debug.checkShaderErrors){const Q=i.getProgramInfoLog(_).trim(),q=i.getShaderInfoLog(L).trim(),le=i.getShaderInfoLog(R).trim();let ie=!0,ee=!0;if(i.getProgramParameter(_,i.LINK_STATUS)===!1)if(ie=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(i,_,L,R);else{const ue=$O(i,L,"vertex"),z=$O(i,R,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(_,i.VALIDATE_STATUS)+` + +Material Name: `+H.name+` +Material Type: `+H.type+` + +Program Info Log: `+Q+` +`+ue+` +`+z)}else Q!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Q):(q===""||le==="")&&(ee=!1);ee&&(H.diagnostics={runnable:ie,programLog:Q,vertexShader:{log:q,prefix:b},fragmentShader:{log:le,prefix:y}})}i.deleteShader(L),i.deleteShader(R),F=new NS(i,_),O=Mge(i,_)}let F;this.getUniforms=function(){return F===void 0&&P(this),F};let O;this.getAttributes=function(){return O===void 0&&P(this),O};let I=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return I===!1&&(I=i.getProgramParameter(_,gge)),I},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(_),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=vge++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=L,this.fragmentShader=R,this}let Dge=0;class Fge{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),s=this._getShaderStage(r),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new Uge(e),n.set(e,r)),r}}class Uge{constructor(e){this.id=Dge++,this.code=e,this.usedTimes=0}}function zge(t,e,n,r,i,s,o){const a=new Jh,l=new Fge,c=new Set,f=[],p=i.logarithmicDepthBuffer,g=i.vertexTextures;let v=i.precision;const x={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(O){return c.add(O),O===0?"uv":`uv${O}`}function b(O,I,H,Q,q){const le=Q.fog,ie=q.geometry,ee=O.isMeshStandardMaterial?Q.environment:null,ue=(O.isMeshStandardMaterial?n:e).get(O.envMap||ee),z=ue&&ue.mapping===bg?ue.image.height:null,te=x[O.type];O.precision!==null&&(v=i.getMaxPrecision(O.precision),v!==O.precision&&console.warn("THREE.WebGLProgram.getParameters:",O.precision,"not supported, using",v,"instead."));const oe=ie.morphAttributes.position||ie.morphAttributes.normal||ie.morphAttributes.color,de=oe!==void 0?oe.length:0;let Ce=0;ie.morphAttributes.position!==void 0&&(Ce=1),ie.morphAttributes.normal!==void 0&&(Ce=2),ie.morphAttributes.color!==void 0&&(Ce=3);let Le,V,me,pe;if(te){const un=Ul[te];Le=un.vertexShader,V=un.fragmentShader}else Le=O.vertexShader,V=O.fragmentShader,l.update(O),me=l.getVertexShaderID(O),pe=l.getFragmentShaderID(O);const Se=t.getRenderTarget(),je=q.isInstancedMesh===!0,it=q.isBatchedMesh===!0,xe=!!O.map,et=!!O.matcap,Re=!!ue,Oe=!!O.aoMap,Te=!!O.lightMap,ze=!!O.bumpMap,ke=!!O.normalMap,rt=!!O.displacementMap,tt=!!O.emissiveMap,ae=!!O.metalnessMap,G=!!O.roughnessMap,be=O.anisotropy>0,$e=O.clearcoat>0,Ze=O.dispersion>0,We=O.iridescence>0,Mt=O.sheen>0,pt=O.transmission>0,at=be&&!!O.anisotropyMap,Ie=$e&&!!O.clearcoatMap,ge=$e&&!!O.clearcoatNormalMap,Xe=$e&&!!O.clearcoatRoughnessMap,St=We&&!!O.iridescenceMap,mt=We&&!!O.iridescenceThicknessMap,Be=Mt&&!!O.sheenColorMap,vt=Mt&&!!O.sheenRoughnessMap,qe=!!O.specularMap,ce=!!O.specularColorMap,Ne=!!O.specularIntensityMap,fe=pt&&!!O.transmissionMap,Fe=pt&&!!O.thicknessMap,He=!!O.gradientMap,ut=!!O.alphaMap,xt=O.alphaTest>0,Xt=!!O.alphaHash,vn=!!O.extensions;let mn=Ic;O.toneMapped&&(Se===null||Se.isXRRenderTarget===!0)&&(mn=t.toneMapping);const On={shaderID:te,shaderType:O.type,shaderName:O.name,vertexShader:Le,fragmentShader:V,defines:O.defines,customVertexShaderID:me,customFragmentShaderID:pe,isRawShaderMaterial:O.isRawShaderMaterial===!0,glslVersion:O.glslVersion,precision:v,batching:it,instancing:je,instancingColor:je&&q.instanceColor!==null,instancingMorph:je&&q.morphTexture!==null,supportsVertexTextures:g,outputColorSpace:Se===null?t.outputColorSpace:Se.isXRRenderTarget===!0?Se.texture.colorSpace:Wu,alphaToCoverage:!!O.alphaToCoverage,map:xe,matcap:et,envMap:Re,envMapMode:Re&&ue.mapping,envMapCubeUVHeight:z,aoMap:Oe,lightMap:Te,bumpMap:ze,normalMap:ke,displacementMap:g&&rt,emissiveMap:tt,normalMapObjectSpace:ke&&O.normalMapType===zU,normalMapTangentSpace:ke&&O.normalMapType===vf,metalnessMap:ae,roughnessMap:G,anisotropy:be,anisotropyMap:at,clearcoat:$e,clearcoatMap:Ie,clearcoatNormalMap:ge,clearcoatRoughnessMap:Xe,dispersion:Ze,iridescence:We,iridescenceMap:St,iridescenceThicknessMap:mt,sheen:Mt,sheenColorMap:Be,sheenRoughnessMap:vt,specularMap:qe,specularColorMap:ce,specularIntensityMap:Ne,transmission:pt,transmissionMap:fe,thicknessMap:Fe,gradientMap:He,opaque:O.transparent===!1&&O.blending===Yh&&O.alphaToCoverage===!1,alphaMap:ut,alphaTest:xt,alphaHash:Xt,combine:O.combine,mapUv:xe&&_(O.map.channel),aoMapUv:Oe&&_(O.aoMap.channel),lightMapUv:Te&&_(O.lightMap.channel),bumpMapUv:ze&&_(O.bumpMap.channel),normalMapUv:ke&&_(O.normalMap.channel),displacementMapUv:rt&&_(O.displacementMap.channel),emissiveMapUv:tt&&_(O.emissiveMap.channel),metalnessMapUv:ae&&_(O.metalnessMap.channel),roughnessMapUv:G&&_(O.roughnessMap.channel),anisotropyMapUv:at&&_(O.anisotropyMap.channel),clearcoatMapUv:Ie&&_(O.clearcoatMap.channel),clearcoatNormalMapUv:ge&&_(O.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Xe&&_(O.clearcoatRoughnessMap.channel),iridescenceMapUv:St&&_(O.iridescenceMap.channel),iridescenceThicknessMapUv:mt&&_(O.iridescenceThicknessMap.channel),sheenColorMapUv:Be&&_(O.sheenColorMap.channel),sheenRoughnessMapUv:vt&&_(O.sheenRoughnessMap.channel),specularMapUv:qe&&_(O.specularMap.channel),specularColorMapUv:ce&&_(O.specularColorMap.channel),specularIntensityMapUv:Ne&&_(O.specularIntensityMap.channel),transmissionMapUv:fe&&_(O.transmissionMap.channel),thicknessMapUv:Fe&&_(O.thicknessMap.channel),alphaMapUv:ut&&_(O.alphaMap.channel),vertexTangents:!!ie.attributes.tangent&&(ke||be),vertexColors:O.vertexColors,vertexAlphas:O.vertexColors===!0&&!!ie.attributes.color&&ie.attributes.color.itemSize===4,pointsUvs:q.isPoints===!0&&!!ie.attributes.uv&&(xe||ut),fog:!!le,useFog:O.fog===!0,fogExp2:!!le&&le.isFogExp2,flatShading:O.flatShading===!0,sizeAttenuation:O.sizeAttenuation===!0,logarithmicDepthBuffer:p,skinning:q.isSkinnedMesh===!0,morphTargets:ie.morphAttributes.position!==void 0,morphNormals:ie.morphAttributes.normal!==void 0,morphColors:ie.morphAttributes.color!==void 0,morphTargetsCount:de,morphTextureStride:Ce,numDirLights:I.directional.length,numPointLights:I.point.length,numSpotLights:I.spot.length,numSpotLightMaps:I.spotLightMap.length,numRectAreaLights:I.rectArea.length,numHemiLights:I.hemi.length,numDirLightShadows:I.directionalShadowMap.length,numPointLightShadows:I.pointShadowMap.length,numSpotLightShadows:I.spotShadowMap.length,numSpotLightShadowsWithMaps:I.numSpotLightShadowsWithMaps,numLightProbes:I.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:O.dithering,shadowMapEnabled:t.shadowMap.enabled&&H.length>0,shadowMapType:t.shadowMap.type,toneMapping:mn,useLegacyLights:t._useLegacyLights,decodeVideoTexture:xe&&O.map.isVideoTexture===!0&&br.getTransfer(O.map.colorSpace)===Hr,premultipliedAlpha:O.premultipliedAlpha,doubleSided:O.side===Do,flipSided:O.side===yo,useDepthPacking:O.depthPacking>=0,depthPacking:O.depthPacking||0,index0AttributeName:O.index0AttributeName,extensionClipCullDistance:vn&&O.extensions.clipCullDistance===!0&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:vn&&O.extensions.multiDraw===!0&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:O.customProgramCacheKey()};return On.vertexUv1s=c.has(1),On.vertexUv2s=c.has(2),On.vertexUv3s=c.has(3),c.clear(),On}function y(O){const I=[];if(O.shaderID?I.push(O.shaderID):(I.push(O.customVertexShaderID),I.push(O.customFragmentShaderID)),O.defines!==void 0)for(const H in O.defines)I.push(H),I.push(O.defines[H]);return O.isRawShaderMaterial===!1&&(S(I,O),w(I,O),I.push(t.outputColorSpace)),I.push(O.customProgramCacheKey),I.join()}function S(O,I){O.push(I.precision),O.push(I.outputColorSpace),O.push(I.envMapMode),O.push(I.envMapCubeUVHeight),O.push(I.mapUv),O.push(I.alphaMapUv),O.push(I.lightMapUv),O.push(I.aoMapUv),O.push(I.bumpMapUv),O.push(I.normalMapUv),O.push(I.displacementMapUv),O.push(I.emissiveMapUv),O.push(I.metalnessMapUv),O.push(I.roughnessMapUv),O.push(I.anisotropyMapUv),O.push(I.clearcoatMapUv),O.push(I.clearcoatNormalMapUv),O.push(I.clearcoatRoughnessMapUv),O.push(I.iridescenceMapUv),O.push(I.iridescenceThicknessMapUv),O.push(I.sheenColorMapUv),O.push(I.sheenRoughnessMapUv),O.push(I.specularMapUv),O.push(I.specularColorMapUv),O.push(I.specularIntensityMapUv),O.push(I.transmissionMapUv),O.push(I.thicknessMapUv),O.push(I.combine),O.push(I.fogExp2),O.push(I.sizeAttenuation),O.push(I.morphTargetsCount),O.push(I.morphAttributeCount),O.push(I.numDirLights),O.push(I.numPointLights),O.push(I.numSpotLights),O.push(I.numSpotLightMaps),O.push(I.numHemiLights),O.push(I.numRectAreaLights),O.push(I.numDirLightShadows),O.push(I.numPointLightShadows),O.push(I.numSpotLightShadows),O.push(I.numSpotLightShadowsWithMaps),O.push(I.numLightProbes),O.push(I.shadowMapType),O.push(I.toneMapping),O.push(I.numClippingPlanes),O.push(I.numClipIntersection),O.push(I.depthPacking)}function w(O,I){a.disableAll(),I.supportsVertexTextures&&a.enable(0),I.instancing&&a.enable(1),I.instancingColor&&a.enable(2),I.instancingMorph&&a.enable(3),I.matcap&&a.enable(4),I.envMap&&a.enable(5),I.normalMapObjectSpace&&a.enable(6),I.normalMapTangentSpace&&a.enable(7),I.clearcoat&&a.enable(8),I.iridescence&&a.enable(9),I.alphaTest&&a.enable(10),I.vertexColors&&a.enable(11),I.vertexAlphas&&a.enable(12),I.vertexUv1s&&a.enable(13),I.vertexUv2s&&a.enable(14),I.vertexUv3s&&a.enable(15),I.vertexTangents&&a.enable(16),I.anisotropy&&a.enable(17),I.alphaHash&&a.enable(18),I.batching&&a.enable(19),I.dispersion&&a.enable(20),O.push(a.mask),a.disableAll(),I.fog&&a.enable(0),I.useFog&&a.enable(1),I.flatShading&&a.enable(2),I.logarithmicDepthBuffer&&a.enable(3),I.skinning&&a.enable(4),I.morphTargets&&a.enable(5),I.morphNormals&&a.enable(6),I.morphColors&&a.enable(7),I.premultipliedAlpha&&a.enable(8),I.shadowMapEnabled&&a.enable(9),I.useLegacyLights&&a.enable(10),I.doubleSided&&a.enable(11),I.flipSided&&a.enable(12),I.useDepthPacking&&a.enable(13),I.dithering&&a.enable(14),I.transmission&&a.enable(15),I.sheen&&a.enable(16),I.opaque&&a.enable(17),I.pointsUvs&&a.enable(18),I.decodeVideoTexture&&a.enable(19),I.alphaToCoverage&&a.enable(20),O.push(a.mask)}function T(O){const I=x[O.type];let H;if(I){const Q=Ul[I];H=ez.clone(Q.uniforms)}else H=O.uniforms;return H}function L(O,I){let H;for(let Q=0,q=f.length;Q0?r.push(y):v.transparent===!0?i.push(y):n.push(y)}function l(p,g,v,x,_,b){const y=o(p,g,v,x,_,b);v.transmission>0?r.unshift(y):v.transparent===!0?i.unshift(y):n.unshift(y)}function c(p,g){n.length>1&&n.sort(p||Hge),r.length>1&&r.sort(g||XO),i.length>1&&i.sort(g||XO)}function f(){for(let p=e,g=t.length;p=s.length?(o=new qO,s.push(o)):o=s[i],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function Vge(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new K,color:new It};break;case"SpotLight":n={position:new K,direction:new K,color:new It,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new K,color:new It,distance:0,decay:0};break;case"HemisphereLight":n={direction:new K,skyColor:new It,groundColor:new It};break;case"RectAreaLight":n={color:new It,position:new K,halfWidth:new K,halfHeight:new K};break}return t[e.id]=n,n}}}function Wge(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ct};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ct};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ct,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let jge=0;function Gge(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function Xge(t){const e=new Vge,n=Wge(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)r.probe.push(new K);const i=new K,s=new Jt,o=new Jt;function a(c,f){let p=0,g=0,v=0;for(let H=0;H<9;H++)r.probe[H].set(0,0,0);let x=0,_=0,b=0,y=0,S=0,w=0,T=0,L=0,R=0,P=0,F=0;c.sort(Gge);const O=f===!0?Math.PI:1;for(let H=0,Q=c.length;H0&&(t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Ot.LTC_FLOAT_1,r.rectAreaLTC2=Ot.LTC_FLOAT_2):(r.rectAreaLTC1=Ot.LTC_HALF_1,r.rectAreaLTC2=Ot.LTC_HALF_2)),r.ambient[0]=p,r.ambient[1]=g,r.ambient[2]=v;const I=r.hash;(I.directionalLength!==x||I.pointLength!==_||I.spotLength!==b||I.rectAreaLength!==y||I.hemiLength!==S||I.numDirectionalShadows!==w||I.numPointShadows!==T||I.numSpotShadows!==L||I.numSpotMaps!==R||I.numLightProbes!==F)&&(r.directional.length=x,r.spot.length=b,r.rectArea.length=y,r.point.length=_,r.hemi.length=S,r.directionalShadow.length=w,r.directionalShadowMap.length=w,r.pointShadow.length=T,r.pointShadowMap.length=T,r.spotShadow.length=L,r.spotShadowMap.length=L,r.directionalShadowMatrix.length=w,r.pointShadowMatrix.length=T,r.spotLightMatrix.length=L+R-P,r.spotLightMap.length=R,r.numSpotLightShadowsWithMaps=P,r.numLightProbes=F,I.directionalLength=x,I.pointLength=_,I.spotLength=b,I.rectAreaLength=y,I.hemiLength=S,I.numDirectionalShadows=w,I.numPointShadows=T,I.numSpotShadows=L,I.numSpotMaps=R,I.numLightProbes=F,r.version=jge++)}function l(c,f){let p=0,g=0,v=0,x=0,_=0;const b=f.matrixWorldInverse;for(let y=0,S=c.length;y=o.length?(a=new ZO(t),o.push(a)):a=o[s],a}function r(){e=new WeakMap}return{get:n,dispose:r}}class oP extends Ds{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=FU,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class aP extends Ds{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const Zge=`void main() { + gl_Position = vec4( position, 1.0 ); +}`,Yge=`uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +#include +void main() { + const float samples = float( VSM_SAMPLES ); + float mean = 0.0; + float squared_mean = 0.0; + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + float uvOffset = uvStart + i * uvStride; + #ifdef HORIZONTAL_PASS + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( squared_mean - mean * mean ); + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); +}`;function Kge(t,e,n){let r=new hx;const i=new ct,s=new ct,o=new Sr,a=new oP({depthPacking:UU}),l=new aP,c={},f=n.maxTextureSize,p={[Dc]:yo,[yo]:Dc,[Do]:Do},g=new Wl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ct},radius:{value:4}},vertexShader:Zge,fragmentShader:Yge}),v=g.clone();v.defines.HORIZONTAL_PASS=1;const x=new Tn;x.setAttribute("position",new fr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new Vt(x,g),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=iM;let y=this.type;this.render=function(R,P,F){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||R.length===0)return;const O=t.getRenderTarget(),I=t.getActiveCubeFace(),H=t.getActiveMipmapLevel(),Q=t.state;Q.setBlending(Pu),Q.buffers.color.setClear(1,1,1,1),Q.buffers.depth.setTest(!0),Q.setScissorTest(!1);const q=y!==Ol&&this.type===Ol,le=y===Ol&&this.type!==Ol;for(let ie=0,ee=R.length;ief||i.y>f)&&(i.x>f&&(s.x=Math.floor(f/te.x),i.x=s.x*te.x,z.mapSize.x=s.x),i.y>f&&(s.y=Math.floor(f/te.y),i.y=s.y*te.y,z.mapSize.y=s.y)),z.map===null||q===!0||le===!0){const de=this.type!==Ol?{minFilter:bs,magFilter:bs}:{};z.map!==null&&z.map.dispose(),z.map=new hl(i.x,i.y,de),z.map.texture.name=ue.name+".shadowMap",z.camera.updateProjectionMatrix()}t.setRenderTarget(z.map),t.clear();const oe=z.getViewportCount();for(let de=0;de0||P.map&&P.alphaTest>0){const Q=I.uuid,q=P.uuid;let le=c[Q];le===void 0&&(le={},c[Q]=le);let ie=le[q];ie===void 0&&(ie=I.clone(),le[q]=ie,P.addEventListener("dispose",L)),I=ie}if(I.visible=P.visible,I.wireframe=P.wireframe,O===Ol?I.side=P.shadowSide!==null?P.shadowSide:P.side:I.side=P.shadowSide!==null?P.shadowSide:p[P.side],I.alphaMap=P.alphaMap,I.alphaTest=P.alphaTest,I.map=P.map,I.clipShadows=P.clipShadows,I.clippingPlanes=P.clippingPlanes,I.clipIntersection=P.clipIntersection,I.displacementMap=P.displacementMap,I.displacementScale=P.displacementScale,I.displacementBias=P.displacementBias,I.wireframeLinewidth=P.wireframeLinewidth,I.linewidth=P.linewidth,F.isPointLight===!0&&I.isMeshDistanceMaterial===!0){const Q=t.properties.get(I);Q.light=F}return I}function T(R,P,F,O,I){if(R.visible===!1)return;if(R.layers.test(P.layers)&&(R.isMesh||R.isLine||R.isPoints)&&(R.castShadow||R.receiveShadow&&I===Ol)&&(!R.frustumCulled||r.intersectsObject(R))){R.modelViewMatrix.multiplyMatrices(F.matrixWorldInverse,R.matrixWorld);const q=e.update(R),le=R.material;if(Array.isArray(le)){const ie=q.groups;for(let ee=0,ue=ie.length;ee=1):ue.indexOf("OpenGL ES")!==-1&&(ee=parseFloat(/^OpenGL ES (\d)/.exec(ue)[1]),ie=ee>=2);let z=null,te={};const oe=t.getParameter(t.SCISSOR_BOX),de=t.getParameter(t.VIEWPORT),Ce=new Sr().fromArray(oe),Le=new Sr().fromArray(de);function V(fe,Fe,He,ut){const xt=new Uint8Array(4),Xt=t.createTexture();t.bindTexture(fe,Xt),t.texParameteri(fe,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(fe,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let vn=0;vn"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new ct,f=new WeakMap;let p;const g=new WeakMap;let v=!1;try{v=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function x(ae,G){return v?new OffscreenCanvas(ae,G):gy("canvas")}function _(ae,G,be){let $e=1;const Ze=tt(ae);if((Ze.width>be||Ze.height>be)&&($e=be/Math.max(Ze.width,Ze.height)),$e<1)if(typeof HTMLImageElement<"u"&&ae instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&ae instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&ae instanceof ImageBitmap||typeof VideoFrame<"u"&&ae instanceof VideoFrame){const We=Math.floor($e*Ze.width),Mt=Math.floor($e*Ze.height);p===void 0&&(p=x(We,Mt));const pt=G?x(We,Mt):p;return pt.width=We,pt.height=Mt,pt.getContext("2d").drawImage(ae,0,0,We,Mt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Ze.width+"x"+Ze.height+") to ("+We+"x"+Mt+")."),pt}else return"data"in ae&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Ze.width+"x"+Ze.height+")."),ae;return ae}function b(ae){return ae.generateMipmaps&&ae.minFilter!==bs&&ae.minFilter!==Mi}function y(ae){t.generateMipmap(ae)}function S(ae,G,be,$e,Ze=!1){if(ae!==null){if(t[ae]!==void 0)return t[ae];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+ae+"'")}let We=G;if(G===t.RED&&(be===t.FLOAT&&(We=t.R32F),be===t.HALF_FLOAT&&(We=t.R16F),be===t.UNSIGNED_BYTE&&(We=t.R8)),G===t.RED_INTEGER&&(be===t.UNSIGNED_BYTE&&(We=t.R8UI),be===t.UNSIGNED_SHORT&&(We=t.R16UI),be===t.UNSIGNED_INT&&(We=t.R32UI),be===t.BYTE&&(We=t.R8I),be===t.SHORT&&(We=t.R16I),be===t.INT&&(We=t.R32I)),G===t.RG&&(be===t.FLOAT&&(We=t.RG32F),be===t.HALF_FLOAT&&(We=t.RG16F),be===t.UNSIGNED_BYTE&&(We=t.RG8)),G===t.RG_INTEGER&&(be===t.UNSIGNED_BYTE&&(We=t.RG8UI),be===t.UNSIGNED_SHORT&&(We=t.RG16UI),be===t.UNSIGNED_INT&&(We=t.RG32UI),be===t.BYTE&&(We=t.RG8I),be===t.SHORT&&(We=t.RG16I),be===t.INT&&(We=t.RG32I)),G===t.RGB&&be===t.UNSIGNED_INT_5_9_9_9_REV&&(We=t.RGB9_E5),G===t.RGBA){const Mt=Ze?dy:br.getTransfer($e);be===t.FLOAT&&(We=t.RGBA32F),be===t.HALF_FLOAT&&(We=t.RGBA16F),be===t.UNSIGNED_BYTE&&(We=Mt===Hr?t.SRGB8_ALPHA8:t.RGBA8),be===t.UNSIGNED_SHORT_4_4_4_4&&(We=t.RGBA4),be===t.UNSIGNED_SHORT_5_5_5_1&&(We=t.RGB5_A1)}return(We===t.R16F||We===t.R32F||We===t.RG16F||We===t.RG32F||We===t.RGBA16F||We===t.RGBA32F)&&e.get("EXT_color_buffer_float"),We}function w(ae,G){return b(ae)===!0||ae.isFramebufferTexture&&ae.minFilter!==bs&&ae.minFilter!==Mi?Math.log2(Math.max(G.width,G.height))+1:ae.mipmaps!==void 0&&ae.mipmaps.length>0?ae.mipmaps.length:ae.isCompressedTexture&&Array.isArray(ae.image)?G.mipmaps.length:1}function T(ae){const G=ae.target;G.removeEventListener("dispose",T),R(G),G.isVideoTexture&&f.delete(G)}function L(ae){const G=ae.target;G.removeEventListener("dispose",L),F(G)}function R(ae){const G=r.get(ae);if(G.__webglInit===void 0)return;const be=ae.source,$e=g.get(be);if($e){const Ze=$e[G.__cacheKey];Ze.usedTimes--,Ze.usedTimes===0&&P(ae),Object.keys($e).length===0&&g.delete(be)}r.remove(ae)}function P(ae){const G=r.get(ae);t.deleteTexture(G.__webglTexture);const be=ae.source,$e=g.get(be);delete $e[G.__cacheKey],o.memory.textures--}function F(ae){const G=r.get(ae);if(ae.depthTexture&&ae.depthTexture.dispose(),ae.isWebGLCubeRenderTarget)for(let $e=0;$e<6;$e++){if(Array.isArray(G.__webglFramebuffer[$e]))for(let Ze=0;Ze=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+ae+" texture units while this GPU supports only "+i.maxTextures),O+=1,ae}function Q(ae){const G=[];return G.push(ae.wrapS),G.push(ae.wrapT),G.push(ae.wrapR||0),G.push(ae.magFilter),G.push(ae.minFilter),G.push(ae.anisotropy),G.push(ae.internalFormat),G.push(ae.format),G.push(ae.type),G.push(ae.generateMipmaps),G.push(ae.premultiplyAlpha),G.push(ae.flipY),G.push(ae.unpackAlignment),G.push(ae.colorSpace),G.join()}function q(ae,G){const be=r.get(ae);if(ae.isVideoTexture&&ke(ae),ae.isRenderTargetTexture===!1&&ae.version>0&&be.__version!==ae.version){const $e=ae.image;if($e===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if($e.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Ce(be,ae,G);return}}n.bindTexture(t.TEXTURE_2D,be.__webglTexture,t.TEXTURE0+G)}function le(ae,G){const be=r.get(ae);if(ae.version>0&&be.__version!==ae.version){Ce(be,ae,G);return}n.bindTexture(t.TEXTURE_2D_ARRAY,be.__webglTexture,t.TEXTURE0+G)}function ie(ae,G){const be=r.get(ae);if(ae.version>0&&be.__version!==ae.version){Ce(be,ae,G);return}n.bindTexture(t.TEXTURE_3D,be.__webglTexture,t.TEXTURE0+G)}function ee(ae,G){const be=r.get(ae);if(ae.version>0&&be.__version!==ae.version){Le(be,ae,G);return}n.bindTexture(t.TEXTURE_CUBE_MAP,be.__webglTexture,t.TEXTURE0+G)}const ue={[wu]:t.REPEAT,[Uo]:t.CLAMP_TO_EDGE,[ay]:t.MIRRORED_REPEAT},z={[bs]:t.NEAREST,[WR]:t.NEAREST_MIPMAP_NEAREST,[a0]:t.NEAREST_MIPMAP_LINEAR,[Mi]:t.LINEAR,[wv]:t.LINEAR_MIPMAP_NEAREST,[Bl]:t.LINEAR_MIPMAP_LINEAR},te={[BU]:t.NEVER,[GU]:t.ALWAYS,[HU]:t.LESS,[eP]:t.LEQUAL,[$U]:t.EQUAL,[jU]:t.GEQUAL,[VU]:t.GREATER,[WU]:t.NOTEQUAL};function oe(ae,G){if(G.type===ba&&e.has("OES_texture_float_linear")===!1&&(G.magFilter===Mi||G.magFilter===wv||G.magFilter===a0||G.magFilter===Bl||G.minFilter===Mi||G.minFilter===wv||G.minFilter===a0||G.minFilter===Bl)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(ae,t.TEXTURE_WRAP_S,ue[G.wrapS]),t.texParameteri(ae,t.TEXTURE_WRAP_T,ue[G.wrapT]),(ae===t.TEXTURE_3D||ae===t.TEXTURE_2D_ARRAY)&&t.texParameteri(ae,t.TEXTURE_WRAP_R,ue[G.wrapR]),t.texParameteri(ae,t.TEXTURE_MAG_FILTER,z[G.magFilter]),t.texParameteri(ae,t.TEXTURE_MIN_FILTER,z[G.minFilter]),G.compareFunction&&(t.texParameteri(ae,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(ae,t.TEXTURE_COMPARE_FUNC,te[G.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(G.magFilter===bs||G.minFilter!==a0&&G.minFilter!==Bl||G.type===ba&&e.has("OES_texture_float_linear")===!1)return;if(G.anisotropy>1||r.get(G).__currentAnisotropy){const be=e.get("EXT_texture_filter_anisotropic");t.texParameterf(ae,be.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(G.anisotropy,i.getMaxAnisotropy())),r.get(G).__currentAnisotropy=G.anisotropy}}}function de(ae,G){let be=!1;ae.__webglInit===void 0&&(ae.__webglInit=!0,G.addEventListener("dispose",T));const $e=G.source;let Ze=g.get($e);Ze===void 0&&(Ze={},g.set($e,Ze));const We=Q(G);if(We!==ae.__cacheKey){Ze[We]===void 0&&(Ze[We]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,be=!0),Ze[We].usedTimes++;const Mt=Ze[ae.__cacheKey];Mt!==void 0&&(Ze[ae.__cacheKey].usedTimes--,Mt.usedTimes===0&&P(G)),ae.__cacheKey=We,ae.__webglTexture=Ze[We].texture}return be}function Ce(ae,G,be){let $e=t.TEXTURE_2D;(G.isDataArrayTexture||G.isCompressedArrayTexture)&&($e=t.TEXTURE_2D_ARRAY),G.isData3DTexture&&($e=t.TEXTURE_3D);const Ze=de(ae,G),We=G.source;n.bindTexture($e,ae.__webglTexture,t.TEXTURE0+be);const Mt=r.get(We);if(We.version!==Mt.__version||Ze===!0){n.activeTexture(t.TEXTURE0+be);const pt=br.getPrimaries(br.workingColorSpace),at=G.colorSpace===xu?null:br.getPrimaries(G.colorSpace),Ie=G.colorSpace===xu||pt===at?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,G.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,G.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,G.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ie);let ge=_(G.image,!1,i.maxTextureSize);ge=rt(G,ge);const Xe=s.convert(G.format,G.colorSpace),St=s.convert(G.type);let mt=S(G.internalFormat,Xe,St,G.colorSpace,G.isVideoTexture);oe($e,G);let Be;const vt=G.mipmaps,qe=G.isVideoTexture!==!0,ce=Mt.__version===void 0||Ze===!0,Ne=We.dataReady,fe=w(G,ge);if(G.isDepthTexture)mt=t.DEPTH_COMPONENT16,G.type===ba?mt=t.DEPTH_COMPONENT32F:G.type===fp?mt=t.DEPTH_COMPONENT24:G.type===wg&&(mt=t.DEPTH24_STENCIL8),ce&&(qe?n.texStorage2D(t.TEXTURE_2D,1,mt,ge.width,ge.height):n.texImage2D(t.TEXTURE_2D,0,mt,ge.width,ge.height,0,Xe,St,null));else if(G.isDataTexture)if(vt.length>0){qe&&ce&&n.texStorage2D(t.TEXTURE_2D,fe,mt,vt[0].width,vt[0].height);for(let Fe=0,He=vt.length;Fe>=1,He>>=1}}else if(vt.length>0){if(qe&&ce){const Fe=tt(vt[0]);n.texStorage2D(t.TEXTURE_2D,fe,mt,Fe.width,Fe.height)}for(let Fe=0,He=vt.length;Fe0&&fe++;const He=tt(Xe[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,fe,vt,He.width,He.height)}for(let He=0;He<6;He++)if(ge){qe?Ne&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+He,0,0,0,Xe[He].width,Xe[He].height,mt,Be,Xe[He].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+He,0,vt,Xe[He].width,Xe[He].height,0,mt,Be,Xe[He].data);for(let ut=0;ut>We),Xe=Math.max(1,G.height>>We);Ze===t.TEXTURE_3D||Ze===t.TEXTURE_2D_ARRAY?n.texImage3D(Ze,We,at,ge,Xe,G.depth,0,Mt,pt,null):n.texImage2D(Ze,We,at,ge,Xe,0,Mt,pt,null)}n.bindFramebuffer(t.FRAMEBUFFER,ae),ze(G)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,$e,Ze,r.get(be).__webglTexture,0,Te(G)):(Ze===t.TEXTURE_2D||Ze>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&Ze<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,$e,Ze,r.get(be).__webglTexture,We),n.bindFramebuffer(t.FRAMEBUFFER,null)}function me(ae,G,be){if(t.bindRenderbuffer(t.RENDERBUFFER,ae),G.depthBuffer&&!G.stencilBuffer){let $e=t.DEPTH_COMPONENT24;if(be||ze(G)){const Ze=G.depthTexture;Ze&&Ze.isDepthTexture&&(Ze.type===ba?$e=t.DEPTH_COMPONENT32F:Ze.type===fp&&($e=t.DEPTH_COMPONENT24));const We=Te(G);ze(G)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,We,$e,G.width,G.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,We,$e,G.width,G.height)}else t.renderbufferStorage(t.RENDERBUFFER,$e,G.width,G.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,ae)}else if(G.depthBuffer&&G.stencilBuffer){const $e=Te(G);be&&ze(G)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,$e,t.DEPTH24_STENCIL8,G.width,G.height):ze(G)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,$e,t.DEPTH24_STENCIL8,G.width,G.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,G.width,G.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,ae)}else{const $e=G.textures;for(let Ze=0;Ze<$e.length;Ze++){const We=$e[Ze],Mt=s.convert(We.format,We.colorSpace),pt=s.convert(We.type),at=S(We.internalFormat,Mt,pt,We.colorSpace),Ie=Te(G);be&&ze(G)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,Ie,at,G.width,G.height):ze(G)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Ie,at,G.width,G.height):t.renderbufferStorage(t.RENDERBUFFER,at,G.width,G.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function pe(ae,G){if(G&&G.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(t.FRAMEBUFFER,ae),!(G.depthTexture&&G.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!r.get(G.depthTexture).__webglTexture||G.depthTexture.image.width!==G.width||G.depthTexture.image.height!==G.height)&&(G.depthTexture.image.width=G.width,G.depthTexture.image.height=G.height,G.depthTexture.needsUpdate=!0),q(G.depthTexture,0);const $e=r.get(G.depthTexture).__webglTexture,Ze=Te(G);if(G.depthTexture.format===Kh)ze(G)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,$e,0,Ze):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,$e,0);else if(G.depthTexture.format===J0)ze(G)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,$e,0,Ze):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,$e,0);else throw new Error("Unknown depthTexture format")}function Se(ae){const G=r.get(ae),be=ae.isWebGLCubeRenderTarget===!0;if(ae.depthTexture&&!G.__autoAllocateDepthBuffer){if(be)throw new Error("target.depthTexture not supported in Cube render targets");pe(G.__webglFramebuffer,ae)}else if(be){G.__webglDepthbuffer=[];for(let $e=0;$e<6;$e++)n.bindFramebuffer(t.FRAMEBUFFER,G.__webglFramebuffer[$e]),G.__webglDepthbuffer[$e]=t.createRenderbuffer(),me(G.__webglDepthbuffer[$e],ae,!1)}else n.bindFramebuffer(t.FRAMEBUFFER,G.__webglFramebuffer),G.__webglDepthbuffer=t.createRenderbuffer(),me(G.__webglDepthbuffer,ae,!1);n.bindFramebuffer(t.FRAMEBUFFER,null)}function je(ae,G,be){const $e=r.get(ae);G!==void 0&&V($e.__webglFramebuffer,ae,ae.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),be!==void 0&&Se(ae)}function it(ae){const G=ae.texture,be=r.get(ae),$e=r.get(G);ae.addEventListener("dispose",L);const Ze=ae.textures,We=ae.isWebGLCubeRenderTarget===!0,Mt=Ze.length>1;if(Mt||($e.__webglTexture===void 0&&($e.__webglTexture=t.createTexture()),$e.__version=G.version,o.memory.textures++),We){be.__webglFramebuffer=[];for(let pt=0;pt<6;pt++)if(G.mipmaps&&G.mipmaps.length>0){be.__webglFramebuffer[pt]=[];for(let at=0;at0){be.__webglFramebuffer=[];for(let pt=0;pt0&&ze(ae)===!1){be.__webglMultisampledFramebuffer=t.createFramebuffer(),be.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,be.__webglMultisampledFramebuffer);for(let pt=0;pt0)for(let at=0;at0)for(let at=0;at0){if(ze(ae)===!1){const G=ae.textures,be=ae.width,$e=ae.height;let Ze=t.COLOR_BUFFER_BIT;const We=ae.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Mt=r.get(ae),pt=G.length>1;if(pt)for(let at=0;at0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&G.__useRenderToTexture!==!1}function ke(ae){const G=o.render.frame;f.get(ae)!==G&&(f.set(ae,G),ae.update())}function rt(ae,G){const be=ae.colorSpace,$e=ae.format,Ze=ae.type;return ae.isCompressedTexture===!0||ae.isVideoTexture===!0||be!==Wu&&be!==xu&&(br.getTransfer(be)===Hr?($e!==zo||Ze!==Fc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",be)),G}function tt(ae){return typeof HTMLImageElement<"u"&&ae instanceof HTMLImageElement?(c.width=ae.naturalWidth||ae.width,c.height=ae.naturalHeight||ae.height):typeof VideoFrame<"u"&&ae instanceof VideoFrame?(c.width=ae.displayWidth,c.height=ae.displayHeight):(c.width=ae.width,c.height=ae.height),c}this.allocateTextureUnit=H,this.resetTextureUnits=I,this.setTexture2D=q,this.setTexture2DArray=le,this.setTexture3D=ie,this.setTextureCube=ee,this.rebindTextures=je,this.setupRenderTarget=it,this.updateRenderTargetMipmap=xe,this.updateMultisampleRenderTarget=Oe,this.setupDepthRenderbuffer=Se,this.setupFrameBufferTexture=V,this.useMultisampledRTT=ze}function cz(t,e){function n(r,i=xu){let s;const o=br.getTransfer(i);if(r===Fc)return t.UNSIGNED_BYTE;if(r===XR)return t.UNSIGNED_SHORT_4_4_4_4;if(r===qR)return t.UNSIGNED_SHORT_5_5_5_1;if(r===TU)return t.UNSIGNED_INT_5_9_9_9_REV;if(r===EU)return t.BYTE;if(r===CU)return t.SHORT;if(r===jR)return t.UNSIGNED_SHORT;if(r===GR)return t.INT;if(r===fp)return t.UNSIGNED_INT;if(r===ba)return t.FLOAT;if(r===Sg)return t.HALF_FLOAT;if(r===AU)return t.ALPHA;if(r===RU)return t.RGB;if(r===zo)return t.RGBA;if(r===PU)return t.LUMINANCE;if(r===IU)return t.LUMINANCE_ALPHA;if(r===Kh)return t.DEPTH_COMPONENT;if(r===J0)return t.DEPTH_STENCIL;if(r===ZR)return t.RED;if(r===YR)return t.RED_INTEGER;if(r===LU)return t.RG;if(r===KR)return t.RG_INTEGER;if(r===QR)return t.RGBA_INTEGER;if(r===RS||r===PS||r===IS||r===LS)if(o===Hr)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(r===RS)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===PS)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===IS)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===LS)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(r===RS)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===PS)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===IS)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===LS)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===qT||r===ZT||r===YT||r===KT)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(r===qT)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===ZT)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===YT)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===KT)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===QT||r===JT||r===eA)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(r===QT||r===JT)return o===Hr?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(r===eA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===tA||r===nA||r===rA||r===iA||r===sA||r===oA||r===aA||r===lA||r===cA||r===uA||r===dA||r===fA||r===hA||r===pA)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(r===tA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===nA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===rA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===iA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===sA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===oA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===aA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===lA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===cA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===uA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===dA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===fA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===hA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===pA)return o===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===kS||r===mA||r===gA)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(r===kS)return o===Hr?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===mA)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===gA)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===kU||r===vA||r===yA||r===xA)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(r===kS)return s.COMPRESSED_RED_RGTC1_EXT;if(r===vA)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===yA)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===xA)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===wg?t.UNSIGNED_INT_24_8:t[r]!==void 0?t[r]:null}return{convert:n}}class uz extends $r{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Yd extends Jn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const e1e={type:"move"};class O5{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Yd,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Yd,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new K,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new K),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Yd,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new K,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new K),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const r of e.hand.values())this._getHandJoint(n,r)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,r){let i=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const b=n.getJointPose(_,r),y=this._getHandJoint(c,_);b!==null&&(y.matrix.fromArray(b.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,y.jointRadius=b.radius),y.visible=b!==null}const f=c.joints["index-finger-tip"],p=c.joints["thumb-tip"],g=f.position.distanceTo(p.position),v=.02,x=.005;c.inputState.pinching&&g>v+x?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&g<=v-x&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=n.getPose(e.gripSpace,r),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&s!==null&&(i=s),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(e1e)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new Yd;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}const t1e=` +void main() { + + gl_Position = vec4( position, 1.0 ); + +}`,n1e=` +uniform sampler2DArray depthColor; +uniform float depthWidth; +uniform float depthHeight; + +void main() { + + vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); + + if ( coord.x >= 1.0 ) { + + gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; + + } else { + + gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; + + } + +}`;class r1e{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n,r){if(this.texture===null){const i=new Yr,s=e.properties.get(i);s.__webglTexture=n.texture,(n.depthNear!=r.depthNear||n.depthFar!=r.depthFar)&&(this.depthNear=n.depthNear,this.depthFar=n.depthFar),this.texture=i}}render(e,n){if(this.texture!==null){if(this.mesh===null){const r=n.cameras[0].viewport,i=new Wl({vertexShader:t1e,fragmentShader:n1e,uniforms:{depthColor:{value:this.texture},depthWidth:{value:r.z},depthHeight:{value:r.w}}});this.mesh=new Vt(new va(20,20),i)}e.render(this.mesh,n)}}reset(){this.texture=null,this.mesh=null}}class i1e extends Bc{constructor(e,n){super();const r=this;let i=null,s=1,o=null,a="local-floor",l=1,c=null,f=null,p=null,g=null,v=null,x=null;const _=new r1e,b=n.getContextAttributes();let y=null,S=null;const w=[],T=[],L=new ct;let R=null;const P=new $r;P.layers.enable(1),P.viewport=new Sr;const F=new $r;F.layers.enable(2),F.viewport=new Sr;const O=[P,F],I=new uz;I.layers.enable(1),I.layers.enable(2);let H=null,Q=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(V){let me=w[V];return me===void 0&&(me=new O5,w[V]=me),me.getTargetRaySpace()},this.getControllerGrip=function(V){let me=w[V];return me===void 0&&(me=new O5,w[V]=me),me.getGripSpace()},this.getHand=function(V){let me=w[V];return me===void 0&&(me=new O5,w[V]=me),me.getHandSpace()};function q(V){const me=T.indexOf(V.inputSource);if(me===-1)return;const pe=w[me];pe!==void 0&&(pe.update(V.inputSource,V.frame,c||o),pe.dispatchEvent({type:V.type,data:V.inputSource}))}function le(){i.removeEventListener("select",q),i.removeEventListener("selectstart",q),i.removeEventListener("selectend",q),i.removeEventListener("squeeze",q),i.removeEventListener("squeezestart",q),i.removeEventListener("squeezeend",q),i.removeEventListener("end",le),i.removeEventListener("inputsourceschange",ie);for(let V=0;V=0&&(T[Se]=null,w[Se].disconnect(pe))}for(let me=0;me=T.length){T.push(pe),Se=it;break}else if(T[it]===null){T[it]=pe,Se=it;break}if(Se===-1)break}const je=w[Se];je&&je.connect(pe)}}const ee=new K,ue=new K;function z(V,me,pe){ee.setFromMatrixPosition(me.matrixWorld),ue.setFromMatrixPosition(pe.matrixWorld);const Se=ee.distanceTo(ue),je=me.projectionMatrix.elements,it=pe.projectionMatrix.elements,xe=je[14]/(je[10]-1),et=je[14]/(je[10]+1),Re=(je[9]+1)/je[5],Oe=(je[9]-1)/je[5],Te=(je[8]-1)/je[0],ze=(it[8]+1)/it[0],ke=xe*Te,rt=xe*ze,tt=Se/(-Te+ze),ae=tt*-Te;me.matrixWorld.decompose(V.position,V.quaternion,V.scale),V.translateX(ae),V.translateZ(tt),V.matrixWorld.compose(V.position,V.quaternion,V.scale),V.matrixWorldInverse.copy(V.matrixWorld).invert();const G=xe+tt,be=et+tt,$e=ke-ae,Ze=rt+(Se-ae),We=Re*et/be*G,Mt=Oe*et/be*G;V.projectionMatrix.makePerspective($e,Ze,We,Mt,G,be),V.projectionMatrixInverse.copy(V.projectionMatrix).invert()}function te(V,me){me===null?V.matrixWorld.copy(V.matrix):V.matrixWorld.multiplyMatrices(me.matrixWorld,V.matrix),V.matrixWorldInverse.copy(V.matrixWorld).invert()}this.updateCamera=function(V){if(i===null)return;_.texture!==null&&(V.near=_.depthNear,V.far=_.depthFar),I.near=F.near=P.near=V.near,I.far=F.far=P.far=V.far,(H!==I.near||Q!==I.far)&&(i.updateRenderState({depthNear:I.near,depthFar:I.far}),H=I.near,Q=I.far,P.near=H,P.far=Q,F.near=H,F.far=Q,P.updateProjectionMatrix(),F.updateProjectionMatrix(),V.updateProjectionMatrix());const me=V.parent,pe=I.cameras;te(I,me);for(let Se=0;Se0&&(b.alphaTest.value=y.alphaTest);const S=e.get(y),w=S.envMap,T=S.envMapRotation;if(w&&(b.envMap.value=w,oh.copy(T),oh.x*=-1,oh.y*=-1,oh.z*=-1,w.isCubeTexture&&w.isRenderTargetTexture===!1&&(oh.y*=-1,oh.z*=-1),b.envMapRotation.value.setFromMatrix4(s1e.makeRotationFromEuler(oh)),b.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,b.reflectivity.value=y.reflectivity,b.ior.value=y.ior,b.refractionRatio.value=y.refractionRatio),y.lightMap){b.lightMap.value=y.lightMap;const L=t._useLegacyLights===!0?Math.PI:1;b.lightMapIntensity.value=y.lightMapIntensity*L,n(y.lightMap,b.lightMapTransform)}y.aoMap&&(b.aoMap.value=y.aoMap,b.aoMapIntensity.value=y.aoMapIntensity,n(y.aoMap,b.aoMapTransform))}function o(b,y){b.diffuse.value.copy(y.color),b.opacity.value=y.opacity,y.map&&(b.map.value=y.map,n(y.map,b.mapTransform))}function a(b,y){b.dashSize.value=y.dashSize,b.totalSize.value=y.dashSize+y.gapSize,b.scale.value=y.scale}function l(b,y,S,w){b.diffuse.value.copy(y.color),b.opacity.value=y.opacity,b.size.value=y.size*S,b.scale.value=w*.5,y.map&&(b.map.value=y.map,n(y.map,b.uvTransform)),y.alphaMap&&(b.alphaMap.value=y.alphaMap,n(y.alphaMap,b.alphaMapTransform)),y.alphaTest>0&&(b.alphaTest.value=y.alphaTest)}function c(b,y){b.diffuse.value.copy(y.color),b.opacity.value=y.opacity,b.rotation.value=y.rotation,y.map&&(b.map.value=y.map,n(y.map,b.mapTransform)),y.alphaMap&&(b.alphaMap.value=y.alphaMap,n(y.alphaMap,b.alphaMapTransform)),y.alphaTest>0&&(b.alphaTest.value=y.alphaTest)}function f(b,y){b.specular.value.copy(y.specular),b.shininess.value=Math.max(y.shininess,1e-4)}function p(b,y){y.gradientMap&&(b.gradientMap.value=y.gradientMap)}function g(b,y){b.metalness.value=y.metalness,y.metalnessMap&&(b.metalnessMap.value=y.metalnessMap,n(y.metalnessMap,b.metalnessMapTransform)),b.roughness.value=y.roughness,y.roughnessMap&&(b.roughnessMap.value=y.roughnessMap,n(y.roughnessMap,b.roughnessMapTransform)),y.envMap&&(b.envMapIntensity.value=y.envMapIntensity)}function v(b,y,S){b.ior.value=y.ior,y.sheen>0&&(b.sheenColor.value.copy(y.sheenColor).multiplyScalar(y.sheen),b.sheenRoughness.value=y.sheenRoughness,y.sheenColorMap&&(b.sheenColorMap.value=y.sheenColorMap,n(y.sheenColorMap,b.sheenColorMapTransform)),y.sheenRoughnessMap&&(b.sheenRoughnessMap.value=y.sheenRoughnessMap,n(y.sheenRoughnessMap,b.sheenRoughnessMapTransform))),y.clearcoat>0&&(b.clearcoat.value=y.clearcoat,b.clearcoatRoughness.value=y.clearcoatRoughness,y.clearcoatMap&&(b.clearcoatMap.value=y.clearcoatMap,n(y.clearcoatMap,b.clearcoatMapTransform)),y.clearcoatRoughnessMap&&(b.clearcoatRoughnessMap.value=y.clearcoatRoughnessMap,n(y.clearcoatRoughnessMap,b.clearcoatRoughnessMapTransform)),y.clearcoatNormalMap&&(b.clearcoatNormalMap.value=y.clearcoatNormalMap,n(y.clearcoatNormalMap,b.clearcoatNormalMapTransform),b.clearcoatNormalScale.value.copy(y.clearcoatNormalScale),y.side===yo&&b.clearcoatNormalScale.value.negate())),y.dispersion>0&&(b.dispersion.value=y.dispersion),y.iridescence>0&&(b.iridescence.value=y.iridescence,b.iridescenceIOR.value=y.iridescenceIOR,b.iridescenceThicknessMinimum.value=y.iridescenceThicknessRange[0],b.iridescenceThicknessMaximum.value=y.iridescenceThicknessRange[1],y.iridescenceMap&&(b.iridescenceMap.value=y.iridescenceMap,n(y.iridescenceMap,b.iridescenceMapTransform)),y.iridescenceThicknessMap&&(b.iridescenceThicknessMap.value=y.iridescenceThicknessMap,n(y.iridescenceThicknessMap,b.iridescenceThicknessMapTransform))),y.transmission>0&&(b.transmission.value=y.transmission,b.transmissionSamplerMap.value=S.texture,b.transmissionSamplerSize.value.set(S.width,S.height),y.transmissionMap&&(b.transmissionMap.value=y.transmissionMap,n(y.transmissionMap,b.transmissionMapTransform)),b.thickness.value=y.thickness,y.thicknessMap&&(b.thicknessMap.value=y.thicknessMap,n(y.thicknessMap,b.thicknessMapTransform)),b.attenuationDistance.value=y.attenuationDistance,b.attenuationColor.value.copy(y.attenuationColor)),y.anisotropy>0&&(b.anisotropyVector.value.set(y.anisotropy*Math.cos(y.anisotropyRotation),y.anisotropy*Math.sin(y.anisotropyRotation)),y.anisotropyMap&&(b.anisotropyMap.value=y.anisotropyMap,n(y.anisotropyMap,b.anisotropyMapTransform))),b.specularIntensity.value=y.specularIntensity,b.specularColor.value.copy(y.specularColor),y.specularColorMap&&(b.specularColorMap.value=y.specularColorMap,n(y.specularColorMap,b.specularColorMapTransform)),y.specularIntensityMap&&(b.specularIntensityMap.value=y.specularIntensityMap,n(y.specularIntensityMap,b.specularIntensityMapTransform))}function x(b,y){y.matcap&&(b.matcap.value=y.matcap)}function _(b,y){const S=e.get(y).light;b.referencePosition.value.setFromMatrixPosition(S.matrixWorld),b.nearDistance.value=S.shadow.camera.near,b.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function a1e(t,e,n,r){let i={},s={},o=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(S,w){const T=w.program;r.uniformBlockBinding(S,T)}function c(S,w){let T=i[S.id];T===void 0&&(x(S),T=f(S),i[S.id]=T,S.addEventListener("dispose",b));const L=w.program;r.updateUBOMapping(S,L);const R=e.render.frame;s[S.id]!==R&&(g(S),s[S.id]=R)}function f(S){const w=p();S.__bindingPointIndex=w;const T=t.createBuffer(),L=S.__size,R=S.usage;return t.bindBuffer(t.UNIFORM_BUFFER,T),t.bufferData(t.UNIFORM_BUFFER,L,R),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,w,T),T}function p(){for(let S=0;S0&&(T+=L-R),S.__size=T,S.__cache={},this}function _(S){const w={boundary:0,storage:0};return typeof S=="number"||typeof S=="boolean"?(w.boundary=4,w.storage=4):S.isVector2?(w.boundary=8,w.storage=8):S.isVector3||S.isColor?(w.boundary=16,w.storage=12):S.isVector4?(w.boundary=16,w.storage=16):S.isMatrix3?(w.boundary=48,w.storage=48):S.isMatrix4?(w.boundary=64,w.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),w}function b(S){const w=S.target;w.removeEventListener("dispose",b);const T=o.indexOf(w.__bindingPointIndex);o.splice(T,1),t.deleteBuffer(i[w.id]),delete i[w.id],delete s[w.id]}function y(){for(const S in i)t.deleteBuffer(i[S]);o=[],i={},s={}}return{bind:l,update:c,dispose:y}}class dz{constructor(e={}){const{canvas:n=qU(),context:r=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:f="default",failIfMajorPerformanceCaveat:p=!1}=e;this.isWebGLRenderer=!0;let g;if(r!==null){if(typeof WebGLRenderingContext<"u"&&r instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");g=r.getContextAttributes().alpha}else g=o;const v=new Uint32Array(4),x=new Int32Array(4);let _=null,b=null;const y=[],S=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=ho,this._useLegacyLights=!1,this.toneMapping=Ic,this.toneMappingExposure=1;const w=this;let T=!1,L=0,R=0,P=null,F=-1,O=null;const I=new Sr,H=new Sr;let Q=null;const q=new It(0);let le=0,ie=n.width,ee=n.height,ue=1,z=null,te=null;const oe=new Sr(0,0,ie,ee),de=new Sr(0,0,ie,ee);let Ce=!1;const Le=new hx;let V=!1,me=!1;const pe=new Jt,Se=new K,je={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function it(){return P===null?ue:1}let xe=r;function et(B,ne){return n.getContext(B,ne)}try{const B={alpha:!0,depth:i,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:f,failIfMajorPerformanceCaveat:p};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${rM}`),n.addEventListener("webglcontextlost",fe,!1),n.addEventListener("webglcontextrestored",Fe,!1),n.addEventListener("webglcontextcreationerror",He,!1),xe===null){const ne="webgl2";if(xe=et(ne,B),xe===null)throw et(ne)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(B){throw console.error("THREE.WebGLRenderer: "+B.message),B}let Re,Oe,Te,ze,ke,rt,tt,ae,G,be,$e,Ze,We,Mt,pt,at,Ie,ge,Xe,St,mt,Be,vt,qe;function ce(){Re=new _0e(xe),Re.init(),Be=new cz(xe,Re),Oe=new p0e(xe,Re,e,Be),Te=new Qge(xe),ze=new w0e(xe),ke=new Bge,rt=new Jge(xe,Re,Te,ke,Oe,Be,ze),tt=new g0e(w),ae=new x0e(w),G=new Phe(xe),vt=new f0e(xe,G),be=new b0e(xe,G,ze,vt),$e=new E0e(xe,be,G,ze),Xe=new M0e(xe,Oe,rt),at=new m0e(ke),Ze=new zge(w,tt,ae,Re,Oe,vt,at),We=new o1e(w,ke),Mt=new $ge,pt=new qge(Re),ge=new d0e(w,tt,ae,Te,$e,g,l),Ie=new Kge(w,$e,Oe),qe=new a1e(xe,ze,Oe,Te),St=new h0e(xe,Re,ze),mt=new S0e(xe,Re,ze),ze.programs=Ze.programs,w.capabilities=Oe,w.extensions=Re,w.properties=ke,w.renderLists=Mt,w.shadowMap=Ie,w.state=Te,w.info=ze}ce();const Ne=new i1e(w,xe);this.xr=Ne,this.getContext=function(){return xe},this.getContextAttributes=function(){return xe.getContextAttributes()},this.forceContextLoss=function(){const B=Re.get("WEBGL_lose_context");B&&B.loseContext()},this.forceContextRestore=function(){const B=Re.get("WEBGL_lose_context");B&&B.restoreContext()},this.getPixelRatio=function(){return ue},this.setPixelRatio=function(B){B!==void 0&&(ue=B,this.setSize(ie,ee,!1))},this.getSize=function(B){return B.set(ie,ee)},this.setSize=function(B,ne,_e=!0){if(Ne.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}ie=B,ee=ne,n.width=Math.floor(B*ue),n.height=Math.floor(ne*ue),_e===!0&&(n.style.width=B+"px",n.style.height=ne+"px"),this.setViewport(0,0,B,ne)},this.getDrawingBufferSize=function(B){return B.set(ie*ue,ee*ue).floor()},this.setDrawingBufferSize=function(B,ne,_e){ie=B,ee=ne,ue=_e,n.width=Math.floor(B*_e),n.height=Math.floor(ne*_e),this.setViewport(0,0,B,ne)},this.getCurrentViewport=function(B){return B.copy(I)},this.getViewport=function(B){return B.copy(oe)},this.setViewport=function(B,ne,_e,ye){B.isVector4?oe.set(B.x,B.y,B.z,B.w):oe.set(B,ne,_e,ye),Te.viewport(I.copy(oe).multiplyScalar(ue).round())},this.getScissor=function(B){return B.copy(de)},this.setScissor=function(B,ne,_e,ye){B.isVector4?de.set(B.x,B.y,B.z,B.w):de.set(B,ne,_e,ye),Te.scissor(H.copy(de).multiplyScalar(ue).round())},this.getScissorTest=function(){return Ce},this.setScissorTest=function(B){Te.setScissorTest(Ce=B)},this.setOpaqueSort=function(B){z=B},this.setTransparentSort=function(B){te=B},this.getClearColor=function(B){return B.copy(ge.getClearColor())},this.setClearColor=function(){ge.setClearColor.apply(ge,arguments)},this.getClearAlpha=function(){return ge.getClearAlpha()},this.setClearAlpha=function(){ge.setClearAlpha.apply(ge,arguments)},this.clear=function(B=!0,ne=!0,_e=!0){let ye=0;if(B){let we=!1;if(P!==null){const Qe=P.texture.format;we=Qe===QR||Qe===KR||Qe===YR}if(we){const Qe=P.texture.type,wt=Qe===Fc||Qe===fp||Qe===jR||Qe===wg||Qe===XR||Qe===qR,Ft=ge.getClearColor(),zt=ge.getClearAlpha(),dn=Ft.r,fn=Ft.g,wn=Ft.b;wt?(v[0]=dn,v[1]=fn,v[2]=wn,v[3]=zt,xe.clearBufferuiv(xe.COLOR,0,v)):(x[0]=dn,x[1]=fn,x[2]=wn,x[3]=zt,xe.clearBufferiv(xe.COLOR,0,x))}else ye|=xe.COLOR_BUFFER_BIT}ne&&(ye|=xe.DEPTH_BUFFER_BIT),_e&&(ye|=xe.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),xe.clear(ye)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){n.removeEventListener("webglcontextlost",fe,!1),n.removeEventListener("webglcontextrestored",Fe,!1),n.removeEventListener("webglcontextcreationerror",He,!1),Mt.dispose(),pt.dispose(),ke.dispose(),tt.dispose(),ae.dispose(),$e.dispose(),vt.dispose(),qe.dispose(),Ze.dispose(),Ne.dispose(),Ne.removeEventListener("sessionstart",un),Ne.removeEventListener("sessionend",Nn),In.stop()};function fe(B){B.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),T=!0}function Fe(){console.log("THREE.WebGLRenderer: Context Restored."),T=!1;const B=ze.autoReset,ne=Ie.enabled,_e=Ie.autoUpdate,ye=Ie.needsUpdate,we=Ie.type;ce(),ze.autoReset=B,Ie.enabled=ne,Ie.autoUpdate=_e,Ie.needsUpdate=ye,Ie.type=we}function He(B){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",B.statusMessage)}function ut(B){const ne=B.target;ne.removeEventListener("dispose",ut),xt(ne)}function xt(B){Xt(B),ke.remove(B)}function Xt(B){const ne=ke.get(B).programs;ne!==void 0&&(ne.forEach(function(_e){Ze.releaseProgram(_e)}),B.isShaderMaterial&&Ze.releaseShaderCache(B))}this.renderBufferDirect=function(B,ne,_e,ye,we,Qe){ne===null&&(ne=je);const wt=we.isMesh&&we.matrixWorld.determinant()<0,Ft=Ei(B,ne,_e,ye,we);Te.setMaterial(ye,wt);let zt=_e.index,dn=1;if(ye.wireframe===!0){if(zt=be.getWireframeAttribute(_e),zt===void 0)return;dn=2}const fn=_e.drawRange,wn=_e.attributes.position;let Cr=fn.start*dn,Wr=(fn.start+fn.count)*dn;Qe!==null&&(Cr=Math.max(Cr,Qe.start*dn),Wr=Math.min(Wr,(Qe.start+Qe.count)*dn)),zt!==null?(Cr=Math.max(Cr,0),Wr=Math.min(Wr,zt.count)):wn!=null&&(Cr=Math.max(Cr,0),Wr=Math.min(Wr,wn.count));const Fi=Wr-Cr;if(Fi<0||Fi===1/0)return;vt.setup(we,ye,Ft,_e,zt);let os,Dn=St;if(zt!==null&&(os=G.get(zt),Dn=mt,Dn.setIndex(os)),we.isMesh)ye.wireframe===!0?(Te.setLineWidth(ye.wireframeLinewidth*it()),Dn.setMode(xe.LINES)):Dn.setMode(xe.TRIANGLES);else if(we.isLine){let an=ye.linewidth;an===void 0&&(an=1),Te.setLineWidth(an*it()),we.isLineSegments?Dn.setMode(xe.LINES):we.isLineLoop?Dn.setMode(xe.LINE_LOOP):Dn.setMode(xe.LINE_STRIP)}else we.isPoints?Dn.setMode(xe.POINTS):we.isSprite&&Dn.setMode(xe.TRIANGLES);if(we.isBatchedMesh)we._multiDrawInstances!==null?Dn.renderMultiDrawInstances(we._multiDrawStarts,we._multiDrawCounts,we._multiDrawCount,we._multiDrawInstances):Dn.renderMultiDraw(we._multiDrawStarts,we._multiDrawCounts,we._multiDrawCount);else if(we.isInstancedMesh)Dn.renderInstances(Cr,Fi,we.count);else if(_e.isInstancedBufferGeometry){const an=_e._maxInstanceCount!==void 0?_e._maxInstanceCount:1/0,tr=Math.min(_e.instanceCount,an);Dn.renderInstances(Cr,Fi,tr)}else Dn.render(Cr,Fi)};function vn(B,ne,_e){B.transparent===!0&&B.side===Do&&B.forceSinglePass===!1?(B.side=yo,B.needsUpdate=!0,ss(B,ne,_e),B.side=Dc,B.needsUpdate=!0,ss(B,ne,_e),B.side=Do):ss(B,ne,_e)}this.compile=function(B,ne,_e=null){_e===null&&(_e=B),b=pt.get(_e),b.init(ne),S.push(b),_e.traverseVisible(function(we){we.isLight&&we.layers.test(ne.layers)&&(b.pushLight(we),we.castShadow&&b.pushShadow(we))}),B!==_e&&B.traverseVisible(function(we){we.isLight&&we.layers.test(ne.layers)&&(b.pushLight(we),we.castShadow&&b.pushShadow(we))}),b.setupLights(w._useLegacyLights);const ye=new Set;return B.traverse(function(we){const Qe=we.material;if(Qe)if(Array.isArray(Qe))for(let wt=0;wt{function Qe(){if(ye.forEach(function(wt){ke.get(wt).currentProgram.isReady()&&ye.delete(wt)}),ye.size===0){we(B);return}setTimeout(Qe,10)}Re.get("KHR_parallel_shader_compile")!==null?Qe():setTimeout(Qe,10)})};let mn=null;function On(B){mn&&mn(B)}function un(){In.stop()}function Nn(){In.start()}const In=new rz;In.setAnimationLoop(On),typeof self<"u"&&In.setContext(self),this.setAnimationLoop=function(B){mn=B,Ne.setAnimationLoop(B),B===null?In.stop():In.start()},Ne.addEventListener("sessionstart",un),Ne.addEventListener("sessionend",Nn),this.render=function(B,ne){if(ne!==void 0&&ne.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;B.matrixWorldAutoUpdate===!0&&B.updateMatrixWorld(),ne.parent===null&&ne.matrixWorldAutoUpdate===!0&&ne.updateMatrixWorld(),Ne.enabled===!0&&Ne.isPresenting===!0&&(Ne.cameraAutoUpdate===!0&&Ne.updateCamera(ne),ne=Ne.getCamera()),B.isScene===!0&&B.onBeforeRender(w,B,ne,P),b=pt.get(B,S.length),b.init(ne),S.push(b),pe.multiplyMatrices(ne.projectionMatrix,ne.matrixWorldInverse),Le.setFromProjectionMatrix(pe),me=this.localClippingEnabled,V=at.init(this.clippingPlanes,me),_=Mt.get(B,y.length),_.init(),y.push(_),or(B,ne,0,w.sortObjects),_.finish(),w.sortObjects===!0&&_.sort(z,te);const _e=Ne.enabled===!1||Ne.isPresenting===!1||Ne.hasDepthSensing()===!1;_e&&ge.addToRenderList(_,B),this.info.render.frame++,V===!0&&at.beginShadows();const ye=b.state.shadowsArray;Ie.render(ye,B,ne),V===!0&&at.endShadows(),this.info.autoReset===!0&&this.info.reset();const we=_.opaque,Qe=_.transmissive;if(b.setupLights(w._useLegacyLights),ne.isArrayCamera){const wt=ne.cameras;if(Qe.length>0)for(let Ft=0,zt=wt.length;Ft0&&Fr(we,Qe,B,ne),_e&&ge.render(B),Kn(_,B,ne);P!==null&&(rt.updateMultisampleRenderTarget(P),rt.updateRenderTargetMipmap(P)),B.isScene===!0&&B.onAfterRender(w,B,ne),vt.resetDefaultState(),F=-1,O=null,S.pop(),S.length>0?(b=S[S.length-1],V===!0&&at.setGlobalState(w.clippingPlanes,b.state.camera)):b=null,y.pop(),y.length>0?_=y[y.length-1]:_=null};function or(B,ne,_e,ye){if(B.visible===!1)return;if(B.layers.test(ne.layers)){if(B.isGroup)_e=B.renderOrder;else if(B.isLOD)B.autoUpdate===!0&&B.update(ne);else if(B.isLight)b.pushLight(B),B.castShadow&&b.pushShadow(B);else if(B.isSprite){if(!B.frustumCulled||Le.intersectsSprite(B)){ye&&Se.setFromMatrixPosition(B.matrixWorld).applyMatrix4(pe);const wt=$e.update(B),Ft=B.material;Ft.visible&&_.push(B,wt,Ft,_e,Se.z,null)}}else if((B.isMesh||B.isLine||B.isPoints)&&(!B.frustumCulled||Le.intersectsObject(B))){const wt=$e.update(B),Ft=B.material;if(ye&&(B.boundingSphere!==void 0?(B.boundingSphere===null&&B.computeBoundingSphere(),Se.copy(B.boundingSphere.center)):(wt.boundingSphere===null&&wt.computeBoundingSphere(),Se.copy(wt.boundingSphere.center)),Se.applyMatrix4(B.matrixWorld).applyMatrix4(pe)),Array.isArray(Ft)){const zt=wt.groups;for(let dn=0,fn=zt.length;dn0&&gr(we,ne,_e),Qe.length>0&&gr(Qe,ne,_e),wt.length>0&&gr(wt,ne,_e),Te.buffers.depth.setTest(!0),Te.buffers.depth.setMask(!0),Te.buffers.color.setMask(!0),Te.setPolygonOffset(!1)}function Fr(B,ne,_e,ye){if((_e.isScene===!0?_e.overrideMaterial:null)!==null)return;b.state.transmissionRenderTarget[ye.id]===void 0&&(b.state.transmissionRenderTarget[ye.id]=new hl(1,1,{generateMipmaps:!0,type:Re.has("EXT_color_buffer_half_float")||Re.has("EXT_color_buffer_float")?Sg:Fc,minFilter:Bl,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1}));const Qe=b.state.transmissionRenderTarget[ye.id],wt=ye.viewport||I;Qe.setSize(wt.z,wt.w);const Ft=w.getRenderTarget();w.setRenderTarget(Qe),w.getClearColor(q),le=w.getClearAlpha(),le<1&&w.setClearColor(16777215,.5),w.clear();const zt=w.toneMapping;w.toneMapping=Ic;const dn=ye.viewport;if(ye.viewport!==void 0&&(ye.viewport=void 0),b.setupLightsView(ye),V===!0&&at.setGlobalState(w.clippingPlanes,ye),gr(B,_e,ye),rt.updateMultisampleRenderTarget(Qe),rt.updateRenderTargetMipmap(Qe),Re.has("WEBGL_multisampled_render_to_texture")===!1){let fn=!1;for(let wn=0,Cr=ne.length;wn0),wn=!!_e.morphAttributes.position,Cr=!!_e.morphAttributes.normal,Wr=!!_e.morphAttributes.color;let Fi=Ic;ye.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(Fi=w.toneMapping);const os=_e.morphAttributes.position||_e.morphAttributes.normal||_e.morphAttributes.color,Dn=os!==void 0?os.length:0,an=ke.get(ye),tr=b.state.lights;if(V===!0&&(me===!0||B!==O)){const ti=B===O&&ye.id===F;at.setState(ye,B,ti)}let en=!1;ye.version===an.__version?(an.needsLights&&an.lightsStateVersion!==tr.state.version||an.outputColorSpace!==Ft||we.isBatchedMesh&&an.batching===!1||!we.isBatchedMesh&&an.batching===!0||we.isInstancedMesh&&an.instancing===!1||!we.isInstancedMesh&&an.instancing===!0||we.isSkinnedMesh&&an.skinning===!1||!we.isSkinnedMesh&&an.skinning===!0||we.isInstancedMesh&&an.instancingColor===!0&&we.instanceColor===null||we.isInstancedMesh&&an.instancingColor===!1&&we.instanceColor!==null||we.isInstancedMesh&&an.instancingMorph===!0&&we.morphTexture===null||we.isInstancedMesh&&an.instancingMorph===!1&&we.morphTexture!==null||an.envMap!==zt||ye.fog===!0&&an.fog!==Qe||an.numClippingPlanes!==void 0&&(an.numClippingPlanes!==at.numPlanes||an.numIntersection!==at.numIntersection)||an.vertexAlphas!==dn||an.vertexTangents!==fn||an.morphTargets!==wn||an.morphNormals!==Cr||an.morphColors!==Wr||an.toneMapping!==Fi||an.morphTargetsCount!==Dn)&&(en=!0):(en=!0,an.__version=ye.version);let Ui=an.currentProgram;en===!0&&(Ui=ss(ye,ne,we));let jr=!1,Gr=!1,Cs=!1;const xr=Ui.getUniforms(),Pr=an.uniforms;if(Te.useProgram(Ui.program)&&(jr=!0,Gr=!0,Cs=!0),ye.id!==F&&(F=ye.id,Gr=!0),jr||O!==B){xr.setValue(xe,"projectionMatrix",B.projectionMatrix),xr.setValue(xe,"viewMatrix",B.matrixWorldInverse);const ti=xr.map.cameraPosition;ti!==void 0&&ti.setValue(xe,Se.setFromMatrixPosition(B.matrixWorld)),Oe.logarithmicDepthBuffer&&xr.setValue(xe,"logDepthBufFC",2/(Math.log(B.far+1)/Math.LN2)),(ye.isMeshPhongMaterial||ye.isMeshToonMaterial||ye.isMeshLambertMaterial||ye.isMeshBasicMaterial||ye.isMeshStandardMaterial||ye.isShaderMaterial)&&xr.setValue(xe,"isOrthographic",B.isOrthographicCamera===!0),O!==B&&(O=B,Gr=!0,Cs=!0)}if(we.isSkinnedMesh){xr.setOptional(xe,we,"bindMatrix"),xr.setOptional(xe,we,"bindMatrixInverse");const ti=we.skeleton;ti&&(ti.boneTexture===null&&ti.computeBoneTexture(),xr.setValue(xe,"boneTexture",ti.boneTexture,rt))}we.isBatchedMesh&&(xr.setOptional(xe,we,"batchingTexture"),xr.setValue(xe,"batchingTexture",we._matricesTexture,rt));const qo=_e.morphAttributes;if((qo.position!==void 0||qo.normal!==void 0||qo.color!==void 0)&&Xe.update(we,_e,Ui),(Gr||an.receiveShadow!==we.receiveShadow)&&(an.receiveShadow=we.receiveShadow,xr.setValue(xe,"receiveShadow",we.receiveShadow)),ye.isMeshGouraudMaterial&&ye.envMap!==null&&(Pr.envMap.value=zt,Pr.flipEnvMap.value=zt.isCubeTexture&&zt.isRenderTargetTexture===!1?-1:1),ye.isMeshStandardMaterial&&ye.envMap===null&&ne.environment!==null&&(Pr.envMapIntensity.value=ne.environmentIntensity),Gr&&(xr.setValue(xe,"toneMappingExposure",w.toneMappingExposure),an.needsLights&&di(Pr,Cs),Qe&&ye.fog===!0&&We.refreshFogUniforms(Pr,Qe),We.refreshMaterialUniforms(Pr,ye,ue,ee,b.state.transmissionRenderTarget[B.id]),NS.upload(xe,Rr(an),Pr,rt)),ye.isShaderMaterial&&ye.uniformsNeedUpdate===!0&&(NS.upload(xe,Rr(an),Pr,rt),ye.uniformsNeedUpdate=!1),ye.isSpriteMaterial&&xr.setValue(xe,"center",we.center),xr.setValue(xe,"modelViewMatrix",we.modelViewMatrix),xr.setValue(xe,"normalMatrix",we.normalMatrix),xr.setValue(xe,"modelMatrix",we.matrixWorld),ye.isShaderMaterial||ye.isRawShaderMaterial){const ti=ye.uniformsGroups;for(let _r=0,Oa=ti.length;_r0&&rt.useMultisampledRTT(B)===!1?we=ke.get(B).__webglMultisampledFramebuffer:Array.isArray(fn)?we=fn[_e]:we=fn,I.copy(B.viewport),H.copy(B.scissor),Q=B.scissorTest}else I.copy(oe).multiplyScalar(ue).floor(),H.copy(de).multiplyScalar(ue).floor(),Q=Ce;if(Te.bindFramebuffer(xe.FRAMEBUFFER,we)&&ye&&Te.drawBuffers(B,we),Te.viewport(I),Te.scissor(H),Te.setScissorTest(Q),Qe){const zt=ke.get(B.texture);xe.framebufferTexture2D(xe.FRAMEBUFFER,xe.COLOR_ATTACHMENT0,xe.TEXTURE_CUBE_MAP_POSITIVE_X+ne,zt.__webglTexture,_e)}else if(wt){const zt=ke.get(B.texture),dn=ne||0;xe.framebufferTextureLayer(xe.FRAMEBUFFER,xe.COLOR_ATTACHMENT0,zt.__webglTexture,_e||0,dn)}F=-1},this.readRenderTargetPixels=function(B,ne,_e,ye,we,Qe,wt){if(!(B&&B.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ft=ke.get(B).__webglFramebuffer;if(B.isWebGLCubeRenderTarget&&wt!==void 0&&(Ft=Ft[wt]),Ft){Te.bindFramebuffer(xe.FRAMEBUFFER,Ft);try{const zt=B.texture,dn=zt.format,fn=zt.type;if(!Oe.textureFormatReadable(dn)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Oe.textureTypeReadable(fn)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ne>=0&&ne<=B.width-ye&&_e>=0&&_e<=B.height-we&&xe.readPixels(ne,_e,ye,we,Be.convert(dn),Be.convert(fn),Qe)}finally{const zt=P!==null?ke.get(P).__webglFramebuffer:null;Te.bindFramebuffer(xe.FRAMEBUFFER,zt)}}},this.copyFramebufferToTexture=function(B,ne,_e=0){const ye=Math.pow(2,-_e),we=Math.floor(ne.image.width*ye),Qe=Math.floor(ne.image.height*ye);rt.setTexture2D(ne,0),xe.copyTexSubImage2D(xe.TEXTURE_2D,_e,0,0,B.x,B.y,we,Qe),Te.unbindTexture()},this.copyTextureToTexture=function(B,ne,_e,ye=0){const we=ne.image.width,Qe=ne.image.height,wt=Be.convert(_e.format),Ft=Be.convert(_e.type);rt.setTexture2D(_e,0),xe.pixelStorei(xe.UNPACK_FLIP_Y_WEBGL,_e.flipY),xe.pixelStorei(xe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,_e.premultiplyAlpha),xe.pixelStorei(xe.UNPACK_ALIGNMENT,_e.unpackAlignment),ne.isDataTexture?xe.texSubImage2D(xe.TEXTURE_2D,ye,B.x,B.y,we,Qe,wt,Ft,ne.image.data):ne.isCompressedTexture?xe.compressedTexSubImage2D(xe.TEXTURE_2D,ye,B.x,B.y,ne.mipmaps[0].width,ne.mipmaps[0].height,wt,ne.mipmaps[0].data):xe.texSubImage2D(xe.TEXTURE_2D,ye,B.x,B.y,wt,Ft,ne.image),ye===0&&_e.generateMipmaps&&xe.generateMipmap(xe.TEXTURE_2D),Te.unbindTexture()},this.copyTextureToTexture3D=function(B,ne,_e,ye,we=0){const Qe=B.max.x-B.min.x,wt=B.max.y-B.min.y,Ft=B.max.z-B.min.z,zt=Be.convert(ye.format),dn=Be.convert(ye.type);let fn;if(ye.isData3DTexture)rt.setTexture3D(ye,0),fn=xe.TEXTURE_3D;else if(ye.isDataArrayTexture||ye.isCompressedArrayTexture)rt.setTexture2DArray(ye,0),fn=xe.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}xe.pixelStorei(xe.UNPACK_FLIP_Y_WEBGL,ye.flipY),xe.pixelStorei(xe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ye.premultiplyAlpha),xe.pixelStorei(xe.UNPACK_ALIGNMENT,ye.unpackAlignment);const wn=xe.getParameter(xe.UNPACK_ROW_LENGTH),Cr=xe.getParameter(xe.UNPACK_IMAGE_HEIGHT),Wr=xe.getParameter(xe.UNPACK_SKIP_PIXELS),Fi=xe.getParameter(xe.UNPACK_SKIP_ROWS),os=xe.getParameter(xe.UNPACK_SKIP_IMAGES),Dn=_e.isCompressedTexture?_e.mipmaps[we]:_e.image;xe.pixelStorei(xe.UNPACK_ROW_LENGTH,Dn.width),xe.pixelStorei(xe.UNPACK_IMAGE_HEIGHT,Dn.height),xe.pixelStorei(xe.UNPACK_SKIP_PIXELS,B.min.x),xe.pixelStorei(xe.UNPACK_SKIP_ROWS,B.min.y),xe.pixelStorei(xe.UNPACK_SKIP_IMAGES,B.min.z),_e.isDataTexture||_e.isData3DTexture?xe.texSubImage3D(fn,we,ne.x,ne.y,ne.z,Qe,wt,Ft,zt,dn,Dn.data):ye.isCompressedArrayTexture?xe.compressedTexSubImage3D(fn,we,ne.x,ne.y,ne.z,Qe,wt,Ft,zt,Dn.data):xe.texSubImage3D(fn,we,ne.x,ne.y,ne.z,Qe,wt,Ft,zt,dn,Dn),xe.pixelStorei(xe.UNPACK_ROW_LENGTH,wn),xe.pixelStorei(xe.UNPACK_IMAGE_HEIGHT,Cr),xe.pixelStorei(xe.UNPACK_SKIP_PIXELS,Wr),xe.pixelStorei(xe.UNPACK_SKIP_ROWS,Fi),xe.pixelStorei(xe.UNPACK_SKIP_IMAGES,os),we===0&&ye.generateMipmaps&&xe.generateMipmap(fn),Te.unbindTexture()},this.initTexture=function(B){B.isCubeTexture?rt.setTextureCube(B,0):B.isData3DTexture?rt.setTexture3D(B,0):B.isDataArrayTexture||B.isCompressedArrayTexture?rt.setTexture2DArray(B,0):rt.setTexture2D(B,0),Te.unbindTexture()},this.resetState=function(){L=0,R=0,P=null,Te.reset(),vt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ec}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===aM?"display-p3":"srgb",n.unpackColorSpace=br.workingColorSpace===ux?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class dM{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new It(e),this.density=n}clone(){return new dM(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class fM{constructor(e,n=1,r=1e3){this.isFog=!0,this.name="",this.color=new It(e),this.near=n,this.far=r}clone(){return new fM(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class vy extends Jn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new ns,this.environmentIntensity=1,this.environmentRotation=new ns,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}class hM{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=py,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Ma()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return ZU("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,r){e*=this.stride,r*=n.stride;for(let i=0,s=this.stride;ie.far||n.push({distance:l,point:U1.clone(),uv:xa.getInterpolation(U1,Ib,B1,Lb,YO,N5,KO,new ct),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function kb(t,e,n,r,i,s){Fm.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(z1.x=s*Fm.x-i*Fm.y,z1.y=i*Fm.x+s*Fm.y):z1.copy(Fm),t.copy(e),t.x+=z1.x,t.y+=z1.y,t.applyMatrix4(fz)}const Ob=new K,QO=new K;class pz extends Jn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const n=e.levels;for(let r=0,i=n.length;r0){let r,i;for(r=1,i=n.length;r0){Ob.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(Ob);this.getObjectForDistance(i).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){Ob.setFromMatrixPosition(e.matrixWorld),QO.setFromMatrixPosition(this.matrixWorld);const r=Ob.distanceTo(QO)/e.zoom;n[0].object.visible=!0;let i,s;for(i=1,s=n.length;i=o)n[i-1].object.visible=!1,n[i].object.visible=!0;else break}for(this._currentLevel=i-1;i=r.length&&r.push({start:-1,count:-1,z:-1});const s=r[this.index];i.push(s),this.index++,s.start=e.start,s.count=e.count,s.z=n}reset(){this.list.length=0,this.index=0}}const zm="batchId",Pd=new Jt,aN=new Jt,p1e=new Jt,lN=new Jt,U5=new hx,Fb=new xo,ah=new Xs,V1=new K,z5=new h1e,Ws=new Vt,Ub=[];function m1e(t,e,n=0){const r=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const i=t.count;for(let s=0;s65536?new Uint32Array(s):new Uint16Array(s);n.setIndex(new fr(a,1))}const o=i>65536?new Uint32Array(r):new Uint16Array(r);n.setAttribute(zm,new fr(o,1)),this._geometryInitialized=!0}}_validateGeometry(e){if(e.getAttribute(zm))throw new Error(`BatchedMesh: Geometry cannot use attribute "${zm}"`);const n=this.geometry;if(!!e.getIndex()!=!!n.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const r in n.attributes){if(r===zm)continue;if(!e.hasAttribute(r))throw new Error(`BatchedMesh: Added geometry missing "${r}". All geometries must have consistent attributes.`);const i=e.getAttribute(r),s=n.getAttribute(r);if(i.itemSize!==s.itemSize||i.normalized!==s.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new xo);const e=this._geometryCount,n=this.boundingBox,r=this._active;n.makeEmpty();for(let i=0;i=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const i={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let s=null;const o=this._reservedRanges,a=this._drawRanges,l=this._bounds;this._geometryCount!==0&&(s=o[o.length-1]),n===-1?i.vertexCount=e.getAttribute("position").count:i.vertexCount=n,s===null?i.vertexStart=0:i.vertexStart=s.vertexStart+s.vertexCount;const c=e.getIndex(),f=c!==null;if(f&&(r===-1?i.indexCount=c.count:i.indexCount=r,s===null?i.indexStart=0:i.indexStart=s.indexStart+s.indexCount),i.indexStart!==-1&&i.indexStart+i.indexCount>this._maxIndexCount||i.vertexStart+i.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const p=this._visibility,g=this._active,v=this._matricesTexture,x=this._matricesTexture.image.data;p.push(!0),g.push(!0);const _=this._geometryCount;this._geometryCount++,p1e.toArray(x,_*16),v.needsUpdate=!0,o.push(i),a.push({start:f?i.indexStart:i.vertexStart,count:-1}),l.push({boxInitialized:!1,box:new xo,sphereInitialized:!1,sphere:new Xs});const b=this.geometry.getAttribute(zm);for(let y=0;y=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(n);const r=this.geometry,i=r.getIndex()!==null,s=r.getIndex(),o=n.getIndex(),a=this._reservedRanges[e];if(i&&o.count>a.indexCount||n.attributes.position.count>a.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.vertexCount;for(const v in r.attributes){if(v===zm)continue;const x=n.getAttribute(v),_=r.getAttribute(v);m1e(x,_,l);const b=x.itemSize;for(let y=x.count,S=c;y=n.length||n[e]===!1?this:(n[e]=!1,this._visibilityChanged=!0,this)}getInstanceCountAt(e){return this._multiDrawInstances===null?null:this._multiDrawInstances[e]}setInstanceCountAt(e,n){return this._multiDrawInstances===null&&(this._multiDrawInstances=new Int32Array(this._maxGeometryCount).fill(1)),this._multiDrawInstances[e]=n,e}getBoundingBoxAt(e,n){if(this._active[e]===!1)return null;const i=this._bounds[e],s=i.box,o=this.geometry;if(i.boxInitialized===!1){s.makeEmpty();const a=o.index,l=o.attributes.position,c=this._drawRanges[e];for(let f=c.start,p=c.start+c.count;f=o||r[e]===!1?this:(n.toArray(s,e*16),i.needsUpdate=!0,this)}getMatrixAt(e,n){const r=this._active,i=this._matricesTexture.image.data,s=this._geometryCount;return e>=s||r[e]===!1?null:n.fromArray(i,e*16)}setVisibleAt(e,n){const r=this._visibility,i=this._active,s=this._geometryCount;return e>=s||i[e]===!1||r[e]===n?this:(r[e]=n,this._visibilityChanged=!0,this)}getVisibleAt(e){const n=this._visibility,r=this._active,i=this._geometryCount;return e>=i||r[e]===!1?!1:n[e]}raycast(e,n){const r=this._visibility,i=this._active,s=this._drawRanges,o=this._geometryCount,a=this.matrixWorld,l=this.geometry;Ws.material=this.material,Ws.geometry.index=l.index,Ws.geometry.attributes=l.attributes,Ws.geometry.boundingBox===null&&(Ws.geometry.boundingBox=new xo),Ws.geometry.boundingSphere===null&&(Ws.geometry.boundingSphere=new Xs);for(let c=0;c({...n})),this._reservedRanges=e._reservedRanges.map(n=>({...n})),this._visibility=e._visibility.slice(),this._active=e._active.slice(),this._bounds=e._bounds.map(n=>({boxInitialized:n.boxInitialized,box:n.box.clone(),sphereInitialized:n.sphereInitialized,sphere:n.sphere.clone()})),this._maxGeometryCount=e._maxGeometryCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(e,n,r,i,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=i.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,l=this._active,c=this._visibility,f=this._multiDrawStarts,p=this._multiDrawCounts,g=this._drawRanges,v=this.perObjectFrustumCulled;v&&(lN.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse).multiply(this.matrixWorld),U5.setFromProjectionMatrix(lN,e.coordinateSystem));let x=0;if(this.sortObjects){aN.copy(this.matrixWorld).invert(),V1.setFromMatrixPosition(r.matrixWorld).applyMatrix4(aN);for(let y=0,S=c.length;y0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;sr)return;B5.applyMatrix4(t.matrixWorld);const l=e.ray.origin.distanceTo(B5);if(!(le.far))return{distance:l,point:uN.clone().applyMatrix4(t.matrixWorld),index:i,face:null,faceIndex:null,object:t}}const dN=new K,fN=new K;class Gl extends Gn{constructor(e,n){super(e,n),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,r=[];for(let i=0,s=n.count;i0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;si.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class g1e extends Yr{constructor(e,n,r,i,s,o,a,l,c){super(e,n,r,i,s,o,a,l,c),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:Mi,this.magFilter=s!==void 0?s:Mi,this.generateMipmaps=!1;const f=this;function p(){f.needsUpdate=!0,e.requestVideoFrameCallback(p)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(p)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class v1e extends Yr{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=bs,this.minFilter=bs,this.generateMipmaps=!1,this.needsUpdate=!0}}class mM extends Yr{constructor(e,n,r,i,s,o,a,l,c,f,p,g){super(null,o,a,l,c,f,i,s,p,g),this.isCompressedTexture=!0,this.image={width:n,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class y1e extends mM{constructor(e,n,r,i,s,o){super(e,n,r,s,o),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Uo}}class x1e extends mM{constructor(e,n,r){super(void 0,e[0].width,e[0].height,n,r,Fu),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class _1e extends Yr{constructor(e,n,r,i,s,o,a,l,c){super(e,n,r,i,s,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Xl{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const r=this.getUtoTmapping(e);return this.getPoint(r,n)}getPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPoint(r/e));return n}getSpacedPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPointAt(r/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const n=[];let r,i=this.getPoint(0),s=0;n.push(0);for(let o=1;o<=e;o++)r=this.getPoint(o/e),s+=r.distanceTo(i),n.push(s),i=r;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const r=this.getLengths();let i=0;const s=r.length;let o;n?o=n:o=e*r[s-1];let a=0,l=s-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=r[i]-o,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,r[i]===o)return i/(s-1);const f=r[i],g=r[i+1]-f,v=(o-f)/g;return(i+v)/(s-1)}getTangent(e,n){let i=e-1e-4,s=e+1e-4;i<0&&(i=0),s>1&&(s=1);const o=this.getPoint(i),a=this.getPoint(s),l=n||(o.isVector2?new ct:new K);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,n){const r=this.getUtoTmapping(e);return this.getTangent(r,n)}computeFrenetFrames(e,n){const r=new K,i=[],s=[],o=[],a=new K,l=new Jt;for(let v=0;v<=e;v++){const x=v/e;i[v]=this.getTangentAt(x,new K)}s[0]=new K,o[0]=new K;let c=Number.MAX_VALUE;const f=Math.abs(i[0].x),p=Math.abs(i[0].y),g=Math.abs(i[0].z);f<=c&&(c=f,r.set(1,0,0)),p<=c&&(c=p,r.set(0,1,0)),g<=c&&r.set(0,0,1),a.crossVectors(i[0],r).normalize(),s[0].crossVectors(i[0],a),o[0].crossVectors(i[0],s[0]);for(let v=1;v<=e;v++){if(s[v]=s[v-1].clone(),o[v]=o[v-1].clone(),a.crossVectors(i[v-1],i[v]),a.length()>Number.EPSILON){a.normalize();const x=Math.acos(wi(i[v-1].dot(i[v]),-1,1));s[v].applyMatrix4(l.makeRotationAxis(a,x))}o[v].crossVectors(i[v],s[v])}if(n===!0){let v=Math.acos(wi(s[0].dot(s[e]),-1,1));v/=e,i[0].dot(a.crossVectors(s[0],s[e]))>0&&(v=-v);for(let x=1;x<=e;x++)s[x].applyMatrix4(l.makeRotationAxis(i[x],v*x)),o[x].crossVectors(i[x],s[x])}return{tangents:i,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class gM extends Xl{constructor(e=0,n=0,r=1,i=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=r,this.yRadius=i,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,n=new ct){const r=n,i=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)i;)s-=i;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let c,f;this.closed||a>0?c=i[(a-1)%s]:(Vb.subVectors(i[0],i[1]).add(i[0]),c=Vb);const p=i[a%s],g=i[(a+1)%s];if(this.closed||a+2i.length-2?i.length-1:o+1],p=i[o>i.length-3?i.length-1:o+2];return r.set(mN(a,l.x,c.x,f.x,p.x),mN(a,l.y,c.y,f.y,p.y)),r}copy(e){super.copy(e),this.points=[];for(let n=0,r=e.points.length;n=r){const o=i[s]-r,a=this.curves[s],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,n)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let r=0,i=this.curves.length;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,r=e.curves.length;n0){const p=c.getPoint(0);p.equals(this.currentPoint)||this.lineTo(p.x,p.y)}this.curves.push(c);const f=c.getPoint(1);return this.currentPoint.copy(f),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class mx extends Tn{constructor(e=[new ct(0,-.5),new ct(.5,0),new ct(0,.5)],n=12,r=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=wi(i,0,Math.PI*2);const s=[],o=[],a=[],l=[],c=[],f=1/n,p=new K,g=new ct,v=new K,x=new K,_=new K;let b=0,y=0;for(let S=0;S<=e.length-1;S++)switch(S){case 0:b=e[S+1].x-e[S].x,y=e[S+1].y-e[S].y,v.x=y*1,v.y=-b,v.z=y*0,_.copy(v),v.normalize(),l.push(v.x,v.y,v.z);break;case e.length-1:l.push(_.x,_.y,_.z);break;default:b=e[S+1].x-e[S].x,y=e[S+1].y-e[S].y,v.x=y*1,v.y=-b,v.z=y*0,x.copy(v),v.x+=_.x,v.y+=_.y,v.z+=_.z,v.normalize(),l.push(v.x,v.y,v.z),_.copy(x)}for(let S=0;S<=n;S++){const w=r+S*f*i,T=Math.sin(w),L=Math.cos(w);for(let R=0;R<=e.length-1;R++){p.x=e[R].x*T,p.y=e[R].y,p.z=e[R].x*L,o.push(p.x,p.y,p.z),g.x=S/n,g.y=R/(e.length-1),a.push(g.x,g.y);const P=l[3*R+0]*T,F=l[3*R+1],O=l[3*R+0]*L;c.push(P,F,O)}}for(let S=0;S0&&w(!0),n>0&&w(!1)),this.setIndex(f),this.setAttribute("position",new Ut(p,3)),this.setAttribute("normal",new Ut(g,3)),this.setAttribute("uv",new Ut(v,2));function S(){const T=new K,L=new K;let R=0;const P=(n-e)/r;for(let F=0;F<=s;F++){const O=[],I=F/s,H=I*(n-e)+e;for(let Q=0;Q<=i;Q++){const q=Q/i,le=q*l+a,ie=Math.sin(le),ee=Math.cos(le);L.x=H*ie,L.y=-I*r+b,L.z=H*ee,p.push(L.x,L.y,L.z),T.set(ie,P,ee).normalize(),g.push(T.x,T.y,T.z),v.push(q,1-I),O.push(x++)}_.push(O)}for(let F=0;F.9&&P<.1&&(w<.2&&(o[S+0]+=1),T<.2&&(o[S+2]+=1),L<.2&&(o[S+4]+=1))}}function g(S){s.push(S.x,S.y,S.z)}function v(S,w){const T=S*3;w.x=e[T+0],w.y=e[T+1],w.z=e[T+2]}function x(){const S=new K,w=new K,T=new K,L=new K,R=new ct,P=new ct,F=new ct;for(let O=0,I=0;O80*n){a=c=t[0],l=f=t[1];for(let x=n;xc&&(c=p),g>f&&(f=g);v=Math.max(c-a,f-l),v=v!==0?32767/v:0}return xy(s,o,n,a,l,v,0),o}};function Ez(t,e,n,r,i){let s,o;if(i===W1e(t,e,n,r)>0)for(s=e;s=e;s-=r)o=gN(s,t[s],t[s+1],o);return o&&bM(o,o.next)&&(by(o),o=o.next),o}function pp(t,e){if(!t)return t;e||(e=t);let n=t,r;do if(r=!1,!n.steiner&&(bM(n,n.next)||ai(n.prev,n,n.next)===0)){if(by(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function xy(t,e,n,r,i,s,o){if(!t)return;!o&&s&&U1e(t,r,i,s);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,s?P1e(t,r,i,s):R1e(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),by(t),t=c.next,a=c.next;continue}if(t=c,t===a){o?o===1?(t=I1e(pp(t),e,n),xy(t,e,n,r,i,s,2)):o===2&&L1e(t,e,n,r,i,s):xy(pp(t),e,n,r,i,s,1);break}}}function R1e(t){const e=t.prev,n=t,r=t.next;if(ai(e,n,r)>=0)return!1;const i=e.x,s=n.x,o=r.x,a=e.y,l=n.y,c=r.y,f=is?i>o?i:o:s>o?s:o,v=a>l?a>c?a:c:l>c?l:c;let x=r.next;for(;x!==e;){if(x.x>=f&&x.x<=g&&x.y>=p&&x.y<=v&&u0(i,a,s,l,o,c,x.x,x.y)&&ai(x.prev,x,x.next)>=0)return!1;x=x.next}return!0}function P1e(t,e,n,r){const i=t.prev,s=t,o=t.next;if(ai(i,s,o)>=0)return!1;const a=i.x,l=s.x,c=o.x,f=i.y,p=s.y,g=o.y,v=al?a>c?a:c:l>c?l:c,b=f>p?f>g?f:g:p>g?p:g,y=EA(v,x,e,n,r),S=EA(_,b,e,n,r);let w=t.prevZ,T=t.nextZ;for(;w&&w.z>=y&&T&&T.z<=S;){if(w.x>=v&&w.x<=_&&w.y>=x&&w.y<=b&&w!==i&&w!==o&&u0(a,f,l,p,c,g,w.x,w.y)&&ai(w.prev,w,w.next)>=0||(w=w.prevZ,T.x>=v&&T.x<=_&&T.y>=x&&T.y<=b&&T!==i&&T!==o&&u0(a,f,l,p,c,g,T.x,T.y)&&ai(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;w&&w.z>=y;){if(w.x>=v&&w.x<=_&&w.y>=x&&w.y<=b&&w!==i&&w!==o&&u0(a,f,l,p,c,g,w.x,w.y)&&ai(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;T&&T.z<=S;){if(T.x>=v&&T.x<=_&&T.y>=x&&T.y<=b&&T!==i&&T!==o&&u0(a,f,l,p,c,g,T.x,T.y)&&ai(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function I1e(t,e,n){let r=t;do{const i=r.prev,s=r.next.next;!bM(i,s)&&Cz(i,r,r.next,s)&&_y(i,s)&&_y(s,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(s.i/n|0),by(r),by(r.next),r=t=s),r=r.next}while(r!==t);return pp(r)}function L1e(t,e,n,r,i,s){let o=t;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&H1e(o,a)){let l=Tz(o,a);o=pp(o,o.next),l=pp(l,l.next),xy(o,e,n,r,i,s,0),xy(l,e,n,r,i,s,0);return}a=a.next}o=o.next}while(o!==t)}function k1e(t,e,n,r){const i=[];let s,o,a,l,c;for(s=0,o=e.length;s=n.next.y&&n.next.y!==n.y){const g=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(g<=s&&g>r&&(r=g,i=n.x=n.x&&n.x>=l&&s!==n.x&&u0(oi.x||n.x===i.x&&F1e(i,n)))&&(i=n,f=p)),n=n.next;while(n!==a);return i}function F1e(t,e){return ai(t.prev,t,e.prev)<0&&ai(e.next,t,t.next)<0}function U1e(t,e,n,r){let i=t;do i.z===0&&(i.z=EA(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,z1e(i)}function z1e(t){let e,n,r,i,s,o,a,l,c=1;do{for(n=t,t=null,s=null,o=0;n;){for(o++,r=n,a=0,e=0;e0||l>0&&r;)a!==0&&(l===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),s?s.nextZ=i:t=i,i.prevZ=s,s=i;n=r}s.nextZ=null,c*=2}while(o>1);return t}function EA(t,e,n,r,i){return t=(t-n)*i|0,e=(e-r)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function B1e(t){let e=t,n=t;do(e.x=(t-o)*(s-a)&&(t-o)*(r-a)>=(n-o)*(e-a)&&(n-o)*(s-a)>=(i-o)*(r-a)}function H1e(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!$1e(t,e)&&(_y(t,e)&&_y(e,t)&&V1e(t,e)&&(ai(t.prev,t,e.prev)||ai(t,e.prev,e))||bM(t,e)&&ai(t.prev,t,t.next)>0&&ai(e.prev,e,e.next)>0)}function ai(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function bM(t,e){return t.x===e.x&&t.y===e.y}function Cz(t,e,n,r){const i=qb(ai(t,e,n)),s=qb(ai(t,e,r)),o=qb(ai(n,r,t)),a=qb(ai(n,r,e));return!!(i!==s&&o!==a||i===0&&Xb(t,n,e)||s===0&&Xb(t,r,e)||o===0&&Xb(n,t,r)||a===0&&Xb(n,e,r))}function Xb(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function qb(t){return t>0?1:t<0?-1:0}function $1e(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Cz(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function _y(t,e){return ai(t.prev,t,t.next)<0?ai(t,e,t.next)>=0&&ai(t,t.prev,e)>=0:ai(t,e,t.prev)<0||ai(t,t.next,e)<0}function V1e(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,s=(t.y+e.y)/2;do n.y>s!=n.next.y>s&&n.next.y!==n.y&&i<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function Tz(t,e){const n=new CA(t.i,t.x,t.y),r=new CA(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,s.next=r,r.prev=s,r}function gN(t,e,n,r){const i=new CA(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function by(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function CA(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function W1e(t,e,n,r){let i=0;for(let s=e,o=n-r;s2&&t[e-1].equals(t[0])&&t.pop()}function yN(t,e){for(let n=0;nNumber.EPSILON){const We=Math.sqrt($e),Mt=Math.sqrt(G*G+be*be),pt=Oe.x-ae/We,at=Oe.y+tt/We,Ie=Te.x-be/Mt,ge=Te.y+G/Mt,Xe=((Ie-pt)*be-(ge-at)*G)/(tt*be-ae*G);ze=pt+tt*Xe-Re.x,ke=at+ae*Xe-Re.y;const St=ze*ze+ke*ke;if(St<=2)return new ct(ze,ke);rt=Math.sqrt(St/2)}else{let We=!1;tt>Number.EPSILON?G>Number.EPSILON&&(We=!0):tt<-Number.EPSILON?G<-Number.EPSILON&&(We=!0):Math.sign(ae)===Math.sign(be)&&(We=!0),We?(ze=-ae,ke=tt,rt=Math.sqrt($e)):(ze=tt,ke=ae,rt=Math.sqrt($e/2))}return new ct(ze/rt,ke/rt)}const te=[];for(let Re=0,Oe=le.length,Te=Oe-1,ze=Re+1;Re=0;Re--){const Oe=Re/b,Te=v*Math.cos(Oe*Math.PI/2),ze=x*Math.sin(Oe*Math.PI/2)+_;for(let ke=0,rt=le.length;ke=0;){const ze=Te;let ke=Te-1;ke<0&&(ke=Re.length-1);for(let rt=0,tt=f+b*2;rt0)&&v.push(w,T,R),(y!==r-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class E2 extends Ds{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new It(16777215),this.specular=new It(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new It(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=vf,this.normalScale=new ct(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ns,this.combine=cx,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Lz extends Ds{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new It(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new It(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=vf,this.normalScale=new ct(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class kz extends Ds{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=vf,this.normalScale=new ct(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class yP extends Ds{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new It(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new It(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=vf,this.normalScale=new ct(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ns,this.combine=cx,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Oz extends Ds{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new It(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=vf,this.normalScale=new ct(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Nz extends ws{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function kh(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function Dz(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Fz(t){function e(i,s){return t[i]-t[s]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function TA(t,e,n){const r=t.length,i=new t.constructor(r);for(let s=0,o=0;o!==r;++s){const a=n[s]*e;for(let l=0;l!==e;++l)i[o++]=t[a+l]}return i}function xP(t,e,n,r){let i=1,s=t[0];for(;s!==void 0&&s[r]===void 0;)s=t[i++];if(s===void 0)return;let o=s[r];if(o!==void 0)if(Array.isArray(o))do o=s[r],o!==void 0&&(e.push(s.time),n.push.apply(n,o)),s=t[i++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[r],o!==void 0&&(e.push(s.time),o.toArray(n,n.length)),s=t[i++];while(s!==void 0);else do o=s[r],o!==void 0&&(e.push(s.time),n.push(o)),s=t[i++];while(s!==void 0)}function q1e(t,e,n,r,i=30){const s=t.clone();s.name=e;const o=[];for(let l=0;l=r)){p.push(c.times[v]);for(let _=0;_s.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[x]){const y=x*p+f,S=y+p-f;_=a.values.slice(y,S)}else{const y=a.createInterpolant(),S=f,w=p-f;y.evaluate(s),_=y.resultBuffer.slice(S,w)}l==="quaternion"&&new sr().fromArray(_).normalize().conjugate().toArray(_);const b=c.times.length;for(let y=0;y=s)){const a=n[1];e=s)break t}o=r,r=0;break n}break e}for(;r>>1;en;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=r.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,s=r.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(i!==void 0&&Dz(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===OS,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*r,l=o*r,c=0;c!==r;++c)n[l+c]=n[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=n.slice(0,o*r)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}ql.prototype.TimeBufferType=Float32Array;ql.prototype.ValueBufferType=Float32Array;ql.prototype.DefaultInterpolation=cy;class Ep extends ql{}Ep.prototype.ValueTypeName="bool";Ep.prototype.ValueBufferType=Array;Ep.prototype.DefaultInterpolation=ly;Ep.prototype.InterpolantFactoryMethodLinear=void 0;Ep.prototype.InterpolantFactoryMethodSmooth=void 0;class bP extends ql{}bP.prototype.ValueTypeName="color";class Sy extends ql{}Sy.prototype.ValueTypeName="number";class Bz extends gx{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let f=c+a;c!==f;c+=4)sr.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Cp extends ql{InterpolantFactoryMethodLinear(e){return new Bz(this.times,this.values,this.getValueSize(),e)}}Cp.prototype.ValueTypeName="quaternion";Cp.prototype.DefaultInterpolation=cy;Cp.prototype.InterpolantFactoryMethodSmooth=void 0;class Tp extends ql{}Tp.prototype.ValueTypeName="string";Tp.prototype.ValueBufferType=Array;Tp.prototype.DefaultInterpolation=ly;Tp.prototype.InterpolantFactoryMethodLinear=void 0;Tp.prototype.InterpolantFactoryMethodSmooth=void 0;class mp extends ql{}mp.prototype.ValueTypeName="vector";class gp{constructor(e="",n=-1,r=[],i=oM){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=Ma(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let o=0,a=r.length;o!==a;++o)n.push(Q1e(r[o]).scale(i));const s=new this(e.name,e.duration,n,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=r.length;s!==o;++s)n.push(ql.toJSON(r[s]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const s=n.length,o=[];for(let a=0;a1){const p=f[1];let g=i[p];g||(i[p]=g=[]),g.push(c)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return o}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(p,g,v,x,_){if(v.length!==0){const b=[],y=[];xP(v,b,y,x),b.length!==0&&_.push(new p(g,b,y))}},i=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let p=0;p{n&&n(s),this.manager.itemEnd(e)},0),s;if(fu[e]!==void 0){fu[e].push({onLoad:n,onProgress:r,onError:i});return}fu[e]=[],fu[e].push({onLoad:n,onProgress:r,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const f=fu[e],p=c.body.getReader(),g=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),v=g?parseInt(g):0,x=v!==0;let _=0;const b=new ReadableStream({start(y){S();function S(){p.read().then(({done:w,value:T})=>{if(w)y.close();else{_+=T.byteLength;const L=new ProgressEvent("progress",{lengthComputable:x,loaded:_,total:v});for(let R=0,P=f.length;R{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(f=>new DOMParser().parseFromString(f,a));case"json":return c.json();default:if(a===void 0)return c.text();{const p=/charset="?([^;"\s]*)"?/i.exec(a),g=p&&p[1]?p[1].toLowerCase():void 0,v=new TextDecoder(g);return c.arrayBuffer().then(x=>v.decode(x))}}}).then(c=>{Mu.add(e,c);const f=fu[e];delete fu[e];for(let p=0,g=f.length;p{const f=fu[e];if(f===void 0)throw this.manager.itemError(e),c;delete fu[e];for(let p=0,g=f.length;p{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class eve extends Ns{constructor(e){super(e)}load(e,n,r,i){const s=this,o=new jl(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{n(s.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),s.manager.itemError(e)}},r,i)}parse(e){const n=[];for(let r=0;r0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(i.uniforms[s]={},o.type){case"t":i.uniforms[s].value=r(o.value);break;case"c":i.uniforms[s].value=new It().setHex(o.value);break;case"v2":i.uniforms[s].value=new ct().fromArray(o.value);break;case"v3":i.uniforms[s].value=new K().fromArray(o.value);break;case"v4":i.uniforms[s].value=new Sr().fromArray(o.value);break;case"m3":i.uniforms[s].value=new Bn().fromArray(o.value);break;case"m4":i.uniforms[s].value=new Jt().fromArray(o.value);break;default:i.uniforms[s].value=o.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(i.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)i.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(i.lights=e.lights),e.clipping!==void 0&&(i.clipping=e.clipping),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=r(e.map)),e.matcap!==void 0&&(i.matcap=r(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=r(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=r(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=r(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),i.normalScale=new ct().fromArray(s)}return e.displacementMap!==void 0&&(i.displacementMap=r(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=r(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=r(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=r(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=r(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=r(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=r(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=r(e.envMap)),e.envMapRotation!==void 0&&i.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=r(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=r(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=r(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=r(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=r(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=r(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new ct().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=r(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=r(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=r(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=r(e.thicknessMap)),e.anisotropyMap!==void 0&&(i.anisotropyMap=r(e.anisotropyMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=r(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=r(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const n={ShadowMaterial:Rz,SpriteMaterial:lP,RawShaderMaterial:Pz,ShaderMaterial:Wl,PointsMaterial:uP,MeshPhysicalMaterial:Iz,MeshStandardMaterial:vP,MeshPhongMaterial:E2,MeshToonMaterial:Lz,MeshNormalMaterial:kz,MeshLambertMaterial:yP,MeshDepthMaterial:oP,MeshDistanceMaterial:aP,MeshBasicMaterial:pl,MeshMatcapMaterial:Oz,LineDashedMaterial:Nz,LineBasicMaterial:ws,Material:Ds};return new n[e]}}class My{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r0){const l=new SP(n);s=new wy(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,f=e.length;c0){i=new wy(this.manager),i.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{const b=new xo;b.min.fromArray(_.boxMin),b.max.fromArray(_.boxMax);const y=new Xs;return y.radius=_.sphereRadius,y.center.fromArray(_.sphereCenter),{boxInitialized:_.boxInitialized,box:b,sphereInitialized:_.sphereInitialized,sphere:y}}),o._maxGeometryCount=e.maxGeometryCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=c(e.matricesTexture.uuid);break;case"LOD":o=new pz;break;case"Line":o=new Gn(a(e.geometry),l(e.material));break;case"LineLoop":o=new vz(a(e.geometry),l(e.material));break;case"LineSegments":o=new Gl(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new yz(a(e.geometry),l(e.material));break;case"Sprite":o=new hz(l(e.material));break;case"Group":o=new Yd;break;case"Bone":o=new pM;break;default:o=new Jn}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const g=e.children;for(let v=0;v"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Mu.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(c=>{n&&n(c),s.manager.itemEnd(e)}).catch(c=>{i&&i(c)});return}return setTimeout(function(){n&&n(o),s.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return Mu.add(e,c),n&&n(c),s.manager.itemEnd(e),c}).catch(function(c){i&&i(c),Mu.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});Mu.add(e,l),s.manager.itemStart(e)}}let Zb;class AP{static getContext(){return Zb===void 0&&(Zb=new(window.AudioContext||window.webkitAudioContext)),Zb}static setContext(e){Zb=e}}class cve extends Ns{constructor(e){super(e)}load(e,n,r,i){const s=this,o=new jl(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);AP.getContext().decodeAudioData(c,function(p){n(p)}).catch(a)}catch(c){a(c)}},r,i);function a(l){i?i(l):console.error(l),s.manager.itemError(e)}}}const CN=new Jt,TN=new Jt,lh=new Jt;class uve{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new $r,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new $r,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,lh.copy(e.projectionMatrix);const i=n.eyeSep/2,s=i*n.near/n.focus,o=n.near*Math.tan(Qh*n.fov*.5)/n.zoom;let a,l;TN.elements[12]=-i,CN.elements[12]=i,a=-o*n.aspect+s,l=o*n.aspect+s,lh.elements[0]=2*n.near/(l-a),lh.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(lh),a=-o*n.aspect-s,l=o*n.aspect-s,lh.elements[0]=2*n.near/(l-a),lh.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(lh)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(TN),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(CN)}}class RP{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=AN(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const n=AN();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function AN(){return(typeof performance>"u"?Date:performance).now()}const ch=new K,RN=new sr,dve=new K,uh=new K;class fve extends Jn{constructor(){super(),this.type="AudioListener",this.context=AP.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new RP}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(ch,RN,dve),uh.set(0,0,-1).applyQuaternion(RN),n.positionX){const i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(ch.x,i),n.positionY.linearRampToValueAtTime(ch.y,i),n.positionZ.linearRampToValueAtTime(ch.z,i),n.forwardX.linearRampToValueAtTime(uh.x,i),n.forwardY.linearRampToValueAtTime(uh.y,i),n.forwardZ.linearRampToValueAtTime(uh.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(ch.x,ch.y,ch.z),n.setOrientation(uh.x,uh.y,uh.z,r.x,r.y,r.z)}}class qz extends Jn{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,n=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,n=this.filters.length;e0&&this._mixBufferRegionAdditive(r,i,this._addIndex*n,1,n);for(let l=n,c=n+n;l!==c;++l)if(r[l]!==r[l+n]){a.setValue(r,i);break}}saveOriginalState(){const e=this.binding,n=this.buffer,r=this.valueSize,i=r*this._origIndex;e.getValue(n,i);for(let s=r,o=i;s!==o;++s)n[s]=n[i+s%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,n=e+this.valueSize;for(let r=e;r=.5)for(let o=0;o!==s;++o)e[n+o]=e[r+o]}_slerp(e,n,r,i){sr.slerpFlat(e,n,e,n,e,r,i)}_slerpAdditive(e,n,r,i,s){const o=this._workIndex*s;sr.multiplyQuaternionsFlat(e,o,e,n,e,r),sr.slerpFlat(e,n,e,n,e,o,i)}_lerp(e,n,r,i,s){const o=1-i;for(let a=0;a!==s;++a){const l=n+a;e[l]=e[l]*o+e[r+a]*i}}_lerpAdditive(e,n,r,i,s){for(let o=0;o!==s;++o){const a=n+o;e[a]=e[a]+e[r+o]*i}}}const PP="\\[\\]\\.:\\/",gve=new RegExp("["+PP+"]","g"),IP="[^"+PP+"]",vve="[^"+PP.replace("\\.","")+"]",yve=/((?:WC+[\/:])*)/.source.replace("WC",IP),xve=/(WCOD+)?/.source.replace("WCOD",vve),_ve=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",IP),bve=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",IP),Sve=new RegExp("^"+yve+xve+_ve+bve+"$"),wve=["material","materials","bones","map"];class Mve{constructor(e,n,r){const i=r||cr.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=r.length;i!==s;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class cr{constructor(e,n,r){this.path=n,this.parsedPath=r||cr.parseTrackName(n),this.node=cr.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new cr.Composite(e,n,r):new cr(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(gve,"")}static parseTrackName(e){const n=Sve.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const s=r.nodeName.substring(i+1);wve.indexOf(s)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=s)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(s){for(let o=0;o=s){const p=s++,g=e[p];n[g.uuid]=f,e[f]=g,n[c]=p,e[p]=l;for(let v=0,x=i;v!==x;++v){const _=r[v],b=_[p],y=_[f];_[f]=b,_[p]=y}}}this.nCachedObjects_=s}uncache(){const e=this._objects,n=this._indicesByUUID,r=this._bindings,i=r.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],f=c.uuid,p=n[f];if(p!==void 0)if(delete n[f],p0&&(n[v.uuid]=p),e[p]=v,e.pop();for(let x=0,_=i;x!==_;++x){const b=r[x];b[p]=b[g],b.pop()}}}this.nCachedObjects_=s}subscribe_(e,n){const r=this._bindingsIndicesByPath;let i=r[e];const s=this._bindings;if(i!==void 0)return s[i];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,f=this.nCachedObjects_,p=new Array(c);i=s.length,r[e]=i,o.push(e),a.push(n),s.push(p);for(let g=f,v=l.length;g!==v;++g){const x=l[g];p[g]=new cr(x,e,n)}return p}unsubscribe_(e){const n=this._bindingsIndicesByPath,r=n[e];if(r!==void 0){const i=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];n[c]=r,o[r]=l,o.pop(),s[r]=s[a],s.pop(),i[r]=i[a],i.pop()}}}class Yz{constructor(e,n,r=null,i=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=r,this.blendMode=i;const s=n.tracks,o=s.length,a=new Array(o),l={endingStart:Ph,endingEnd:Ph};for(let c=0;c!==o;++c){const f=s[c].createInterpolant(null);a[c]=f,f.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=NU,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,n){return this.loop=e,this.repetitions=n,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,n,r){if(e.fadeOut(n),this.fadeIn(n),r){const i=this._clip.duration,s=e._clip.duration,o=s/i,a=i/s;e.warp(1,o,n),this.warp(a,1,n)}return this}crossFadeTo(e,n,r){return e.crossFadeFrom(this,n,r)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,n,r){const i=this._mixer,s=i.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=s,l[1]=s+r,c[0]=e/o,c[1]=n/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,n,r,i){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*r;l<0||r===0?n=0:(this._startTime=null,n=r*l)}n*=this._updateTimeScale(e);const o=this._updateTime(n),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case JR:for(let f=0,p=l.length;f!==p;++f)l[f].evaluate(o),c[f].accumulateAdditive(a);break;case oM:default:for(let f=0,p=l.length;f!==p;++f)l[f].evaluate(o),c[f].accumulate(i,a)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const r=this._weightInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const r=this._timeScaleInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,r=this.loop;let i=this.time+e,s=this._loopCount;const o=r===DU;if(e===0)return s===-1?i:o&&(s&1)===1?n-i:i;if(r===OU){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=n)i=n;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),i>=n||i<0){const a=Math.floor(i/n);i-=n*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?n:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(o&&(s&1)===1)return n-i}return i}_setEndings(e,n,r){const i=this._interpolantSettings;r?(i.endingStart=Ih,i.endingEnd=Ih):(e?i.endingStart=this.zeroSlopeAtStart?Ih:Ph:i.endingStart=uy,n?i.endingEnd=this.zeroSlopeAtEnd?Ih:Ph:i.endingEnd=uy)}_scheduleFading(e,n,r){const i=this._mixer,s=i.time;let o=this._weightInterpolant;o===null&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=n,a[1]=s+e,l[1]=r,this}}const Cve=new Float32Array(1);class Tve extends Bc{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const r=e._localRoot||this._root,i=e._clip.tracks,s=i.length,o=e._propertyBindings,a=e._interpolants,l=r.uuid,c=this._bindingsByRootAndName;let f=c[l];f===void 0&&(f={},c[l]=f);for(let p=0;p!==s;++p){const g=i[p],v=g.name;let x=f[v];if(x!==void 0)++x.referenceCount,o[p]=x;else{if(x=o[p],x!==void 0){x._cacheIndex===null&&(++x.referenceCount,this._addInactiveBinding(x,l,v));continue}const _=n&&n._propertyBindings[p].binding.parsedPath;x=new Zz(cr.create(r,v,_),g.ValueTypeName,g.getValueSize()),++x.referenceCount,this._addInactiveBinding(x,l,v),o[p]=x}a[p].resultBuffer=x.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,s=this._actionsByClip[i];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,i,r)}const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const s=n[r];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const s=n[r];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const n=e._cacheIndex;return n!==null&&n=0;--r)e[r].stop();return this}update(e){e*=this.timeScale;const n=this._actions,r=this._nActiveActions,i=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==r;++c)n[c]._update(i,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);return this}setTime(e){this.time=0;for(let n=0;nthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,kN).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const ON=new K,Yb=new K;class Ove{constructor(e=new K,n=new K){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){ON.subVectors(e,this.start),Yb.subVectors(this.end,this.start);const r=Yb.dot(Yb);let s=Yb.dot(ON)/r;return n&&(s=wi(s,0,1)),s}closestPointToPoint(e,n,r){const i=this.closestPointToPointParameter(e,n);return this.delta(r).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const NN=new K;class Nve extends Jn{constructor(e,n){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const r=new Tn,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let p=0;p.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{BN.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(BN,n)}}setLength(e,n=e*.2,r=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(r,n,r),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class qve extends Gl{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new Tn;i.setAttribute("position",new Ut(n,3)),i.setAttribute("color",new Ut(r,3));const s=new ws({vertexColors:!0,toneMapped:!1});super(i,s),this.type="AxesHelper"}setColors(e,n,r){const i=new It,s=this.geometry.attributes.color.array;return i.set(e),i.toArray(s,0),i.toArray(s,3),i.set(n),i.toArray(s,6),i.toArray(s,9),i.set(r),i.toArray(s,12),i.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Zve{constructor(){this.type="ShapePath",this.color=new It,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new yy,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,r,i){return this.currentPath.quadraticCurveTo(e,n,r,i),this}bezierCurveTo(e,n,r,i,s,o){return this.currentPath.bezierCurveTo(e,n,r,i,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(y){const S=[];for(let w=0,T=y.length;wNumber.EPSILON){if(I<0&&(P=S[R],O=-O,F=S[L],I=-I),y.yF.y)continue;if(y.y===P.y){if(y.x===P.x)return!0}else{const H=I*(y.x-P.x)-O*(y.y-P.y);if(H===0)return!0;if(H<0)continue;T=!T}}else{if(y.y!==P.y)continue;if(F.x<=y.x&&y.x<=P.x||P.x<=y.x&&y.x<=F.x)return!0}}return T}const i=Lc.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const c=[];if(s.length===1)return a=s[0],l=new ep,l.curves=a.curves,c.push(l),c;let f=!i(s[0].getPoints());f=e?!f:f;const p=[],g=[];let v=[],x=0,_;g[x]=void 0,v[x]=[];for(let y=0,S=s.length;y1){let y=!1,S=0;for(let w=0,T=g.length;w0&&y===!1&&(v=p)}let b;for(let y=0,S=g.length;y{const p=typeof c=="function"?c(e):c;if(p!==e){const g=e;e=f?p:Object.assign({},e,p),n.forEach(v=>v(e,g))}},i=()=>e,s=(c,f=i,p=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let g=f(e);function v(){const x=f(e);if(!p(g,x)){const _=g;c(g=x,_)}}return n.add(v),()=>n.delete(v)},l={setState:r,getState:i,subscribe:(c,f,p)=>f||p?s(c,f,p):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return e=t(r,i,l),l}const Jve=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),HN=Jve?D.useEffect:D.useLayoutEffect;function eye(t){const e=typeof t=="function"?Qve(t):t,n=(r=e.getState,i=Object.is)=>{const[,s]=D.useReducer(b=>b+1,0),o=e.getState(),a=D.useRef(o),l=D.useRef(r),c=D.useRef(i),f=D.useRef(!1),p=D.useRef();p.current===void 0&&(p.current=r(o));let g,v=!1;(a.current!==o||l.current!==r||c.current!==i||f.current)&&(g=r(o),v=!i(p.current,g)),HN(()=>{v&&(p.current=g),a.current=o,l.current=r,c.current=i,f.current=!1});const x=D.useRef(o);HN(()=>{const b=()=>{try{const S=e.getState(),w=l.current(S);c.current(p.current,w)||(a.current=S,p.current=w,s())}catch{f.current=!0,s()}},y=e.subscribe(b);return e.getState()!==x.current&&b(),y},[]);const _=v?g:p.current;return D.useDebugValue(_),_};return Object.assign(n,e),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,e];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},n}var Jz={exports:{}},eB={exports:{}},tB={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(t){function e(z,te){var oe=z.length;z.push(te);e:for(;0>>1,Ce=z[de];if(0>>1;dei(me,oe))pei(Se,me)?(z[de]=Se,z[pe]=oe,de=pe):(z[de]=me,z[V]=oe,de=V);else if(pei(Se,oe))z[de]=Se,z[pe]=oe,de=pe;else break e}}return te}function i(z,te){var oe=z.sortIndex-te.sortIndex;return oe!==0?oe:z.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,p=null,g=3,v=!1,x=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(z){for(var te=n(c);te!==null;){if(te.callback===null)r(c);else if(te.startTime<=z)r(c),te.sortIndex=te.expirationTime,e(l,te);else break;te=n(c)}}function T(z){if(_=!1,w(z),!x)if(n(l)!==null)x=!0,ee(L);else{var te=n(c);te!==null&&ue(T,te.startTime-z)}}function L(z,te){x=!1,_&&(_=!1,y(F),F=-1),v=!0;var oe=g;try{for(w(te),p=n(l);p!==null&&(!(p.expirationTime>te)||z&&!H());){var de=p.callback;if(typeof de=="function"){p.callback=null,g=p.priorityLevel;var Ce=de(p.expirationTime<=te);te=t.unstable_now(),typeof Ce=="function"?p.callback=Ce:p===n(l)&&r(l),w(te)}else r(l);p=n(l)}if(p!==null)var Le=!0;else{var V=n(c);V!==null&&ue(T,V.startTime-te),Le=!1}return Le}finally{p=null,g=oe,v=!1}}var R=!1,P=null,F=-1,O=5,I=-1;function H(){return!(t.unstable_now()-Iz||125de?(z.sortIndex=oe,e(c,z),n(l)===null&&z===n(c)&&(_?(y(F),F=-1):_=!0,ue(T,oe-de))):(z.sortIndex=Ce,e(l,z),x||v||(x=!0,ee(L))),z},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(z){var te=g;return function(){var oe=g;g=te;try{return z.apply(this,arguments)}finally{g=oe}}}})(tB);eB.exports=tB;var PA=eB.exports;/** + * @license React + * react-reconciler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var tye=function(e){var n={},r=D,i=PA,s=Object.assign;function o(d){for(var h="https://reactjs.org/docs/error-decoder.html?invariant="+d,M=1;MPe||k[he]!==U[Pe]){var nt=` +`+k[he].replace(" at new "," at ");return d.displayName&&nt.includes("")&&(nt=nt.replace("",d.displayName)),nt}while(1<=he&&0<=Pe);break}}}finally{Cr=!1,Error.prepareStackTrace=M}return(d=d?d.displayName||d.name:"")?wn(d):""}var Fi=Object.prototype.hasOwnProperty,os=[],Dn=-1;function an(d){return{current:d}}function tr(d){0>Dn||(d.current=os[Dn],os[Dn]=null,Dn--)}function en(d,h){Dn++,os[Dn]=d.current,d.current=h}var Ui={},jr=an(Ui),Gr=an(!1),Cs=Ui;function xr(d,h){var M=d.type.contextTypes;if(!M)return Ui;var A=d.stateNode;if(A&&A.__reactInternalMemoizedUnmaskedChildContext===h)return A.__reactInternalMemoizedMaskedChildContext;var k={},U;for(U in M)k[U]=h[U];return A&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=h,d.__reactInternalMemoizedMaskedChildContext=k),k}function Pr(d){return d=d.childContextTypes,d!=null}function qo(){tr(Gr),tr(jr)}function ti(d,h,M){if(jr.current!==Ui)throw Error(o(168));en(jr,h),en(Gr,M)}function _r(d,h,M){var A=d.stateNode;if(h=h.childContextTypes,typeof A.getChildContext!="function")return M;A=A.getChildContext();for(var k in A)if(!(k in h))throw Error(o(108,F(d)||"Unknown",k));return s({},M,A)}function Oa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Ui,Cs=jr.current,en(jr,d),en(Gr,Gr.current),!0}function Zl(d,h,M){var A=d.stateNode;if(!A)throw Error(o(169));M?(d=_r(d,h,Cs),A.__reactInternalMemoizedMergedChildContext=d,tr(Gr),tr(jr),en(jr,d)):tr(Gr),en(Gr,M)}var Ts=Math.clz32?Math.clz32:Hc,ju=Math.log,bf=Math.LN2;function Hc(d){return d>>>=0,d===0?32:31-(ju(d)/bf|0)|0}var Zo=64,yl=4194304;function Mo(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function sn(d,h){var M=d.pendingLanes;if(M===0)return 0;var A=0,k=d.suspendedLanes,U=d.pingedLanes,he=M&268435455;if(he!==0){var Pe=he&~k;Pe!==0?A=Mo(Pe):(U&=he,U!==0&&(A=Mo(U)))}else he=M&~k,he!==0?A=Mo(he):U!==0&&(A=Mo(U));if(A===0)return 0;if(h!==0&&h!==A&&!(h&k)&&(k=A&-A,U=h&-h,k>=U||k===16&&(U&4194240)!==0))return h;if(A&4&&(A|=M&16),h=d.entangledLanes,h!==0)for(d=d.entanglements,h&=A;0M;M++)h.push(d);return h}function Z(d,h,M){d.pendingLanes|=h,h!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,h=31-Ts(h),d[h]=M}function re(d,h){var M=d.pendingLanes&~h;d.pendingLanes=h,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=h,d.mutableReadLanes&=h,d.entangledLanes&=h,h=d.entanglements;var A=d.eventTimes;for(d=d.expirationTimes;0>=he,k-=he,xl=1<<32-Ts(h)+k|M<zn?(mi=Pn,Pn=null):mi=Pn.sibling;var rr=on(Ve,Pn,Je[zn],Dt);if(rr===null){Pn===null&&(Pn=mi);break}d&&Pn&&rr.alternate===null&&h(Ve,Pn),De=U(rr,De,zn),Un===null?Qt=rr:Un.sibling=rr,Un=rr,Pn=mi}if(zn===Je.length)return M(Ve,Pn),Or&&_l(Ve,zn),Qt;if(Pn===null){for(;znzn?(mi=Pn,Pn=null):mi=Pn.sibling;var Wa=on(Ve,Pn,rr.value,Dt);if(Wa===null){Pn===null&&(Pn=mi);break}d&&Pn&&Wa.alternate===null&&h(Ve,Pn),De=U(Wa,De,zn),Un===null?Qt=Wa:Un.sibling=Wa,Un=Wa,Pn=mi}if(rr.done)return M(Ve,Pn),Or&&_l(Ve,zn),Qt;if(Pn===null){for(;!rr.done;zn++,rr=Je.next())rr=An(Ve,rr.value,Dt),rr!==null&&(De=U(rr,De,zn),Un===null?Qt=rr:Un.sibling=rr,Un=rr);return Or&&_l(Ve,zn),Qt}for(Pn=A(Ve,Pn);!rr.done;zn++,rr=Je.next())rr=vr(Pn,Ve,zn,rr.value,Dt),rr!==null&&(d&&rr.alternate!==null&&Pn.delete(rr.key===null?zn:rr.key),De=U(rr,De,zn),Un===null?Qt=rr:Un.sibling=rr,Un=rr);return d&&Pn.forEach(function(rm){return h(Ve,rm)}),Or&&_l(Ve,zn),Qt}function to(Ve,De,Je,Dt){if(typeof Je=="object"&&Je!==null&&Je.type===f&&Je.key===null&&(Je=Je.props.children),typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case l:e:{for(var Qt=Je.key,Un=De;Un!==null;){if(Un.key===Qt){if(Qt=Je.type,Qt===f){if(Un.tag===7){M(Ve,Un.sibling),De=k(Un,Je.props.children),De.return=Ve,Ve=De;break e}}else if(Un.elementType===Qt||typeof Qt=="object"&&Qt!==null&&Qt.$$typeof===w&&Af(Qt)===Un.type){M(Ve,Un.sibling),De=k(Un,Je.props),De.ref=ed(Ve,Un,Je),De.return=Ve,Ve=De;break e}M(Ve,Un);break}else h(Ve,Un);Un=Un.sibling}Je.type===f?(De=uc(Je.props.children,Ve.mode,Dt,Je.key),De.return=Ve,Ve=De):(Dt=tm(Je.type,Je.key,Je.props,null,Ve.mode,Dt),Dt.ref=ed(Ve,De,Je),Dt.return=Ve,Ve=Dt)}return he(Ve);case c:e:{for(Un=Je.key;De!==null;){if(De.key===Un)if(De.tag===4&&De.stateNode.containerInfo===Je.containerInfo&&De.stateNode.implementation===Je.implementation){M(Ve,De.sibling),De=k(De,Je.children||[]),De.return=Ve,Ve=De;break e}else{M(Ve,De);break}else h(Ve,De);De=De.sibling}De=Ao(Je,Ve.mode,Dt),De.return=Ve,Ve=De}return he(Ve);case w:return Un=Je._init,to(Ve,De,Un(Je._payload),Dt)}if(ie(Je))return Kt(Ve,De,Je,Dt);if(R(Je))return gs(Ve,De,Je,Dt);na(Ve,Je)}return typeof Je=="string"&&Je!==""||typeof Je=="number"?(Je=""+Je,De!==null&&De.tag===6?(M(Ve,De.sibling),De=k(De,Je),De.return=Ve,Ve=De):(M(Ve,De),De=ms(Je,Ve.mode,Dt),De.return=Ve,Ve=De),he(Ve)):M(Ve,De)}return to}var td=Tx(!0),Ax=Tx(!1),Da={},Qr=an(Da),nd=an(Da),rd=an(Da);function Fa(d){if(d===Da)throw Error(o(174));return d}function kg(d,h){en(rd,h),en(nd,d),en(Qr,Da),d=ue(h),tr(Qr),en(Qr,d)}function id(){tr(Qr),tr(nd),tr(rd)}function Rx(d){var h=Fa(rd.current),M=Fa(Qr.current);h=z(M,d.type,h),M!==h&&(en(nd,d),en(Qr,h))}function Kl(d){nd.current===d&&(tr(Qr),tr(nd))}var Ee=an(0);function st(d){for(var h=d;h!==null;){if(h.tag===13){var M=h.memoizedState;if(M!==null&&(M=M.dehydrated,M===null||gr(M)||ui(M)))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if(h.flags&128)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var Ke=[];function $t(){for(var d=0;dM?M:4,d(!0);var A=Ln.transition;Ln.transition={};try{d(!1),h()}finally{Ge=M,Ln.transition=A}}function kx(){return Zs().memoizedState}function Ai(d,h,M){var A=$a(d);M={lane:A,action:M,hasEagerState:!1,eagerState:null,next:null},Ox(d)?Nx(h,M):(zg(d,h,M),M=fs(),d=Co(d,A,M),d!==null&&Dx(d,h,A))}function cs(d,h,M){var A=$a(d),k={lane:A,action:M,hasEagerState:!1,eagerState:null,next:null};if(Ox(d))Nx(h,k);else{zg(d,h,k);var U=d.alternate;if(d.lanes===0&&(U===null||U.lanes===0)&&(U=h.lastRenderedReducer,U!==null))try{var he=h.lastRenderedState,Pe=U(he,M);if(k.hasEagerState=!0,k.eagerState=Pe,Lr(Pe,he))return}catch{}finally{}M=fs(),d=Co(d,A,M),d!==null&&Dx(d,h,A)}}function Ox(d){var h=d.alternate;return d===yn||h!==null&&h===yn}function Nx(d,h){Ql=Ps=!0;var M=d.pending;M===null?h.next=h:(h.next=M.next,M.next=h),d.pending=h}function zg(d,h,M){hi!==null&&d.mode&1&&!(Fn&2)?(d=h.interleaved,d===null?(M.next=M,Na===null?Na=[h]:Na.push(h)):(M.next=d.next,d.next=M),h.interleaved=M):(d=h.pending,d===null?M.next=M:(M.next=d.next,d.next=M),h.pending=M)}function Dx(d,h,M){if(M&4194240){var A=h.lanes;A&=d.pendingLanes,M|=A,h.lanes=M,Ye(d,M)}}var ld={readContext:Ur,useCallback:Ti,useContext:Ti,useEffect:Ti,useImperativeHandle:Ti,useInsertionEffect:Ti,useLayoutEffect:Ti,useMemo:Ti,useReducer:Ti,useRef:Ti,useState:Ti,useDebugValue:Ti,useDeferredValue:Ti,useTransition:Ti,useMutableSource:Ti,useSyncExternalStore:Ti,useId:Ti,unstable_isNewReconciler:!1},Ff={readContext:Ur,useCallback:function(d,h){return Ua().memoizedState=[d,h===void 0?null:h],d},useContext:Ur,useEffect:ad,useImperativeHandle:function(d,h,M){return M=M!=null?M.concat([d]):null,ec(4194308,4,Of.bind(null,h,d),M)},useLayoutEffect:function(d,h){return ec(4194308,4,d,h)},useInsertionEffect:function(d,h){return ec(4,2,d,h)},useMemo:function(d,h){var M=Ua();return h=h===void 0?null:h,d=d(),M.memoizedState=[d,h],d},useReducer:function(d,h,M){var A=Ua();return h=M!==void 0?M(h):h,A.memoizedState=A.baseState=h,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:h},A.queue=d,d=d.dispatch=Ai.bind(null,yn,d),[A.memoizedState,d]},useRef:function(d){var h=Ua();return d={current:d},h.memoizedState=d},useState:Up,useDebugValue:Df,useDeferredValue:function(d){var h=Up(d),M=h[0],A=h[1];return ad(function(){var k=Ln.transition;Ln.transition={};try{A(d)}finally{Ln.transition=k}},[d]),M},useTransition:function(){var d=Up(!1),h=d[0];return d=kM.bind(null,d[1]),Ua().memoizedState=d,[h,d]},useMutableSource:function(){},useSyncExternalStore:function(d,h,M){var A=yn,k=Ua();if(Or){if(M===void 0)throw Error(o(407));M=M()}else{if(M=h(),hi===null)throw Error(o(349));zr&30||If(A,h,M)}k.memoizedState=M;var U={value:M,getSnapshot:h};return k.queue=U,ad(Lf.bind(null,A,U,d),[d]),A.flags|=2048,Jl(9,Ng.bind(null,A,U,M,h),void 0,null),M},useId:function(){var d=Ua(),h=hi.identifierPrefix;if(Or){var M=ea,A=xl;M=(A&~(1<<32-Ts(A)-1)).toString(32)+M,h=":"+h+"R"+M,M=Rf++,0Wf&&(h.flags|=128,A=!0,us(k,!1),h.lanes=4194304)}else{if(!A)if(d=st(U),d!==null){if(h.flags|=128,A=!0,d=d.updateQueue,d!==null&&(h.updateQueue=d,h.flags|=4),us(k,!0),k.tail===null&&k.tailMode==="hidden"&&!U.alternate&&!Or)return hn(h),null}else 2*Pt()-k.renderingStartTime>Wf&&M!==1073741824&&(h.flags|=128,A=!0,us(k,!1),h.lanes=4194304);k.isBackwards?(U.sibling=h.child,h.child=U):(d=k.last,d!==null?d.sibling=U:h.child=U,k.last=U)}return k.tail!==null?(h=k.tail,k.rendering=h,k.tail=h.sibling,k.renderingStartTime=Pt(),h.sibling=null,d=Ee.current,en(Ee,A?d&1|2:d&1),h):(hn(h),null);case 22:case 23:return n1(),A=h.memoizedState!==null,d!==null&&d.memoizedState!==null!==A&&(h.flags|=8192),A&&h.mode&1?Js&1073741824&&(hn(h),et&&h.subtreeFlags&6&&(h.flags|=8192)):hn(h),null;case 24:return null;case 25:return null}throw Error(o(156,h.tag))}var NM=a.ReactCurrentOwner,Ys=!1;function ni(d,h,M,A){h.child=d===null?Ax(h,null,M,A):td(h,d.child,M,A)}function Hx(d,h,M,A,k){M=M.render;var U=h.ref;return Vc(h,k),A=lr(d,h,M,A,U,k),M=Og(),d!==null&&!Ys?(h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~k,Ri(d,h,k)):(Or&&M&&Np(h),h.flags|=1,ni(d,h,A,k),h.child)}function $x(d,h,M,A,k){if(d===null){var U=M.type;return typeof U=="function"&&!l1(U)&&U.defaultProps===void 0&&M.compare===null&&M.defaultProps===void 0?(h.tag=15,h.type=U,Vx(d,h,U,A,k)):(d=tm(M.type,null,A,h,h.mode,k),d.ref=h.ref,d.return=h,h.child=d)}if(U=d.child,!(d.lanes&k)){var he=U.memoizedProps;if(M=M.compare,M=M!==null?M:fi,M(he,A)&&d.ref===h.ref)return Ri(d,h,k)}return h.flags|=1,d=El(U,A),d.ref=h.ref,d.return=h,h.child=d}function Vx(d,h,M,A,k){if(d!==null&&fi(d.memoizedProps,A)&&d.ref===h.ref)if(Ys=!1,(d.lanes&k)!==0)d.flags&131072&&(Ys=!0);else return h.lanes=d.lanes,Ri(d,h,k);return ra(d,h,M,A,k)}function Wx(d,h,M){var A=h.pendingProps,k=A.children,U=d!==null?d.memoizedState:null;if(A.mode==="hidden")if(!(h.mode&1))h.memoizedState={baseLanes:0,cachePool:null},en(pd,Js),Js|=M;else if(M&1073741824)h.memoizedState={baseLanes:0,cachePool:null},A=U!==null?U.baseLanes:M,en(pd,Js),Js|=A;else return d=U!==null?U.baseLanes|M:M,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:d,cachePool:null},h.updateQueue=null,en(pd,Js),Js|=d,null;else U!==null?(A=U.baseLanes|M,h.memoizedState=null):A=M,en(pd,Js),Js|=A;return ni(d,h,k,M),h.child}function jx(d,h){var M=h.ref;(d===null&&M!==null||d!==null&&d.ref!==M)&&(h.flags|=512,h.flags|=2097152)}function ra(d,h,M,A,k){var U=Pr(M)?Cs:jr.current;return U=xr(h,U),Vc(h,k),M=lr(d,h,M,A,U,k),A=Og(),d!==null&&!Ys?(h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~k,Ri(d,h,k)):(Or&&A&&Np(h),h.flags|=1,ni(d,h,M,k),h.child)}function Gx(d,h,M,A,k){if(Pr(M)){var U=!0;Oa(h)}else U=!1;if(Vc(h,k),h.stateNode===null)d!==null&&(d.alternate=null,h.alternate=null,h.flags|=2),wx(h,M,A),Yu(h,M,A,k),A=!0;else if(d===null){var he=h.stateNode,Pe=h.memoizedProps;he.props=Pe;var nt=he.context,Et=M.contextType;typeof Et=="object"&&Et!==null?Et=Ur(Et):(Et=Pr(M)?Cs:jr.current,Et=xr(h,Et));var Wt=M.getDerivedStateFromProps,An=typeof Wt=="function"||typeof he.getSnapshotBeforeUpdate=="function";An||typeof he.UNSAFE_componentWillReceiveProps!="function"&&typeof he.componentWillReceiveProps!="function"||(Pe!==A||nt!==Et)&&Pg(h,he,A,Et),Ci=!1;var on=h.memoizedState;he.state=on,Qo(h,A,he,k),nt=h.memoizedState,Pe!==A||on!==nt||Gr.current||Ci?(typeof Wt=="function"&&(wf(h,M,Wt,A),nt=h.memoizedState),(Pe=Ci||Sx(h,M,Pe,A,on,nt,Et))?(An||typeof he.UNSAFE_componentWillMount!="function"&&typeof he.componentWillMount!="function"||(typeof he.componentWillMount=="function"&&he.componentWillMount(),typeof he.UNSAFE_componentWillMount=="function"&&he.UNSAFE_componentWillMount()),typeof he.componentDidMount=="function"&&(h.flags|=4194308)):(typeof he.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=A,h.memoizedState=nt),he.props=A,he.state=nt,he.context=Et,A=Pe):(typeof he.componentDidMount=="function"&&(h.flags|=4194308),A=!1)}else{he=h.stateNode,Rg(d,h),Pe=h.memoizedProps,Et=h.type===h.elementType?Pe:Xi(h.type,Pe),he.props=Et,An=h.pendingProps,on=he.context,nt=M.contextType,typeof nt=="object"&&nt!==null?nt=Ur(nt):(nt=Pr(M)?Cs:jr.current,nt=xr(h,nt));var vr=M.getDerivedStateFromProps;(Wt=typeof vr=="function"||typeof he.getSnapshotBeforeUpdate=="function")||typeof he.UNSAFE_componentWillReceiveProps!="function"&&typeof he.componentWillReceiveProps!="function"||(Pe!==An||on!==nt)&&Pg(h,he,A,nt),Ci=!1,on=h.memoizedState,he.state=on,Qo(h,A,he,k);var Kt=h.memoizedState;Pe!==An||on!==Kt||Gr.current||Ci?(typeof vr=="function"&&(wf(h,M,vr,A),Kt=h.memoizedState),(Et=Ci||Sx(h,M,Et,A,on,Kt,nt)||!1)?(Wt||typeof he.UNSAFE_componentWillUpdate!="function"&&typeof he.componentWillUpdate!="function"||(typeof he.componentWillUpdate=="function"&&he.componentWillUpdate(A,Kt,nt),typeof he.UNSAFE_componentWillUpdate=="function"&&he.UNSAFE_componentWillUpdate(A,Kt,nt)),typeof he.componentDidUpdate=="function"&&(h.flags|=4),typeof he.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof he.componentDidUpdate!="function"||Pe===d.memoizedProps&&on===d.memoizedState||(h.flags|=4),typeof he.getSnapshotBeforeUpdate!="function"||Pe===d.memoizedProps&&on===d.memoizedState||(h.flags|=1024),h.memoizedProps=A,h.memoizedState=Kt),he.props=A,he.state=Kt,he.context=nt,A=Et):(typeof he.componentDidUpdate!="function"||Pe===d.memoizedProps&&on===d.memoizedState||(h.flags|=4),typeof he.getSnapshotBeforeUpdate!="function"||Pe===d.memoizedProps&&on===d.memoizedState||(h.flags|=1024),A=!1)}return Hg(d,h,M,A,U,k)}function Hg(d,h,M,A,k,U){jx(d,h);var he=(h.flags&128)!==0;if(!A&&!he)return k&&Zl(h,M,!1),Ri(d,h,U);A=h.stateNode,NM.current=h;var Pe=he&&typeof M.getDerivedStateFromError!="function"?null:A.render();return h.flags|=1,d!==null&&he?(h.child=td(h,d.child,null,U),h.child=td(h,null,Pe,U)):ni(d,h,Pe,U),h.memoizedState=A.state,k&&Zl(h,M,!0),h.child}function Xx(d){var h=d.stateNode;h.pendingContext?ti(d,h.pendingContext,h.pendingContext!==h.context):h.context&&ti(d,h.context,!1),kg(d,h.containerInfo)}function qx(d,h,M,A,k){return Ju(),Tf(k),h.flags|=256,ni(d,h,M,A),h.child}var Bp={dehydrated:null,treeContext:null,retryLane:0};function Eo(d){return{baseLanes:d,cachePool:null}}function Zx(d,h,M){var A=h.pendingProps,k=Ee.current,U=!1,he=(h.flags&128)!==0,Pe;if((Pe=he)||(Pe=d!==null&&d.memoizedState===null?!1:(k&2)!==0),Pe?(U=!0,h.flags&=-129):(d===null||d.memoizedState!==null)&&(k|=1),en(Ee,k&1),d===null)return Lg(h),d=h.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?(h.mode&1?ui(d)?h.lanes=8:h.lanes=1073741824:h.lanes=1,null):(k=A.children,d=A.fallback,U?(A=h.mode,U=h.child,k={mode:"hidden",children:k},!(A&1)&&U!==null?(U.childLanes=0,U.pendingProps=k):U=Zf(k,A,0,null),d=uc(d,A,M,null),U.return=h,d.return=h,U.sibling=d,h.child=U,h.child.memoizedState=Eo(M),h.memoizedState=Bp,d):$g(h,k));if(k=d.memoizedState,k!==null){if(Pe=k.dehydrated,Pe!==null){if(he)return h.flags&256?(h.flags&=-257,Hp(d,h,M,Error(o(422)))):h.memoizedState!==null?(h.child=d.child,h.flags|=128,null):(U=A.fallback,k=h.mode,A=Zf({mode:"visible",children:A.children},k,0,null),U=uc(U,k,M,null),U.flags|=2,A.return=h,U.return=h,A.sibling=U,h.child=A,h.mode&1&&td(h,d.child,null,M),h.child.memoizedState=Eo(M),h.memoizedState=Bp,U);if(!(h.mode&1))h=Hp(d,h,M,null);else if(ui(Pe))h=Hp(d,h,M,Error(o(419)));else if(A=(M&d.childLanes)!==0,Ys||A){if(A=hi,A!==null){switch(M&-M){case 4:U=2;break;case 16:U=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:U=32;break;case 536870912:U=268435456;break;default:U=0}A=U&(A.suspendedLanes|M)?0:U,A!==0&&A!==k.retryLane&&(k.retryLane=A,Co(d,A,-1))}Qp(),h=Hp(d,h,M,Error(o(421)))}else gr(Pe)?(h.flags|=128,h.child=d.child,h=cc.bind(null,d),ss(Pe,h),h=null):(M=k.treeContext,Oe&&(Zi=di(Pe),Rs=h,Or=!0,ta=null,Qu=!1,M!==null&&(Fs[Us++]=xl,Fs[Us++]=ea,Fs[Us++]=Yl,xl=M.id,ea=M.overflow,Yl=h)),h=$g(h,h.pendingProps.children),h.flags|=4096);return h}return U?(A=Kx(d,h,A.children,A.fallback,M),U=h.child,k=d.child.memoizedState,U.memoizedState=k===null?Eo(M):{baseLanes:k.baseLanes|M,cachePool:null},U.childLanes=d.childLanes&~M,h.memoizedState=Bp,A):(M=Yx(d,h,A.children,M),h.memoizedState=null,M)}return U?(A=Kx(d,h,A.children,A.fallback,M),U=h.child,k=d.child.memoizedState,U.memoizedState=k===null?Eo(M):{baseLanes:k.baseLanes|M,cachePool:null},U.childLanes=d.childLanes&~M,h.memoizedState=Bp,A):(M=Yx(d,h,A.children,M),h.memoizedState=null,M)}function $g(d,h){return h=Zf({mode:"visible",children:h},d.mode,0,null),h.return=d,d.child=h}function Yx(d,h,M,A){var k=d.child;return d=k.sibling,M=El(k,{mode:"visible",children:M}),!(h.mode&1)&&(M.lanes=A),M.return=h,M.sibling=null,d!==null&&(A=h.deletions,A===null?(h.deletions=[d],h.flags|=16):A.push(d)),h.child=M}function Kx(d,h,M,A,k){var U=h.mode;d=d.child;var he=d.sibling,Pe={mode:"hidden",children:M};return!(U&1)&&h.child!==d?(M=h.child,M.childLanes=0,M.pendingProps=Pe,h.deletions=null):(M=El(d,Pe),M.subtreeFlags=d.subtreeFlags&14680064),he!==null?A=El(he,A):(A=uc(A,U,k,null),A.flags|=2),A.return=h,M.return=h,M.sibling=A,h.child=M,A}function Hp(d,h,M,A){return A!==null&&Tf(A),td(h,d.child,null,M),d=$g(h,h.pendingProps.children),d.flags|=2,h.memoizedState=null,d}function tc(d,h,M){d.lanes|=h;var A=d.alternate;A!==null&&(A.lanes|=h),Lp(d.return,h,M)}function Vg(d,h,M,A,k){var U=d.memoizedState;U===null?d.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:A,tail:M,tailMode:k}:(U.isBackwards=h,U.rendering=null,U.renderingStartTime=0,U.last=A,U.tail=M,U.tailMode=k)}function Qx(d,h,M){var A=h.pendingProps,k=A.revealOrder,U=A.tail;if(ni(d,h,A.children,M),A=Ee.current,A&2)A=A&1|2,h.flags|=128;else{if(d!==null&&d.flags&128)e:for(d=h.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&tc(d,M,h);else if(d.tag===19)tc(d,M,h);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===h)break e;for(;d.sibling===null;){if(d.return===null||d.return===h)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}A&=1}if(en(Ee,A),!(h.mode&1))h.memoizedState=null;else switch(k){case"forwards":for(M=h.child,k=null;M!==null;)d=M.alternate,d!==null&&st(d)===null&&(k=M),M=M.sibling;M=k,M===null?(k=h.child,h.child=null):(k=M.sibling,M.sibling=null),Vg(h,!1,k,M,U);break;case"backwards":for(M=null,k=h.child,h.child=null;k!==null;){if(d=k.alternate,d!==null&&st(d)===null){h.child=k;break}d=k.sibling,k.sibling=M,M=k,k=d}Vg(h,!0,M,null,U);break;case"together":Vg(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function Ri(d,h,M){if(d!==null&&(h.dependencies=d.dependencies),gd|=h.lanes,!(M&h.childLanes))return null;if(d!==null&&h.child!==d.child)throw Error(o(153));if(h.child!==null){for(d=h.child,M=El(d,d.pendingProps),h.child=M,M.return=h;d.sibling!==null;)d=d.sibling,M=M.sibling=El(d,d.pendingProps),M.return=h;M.sibling=null}return h.child}function DM(d,h,M){switch(h.tag){case 3:Xx(h),Ju();break;case 5:Rx(h);break;case 1:Pr(h.type)&&Oa(h);break;case 4:kg(h,h.stateNode.containerInfo);break;case 10:Tg(h,h.type._context,h.memoizedProps.value);break;case 13:var A=h.memoizedState;if(A!==null)return A.dehydrated!==null?(en(Ee,Ee.current&1),h.flags|=128,null):M&h.child.childLanes?Zx(d,h,M):(en(Ee,Ee.current&1),d=Ri(d,h,M),d!==null?d.sibling:null);en(Ee,Ee.current&1);break;case 19:if(A=(M&h.childLanes)!==0,d.flags&128){if(A)return Qx(d,h,M);h.flags|=128}var k=h.memoizedState;if(k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),en(Ee,Ee.current),A)break;return null;case 22:case 23:return h.lanes=0,Wx(d,h,M)}return Ri(d,h,M)}function FM(d,h){switch(As(h),h.tag){case 1:return Pr(h.type)&&qo(),d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 3:return id(),tr(Gr),tr(jr),$t(),d=h.flags,d&65536&&!(d&128)?(h.flags=d&-65537|128,h):null;case 5:return Kl(h),null;case 13:if(tr(Ee),d=h.memoizedState,d!==null&&d.dehydrated!==null){if(h.alternate===null)throw Error(o(340));Ju()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 19:return tr(Ee),null;case 4:return id(),null;case 10:return Ip(h.type._context),null;case 22:case 23:return n1(),null;case 24:return null;default:return null}}var $p=!1,Zc=!1,UM=typeof WeakSet=="function"?WeakSet:Set,kt=null;function Bf(d,h){var M=d.ref;if(M!==null)if(typeof M=="function")try{M(null)}catch(A){ps(d,h,A)}else M.current=null}function Wg(d,h,M){try{M()}catch(A){ps(d,h,A)}}var Jx=!1;function jg(d,h){for(te(d.containerInfo),kt=h;kt!==null;)if(d=kt,h=d.child,(d.subtreeFlags&1028)!==0&&h!==null)h.return=d,kt=h;else for(;kt!==null;){d=kt;try{var M=d.alternate;if(d.flags&1024)switch(d.tag){case 0:case 11:case 15:break;case 1:if(M!==null){var A=M.memoizedProps,k=M.memoizedState,U=d.stateNode,he=U.getSnapshotBeforeUpdate(d.elementType===d.type?A:Xi(d.type,A),k);U.__reactInternalSnapshotBeforeUpdate=he}break;case 3:et&&xt(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(Pe){ps(d,d.return,Pe)}if(h=d.sibling,h!==null){h.return=d.return,kt=h;break}kt=d.return}return M=Jx,Jx=!1,M}function ia(d,h,M){var A=h.updateQueue;if(A=A!==null?A.lastEffect:null,A!==null){var k=A=A.next;do{if((k.tag&d)===d){var U=k.destroy;k.destroy=void 0,U!==void 0&&Wg(h,M,U)}k=k.next}while(k!==A)}}function nc(d,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var M=h=h.next;do{if((M.tag&d)===d){var A=M.create;M.destroy=A()}M=M.next}while(M!==h)}}function Gg(d){var h=d.ref;if(h!==null){var M=d.stateNode;switch(d.tag){case 5:d=ee(M);break;default:d=M}typeof h=="function"?h(d):h.current=d}}function Xg(d,h,M){if(Rn&&typeof Rn.onCommitFiberUnmount=="function")try{Rn.onCommitFiberUnmount(nr,h)}catch{}switch(h.tag){case 0:case 11:case 14:case 15:if(d=h.updateQueue,d!==null&&(d=d.lastEffect,d!==null)){var A=d=d.next;do{var k=A,U=k.destroy;k=k.tag,U!==void 0&&(k&2||k&4)&&Wg(h,M,U),A=A.next}while(A!==d)}break;case 1:if(Bf(h,M),d=h.stateNode,typeof d.componentWillUnmount=="function")try{d.props=h.memoizedProps,d.state=h.memoizedState,d.componentWillUnmount()}catch(he){ps(h,M,he)}break;case 5:Bf(h,M);break;case 4:et?Zg(d,h,M):Re&&Re&&(h=h.stateNode.containerInfo,M=vn(h),un(h,M))}}function e_(d,h,M){for(var A=h;;)if(Xg(d,A,M),A.child===null||et&&A.tag===4){if(A===h)break;for(;A.sibling===null;){if(A.return===null||A.return===h)return;A=A.return}A.sibling.return=A.return,A=A.sibling}else A.child.return=A,A=A.child}function Ha(d){var h=d.alternate;h!==null&&(d.alternate=null,Ha(h)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(h=d.stateNode,h!==null&&rt(h)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function Vp(d){return d.tag===5||d.tag===3||d.tag===4}function rc(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||Vp(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Ks(d){if(et){e:{for(var h=d.return;h!==null;){if(Vp(h))break e;h=h.return}throw Error(o(160))}var M=h;switch(M.tag){case 5:h=M.stateNode,M.flags&32&&(Ne(h),M.flags&=-33),M=rc(d),Wp(d,M,h);break;case 3:case 4:h=M.stateNode.containerInfo,M=rc(d),qg(d,M,h);break;default:throw Error(o(161))}}}function qg(d,h,M){var A=d.tag;if(A===5||A===6)d=d.stateNode,h?vt(M,d,h):ge(M,d);else if(A!==4&&(d=d.child,d!==null))for(qg(d,h,M),d=d.sibling;d!==null;)qg(d,h,M),d=d.sibling}function Wp(d,h,M){var A=d.tag;if(A===5||A===6)d=d.stateNode,h?Be(M,d,h):Ie(M,d);else if(A!==4&&(d=d.child,d!==null))for(Wp(d,h,M),d=d.sibling;d!==null;)Wp(d,h,M),d=d.sibling}function Zg(d,h,M){for(var A=h,k=!1,U,he;;){if(!k){k=A.return;e:for(;;){if(k===null)throw Error(o(160));switch(U=k.stateNode,k.tag){case 5:he=!1;break e;case 3:U=U.containerInfo,he=!0;break e;case 4:U=U.containerInfo,he=!0;break e}k=k.return}k=!0}if(A.tag===5||A.tag===6)e_(d,A,M),he?ce(U,A.stateNode):qe(U,A.stateNode);else if(A.tag===18)he?wt(U,A.stateNode):Qe(U,A.stateNode);else if(A.tag===4){if(A.child!==null){U=A.stateNode.containerInfo,he=!0,A.child.return=A,A=A.child;continue}}else if(Xg(d,A,M),A.child!==null){A.child.return=A,A=A.child;continue}if(A===h)break;for(;A.sibling===null;){if(A.return===null||A.return===h)return;A=A.return,A.tag===4&&(k=!1)}A.sibling.return=A.return,A=A.sibling}}function Yc(d,h){if(et){switch(h.tag){case 0:case 11:case 14:case 15:ia(3,h,h.return),nc(3,h),ia(5,h,h.return);return;case 1:return;case 5:var M=h.stateNode;if(M!=null){var A=h.memoizedProps;d=d!==null?d.memoizedProps:A;var k=h.type,U=h.updateQueue;h.updateQueue=null,U!==null&&mt(M,U,k,d,A,h)}return;case 6:if(h.stateNode===null)throw Error(o(162));M=h.memoizedProps,Xe(h.stateNode,d!==null?d.memoizedProps:M,M);return;case 3:Oe&&d!==null&&d.memoizedState.isDehydrated&&ye(h.stateNode.containerInfo);return;case 12:return;case 13:sa(h);return;case 19:sa(h);return;case 17:return}throw Error(o(163))}switch(h.tag){case 0:case 11:case 14:case 15:ia(3,h,h.return),nc(3,h),ia(5,h,h.return);return;case 12:return;case 13:sa(h);return;case 19:sa(h);return;case 3:Oe&&d!==null&&d.memoizedState.isDehydrated&&ye(h.stateNode.containerInfo);break;case 22:case 23:return}e:if(Re){switch(h.tag){case 1:case 5:case 6:break e;case 3:case 4:h=h.stateNode,un(h.containerInfo,h.pendingChildren);break e}throw Error(o(163))}}function sa(d){var h=d.updateQueue;if(h!==null){d.updateQueue=null;var M=d.stateNode;M===null&&(M=d.stateNode=new UM),h.forEach(function(A){var k=l_.bind(null,d,A);M.has(A)||(M.add(A),A.then(k,k))})}}function t_(d,h){for(kt=h;kt!==null;){h=kt;var M=h.deletions;if(M!==null)for(var A=0;A";case $f:return":has("+(Vf(d)||"")+")";case Qs:return'[role="'+d.value+'"]';case Kc:return'"'+d.value+'"';case fd:return'[data-testname="'+d.value+'"]';default:throw Error(o(365))}}function r_(d,h){var M=[];d=[d,0];for(var A=0;Ak&&(k=he),A&=~U}if(A=k,A=Pt()-A,A=(120>A?120:480>A?480:1080>A?1080:1920>A?1920:3e3>A?3e3:4320>A?4320:1960*BM(A/1960))-A,10d?16:d,Ml===null)var A=!1;else{if(d=Ml,Ml=null,Gf=0,Fn&6)throw Error(o(331));var k=Fn;for(Fn|=4,kt=d.current;kt!==null;){var U=kt,he=U.child;if(kt.flags&16){var Pe=U.deletions;if(Pe!==null){for(var nt=0;ntPt()-e1?Va(d,0):Jg|=M),cn(d,h)}function a_(d,h){h===0&&(d.mode&1?(h=yl,yl<<=1,!(yl&130023424)&&(yl=4194304)):h=1);var M=fs();d=xd(d,h),d!==null&&(Z(d,h,M),cn(d,M))}function cc(d){var h=d.memoizedState,M=0;h!==null&&(M=h.retryLane),a_(d,M)}function l_(d,h){var M=0;switch(d.tag){case 13:var A=d.stateNode,k=d.memoizedState;k!==null&&(M=k.retryLane);break;case 19:A=d.stateNode;break;default:throw Error(o(314))}A!==null&&A.delete(h),a_(d,M)}var a1;a1=function(d,h,M){if(d!==null)if(d.memoizedProps!==h.pendingProps||Gr.current)Ys=!0;else{if(!(d.lanes&M)&&!(h.flags&128))return Ys=!1,DM(d,h,M);Ys=!!(d.flags&131072)}else Ys=!1,Or&&h.flags&1048576&&Mx(h,Ef,h.index);switch(h.lanes=0,h.tag){case 2:var A=h.type;d!==null&&(d.alternate=null,h.alternate=null,h.flags|=2),d=h.pendingProps;var k=xr(h,jr.current);Vc(h,M),k=lr(null,h,A,d,k,M);var U=Og();return h.flags|=1,typeof k=="object"&&k!==null&&typeof k.render=="function"&&k.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,Pr(A)?(U=!0,Oa(h)):U=!1,h.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,Ag(h),k.updater=Op,h.stateNode=k,k._reactInternals=h,Yu(h,A,d,M),h=Hg(null,h,A,!0,U,M)):(h.tag=0,Or&&U&&Np(h),ni(null,h,k,M),h=h.child),h;case 16:A=h.elementType;e:{switch(d!==null&&(d.alternate=null,h.alternate=null,h.flags|=2),d=h.pendingProps,k=A._init,A=k(A._payload),h.type=A,k=h.tag=c_(A),d=Xi(A,d),k){case 0:h=ra(null,h,A,d,M);break e;case 1:h=Gx(null,h,A,d,M);break e;case 11:h=Hx(null,h,A,d,M);break e;case 14:h=$x(null,h,A,Xi(A.type,d),M);break e}throw Error(o(306,A,""))}return h;case 0:return A=h.type,k=h.pendingProps,k=h.elementType===A?k:Xi(A,k),ra(d,h,A,k,M);case 1:return A=h.type,k=h.pendingProps,k=h.elementType===A?k:Xi(A,k),Gx(d,h,A,k,M);case 3:e:{if(Xx(h),d===null)throw Error(o(387));A=h.pendingProps,U=h.memoizedState,k=U.element,Rg(d,h),Qo(h,A,null,M);var he=h.memoizedState;if(A=he.element,Oe&&U.isDehydrated)if(U={element:A,isDehydrated:!1,cache:he.cache,transitions:he.transitions},h.updateQueue.baseState=U,h.memoizedState=U,h.flags&256){k=Error(o(423)),h=qx(d,h,A,M,k);break e}else if(A!==k){k=Error(o(424)),h=qx(d,h,A,M,k);break e}else for(Oe&&(Zi=Ei(h.stateNode.containerInfo),Rs=h,Or=!0,ta=null,Qu=!1),M=Ax(h,null,A,M),h.child=M;M;)M.flags=M.flags&-3|4096,M=M.sibling;else{if(Ju(),A===k){h=Ri(d,h,M);break e}ni(d,h,A,M)}h=h.child}return h;case 5:return Rx(h),d===null&&Lg(h),A=h.type,k=h.pendingProps,U=d!==null?d.memoizedProps:null,he=k.children,me(A,k)?he=null:U!==null&&me(A,U)&&(h.flags|=32),jx(d,h),ni(d,h,he,M),h.child;case 6:return d===null&&Lg(h),null;case 13:return Zx(d,h,M);case 4:return kg(h,h.stateNode.containerInfo),A=h.pendingProps,d===null?h.child=td(h,null,A,M):ni(d,h,A,M),h.child;case 11:return A=h.type,k=h.pendingProps,k=h.elementType===A?k:Xi(A,k),Hx(d,h,A,k,M);case 7:return ni(d,h,h.pendingProps,M),h.child;case 8:return ni(d,h,h.pendingProps.children,M),h.child;case 12:return ni(d,h,h.pendingProps.children,M),h.child;case 10:e:{if(A=h.type._context,k=h.pendingProps,U=h.memoizedProps,he=k.value,Tg(h,A,he),U!==null)if(Lr(U.value,he)){if(U.children===k.children&&!Gr.current){h=Ri(d,h,M);break e}}else for(U=h.child,U!==null&&(U.return=h);U!==null;){var Pe=U.dependencies;if(Pe!==null){he=U.child;for(var nt=Pe.firstContext;nt!==null;){if(nt.context===A){if(U.tag===1){nt=ls(-1,M&-M),nt.tag=2;var Et=U.updateQueue;if(Et!==null){Et=Et.shared;var Wt=Et.pending;Wt===null?nt.next=nt:(nt.next=Wt.next,Wt.next=nt),Et.pending=nt}}U.lanes|=M,nt=U.alternate,nt!==null&&(nt.lanes|=M),Lp(U.return,M,h),Pe.lanes|=M;break}nt=nt.next}}else if(U.tag===10)he=U.type===h.type?null:U.child;else if(U.tag===18){if(he=U.return,he===null)throw Error(o(341));he.lanes|=M,Pe=he.alternate,Pe!==null&&(Pe.lanes|=M),Lp(he,M,h),he=U.sibling}else he=U.child;if(he!==null)he.return=U;else for(he=U;he!==null;){if(he===h){he=null;break}if(U=he.sibling,U!==null){U.return=he.return,he=U;break}he=he.return}U=he}ni(d,h,k.children,M),h=h.child}return h;case 9:return k=h.type,A=h.pendingProps.children,Vc(h,M),k=Ur(k),A=A(k),h.flags|=1,ni(d,h,A,M),h.child;case 14:return A=h.type,k=Xi(A,h.pendingProps),k=Xi(A.type,k),$x(d,h,A,k,M);case 15:return Vx(d,h,h.type,h.pendingProps,M);case 17:return A=h.type,k=h.pendingProps,k=h.elementType===A?k:Xi(A,k),d!==null&&(d.alternate=null,h.alternate=null,h.flags|=2),h.tag=1,Pr(A)?(d=!0,Oa(h)):d=!1,Vc(h,M),wx(h,A,k),Yu(h,A,k,M),Hg(null,h,A,!0,d,M);case 19:return Qx(d,h,M);case 22:return Wx(d,h,M)}throw Error(o(156,h.tag))};function em(d,h){return Tt(d,h)}function HM(d,h,M,A){this.tag=d,this.key=M,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=A,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function To(d,h,M,A){return new HM(d,h,M,A)}function l1(d){return d=d.prototype,!(!d||!d.isReactComponent)}function c_(d){if(typeof d=="function")return l1(d)?1:0;if(d!=null){if(d=d.$$typeof,d===_)return 11;if(d===S)return 14}return 2}function El(d,h){var M=d.alternate;return M===null?(M=To(d.tag,h,d.key,d.mode),M.elementType=d.elementType,M.type=d.type,M.stateNode=d.stateNode,M.alternate=d,d.alternate=M):(M.pendingProps=h,M.type=d.type,M.flags=0,M.subtreeFlags=0,M.deletions=null),M.flags=d.flags&14680064,M.childLanes=d.childLanes,M.lanes=d.lanes,M.child=d.child,M.memoizedProps=d.memoizedProps,M.memoizedState=d.memoizedState,M.updateQueue=d.updateQueue,h=d.dependencies,M.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},M.sibling=d.sibling,M.index=d.index,M.ref=d.ref,M}function tm(d,h,M,A,k,U){var he=2;if(A=d,typeof d=="function")l1(d)&&(he=1);else if(typeof d=="string")he=5;else e:switch(d){case f:return uc(M.children,k,U,h);case p:he=8,k|=8;break;case g:return d=To(12,M,h,k|2),d.elementType=g,d.lanes=U,d;case b:return d=To(13,M,h,k),d.elementType=b,d.lanes=U,d;case y:return d=To(19,M,h,k),d.elementType=y,d.lanes=U,d;case T:return Zf(M,k,U,h);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:he=10;break e;case x:he=9;break e;case _:he=11;break e;case S:he=14;break e;case w:he=16,A=null;break e}throw Error(o(130,d==null?d:typeof d,""))}return h=To(he,M,h,k),h.elementType=d,h.type=A,h.lanes=U,h}function uc(d,h,M,A){return d=To(7,d,A,h),d.lanes=M,d}function Zf(d,h,M,A){return d=To(22,d,A,h),d.elementType=T,d.lanes=M,d.stateNode={},d}function ms(d,h,M){return d=To(6,d,null,h),d.lanes=M,d}function Ao(d,h,M){return h=To(4,d.children!==null?d.children:[],d.key,h),h.lanes=M,h.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},h}function $M(d,h,M,A,k){this.tag=h,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=it,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=J(0),this.expirationTimes=J(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=J(0),this.identifierPrefix=A,this.onRecoverableError=k,Oe&&(this.mutableSourceEagerHydrationData=null)}function u_(d,h,M,A,k,U,he,Pe,nt){return d=new $M(d,h,M,Pe,nt),h===1?(h=1,U===!0&&(h|=8)):h=0,U=To(3,null,null,h),d.current=U,U.stateNode=d,U.memoizedState={element:A,isDehydrated:M,cache:null,transitions:null},Ag(U),d}function Yf(d){if(!d)return Ui;d=d._reactInternals;e:{if(O(d)!==d||d.tag!==1)throw Error(o(170));var h=d;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(Pr(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(o(171))}if(d.tag===1){var M=d.type;if(Pr(M))return _r(d,M,h)}return h}function eu(d){var h=d._reactInternals;if(h===void 0)throw typeof d.render=="function"?Error(o(188)):(d=Object.keys(d).join(","),Error(o(268,d)));return d=Q(h),d===null?null:d.stateNode}function c1(d,h){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var M=d.retryLane;d.retryLane=M!==0&&M=Et&&U>=An&&k<=Wt&&he<=on){d.splice(h,1);break}else if(A!==Et||M.width!==nt.width||onhe){if(!(U!==An||M.height!==nt.height||Wtk)){Et>A&&(nt.width+=Et-A,nt.x=A),WtU&&(nt.height+=An-U,nt.y=U),onM&&(M=he)),he ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return ee(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:VM,findFiberByHostInstance:d.findFiberByHostInstance||d_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var h=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(h.isDisabled||!h.supportsFiber)d=!0;else{try{nr=h.inject(d),Rn=h}catch{}d=!!h.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,h,M,A){if(!G)throw Error(o(363));d=Kg(d,h);var k=at(d,M,A).disconnect;return{disconnect:function(){k()}}},n.registerMutableSourceForHydration=function(d,h){var M=h._getVersion;M=M(h._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[h,M]:d.mutableSourceEagerHydrationData.push(h,M)},n.runWithPriority=function(d,h){var M=Ge;try{return Ge=d,h()}finally{Ge=M}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,h,M,A){var k=h.current,U=fs(),he=$a(k);return M=Yf(M),h.context===null?h.context=M:h.pendingContext=M,h=ls(U,he),h.payload={element:d},A=A===void 0?null:A,A!==null&&(h.callback=A),Ko(k,h),d=Co(k,he,U),d!==null&&Zu(d,k,he),he},n};Jz.exports=tye;var nye=Jz.exports;const rye=By(nye),iye=t=>typeof t=="object"&&typeof t.then=="function",Nh=[];function nB(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e)return!1;const r=t.length;if(e.length!==r)return!1;for(let i=0;i0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,r.lifespan)),s.response;if(!n)throw s.promise}const i={keys:e,equal:r.equal,remove:()=>{const s=Nh.indexOf(i);s!==-1&&Nh.splice(s,1)},promise:(iye(t)?t:t(...e)).then(s=>{i.response=s,r.lifespan&&r.lifespan>0&&(i.timeout=setTimeout(i.remove,r.lifespan))}).catch(s=>i.error=s)};if(Nh.push(i),!n)throw i.promise}const sye=(t,e,n)=>rB(t,e,!1,n),oye=(t,e,n)=>void rB(t,e,!0,n),aye=t=>{if(t===void 0||t.length===0)Nh.splice(0,Nh.length);else{const e=Nh.find(n=>nB(t,n.keys,n.equal));e&&e.remove()}},OP={},lye=t=>void Object.assign(OP,t);function cye(t,e){function n(f,{args:p=[],attach:g,...v},x){let _=`${f[0].toUpperCase()}${f.slice(1)}`,b;if(f==="primitive"){if(v.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const y=v.object;b=Gm(y,{type:f,root:x,attach:g,primitive:!0})}else{const y=OP[_];if(!y)throw new Error(`R3F: ${_} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(p))throw new Error("R3F: The args prop must be an array!");b=Gm(new y(...p),{type:f,root:x,attach:g,memoizedProps:{args:p}})}return b.__r3f.attach===void 0&&(b instanceof Tn?b.__r3f.attach="geometry":b instanceof Ds&&(b.__r3f.attach="material")),_!=="inject"&&K5(b,v),b}function r(f,p){let g=!1;if(p){var v,x;(v=p.__r3f)!=null&&v.attach?Y5(f,p,p.__r3f.attach):p.isObject3D&&f.isObject3D&&(f.add(p),g=!0),g||(x=f.__r3f)==null||x.objects.push(p),p.__r3f||Gm(p,{}),p.__r3f.parent=f,LA(p),Xm(p)}}function i(f,p,g){let v=!1;if(p){var x,_;if((x=p.__r3f)!=null&&x.attach)Y5(f,p,p.__r3f.attach);else if(p.isObject3D&&f.isObject3D){p.parent=f,p.dispatchEvent({type:"added"}),f.dispatchEvent({type:"childadded",child:p});const b=f.children.filter(S=>S!==p),y=b.indexOf(g);f.children=[...b.slice(0,y),p,...b.slice(y)],v=!0}v||(_=f.__r3f)==null||_.objects.push(p),p.__r3f||Gm(p,{}),p.__r3f.parent=f,LA(p),Xm(p)}}function s(f,p,g=!1){f&&[...f].forEach(v=>o(p,v,g))}function o(f,p,g){if(p){var v,x,_;if(p.__r3f&&(p.__r3f.parent=null),(v=f.__r3f)!=null&&v.objects&&(f.__r3f.objects=f.__r3f.objects.filter(T=>T!==p)),(x=p.__r3f)!=null&&x.attach)GN(f,p,p.__r3f.attach);else if(p.isObject3D&&f.isObject3D){var b;f.remove(p),(b=p.__r3f)!=null&&b.root&&yye(DS(p),p)}const S=(_=p.__r3f)==null?void 0:_.primitive,w=!S&&(g===void 0?p.dispose!==null:g);if(!S){var y;s((y=p.__r3f)==null?void 0:y.objects,p,w),s(p.children,p,w)}if(delete p.__r3f,w&&p.dispose&&p.type!=="Scene"){const T=()=>{try{p.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?PA.unstable_scheduleCallback(PA.unstable_IdlePriority,T):T()}Xm(f)}}function a(f,p,g,v){var x;const _=(x=f.__r3f)==null?void 0:x.parent;if(!_)return;const b=n(p,g,f.__r3f.root);if(f.children){for(const y of f.children)y.__r3f&&r(b,y);f.children=f.children.filter(y=>!y.__r3f)}f.__r3f.objects.forEach(y=>r(b,y)),f.__r3f.objects=[],f.__r3f.autoRemovedBeforeAppend||o(_,f),b.parent&&(b.__r3f.autoRemovedBeforeAppend=!0),r(_,b),b.raycast&&b.__r3f.eventCount&&DS(b).getState().internal.interaction.push(b),[v,v.alternate].forEach(y=>{y!==null&&(y.stateNode=b,y.ref&&(typeof y.ref=="function"?y.ref(b):y.ref.current=b))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:rye({createInstance:n,removeChild:o,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(f,p)=>{if(!p)return;const g=f.getState().scene;g.__r3f&&(g.__r3f.root=f,r(g,p))},removeChildFromContainer:(f,p)=>{p&&o(f.getState().scene,p)},insertInContainerBefore:(f,p,g)=>{if(!p||!g)return;const v=f.getState().scene;v.__r3f&&i(v,p,g)},getRootHostContext:()=>null,getChildHostContext:f=>f,finalizeInitialChildren(f){var p;return!!((p=f==null?void 0:f.__r3f)!=null?p:{}).handlers},prepareUpdate(f,p,g,v){var x;if(((x=f==null?void 0:f.__r3f)!=null?x:{}).primitive&&v.object&&v.object!==f)return[!0];{const{args:b=[],children:y,...S}=v,{args:w=[],children:T,...L}=g;if(!Array.isArray(b))throw new Error("R3F: the args prop must be an array!");if(b.some((P,F)=>P!==w[F]))return[!0];const R=uB(f,S,L,!0);return R.changes.length?[!1,R]:null}},commitUpdate(f,[p,g],v,x,_,b){p?a(f,v,_,b):K5(f,g)},commitMount(f,p,g,v){var x;const _=(x=f.__r3f)!=null?x:{};f.raycast&&_.handlers&&_.eventCount&&DS(f).getState().internal.interaction.push(f)},getPublicInstance:f=>f,prepareForCommit:()=>null,preparePortalMount:f=>Gm(f.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(f){var p;const{attach:g,parent:v}=(p=f.__r3f)!=null?p:{};g&&v&&GN(v,f,g),f.isObject3D&&(f.visible=!1),Xm(f)},unhideInstance(f,p){var g;const{attach:v,parent:x}=(g=f.__r3f)!=null?g:{};v&&x&&Y5(x,f,v),(f.isObject3D&&p.visible==null||p.visible)&&(f.visible=!0),Xm(f)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():d0.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&qr.fun(performance.now)?performance.now:qr.fun(Date.now)?Date.now:()=>0,scheduleTimeout:qr.fun(setTimeout)?setTimeout:void 0,cancelTimeout:qr.fun(clearTimeout)?clearTimeout:void 0}),applyProps:K5}}var $N,VN;const Z5=t=>"colorSpace"in t||"outputColorSpace"in t,iB=()=>{var t;return(t=OP.ColorManagement)!=null?t:null},sB=t=>t&&t.isOrthographicCamera,uye=t=>t&&t.hasOwnProperty("current"),yx=typeof window<"u"&&(($N=window.document)!=null&&$N.createElement||((VN=window.navigator)==null?void 0:VN.product)==="ReactNative")?D.useLayoutEffect:D.useEffect;function oB(t){const e=D.useRef(t);return yx(()=>void(e.current=t),[t]),e}function dye({set:t}){return yx(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}let aB=class extends D.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}};aB.getDerivedStateFromError=()=>({error:!0});const lB="__default",WN=new Map,fye=t=>t&&!!t.memoized&&!!t.changes;function cB(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const G1=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()};function DS(t){let e=t.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const qr={obj:t=>t===Object(t)&&!qr.arr(t)&&typeof t!="function",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",boo:t=>typeof t=="boolean",und:t=>t===void 0,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(qr.str(t)||qr.num(t))return t===e;const s=qr.obj(t);if(s&&r==="reference")return t===e;const o=qr.arr(t);if(o&&n==="reference")return t===e;if((o||s)&&t===e)return!0;let a;for(a in t)if(!(a in e))return!1;if(s&&n==="shallow"&&r==="shallow"){for(a in i?e:t)if(!qr.equ(t[a],e[a],{strict:i,objects:"reference"}))return!1}else for(a in i?e:t)if(t[a]!==e[a])return!1;if(qr.und(a)){if(o&&t.length===0&&e.length===0||s&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function hye(t){const e={nodes:{},materials:{}};return t&&t.traverse(n=>{n.name&&(e.nodes[n.name]=n),n.material&&!e.materials[n.material.name]&&(e.materials[n.material.name]=n.material)}),e}function pye(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function Gm(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function IA(t,e){let n=t;if(e.includes("-")){const r=e.split("-"),i=r.pop();return n=r.reduce((s,o)=>s[o],t),{target:n,key:i}}else return{target:n,key:e}}const jN=/-\d+$/;function Y5(t,e,n){if(qr.str(n)){if(jN.test(n)){const s=n.replace(jN,""),{target:o,key:a}=IA(t,s);Array.isArray(o[a])||(o[a]=[])}const{target:r,key:i}=IA(t,n);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=n(t,e)}function GN(t,e,n){var r,i;if(qr.str(n)){const{target:s,key:o}=IA(t,n),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(t,e);(i=e.__r3f)==null||delete i.previousAttach}function uB(t,{children:e,key:n,ref:r,...i},{children:s,key:o,ref:a,...l}={},c=!1){var f;const p=(f=t==null?void 0:t.__r3f)!=null?f:{},g=Object.entries(i),v=[];if(c){const _=Object.keys(l);for(let b=0;b<_.length;b++)i.hasOwnProperty(_[b])||g.unshift([_[b],lB+"remove"])}g.forEach(([_,b])=>{var y;if((y=t.__r3f)!=null&&y.primitive&&_==="object"||qr.equ(b,l[_]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(_))return v.push([_,b,!0,[]]);let S=[];_.includes("-")&&(S=_.split("-")),v.push([_,b,!1,S]);for(const w in i){const T=i[w];w.startsWith(`${_}-`)&&v.push([w,T,!1,w.split("-")])}});const x={...i};return p.memoizedProps&&p.memoizedProps.args&&(x.args=p.memoizedProps.args),p.memoizedProps&&p.memoizedProps.attach&&(x.attach=p.memoizedProps.attach),{memoized:x,changes:v}}const mye=typeof process<"u"&&!1;function K5(t,e){var n,r,i;const s=(n=t.__r3f)!=null?n:{},o=s.root,a=(r=o==null||o.getState==null?void 0:o.getState())!=null?r:{},{memoized:l,changes:c}=fye(e)?e:uB(t,e),f=s.eventCount;t.__r3f&&(t.__r3f.memoizedProps=l);for(let g=0;gw[T],t),!(S&&S.set))){const[w,...T]=b.reverse();y=T.reverse().reduce((L,R)=>L[R],t),v=w}if(x===lB+"remove")if(y.constructor){let w=WN.get(y.constructor);w||(w=new y.constructor,WN.set(y.constructor,w)),x=w[v]}else x=0;if(_)x?s.handlers[v]=x:delete s.handlers[v],s.eventCount=Object.keys(s.handlers).length;else if(S&&S.set&&(S.copy||S instanceof Jh)){if(Array.isArray(x))S.fromArray?S.fromArray(x):S.set(...x);else if(S.copy&&x&&x.constructor&&(mye?S.constructor.name===x.constructor.name:S.constructor===x.constructor))S.copy(x);else if(x!==void 0){const w=S instanceof It;!w&&S.setScalar?S.setScalar(x):S instanceof Jh&&x instanceof Jh?S.mask=x.mask:S.set(x),!iB()&&!a.linear&&w&&S.convertSRGBToLinear()}}else if(y[v]=x,y[v]instanceof Yr&&y[v].format===zo&&y[v].type===Fc){const w=y[v];Z5(w)&&Z5(a.gl)?w.colorSpace=a.gl.outputColorSpace:w.encoding=a.gl.outputEncoding}Xm(t)}if(s.parent&&t.raycast&&f!==s.eventCount){const g=DS(t).getState().internal,v=g.interaction.indexOf(t);v>-1&&g.interaction.splice(v,1),s.eventCount&&g.interaction.push(t)}return!(c.length===1&&c[0][0]==="onUpdate")&&c.length&&(i=t.__r3f)!=null&&i.parent&&LA(t),t}function Xm(t){var e,n;const r=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();r&&r.internal.frames===0&&r.invalidate()}function LA(t){t.onUpdate==null||t.onUpdate(t)}function gye(t,e){t.manual||(sB(t)?(t.left=e.width/-2,t.right=e.width/2,t.top=e.height/2,t.bottom=e.height/-2):t.aspect=e.width/e.height,t.updateProjectionMatrix(),t.updateMatrixWorld())}function nS(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function vye(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return d0.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return d0.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return d0.ContinuousEventPriority;default:return d0.DefaultEventPriority}}function dB(t,e,n,r){const i=n.get(e);i&&(n.delete(e),n.size===0&&(t.delete(r),i.target.releasePointerCapture(r)))}function yye(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(r=>r!==e),n.initialHits=n.initialHits.filter(r=>r!==e),n.hovered.forEach((r,i)=>{(r.eventObject===e||r.object===e)&&n.hovered.delete(i)}),n.capturedMap.forEach((r,i)=>{dB(n.capturedMap,e,r,i)})}function xye(t){function e(l){const{internal:c}=t.getState(),f=l.offsetX-c.initialClick[0],p=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(f*f+p*p))}function n(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(f=>{var p;return(p=c.__r3f)==null?void 0:p.handlers["onPointer"+f]}))}function r(l,c){const f=t.getState(),p=new Set,g=[],v=c?c(f.internal.interaction):f.internal.interaction;for(let y=0;y{const w=G1(y.object),T=G1(S.object);return!w||!T?y.distance-S.distance:T.events.priority-w.events.priority||y.distance-S.distance}).filter(y=>{const S=nS(y);return p.has(S)?!1:(p.add(S),!0)});f.events.filter&&(_=f.events.filter(_,f));for(const y of _){let S=y.object;for(;S;){var b;(b=S.__r3f)!=null&&b.eventCount&&g.push({...y,eventObject:S}),S=S.parent}}if("pointerId"in l&&f.internal.capturedMap.has(l.pointerId))for(let y of f.internal.capturedMap.get(l.pointerId).values())p.has(nS(y.intersection))||g.push(y.intersection);return g}function i(l,c,f,p){const g=t.getState();if(l.length){const v={stopped:!1};for(const x of l){const _=G1(x.object)||g,{raycaster:b,pointer:y,camera:S,internal:w}=_,T=new K(y.x,y.y,0).unproject(S),L=I=>{var H,Q;return(H=(Q=w.capturedMap.get(I))==null?void 0:Q.has(x.eventObject))!=null?H:!1},R=I=>{const H={intersection:x,target:c.target};w.capturedMap.has(I)?w.capturedMap.get(I).set(x.eventObject,H):w.capturedMap.set(I,new Map([[x.eventObject,H]])),c.target.setPointerCapture(I)},P=I=>{const H=w.capturedMap.get(I);H&&dB(w.capturedMap,x.eventObject,H,I)};let F={};for(let I in c){let H=c[I];typeof H!="function"&&(F[I]=H)}let O={...x,...F,pointer:y,intersections:l,stopped:v.stopped,delta:f,unprojectedPoint:T,ray:b.ray,camera:S,stopPropagation(){const I="pointerId"in c&&w.capturedMap.get(c.pointerId);if((!I||I.has(x.eventObject))&&(O.stopped=v.stopped=!0,w.hovered.size&&Array.from(w.hovered.values()).find(H=>H.eventObject===x.eventObject))){const H=l.slice(0,l.indexOf(x));s([...H,x])}},target:{hasPointerCapture:L,setPointerCapture:R,releasePointerCapture:P},currentTarget:{hasPointerCapture:L,setPointerCapture:R,releasePointerCapture:P},nativeEvent:c};if(p(O),v.stopped===!0)break}}return l}function s(l){const{internal:c}=t.getState();for(const f of c.hovered.values())if(!l.length||!l.find(p=>p.object===f.object&&p.index===f.index&&p.instanceId===f.instanceId)){const g=f.eventObject.__r3f,v=g==null?void 0:g.handlers;if(c.hovered.delete(nS(f)),g!=null&&g.eventCount){const x={...f,intersections:l};v.onPointerOut==null||v.onPointerOut(x),v.onPointerLeave==null||v.onPointerLeave(x)}}}function o(l,c){for(let f=0;fs([]);case"onLostPointerCapture":return c=>{const{internal:f}=t.getState();"pointerId"in c&&f.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{f.capturedMap.has(c.pointerId)&&(f.capturedMap.delete(c.pointerId),s([]))})}}return function(f){const{onPointerMissed:p,internal:g}=t.getState();g.lastEvent.current=f;const v=l==="onPointerMove",x=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",b=r(f,v?n:void 0),y=x?e(f):0;l==="onPointerDown"&&(g.initialClick=[f.offsetX,f.offsetY],g.initialHits=b.map(w=>w.eventObject)),x&&!b.length&&y<=2&&(o(f,g.interaction),p&&p(f)),v&&s(b);function S(w){const T=w.eventObject,L=T.__r3f,R=L==null?void 0:L.handlers;if(L!=null&&L.eventCount)if(v){if(R.onPointerOver||R.onPointerEnter||R.onPointerOut||R.onPointerLeave){const P=nS(w),F=g.hovered.get(P);F?F.stopped&&w.stopPropagation():(g.hovered.set(P,w),R.onPointerOver==null||R.onPointerOver(w),R.onPointerEnter==null||R.onPointerEnter(w))}R.onPointerMove==null||R.onPointerMove(w)}else{const P=R[l];P?(!x||g.initialHits.includes(T))&&(o(f,g.interaction.filter(F=>!g.initialHits.includes(F))),P(w)):x&&g.initialHits.includes(T)&&o(f,g.interaction.filter(F=>!g.initialHits.includes(F)))}}i(b,f,y,S)}}return{handlePointer:a}}const fB=t=>!!(t!=null&&t.render),hB=D.createContext(null),_ye=(t,e)=>{const n=eye((a,l)=>{const c=new K,f=new K,p=new K;function g(y=l().camera,S=f,w=l().size){const{width:T,height:L,top:R,left:P}=w,F=T/L;S instanceof K?p.copy(S):p.set(...S);const O=y.getWorldPosition(c).distanceTo(p);if(sB(y))return{width:T/y.zoom,height:L/y.zoom,top:R,left:P,factor:1,distance:O,aspect:F};{const I=y.fov*Math.PI/180,H=2*Math.tan(I/2)*O,Q=H*(T/L);return{width:Q,height:H,top:R,left:P,factor:T/Q,distance:O,aspect:F}}}let v;const x=y=>a(S=>({performance:{...S.performance,current:y}})),_=new ct;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(y=1)=>t(l(),y),advance:(y,S)=>e(y,S,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new RP,pointer:_,mouse:_,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const y=l();v&&clearTimeout(v),y.performance.current!==y.performance.min&&x(y.performance.min),v=setTimeout(()=>x(l().performance.max),y.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:g},setEvents:y=>a(S=>({...S,events:{...S.events,...y}})),setSize:(y,S,w,T,L)=>{const R=l().camera,P={width:y,height:S,top:T||0,left:L||0,updateStyle:w};a(F=>({size:P,viewport:{...F.viewport,...g(R,f,P)}}))},setDpr:y=>a(S=>{const w=cB(y);return{viewport:{...S.viewport,dpr:w,initialDpr:S.viewport.initialDpr||w}}}),setFrameloop:(y="always")=>{const S=l().clock;S.stop(),S.elapsedTime=0,y!=="never"&&(S.start(),S.elapsedTime=0),a(()=>({frameloop:y}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:D.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(y,S,w)=>{const T=l().internal;return T.priority=T.priority+(S>0?1:0),T.subscribers.push({ref:y,priority:S,store:w}),T.subscribers=T.subscribers.sort((L,R)=>L.priority-R.priority),()=>{const L=l().internal;L!=null&&L.subscribers&&(L.priority=L.priority-(S>0?1:0),L.subscribers=L.subscribers.filter(R=>R.ref!==y))}}}}}),r=n.getState();let i=r.size,s=r.viewport.dpr,o=r.camera;return n.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:f,set:p}=n.getState();if(l.width!==i.width||l.height!==i.height||c.dpr!==s){var g;i=l,s=c.dpr,gye(a,l),f.setPixelRatio(c.dpr);const v=(g=l.updateStyle)!=null?g:typeof HTMLCanvasElement<"u"&&f.domElement instanceof HTMLCanvasElement;f.setSize(l.width,l.height,v)}a!==o&&(o=a,p(v=>({viewport:{...v.viewport,...v.viewport.getCurrentViewport(a)}})))}),n.subscribe(a=>t(a)),n};let rS,bye=new Set,Sye=new Set,wye=new Set;function Q5(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function X1(t,e){switch(t){case"before":return Q5(bye,e);case"after":return Q5(Sye,e);case"tail":return Q5(wye,e)}}let J5,eC;function tC(t,e,n){let r=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(r=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),J5=e.internal.subscribers,rS=0;rS0)&&!((f=s.gl.xr)!=null&&f.isPresenting)&&(r+=tC(c,s))}if(n=!1,X1("after",c),r===0)return X1("tail",c),e=!1,cancelAnimationFrame(i)}function a(c,f=1){var p;if(!c)return t.forEach(g=>a(g.store.getState(),f));(p=c.gl.xr)!=null&&p.isPresenting||!c.internal.active||c.frameloop==="never"||(f>1?c.internal.frames=Math.min(60,c.internal.frames+f):n?c.internal.frames=2:c.internal.frames=1,e||(e=!0,requestAnimationFrame(o)))}function l(c,f=!0,p,g){if(f&&X1("before",c),p)tC(c,p,g);else for(const v of t.values())tC(c,v.store.getState());f&&X1("after",c)}return{loop:o,invalidate:a,advance:l}}function pB(){const t=D.useContext(hB);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function Si(t=n=>n,e){return pB()(t,e)}function PM(t,e=0){const n=pB(),r=n.getState().internal.subscribe,i=oB(t);return yx(()=>r(i,e,n),[e,r,n]),null}const XN=new WeakMap;function mB(t,e){return function(n,...r){let i=XN.get(n);return i||(i=new n,XN.set(n,i)),t&&t(i),Promise.all(r.map(s=>new Promise((o,a)=>i.load(s,l=>{l.scene&&Object.assign(l,hye(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l==null?void 0:l.message}`))))))}}function _f(t,e,n,r){const i=Array.isArray(e)?e:[e],s=sye(mB(n,r),[t,...i],{equal:qr.equ});return Array.isArray(e)?s:s[0]}_f.preload=function(t,e,n){const r=Array.isArray(e)?e:[e];return oye(mB(n),[t,...r])};_f.clear=function(t,e){const n=Array.isArray(e)?e:[e];return aye([t,...n])};const rg=new Map,{invalidate:qN,advance:ZN}=Mye(rg),{reconciler:C2,applyProps:Bm}=cye(rg,vye),Hm={objects:"shallow",strict:!1},Eye=(t,e)=>{const n=typeof t=="function"?t(e):t;return fB(n)?n:new dz({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function Cye(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:r,height:i,top:s,left:o,updateStyle:a=n}=e;return{width:r,height:i,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:r,height:i,top:s,left:o}=t.parentElement.getBoundingClientRect();return{width:r,height:i,top:s,left:o,updateStyle:n}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0,updateStyle:n};return{width:0,height:0,top:0,left:0}}function Tye(t){const e=rg.get(t),n=e==null?void 0:e.fiber,r=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,s=r||_ye(qN,ZN),o=n||C2.createContainer(s,d0.ConcurrentRoot,null,!1,null,"",i,null);e||rg.set(t,{fiber:o,store:s});let a,l=!1,c;return{configure(f={}){let{gl:p,size:g,scene:v,events:x,onCreated:_,shadows:b=!1,linear:y=!1,flat:S=!1,legacy:w=!1,orthographic:T=!1,frameloop:L="always",dpr:R=[1,2],performance:P,raycaster:F,camera:O,onPointerMissed:I}=f,H=s.getState(),Q=H.gl;H.gl||H.set({gl:Q=Eye(p,t)});let q=H.raycaster;q||H.set({raycaster:q=new kP});const{params:le,...ie}=F||{};if(qr.equ(ie,q,Hm)||Bm(q,{...ie}),qr.equ(le,q.params,Hm)||Bm(q,{params:{...q.params,...le}}),!H.camera||H.camera===c&&!qr.equ(c,O,Hm)){c=O;const oe=O instanceof dx,de=oe?O:T?new il(0,0,0,0,.1,1e3):new $r(75,0,.1,1e3);oe||(de.position.z=5,O&&Bm(de,O),!H.camera&&!(O!=null&&O.rotation)&&de.lookAt(0,0,0)),H.set({camera:de}),q.camera=de}if(!H.scene){let oe;v instanceof vy?oe=v:(oe=new vy,v&&Bm(oe,v)),H.set({scene:Gm(oe)})}if(!H.xr){var ee;const oe=(Le,V)=>{const me=s.getState();me.frameloop!=="never"&&ZN(Le,!0,me,V)},de=()=>{const Le=s.getState();Le.gl.xr.enabled=Le.gl.xr.isPresenting,Le.gl.xr.setAnimationLoop(Le.gl.xr.isPresenting?oe:null),Le.gl.xr.isPresenting||qN(Le)},Ce={connect(){const Le=s.getState().gl;Le.xr.addEventListener("sessionstart",de),Le.xr.addEventListener("sessionend",de)},disconnect(){const Le=s.getState().gl;Le.xr.removeEventListener("sessionstart",de),Le.xr.removeEventListener("sessionend",de)}};typeof((ee=Q.xr)==null?void 0:ee.addEventListener)=="function"&&Ce.connect(),H.set({xr:Ce})}if(Q.shadowMap){const oe=Q.shadowMap.enabled,de=Q.shadowMap.type;if(Q.shadowMap.enabled=!!b,qr.boo(b))Q.shadowMap.type=Sv;else if(qr.str(b)){var ue;const Ce={basic:W9,percentage:iM,soft:Sv,variance:Ol};Q.shadowMap.type=(ue=Ce[b])!=null?ue:Sv}else qr.obj(b)&&Object.assign(Q.shadowMap,b);(oe!==Q.shadowMap.enabled||de!==Q.shadowMap.type)&&(Q.shadowMap.needsUpdate=!0)}const z=iB();z&&("enabled"in z?z.enabled=!w:"legacyMode"in z&&(z.legacyMode=w)),l||Bm(Q,{outputEncoding:y?3e3:3001,toneMapping:S?Ic:VR}),H.legacy!==w&&H.set(()=>({legacy:w})),H.linear!==y&&H.set(()=>({linear:y})),H.flat!==S&&H.set(()=>({flat:S})),p&&!qr.fun(p)&&!fB(p)&&!qr.equ(p,Q,Hm)&&Bm(Q,p),x&&!H.events.handlers&&H.set({events:x(s)});const te=Cye(t,g);return qr.equ(te,H.size,Hm)||H.setSize(te.width,te.height,te.updateStyle,te.top,te.left),R&&H.viewport.dpr!==cB(R)&&H.setDpr(R),H.frameloop!==L&&H.setFrameloop(L),H.onPointerMissed||H.set({onPointerMissed:I}),P&&!qr.equ(P,H.performance,Hm)&&H.set(oe=>({performance:{...oe.performance,...P}})),a=_,l=!0,this},render(f){return l||this.configure(),C2.updateContainer(D.createElement(Aye,{store:s,children:f,onCreated:a,rootElement:t}),o,null,()=>{}),s},unmount(){gB(t)}}}function Aye({store:t,children:e,onCreated:n,rootElement:r}){return yx(()=>{const i=t.getState();i.set(s=>({internal:{...s.internal,active:!0}})),n&&n(i),t.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),D.createElement(hB.Provider,{value:t},e)}function gB(t,e){const n=rg.get(t),r=n==null?void 0:n.fiber;if(r){const i=n==null?void 0:n.store.getState();i&&(i.internal.active=!1),C2.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var s,o,a,l;i.events.disconnect==null||i.events.disconnect(),(s=i.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=i.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),pye(i),rg.delete(t),e&&e(t)}catch{}},500)})}}C2.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:D.version});function kA(t,e,n){var r,i,s,o,a;e==null&&(e=100);function l(){var f=Date.now()-o;f=0?r=setTimeout(l,e-f):(r=null,n||(a=t.apply(s,i),s=i=null))}var c=function(){s=this,i=arguments,o=Date.now();var f=n&&!r;return r||(r=setTimeout(l,e)),f&&(a=t.apply(s,i),s=i=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=t.apply(s,i),s=i=null,clearTimeout(r),r=null)},c}kA.debounce=kA;var Rye=kA;const YN=By(Rye);function Pye(t){let{debounce:e,scroll:n,polyfill:r,offsetSize:i}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const s=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=D.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=D.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),c=e?typeof e=="number"?e:e.scroll:null,f=e?typeof e=="number"?e:e.resize:null,p=D.useRef(!1);D.useEffect(()=>(p.current=!0,()=>void(p.current=!1)));const[g,v,x]=D.useMemo(()=>{const S=()=>{if(!l.current.element)return;const{left:w,top:T,width:L,height:R,bottom:P,right:F,x:O,y:I}=l.current.element.getBoundingClientRect(),H={left:w,top:T,width:L,height:R,bottom:P,right:F,x:O,y:I};l.current.element instanceof HTMLElement&&i&&(H.height=l.current.element.offsetHeight,H.width=l.current.element.offsetWidth),Object.freeze(H),p.current&&!Oye(l.current.lastBounds,H)&&a(l.current.lastBounds=H)};return[S,f?YN(S,f):S,c?YN(S,c):S]},[a,i,c,f]);function _(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(S=>S.removeEventListener("scroll",x,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function b(){l.current.element&&(l.current.resizeObserver=new s(x),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(S=>S.addEventListener("scroll",x,{capture:!0,passive:!0})))}const y=S=>{!S||S===l.current.element||(_(),l.current.element=S,l.current.scrollContainers=vB(S),b())};return Lye(x,!!n),Iye(v),D.useEffect(()=>{_(),b()},[n,x,v]),D.useEffect(()=>_,[]),[y,o,g]}function Iye(t){D.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Lye(t,e){D.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function vB(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(t);return[n,r,i].some(s=>s==="auto"||s==="scroll")&&e.push(t),[...e,...vB(t.parentElement)]}const kye=["x","y","top","bottom","left","right","width","height"],Oye=(t,e)=>kye.every(n=>t[n]===e[n]);var Nye=Object.defineProperty,Dye=Object.defineProperties,Fye=Object.getOwnPropertyDescriptors,KN=Object.getOwnPropertySymbols,Uye=Object.prototype.hasOwnProperty,zye=Object.prototype.propertyIsEnumerable,QN=(t,e,n)=>e in t?Nye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,JN=(t,e)=>{for(var n in e||(e={}))Uye.call(e,n)&&QN(t,n,e[n]);if(KN)for(var n of KN(e))zye.call(e,n)&&QN(t,n,e[n]);return t},Bye=(t,e)=>Dye(t,Fye(e));function yB(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=e?t.return:t.child;for(;r;){const i=yB(r,e,n);if(i)return i;r=e?null:r.sibling}}function xB(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const NP=xB(D.createContext(null));class _B extends D.Component{render(){return D.createElement(NP.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:eD,ReactCurrentDispatcher:tD}=D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Hye(){const t=D.useContext(NP);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=D.useId();return D.useMemo(()=>{for(const r of[eD==null?void 0:eD.current,t,t==null?void 0:t.alternate]){if(!r)continue;const i=yB(r,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(i)return i}},[t,e])}function $ye(){var t,e;const n=Hye(),[r]=D.useState(()=>new Map);r.clear();let i=n;for(;i;){const s=(t=i.type)==null?void 0:t._context;s&&s!==NP&&!r.has(s)&&r.set(s,(e=tD==null?void 0:tD.current)==null?void 0:e.readContext(xB(s))),i=i.return}return r}function Vye(){const t=$ye();return D.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>D.createElement(e,null,D.createElement(n.Provider,Bye(JN({},r),{value:t.get(n)}))),e=>D.createElement(_B,JN({},e))),[t])}const nC={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function Wye(t){const{handlePointer:e}=xye(t);return{priority:1,enabled:!0,compute(n,r,i){r.pointer.set(n.offsetX/r.size.width*2-1,-(n.offsetY/r.size.height)*2+1),r.raycaster.setFromCamera(r.pointer,r.camera)},connected:void 0,handlers:Object.keys(nC).reduce((n,r)=>({...n,[r]:e(r)}),{}),update:()=>{var n;const{events:r,internal:i}=t.getState();(n=i.lastEvent)!=null&&n.current&&r.handlers&&r.handlers.onPointerMove(i.lastEvent.current)},connect:n=>{var r;const{set:i,events:s}=t.getState();s.disconnect==null||s.disconnect(),i(o=>({events:{...o.events,connected:n}})),Object.entries((r=s.handlers)!=null?r:[]).forEach(([o,a])=>{const[l,c]=nC[o];n.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:n,events:r}=t.getState();if(r.connected){var i;Object.entries((i=r.handlers)!=null?i:[]).forEach(([s,o])=>{if(r&&r.connected instanceof HTMLElement){const[a]=nC[s];r.connected.removeEventListener(a,o)}}),n(s=>({events:{...s.events,connected:void 0}}))}}}}const jye=D.forwardRef(function({children:e,fallback:n,resize:r,style:i,gl:s,events:o=Wye,eventSource:a,eventPrefix:l,shadows:c,linear:f,flat:p,legacy:g,orthographic:v,frameloop:x,dpr:_,performance:b,raycaster:y,camera:S,scene:w,onPointerMissed:T,onCreated:L,...R},P){D.useMemo(()=>lye(Kve),[]);const F=Vye(),[O,I]=Pye({scroll:!0,debounce:{scroll:50,resize:0},...r}),H=D.useRef(null),Q=D.useRef(null);D.useImperativeHandle(P,()=>H.current);const q=oB(T),[le,ie]=D.useState(!1),[ee,ue]=D.useState(!1);if(le)throw le;if(ee)throw ee;const z=D.useRef(null);yx(()=>{const oe=H.current;I.width>0&&I.height>0&&oe&&(z.current||(z.current=Tye(oe)),z.current.configure({gl:s,events:o,shadows:c,linear:f,flat:p,legacy:g,orthographic:v,frameloop:x,dpr:_,performance:b,raycaster:y,camera:S,scene:w,size:I,onPointerMissed:(...de)=>q.current==null?void 0:q.current(...de),onCreated:de=>{de.events.connect==null||de.events.connect(a?uye(a)?a.current:a:Q.current),l&&de.setEvents({compute:(Ce,Le)=>{const V=Ce[l+"X"],me=Ce[l+"Y"];Le.pointer.set(V/Le.size.width*2-1,-(me/Le.size.height)*2+1),Le.raycaster.setFromCamera(Le.pointer,Le.camera)}}),L==null||L(de)}}),z.current.render(D.createElement(F,null,D.createElement(aB,{set:ue},D.createElement(D.Suspense,{fallback:D.createElement(dye,{set:ie})},e)))))}),D.useEffect(()=>{const oe=H.current;if(oe)return()=>gB(oe)},[]);const te=a?"none":"auto";return D.createElement("div",X({ref:Q,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:te,...i}},R),D.createElement("div",{ref:O,style:{width:"100%",height:"100%"}},D.createElement("canvas",{ref:H,style:{display:"block"}},n)))}),Gye=D.forwardRef(function(e,n){return D.createElement(_B,null,D.createElement(jye,X({},e,{ref:n})))}),Xye=D.createContext(null),rC={didCatch:!1,error:null};class qye extends D.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=rC}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,r,i=arguments.length,s=new Array(i),o=0;o0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t.length!==e.length||t.some((n,r)=>!Object.is(n,e[r]))}const xx=new K,DP=new K,Yye=new K,nD=new ct;function Kye(t,e,n){const r=xx.setFromMatrixPosition(t.matrixWorld);r.project(e);const i=n.width/2,s=n.height/2;return[r.x*i+i,-(r.y*s)+s]}function Qye(t,e){const n=xx.setFromMatrixPosition(t.matrixWorld),r=DP.setFromMatrixPosition(e.matrixWorld),i=n.sub(r),s=e.getWorldDirection(Yye);return i.angleTo(s)>Math.PI/2}function Jye(t,e,n,r){const i=xx.setFromMatrixPosition(t.matrixWorld),s=i.clone();s.project(e),nD.set(s.x,s.y),n.setFromCamera(nD,e);const o=n.intersectObjects(r,!0);if(o.length){const a=o[0].distance;return i.distanceTo(n.ray.origin)Math.abs(t)<1e-10?0:t;function bB(t,e,n=""){let r="matrix3d(";for(let i=0;i!==16;i++)r+=OA(e[i]*t.elements[i])+(i!==15?",":")");return n+r}const nxe=(t=>e=>bB(e,t))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),rxe=(t=>(e,n)=>bB(e,t(n),"translate(-50%,-50%)"))(t=>[1/t,1/t,1/t,1,-1/t,-1/t,-1/t,-1,1/t,1/t,1/t,1,1,1,1,1]);function ixe(t){return t&&typeof t=="object"&&"current"in t}const SB=D.forwardRef(({children:t,eps:e=.001,style:n,className:r,prepend:i,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:c=!1,transform:f=!1,occlude:p,onOcclude:g,castShadow:v,receiveShadow:x,material:_,geometry:b,zIndexRange:y=[16777271,0],calculatePosition:S=Kye,as:w="div",wrapperClass:T,pointerEvents:L="auto",...R},P)=>{const{gl:F,camera:O,scene:I,size:H,raycaster:Q,events:q,viewport:le}=Si(),[ie]=D.useState(()=>document.createElement(w)),ee=D.useRef(),ue=D.useRef(null),z=D.useRef(0),te=D.useRef([0,0]),oe=D.useRef(null),de=D.useRef(null),Ce=(a==null?void 0:a.current)||q.connected||F.domElement.parentNode,Le=D.useRef(null),V=D.useRef(!1),me=D.useMemo(()=>p&&p!=="blending"||Array.isArray(p)&&p.length&&ixe(p[0]),[p]);D.useLayoutEffect(()=>{const xe=F.domElement;p&&p==="blending"?(xe.style.zIndex=`${Math.floor(y[0]/2)}`,xe.style.position="absolute",xe.style.pointerEvents="none"):(xe.style.zIndex=null,xe.style.position=null,xe.style.pointerEvents=null)},[p]),D.useLayoutEffect(()=>{if(ue.current){const xe=ee.current=XF(ie);if(I.updateMatrixWorld(),f)ie.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const et=S(ue.current,O,H);ie.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${et[0]}px,${et[1]}px,0);transform-origin:0 0;`}return Ce&&(i?Ce.prepend(ie):Ce.appendChild(ie)),()=>{Ce&&Ce.removeChild(ie),xe.unmount()}}},[Ce,f]),D.useLayoutEffect(()=>{T&&(ie.className=T)},[T]);const pe=D.useMemo(()=>f?{position:"absolute",top:0,left:0,width:H.width,height:H.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-H.height/2,left:-H.width/2,width:H.width,height:H.height},...n},[n,s,o,H,f]),Se=D.useMemo(()=>({position:"absolute",pointerEvents:L}),[L]);D.useLayoutEffect(()=>{if(V.current=!1,f){var xe;(xe=ee.current)==null||xe.render(D.createElement("div",{ref:oe,style:pe},D.createElement("div",{ref:de,style:Se},D.createElement("div",{ref:P,className:r,style:n,children:t}))))}else{var et;(et=ee.current)==null||et.render(D.createElement("div",{ref:P,style:pe,className:r,children:t}))}});const je=D.useRef(!0);PM(xe=>{if(ue.current){O.updateMatrixWorld(),ue.current.updateWorldMatrix(!0,!1);const et=f?te.current:S(ue.current,O,H);if(f||Math.abs(z.current-O.zoom)>e||Math.abs(te.current[0]-et[0])>e||Math.abs(te.current[1]-et[1])>e){const Re=Qye(ue.current,O);let Oe=!1;me&&(Array.isArray(p)?Oe=p.map(rt=>rt.current):p!=="blending"&&(Oe=[I]));const Te=je.current;if(Oe){const rt=Jye(ue.current,O,Q,Oe);je.current=rt&&!Re}else je.current=!Re;Te!==je.current&&(g?g(!je.current):ie.style.display=je.current?"block":"none");const ze=Math.floor(y[0]/2),ke=p?me?[y[0],ze]:[ze-1,0]:y;if(ie.style.zIndex=`${txe(ue.current,O,ke)}`,f){const[rt,tt]=[H.width/2,H.height/2],ae=O.projectionMatrix.elements[5]*tt,{isOrthographicCamera:G,top:be,left:$e,bottom:Ze,right:We}=O,Mt=nxe(O.matrixWorldInverse),pt=G?`scale(${ae})translate(${OA(-(We+$e)/2)}px,${OA((be+Ze)/2)}px)`:`translateZ(${ae}px)`;let at=ue.current.matrixWorld;c&&(at=O.matrixWorldInverse.clone().transpose().copyPosition(at).scale(ue.current.scale),at.elements[3]=at.elements[7]=at.elements[11]=0,at.elements[15]=1),ie.style.width=H.width+"px",ie.style.height=H.height+"px",ie.style.perspective=G?"":`${ae}px`,oe.current&&de.current&&(oe.current.style.transform=`${pt}${Mt}translate(${rt}px,${tt}px)`,de.current.style.transform=rxe(at,1/((l||10)/400)))}else{const rt=l===void 0?1:exe(ue.current,O)*l;ie.style.transform=`translate3d(${et[0]}px,${et[1]}px,0) scale(${rt})`}te.current=et,z.current=O.zoom}}if(!me&&Le.current&&!V.current)if(f){if(oe.current){const et=oe.current.children[0];if(et!=null&&et.clientWidth&&et!=null&&et.clientHeight){const{isOrthographicCamera:Re}=O;if(Re||b)R.scale&&(Array.isArray(R.scale)?R.scale instanceof K?Le.current.scale.copy(R.scale.clone().divideScalar(1)):Le.current.scale.set(1/R.scale[0],1/R.scale[1],1/R.scale[2]):Le.current.scale.setScalar(1/R.scale));else{const Oe=(l||10)/400,Te=et.clientWidth*Oe,ze=et.clientHeight*Oe;Le.current.scale.set(Te,ze,1)}V.current=!0}}}else{const et=ie.children[0];if(et!=null&&et.clientWidth&&et!=null&&et.clientHeight){const Re=1/le.factor,Oe=et.clientWidth*Re,Te=et.clientHeight*Re;Le.current.scale.set(Oe,Te,1),V.current=!0}Le.current.lookAt(xe.camera.position)}});const it=D.useMemo(()=>({vertexShader:f?void 0:` + /* + This shader is from the THREE's SpriteMaterial. + We need to turn the backing plane into a Sprite + (make it always face the camera) if "transfrom" + is false. + */ + #include + + void main() { + vec2 center = vec2(0., 1.); + float rotation = 0.0; + + // This is somewhat arbitrary, but it seems to work well + // Need to figure out how to derive this dynamically if it even matters + float size = 0.03; + + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + + gl_Position = projectionMatrix * mvPosition; + } + `,fragmentShader:` + void main() { + gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); + } + `}),[f]);return D.createElement("group",X({},R,{ref:ue}),p&&!me&&D.createElement("mesh",{castShadow:v,receiveShadow:x,ref:Le},b||D.createElement("planeGeometry",null),_||D.createElement("shaderMaterial",{side:Do,vertexShader:it.vertexShader,fragmentShader:it.fragmentShader})))});function sxe(t){let e;const n=new Set,r=(c,f)=>{const p=typeof c=="function"?c(e):c;if(p!==e){const g=e;e=f?p:Object.assign({},e,p),n.forEach(v=>v(e,g))}},i=()=>e,s=(c,f=i,p=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let g=f(e);function v(){const x=f(e);if(!p(g,x)){const _=g;c(g=x,_)}}return n.add(v),()=>n.delete(v)},l={setState:r,getState:i,subscribe:(c,f,p)=>f||p?s(c,f,p):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return e=t(r,i,l),l}const oxe=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),rD=oxe?D.useEffect:D.useLayoutEffect;function axe(t){const e=typeof t=="function"?sxe(t):t,n=(r=e.getState,i=Object.is)=>{const[,s]=D.useReducer(b=>b+1,0),o=e.getState(),a=D.useRef(o),l=D.useRef(r),c=D.useRef(i),f=D.useRef(!1),p=D.useRef();p.current===void 0&&(p.current=r(o));let g,v=!1;(a.current!==o||l.current!==r||c.current!==i||f.current)&&(g=r(o),v=!i(p.current,g)),rD(()=>{v&&(p.current=g),a.current=o,l.current=r,c.current=i,f.current=!1});const x=D.useRef(o);rD(()=>{const b=()=>{try{const S=e.getState(),w=l.current(S);c.current(p.current,w)||(a.current=S,p.current=w,s())}catch{f.current=!0,s()}},y=e.subscribe(b);return e.getState()!==x.current&&b(),y},[]);const _=v?g:p.current;return D.useDebugValue(_),_};return Object.assign(n,e),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,e];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},n}let q1=0;const lxe=axe(t=>(Oh.onStart=(e,n,r)=>{t({active:!0,item:e,loaded:n,total:r,progress:(n-q1)/(r-q1)*100})},Oh.onLoad=()=>{t({active:!1})},Oh.onError=e=>t(n=>({errors:[...n.errors,e]})),Oh.onProgress=(e,n,r)=>{n===r&&(q1=r),t({active:!0,item:e,loaded:n,total:r,progress:(n-q1)/(r-q1)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));var cxe=Object.defineProperty,uxe=(t,e,n)=>e in t?cxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ot=(t,e,n)=>(uxe(t,typeof e!="symbol"?e+"":e,n),n);let dxe=class extends Jn{constructor(e,n){super(),ot(this,"isTransformControls",!0),ot(this,"visible",!1),ot(this,"domElement"),ot(this,"raycaster",new kP),ot(this,"gizmo"),ot(this,"plane"),ot(this,"tempVector",new K),ot(this,"tempVector2",new K),ot(this,"tempQuaternion",new sr),ot(this,"unit",{X:new K(1,0,0),Y:new K(0,1,0),Z:new K(0,0,1)}),ot(this,"pointStart",new K),ot(this,"pointEnd",new K),ot(this,"offset",new K),ot(this,"rotationAxis",new K),ot(this,"startNorm",new K),ot(this,"endNorm",new K),ot(this,"rotationAngle",0),ot(this,"cameraPosition",new K),ot(this,"cameraQuaternion",new sr),ot(this,"cameraScale",new K),ot(this,"parentPosition",new K),ot(this,"parentQuaternion",new sr),ot(this,"parentQuaternionInv",new sr),ot(this,"parentScale",new K),ot(this,"worldPositionStart",new K),ot(this,"worldQuaternionStart",new sr),ot(this,"worldScaleStart",new K),ot(this,"worldPosition",new K),ot(this,"worldQuaternion",new sr),ot(this,"worldQuaternionInv",new sr),ot(this,"worldScale",new K),ot(this,"eye",new K),ot(this,"positionStart",new K),ot(this,"quaternionStart",new sr),ot(this,"scaleStart",new K),ot(this,"camera"),ot(this,"object"),ot(this,"enabled",!0),ot(this,"axis",null),ot(this,"mode","translate"),ot(this,"translationSnap",null),ot(this,"rotationSnap",null),ot(this,"scaleSnap",null),ot(this,"space","world"),ot(this,"size",1),ot(this,"dragging",!1),ot(this,"showX",!0),ot(this,"showY",!0),ot(this,"showZ",!0),ot(this,"changeEvent",{type:"change"}),ot(this,"mouseDownEvent",{type:"mouseDown",mode:this.mode}),ot(this,"mouseUpEvent",{type:"mouseUp",mode:this.mode}),ot(this,"objectChangeEvent",{type:"objectChange"}),ot(this,"intersectObjectWithRay",(i,s,o)=>{const a=s.intersectObject(i,!0);for(let l=0;l(this.object=i,this.visible=!0,this)),ot(this,"detach",()=>(this.object=void 0,this.visible=!1,this.axis=null,this)),ot(this,"reset",()=>this.enabled?(this.dragging&&this.object!==void 0&&(this.object.position.copy(this.positionStart),this.object.quaternion.copy(this.quaternionStart),this.object.scale.copy(this.scaleStart),this.dispatchEvent(this.changeEvent),this.dispatchEvent(this.objectChangeEvent),this.pointStart.copy(this.pointEnd)),this):this),ot(this,"updateMatrixWorld",()=>{this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this.parentPosition,this.parentQuaternion,this.parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this.worldScale),this.parentQuaternionInv.copy(this.parentQuaternion).invert(),this.worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this.cameraScale),this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld()}),ot(this,"pointerHover",i=>{if(this.object===void 0||this.dragging===!0)return;this.raycaster.setFromCamera(i,this.camera);const s=this.intersectObjectWithRay(this.gizmo.picker[this.mode],this.raycaster);s?this.axis=s.object.name:this.axis=null}),ot(this,"pointerDown",i=>{if(!(this.object===void 0||this.dragging===!0||i.button!==0)&&this.axis!==null){this.raycaster.setFromCamera(i,this.camera);const s=this.intersectObjectWithRay(this.plane,this.raycaster,!0);if(s){let o=this.space;if(this.mode==="scale"?o="local":(this.axis==="E"||this.axis==="XYZE"||this.axis==="XYZ")&&(o="world"),o==="local"&&this.mode==="rotate"){const a=this.rotationSnap;this.axis==="X"&&a&&(this.object.rotation.x=Math.round(this.object.rotation.x/a)*a),this.axis==="Y"&&a&&(this.object.rotation.y=Math.round(this.object.rotation.y/a)*a),this.axis==="Z"&&a&&(this.object.rotation.z=Math.round(this.object.rotation.z/a)*a)}this.object.updateMatrixWorld(),this.object.parent&&this.object.parent.updateMatrixWorld(),this.positionStart.copy(this.object.position),this.quaternionStart.copy(this.object.quaternion),this.scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this.worldScaleStart),this.pointStart.copy(s.point).sub(this.worldPositionStart)}this.dragging=!0,this.mouseDownEvent.mode=this.mode,this.dispatchEvent(this.mouseDownEvent)}}),ot(this,"pointerMove",i=>{const s=this.axis,o=this.mode,a=this.object;let l=this.space;if(o==="scale"?l="local":(s==="E"||s==="XYZE"||s==="XYZ")&&(l="world"),a===void 0||s===null||this.dragging===!1||i.button!==-1)return;this.raycaster.setFromCamera(i,this.camera);const c=this.intersectObjectWithRay(this.plane,this.raycaster,!0);if(c){if(this.pointEnd.copy(c.point).sub(this.worldPositionStart),o==="translate")this.offset.copy(this.pointEnd).sub(this.pointStart),l==="local"&&s!=="XYZ"&&this.offset.applyQuaternion(this.worldQuaternionInv),s.indexOf("X")===-1&&(this.offset.x=0),s.indexOf("Y")===-1&&(this.offset.y=0),s.indexOf("Z")===-1&&(this.offset.z=0),l==="local"&&s!=="XYZ"?this.offset.applyQuaternion(this.quaternionStart).divide(this.parentScale):this.offset.applyQuaternion(this.parentQuaternionInv).divide(this.parentScale),a.position.copy(this.offset).add(this.positionStart),this.translationSnap&&(l==="local"&&(a.position.applyQuaternion(this.tempQuaternion.copy(this.quaternionStart).invert()),s.search("X")!==-1&&(a.position.x=Math.round(a.position.x/this.translationSnap)*this.translationSnap),s.search("Y")!==-1&&(a.position.y=Math.round(a.position.y/this.translationSnap)*this.translationSnap),s.search("Z")!==-1&&(a.position.z=Math.round(a.position.z/this.translationSnap)*this.translationSnap),a.position.applyQuaternion(this.quaternionStart)),l==="world"&&(a.parent&&a.position.add(this.tempVector.setFromMatrixPosition(a.parent.matrixWorld)),s.search("X")!==-1&&(a.position.x=Math.round(a.position.x/this.translationSnap)*this.translationSnap),s.search("Y")!==-1&&(a.position.y=Math.round(a.position.y/this.translationSnap)*this.translationSnap),s.search("Z")!==-1&&(a.position.z=Math.round(a.position.z/this.translationSnap)*this.translationSnap),a.parent&&a.position.sub(this.tempVector.setFromMatrixPosition(a.parent.matrixWorld))));else if(o==="scale"){if(s.search("XYZ")!==-1){let f=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(f*=-1),this.tempVector2.set(f,f,f)}else this.tempVector.copy(this.pointStart),this.tempVector2.copy(this.pointEnd),this.tempVector.applyQuaternion(this.worldQuaternionInv),this.tempVector2.applyQuaternion(this.worldQuaternionInv),this.tempVector2.divide(this.tempVector),s.search("X")===-1&&(this.tempVector2.x=1),s.search("Y")===-1&&(this.tempVector2.y=1),s.search("Z")===-1&&(this.tempVector2.z=1);a.scale.copy(this.scaleStart).multiply(this.tempVector2),this.scaleSnap&&this.object&&(s.search("X")!==-1&&(this.object.scale.x=Math.round(a.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),s.search("Y")!==-1&&(a.scale.y=Math.round(a.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),s.search("Z")!==-1&&(a.scale.z=Math.round(a.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(o==="rotate"){this.offset.copy(this.pointEnd).sub(this.pointStart);const f=20/this.worldPosition.distanceTo(this.tempVector.setFromMatrixPosition(this.camera.matrixWorld));s==="E"?(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this.startNorm.copy(this.pointStart).normalize(),this.endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this.endNorm.cross(this.startNorm).dot(this.eye)<0?1:-1):s==="XYZE"?(this.rotationAxis.copy(this.offset).cross(this.eye).normalize(),this.rotationAngle=this.offset.dot(this.tempVector.copy(this.rotationAxis).cross(this.eye))*f):(s==="X"||s==="Y"||s==="Z")&&(this.rotationAxis.copy(this.unit[s]),this.tempVector.copy(this.unit[s]),l==="local"&&this.tempVector.applyQuaternion(this.worldQuaternion),this.rotationAngle=this.offset.dot(this.tempVector.cross(this.eye).normalize())*f),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),l==="local"&&s!=="E"&&s!=="XYZE"?(a.quaternion.copy(this.quaternionStart),a.quaternion.multiply(this.tempQuaternion.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this.parentQuaternionInv),a.quaternion.copy(this.tempQuaternion.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),a.quaternion.multiply(this.quaternionStart).normalize())}this.dispatchEvent(this.changeEvent),this.dispatchEvent(this.objectChangeEvent)}}),ot(this,"pointerUp",i=>{i.button===0&&(this.dragging&&this.axis!==null&&(this.mouseUpEvent.mode=this.mode,this.dispatchEvent(this.mouseUpEvent)),this.dragging=!1,this.axis=null)}),ot(this,"getPointer",i=>{var s;if(this.domElement&&((s=this.domElement.ownerDocument)!=null&&s.pointerLockElement))return{x:0,y:0,button:i.button};{const o=i.changedTouches?i.changedTouches[0]:i,a=this.domElement.getBoundingClientRect();return{x:(o.clientX-a.left)/a.width*2-1,y:-(o.clientY-a.top)/a.height*2+1,button:i.button}}}),ot(this,"onPointerHover",i=>{if(this.enabled)switch(i.pointerType){case"mouse":case"pen":this.pointerHover(this.getPointer(i));break}}),ot(this,"onPointerDown",i=>{!this.enabled||!this.domElement||(this.domElement.style.touchAction="none",this.domElement.ownerDocument.addEventListener("pointermove",this.onPointerMove),this.pointerHover(this.getPointer(i)),this.pointerDown(this.getPointer(i)))}),ot(this,"onPointerMove",i=>{this.enabled&&this.pointerMove(this.getPointer(i))}),ot(this,"onPointerUp",i=>{!this.enabled||!this.domElement||(this.domElement.style.touchAction="",this.domElement.ownerDocument.removeEventListener("pointermove",this.onPointerMove),this.pointerUp(this.getPointer(i)))}),ot(this,"getMode",()=>this.mode),ot(this,"setMode",i=>{this.mode=i}),ot(this,"setTranslationSnap",i=>{this.translationSnap=i}),ot(this,"setRotationSnap",i=>{this.rotationSnap=i}),ot(this,"setScaleSnap",i=>{this.scaleSnap=i}),ot(this,"setSize",i=>{this.size=i}),ot(this,"setSpace",i=>{this.space=i}),ot(this,"update",()=>{console.warn("THREE.TransformControls: update function has no more functionality and therefore has been deprecated.")}),ot(this,"connect",i=>{i===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.domElement=i,this.domElement.addEventListener("pointerdown",this.onPointerDown),this.domElement.addEventListener("pointermove",this.onPointerHover),this.domElement.ownerDocument.addEventListener("pointerup",this.onPointerUp)}),ot(this,"dispose",()=>{var i,s,o,a,l,c;(i=this.domElement)==null||i.removeEventListener("pointerdown",this.onPointerDown),(s=this.domElement)==null||s.removeEventListener("pointermove",this.onPointerHover),(a=(o=this.domElement)==null?void 0:o.ownerDocument)==null||a.removeEventListener("pointermove",this.onPointerMove),(c=(l=this.domElement)==null?void 0:l.ownerDocument)==null||c.removeEventListener("pointerup",this.onPointerUp),this.traverse(f=>{const p=f;p.geometry&&p.geometry.dispose(),p.material&&p.material.dispose()})}),this.domElement=n,this.camera=e,this.gizmo=new fxe,this.add(this.gizmo),this.plane=new hxe,this.add(this.plane);const r=(i,s)=>{let o=s;Object.defineProperty(this,i,{get:function(){return o!==void 0?o:s},set:function(a){o!==a&&(o=a,this.plane[i]=a,this.gizmo[i]=a,this.dispatchEvent({type:i+"-changed",value:a}),this.dispatchEvent(this.changeEvent))}}),this[i]=s,this.plane[i]=s,this.gizmo[i]=s};r("camera",this.camera),r("object",this.object),r("enabled",this.enabled),r("axis",this.axis),r("mode",this.mode),r("translationSnap",this.translationSnap),r("rotationSnap",this.rotationSnap),r("scaleSnap",this.scaleSnap),r("space",this.space),r("size",this.size),r("dragging",this.dragging),r("showX",this.showX),r("showY",this.showY),r("showZ",this.showZ),r("worldPosition",this.worldPosition),r("worldPositionStart",this.worldPositionStart),r("worldQuaternion",this.worldQuaternion),r("worldQuaternionStart",this.worldQuaternionStart),r("cameraPosition",this.cameraPosition),r("cameraQuaternion",this.cameraQuaternion),r("pointStart",this.pointStart),r("pointEnd",this.pointEnd),r("rotationAxis",this.rotationAxis),r("rotationAngle",this.rotationAngle),r("eye",this.eye),n!==void 0&&this.connect(n)}};class fxe extends Jn{constructor(){super(),ot(this,"isTransformControlsGizmo",!0),ot(this,"type","TransformControlsGizmo"),ot(this,"tempVector",new K(0,0,0)),ot(this,"tempEuler",new ns),ot(this,"alignVector",new K(0,1,0)),ot(this,"zeroVector",new K(0,0,0)),ot(this,"lookAtMatrix",new Jt),ot(this,"tempQuaternion",new sr),ot(this,"tempQuaternion2",new sr),ot(this,"identityQuaternion",new sr),ot(this,"unitX",new K(1,0,0)),ot(this,"unitY",new K(0,1,0)),ot(this,"unitZ",new K(0,0,1)),ot(this,"gizmo"),ot(this,"picker"),ot(this,"helper"),ot(this,"rotationAxis",new K),ot(this,"cameraPosition",new K),ot(this,"worldPositionStart",new K),ot(this,"worldQuaternionStart",new sr),ot(this,"worldPosition",new K),ot(this,"worldQuaternion",new sr),ot(this,"eye",new K),ot(this,"camera",null),ot(this,"enabled",!0),ot(this,"axis",null),ot(this,"mode","translate"),ot(this,"space","world"),ot(this,"size",1),ot(this,"dragging",!1),ot(this,"showX",!0),ot(this,"showY",!0),ot(this,"showZ",!0),ot(this,"updateMatrixWorld",()=>{let oe=this.space;this.mode==="scale"&&(oe="local");const de=oe==="local"?this.worldQuaternion:this.identityQuaternion;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let Ce=[];Ce=Ce.concat(this.picker[this.mode].children),Ce=Ce.concat(this.gizmo[this.mode].children),Ce=Ce.concat(this.helper[this.mode].children);for(let Le=0;Le.9&&(V.visible=!1)),this.axis==="Y"&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,0,Math.PI/2)),V.quaternion.copy(de).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(de).dot(this.eye))>.9&&(V.visible=!1)),this.axis==="Z"&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,Math.PI/2,0)),V.quaternion.copy(de).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(de).dot(this.eye))>.9&&(V.visible=!1)),this.axis==="XYZE"&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,Math.PI/2,0)),this.alignVector.copy(this.rotationAxis),V.quaternion.setFromRotationMatrix(this.lookAtMatrix.lookAt(this.zeroVector,this.alignVector,this.unitY)),V.quaternion.multiply(this.tempQuaternion),V.visible=this.dragging),this.axis==="E"&&(V.visible=!1)):V.name==="START"?(V.position.copy(this.worldPositionStart),V.visible=this.dragging):V.name==="END"?(V.position.copy(this.worldPosition),V.visible=this.dragging):V.name==="DELTA"?(V.position.copy(this.worldPositionStart),V.quaternion.copy(this.worldQuaternionStart),this.tempVector.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),this.tempVector.applyQuaternion(this.worldQuaternionStart.clone().invert()),V.scale.copy(this.tempVector),V.visible=this.dragging):(V.quaternion.copy(de),this.dragging?V.position.copy(this.worldPositionStart):V.position.copy(this.worldPosition),this.axis&&(V.visible=this.axis.search(V.name)!==-1));continue}V.quaternion.copy(de),this.mode==="translate"||this.mode==="scale"?((V.name==="X"||V.name==="XYZX")&&Math.abs(this.alignVector.copy(this.unitX).applyQuaternion(de).dot(this.eye))>.99&&(V.scale.set(1e-10,1e-10,1e-10),V.visible=!1),(V.name==="Y"||V.name==="XYZY")&&Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(de).dot(this.eye))>.99&&(V.scale.set(1e-10,1e-10,1e-10),V.visible=!1),(V.name==="Z"||V.name==="XYZZ")&&Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(de).dot(this.eye))>.99&&(V.scale.set(1e-10,1e-10,1e-10),V.visible=!1),V.name==="XY"&&Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(de).dot(this.eye))<.2&&(V.scale.set(1e-10,1e-10,1e-10),V.visible=!1),V.name==="YZ"&&Math.abs(this.alignVector.copy(this.unitX).applyQuaternion(de).dot(this.eye))<.2&&(V.scale.set(1e-10,1e-10,1e-10),V.visible=!1),V.name==="XZ"&&Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(de).dot(this.eye))<.2&&(V.scale.set(1e-10,1e-10,1e-10),V.visible=!1),V.name.search("X")!==-1&&(this.alignVector.copy(this.unitX).applyQuaternion(de).dot(this.eye)<0?V.tag==="fwd"?V.visible=!1:V.scale.x*=-1:V.tag==="bwd"&&(V.visible=!1)),V.name.search("Y")!==-1&&(this.alignVector.copy(this.unitY).applyQuaternion(de).dot(this.eye)<0?V.tag==="fwd"?V.visible=!1:V.scale.y*=-1:V.tag==="bwd"&&(V.visible=!1)),V.name.search("Z")!==-1&&(this.alignVector.copy(this.unitZ).applyQuaternion(de).dot(this.eye)<0?V.tag==="fwd"?V.visible=!1:V.scale.z*=-1:V.tag==="bwd"&&(V.visible=!1))):this.mode==="rotate"&&(this.tempQuaternion2.copy(de),this.alignVector.copy(this.eye).applyQuaternion(this.tempQuaternion.copy(de).invert()),V.name.search("E")!==-1&&V.quaternion.setFromRotationMatrix(this.lookAtMatrix.lookAt(this.eye,this.zeroVector,this.unitY)),V.name==="X"&&(this.tempQuaternion.setFromAxisAngle(this.unitX,Math.atan2(-this.alignVector.y,this.alignVector.z)),this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2,this.tempQuaternion),V.quaternion.copy(this.tempQuaternion)),V.name==="Y"&&(this.tempQuaternion.setFromAxisAngle(this.unitY,Math.atan2(this.alignVector.x,this.alignVector.z)),this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2,this.tempQuaternion),V.quaternion.copy(this.tempQuaternion)),V.name==="Z"&&(this.tempQuaternion.setFromAxisAngle(this.unitZ,Math.atan2(this.alignVector.y,this.alignVector.x)),this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2,this.tempQuaternion),V.quaternion.copy(this.tempQuaternion))),V.visible=V.visible&&(V.name.indexOf("X")===-1||this.showX),V.visible=V.visible&&(V.name.indexOf("Y")===-1||this.showY),V.visible=V.visible&&(V.name.indexOf("Z")===-1||this.showZ),V.visible=V.visible&&(V.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),V.material.tempOpacity=V.material.tempOpacity||V.material.opacity,V.material.tempColor=V.material.tempColor||V.material.color.clone(),V.material.color.copy(V.material.tempColor),V.material.opacity=V.material.tempOpacity,this.enabled?this.axis&&(V.name===this.axis?(V.material.opacity=1,V.material.color.lerp(new It(1,1,1),.5)):this.axis.split("").some(function(pe){return V.name===pe})?(V.material.opacity=1,V.material.color.lerp(new It(1,1,1),.5)):(V.material.opacity*=.25,V.material.color.lerp(new It(1,1,1),.5))):(V.material.opacity*=.5,V.material.color.lerp(new It(1,1,1),.5))}super.updateMatrixWorld()});const e=new pl({depthTest:!1,depthWrite:!1,transparent:!0,side:Do,fog:!1,toneMapped:!1}),n=new ws({depthTest:!1,depthWrite:!1,transparent:!0,linewidth:1,fog:!1,toneMapped:!1}),r=e.clone();r.opacity=.15;const i=e.clone();i.opacity=.33;const s=e.clone();s.color.set(16711680);const o=e.clone();o.color.set(65280);const a=e.clone();a.color.set(255);const l=e.clone();l.opacity=.25;const c=l.clone();c.color.set(16776960);const f=l.clone();f.color.set(65535);const p=l.clone();p.color.set(16711935),e.clone().color.set(16776960);const v=n.clone();v.color.set(16711680);const x=n.clone();x.color.set(65280);const _=n.clone();_.color.set(255);const b=n.clone();b.color.set(65535);const y=n.clone();y.color.set(16711935);const S=n.clone();S.color.set(16776960);const w=n.clone();w.color.set(7895160);const T=S.clone();T.opacity=.25;const L=new xs(0,.05,.2,12,1,!1),R=new po(.125,.125,.125),P=new Tn;P.setAttribute("position",new Ut([0,0,0,1,0,0],3));const F=(oe,de)=>{const Ce=new Tn,Le=[];for(let V=0;V<=64*de;++V)Le.push(0,Math.cos(V/32*Math.PI)*oe,Math.sin(V/32*Math.PI)*oe);return Ce.setAttribute("position",new Ut(Le,3)),Ce},O=()=>{const oe=new Tn;return oe.setAttribute("position",new Ut([0,0,0,1,1,1],3)),oe},I={X:[[new Vt(L,s),[1,0,0],[0,0,-Math.PI/2],null,"fwd"],[new Vt(L,s),[1,0,0],[0,0,Math.PI/2],null,"bwd"],[new Gn(P,v)]],Y:[[new Vt(L,o),[0,1,0],null,null,"fwd"],[new Vt(L,o),[0,1,0],[Math.PI,0,0],null,"bwd"],[new Gn(P,x),null,[0,0,Math.PI/2]]],Z:[[new Vt(L,a),[0,0,1],[Math.PI/2,0,0],null,"fwd"],[new Vt(L,a),[0,0,1],[-Math.PI/2,0,0],null,"bwd"],[new Gn(P,_),null,[0,-Math.PI/2,0]]],XYZ:[[new Vt(new Qa(.1,0),l.clone()),[0,0,0],[0,0,0]]],XY:[[new Vt(new va(.295,.295),c.clone()),[.15,.15,0]],[new Gn(P,S),[.18,.3,0],null,[.125,1,1]],[new Gn(P,S),[.3,.18,0],[0,0,Math.PI/2],[.125,1,1]]],YZ:[[new Vt(new va(.295,.295),f.clone()),[0,.15,.15],[0,Math.PI/2,0]],[new Gn(P,b),[0,.18,.3],[0,0,Math.PI/2],[.125,1,1]],[new Gn(P,b),[0,.3,.18],[0,-Math.PI/2,0],[.125,1,1]]],XZ:[[new Vt(new va(.295,.295),p.clone()),[.15,0,.15],[-Math.PI/2,0,0]],[new Gn(P,y),[.18,0,.3],null,[.125,1,1]],[new Gn(P,y),[.3,0,.18],[0,-Math.PI/2,0],[.125,1,1]]]},H={X:[[new Vt(new xs(.2,0,1,4,1,!1),r),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new Vt(new xs(.2,0,1,4,1,!1),r),[0,.6,0]]],Z:[[new Vt(new xs(.2,0,1,4,1,!1),r),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new Vt(new Qa(.2,0),r)]],XY:[[new Vt(new va(.4,.4),r),[.2,.2,0]]],YZ:[[new Vt(new va(.4,.4),r),[0,.2,.2],[0,Math.PI/2,0]]],XZ:[[new Vt(new va(.4,.4),r),[.2,0,.2],[-Math.PI/2,0,0]]]},Q={START:[[new Vt(new Qa(.01,2),i),null,null,null,"helper"]],END:[[new Vt(new Qa(.01,2),i),null,null,null,"helper"]],DELTA:[[new Gn(O(),i),null,null,null,"helper"]],X:[[new Gn(P,i.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Gn(P,i.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Gn(P,i.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},q={X:[[new Gn(F(1,.5),v)],[new Vt(new Qa(.04,0),s),[0,0,.99],null,[1,3,1]]],Y:[[new Gn(F(1,.5),x),null,[0,0,-Math.PI/2]],[new Vt(new Qa(.04,0),o),[0,0,.99],null,[3,1,1]]],Z:[[new Gn(F(1,.5),_),null,[0,Math.PI/2,0]],[new Vt(new Qa(.04,0),a),[.99,0,0],null,[1,3,1]]],E:[[new Gn(F(1.25,1),T),null,[0,Math.PI/2,0]],[new Vt(new xs(.03,0,.15,4,1,!1),T),[1.17,0,0],[0,0,-Math.PI/2],[1,1,.001]],[new Vt(new xs(.03,0,.15,4,1,!1),T),[-1.17,0,0],[0,0,Math.PI/2],[1,1,.001]],[new Vt(new xs(.03,0,.15,4,1,!1),T),[0,-1.17,0],[Math.PI,0,0],[1,1,.001]],[new Vt(new xs(.03,0,.15,4,1,!1),T),[0,1.17,0],[0,0,0],[1,1,.001]]],XYZE:[[new Gn(F(1,1),w),null,[0,Math.PI/2,0]]]},le={AXIS:[[new Gn(P,i.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},ie={X:[[new Vt(new Kd(1,.1,4,24),r),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new Vt(new Kd(1,.1,4,24),r),[0,0,0],[Math.PI/2,0,0]]],Z:[[new Vt(new Kd(1,.1,4,24),r),[0,0,0],[0,0,-Math.PI/2]]],E:[[new Vt(new Kd(1.25,.1,2,24),r)]],XYZE:[[new Vt(new Mp(.7,10,8),r)]]},ee={X:[[new Vt(R,s),[.8,0,0],[0,0,-Math.PI/2]],[new Gn(P,v),null,null,[.8,1,1]]],Y:[[new Vt(R,o),[0,.8,0]],[new Gn(P,x),null,[0,0,Math.PI/2],[.8,1,1]]],Z:[[new Vt(R,a),[0,0,.8],[Math.PI/2,0,0]],[new Gn(P,_),null,[0,-Math.PI/2,0],[.8,1,1]]],XY:[[new Vt(R,c),[.85,.85,0],null,[2,2,.2]],[new Gn(P,S),[.855,.98,0],null,[.125,1,1]],[new Gn(P,S),[.98,.855,0],[0,0,Math.PI/2],[.125,1,1]]],YZ:[[new Vt(R,f),[0,.85,.85],null,[.2,2,2]],[new Gn(P,b),[0,.855,.98],[0,0,Math.PI/2],[.125,1,1]],[new Gn(P,b),[0,.98,.855],[0,-Math.PI/2,0],[.125,1,1]]],XZ:[[new Vt(R,p),[.85,0,.85],null,[2,.2,2]],[new Gn(P,y),[.855,0,.98],null,[.125,1,1]],[new Gn(P,y),[.98,0,.855],[0,-Math.PI/2,0],[.125,1,1]]],XYZX:[[new Vt(new po(.125,.125,.125),l.clone()),[1.1,0,0]]],XYZY:[[new Vt(new po(.125,.125,.125),l.clone()),[0,1.1,0]]],XYZZ:[[new Vt(new po(.125,.125,.125),l.clone()),[0,0,1.1]]]},ue={X:[[new Vt(new xs(.2,0,.8,4,1,!1),r),[.5,0,0],[0,0,-Math.PI/2]]],Y:[[new Vt(new xs(.2,0,.8,4,1,!1),r),[0,.5,0]]],Z:[[new Vt(new xs(.2,0,.8,4,1,!1),r),[0,0,.5],[Math.PI/2,0,0]]],XY:[[new Vt(R,r),[.85,.85,0],null,[3,3,.2]]],YZ:[[new Vt(R,r),[0,.85,.85],null,[.2,3,3]]],XZ:[[new Vt(R,r),[.85,0,.85],null,[3,.2,3]]],XYZX:[[new Vt(new po(.2,.2,.2),r),[1.1,0,0]]],XYZY:[[new Vt(new po(.2,.2,.2),r),[0,1.1,0]]],XYZZ:[[new Vt(new po(.2,.2,.2),r),[0,0,1.1]]]},z={X:[[new Gn(P,i.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Gn(P,i.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Gn(P,i.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},te=oe=>{const de=new Jn;for(let Ce in oe)for(let Le=oe[Ce].length;Le--;){const V=oe[Ce][Le][0].clone(),me=oe[Ce][Le][1],pe=oe[Ce][Le][2],Se=oe[Ce][Le][3],je=oe[Ce][Le][4];V.name=Ce,V.tag=je,me&&V.position.set(me[0],me[1],me[2]),pe&&V.rotation.set(pe[0],pe[1],pe[2]),Se&&V.scale.set(Se[0],Se[1],Se[2]),V.updateMatrix();const it=V.geometry.clone();it.applyMatrix4(V.matrix),V.geometry=it,V.renderOrder=1/0,V.position.set(0,0,0),V.rotation.set(0,0,0),V.scale.set(1,1,1),de.add(V)}return de};this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=te(I)),this.add(this.gizmo.rotate=te(q)),this.add(this.gizmo.scale=te(ee)),this.add(this.picker.translate=te(H)),this.add(this.picker.rotate=te(ie)),this.add(this.picker.scale=te(ue)),this.add(this.helper.translate=te(Q)),this.add(this.helper.rotate=te(le)),this.add(this.helper.scale=te(z)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}}class hxe extends Vt{constructor(){super(new va(1e5,1e5,2,2),new pl({visible:!1,wireframe:!0,side:Do,transparent:!0,opacity:.1,toneMapped:!1})),ot(this,"isTransformControlsPlane",!0),ot(this,"type","TransformControlsPlane"),ot(this,"unitX",new K(1,0,0)),ot(this,"unitY",new K(0,1,0)),ot(this,"unitZ",new K(0,0,1)),ot(this,"tempVector",new K),ot(this,"dirVector",new K),ot(this,"alignVector",new K),ot(this,"tempMatrix",new Jt),ot(this,"identityQuaternion",new sr),ot(this,"cameraQuaternion",new sr),ot(this,"worldPosition",new K),ot(this,"worldQuaternion",new sr),ot(this,"eye",new K),ot(this,"axis",null),ot(this,"mode","translate"),ot(this,"space","world"),ot(this,"updateMatrixWorld",()=>{let e=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(e="local"),this.unitX.set(1,0,0).applyQuaternion(e==="local"?this.worldQuaternion:this.identityQuaternion),this.unitY.set(0,1,0).applyQuaternion(e==="local"?this.worldQuaternion:this.identityQuaternion),this.unitZ.set(0,0,1).applyQuaternion(e==="local"?this.worldQuaternion:this.identityQuaternion),this.alignVector.copy(this.unitY),this.mode){case"translate":case"scale":switch(this.axis){case"X":this.alignVector.copy(this.eye).cross(this.unitX),this.dirVector.copy(this.unitX).cross(this.alignVector);break;case"Y":this.alignVector.copy(this.eye).cross(this.unitY),this.dirVector.copy(this.unitY).cross(this.alignVector);break;case"Z":this.alignVector.copy(this.eye).cross(this.unitZ),this.dirVector.copy(this.unitZ).cross(this.alignVector);break;case"XY":this.dirVector.copy(this.unitZ);break;case"YZ":this.dirVector.copy(this.unitX);break;case"XZ":this.alignVector.copy(this.unitZ),this.dirVector.copy(this.unitY);break;case"XYZ":case"E":this.dirVector.set(0,0,0);break}break;case"rotate":default:this.dirVector.set(0,0,0)}this.dirVector.length()===0?this.quaternion.copy(this.cameraQuaternion):(this.tempMatrix.lookAt(this.tempVector.set(0,0,0),this.dirVector,this.alignVector),this.quaternion.setFromRotationMatrix(this.tempMatrix)),super.updateMatrixWorld()})}}var pxe=Object.defineProperty,mxe=(t,e,n)=>e in t?pxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cn=(t,e,n)=>(mxe(t,typeof e!="symbol"?e+"":e,n),n);const iS=new wp,iD=new gu,gxe=Math.cos(70*(Math.PI/180)),sD=(t,e)=>(t%e+e)%e;let vxe=class extends Bc{constructor(e,n){super(),Cn(this,"object"),Cn(this,"domElement"),Cn(this,"enabled",!0),Cn(this,"target",new K),Cn(this,"minDistance",0),Cn(this,"maxDistance",1/0),Cn(this,"minZoom",0),Cn(this,"maxZoom",1/0),Cn(this,"minPolarAngle",0),Cn(this,"maxPolarAngle",Math.PI),Cn(this,"minAzimuthAngle",-1/0),Cn(this,"maxAzimuthAngle",1/0),Cn(this,"enableDamping",!1),Cn(this,"dampingFactor",.05),Cn(this,"enableZoom",!0),Cn(this,"zoomSpeed",1),Cn(this,"enableRotate",!0),Cn(this,"rotateSpeed",1),Cn(this,"enablePan",!0),Cn(this,"panSpeed",1),Cn(this,"screenSpacePanning",!0),Cn(this,"keyPanSpeed",7),Cn(this,"zoomToCursor",!1),Cn(this,"autoRotate",!1),Cn(this,"autoRotateSpeed",2),Cn(this,"reverseOrbit",!1),Cn(this,"reverseHorizontalOrbit",!1),Cn(this,"reverseVerticalOrbit",!1),Cn(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),Cn(this,"mouseButtons",{LEFT:yh.ROTATE,MIDDLE:yh.DOLLY,RIGHT:yh.PAN}),Cn(this,"touches",{ONE:xh.ROTATE,TWO:xh.DOLLY_PAN}),Cn(this,"target0"),Cn(this,"position0"),Cn(this,"zoom0"),Cn(this,"_domElementKeyEvents",null),Cn(this,"getPolarAngle"),Cn(this,"getAzimuthalAngle"),Cn(this,"setPolarAngle"),Cn(this,"setAzimuthalAngle"),Cn(this,"getDistance"),Cn(this,"listenToKeyEvents"),Cn(this,"stopListenToKeyEvents"),Cn(this,"saveState"),Cn(this,"reset"),Cn(this,"update"),Cn(this,"connect"),Cn(this,"dispose"),this.object=e,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>f.phi,this.getAzimuthalAngle=()=>f.theta,this.setPolarAngle=ce=>{let Ne=sD(ce,2*Math.PI),fe=f.phi;fe<0&&(fe+=2*Math.PI),Ne<0&&(Ne+=2*Math.PI);let Fe=Math.abs(Ne-fe);2*Math.PI-Fe{let Ne=sD(ce,2*Math.PI),fe=f.theta;fe<0&&(fe+=2*Math.PI),Ne<0&&(Ne+=2*Math.PI);let Fe=Math.abs(Ne-fe);2*Math.PI-Fer.object.position.distanceTo(r.target),this.listenToKeyEvents=ce=>{ce.addEventListener("keydown",Ie),this._domElementKeyEvents=ce},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",Ie),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(i),r.update(),l=a.NONE},this.update=(()=>{const ce=new K,Ne=new K(0,1,0),fe=new sr().setFromUnitVectors(e.up,Ne),Fe=fe.clone().invert(),He=new K,ut=new sr,xt=2*Math.PI;return function(){const vn=r.object.position;fe.setFromUnitVectors(e.up,Ne),Fe.copy(fe).invert(),ce.copy(vn).sub(r.target),ce.applyQuaternion(fe),f.setFromVector3(ce),r.autoRotate&&l===a.NONE&&le(Q()),r.enableDamping?(f.theta+=p.theta*r.dampingFactor,f.phi+=p.phi*r.dampingFactor):(f.theta+=p.theta,f.phi+=p.phi);let mn=r.minAzimuthAngle,On=r.maxAzimuthAngle;isFinite(mn)&&isFinite(On)&&(mn<-Math.PI?mn+=xt:mn>Math.PI&&(mn-=xt),On<-Math.PI?On+=xt:On>Math.PI&&(On-=xt),mn<=On?f.theta=Math.max(mn,Math.min(On,f.theta)):f.theta=f.theta>(mn+On)/2?Math.max(mn,f.theta):Math.min(On,f.theta)),f.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,f.phi)),f.makeSafe(),r.enableDamping===!0?r.target.addScaledVector(v,r.dampingFactor):r.target.add(v),r.zoomToCursor&&O||r.object.isOrthographicCamera?f.radius=Ce(f.radius):f.radius=Ce(f.radius*g),ce.setFromSpherical(f),ce.applyQuaternion(Fe),vn.copy(r.target).add(ce),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),r.enableDamping===!0?(p.theta*=1-r.dampingFactor,p.phi*=1-r.dampingFactor,v.multiplyScalar(1-r.dampingFactor)):(p.set(0,0,0),v.set(0,0,0));let un=!1;if(r.zoomToCursor&&O){let Nn=null;if(r.object instanceof $r&&r.object.isPerspectiveCamera){const In=ce.length();Nn=Ce(In*g);const or=In-Nn;r.object.position.addScaledVector(P,or),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){const In=new K(F.x,F.y,0);In.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/g)),r.object.updateProjectionMatrix(),un=!0;const or=new K(F.x,F.y,0);or.unproject(r.object),r.object.position.sub(or).add(In),r.object.updateMatrixWorld(),Nn=ce.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;Nn!==null&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar(Nn).add(r.object.position):(iS.origin.copy(r.object.position),iS.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(iS.direction))c||8*(1-ut.dot(r.object.quaternion))>c?(r.dispatchEvent(i),He.copy(r.object.position),ut.copy(r.object.quaternion),un=!1,!0):!1}})(),this.connect=ce=>{ce===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),r.domElement=ce,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",St),r.domElement.addEventListener("pointerdown",be),r.domElement.addEventListener("pointercancel",We),r.domElement.addEventListener("wheel",at)},this.dispose=()=>{var ce,Ne,fe,Fe,He,ut;r.domElement&&(r.domElement.style.touchAction="auto"),(ce=r.domElement)==null||ce.removeEventListener("contextmenu",St),(Ne=r.domElement)==null||Ne.removeEventListener("pointerdown",be),(fe=r.domElement)==null||fe.removeEventListener("pointercancel",We),(Fe=r.domElement)==null||Fe.removeEventListener("wheel",at),(He=r.domElement)==null||He.ownerDocument.removeEventListener("pointermove",$e),(ut=r.domElement)==null||ut.ownerDocument.removeEventListener("pointerup",Ze),r._domElementKeyEvents!==null&&r._domElementKeyEvents.removeEventListener("keydown",Ie)};const r=this,i={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const c=1e-6,f=new RA,p=new RA;let g=1;const v=new K,x=new ct,_=new ct,b=new ct,y=new ct,S=new ct,w=new ct,T=new ct,L=new ct,R=new ct,P=new K,F=new ct;let O=!1;const I=[],H={};function Q(){return 2*Math.PI/60/60*r.autoRotateSpeed}function q(){return Math.pow(.95,r.zoomSpeed)}function le(ce){r.reverseOrbit||r.reverseHorizontalOrbit?p.theta+=ce:p.theta-=ce}function ie(ce){r.reverseOrbit||r.reverseVerticalOrbit?p.phi+=ce:p.phi-=ce}const ee=(()=>{const ce=new K;return function(fe,Fe){ce.setFromMatrixColumn(Fe,0),ce.multiplyScalar(-fe),v.add(ce)}})(),ue=(()=>{const ce=new K;return function(fe,Fe){r.screenSpacePanning===!0?ce.setFromMatrixColumn(Fe,1):(ce.setFromMatrixColumn(Fe,0),ce.crossVectors(r.object.up,ce)),ce.multiplyScalar(fe),v.add(ce)}})(),z=(()=>{const ce=new K;return function(fe,Fe){const He=r.domElement;if(He&&r.object instanceof $r&&r.object.isPerspectiveCamera){const ut=r.object.position;ce.copy(ut).sub(r.target);let xt=ce.length();xt*=Math.tan(r.object.fov/2*Math.PI/180),ee(2*fe*xt/He.clientHeight,r.object.matrix),ue(2*Fe*xt/He.clientHeight,r.object.matrix)}else He&&r.object instanceof il&&r.object.isOrthographicCamera?(ee(fe*(r.object.right-r.object.left)/r.object.zoom/He.clientWidth,r.object.matrix),ue(Fe*(r.object.top-r.object.bottom)/r.object.zoom/He.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function te(ce){r.object instanceof $r&&r.object.isPerspectiveCamera||r.object instanceof il&&r.object.isOrthographicCamera?g/=ce:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function oe(ce){r.object instanceof $r&&r.object.isPerspectiveCamera||r.object instanceof il&&r.object.isOrthographicCamera?g*=ce:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function de(ce){if(!r.zoomToCursor||!r.domElement)return;O=!0;const Ne=r.domElement.getBoundingClientRect(),fe=ce.clientX-Ne.left,Fe=ce.clientY-Ne.top,He=Ne.width,ut=Ne.height;F.x=fe/He*2-1,F.y=-(Fe/ut)*2+1,P.set(F.x,F.y,1).unproject(r.object).sub(r.object.position).normalize()}function Ce(ce){return Math.max(r.minDistance,Math.min(r.maxDistance,ce))}function Le(ce){x.set(ce.clientX,ce.clientY)}function V(ce){de(ce),T.set(ce.clientX,ce.clientY)}function me(ce){y.set(ce.clientX,ce.clientY)}function pe(ce){_.set(ce.clientX,ce.clientY),b.subVectors(_,x).multiplyScalar(r.rotateSpeed);const Ne=r.domElement;Ne&&(le(2*Math.PI*b.x/Ne.clientHeight),ie(2*Math.PI*b.y/Ne.clientHeight)),x.copy(_),r.update()}function Se(ce){L.set(ce.clientX,ce.clientY),R.subVectors(L,T),R.y>0?te(q()):R.y<0&&oe(q()),T.copy(L),r.update()}function je(ce){S.set(ce.clientX,ce.clientY),w.subVectors(S,y).multiplyScalar(r.panSpeed),z(w.x,w.y),y.copy(S),r.update()}function it(ce){de(ce),ce.deltaY<0?oe(q()):ce.deltaY>0&&te(q()),r.update()}function xe(ce){let Ne=!1;switch(ce.code){case r.keys.UP:z(0,r.keyPanSpeed),Ne=!0;break;case r.keys.BOTTOM:z(0,-r.keyPanSpeed),Ne=!0;break;case r.keys.LEFT:z(r.keyPanSpeed,0),Ne=!0;break;case r.keys.RIGHT:z(-r.keyPanSpeed,0),Ne=!0;break}Ne&&(ce.preventDefault(),r.update())}function et(){if(I.length==1)x.set(I[0].pageX,I[0].pageY);else{const ce=.5*(I[0].pageX+I[1].pageX),Ne=.5*(I[0].pageY+I[1].pageY);x.set(ce,Ne)}}function Re(){if(I.length==1)y.set(I[0].pageX,I[0].pageY);else{const ce=.5*(I[0].pageX+I[1].pageX),Ne=.5*(I[0].pageY+I[1].pageY);y.set(ce,Ne)}}function Oe(){const ce=I[0].pageX-I[1].pageX,Ne=I[0].pageY-I[1].pageY,fe=Math.sqrt(ce*ce+Ne*Ne);T.set(0,fe)}function Te(){r.enableZoom&&Oe(),r.enablePan&&Re()}function ze(){r.enableZoom&&Oe(),r.enableRotate&&et()}function ke(ce){if(I.length==1)_.set(ce.pageX,ce.pageY);else{const fe=qe(ce),Fe=.5*(ce.pageX+fe.x),He=.5*(ce.pageY+fe.y);_.set(Fe,He)}b.subVectors(_,x).multiplyScalar(r.rotateSpeed);const Ne=r.domElement;Ne&&(le(2*Math.PI*b.x/Ne.clientHeight),ie(2*Math.PI*b.y/Ne.clientHeight)),x.copy(_)}function rt(ce){if(I.length==1)S.set(ce.pageX,ce.pageY);else{const Ne=qe(ce),fe=.5*(ce.pageX+Ne.x),Fe=.5*(ce.pageY+Ne.y);S.set(fe,Fe)}w.subVectors(S,y).multiplyScalar(r.panSpeed),z(w.x,w.y),y.copy(S)}function tt(ce){const Ne=qe(ce),fe=ce.pageX-Ne.x,Fe=ce.pageY-Ne.y,He=Math.sqrt(fe*fe+Fe*Fe);L.set(0,He),R.set(0,Math.pow(L.y/T.y,r.zoomSpeed)),te(R.y),T.copy(L)}function ae(ce){r.enableZoom&&tt(ce),r.enablePan&&rt(ce)}function G(ce){r.enableZoom&&tt(ce),r.enableRotate&&ke(ce)}function be(ce){var Ne,fe;r.enabled!==!1&&(I.length===0&&((Ne=r.domElement)==null||Ne.ownerDocument.addEventListener("pointermove",$e),(fe=r.domElement)==null||fe.ownerDocument.addEventListener("pointerup",Ze)),mt(ce),ce.pointerType==="touch"?ge(ce):Mt(ce))}function $e(ce){r.enabled!==!1&&(ce.pointerType==="touch"?Xe(ce):pt(ce))}function Ze(ce){var Ne,fe,Fe;Be(ce),I.length===0&&((Ne=r.domElement)==null||Ne.releasePointerCapture(ce.pointerId),(fe=r.domElement)==null||fe.ownerDocument.removeEventListener("pointermove",$e),(Fe=r.domElement)==null||Fe.ownerDocument.removeEventListener("pointerup",Ze)),r.dispatchEvent(o),l=a.NONE}function We(ce){Be(ce)}function Mt(ce){let Ne;switch(ce.button){case 0:Ne=r.mouseButtons.LEFT;break;case 1:Ne=r.mouseButtons.MIDDLE;break;case 2:Ne=r.mouseButtons.RIGHT;break;default:Ne=-1}switch(Ne){case yh.DOLLY:if(r.enableZoom===!1)return;V(ce),l=a.DOLLY;break;case yh.ROTATE:if(ce.ctrlKey||ce.metaKey||ce.shiftKey){if(r.enablePan===!1)return;me(ce),l=a.PAN}else{if(r.enableRotate===!1)return;Le(ce),l=a.ROTATE}break;case yh.PAN:if(ce.ctrlKey||ce.metaKey||ce.shiftKey){if(r.enableRotate===!1)return;Le(ce),l=a.ROTATE}else{if(r.enablePan===!1)return;me(ce),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&r.dispatchEvent(s)}function pt(ce){if(r.enabled!==!1)switch(l){case a.ROTATE:if(r.enableRotate===!1)return;pe(ce);break;case a.DOLLY:if(r.enableZoom===!1)return;Se(ce);break;case a.PAN:if(r.enablePan===!1)return;je(ce);break}}function at(ce){r.enabled===!1||r.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(ce.preventDefault(),r.dispatchEvent(s),it(ce),r.dispatchEvent(o))}function Ie(ce){r.enabled===!1||r.enablePan===!1||xe(ce)}function ge(ce){switch(vt(ce),I.length){case 1:switch(r.touches.ONE){case xh.ROTATE:if(r.enableRotate===!1)return;et(),l=a.TOUCH_ROTATE;break;case xh.PAN:if(r.enablePan===!1)return;Re(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(r.touches.TWO){case xh.DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Te(),l=a.TOUCH_DOLLY_PAN;break;case xh.DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;ze(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&r.dispatchEvent(s)}function Xe(ce){switch(vt(ce),l){case a.TOUCH_ROTATE:if(r.enableRotate===!1)return;ke(ce),r.update();break;case a.TOUCH_PAN:if(r.enablePan===!1)return;rt(ce),r.update();break;case a.TOUCH_DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;ae(ce),r.update();break;case a.TOUCH_DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;G(ce),r.update();break;default:l=a.NONE}}function St(ce){r.enabled!==!1&&ce.preventDefault()}function mt(ce){I.push(ce)}function Be(ce){delete H[ce.pointerId];for(let Ne=0;Ne0){const s=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.all(n.map(l=>{if(l=xxe(l),l in oD)return;oD[l]=!0;const c=l.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let v=s.length-1;v>=0;v--){const x=s[v];if(x.href===l&&(!c||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${f}`))return;const g=document.createElement("link");if(g.rel=c?"stylesheet":yxe,c||(g.as="script",g.crossOrigin=""),g.href=l,a&&g.setAttribute("nonce",a),document.head.appendChild(g),c)return new Promise((v,x)=>{g.addEventListener("load",v),g.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${l}`)))})}))}return i.then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},iC=t=>t===Object(t)&&!Array.isArray(t)&&typeof t!="function";function FP(t,e){const n=Si(s=>s.gl),r=_f(vx,iC(t)?Object.values(t):t);return D.useLayoutEffect(()=>{e==null||e(r)},[e]),D.useEffect(()=>{if("initTexture"in n){let s=[];Array.isArray(r)?s=r:r instanceof Yr?s=[r]:iC(r)&&(s=Object.values(r)),s.forEach(o=>{o instanceof Yr&&n.initTexture(o)})}},[n,r]),D.useMemo(()=>{if(iC(t)){const s={};let o=0;for(const a in t)s[a]=r[o++];return s}else return r},[t,r])}FP.preload=t=>_f.preload(vx,t);FP.clear=t=>_f.clear(vx,t);function bxe(t,e,n){const r=Si(g=>g.size),i=Si(g=>g.viewport),s=typeof t=="number"?t:r.width*i.dpr,o=typeof e=="number"?e:r.height*i.dpr,a=(typeof t=="number"?n:t)||{},{samples:l=0,depth:c,...f}=a,p=D.useMemo(()=>{const g=new hl(s,o,{minFilter:Mi,magFilter:Mi,type:Sg,...f});return c&&(g.depthTexture=new cM(s,o,ba)),g.samples=l,g},[]);return D.useLayoutEffect(()=>{p.setSize(s,o),l&&(p.samples=l)},[l,p,s,o]),D.useEffect(()=>()=>p.dispose(),[]),p}const Sxe=t=>typeof t=="function",wxe=D.forwardRef(({envMap:t,resolution:e=256,frames:n=1/0,makeDefault:r,children:i,...s},o)=>{const a=Si(({set:b})=>b),l=Si(({camera:b})=>b),c=Si(({size:b})=>b),f=D.useRef(null);D.useImperativeHandle(o,()=>f.current,[]);const p=D.useRef(null),g=bxe(e);D.useLayoutEffect(()=>{s.manual||(f.current.aspect=c.width/c.height)},[c,s]),D.useLayoutEffect(()=>{f.current.updateProjectionMatrix()});let v=0,x=null;const _=Sxe(i);return PM(b=>{_&&(n===1/0||v{if(r){const b=l;return a(()=>({camera:f.current})),()=>a(()=>({camera:b}))}},[f,r,a]),D.createElement(D.Fragment,null,D.createElement("perspectiveCamera",X({ref:f},s),!_&&i),D.createElement("group",{ref:p},_&&i(g.texture)))}),Mxe=D.forwardRef(({makeDefault:t,camera:e,regress:n,domElement:r,enableDamping:i=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:l,...c},f)=>{const p=Si(R=>R.invalidate),g=Si(R=>R.camera),v=Si(R=>R.gl),x=Si(R=>R.events),_=Si(R=>R.setEvents),b=Si(R=>R.set),y=Si(R=>R.get),S=Si(R=>R.performance),w=e||g,T=r||x.connected||v.domElement,L=D.useMemo(()=>new vxe(w),[w]);return PM(()=>{L.enabled&&L.update()},-1),D.useEffect(()=>(s&&L.connect(s===!0?T:s),L.connect(T),()=>void L.dispose()),[s,T,n,L,p]),D.useEffect(()=>{const R=O=>{p(),n&&S.regress(),o&&o(O)},P=O=>{a&&a(O)},F=O=>{l&&l(O)};return L.addEventListener("change",R),L.addEventListener("start",P),L.addEventListener("end",F),()=>{L.removeEventListener("start",P),L.removeEventListener("end",F),L.removeEventListener("change",R)}},[o,a,l,L,p,_]),D.useEffect(()=>{if(t){const R=y().controls;return b({controls:L}),()=>b({controls:R})}},[t,L]),D.createElement("primitive",X({ref:f,object:L,enableDamping:i},c))}),Exe=D.forwardRef(({children:t,domElement:e,onChange:n,onMouseDown:r,onMouseUp:i,onObjectChange:s,object:o,makeDefault:a,camera:l,enabled:c,axis:f,mode:p,translationSnap:g,rotationSnap:v,scaleSnap:x,space:_,size:b,showX:y,showY:S,showZ:w,...T},L)=>{const R=Si(de=>de.controls),P=Si(de=>de.gl),F=Si(de=>de.events),O=Si(de=>de.camera),I=Si(de=>de.invalidate),H=Si(de=>de.get),Q=Si(de=>de.set),q=l||O,le=e||F.connected||P.domElement,ie=D.useMemo(()=>new dxe(q,le),[q,le]),ee=D.useRef(null);D.useLayoutEffect(()=>(o?ie.attach(o instanceof Jn?o:o.current):ee.current instanceof Jn&&ie.attach(ee.current),()=>void ie.detach()),[o,t,ie]),D.useEffect(()=>{if(R){const de=Ce=>R.enabled=!Ce.value;return ie.addEventListener("dragging-changed",de),()=>ie.removeEventListener("dragging-changed",de)}},[ie,R]);const ue=D.useRef(),z=D.useRef(),te=D.useRef(),oe=D.useRef();return D.useLayoutEffect(()=>void(ue.current=n),[n]),D.useLayoutEffect(()=>void(z.current=r),[r]),D.useLayoutEffect(()=>void(te.current=i),[i]),D.useLayoutEffect(()=>void(oe.current=s),[s]),D.useEffect(()=>{const de=me=>{I(),ue.current==null||ue.current(me)},Ce=me=>z.current==null?void 0:z.current(me),Le=me=>te.current==null?void 0:te.current(me),V=me=>oe.current==null?void 0:oe.current(me);return ie.addEventListener("change",de),ie.addEventListener("mouseDown",Ce),ie.addEventListener("mouseUp",Le),ie.addEventListener("objectChange",V),()=>{ie.removeEventListener("change",de),ie.removeEventListener("mouseDown",Ce),ie.removeEventListener("mouseUp",Le),ie.removeEventListener("objectChange",V)}},[I,ie]),D.useEffect(()=>{if(a){const de=H().controls;return Q({controls:ie}),()=>Q({controls:de})}},[a,ie]),D.createElement(D.Fragment,null,D.createElement("primitive",{ref:L,object:ie,enabled:c,axis:f,mode:p,translationSnap:g,rotationSnap:v,scaleSnap:x,space:_,size:b,showX:y,showY:S,showZ:w}),D.createElement("group",X({ref:ee},T),t))});function Cxe(t,e=[0,0,0]){return t?t.trim().split(/\s+/g).map(n=>parseFloat(n)):e}const Txe=t=>{const e=new sr;if(t==null)return e;const n=new ns,r=typeof t=="string"?Cxe(t):t;return n.set(r[0],r[1],r[2],"ZYX"),e.setFromEuler(n)},Axe=Txe([-Math.PI/2,-Math.PI/2,0]);function Dh(t){return t?t.trim().split(/\s+/g).map(e=>parseFloat(e)):[0,0,0]}function Rxe(t,e,n){if(!/^package:\/\//.test(n))return e?e+n:n;const[r,i]=n.replace(/^package:\/\//,"").split(/\/(.+)/);return typeof t=="string"?t.endsWith(r)?t+"/"+i:t+"/"+r+"/"+i:t instanceof Function?t(r)+"/"+i:typeof t=="object"?r in t?t[r]+"/"+i:(console.error(`resolvePath: '${r}' not found in provided package list.`),null):(console.error(`resolvePath: '${t}' (of type ${typeof t}) is not a valid packages object.`),null)}const Pxe=({texture:t,...e})=>{const n=FP({map:t});return C.jsx("meshPhongMaterial",{...n,...e})},Ixe=t=>{const e=Bu();return C.jsx("meshPhongMaterial",{color:new It(e.palette.primary.dark),transparent:!0,opacity:.6,...t})};class Lxe extends Ns{constructor(e){super(e)}load(e,n,r,i){const s=this,o=new jl(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{n(s.parse(a))}catch(l){i?i(l):console.error(l),s.manager.itemError(e)}},r,i)}parse(e){function n(c){const f=new DataView(c),p=32/8*3+32/8*3*3+16/8,g=f.getUint32(80,!0);if(80+32/8+g*p===f.byteLength)return!0;const x=[115,111,108,105,100];for(let _=0;_<5;_++)if(r(x,f,_))return!1;return!0}function r(c,f,p){for(let g=0,v=c.length;g>5&31)/31,x=(ee>>10&31)/31)}for(let ee=1;ee<=3;ee++){const ue=Q+ee*12,z=H*3*3+(ee-1)*3;F[z]=f.getFloat32(ue,!0),F[z+1]=f.getFloat32(ue+4,!0),F[z+2]=f.getFloat32(ue+8,!0),O[z]=q,O[z+1]=le,O[z+2]=ie,_&&(I.set(g,v,x).convertSRGBToLinear(),b[z]=I.r,b[z+1]=I.g,b[z+2]=I.b)}}return P.setAttribute("position",new fr(F,3)),P.setAttribute("normal",new fr(O,3)),_&&(P.setAttribute("color",new fr(b,3)),P.hasColors=!0,P.alpha=T),P}function s(c){const f=new Tn,p=/solid([\s\S]*?)endsolid/g,g=/facet([\s\S]*?)endfacet/g,v=/solid\s(.+)/;let x=0;const _=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,b=new RegExp("vertex"+_+_+_,"g"),y=new RegExp("normal"+_+_+_,"g"),S=[],w=[],T=[],L=new K;let R,P=0,F=0,O=0;for(;(R=p.exec(c))!==null;){F=O;const I=R[0],H=(R=v.exec(I))!==null?R[1]:"";for(T.push(H);(R=g.exec(I))!==null;){let le=0,ie=0;const ee=R[0];for(;(R=y.exec(ee))!==null;)L.x=parseFloat(R[1]),L.y=parseFloat(R[2]),L.z=parseFloat(R[3]),ie++;for(;(R=b.exec(ee))!==null;)S.push(parseFloat(R[1]),parseFloat(R[2]),parseFloat(R[3])),w.push(L.x,L.y,L.z),le++,O++;ie!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+x),le!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+x),x++}const Q=F,q=O-F;f.userData.groupNames=T,f.addGroup(Q,q,P),P++}return f.setAttribute("position",new Ut(S,3)),f.setAttribute("normal",new Ut(w,3)),f}function o(c){return typeof c!="string"?new TextDecoder().decode(c):c}function a(c){if(typeof c=="string"){const f=new Uint8Array(c.length);for(let p=0;p256||ee.colormap_size!==24||ee.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case v:case x:case b:case y:if(ee.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case p:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+ee.image_type)}if(ee.width<=0||ee.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(ee.pixel_size!==8&&ee.pixel_size!==16&&ee.pixel_size!==24&&ee.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+ee.pixel_size)}function r(ee,ue,z,te,oe){let de,Ce;const Le=z.pixel_size>>3,V=z.width*z.height*Le;if(ue&&(Ce=oe.subarray(te,te+=z.colormap_length*(z.colormap_size>>3))),ee){de=new Uint8Array(V);let me,pe,Se,je=0;const it=new Uint8Array(Le);for(;je>7,ee[(pe+je*Se)*4+1]=(V&992)>>2,ee[(pe+je*Se)*4+2]=(V&31)<<3,ee[(pe+je*Se)*4+3]=V&32768?0:255;return ee}function o(ee,ue,z,te,oe,de,Ce,Le){let V=0,me,pe;const Se=I.width;for(pe=ue;pe!==te;pe+=z)for(me=oe;me!==Ce;me+=de,V+=3)ee[(me+Se*pe)*4+3]=255,ee[(me+Se*pe)*4+2]=Le[V+0],ee[(me+Se*pe)*4+1]=Le[V+1],ee[(me+Se*pe)*4+0]=Le[V+2];return ee}function a(ee,ue,z,te,oe,de,Ce,Le){let V=0,me,pe;const Se=I.width;for(pe=ue;pe!==te;pe+=z)for(me=oe;me!==Ce;me+=de,V+=4)ee[(me+Se*pe)*4+2]=Le[V+0],ee[(me+Se*pe)*4+1]=Le[V+1],ee[(me+Se*pe)*4+0]=Le[V+2],ee[(me+Se*pe)*4+3]=Le[V+3];return ee}function l(ee,ue,z,te,oe,de,Ce,Le){let V,me=0,pe,Se;const je=I.width;for(Se=ue;Se!==te;Se+=z)for(pe=oe;pe!==Ce;pe+=de,me++)V=Le[me],ee[(pe+je*Se)*4+0]=V,ee[(pe+je*Se)*4+1]=V,ee[(pe+je*Se)*4+2]=V,ee[(pe+je*Se)*4+3]=255;return ee}function c(ee,ue,z,te,oe,de,Ce,Le){let V=0,me,pe;const Se=I.width;for(pe=ue;pe!==te;pe+=z)for(me=oe;me!==Ce;me+=de,V+=2)ee[(me+Se*pe)*4+0]=Le[V+0],ee[(me+Se*pe)*4+1]=Le[V+0],ee[(me+Se*pe)*4+2]=Le[V+0],ee[(me+Se*pe)*4+3]=Le[V+1];return ee}function f(ee,ue,z,te,oe){let de,Ce,Le,V,me,pe;switch((I.flags&S)>>w){default:case R:de=0,Le=1,me=ue,Ce=0,V=1,pe=z;break;case T:de=0,Le=1,me=ue,Ce=z-1,V=-1,pe=-1;break;case P:de=ue-1,Le=-1,me=-1,Ce=0,V=1,pe=z;break;case L:de=ue-1,Le=-1,me=-1,Ce=z-1,V=-1,pe=-1;break}if(q)switch(I.pixel_size){case 8:l(ee,Ce,V,pe,de,Le,me,te);break;case 16:c(ee,Ce,V,pe,de,Le,me,te);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(I.pixel_size){case 8:i(ee,Ce,V,pe,de,Le,me,te,oe);break;case 16:s(ee,Ce,V,pe,de,Le,me,te);break;case 24:o(ee,Ce,V,pe,de,Le,me,te);break;case 32:a(ee,Ce,V,pe,de,Le,me,te);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return ee}const p=0,g=1,v=2,x=3,_=9,b=10,y=11,S=48,w=4,T=0,L=1,R=2,P=3;if(e.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let F=0;const O=new Uint8Array(e),I={id_length:O[F++],colormap_type:O[F++],image_type:O[F++],colormap_index:O[F++]|O[F++]<<8,colormap_length:O[F++]|O[F++]<<8,colormap_size:O[F++],origin:[O[F++]|O[F++]<<8,O[F++]|O[F++]<<8],width:O[F++]|O[F++]<<8,height:O[F++]|O[F++]<<8,pixel_size:O[F++],flags:O[F++]};if(n(I),I.id_length+F>e.length)throw new Error("THREE.TGALoader: No data.");F+=I.id_length;let H=!1,Q=!1,q=!1;switch(I.image_type){case _:H=!0,Q=!0;break;case g:Q=!0;break;case b:H=!0;break;case v:break;case y:H=!0,q=!0;break;case x:q=!0;break}const le=new Uint8Array(I.width*I.height*4),ie=r(H,Q,I,F,O);return f(le,I.width,I.height,ie.pixel_data,ie.palettes),{data:le,width:I.width,height:I.height,flipY:!0,generateMipmaps:!0,minFilter:Bl}}}class kxe extends Ns{load(e,n,r,i){const s=this,o=s.path===""?My.extractUrlBase(e):s.path,a=new jl(s.manager);a.setPath(s.path),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,function(l){try{n(s.parse(l,o))}catch(c){i?i(c):console.error(c),s.manager.itemError(e)}},r,i)}parse(e,n){function r(W,$){const J=[],Z=W.childNodes;for(let re=0,Ye=Z.length;re0&&$.push(new mp(Z+".position",re,Ye)),Ge.length>0&&$.push(new Cp(Z+".quaternion",re,Ge)),Bt.length>0&&$.push(new mp(Z+".scale",re,Bt)),$}function H(W,$,J){let Z,re=!0,Ye,Ge;for(Ye=0,Ge=W.length;Ye=0;){const Z=W[$];if(Z.value[J]!==null)return Z;$--}return null}function le(W,$,J){for(;$>>0)+2);switch(J=J.toLowerCase(),J){case"tga":$=bf;break;default:$=ju}return $}function at(W){const $=We(W.url),J=$.profile.technique;let Z;switch(J.type){case"phong":case"blinn":Z=new E2;break;case"lambert":Z=new yP;break;default:Z=new pl;break}Z.name=W.name||"";function re(Tt,Lt=null){const qt=$.profile.samplers[Tt.id];let _t=null;if(qt!==void 0){const Pt=$.profile.surfaces[qt.source];_t=je(Pt.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),_t=je(Tt.id);if(_t!==null){const Pt=pt(_t);if(Pt!==void 0){const Ht=Pt.load(_t),ln=Tt.extra;if(ln!==void 0&&ln.technique!==void 0&&c(ln.technique)===!1){const Yt=ln.technique;Ht.wrapS=Yt.wrapU?wu:Uo,Ht.wrapT=Yt.wrapV?wu:Uo,Ht.offset.set(Yt.offsetU||0,Yt.offsetV||0),Ht.repeat.set(Yt.repeatU||1,Yt.repeatV||1)}else Ht.wrapS=wu,Ht.wrapT=wu;return Lt!==null&&(Ht.colorSpace=Lt),Ht}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",_t),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",Tt.id),null}const Ye=J.parameters;for(const Tt in Ye){const Lt=Ye[Tt];switch(Tt){case"diffuse":Lt.color&&Z.color.fromArray(Lt.color),Lt.texture&&(Z.map=re(Lt.texture,ho));break;case"specular":Lt.color&&Z.specular&&Z.specular.fromArray(Lt.color),Lt.texture&&(Z.specularMap=re(Lt.texture));break;case"bump":Lt.texture&&(Z.normalMap=re(Lt.texture));break;case"ambient":Lt.texture&&(Z.lightMap=re(Lt.texture,ho));break;case"shininess":Lt.float&&Z.shininess&&(Z.shininess=Lt.float);break;case"emission":Lt.color&&Z.emissive&&Z.emissive.fromArray(Lt.color),Lt.texture&&(Z.emissiveMap=re(Lt.texture,ho));break}}Z.color.convertSRGBToLinear(),Z.specular&&Z.specular.convertSRGBToLinear(),Z.emissive&&Z.emissive.convertSRGBToLinear();let Ge=Ye.transparent,Bt=Ye.transparency;if(Bt===void 0&&Ge&&(Bt={float:1}),Ge===void 0&&Bt&&(Ge={opaque:"A_ONE",data:{color:[1,1,1,1]}}),Ge&&Bt)if(Ge.data.texture)Z.transparent=!0;else{const Tt=Ge.data.color;switch(Ge.opaque){case"A_ONE":Z.opacity=Tt[3]*Bt.float;break;case"RGB_ZERO":Z.opacity=1-Tt[0]*Bt.float;break;case"A_ZERO":Z.opacity=1-Tt[3]*Bt.float;break;case"RGB_ONE":Z.opacity=Tt[0]*Bt.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',Ge.opaque)}Z.opacity<1&&(Z.transparent=!0)}if(J.extra!==void 0&&J.extra.technique!==void 0){const Tt=J.extra.technique;for(const Lt in Tt){const qt=Tt[Lt];switch(Lt){case"double_sided":Z.side=qt===1?Do:Dc;break;case"bump":Z.normalMap=re(qt.texture),Z.normalScale=new ct(1,1);break}}}return Z}function Ie(W){return _(sn.materials[W],at)}function ge(W){const $={name:W.getAttribute("name")};for(let J=0,Z=W.childNodes.length;J0?Ge+Tt:Ge;$.inputs[Lt]={id:Ye,offset:Bt},$.stride=Math.max($.stride,Bt+1),Ge==="TEXCOORD"&&($.hasUV=!0);break;case"vcount":$.vcount=o(re.textContent);break;case"p":$.p=o(re.textContent);break}}return $}function vn(W){const $={};for(let J=0;J0&&$0&&_t.setAttribute("position",new Ut(re.array,re.stride)),Ye.array.length>0&&_t.setAttribute("normal",new Ut(Ye.array,Ye.stride)),Tt.array.length>0&&_t.setAttribute("color",new Ut(Tt.array,Tt.stride)),Ge.array.length>0&&_t.setAttribute("uv",new Ut(Ge.array,Ge.stride)),Bt.array.length>0&&_t.setAttribute("uv1",new Ut(Bt.array,Bt.stride)),Lt.array.length>0&&_t.setAttribute("skinIndex",new Ut(Lt.array,Lt.stride)),qt.array.length>0&&_t.setAttribute("skinWeight",new Ut(qt.array,qt.stride)),Z.data=_t,Z.type=W[0].type,Z.materialKeys=Pt,Z}function Nn(W,$,J,Z,re=!1){const Ye=W.p,Ge=W.stride,Bt=W.vcount;function Tt(_t){let Pt=Ye[_t+J]*qt;const Ht=Pt+qt;for(;Pt4)for(let Yt=1,Ir=ln-2;Yt<=Ir;Yt++){const nr=_t+Ge*0,Rn=_t+Ge*Yt,tn=_t+Ge*(Yt+1);Tt(nr),Tt(Rn),Tt(tn)}_t+=Ge*ln}}else for(let _t=0,Pt=Ye.length;_t=$.limits.max&&($.static=!0),$.middlePosition=($.limits.min+$.limits.max)/2,$}function Rr(W){const $={sid:W.getAttribute("sid"),name:W.getAttribute("name")||"",attachments:[],transforms:[]};for(let J=0;JHt.limits.max||_t{const o=_f(Lxe,t);return C.jsxs("mesh",{position:n,rotation:r,scale:i,...s,children:[C.jsx(Zt.Suspense,{fallback:null,children:C.jsx("primitive",{object:o,attach:"geometry"})}),e]})},MB=({path:t,children:e,position:n=new K,rotation:r=new ns,scale:i=new K(1,1,1),...s})=>{const o=_f(kxe,t);return C.jsxs("mesh",{position:n,rotation:r,scale:i,...s,children:[C.jsx(Zt.Suspense,{fallback:null,children:C.jsx("primitive",{object:o,attach:"geometry"})}),e]})};var Oxe={VITE_MODULAR_BASE_PATH:"",VITE_MODULAR_BASE_MESH_PATH:"",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};function Nxe(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var s;const o=l=>l===null?null:JSON.parse(l,e==null?void 0:e.reviver),a=(s=n.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>n.setItem(i,JSON.stringify(s,e==null?void 0:e.replacer)),removeItem:i=>n.removeItem(i)}}const Ey=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return Ey(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Ey(r)(n)}}}},Dxe=(t,e)=>(n,r,i)=>{let s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:b=>b,version:0,merge:(b,y)=>({...y,...b}),...e},o=!1;const a=new Set,l=new Set;let c;try{c=s.getStorage()}catch{}if(!c)return t((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...b)},r,i);const f=Ey(s.serialize),p=()=>{const b=s.partialize({...r()});let y;const S=f({state:b,version:s.version}).then(w=>c.setItem(s.name,w)).catch(w=>{y=w});if(y)throw y;return S},g=i.setState;i.setState=(b,y)=>{g(b,y),p()};const v=t((...b)=>{n(...b),p()},r,i);let x;const _=()=>{var b;if(!c)return;o=!1,a.forEach(S=>S(r()));const y=((b=s.onRehydrateStorage)==null?void 0:b.call(s,r()))||void 0;return Ey(c.getItem.bind(c))(s.name).then(S=>{if(S)return s.deserialize(S)}).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==s.version){if(s.migrate)return s.migrate(S.state,S.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return S.state}).then(S=>{var w;return x=s.merge(S,(w=r())!=null?w:v),n(x,!0),p()}).then(()=>{y==null||y(x,void 0),o=!0,l.forEach(S=>S(x))}).catch(S=>{y==null||y(void 0,S)})};return i.persist={setOptions:b=>{s={...s,...b},b.getStorage&&(c=b.getStorage())},clearStorage:()=>{c==null||c.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>_(),hasHydrated:()=>o,onHydrate:b=>(a.add(b),()=>{a.delete(b)}),onFinishHydration:b=>(l.add(b),()=>{l.delete(b)})},_(),x||v},Fxe=(t,e)=>(n,r,i)=>{let s={storage:Nxe(()=>localStorage),partialize:_=>_,version:0,merge:(_,b)=>({...b,..._}),...e},o=!1;const a=new Set,l=new Set;let c=s.storage;if(!c)return t((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(..._)},r,i);const f=()=>{const _=s.partialize({...r()});return c.setItem(s.name,{state:_,version:s.version})},p=i.setState;i.setState=(_,b)=>{p(_,b),f()};const g=t((..._)=>{n(..._),f()},r,i);i.getInitialState=()=>g;let v;const x=()=>{var _,b;if(!c)return;o=!1,a.forEach(S=>{var w;return S((w=r())!=null?w:g)});const y=((b=s.onRehydrateStorage)==null?void 0:b.call(s,(_=r())!=null?_:g))||void 0;return Ey(c.getItem.bind(c))(s.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==s.version){if(s.migrate)return s.migrate(S.state,S.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return S.state}).then(S=>{var w;return v=s.merge(S,(w=r())!=null?w:g),n(v,!0),f()}).then(()=>{y==null||y(v,void 0),v=r(),o=!0,l.forEach(S=>S(v))}).catch(S=>{y==null||y(void 0,S)})};return i.persist={setOptions:_=>{s={...s,..._},_.storage&&(c=_.storage)},clearStorage:()=>{c==null||c.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>x(),hasHydrated:()=>o,onHydrate:_=>(a.add(_),()=>{a.delete(_)}),onFinishHydration:_=>(l.add(_),()=>{l.delete(_)})},s.skipHydration||x(),v||g},Uxe=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((Oxe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Dxe(t,e)):Fxe(t,e),zxe=Uxe;function zl(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r3?e.i-4:e.i:Array.isArray(t)?1:UP(t)?2:zP(t)?3:0}function NA(t,e){return Eg(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Bxe(t,e){return Eg(t)===2?t.get(e):t[e]}function EB(t,e,n){var r=Eg(t);r===2?t.set(e,n):r===3?(t.delete(e),t.add(n)):t[e]=n}function Hxe(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function UP(t){return jxe&&t instanceof Map}function zP(t){return Gxe&&t instanceof Set}function Sh(t){return t.o||t.t}function BP(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=qxe(t);delete e[Ta];for(var n=WP(e),r=0;r1&&(t.set=t.add=t.clear=t.delete=$xe),Object.freeze(t),e&&Cy(t,function(n,r){return HP(r,!0)},!0)),t}function $xe(){zl(2)}function $P(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function kc(t){var e=Zxe[t];return e||zl(18,t),e}function lD(){return Ty}function sC(t,e){e&&(kc("Patches"),t.u=[],t.s=[],t.v=e)}function T2(t){DA(t),t.p.forEach(Vxe),t.p=null}function DA(t){t===Ty&&(Ty=t.l)}function cD(t){return Ty={p:[],l:Ty,h:t,m:!0,_:0}}function Vxe(t){var e=t[Ta];e.i===0||e.i===1?e.j():e.O=!0}function oC(t,e){e._=e.p.length;var n=e.p[0],r=t!==void 0&&t!==n;return e.h.g||kc("ES5").S(e,t,r),r?(n[Ta].P&&(T2(e),zl(4)),vp(t)&&(t=A2(e,t),e.l||R2(e,t)),e.u&&kc("Patches").M(n[Ta].t,t,e.u,e.s)):t=A2(e,n,[]),T2(e),e.u&&e.v(e.u,e.s),t!==CB?t:void 0}function A2(t,e,n){if($P(e))return e;var r=e[Ta];if(!r)return Cy(e,function(s,o){return uD(t,r,e,s,o,n)},!0),e;if(r.A!==t)return e;if(!r.P)return R2(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=BP(r.k):r.o;Cy(r.i===3?new Set(i):i,function(s,o){return uD(t,r,i,s,o,n)}),R2(t,i,!1),n&&t.u&&kc("Patches").R(r,n,t.u,t.s)}return r.o}function uD(t,e,n,r,i,s){if(ig(i)){var o=A2(t,i,s&&e&&e.i!==3&&!NA(e.D,r)?s.concat(r):void 0);if(EB(n,r,o),!ig(o))return;t.m=!1}if(vp(i)&&!$P(i)){if(!t.h.F&&t._<1)return;A2(t,i),e&&e.A.l||R2(t,i)}}function R2(t,e,n){n===void 0&&(n=!1),t.h.F&&t.m&&HP(e,n)}function aC(t,e){var n=t[Ta];return(n?Sh(n):t)[e]}function dD(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function FA(t){t.P||(t.P=!0,t.l&&FA(t.l))}function lC(t){t.o||(t.o=BP(t.t))}function UA(t,e,n){var r=UP(e)?kc("MapSet").N(e,n):zP(e)?kc("MapSet").T(e,n):t.g?function(i,s){var o=Array.isArray(i),a={i:o?1:0,A:s?s.A:lD(),P:!1,I:!1,D:{},l:s,t:i,k:null,o:null,j:null,C:!1},l=a,c=zA;o&&(l=[a],c=iv);var f=Proxy.revocable(l,c),p=f.revoke,g=f.proxy;return a.k=g,a.j=p,g}(e,n):kc("ES5").J(e,n);return(n?n.A:lD()).p.push(r),r}function Wxe(t){return ig(t)||zl(22,t),function e(n){if(!vp(n))return n;var r,i=n[Ta],s=Eg(n);if(i){if(!i.P&&(i.i<4||!kc("ES5").K(i)))return i.t;i.I=!0,r=fD(n,s),i.I=!1}else r=fD(n,s);return Cy(r,function(o,a){i&&Bxe(i.t,o)===a||EB(r,o,e(a))}),s===3?new Set(r):r}(t)}function fD(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return BP(t)}var hD,Ty,VP=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",jxe=typeof Map<"u",Gxe=typeof Set<"u",pD=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",CB=VP?Symbol.for("immer-nothing"):((hD={})["immer-nothing"]=!0,hD),mD=VP?Symbol.for("immer-draftable"):"__$immer_draftable",Ta=VP?Symbol.for("immer-state"):"__$immer_state",Xxe=""+Object.prototype.constructor,WP=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,qxe=Object.getOwnPropertyDescriptors||function(t){var e={};return WP(t).forEach(function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)}),e},Zxe={},zA={get:function(t,e){if(e===Ta)return t;var n=Sh(t);if(!NA(n,e))return function(i,s,o){var a,l=dD(s,o);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(i.k):void 0}(t,n,e);var r=n[e];return t.I||!vp(r)?r:r===aC(t.t,e)?(lC(t),t.o[e]=UA(t.A.h,r,t)):r},has:function(t,e){return e in Sh(t)},ownKeys:function(t){return Reflect.ownKeys(Sh(t))},set:function(t,e,n){var r=dD(Sh(t),e);if(r!=null&&r.set)return r.set.call(t.k,n),!0;if(!t.P){var i=aC(Sh(t),e),s=i==null?void 0:i[Ta];if(s&&s.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(Hxe(n,i)&&(n!==void 0||NA(t.t,e)))return!0;lC(t),FA(t)}return t.o[e]===n&&typeof n!="number"&&(n!==void 0||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return aC(t.t,e)!==void 0||e in t.t?(t.D[e]=!1,lC(t),FA(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=Sh(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty:function(){zl(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){zl(12)}},iv={};Cy(zA,function(t,e){iv[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),iv.deleteProperty=function(t,e){return iv.set.call(this,t,e,void 0)},iv.set=function(t,e,n){return zA.set.call(this,t[0],e,n,t[0])};var Yxe=function(){function t(n){var r=this;this.g=pD,this.F=!0,this.produce=function(i,s,o){if(typeof i=="function"&&typeof s!="function"){var a=s;s=i;var l=r;return function(_){var b=this;_===void 0&&(_=a);for(var y=arguments.length,S=Array(y>1?y-1:0),w=1;w1?f-1:0),g=1;g=0;i--){var s=r[i];if(s.path.length===0&&s.op==="replace"){n=s.value;break}}i>-1&&(r=r.slice(i+1));var o=kc("Patches").$;return ig(n)?o(n,r):this.produce(n,function(a){return o(a,r)})},t}(),Aa=new Yxe,gD=Aa.produce;Aa.produceWithPatches.bind(Aa);Aa.setAutoFreeze.bind(Aa);Aa.setUseProxies.bind(Aa);Aa.applyPatches.bind(Aa);Aa.createDraft.bind(Aa);Aa.finishDraft.bind(Aa);const vD={urdf:{showTransformControls:!0,showMainGrid:!0,showMainAxes:!1,showJointAxes:!1,showCollisions:!1,showVisuals:!0,showStats:!0},general:{showHelpButtons:!0}},sg=N9(zxe((t,e)=>({configs:vD,getConfigValue:n=>ry.get(e().configs,n),setConfigValue:(n,r)=>t(i=>gD(i,s=>{ry.set(s.configs,n,r)})),resetConfigs:()=>t(n=>gD(n,r=>{r.configs=vD}))}),{name:"modular-config"})),Kxe=({robot:t,jointMap:e,resolvePath:n})=>{const r=[...t.children],i=t.getAttribute("name")||void 0,s={},o=r.filter(c=>c.nodeName.toLowerCase()==="material").map((c,f)=>C.jsx(jP,{node:c,robot:t,resolvePath:n,materialMap:s,jointMap:e},`${i}_material_${f}`)),a=[];if(r.filter(c=>c.nodeName.toLowerCase()==="link").forEach(c=>{const f=c.getAttribute("name");t.querySelector(`child[link="${f}"]`)===null&&a.push(c)}),a.length!==1)throw Error(a.length>1?`Too Many root links for robot ${t.getAttribute("name")}`:`Root link not found for robot ${t.getAttribute("name")}`);const l=C.jsx(TB,{node:a[0],robot:t,resolvePath:n,materialMap:s,jointMap:e});return C.jsxs("group",{name:i,quaternion:Axe,children:[o,l]})},jP=({node:t,materialMap:e,key:n})=>{const r=t.getAttribute("name")||void 0;if(typeof r<"u"&&r in e)return e[r];let i;const s={name:r};[...t.children].forEach(l=>{const c=l.nodeName.toLowerCase();if(c==="color"){const f=l.getAttribute("rgba").split(/\s/g).map(p=>parseFloat(p));s.color=new It(f[0],f[1],f[2]),s.opacity=f[3],s.transparent=f[3]<1,s.depthWrite=!s.transparent}else c==="texture"&&(i=l.getAttribute("filename")??void 0)});const a=i?D.createElement(Pxe,{texture:i,...s,key:n??r}):D.createElement("meshPhongMaterial",{...s,key:n??r});return typeof r<"u"&&(e[r]=a),a},TB=({node:t,robot:e,materialMap:n,jointMap:r,resolvePath:i,key:s})=>{const o=t.getAttribute("name")||void 0,a=[...t.children];let l;return typeof o>"u"?l=a:(e.querySelectorAll(`parent[link="${o}"]`).forEach(c=>{a.push(c.parentElement)}),l=[...new Set(a)]),C.jsx("object3D",{name:o,children:l.map((c,f)=>RB(c,e,n,r,i,`${o}_child_${f}`))},s??o)},Qxe={type:"none",min:0,max:0,value:0},Jxe=({node:t,robot:e,materialMap:n,jointMap:r,resolvePath:i,key:s})=>{const o=sg(b=>b.configs.urdf.showJointAxes),a=t.getAttribute("name")||void 0,l=ry.cloneDeep(Dr(b=>a&&b.jointMap[a]?b.jointMap[a]:Qxe));PM(()=>{Dr.subscribe(b=>{a&&b.jointMap[a]&&(l.value=b.jointMap[a].value)})}),l.type=t.getAttribute("type")??l.type;const c=[],f=new K(1,0,0),p=new K,g=new sr;[...t.children].forEach(b=>{switch(b.nodeName.toLowerCase()){case"origin":{const w=Dh(b.getAttribute("xyz")),T=Dh(b.getAttribute("rpy")),L=new ns(T[0],T[1],T[2],"ZYX");p.set(w[0],w[1],w[2]),g.setFromEuler(L);break}case"axis":{const w=Dh(b.getAttribute("xyz"));f.set(w[0],w[1],w[2]),f.normalize();break}case"limit":const y=b.getAttribute("lower");l.min=y?parseFloat(y):l.min;const S=b.getAttribute("upper");l.max=S?parseFloat(S):l.max,l.value=Math.min(l.max,Math.max(l.min,l.value));break;case"child":{const w=b.getAttribute("link"),T=e.querySelector(`link[name="${w}"]`);T&&c.push(T);break}}});const v=p.clone(),x=g.clone();switch(l.type){case"fixed":{l.value=.1;break}case"continuous":case"revolute":{x.setFromAxisAngle(f,l.value).premultiply(g);break}case"prismatic":{v.addScaledVector(f,l.value);break}case"floating":case"planar":console.warn(`'${l.type}' joint not yet supported`)}const _=[...new Set(c)];return a&&(r[a]=l),C.jsxs("object3D",{name:a,position:v,quaternion:x,children:[_.map((b,y)=>RB(b,e,n,r,i,`${a}_child_${y}`)),o&&C.jsx("axesHelper",{args:[.2]})]},s??a)},AB=({node:t,robot:e,materialMap:n,jointMap:r,resolvePath:i,key:s})=>{var S,w;const o=Dr(T=>T.selected),a=Dr(T=>T.setSelected),l=((S=t.parentElement)==null?void 0:S.getAttribute("name"))||void 0,c=(l&&((w=o==null?void 0:o.meshes)==null?void 0:w.includes(l)))??!1,f=async T=>{if(T.stopPropagation(),l){const L=await Nde({params:{ids:[l]}});L.status>=400?(console.warn(`Failed to retrieve info about selected joint. Received resonse: ${L.status}`),a(void 0)):a(ry.isEqual(L.data,o)?void 0:L.data)}},p=[...t.children],g=[],v=c?[C.jsx(Ixe,{})]:[],x=[],_=new K,b=new ns,y=new K(1,1,1);return p.forEach((T,L)=>{switch(T.nodeName.toLowerCase()){case"origin":{const R=Dh(T.getAttribute("xyz")),P=Dh(T.getAttribute("rpy"));_.set(R[0],R[1],R[2]),b.set(P[0],P[1],P[2],"ZYX");break}case"material":{if(!c){const R=C.jsx(jP,{node:T,robot:e,resolvePath:i,materialMap:n,jointMap:r},`${l}_visual_material_${L}`);R&&v.push(R)}break}case"geometry":{g.push(T);break}}}),g.forEach((T,L)=>{const R=T.firstElementChild,P=R.nodeName.toLowerCase();if(P==="mesh"){const F=R.getAttribute("filename");if(F){const O=i(F);if(O){const I=R.getAttribute("scale");if(I){const H=Dh(I);y.set(H[0],H[1],H[2])}O.endsWith(".stl")?x.push(C.jsx(wB,{path:O,scale:y,position:_,rotation:b,onClick:f,children:v},`${l}_visual_${L}`)):O.endsWith(".dae")?x.push(C.jsx(MB,{path:O,scale:y,position:_,rotation:b,onClick:f,children:v},`${l}_visual_${L}`)):console.warn(`URDFLoader: Could not load model at ${O}. +No loader available`)}}}else{let F;if(P==="box"){F=new po(1,1,1);const O=Dh(R.getAttribute("size"));y.set(O[0],O[1],O[2])}else if(P==="sphere"){F=new Mp(1,30,30);const O=parseFloat(R.getAttribute("radius")||"0");y.set(O,O,O)}else if(P==="cylinder"){F=new xs(1,1,1,30);const O=parseFloat(R.getAttribute("radius")||"0"),I=parseFloat(R.getAttribute("length")||"0");y.set(O,I,O),b.set(Math.PI/2,0,0)}x.push(C.jsx("mesh",{scale:y,geometry:F,position:_,rotation:b,onClick:f,children:v},`${l}_visual_${L}`))}}),C.jsx("group",{children:x},s??`${l}_group`)},e_e=t=>sg(n=>n.configs.urdf.showVisuals)?C.jsx(AB,{...t}):null,t_e=t=>sg(n=>n.configs.urdf.showCollisions)?C.jsx(AB,{...t}):null,RB=(t,e,n,r,i,s)=>{switch(t.nodeName.toLowerCase()){case"material":return C.jsx(jP,{node:t,robot:e,resolvePath:i,materialMap:n,jointMap:r},s);case"link":return C.jsx(TB,{node:t,robot:e,resolvePath:i,materialMap:n,jointMap:r},s);case"joint":return C.jsx(Jxe,{node:t,robot:e,resolvePath:i,materialMap:n,jointMap:r},s);case"visual":return C.jsx(e_e,{node:t,robot:e,resolvePath:i,materialMap:n,jointMap:r},s);case"collision":return C.jsx(t_e,{node:t,robot:e,resolvePath:i,materialMap:n,jointMap:r},s);default:return null}};class n_e{constructor(e){io(this,"manager");io(this,"fetchOptions");io(this,"workingPath");io(this,"parseVisual");io(this,"parseCollision");io(this,"packages");io(this,"defaultMeshLoader",(e,n,r)=>{/\.stl$/i.test(e)?r(C.jsx(wB,{path:e})):/\.dae$/i.test(e)?r(C.jsx(MB,{path:e})):console.warn(`URDFLoader: Could not load model at ${e}. +No loader available`)});io(this,"crossOrigin","anonymous");io(this,"withCredentials",!1);io(this,"path","");io(this,"resourcePath","");io(this,"requestHeader",{});io(this,"onMeshLoad",(e,n)=>{});io(this,"loadMeshCb",(e,n,r)=>{this.defaultMeshLoader(e,n,(i,s)=>{r(i,s),this.onMeshLoad(i,s)})});this.manager=e||Oh,this.parseVisual=!0,this.parseCollision=!1,this.packages="",this.workingPath="",this.fetchOptions={}}parse(e){const n={};let r;e instanceof Document?r=[...e.children]:e instanceof Element?r=[e]:r=[...new DOMParser().parseFromString(e,"text/xml").children];const i=r.filter(o=>o.nodeName==="robot").pop();if(typeof i>"u")throw new Error("No robot found");return C.jsx(Kxe,{robot:i,jointMap:n,resolvePath:o=>Rxe(this.packages,this.workingPath,o)})}load(e,n,r,i){const s=this.manager,o=My.extractUrlBase(e),a=this.manager.resolveURL(e);s.itemStart(a),Yn.get(a,{onDownloadProgress:l=>{typeof r<"u"&&r(l.event)}}).catch(function(l){let c;l.response?c=`URDFLoader: Failed to load url '${a}' with error code ${l.response.status} : ${l.response.statusText}.`:l.request?c=`URDFLoader: Failed to load url '${a}' with error: ${l.request}.`:c=`URDFLoader: Failed to load url '${a}' with error: ${l.message}.`,console.warn(c),s.itemError(a),s.itemEnd(a)}).then(l=>{if(l){const c=l.data;this.workingPath===""&&(this.workingPath=o);const f=this.parse(c);n(f)}s.itemEnd(a)}).catch(l=>{i?i(l):console.error("URDFLoader: Error loading file.",l),s.itemError(a),s.itemEnd(a)})}loadAsync(e,n){return new Promise((r,i)=>{this.load(e,s=>{r(s)},n,()=>i())})}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}function r_e(){const{progress:t}=lxe();return C.jsx(SB,{center:!0,children:C.jsx(ka,{value:t})})}const yD=Zt.memo(({meshId:t})=>{console.info(`[${t}] rendering robot`);const e=_f(n_e,`${Es}/model/urdf?id=${t}`);return C.jsx(qye,{FallbackComponent:({error:n})=>C.jsxs(SB,{center:!0,children:[C.jsx(mr,{color:"error",width:"50vw",variant:"h3",children:"URDF Model Error:"}),C.jsx(mr,{color:"error",width:"50vw",variant:"h4",children:n.message})]}),children:C.jsx(Zt.Suspense,{fallback:C.jsx(r_e,{}),children:e})})}),PB=lt(IR)({'& .MuiSlider-markLabel[data-index="0"]':{transform:"translateX(0%)"},'& .MuiSlider-markLabel[data-index="1"]':{transform:"translateX(-100%)"}}),i_e=(t,e,n)=>tn?n:t,s_e=t=>C.jsxs(_o,{component:"div",sx:{flex:1},children:[C.jsx(mr,{variant:"h4",id:`offset-${t.entryName}-input-title`,"aria-label":`offset-${t.entryName}-input-title`,sx:{mt:1,mb:1},children:t.label}),C.jsx(Xw,{sx:{minWidth:80},size:"small",children:C.jsxs(yg,{select:!0,fullWidth:!0,value:t.value??"",name:`offset-${t.entryName}-input`,disabled:t.disabled,onChange:e=>{e.stopPropagation(),t.setValue(t.entryName,e.target.value)},variant:"outlined",inputProps:{"aria-label":`offset-${t.entryName}-input`},children:[C.jsx(ty,{value:"",children:C.jsx("em",{children:"None"})}),t.options.map((e,n)=>C.jsx(ty,{value:e.value,children:e.label},n))]})})]}),o_e=t=>{if(t.options.length<=0)throw new Error(`No options provided for ${t.entryName}`);const e=(o,a)=>{o.stopPropagation(),t.setValue(t.entryName,typeof a=="number"?a:a[0])},n=t.options.map(o=>o.value),r=Math.min(...n),i=Math.max(...n);function s(o){return t.options.findIndex(a=>a.value===o)+1}return C.jsxs(_o,{component:"div",children:[C.jsx(mr,{variant:"h4",id:`offset-${t.entryName}-input-title`,"aria-label":`offset-${t.entryName}-input-title`,sx:{mt:1,mb:1},children:t.label}),C.jsx(Xw,{sx:{minWidth:80},size:"small",children:C.jsxs(yg,{select:!0,fullWidth:!0,value:t.value??"",name:`offset-${t.entryName}-input`,disabled:t.disabled,onChange:o=>{o.stopPropagation(),t.setValue(t.entryName,o.target.value)},variant:"outlined",inputProps:{"aria-label":`offset-${t.entryName}-input`},children:[C.jsx(ty,{value:"",children:C.jsx("em",{children:"None"})}),t.options.map((o,a)=>C.jsx(ty,{value:o.value,children:o.label},a))]})}),C.jsx(PB,{min:r,max:i,value:Number.isFinite(t.value)?t.value:t.options.at(0).value,onChange:e,valueLabelFormat:s,id:`offset-${t.entryName}-input-slider`,"aria-label":`offset-${t.entryName}-input-slider`,marks:t.options,step:null})]})},a_e=t=>{var i;const[e,n]=Zt.useState(((i=t.value)==null?void 0:i.toString())??""),r=()=>{var s;e!==((s=t.value)==null?void 0:s.toString())&&t.setValue(t.entryName,Number(e))};return Zt.useEffect(()=>{var s;return n(((s=t.value)==null?void 0:s.toString())??"")},[t.value]),C.jsxs(_o,{component:"div",sx:{flex:1},children:[C.jsx(mr,{variant:"h4",id:`offset-${t.entryName}-input-title`,"aria-label":`offset-${t.entryName}-input-title`,sx:{mt:1,mb:1},children:t.label}),C.jsx(yg,{value:e??"",id:`offset-${t.entryName}-input`,onChange:s=>n(s.target.value),onBlur:r,inputProps:{"aria-label":`offset-${t.entryName}-input`,inputMode:"numeric",pattern:"[0-9]*"},disabled:t.disabled,variant:"outlined",size:"small",fullWidth:!0})]})},l_e=t=>{const e=(r,i)=>{t.setValue(t.entryName,typeof i=="number"?i:i[0])},n=r=>{r.target.value!==""&&t.setValue(t.entryName,i_e(Number(r.target.value),t.min,t.max))};return C.jsxs(_o,{component:"div",children:[C.jsx(mr,{variant:"h4",id:`offset-${t.entryName}-input-title`,"aria-label":`offset-${t.entryName}-input-title`,sx:{mt:1,mb:1},children:t.label}),C.jsx(yg,{fullWidth:!0,value:t.value,size:"small",id:`offset-${t.entryName}-input`,name:`offset-${t.entryName}-input`,onChange:n,inputProps:{"aria-label":`offset-${t.entryName}-input`,inputMode:"numeric",pattern:"[0-9]*",min:t.min,max:t.max},disabled:t.disabled}),C.jsx(PB,{id:`offset-${t.entryName}-input-slider`,"aria-label":`offset-${t.entryName}-input-slider`,value:Number.isFinite(t.value)?t.value:0,min:t.min,max:t.max,marks:[{value:t.min,label:t.minLabel??t.min.toPrecision(2)},{value:t.max,label:t.maxLabel??t.max.toPrecision(2)}],onChange:e,disabled:t.disabled,step:.01})]})},IB=({offsetValues:t,offsetsRanges:e,setOffsetEntry:n})=>Object.keys(e).length===0?null:C.jsxs(_o,{component:"div",children:[C.jsx(mr,{variant:"h3",id:"offset_slider","aria-label":"offset-slider-title",sx:{mt:1,mb:1},children:"Offset"}),C.jsxs(bp,{direction:"row",justifyContent:"stretch",alignItems:"stretch",spacing:2,children:[e.x&&C.jsx(uC,{label:"x",entryName:"px",value:t.px,setValue:n,options:e.x}),e.y&&C.jsx(uC,{label:"y",entryName:"py",value:t.py,setValue:n,options:e.y}),e.z&&C.jsx(uC,{label:"z",entryName:"pz",value:t.pz,setValue:n,options:e.z})]}),e.roll&&C.jsx(cC,{label:"roll",entryName:"rx",value:t.rx,setValue:n,options:e.roll}),e.pitch&&C.jsx(cC,{label:"pitch",entryName:"ry",value:t.ry,setValue:n,options:e.pitch}),e.yaw&&C.jsx(cC,{label:"yaw",entryName:"rz",value:t.rz,setValue:n,options:e.yaw})]}),cC=t=>t.options.length>0?C.jsx(o_e,{...t}):C.jsx(l_e,{...t,min:-Math.PI,max:Math.PI,minLabel:"-π",maxLabel:"π"}),uC=t=>t.options.length>0?C.jsx(s_e,{...t}):C.jsx(a_e,{...t}),c_e=t=>{const e=sg(r=>r.setConfigValue),n=sg(r=>r.configs);return C.jsxs(HA,{...t,children:[C.jsx(mr,{variant:"h2",children:"About"}),C.jsx(P_e,{}),C.jsx(mr,{variant:"h2",gutterBottom:!0,children:"Settings"}),C.jsxs(TR,{dense:!0,children:[C.jsxs(mc,{children:[C.jsx(gc,{primary:"Transform Controls"}),C.jsx(kl,{edge:"end",color:"primary",checked:n.urdf.showTransformControls,onChange:()=>e(["urdf","showTransformControls"],!n.urdf.showTransformControls),inputProps:{"aria-label":"config-urdf-showTransformControls-switch"}})]}),C.jsxs(mc,{children:[C.jsx(gc,{primary:"Main Grid"}),C.jsx(kl,{edge:"end",color:"primary",checked:n.urdf.showMainGrid,onChange:()=>e(["urdf","showMainGrid"],!n.urdf.showMainGrid),inputProps:{"aria-label":"config-urdf-showMainGrid-switch"}})]}),C.jsxs(mc,{children:[C.jsx(gc,{primary:"Main Axes"}),C.jsx(kl,{edge:"end",color:"primary",checked:n.urdf.showMainAxes,onChange:()=>e(["urdf","showMainAxes"],!n.urdf.showMainAxes),inputProps:{"aria-label":"config-urdf-showMainAxes-switch"}})]}),C.jsxs(mc,{children:[C.jsx(gc,{primary:"Joint Axes"}),C.jsx(kl,{edge:"end",color:"primary",checked:n.urdf.showJointAxes,onChange:()=>e(["urdf","showJointAxes"],!n.urdf.showJointAxes),inputProps:{"aria-label":"config-urdf-showJointAxes-switch"}})]}),C.jsxs(mc,{children:[C.jsx(gc,{primary:"Show Collision Meshes"}),C.jsx(kl,{edge:"end",color:"primary",checked:n.urdf.showCollisions,onChange:()=>e(["urdf","showCollisions"],!n.urdf.showCollisions),inputProps:{"aria-label":"config-urdf-showCollisions-switch"}})]}),C.jsxs(mc,{children:[C.jsx(gc,{primary:"Show Visual Meshes"}),C.jsx(kl,{edge:"end",color:"primary",checked:n.urdf.showVisuals,onChange:()=>e(["urdf","showVisuals"],!n.urdf.showVisuals),inputProps:{"aria-label":"config-urdf-showVisuals-switch"}})]}),C.jsxs(mc,{children:[C.jsx(gc,{primary:"Show Stats"}),C.jsx(kl,{edge:"end",color:"primary",checked:n.urdf.showStats,onChange:()=>e(["urdf","showStats"],!n.urdf.showStats),inputProps:{"aria-label":"config-urdf-showStats-switch"}})]}),C.jsxs(mc,{children:[C.jsx(gc,{primary:"Show Help Buttons"}),C.jsx(kl,{edge:"end",color:"primary",checked:n.general.showHelpButtons,onChange:()=>e(["general","showHelpButtons"],!n.general.showHelpButtons),inputProps:{"aria-label":"config-general-showHelpButtons-switch"}})]})]})]})};var GP={},u_e=pf;Object.defineProperty(GP,"__esModule",{value:!0});var LB=GP.default=void 0,d_e=u_e(_g()),xD=C;LB=GP.default=(0,d_e.default)([(0,xD.jsx)("path",{d:"m22 20.59-4.69-4.69C18.37 14.55 19 12.85 19 11c0-4.42-3.58-8-8-8-4.08 0-7.44 3.05-7.93 7h2.02C5.57 7.17 8.03 5 11 5c3.31 0 6 2.69 6 6s-2.69 6-6 6c-2.42 0-4.5-1.44-5.45-3.5H3.4C4.45 16.69 7.46 19 11 19c1.85 0 3.55-.63 4.9-1.69L20.59 22z"},"0"),(0,xD.jsx)("path",{d:"M8.43 9.69 9.65 15h1.64l1.26-3.78.95 2.28h2V12h-1l-1.25-3h-1.54l-1.12 3.37L9.35 7H7.7l-1.25 4H1v1.5h6.55z"},"1")],"Troubleshoot");const BA=lt(_o)(({theme:t})=>({background:t.palette.background.paper,borderColor:t.palette.divider,borderStyle:"solid",borderRadius:"28px",borderWidth:t.spacing(.25),padding:0,margin:0})),dC=lt(dle)(({theme:t})=>({paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:t.spacing(1),border:"none"})),_D=t=>C.jsxs(bp,{direction:"row",columnGap:.5,p:0,pr:2,alignItems:"center",children:[C.jsx(BA,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderStyle:"none",margin:0,height:"45.1px",width:"45.1px"},children:t.isLoading?C.jsx(ka,{size:27.5,color:"inherit"}):C.jsx(LB,{})}),C.jsx(mr,{variant:"h2",ml:1,children:"Stats"})]}),f_e=()=>{var e;const t=Ode();return t.isError?C.jsxs(BA,{children:[C.jsx(_D,{}),C.jsxs(mr,{p:1.5,children:["Failed to get model stats.",C.jsx("br",{}),"Error ",t.error.code,":"," ",t.error.response&&typeof t.error.response.data.message<"u"?t.error.response.data.message:(e=t.error.response)==null?void 0:e.statusText,"."]})]}):C.jsxs(BA,{children:[C.jsx(_D,{isLoading:t.status==="pending"}),t.data&&C.jsx(Zae,{size:"small","aria-label":"stats table",children:C.jsx(rle,{children:Object.entries(t.data).map(([n,r])=>C.jsxs(_le,{children:[C.jsxs(dC,{align:"left","aria-label":`${n} stat label`,children:[r.label,":"]}),C.jsx(dC,{align:"right","aria-label":`${n} stat value`,children:r.value}),C.jsx(dC,{align:"left","aria-label":`${n} stat unit`,children:r.unit})]},n))})})]})},h_e=lt(bp)(({theme:t})=>({background:t.palette.background.paper,borderColor:t.palette.divider,height:"45.1px",width:"fit-content",overflow:"hidden",borderRadius:"28px",borderStyle:"solid",borderWidth:t.spacing(.125),marginTop:t.spacing(.125)})),fC=({href:t,icon:e,title:n,fontSize:r,...i})=>C.jsx(Au,{arrow:!0,title:n,children:C.jsx(Vu,{onClick:s=>{s.stopPropagation(),window.open(t,"_blank")},disableRipple:!0,...i,children:C.jsx(e,{fontSize:r})})}),p_e=()=>{const[t,e]=D.useState(!1);return C.jsxs(h_e,{direction:"row",children:[C.jsx(Vu,{onClick:()=>e(!t),sx:n=>({borderColor:n.palette.divider,borderStyle:"solid",borderWidth:1}),children:t?C.jsx(Qle,{"aria-label":"Close Help Tray"}):C.jsx(rce,{"aria-label":"Open Help Tray"})}),C.jsxs(hJ,{in:t,orientation:"horizontal","aria-label":"Help Tray Links",unmountOnExit:!0,children:[C.jsx(fC,{title:"Documentation",href:"https://github.com/ADVRHumanoids/modular_hhcm",icon:tce}),C.jsx(fC,{title:"Feedback",href:"https://github.com/ADVRHumanoids/modular_hhcm/issues",icon:ece}),C.jsx(fC,{title:"Report a Bug",href:"https://github.com/ADVRHumanoids/modular_hhcm/issues",icon:Kle})]})]})},m_e=t=>{const e=Dr(o=>Object.keys(o.jointMap)),n=Dr(o=>o.setMeshId),[r,i]=Zt.useState(!1),s=o=>{i(!1),o&&n()};return C.jsxs(C.Fragment,{children:[C.jsx(Au,{title:"Deploy robot",children:C.jsx("span",{style:{marginLeft:"auto"},children:C.jsx(Vu,{...t,onClick:()=>i(!0),disabled:t.disabled||e.length===0,"aria-label":"deploy-button",disableRipple:!0,children:C.jsx(H9,{})})})}),r&&C.jsx(afe,{open:r,onClose:s})]})};var XP={},g_e=pf;Object.defineProperty(XP,"__esModule",{value:!0});var kB=XP.default=void 0,v_e=g_e(_g()),y_e=C;kB=XP.default=(0,v_e.default)((0,y_e.jsx)("path",{d:"M7.5 5.6 10 7 8.6 4.5 10 2 7.5 3.4 5 2l1.4 2.5L5 7zm12 9.8L17 14l1.4 2.5L17 19l2.5-1.4L22 19l-1.4-2.5L22 14zM22 2l-2.5 1.4L17 2l1.4 2.5L17 7l2.5-1.4L22 7l-1.4-2.5zm-7.63 5.29a.9959.9959 0 0 0-1.41 0L1.29 18.96c-.39.39-.39 1.02 0 1.41l2.34 2.34c.39.39 1.02.39 1.41 0L16.7 11.05c.39-.39.39-1.02 0-1.41zm-1.03 5.49-2.12-2.12 2.44-2.44 2.12 2.12z"}),"AutoFixHigh");const x_e=t=>{const e=Hde(),n=Rde();return C.jsxs(C.Fragment,{children:[C.jsx(Au,{title:"Generate model from connected robot",children:C.jsx("span",{children:C.jsx(Vu,{...t,disabled:t.disabled||n.isPending||!e.data,onClick:()=>n.mutate(void 0),"aria-label":"generate-button",disableRipple:!0,children:C.jsx(kB,{})})})}),n.isPending&&C.jsx(Uc,{open:!0,"aria-label":"loading-screen",children:C.jsx(ka,{})})]})};var qP={},__e=pf;Object.defineProperty(qP,"__esModule",{value:!0});var OB=qP.default=void 0,b_e=__e(_g()),S_e=C;OB=qP.default=(0,b_e.default)((0,S_e.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit");const w_e=t=>{const e=Dr(s=>Object.keys(s.jointMap)),n=Dr(s=>{var o;return(o=s.selected)==null?void 0:o.id}),[r,i]=Zt.useState(!1);return C.jsxs(C.Fragment,{children:[C.jsx(Au,{title:"Edit Module",children:C.jsx("span",{children:C.jsx(Vu,{...t,onClick:()=>i(!0),disabled:t.disabled||e.length===0||typeof n>"u","aria-label":"edit-button",disableRipple:!0,children:C.jsx(OB,{})})})}),r&&C.jsx(sfe,{open:r,onClose:()=>i(!1)})]})};lt(IR)({'& .MuiSlider-markLabel[data-index="0"]':{transform:"translateX(0%)"},'& .MuiSlider-markLabel[data-index="1"]':{transform:"translateX(-100%)"}});const M_e=lt(qw)(()=>({width:"60px"})),E_e=lt(_o)(({theme:t})=>({background:t.palette.background.paper,borderColor:t.palette.background.default,borderStyle:"solid",borderWidth:2,borderRadius:10,paddingRight:10,paddingLeft:10,paddingTop:4,marginTop:2,width:250})),C_e=lt(IR)({'& .MuiSlider-markLabel[data-index="0"]':{transform:"translateX(0%)"},'& .MuiSlider-markLabel[data-index="1"]':{transform:"translateX(-100%)"}}),bD=(t,e,n)=>tn?n:t,T_e=({name:t,value:e,setValue:n,min:r,max:i,icon:s})=>{const[o,a]=D.useState(e.toString()),l=(p,g)=>{n(typeof g=="number"?g:g[0]),a(typeof g=="number"?g.toString():g[0].toString())},c=p=>{p.target.value!==""&&n(bD(Number(p.target.value),r,i)),a(p.target.value)},f=()=>a(bD(e,r,i).toString());return C.jsxs(E_e,{children:[C.jsxs(eb,{container:!0,spacing:1,children:[typeof s<"u"&&C.jsx(eb,{item:!0,children:s}),C.jsx(eb,{item:!0,xs:!0,children:C.jsx(mr,{id:`${t}_slider_title`,"aria-label":`${t}-slider-title`,gutterBottom:!0,children:t})}),C.jsx(eb,{item:!0,children:C.jsx(M_e,{value:o,size:"small",onChange:c,onBlur:f,inputProps:{step:.05,min:r,max:i,type:"number","aria-label":`${t}-text-input`}})})]}),C.jsx(C_e,{step:.01,min:r,max:i,marks:[{value:r,label:r.toString()},{value:i,label:i.toString()}],value:e,onChange:l,"aria-label":`${t}-slider`})]},`${t}_input_slider`)},A_e=lt(kl)(({theme:t})=>{const e=t.palette.background.default,n=t.palette.primary.dark;return{width:110,height:40,padding:1,"& .MuiSwitch-switchBase":{margin:1,padding:0,transform:"translateX(1px)","&.Mui-checked":{transform:"translateX(48px)","& .MuiSwitch-thumb:before":{backgroundImage:`url('data:image/svg+xml;utf8,')`},"& + .MuiSwitch-track":{opacity:1,backgroundColor:e,borderRadius:20/1}}},"& .MuiSwitch-thumb":{width:60,height:38,backgroundColor:n,borderRadius:20/1,"&:before":{content:"''",position:"absolute",width:"100%",height:"100%",left:0,top:0,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundImage:`url('data:image/svg+xml;utf8,')`}},"& .MuiSwitch-track":{opacity:1,backgroundColor:e,borderRadius:20/1,"&:before, &:after":{content:'""',position:"absolute",top:"50%",transform:"translateY(-50%)",width:22,height:22},"&:before":{backgroundImage:`url('data:image/svg+xml;utf8,')`,left:18},"&:after":{backgroundImage:`url('data:image/svg+xml;utf8,')`,right:18}}}}),R_e=t=>{const{enqueueSnackbar:e}=wo(),n=nM(),r=Bde();D.useEffect(()=>{var s,o,a;if(n.status==="error"){const l=n.error.response&&typeof n.error.response.data.message<"u"?`Failed to get the workspace mode. +Error ${(s=n.error.response)==null?void 0:s.status}: ${n.error.response.data.message}`:`Failed to get the workspace mode. +Error ${(o=n.error.response)==null?void 0:o.status}: ${(a=n.error.response)==null?void 0:a.statusText}.`;e(l,{variant:"error",style:{whiteSpace:"pre-line"}})}});const i=D.useMemo(()=>n.data!=="Build",[n.data]);return C.jsxs(C.Fragment,{children:[C.jsx(Au,{title:`Switch to ${i?"builder":"discover"} mode`,children:C.jsx(A_e,{...t,disabled:t.disabled||n.isLoading||r.isPending||typeof n.data>"u",checked:i,onChange:s=>r.mutate(s.target.checked?"Discover":"Build"),inputProps:{"aria-label":"modular-workspace-mode-switch"}})}),r.isPending&&C.jsx(Uc,{open:!0,"aria-label":"loading-screen",children:C.jsx(ka,{})})]})},HA=({children:t,value:e,index:n,sx:r,...i})=>e!==n?null:C.jsx("div",{role:"tabpanel",hidden:e!==n,id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,style:{padding:5,flexGrow:1,display:"flex",flexDirection:"column",height:"calc(100vh - 130px)",position:"relative",overflowY:"auto",...r},...i,children:t});function hC(t,e){return{id:`simple-tab-${t}`,style:{pointerEvents:"auto"},"aria-controls":`simple-tabpanel-${t}`,"aria-label":e}}const P_e=()=>{const t=$de();return t.isError?C.jsxs(_o,{component:"div",children:[C.jsx(mr,{children:"Failed to fetch workspace info."}),C.jsx(mr,{children:t.error.message})]}):t.isLoading||typeof t.data>"u"?C.jsx(_o,{component:"div",display:"flex",alignItems:"center",justifyContent:"center",children:C.jsx(ka,{})}):C.jsxs(TR,{dense:!0,children:[C.jsxs(mc,{"aria-label":"frontend version",children:[C.jsx(gk,{children:C.jsx(nce,{})}),C.jsx(gc,{primary:"Frontend:",secondary:t.data.frontend_version??"Unknown"})]}),C.jsxs(mc,{"aria-label":"backend version",children:[C.jsx(gk,{children:C.jsx(sce,{})}),C.jsx(gc,{primary:"Backend:",secondary:t.data.backend_version??"Unknown"})]})]})};bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M15.1,12A3.1,3.1,0,1,0,12,15.1,3.1415,3.1415,0,0,0,15.1,12ZM9.9,12A2.1,2.1,0,1,1,12,14.1,2.155,2.155,0,0,1,9.9,12Z"}),C.jsx("path",{d:"M16.0127,6.6094a.5.5,0,1,0-.625.7812A6.2114,6.2114,0,0,1,17.7,12.2a6.3047,6.3047,0,0,1-2.0391,4.5327.5.5,0,1,0,.6778.7344A7.3177,7.3177,0,0,0,18.7,12.2,7.2224,7.2224,0,0,0,16.0127,6.6094Z"}),C.jsx("path",{d:"M8.6123,7.3906a.5.5,0,1,0-.625-.7812A7.0843,7.0843,0,0,0,5.4,12.2a6.6233,6.6233,0,0,0,2.3906,5.293A.4943.4943,0,0,0,8.1,17.6a.5.5,0,0,0,.3086-.8931A5.6358,5.6358,0,0,1,6.4,12.2,6.0876,6.0876,0,0,1,8.6123,7.3906Z"}),C.jsx("path",{d:"M5.7568,18.9639a.5.5,0,1,0,.6856-.7276A8.5419,8.5419,0,0,1,3.9,12,9.05,9.05,0,0,1,6.5537,5.6533a.5.5,0,1,0-.707-.707A10.0589,10.0589,0,0,0,2.9,12,9.5409,9.5409,0,0,0,5.7568,18.9639Z"}),C.jsx("path",{d:"M18.1533,4.9463a.5.5,0,1,0-.707.707,8.9173,8.9173,0,0,1,0,12.6934.5.5,0,1,0,.707.707,9.9167,9.9167,0,0,0,0-14.1074Z"})]}),"AlertIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M12,19.9a7.9464,7.9464,0,1,0-5.5928-2.3481A7.8262,7.8262,0,0,0,12,19.9ZM12,5.1a6.9,6.9,0,1,1,0,13.8A6.9474,6.9474,0,0,1,5.1006,12,6.9072,6.9072,0,0,1,12,5.1Z"}),C.jsx("path",{d:"M9.9,14.6a.4983.4983,0,0,0,.3535-.1465l4.1992-4.2a.5.5,0,0,0-.707-.707l-4.1992,4.2A.5.5,0,0,0,9.9,14.6Z"})]}),"ErrorIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("circle",{cx:"11.9995",cy:"15.25",r:"0.5"}),C.jsx("path",{d:"M12,10.55a.5.5,0,0,0-.5.5v2.4a.5.5,0,1,0,1,0v-2.4A.5.5,0,0,0,12,10.55Z"}),C.jsx("path",{d:"M13.1318,5.6982a.4682.4682,0,0,0-.0791-.1025l-.2978-.2983a.4988.4988,0,0,0-.1309-.0948,1.2873,1.2873,0,0,0-1.7558.4956L4.292,16.9575A1.093,1.093,0,0,0,4.1,17.65,1.3519,1.3519,0,0,0,5.4,18.95H18.6a1.1062,1.1062,0,0,0,.6836-.1846,1.2067,1.2067,0,0,0,.5772-.77,1.4269,1.4269,0,0,0-.129-.9981Zm5.5957,12.2442A.6882.6882,0,0,1,18.6,17.95H5.4a.3769.3769,0,0,1-.3008-.3c0-.022,0-.0654-.0185-.0654a.0266.0266,0,0,0-.0176.0088.4875.4875,0,0,0,.0683-.0913L11.7471,6.1738a.2975.2975,0,0,1,.3681-.1015l.1856.1855,6.5517,11.2158a.4079.4079,0,0,1,.0371.28C18.8633,17.8594,18.7979,17.8921,18.7275,17.9424Z"})]}),"FailedIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M19.9,12A7.9,7.9,0,1,0,12,19.9,7.909,7.909,0,0,0,19.9,12ZM5.1,12A6.9,6.9,0,1,1,12,18.9,6.908,6.908,0,0,1,5.1,12Z"}),C.jsx("circle",{cx:"12",cy:"9.3",r:"0.5"}),C.jsx("path",{d:"M12.5,14.7V11.1a.5.5,0,0,0-1,0v3.6a.4724.4724,0,0,0,.5.5A.5357.5357,0,0,0,12.5,14.7Z"})]}),"InfoIcon");bt(C.jsx("path",{d:"M12.05,4.1A4.652,4.652,0,0,0,8.6426,5.502,4.3163,4.3163,0,0,0,7.45,8.7v2H6.25a.5.5,0,0,0-.5.5v8.2a.5.5,0,0,0,.5.5h11.5a.5.5,0,0,0,.5-.5V11.2a.5.5,0,0,0-.5-.5h-1.1v-2A4.5513,4.5513,0,0,0,12.05,4.1ZM8.45,8.6787a3.3372,3.3372,0,0,1,.915-2.4853A3.6622,3.6622,0,0,1,12.05,5.1,3.5628,3.5628,0,0,1,15.65,8.7v2H8.45ZM17.25,18.9H6.75V11.7h10.5Z"}),"LockedIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M10.625,14.4033a.5.5,0,0,0,.707,0l4-4a.5.5,0,0,0-.707-.707l-3.6465,3.6465L9.332,11.6963a.5.5,0,0,0-.707.707Z"}),C.jsx("path",{d:"M4.58,11.0918a9.4992,9.4992,0,0,0,1.1767,3.7266,11.595,11.595,0,0,0,2.6348,2.94,10.5024,10.5024,0,0,0,3.4658,1.6767.5062.5062,0,0,0,.2422,0A8.9221,8.9221,0,0,0,15.5908,17.74a9.8445,9.8445,0,0,0,2.626-2.9511,9.3988,9.3988,0,0,0,1.1553-3.6573,9.556,9.556,0,0,0-.3086-3.9033.5143.5143,0,0,0-.5059-.3789,8.8066,8.8066,0,0,1-6.2471-2.1738.5.5,0,0,0-.664,0A8.7882,8.7882,0,0,1,5.3994,6.85a.5054.5054,0,0,0-.5058.3789A12.1757,12.1757,0,0,0,4.58,11.0918ZM5.7754,7.8584h.0019a9.9258,9.9258,0,0,0,6.2012-2.1533A9.9281,9.9281,0,0,0,18.18,7.8584h.0058a8.2945,8.2945,0,0,1,.1954,3.1494,8.4648,8.4648,0,0,1-1.042,3.3027,8.8956,8.8956,0,0,1-2.3731,2.6485A7.8753,7.8753,0,0,1,11.98,18.4336,9.6531,9.6531,0,0,1,8.9912,16.959a10.59,10.59,0,0,1-2.374-2.6485,8.4783,8.4783,0,0,1-1.041-3.3017A11.1722,11.1722,0,0,1,5.7754,7.8584Z"})]}),"SafetyIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M12,4.1A7.9,7.9,0,1,0,19.9,12,7.909,7.909,0,0,0,12,4.1Zm0,14.8A6.9,6.9,0,1,1,18.9,12,6.908,6.908,0,0,1,12,18.9Z"}),C.jsx("path",{d:"M14.6465,9.5464,10.8,13.3931,9.4531,12.0464a.5.5,0,1,0-.707.707l1.7,1.7a.5.5,0,0,0,.707,0l4.2-4.2a.5.5,0,1,0-.707-.707Z"})]}),"SuccessIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M12.3535,4.2466a.5.5,0,0,0-.707,0l-7.4,7.4a.5.5,0,0,0,0,.707l7.4,7.4a.5.5,0,0,0,.707,0l7.4-7.4a.5.5,0,0,0,0-.707ZM12,18.6929,5.3066,12,12,5.3071,18.6934,12Z"}),C.jsx("circle",{cx:"12",cy:"13.8",r:"0.5"}),C.jsx("path",{d:"M11.5,9.7v2.4a.5.5,0,0,0,1,0V9.7a.5.5,0,0,0-1,0Z"})]}),"WarningIcon");bt(C.jsx("path",{d:"M1.9561,19.2432a.5.5,0,0,0,.2949.456l9.4756,4.2573a.5028.5028,0,0,0,.205.044l.0118-.0034a.4883.4883,0,0,0,.19-.0406l9.6123-4.2573a.499.499,0,0,0,.2978-.457V7.4331l0-.0017,0-.0012-.0017-.0056a.4868.4868,0,0,0-.0742-.24.4506.4506,0,0,0-.0334-.05.4947.4947,0,0,0-.1985-.1624l-.0007-.0007L16.08,4.6289V2.0332L16.084,2.02c0-.0312-.02-.0556-.0264-.0854a.4888.4888,0,0,0-.05-.1619.468.468,0,0,0-.0764-.0837.4779.4779,0,0,0-.0757-.083c-.0137-.0091-.0308-.0083-.045-.0159s-.0205-.0227-.0351-.0286L12.0947.0376a.5.5,0,0,0-.3847.001L8.0723,1.5625c-.0122.0051-.0176.0181-.0293.0242a.4465.4465,0,0,0-.0547.0188.4845.4845,0,0,0-.0972.1059.4745.4745,0,0,0-.0461.05.49.49,0,0,0-.0823.2617v2.638l-5.4995,2.31a.4924.4924,0,0,0-.1983.1634.42.42,0,0,0-.0334.05.4868.4868,0,0,0-.0737.24L1.9561,7.43l0,.0012,0,.0017Zm1-11.0476L11.4316,11.88V22.7275L2.9561,18.9194Zm9.4755,14.5358V11.8821l8.6123-3.6907V18.917ZM8.7627,5.01c0-.011,0-.0212,0-.0324V2.7856L11.4,3.9307V7.4155L8.7627,6.2305ZM12.4,3.9333l2.68-1.15V6.229l-2.68,1.19ZM11.9043,1.041l2.3906.99L11.9028,3.0576,9.54,2.0317ZM7.7627,5.7456v.8086a.5.5,0,0,0,.2949.4561L11.6943,8.644a.42.42,0,0,0,.0489.0191h.0009l.001.0005.001,0h.001c-.003.0068.0019.0009.0019.0009l.002.0005a.4869.4869,0,0,0,.1474.023h.0069a.4888.4888,0,0,0,.14-.0215l.002-.0005h.001l.0019-.001c.0088.0005.002-.0005.002-.0005l.0009,0a.48.48,0,0,0,.0518-.02l3.6787-1.6338a.4994.4994,0,0,0,.2969-.457v-.843l4.1758,1.73-8.3233,3.5669L3.7285,7.4409Z"}),"AmbientEditorMenuIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:`M8.3,23.1c0.9,0.2,1.8,0.4,2.8,0.4c5.4,0,10-4.1,10.5-9.5l0,0c0-0.2-0.1-0.4-0.2-0.5 + c-0.1-0.1-0.3-0.2-0.5-0.2h-9.3c-0.4,0-0.8-0.3-0.8-0.8V3.2c0-0.2-0.1-0.4-0.2-0.5c-0.1-0.1-0.3-0.2-0.5-0.2C4.3,3,0,8.2,0.5,14 + C1,18.3,4,22,8.3,23.1z M3.7,6.9c1.5-1.9,3.7-3.1,6.1-3.4v8.9c0,1,0.8,1.8,1.8,1.8h8.9c-0.7,5.2-5.5,8.9-10.7,8.2 + s-8.9-5.5-8.2-10.7C1.8,10,2.5,8.3,3.7,6.9z`}),C.jsx("path",{d:`M14.7,0c-0.2,0-0.4,0-0.5,0.2C14.1,0.3,14,0.5,14,0.7v8.6c0,0.4,0.3,0.7,0.7,0.7h8.6c0.2,0,0.4-0.1,0.5-0.2 + C23.9,9.7,24,9.5,24,9.3C23.5,4.4,19.6,0.5,14.7,0z M15,9V1c4.1,0.6,7.4,3.8,8,8H15z`})]}),"DashboardMenuIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M12,0A8.0092,8.0092,0,0,0,4,8,.5.5,0,0,0,5,8a7,7,0,1,1,7,7,.5.5,0,0,0,0,1A8,8,0,0,0,12,0Z"}),C.jsx("path",{d:"M12.5,23.5A2.5,2.5,0,1,0,10,21,2.5026,2.5026,0,0,0,12.5,23.5Zm0-4A1.5,1.5,0,1,1,11,21,1.5017,1.5017,0,0,1,12.5,19.5Z"})]}),"HelpMenuIcon");bt(C.jsx("path",{d:"M6.5,1a.5.5,0,0,0-.5.5V3H1.5a.5.5,0,0,0-.5.5v19a.5.5,0,0,0,.5.5h21a.5.5,0,0,0,.5-.5V3.5a.5.5,0,0,0-.5-.5H17V1.5a.5.5,0,0,0-1,0V3H7V1.5A.5.5,0,0,0,6.5,1ZM2,22V16H22v6ZM16,4V5.5a.5.5,0,0,0,1,0V4h5V15H2V4H6V5.5a.5.5,0,0,0,1,0V4Z"}),"LogMenuIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M12,16.06A4.06,4.06,0,1,0,7.94,12,4.0645,4.0645,0,0,0,12,16.06Zm0-7.12A3.06,3.06,0,1,1,8.94,12,3.0629,3.0629,0,0,1,12,8.94Z"}),C.jsx("path",{d:"M8.7939,4.9136,12,1.707l3.2061,3.2066a.5.5,0,1,0,.707-.7071l-3.56-3.56a.5146.5146,0,0,0-.707,0l-3.56,3.56a.5.5,0,1,0,.707.7071Z"}),C.jsx("path",{d:"M22.9131,11.6465l-3.56-3.56a.5.5,0,0,0-.707.7071L21.8525,12l-3.206,3.2065a.5.5,0,1,0,.707.7071l3.56-3.56A.5.5,0,0,0,22.9131,11.6465Z"}),C.jsx("path",{d:"M8.0869,19.7935l3.56,3.56a.5.5,0,0,0,.707,0l3.56-3.56a.5.5,0,0,0-.707-.7071L12,22.293,8.7939,19.0864a.5.5,0,0,0-.707.7071Z"}),C.jsx("path",{d:"M4.2061,15.9136a.5.5,0,0,0,.707-.7071L1.707,12,4.9131,8.7935a.5.5,0,0,0-.707-.7071l-3.56,3.56a.5.5,0,0,0,0,.707Z"})]}),"ManualMenuIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M1,1.5v8a.5.5,0,0,0,.5.5h8a.5.5,0,0,0,.5-.5v-8A.5.5,0,0,0,9.5,1h-8A.5.5,0,0,0,1,1.5ZM2,2H9V9H2Z"}),C.jsx("path",{d:"M1,22.5a.5.5,0,0,0,.5.5h8a.5.5,0,0,0,.5-.5v-8a.5.5,0,0,0-.5-.5h-8a.5.5,0,0,0-.5.5ZM2,15H9v7H2Z"}),C.jsx("path",{d:"M23,8.5a.5.5,0,0,0-.5-.5h-8a.5.5,0,0,0-.5.5v8a.5.5,0,0,0,.5.5h8a.5.5,0,0,0,.5-.5ZM22,16H15V9h7Z"})]}),"ProgramMenuIcon");bt(C.jsx(C.Fragment,{children:C.jsx("path",{d:"M6.2471,9,2.3564,5.1094a.5.5,0,0,0-.8046.1377,7.42,7.42,0,0,0,9.5683,10.04L17.8232,21.99a2.9858,2.9858,0,0,0,2.0928.8755,2.6781,2.6781,0,0,0,1.0352-.2055,3.0041,3.0041,0,0,0,1.8369-2.2085,2.9424,2.9424,0,0,0-.8233-2.6553L15.2881,11.12A7.4206,7.4206,0,0,0,5.2471,1.5518a.4995.4995,0,0,0-.1377.8046L9,6.2471V9ZM9.8535,5.6865,6.3467,2.1792a6.4206,6.4206,0,0,1,7.8926,8.8354.5.5,0,0,0,.0976.5689l6.9238,6.9224a1.9476,1.9476,0,0,1,.545,1.7573,2.0162,2.0162,0,0,1-1.2432,1.4751,1.905,1.905,0,0,1-2.0586-.482l-6.92-6.92a.4978.4978,0,0,0-.3535-.1465.5048.5048,0,0,0-.2159.0489A6.42,6.42,0,0,1,2.18,6.3462L5.6865,9.8535A.5.5,0,0,0,6.04,10H9.5a.5.5,0,0,0,.5-.5V6.04A.5.5,0,0,0,9.8535,5.6865Z"})}),"RobotAssemblerMenuIcon");bt(C.jsx("path",{d:"M23.41,15.4023l-9.0147-5.1608a2.5554,2.5554,0,0,0-.0908-2.5857l2.9792-2.7225a2.5983,2.5983,0,0,0,3.4007-.2443.5.5,0,0,0-.7071-.7071,1.6165,1.6165,0,0,1-2.2861-2.2861.5.5,0,0,0-.707-.707,2.6177,2.6177,0,0,0-.3775,3.209L13.6279,6.92a2.61,2.61,0,0,0-1.5605-.5234A2.6387,2.6387,0,0,0,9.4316,9.0322a2.6015,2.6015,0,0,0,.2642,1.125L.6123,15.396A.7424.7424,0,0,0,.59,16.7031l11.0625,6.3438a.74.74,0,0,0,.3916.1128.6955.6955,0,0,0,.3682-.104l10.9932-6.3492a.748.748,0,0,0,.0049-1.3042ZM12.0674,7.3965a1.636,1.636,0,1,1-1.6358,1.6347A1.6374,1.6374,0,0,1,12.0674,7.3965Zm-.0283,14.72L1.47,16.0552l8.8252-5.0889a2.6346,2.6346,0,0,0,1.2051.6358V16h-3a.5.5,0,0,0,0,1h7a.5.5,0,0,0,0-1h-3V11.6248a2.609,2.609,0,0,0,1.2644-.5926l8.7717,5.0215Z"}),"RobotBuilderMenuIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M21.5137,9.4663a1.5877,1.5877,0,0,1-.4551-.189A1.612,1.612,0,0,1,20.52,7.0659,2.6091,2.6091,0,0,0,16.9346,3.481a1.61,1.61,0,0,1-2.4014-.9956,2.6092,2.6092,0,0,0-5.0674,0,1.61,1.61,0,0,1-2.4.9946,2.6092,2.6092,0,0,0-3.584,3.5859,1.6031,1.6031,0,0,1-.3281,2.0591,1.63,1.63,0,0,1-.6689.3423,2.6092,2.6092,0,0,0,.0019,5.0669,1.5877,1.5877,0,0,1,.4551.189,1.612,1.612,0,0,1,.5391,2.2114A2.6091,2.6091,0,0,0,7.0654,20.519a1.6137,1.6137,0,0,1,.4551-.1884,1.6089,1.6089,0,0,1,1.9453,1.184,2.6092,2.6092,0,0,0,5.0674,0,1.6118,1.6118,0,0,1,.1895-.456,1.61,1.61,0,0,1,2.2109-.5391,2.6091,2.6091,0,0,0,3.585-3.584,1.6105,1.6105,0,0,1,.997-2.4028,2.6092,2.6092,0,0,0-.0019-5.0669Zm.9394,2.919a1.6068,1.6068,0,0,1-1.1758,1.1767,2.6092,2.6092,0,0,0-1.6132,3.8926,1.6094,1.6094,0,0,1-2.211,2.2109,2.6116,2.6116,0,0,0-3.8906,1.61,1.61,1.61,0,0,1-3.126.0015,2.6106,2.6106,0,0,0-2.53-1.9932,2.6267,2.6267,0,0,0-1.36.3809,1.61,1.61,0,0,1-2.2119-2.211,2.61,2.61,0,0,0-1.6094-3.8911,1.6093,1.6093,0,0,1-.001-3.125,2.638,2.638,0,0,0,1.08-.5532A2.5994,2.5994,0,0,0,4.335,6.5454,1.6095,1.6095,0,0,1,6.5459,4.334a2.6083,2.6083,0,0,0,3.585-.874,2.6089,2.6089,0,0,0,.3056-.7349v0a1.61,1.61,0,0,1,3.126-.0015,2.6093,2.6093,0,0,0,3.8916,1.6123,1.61,1.61,0,0,1,2.2119,2.211,2.61,2.61,0,0,0,1.6094,3.8911A1.6121,1.6121,0,0,1,22.4531,12.3853Z"}),C.jsx("path",{d:"M12,7.4961a4.5,4.5,0,1,0,4.5,4.5A4.5049,4.5049,0,0,0,12,7.4961Zm0,8a3.5,3.5,0,1,1,3.5-3.5A3.5042,3.5042,0,0,1,12,15.4961Z"})]}),"SettingsMenuIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M11.7715,12.6689A2.8272,2.8272,0,1,0,8.9443,9.8418,2.83,2.83,0,0,0,11.7715,12.6689Zm0-4.6543A1.8272,1.8272,0,1,1,9.9443,9.8418,1.829,1.829,0,0,1,11.7715,8.0146Z"}),C.jsx("path",{d:"M14.998,15.1787a6.4208,6.4208,0,0,0-8.7792,2.3237.5.5,0,0,0,.8652.503,5.4208,5.4208,0,0,1,9.373-.0005.5.5,0,0,0,.8653-.502A6.43,6.43,0,0,0,14.998,15.1787Z"}),C.jsx("path",{d:"M23,22.5V3.5a.5.5,0,0,0-.5-.5H17V1.5a.5.5,0,0,0-1,0V3H7V1.5a.5.5,0,0,0-1,0V3H1.5a.5.5,0,0,0-.5.5v19a.5.5,0,0,0,.5.5h21A.5.5,0,0,0,23,22.5ZM22,22H2V4H6V5.5a.5.5,0,0,0,1,0V4h9V5.5a.5.5,0,0,0,1,0V4h5Z"})]}),"UserDatabaseMenuIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M17.459,7.1924a5.54,5.54,0,1,0-5.54,5.54A5.5465,5.5465,0,0,0,17.459,7.1924Zm-10.08,0a4.54,4.54,0,1,1,4.54,4.54A4.5455,4.5455,0,0,1,7.3789,7.1924Z"}),C.jsx("path",{d:"M1.2637,21.5962a.5.5,0,0,0,.8652.5029,11.3244,11.3244,0,0,1,19.58,0,.5.5,0,0,0,.8652-.5029,12.327,12.327,0,0,0-21.31,0Z"})]}),"UserProfileMenuIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M12,4.1A7.9,7.9,0,1,0,19.9,12,7.909,7.909,0,0,0,12,4.1Zm0,14.8A6.9,6.9,0,1,1,18.9,12,6.908,6.908,0,0,1,12,18.9Z"}),C.jsx("path",{d:"M15,11.5H12.5V9a.5.5,0,0,0-1,0v2.5H9.1a.5.5,0,0,0,0,1h2.4V15a.5.5,0,0,0,1,0V12.5H15a.5.5,0,0,0,0-1Z"})]}),"AddIconA");bt(C.jsx("path",{d:"M12.55,6.8a.5.5,0,1,0-1,0v4.7H6.75a.5.5,0,0,0,0,1h4.8v4.7a.5.5,0,0,0,1,0V12.5h4.7a.5.5,0,0,0,0-1h-4.7Z"}),"AddIconB");bt(C.jsx("path",{d:"M14.6465,18.3535a.5.5,0,0,0,.707-.707L9.707,12l5.6465-5.6465a.5.5,0,0,0-.707-.707l-6,6a.5.5,0,0,0,0,.707Z"}),"ArrowLeftIconA");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M10.3,18.2a.5.5,0,0,0,.3535-.8535L5.3066,12l5.3467-5.3467a.5.5,0,1,0-.707-.707l-5.7,5.7a.5.5,0,0,0,0,.707l5.7,5.7A.4981.4981,0,0,0,10.3,18.2Z"}),C.jsx("path",{d:"M19.4,11.5H10.5a.5.5,0,0,0,0,1h8.9a.5.5,0,0,0,0-1Z"})]}),"ArrowLeftIconB");bt(C.jsx("path",{d:"M17.35,11.5H7.8574l4.8457-4.8467a.5.5,0,0,0-.707-.707l-5.6992,5.7a.5.5,0,0,0,0,.707l5.6992,5.7a.5.5,0,0,0,.707-.707L7.8574,12.5H17.35a.5.5,0,0,0,0-1Z"}),"ArrowLeftIconC");bt(C.jsx(C.Fragment,{children:C.jsx("path",{d:"M8.6465,18.3537a.5.5,0,0,0,.707,0l6-6a.5.5,0,0,0,0-.707l-6-6a.5.5,0,1,0-.707.707L14.293,12,8.6465,17.6467A.5.5,0,0,0,8.6465,18.3537Z"})}),"ArrowRightIconA");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M14.0537,5.9465a.5.5,0,1,0-.707.707L18.6934,12l-5.3467,5.3466a.5.5,0,1,0,.707.7071l5.7-5.7a.5.5,0,0,0,0-.707Z"}),C.jsx("path",{d:"M4.1,12a.5.5,0,0,0,.5.5h8.9a.5.5,0,0,0,0-1H4.6A.5.5,0,0,0,4.1,12Z"})]}),"ArrowRightIconB");bt(C.jsx("path",{d:"M11.2969,5.9465a.5.5,0,0,0,0,.707L16.1426,11.5H6.65a.5.5,0,0,0,0,1h9.4922l-4.8457,4.8466a.5.5,0,1,0,.707.7071l5.6992-5.7a.5.5,0,0,0,0-.707l-5.6992-5.7A.5.5,0,0,0,11.2969,5.9465Z"}),"ArrowRightIconC");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M19.9,12A7.9,7.9,0,1,0,12,19.9,7.9091,7.9091,0,0,0,19.9,12ZM12,18.9A6.9,6.9,0,1,1,18.9,12,6.9072,6.9072,0,0,1,12,18.9Z"}),C.jsx("path",{d:"M14.454,9.5465a.5.5,0,0,0-.7071,0L12,11.2931,10.2538,9.5465a.5.5,0,0,0-.707.707L11.2933,12,9.5468,13.7467a.5.5,0,1,0,.707.707L12,12.7071l1.7465,1.7466a.5.5,0,1,0,.7071-.707L12.7074,12l1.7466-1.7466A.5.5,0,0,0,14.454,9.5465Z"})]}),"CloseIconA");bt(C.jsx("path",{d:"M8.6538,7.9464a.5.5,0,1,0-.707.707L11.293,12,7.9468,15.3463a.5.5,0,1,0,.707.707L12,12.7069l3.3462,3.3464a.5.5,0,0,0,.707-.707L12.707,12l3.3462-3.3465a.5.5,0,1,0-.707-.707L12,11.2928Z"}),"CloseIconB");bt(C.jsx(C.Fragment,{children:C.jsx("path",{d:"M19.4485,7.5913a.4878.4878,0,0,0-.0742-.24.4515.4515,0,0,0-.0335-.05.4939.4939,0,0,0-.1985-.1624l-.0007-.0007-7-2.9a.5008.5008,0,0,0-.3848.0009l-6.9,2.9a.4927.4927,0,0,0-.1982.1633.4309.4309,0,0,0-.0335.05.4868.4868,0,0,0-.0737.24L4.55,7.597l0,.0012,0,.0017v8.6a.4994.4994,0,0,0,.2949.456l6.9,3.1a.5033.5033,0,0,0,.2051.044.4914.4914,0,0,0,.2021-.043l7-3.1A.4989.4989,0,0,0,19.45,16.2V7.6l0-.0017,0-.0012ZM11.9512,5.242l5.7119,2.3657-5.7119,2.4477L6.3223,7.6077ZM5.55,8.3623l5.9,2.5652v7.6l-5.9-2.6508Zm6.9,10.17V10.93l6-2.5713v7.5166Z"})}),"CubeIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M5.5,6.9a.5.5,0,0,0,.5.5H7.2222a.8863.8863,0,0,0-.022.1V18.1A1.1436,1.1436,0,0,0,8.3,19.2h7.5A1.1438,1.1438,0,0,0,16.9,18.1V7.5a.481.481,0,0,0-.0166-.1H18a.5.5,0,0,0,0-1H6A.5.5,0,0,0,5.5,6.9Zm10.2822.5A.5254.5254,0,0,1,15.9,7.59V18.0947A.1876.1876,0,0,1,15.8,18.2H8.3047A.1832.1832,0,0,1,8.2,18.1V7.5049A.1844.1844,0,0,1,8.3,7.4Z"}),C.jsx("path",{d:"M9.5,4.8a.5.5,0,0,0,0,1h5a.5.5,0,0,0,0-1Z"})]}),"DeleteIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M19.2,15.2a.5.5,0,1,0-1,0v3.2H5.8V15.2a.5.5,0,0,0-1,0v3.7a.5.5,0,0,0,.5.5H18.7a.5.5,0,0,0,.5-.5Z"}),C.jsx("path",{d:"M12.1,4.6a.5.5,0,0,0-.5.5v7.5936L8.3535,9.4463a.5.5,0,0,0-.707.707l4.0991,4.1a.5013.5013,0,0,0,.708,0l4.1-4.1a.5.5,0,0,0-.707-.707L12.6,12.6934V5.1A.5.5,0,0,0,12.1,4.6Z"})]}),"DownloadIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M8.15,13.8h2.1v2a.5.5,0,1,0,1,0v-2h2.1a.5.5,0,0,0,0-1h-2.1V10.7a.5.5,0,0,0-1,0v2.1H8.15a.5.5,0,0,0,0,1Z"}),C.jsx("path",{d:"M4.85,18.1A1.1438,1.1438,0,0,0,5.95,19.2h9.6a1.1965,1.1965,0,0,0,1.0752-.9424A.511.511,0,0,0,16.65,18.1V8.5A1.1436,1.1436,0,0,0,15.55,7.4H5.95A1.1436,1.1436,0,0,0,4.85,8.5Zm1-9.5947A.1857.1857,0,0,1,5.95,8.4h9.5947a.186.186,0,0,1,.1055.1v9.51a.507.507,0,0,1-.1192.19H5.9551A.1876.1876,0,0,1,5.85,18.1Z"}),C.jsx("path",{d:"M18.05,15.6h-.7a.5.5,0,0,0,0,1h.7A1.1436,1.1436,0,0,0,19.15,15.5V5.9A1.1438,1.1438,0,0,0,18.05,4.8H8.45A1.1438,1.1438,0,0,0,7.35,5.9v.8a.5.5,0,0,0,1,0V5.9053A.1876.1876,0,0,1,8.45,5.8h9.5947A.1876.1876,0,0,1,18.15,5.9v9.5947A.1857.1857,0,0,1,18.05,15.6Z"})]}),"DuplicateIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M15.7217,5.5342l-5.3,5.3a.5.5,0,0,0-.1309.2275l-.7,2.7a.5007.5007,0,0,0,.4844.626.508.508,0,0,0,.126-.0156l2.7-.7a.5.5,0,0,0,.2275-.1309l5.3-5.3a1.9734,1.9734,0,0,0,.5947-1.4736,1.7016,1.7016,0,0,0-.5947-1.2334A2.0341,2.0341,0,0,0,15.7217,5.5342Zm2,2-5.2031,5.2031-1.7461.4531.4531-1.7461,5.17-5.1728a1.03,1.03,0,0,1,1.3594,0,.7352.7352,0,0,1,.27.542A.9731.9731,0,0,1,17.7217,7.5342Z"}),C.jsx("path",{d:"M4.9746,6.4873v11.4a1.1436,1.1436,0,0,0,1.1006,1.1H17.4746a1.1436,1.1436,0,0,0,1.1006-1.1V11.7871a.5.5,0,1,0-1,0v6.0957a.1832.1832,0,0,1-.1006.1045H6.08a.1863.1863,0,0,1-.1055-.1V6.4922a.186.186,0,0,1,.1006-.1045h6a.5.5,0,0,0,0-1h-6A1.1436,1.1436,0,0,0,4.9746,6.4873Z"})]}),"EditIconA");bt(C.jsx("path",{d:"M7.65,19.55a2.4726,2.4726,0,0,0,1.7529-.7461l9.4-9.4a2.4246,2.4246,0,0,0,0-3.5068l-.7-.7a2.4246,2.4246,0,0,0-3.5068,0l-9.4,9.4A2.4726,2.4726,0,0,0,4.45,16.35v2.7a.5.5,0,0,0,.5.5ZM15.3037,5.9033a1.4335,1.4335,0,0,1,2.0928,0l.7.7a1.4312,1.4312,0,0,1,0,2.0928L17.25,9.543,14.457,6.75ZM5.45,16.35a1.4826,1.4826,0,0,1,.4531-1.0459L13.75,7.457l2.793,2.793L8.6963,18.0967A1.4826,1.4826,0,0,1,7.65,18.55H5.45Z"}),"EditIconB");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M14.917,4.5557a.5.5,0,0,0-.8535.3535V7.7456a.5.5,0,0,0,.5.5H17.4a.5.5,0,0,0,.3535-.8535Zm.1465,2.69V6.1162l1.13,1.1294Z"}),C.jsx("path",{d:"M21.7354,12.792,20.59,11.6465a.5.5,0,0,0-.707.707l.4009.4009h-4.356a2.794,2.794,0,0,0-2.791,2.791v.7637a.5.5,0,0,0,1,0v-.7637a1.8152,1.8152,0,0,1,1.791-1.791h4.1382l-.1831.1831a.5.5,0,1,0,.707.707l1.1456-1.1455A.5.5,0,0,0,21.7354,12.792Z"}),C.jsx("path",{d:"M12.8184,5.4092a.5.5,0,0,0,0-1H6.0459V19.5908H17.9541V15.5454a.5.5,0,1,0-1,0v3.0454H7.0459V5.4092Z"}),C.jsx("path",{d:"M17.4541,9.0454a.5.5,0,0,0-.5.5v1.9092a.5.5,0,0,0,1,0V9.5454A.5.5,0,0,0,17.4541,9.0454Z"})]}),"ExportDocumentIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M4.1943,16.2778a.5005.5005,0,0,0,.7735.419l6.5556-4.2779a.5.5,0,0,0,0-.8378L4.9678,7.3032a.5.5,0,0,0-.7735.419Zm1-7.6323L10.335,12,5.1943,15.3545Z"}),C.jsx("path",{d:"M19.8057,12a.5.5,0,0,0-.2266-.4189L13.0234,7.3032a.5.5,0,0,0-.7734.419v8.5556a.5.5,0,0,0,.7734.419l6.5557-4.2779A.5.5,0,0,0,19.8057,12ZM13.25,15.3545V8.6455L18.3906,12Z"})]}),"FastForwardIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M5.35,15.95H6.8005a2.6956,2.6956,0,0,0,5.2994,0H18.65a.5.5,0,0,0,0-1H12.1a2.6956,2.6956,0,0,0-5.2994,0H5.35a.5.5,0,0,0,0,1ZM9.45,13.75a1.7,1.7,0,1,1-1.7,1.7A1.7226,1.7226,0,0,1,9.45,13.75Z"}),C.jsx("path",{d:"M4.85,8.55a.5.5,0,0,0,.5.5H11.9a2.6956,2.6956,0,0,0,5.2994,0H18.65a.5.5,0,0,0,0-1H17.2a2.6956,2.6956,0,0,0-5.2994,0H5.35A.5.5,0,0,0,4.85,8.55Zm9.7-1.7a1.7,1.7,0,1,1-1.7,1.7A1.7226,1.7226,0,0,1,14.55,6.85Z"})]}),"FilterIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M18.8613,7.2222a.5.5,0,0,0-.5-.5h-3a.5.5,0,0,0-.5.5v9.5556a.5.5,0,0,0,.5.5h3a.5.5,0,0,0,.5-.5Zm-1,9.0556h-2V7.7222h2Z"}),C.jsx("path",{d:"M13.8613,12a.5.5,0,0,0-.2285-.42L5.91,6.58A.5.5,0,0,0,5.1387,7V17a.5.5,0,0,0,.7715.42l7.7226-5A.5.5,0,0,0,13.8613,12ZM6.1387,16.0806V7.9194L12.4414,12Z"})]}),"ForwardIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M6.4,11.65a.5.5,0,0,0,.5.5h4.6V18.35a.5.5,0,0,0,1,0V12.15h4.6a.5.5,0,0,0,0-1H6.9A.5.5,0,0,0,6.4,11.65Z"}),C.jsx("path",{d:"M14.2,7.35a2.2,2.2,0,0,0-4.4,0,2.2,2.2,0,0,0,4.4,0Zm-3.4,0a1.2,1.2,0,0,1,2.4,0,1.2,1.2,0,1,1-2.4,0Z"})]}),"HumanIconA");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M15.9,12.1a.5.5,0,1,0,0-1H8.1a.5.5,0,1,0,0,1h3.4v2.6988L9.04,17.3535a.5.5,0,0,0,.7207.6934l2.2461-2.333,2.34,2.34a.5.5,0,0,0,.707-.707L12.5,14.793V12.1Z"}),C.jsx("path",{d:"M12,5.8A2.258,2.258,0,0,0,9.8,8a2.2,2.2,0,0,0,4.4,0A2.258,2.258,0,0,0,12,5.8Zm0,3.4A1.248,1.248,0,0,1,10.8,8a1.2,1.2,0,0,1,2.4,0A1.248,1.248,0,0,1,12,9.2Z"})]}),"HumanIconB");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M6.25,7.65a.5.5,0,0,0,.5.5h8.3a.5.5,0,0,0,0-1H6.75A.5.5,0,0,0,6.25,7.65Z"}),C.jsx("path",{d:"M6.75,12.55h10.5a.5.5,0,0,0,0-1H6.75a.5.5,0,1,0,0,1Z"}),C.jsx("path",{d:"M6.75,16.85h4.2a.5.5,0,0,0,0-1H6.75a.5.5,0,0,0,0,1Z"})]}),"ListIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M6.75,8.15h10.5a.5.5,0,1,0,0-1H6.75a.5.5,0,1,0,0,1Z"}),C.jsx("path",{d:"M6.75,12.45h10.5a.5.5,0,0,0,0-1H6.75a.5.5,0,0,0,0,1Z"}),C.jsx("path",{d:"M6.75,16.85h10.5a.5.5,0,1,0,0-1H6.75a.5.5,0,0,0,0,1Z"})]}),"MenuIcon");bt(C.jsx("path",{d:"M17.75,12a.5.5,0,0,0-.5-.5H6.75a.5.5,0,0,0,0,1h10.5A.5.5,0,0,0,17.75,12Z"}),"MinusIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M7.15,6.8a.5.5,0,0,0-.5.5v9.4a.5.5,0,0,0,.5.5h3a.5.5,0,0,0,.5-.5V7.3a.5.5,0,0,0-.5-.5Zm2.5,9.4h-2V7.8h2Z"}),C.jsx("path",{d:"M13.85,6.8a.5.5,0,0,0-.5.5v9.4a.5.5,0,0,0,.5.5h3a.5.5,0,0,0,.5-.5V7.3a.5.5,0,0,0-.5-.5Zm2.5,9.4h-2V7.8h2Z"})]}),"PauseIcon");bt(C.jsx(C.Fragment,{children:C.jsx("path",{d:"M6.5,17.5a.5.5,0,0,0,.7412.438l10-5.5a.5.5,0,0,0,0-.876l-10-5.5A.5.5,0,0,0,6.5,6.5Zm1-10.1543L15.9629,12,7.5,16.6543Z"})}),"PlayIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M5.6387,6.7222a.5.5,0,0,0-.5.5v9.5556a.5.5,0,0,0,.5.5h3a.5.5,0,0,0,.5-.5V7.2222a.5.5,0,0,0-.5-.5Zm2.5,9.5556h-2V7.7222h2Z"}),C.jsx("path",{d:"M18.09,17.42a.5.5,0,0,0,.7715-.42V7a.5.5,0,0,0-.7715-.42l-7.7226,5a.5.5,0,0,0,0,.84Zm-.2285-9.5v8.1612L11.5586,12Z"})]}),"ReverseIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M19.5439,7.2827a.4987.4987,0,0,0-.5117.0205l-6.5556,4.2779a.5.5,0,0,0,0,.8378l6.5556,4.2779a.5026.5026,0,0,0,.2735.081.5.5,0,0,0,.5-.5V7.7222A.5.5,0,0,0,19.5439,7.2827Zm-.7382,8.0718L13.665,12l5.1407-3.3545Z"}),C.jsx("path",{d:"M4.1943,12a.5.5,0,0,0,.2266.4189l6.5557,4.2779a.5022.5022,0,0,0,.2734.081.5.5,0,0,0,.5-.5V7.7222a.5.5,0,0,0-.7734-.419L4.4209,11.5811A.5.5,0,0,0,4.1943,12ZM10.75,8.6455v6.709L5.6094,12Z"})]}),"RewindIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M10.7,4.75A5.64,5.64,0,0,0,5,10.45a5.64,5.64,0,0,0,5.7,5.7,5.64,5.64,0,0,0,5.7-5.7A5.64,5.64,0,0,0,10.7,4.75Zm0,10.4a4.7,4.7,0,1,1,4.7-4.7A4.65,4.65,0,0,1,10.7,15.15Z"}),C.jsx("path",{d:"M18.8613,19.0947a.4978.4978,0,0,0-.0166-.706l-2.2-2.1a.4994.4994,0,1,0-.6894.7226l2.2,2.1a.4978.4978,0,0,0,.706-.0166Z"})]}),"SearchIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M18.9209,10.0146a.5335.5335,0,0,1-.3672-.1679,1.639,1.639,0,0,1-.3066-.4707A1.5723,1.5723,0,0,1,18.2,8.9a.921.921,0,0,1,.1348-.4522,2.0287,2.0287,0,0,0-2.76-2.7959A1.4014,1.4014,0,0,1,15.1,5.8a1.56,1.56,0,0,1-.4805-.0488,1.6983,1.6983,0,0,1-.4453-.2813,1.6124,1.6124,0,0,1-.1152-.247c-.0293-.0674-.0586-.1348-.0869-.1963a2.0372,2.0372,0,0,0-3.9571.0527l-.0048.0225a.9277.9277,0,0,1-.5723.68,1.0279,1.0279,0,0,1-.9893-.1162,2.0287,2.0287,0,0,0-2.7959,2.76A1.4014,1.4014,0,0,1,5.8,8.9a1.56,1.56,0,0,1-.0488.4805,1.8545,1.8545,0,0,1-.2539.4121l-.4746.2373a2.0365,2.0365,0,0,0,.0566,3.9551.5383.5383,0,0,1,.3672.1679,1.639,1.639,0,0,1,.3066.4707A1.5723,1.5723,0,0,1,5.8,15.1a.921.921,0,0,1-.1348.4522,2.0287,2.0287,0,0,0,2.76,2.7959A1.4014,1.4014,0,0,1,8.9,18.2a1.56,1.56,0,0,1,.4805.0488,1.6983,1.6983,0,0,1,.4453.2813,1.6124,1.6124,0,0,1,.1152.247c.0293.0674.0586.1348.0869.1963a2.0372,2.0372,0,0,0,3.9571-.0527A.5049.5049,0,0,0,14,18.8a.4419.4419,0,0,1,.1533-.2461,1.639,1.639,0,0,1,.4707-.3066A1.5723,1.5723,0,0,1,15.1,18.2a.921.921,0,0,1,.4522.1348,2.0287,2.0287,0,0,0,2.7959-2.76A1.4014,1.4014,0,0,1,18.2,15.1a1.56,1.56,0,0,1,.0488-.4805,1.8545,1.8545,0,0,1,.2539-.4121l.4746-.2373a2.0365,2.0365,0,0,0-.0566-3.9551Zm-.2422,3a.4752.4752,0,0,0-.1016.0381l-.6.3a.48.48,0,0,0-.1308.0938,2.5562,2.5562,0,0,0-.4942.73A2.0893,2.0893,0,0,0,17.2,15.1a2.3534,2.3534,0,0,0,.2656.9483,1.0192,1.0192,0,0,1-.1445,1.2734,1.0338,1.0338,0,0,1-1.2969.1318A1.9183,1.9183,0,0,0,15.1,17.2a2.096,2.096,0,0,0-.93.1553,2.5491,2.5491,0,0,0-.7236.4912,1.3724,1.3724,0,0,0-.4434.8779,1.0368,1.0368,0,0,1-2.0175-.0459.4752.4752,0,0,0-.0381-.1016c-.0284-.0585-.0577-.1259-.0869-.1943a1.6812,1.6812,0,0,0-.3067-.5361,2.5562,2.5562,0,0,0-.73-.4942A2.0893,2.0893,0,0,0,8.9,17.2a2.3534,2.3534,0,0,0-.9483.2656,1.0171,1.0171,0,0,1-1.2734-.1445,1.0309,1.0309,0,0,1-.1318-1.2969A1.9183,1.9183,0,0,0,6.8,15.1a2.096,2.096,0,0,0-.1553-.93,2.5491,2.5491,0,0,0-.4912-.7236,1.3724,1.3724,0,0,0-.8779-.4434,1.0368,1.0368,0,0,1,.0459-2.0175.4752.4752,0,0,0,.1016-.0381l.6-.3a.48.48,0,0,0,.1308-.0938,2.5562,2.5562,0,0,0,.4942-.73A2.0893,2.0893,0,0,0,6.8,8.9a2.3534,2.3534,0,0,0-.2656-.9483,1.0192,1.0192,0,0,1,.1445-1.2734,1.0022,1.0022,0,0,1,1.2442-.1631A2.0264,2.0264,0,0,0,9.82,6.7051a1.9368,1.9368,0,0,0,1.167-1.3936,1.0375,1.0375,0,0,1,2.0273.01.4752.4752,0,0,0,.0381.1016c.0284.0585.0577.1259.0869.1943a1.6812,1.6812,0,0,0,.3067.5361,2.5562,2.5562,0,0,0,.73.4942A2.0893,2.0893,0,0,0,15.1,6.8a2.3534,2.3534,0,0,0,.9483-.2656,1.0163,1.0163,0,0,1,1.2734.1445,1.0309,1.0309,0,0,1,.1318,1.2969A1.9183,1.9183,0,0,0,17.2,8.9a2.096,2.096,0,0,0,.1553.93,2.5491,2.5491,0,0,0,.4912.7236,1.3724,1.3724,0,0,0,.8779.4434,1.0368,1.0368,0,0,1-.0459,2.0175Z"}),C.jsx("path",{d:"M12,8.8A3.2,3.2,0,1,0,15.2,12,3.2038,3.2038,0,0,0,12,8.8Zm0,5.4A2.2,2.2,0,1,1,14.2,12,2.1772,2.1772,0,0,1,12,14.2Z"})]}),"SettingsIconA");bt(C.jsx("path",{d:"M14.5791,11.4512A4.9078,4.9078,0,0,0,14.88,8.6689a5.1372,5.1372,0,0,0-1.4375-2.7548,5.51,5.51,0,0,0-2.8037-1.4434,5.7732,5.7732,0,0,0-3.0528.44.5009.5009,0,0,0-.15.8106L9.9893,8.2754V9.8682H8.3857L5.73,7.4023a.4963.4963,0,0,0-.44-.124.5022.5022,0,0,0-.3565.2871,5.1163,5.1163,0,0,0,1.0029,5.8565,5.5073,5.5073,0,0,0,2.8038,1.4433,5.8656,5.8656,0,0,0,2.7314-.3086L15.89,18.9678a2.3069,2.3069,0,0,0,1.5.6006,2.18,2.18,0,0,0,1.5987-.6993,2.3091,2.3091,0,0,0,.6006-1.5009,2.1506,2.1506,0,0,0-.6465-1.5537Zm3.6563,6.7636a1.16,1.16,0,0,1-.8458.3536,1.2983,1.2983,0,0,1-.8466-.3536l-4.6006-4.6a.5007.5007,0,0,0-.5567-.1036,4.81,4.81,0,0,1-2.4882.3692,4.5,4.5,0,0,1-2.2549-1.1651A4.1429,4.1429,0,0,1,5.4775,10.46a3.6683,3.6683,0,0,1,.1192-1.8164L7.85,10.7344a.4984.4984,0,0,0,.34.1338h2.3a.5.5,0,0,0,.5-.5v-2.3a.5.5,0,0,0-.1465-.3536L8.7041,5.5762a5.0946,5.0946,0,0,1,1.7764-.12,4.4922,4.4922,0,0,1,2.2549,1.165,4.1139,4.1139,0,0,1,.7968,4.7441.5.5,0,0,0,.1035.5567l4.6006,4.6006a1.1581,1.1581,0,0,1,.3526.8457A1.2936,1.2936,0,0,1,18.2354,18.2148Z"}),"SettingsIconB");bt(C.jsx(C.Fragment,{children:C.jsx("path",{d:"M17.5,17V7a.5.5,0,0,0-.5-.5H7a.5.5,0,0,0-.5.5V17a.5.5,0,0,0,.5.5H17A.5.5,0,0,0,17.5,17Zm-1-.5h-9v-9h9Z"})}),"StopIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M17.15,9.8838h-.2188a4.0352,4.0352,0,0,0-.68-2.5205A4.8407,4.8407,0,0,0,13.0361,5.292,4.9657,4.9657,0,0,0,7.4688,8.4,4.0869,4.0869,0,0,0,3.65,12.3838a4.1583,4.1583,0,0,0,4.1992,4,.5.5,0,1,0,0-1,3.146,3.146,0,0,1-3.1992-3,3.1081,3.1081,0,0,1,3.1992-3A.5.5,0,0,0,8.3359,9a3.926,3.926,0,0,1,4.5284-2.7236A3.8345,3.8345,0,0,1,15.416,7.9131a2.99,2.99,0,0,1,.4473,2.3545.5.5,0,0,0,.4863.6162H17.15a2.2,2.2,0,0,1,0,4.4H16.35a.5.5,0,1,0,0,1H17.15a3.2,3.2,0,0,0,0-6.4Z"}),C.jsx("path",{d:"M11.65,18.7842a.5.5,0,0,0,.5-.5V12.4554l1.5537,1.49a.5.5,0,0,0,.6914-.7226l-2.3994-2.3a.4754.4754,0,0,0-.0654-.0417.4837.4837,0,0,0-.0926-.0592.4951.4951,0,0,0-.1413-.0284.4484.4484,0,0,0-.0464-.0094l-.0025.0005a.5016.5016,0,0,0-.3515.1466l-2.3,2.2992a.5.5,0,1,0,.707.707L11.15,12.491v5.7932A.5.5,0,0,0,11.65,18.7842Z"})]}),"UploadCloudIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M5.3,14.7a.5.5,0,0,0-.5.5v3.7a.5.5,0,0,0,.5.5H18.7a.5.5,0,0,0,.5-.5V15.2a.5.5,0,1,0-1,0v3.2H5.8V15.2A.5.5,0,0,0,5.3,14.7Z"}),C.jsx("path",{d:"M12.1,14.4a.5.5,0,0,0,.5-.5V6.3066l3.2471,3.2471a.5.5,0,0,0,.707-.707l-4.1-4.1a.5013.5013,0,0,0-.708,0l-4.0991,4.1a.5.5,0,1,0,.707.707L11.6,6.3068V13.9A.5.5,0,0,0,12.1,14.4Z"})]}),"UploadIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M17.6,18.8a1.1872,1.1872,0,0,0,1.2-1.2V6.4a1.1872,1.1872,0,0,0-1.2-1.2H6.4A1.1872,1.1872,0,0,0,5.2,6.4V17.6a1.1872,1.1872,0,0,0,1.2,1.2ZM6.2,17.6V6.4a.1858.1858,0,0,1,.2-.2H17.6a.1858.1858,0,0,1,.2.2V17.6a.1858.1858,0,0,1-.2.2H6.4A.1858.1858,0,0,1,6.2,17.6Z"}),C.jsx("path",{d:"M9.5,11.5a2,2,0,1,0-2-2A1.9789,1.9789,0,0,0,9.5,11.5Zm0-3a1,1,0,0,1,0,2,.9794.9794,0,0,1-1-1A1.0394,1.0394,0,0,1,9.5,8.5Z"}),C.jsx("path",{d:"M14.5,16.5a2,2,0,1,0-2-2A1.9789,1.9789,0,0,0,14.5,16.5Zm0-3a1,1,0,0,1,0,2,.9794.9794,0,0,1-1-1A1.0394,1.0394,0,0,1,14.5,13.5Z"}),C.jsx("path",{d:"M14.5,11a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-1,0v2A.5.5,0,0,0,14.5,11Z"}),C.jsx("path",{d:"M9.5,13a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,1,0v-2A.5.5,0,0,0,9.5,13Z"})]}),"CompileIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M7.6,6v7.1a.5.5,0,0,0,.5.5H15.9a.5.5,0,0,0,.5-.5V6a.5.5,0,0,0-.5-.5H8.1A.5.5,0,0,0,7.6,6Zm5.25.5V8.2H11.15V6.5ZM8.6,6.5H10.15V8.7a.5.5,0,0,0,.5.5H13.35a.5.5,0,0,0,.5-.5V6.5H15.4v6.1H8.6Z"}),C.jsx("path",{d:"M4.8457,17.1a2.1768,2.1768,0,0,0,2.2,2.2h9.8994a2.2759,2.2759,0,0,0,1.6983-.7456A1.8853,1.8853,0,0,0,19.1455,17.1a2.1769,2.1769,0,0,0-2.2-2.2H7.0459A2.1769,2.1769,0,0,0,4.8457,17.1Zm13.3027.0557a.9338.9338,0,0,1-.25.7314,1.274,1.274,0,0,1-.9531.4126H7.0459a1.2,1.2,0,1,1,0-2.4h9.8994A1.2064,1.2064,0,0,1,18.1484,17.1558Z"})]}),"ConveyorBeltIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M8.1465,13.0234a.5.5,0,0,0,.1474.3526l3.3536,3.332a.5.5,0,0,0,.705,0l3.3536-3.332a.5.5,0,0,0,.0019-.7071l-3.3535-3.375a.5134.5134,0,0,0-.709,0L8.292,12.6689A.5009.5009,0,0,0,8.1465,13.0234ZM12,10.3555l2.6465,2.664L12,15.6484,9.3535,13.02Z"}),C.jsx("path",{d:"M19,23a2,2,0,1,0-2-2A2.0027,2.0027,0,0,0,19,23Zm0-3a1,1,0,1,1-1,1A1.0006,1.0006,0,0,1,19,20Z"}),C.jsx("path",{d:"M14,3a2,2,0,1,0-2,2A2.0027,2.0027,0,0,0,14,3ZM12,4a1,1,0,1,1,1-1A1.0006,1.0006,0,0,1,12,4Z"}),C.jsx("path",{d:"M17,13.5h1.5V18a.5.5,0,0,0,1,0V13a.5.5,0,0,0-.5-.5H17a.5.5,0,0,0,0,1Z"}),C.jsx("path",{d:"M11.5,6V8a.5.5,0,0,0,1,0V6a.5.5,0,0,0-1,0Z"}),C.jsx("path",{d:"M11.5,18v4.5a.5.5,0,0,0,1,0v-4.5a.5.5,0,0,0-1,0Z"})]}),"IfIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M8.1465,13.0234a.5.5,0,0,0,.1474.3526l3.3536,3.332a.5.5,0,0,0,.705,0l3.3536-3.332a.5.5,0,0,0,.0019-.7071l-3.3535-3.375a.5134.5134,0,0,0-.709,0L8.292,12.6689A.5009.5009,0,0,0,8.1465,13.0234ZM12,10.3555l2.6465,2.664L12,15.6484,9.3535,13.02Z"}),C.jsx("path",{d:"M19,23a2,2,0,1,0-2-2A2.0027,2.0027,0,0,0,19,23Zm0-3a1,1,0,1,1-1,1A1.0006,1.0006,0,0,1,19,20Z"}),C.jsx("path",{d:"M5,19a2,2,0,1,0,2,2A2.0027,2.0027,0,0,0,5,19Zm0,3a1,1,0,1,1,1-1A1.0006,1.0006,0,0,1,5,22Z"}),C.jsx("path",{d:"M14,3a2,2,0,1,0-2,2A2.0027,2.0027,0,0,0,14,3ZM12,4a1,1,0,1,1,1-1A1.0006,1.0006,0,0,1,12,4Z"}),C.jsx("path",{d:"M7.5,13a.5.5,0,0,0-.5-.5H5a.5.5,0,0,0-.5.5v5a.5.5,0,0,0,1,0V13.5H7A.5.5,0,0,0,7.5,13Z"}),C.jsx("path",{d:"M17,13.5h1.5V18a.5.5,0,0,0,1,0V13a.5.5,0,0,0-.5-.5H17a.5.5,0,0,0,0,1Z"}),C.jsx("path",{d:"M11.5,6V8a.5.5,0,0,0,1,0V6a.5.5,0,0,0-1,0Z"})]}),"IfElseIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M 5 9.15 a 3.85 3.85 0 1 0 3.85 3.85 a 4 4 0 0 0 -3.85 -3.85 Z M 7.6465 13.02 a 2.6484 2.6484 0 0 1 -2.6465 2.6284 a 2.6484 2.6484 0 1 1 2.6465 -2.6284 Z"}),C.jsx("path",{d:"M12,19a2,2,0,1,0,2,2A2.0027,2.0027,0,0,0,12,19Zm0,3a1,1,0,1,1,1-1A1.0006,1.0006,0,0,1,12,22Z"}),C.jsx("path",{d:"M7,3A2,2,0,1,0,5,5,2.0027,2.0027,0,0,0,7,3ZM5,4A1,1,0,1,1,6,3,1.0006,1.0006,0,0,1,5,4Z"}),C.jsx("path",{d:"M11.5,13.5V18a.5.5,0,0,0,1,0V13a.5.5,0,0,0-.5-.5H10a.5.5,0,0,0,0,1Z"}),C.jsx("path",{d:"M16.5,19a2,2,0,1,0,2,2A2.0027,2.0027,0,0,0,16.5,19Zm0,3a1,1,0,1,1,1-1A1.0006,1.0006,0,0,1,16.5,22Z"}),C.jsx("path",{d:"M16,13.5V18a.5.5,0,0,0,1,0V13a.5.5,0,0,0-.5-.5h-2a.5.5,0,0,0,0,1Z"}),C.jsx("path",{d:"M21,19a2,2,0,1,0,2,2A2.0027,2.0027,0,0,0,21,19Zm0,3a1,1,0,1,1,1-1A1.0006,1.0006,0,0,1,21,22Z"}),C.jsx("path",{d:"M20.5,13.5V18a.5.5,0,0,0,1,0V13a.5.5,0,0,0-.5-.5H19a.5.5,0,0,0,0,1Z"}),C.jsx("path",{d:"M4.5,6V8a.5.5,0,0,0,1,0V6a.5.5,0,0,0-1,0Z"})]}),"ParallelIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M21,22H3a.5.5,0,0,0,0,1H21a.5.5,0,0,0,0-1Z"}),C.jsx("path",{d:"M9,13a3,3,0,1,0,3-3A3.0033,3.0033,0,0,0,9,13Zm5,0a2,2,0,1,1-2-2A2.0023,2.0023,0,0,1,14,13Z"}),C.jsx("path",{d:"M17,13a.5.5,0,0,0,1,0,6.0044,6.0044,0,0,0-5.5-5.9746V1.5a.5.5,0,0,0-1,0V7.0254A6.0044,6.0044,0,0,0,6,13a.5.5,0,0,0,1,0,5,5,0,0,1,10,0Z"})]}),"PickIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M21.5,22.5A.5.5,0,0,0,21,22H3a.5.5,0,0,0,0,1H21A.5.5,0,0,0,21.5,22.5Z"}),C.jsx("path",{d:"M12,1a.5.5,0,0,0-.5.5V7.0254A6.0044,6.0044,0,0,0,6,13a.5.5,0,0,0,1,0,5,5,0,0,1,10,0,.5.5,0,0,0,1,0,6.0044,6.0044,0,0,0-5.5-5.9746V1.5A.5.5,0,0,0,12,1Z"}),C.jsx("path",{d:"M9,18a3,3,0,1,0,3-3A3.0033,3.0033,0,0,0,9,18Zm5,0a2,2,0,1,1-2-2A2.0023,2.0023,0,0,1,14,18Z"})]}),"PlaceIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M5.0469,8.0464A5.0166,5.0166,0,0,0,3.5,11.7v1.6a.5.5,0,0,0,1,0V11.7A4.05,4.05,0,0,1,5.7539,8.7534,4.2131,4.2131,0,0,1,8.7,7.5h9.8926L17.2461,8.8467a.5.5,0,1,0,.707.707l2.4-2.4a.5.5,0,0,0,0-.707l-2.4-2.4a.5.5,0,0,0-.707.707L18.9932,6.5H8.7A5.218,5.218,0,0,0,5.0469,8.0464Z"}),C.jsx("path",{d:"M20.5,12.4V10.8a.5.5,0,1,0-1,0v1.6a4.0514,4.0514,0,0,1-1.2539,2.9468A4.2131,4.2131,0,0,1,15.3,16.6H5.4067l1.4468-1.4468a.5.5,0,0,0-.707-.707l-2.4,2.4a.5.5,0,0,0,0,.707l2.4,2.4a.5.5,0,0,0,.707-.707L5.2065,17.6H15.3a5.218,5.218,0,0,0,3.6533-1.5464A5.018,5.018,0,0,0,20.5,12.4Z"})]}),"RepeatIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M 15.4336 9.5 l -10.8672 0 c -1.4961 0 -2.5664 -1.2148 -2.5664 -2.75 c 0 -1.6406 1.0703 -2.75 2.5664 -2.75 l 6.793 0 c 0.25 0 0.5 -0.3086 0.5 -0.5 c 0 -0.25 -0.25 -0.5 -0.5 -0.5 l -6.793 0 c -2.2578 0 -3.5664 1.8359 -3.5664 3.75 c 0 2.1055 1.3086 3.75 3.5664 3.75 l 10.8672 0 c 1.4961 0 2.5664 1.2148 2.5664 2.75 c 0 1.6406 -1.0703 2.75 -2.5664 2.75 l -6.8516 0 c -0.25 0 -0.5 0.3086 -0.5 0.5 c 0 0.25 0.25 0.5 0.5 0.5 l 6.8516 0 c 2.2578 0 3.5664 -1.4531 3.5664 -3.75 c 0 -2.1055 -1.3086 -3.75 -3.5664 -3.75 z"}),C.jsx("path",{d:"M 4.4688 11.9688 c -1.6055 0 -2.9063 1.3046 -2.9063 2.9101 c 0 2.4727 2.3164 4.8203 2.418 4.918 c 0.1289 0.1289 0.3047 0.2031 0.4883 0.2031 c 0.1835 0 0.3593 -0.0742 0.4882 -0.2031 c 0.0977 -0.0977 2.418 -2.4453 2.418 -4.918 c 0 -1.6055 -1.3047 -2.9101 -2.9062 -2.9101 z m 0 7.0312 c -0.5977 -0.7383 -1.9063 -2.0937 -1.9063 -4.1211 c 0 -0.8437 1.0625 -1.9101 1.9063 -1.9101 c 0.8398 0 1.9062 1.0664 1.9062 1.9101 c 0 2.0274 -1.3125 3.3828 -1.9062 4.1211 z"}),C.jsx("path",{d:"M 15.4727 8.0313 c 0.1797 0 0.3555 -0.0703 0.4883 -0.2031 c 0.1016 -0.0977 2.4219 -2.4492 2.4219 -4.9219 c 0 -1.6016 -1.3047 -2.9063 -2.9102 -2.9063 c -1.6016 0 -2.9063 1.3047 -2.9063 2.9063 c 0 2.4727 2.3203 4.8203 2.418 4.9219 c 0.1367 0.1328 0.3125 0.2031 0.4883 0.2031 z m 0 -1 c -0.5977 -0.7383 -1.9063 -2.0937 -1.9063 -4.1211 c 0 -0.8437 1.0625 -1.9101 1.9063 -1.9101 c 0.8398 0 1.9062 1.0664 1.9062 1.9101 c 0 2.0274 -1.3125 3.3828 -1.9062 4.1211 z"})]}),"RouteIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M5.3545,9.2939a.5134.5134,0,0,0-.709,0L1.292,12.6689a.5.5,0,0,0,.0019.7071l3.3536,3.332a.5.5,0,0,0,.705,0l3.3536-3.332a.5.5,0,0,0,.0019-.7071ZM5,15.6484,2.3535,13.02,5,10.3555,7.6465,13.02Z"}),C.jsx("path",{d:"M12,19a2,2,0,1,0,2,2A2.0027,2.0027,0,0,0,12,19Zm0,3a1,1,0,1,1,1-1A1.0006,1.0006,0,0,1,12,22Z"}),C.jsx("path",{d:"M7,3A2,2,0,1,0,5,5,2.0027,2.0027,0,0,0,7,3ZM5,4A1,1,0,1,1,6,3,1.0006,1.0006,0,0,1,5,4Z"}),C.jsx("path",{d:"M11.5,13.5V18a.5.5,0,0,0,1,0V13a.5.5,0,0,0-.5-.5H10a.5.5,0,0,0,0,1Z"}),C.jsx("path",{d:"M16.5,19a2,2,0,1,0,2,2A2.0027,2.0027,0,0,0,16.5,19Zm0,3a1,1,0,1,1,1-1A1.0006,1.0006,0,0,1,16.5,22Z"}),C.jsx("path",{d:"M16,13.5V18a.5.5,0,0,0,1,0V13a.5.5,0,0,0-.5-.5h-2a.5.5,0,0,0,0,1Z"}),C.jsx("path",{d:"M21,19a2,2,0,1,0,2,2A2.0027,2.0027,0,0,0,21,19Zm0,3a1,1,0,1,1,1-1A1.0006,1.0006,0,0,1,21,22Z"}),C.jsx("path",{d:"M20.5,13.5V18a.5.5,0,0,0,1,0V13a.5.5,0,0,0-.5-.5H19a.5.5,0,0,0,0,1Z"}),C.jsx("path",{d:"M4.5,6V8a.5.5,0,0,0,1,0V6a.5.5,0,0,0-1,0Z"})]}),"SwitchIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M12,22A10,10,0,1,0,2,12,10.0114,10.0114,0,0,0,12,22ZM12,3a9,9,0,1,1-9,9A9.01,9.01,0,0,1,12,3Z"}),C.jsx("path",{d:"M12,13h7a.5.5,0,0,0,0-1H12.5V7.5a.5.5,0,0,0-1,0v5A.5.5,0,0,0,12,13Z"})]}),"WaitIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M 5.6747 3.6229 c 0 1.2112 -0.9507 2.1938 -2.1225 2.1938 c -1.1725 0 -2.1233 -0.9826 -2.1233 -2.1938 c 0 -1.2119 0.9507 -2.1938 2.1232 -2.1938 c 1.1717 0 2.1225 0.9819 2.1225 2.1938"}),C.jsx("path",{d:"M 5.6747 11.0989 c 0 1.2112 -0.9507 2.1938 -2.1225 2.1938 c -1.1725 0 -2.1233 -0.9826 -2.1233 -2.1938 c 0 -1.2119 0.9507 -2.1938 2.1232 -2.1938 c 1.1717 0 2.1225 0.9819 2.1225 2.1938"}),C.jsx("path",{d:"M 5.6747 18.575 c 0 1.2112 -0.9507 2.1938 -2.1225 2.1938 c -1.1725 0 -2.1233 -0.9826 -2.1233 -2.1938 c 0 -1.2112 0.9507 -2.1938 2.1232 -2.1938 c 1.1717 0 2.1225 0.9826 2.1225 2.1938"}),C.jsx("path",{d:"M 13.0824 11.0989 c 0 1.2112 -0.95 2.1938 -2.1225 2.1938 c -1.1725 0 -2.1232 -0.9826 -2.1232 -2.1938 c 0 -1.2119 0.9507 -2.1938 2.1232 -2.1938 c 1.1725 0 2.1225 0.9819 2.1225 2.1938"}),C.jsx("path",{d:"M 13.0824 3.6229 c 0 1.2112 -0.95 2.1938 -2.1225 2.1938 c -1.1725 0 -2.1232 -0.9826 -2.1232 -2.1938 c 0 -1.212 0.9507 -2.1938 2.1232 -2.1938 c 1.1725 0 2.1225 0.9819 2.1225 2.1938"}),C.jsx("path",{d:"M 20.4909 11.0989 c 0 1.2112 -0.9508 2.1938 -2.1233 2.1938 c -1.1725 0 -2.1225 -0.9826 -2.1225 -2.1938 c 0 -1.2119 0.95 -2.1938 2.1225 -2.1938 c 1.1725 0 2.1233 0.9819 2.1233 2.1938"}),C.jsx("path",{d:"M 20.4909 3.6229 c 0 1.2112 -0.9508 2.1938 -2.1233 2.1938 c -1.1725 0 -2.1225 -0.9826 -2.1225 -2.1938 c 0 -1.212 0.95 -2.1938 2.1225 -2.1938 c 1.1725 0 2.1233 0.9819 2.1233 2.1938"}),C.jsx("path",{d:"M 20.4909 18.575 c 0 1.2112 -0.9508 2.1938 -2.1233 2.1938 c -1.1725 0 -2.1225 -0.9826 -2.1225 -2.1938 c 0 -1.2112 0.95 -2.1938 2.1225 -2.1938 c 1.1725 0 2.1233 0.9826 2.1233 2.1938"}),C.jsx("path",{d:"M 13.0824 18.575 c 0 1.2112 -0.95 2.1938 -2.1225 2.1938 c -1.1725 0 -2.1232 -0.9826 -2.1232 -2.1938 c 0 -1.2112 0.9507 -2.1938 2.1232 -2.1938 c 1.1725 0 2.1225 0.9826 2.1225 2.1938"})]}),"RosNodeIcon");bt(C.jsx("path",{d:"M18,15.6a1.2876,1.2876,0,0,0,1.3-1.3l-.01-7.5977A1.3506,1.3506,0,0,0,18,5.5H6A1.2874,1.2874,0,0,0,4.7,6.8v7.5A1.2875,1.2875,0,0,0,6,15.6H9.2v1.9h-1a.5.5,0,0,0,0,1h7.5a.5.5,0,0,0,0-1h-1V15.6ZM5.7,14.3V6.8A.2891.2891,0,0,1,6,6.5H18c.2,0,.28.249.3.3v7.5a.29.29,0,0,1-.3.3H14.4851a.4555.4555,0,0,0-.57,0h-3.93a.4555.4555,0,0,0-.57,0H6A.2892.2892,0,0,1,5.7,14.3Zm8,3.2H10.2V15.6h3.5Z"}),"MonitorIcon");bt(C.jsx(C.Fragment,{children:C.jsx("path",{d:"M18.2,5.8a0.5,0.5,0,0,0,-1,0a5.2063,5.2063,0,0,1,-5.2,5.2a5.1449,5.1449,0,0,1,-5.2,-5.2a0.5,0.5,0,0,0,-1,0a6.1236,6.1236,0,0,0,5.7,6.1757v6.224a0.5,0.5,0,0,0,1,0v-6.225a6.2047,6.2047,0,0,0,5.7,-6.175z"})}),"EndEffectorIconA");bt(C.jsx(C.Fragment,{children:C.jsx("path",{d:"M17.05,5.3a0.5,0.5,0,0,0,-0.5,0.5v5.2h-9.1v-5.2a0.5,0.5,0,0,0,-1,0v5.7a0.5,0.5,0,0,0,0.5,0.5h4.5v6.2a0.5,0.5,0,0,0,1,0v-6.2h4.6a0.5,0.5,0,0,0,0.5,-0.5v-5.7a0.5,0.5,0,0,0,-0.5,-0.5z"})}),"EndEffectorIconB");const I_e=bt(C.jsx(C.Fragment,{children:C.jsx("path",{d:"M16.875,5.1689a0.5014,0.5014,0,0,0,-0.7061,-0.0439l-3.217,2.838a3.7015,3.7015,0,0,0,-5.952,2.937a3.6427,3.6427,0,0,0,3.2,3.65v3.95a0.5,0.5,0,0,0,1,0v-3.949a3.6427,3.6427,0,0,0,3.2,-3.65a3.6943,3.6943,0,0,0,-0.7417,-2.2265l3.173,-2.8a0.5006,0.5006,0,0,0,0.044,-0.706zm-6.175,8.431a2.7,2.7,0,1,1,2.7,-2.7a2.6712,2.6712,0,0,1,-2.7,2.7z"})}),"JointIconA");bt(C.jsx(C.Fragment,{children:C.jsx("path",{d:"M18.55,11.5h-2.948a3.6832,3.6832,0,0,0,-7.3028,0h-2.849a0.5,0.5,0,1,0,0,1h2.849a3.6832,3.6832,0,0,0,7.3028,0h2.948a0.5,0.5,0,0,0,0,-1zm-6.6,3.2a2.7,2.7,0,1,1,2.7,-2.7a2.672,2.672,0,0,1,-2.7,2.7z"})}),"JointIconB");const L_e=bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M4.4473,12.4014l7.2,7.1533a0.5,0.5,0,0,0,0.705,0l7.2,-7.1533a0.5,0.5,0,0,0,0.002,-0.7071l-7.2,-7.247a0.5132,0.5132,0,0,0,-0.709,0l-7.2,7.247a0.5,0.5,0,0,0,0.002,0.7071zm7.553,-6.893l6.4932,6.5361l-6.493,6.451l-6.4932,-6.45z"}),C.jsx("path",{d:"M12.5,14.15v-4.1a0.5,0.5,0,1,0,-1,0v4.1a0.5,0.5,0,0,0,1,0z"})]}),"JointPrismaticIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M8.3,5.65a0.5,0.5,0,0,0,0,1h7.4a0.5,0.5,0,0,0,0,-1z"}),C.jsx("path",{d:"M12,18.35a0.5,0.5,0,0,0,0.5,-0.5v-3.6h3.2a0.5,0.5,0,0,0,0,-1h-7.4a0.5,0.5,0,1,0,0,1h3.2v3.6a0.5,0.5,0,0,0,0.5,0.5z"}),C.jsx("path",{d:"M4.8,10.25h14.4a0.5,0.5,0,0,0,0,-1h-14.4a0.5,0.5,0,0,0,0,1z"})]}),"JointRevoluteIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M15.05,11.25a1.9778,1.9778,0,0,0,1.4033,-0.5967a0.5,0.5,0,0,0,-0.707,-0.707a0.9705,0.9705,0,0,1,-1.3926,0a0.9527,0.9527,0,0,1,0,-1.3926a0.5,0.5,0,1,0,-0.707,-0.707a1.9263,1.9263,0,0,0,-0.3543,2.32l-1.875,1.63a1.951,1.951,0,0,0,-1.017,-0.297a2.0344,2.0344,0,0,0,-1.9971,2.0547a2.09,2.09,0,0,0,1.497,1.874v2.372h-2a0.5,0.5,0,0,0,0,1h5a0.5,0.5,0,1,0,0,-1h-2v-2.374a2.0274,2.0274,0,0,0,1.5,-1.926a1.9475,1.9475,0,0,0,-0.2813,-0.99l1.84,-1.599a1.9438,1.9438,0,0,0,1.091,0.339zm-4.65,3.25a1.02,1.02,0,0,1,-1,-1a1,1,0,1,1,1,1Z"}),C.jsx("path",{d:"M5.7,18.8a0.5,0.5,0,0,0,0.5,-0.5v-12.6a0.5,0.5,0,0,0,-1,0v12.6a0.5,0.5,0,0,0,0.5,0.5Z"}),C.jsx("path",{d:"M18.8,5.7a0.5,0.5,0,1,0,-1,0v12.6a0.5,0.5,0,0,0,1,0Z"})]}),"RobotBarrierIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M13.4,18.3a0.5,0.5,0,0,0,-0.5,-0.5h-2v-2.374a2.0274,2.0274,0,0,0,1.5,-1.926a1.9475,1.9475,0,0,0,-0.2813,-0.99l1.801,-1.565a1.9353,1.9353,0,0,0,1.03,0.3054a1.9778,1.9778,0,0,0,1.4033,-0.5967a0.5,0.5,0,0,0,-0.707,-0.707a0.9705,0.9705,0,0,1,-1.3926,0a0.95,0.95,0,0,1,0,-1.3926a0.5,0.5,0,1,0,-0.707,-0.707a1.9778,1.9778,0,0,0,-0.596,1.403a1.93,1.93,0,0,0,0.2751,0.9745l-1.8081,1.5716a1.951,1.951,0,0,0,-1.017,-0.296a2.0344,2.0344,0,0,0,-1.9971,2.0547a2.09,2.09,0,0,0,1.497,1.873v2.372h-2a0.5,0.5,0,0,0,0,1h5a0.5,0.5,0,0,0,0.5,-0.5zm-4,-4.8a1,1,0,1,1,1,1a1.02,1.02,0,0,1,-1,-1Z"}),C.jsx("path",{d:"M18.3,18.8a0.5,0.5,0,0,0,0.5,-0.5v-12.6a0.5,0.5,0,0,0,-0.5,-0.5h-12.6a0.5,0.5,0,0,0,-0.5,0.5v12.6a0.5,0.5,0,0,0,1,0v-12.1h11.6v12.1a0.5,0.5,0,0,0,0.5,0.5Z"})]}),"RobotCellIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M11.55,10.3a1.9778,1.9778,0,0,0,1.4033,-0.5967a0.5,0.5,0,0,0,-0.707,-0.707a0.9705,0.9705,0,0,1,-1.3926,0a0.9527,0.9527,0,0,1,0,-1.3926a0.5,0.5,0,0,0,-0.707,-0.707a1.9261,1.9261,0,0,0,-0.35,2.3277l-1.922,1.754a1.9609,1.9609,0,0,0,-1.075,-0.328a1.994,1.994,0,0,0,-0.5,3.9258v2.474h-2a0.5,0.5,0,0,0,0,1h5.1a0.5,0.5,0,1,0,0,-1h-2.1v-2.474a2.0274,2.0274,0,0,0,1.5,-1.926a1.94,1.94,0,0,0,-0.25,-0.934l1.917,-1.751a1.9418,1.9418,0,0,0,1.083,0.335zm-4.75,3.35a1,1,0,1,1,0,-2a1,1,0,0,1,0,2z"}),C.jsx("path",{d:"M14.6,17.05a0.5,0.5,0,1,0,0,1h5.1a0.5,0.5,0,0,0,0,-1h-2.1v-2.474a1.994,1.994,0,0,0,-0.5,-3.9258c-0.0237,0,-0.0459,0.0064,-0.07,0.0073l-0.7285,-2.1858a1.826,1.826,0,0,0,0.6135,-0.66a2.0589,2.0589,0,0,0,0.17,-1.4824a0.5,0.5,0,1,0,-0.9707,0.2422a1.0682,1.0682,0,0,1,-0.0791,0.7666a0.85,0.85,0,0,1,-0.5567,0.4267a0.9372,0.9372,0,0,1,-1.1933,-0.6357a0.5,0.5,0,1,0,-0.9707,0.2422a1.9018,1.9018,0,0,0,1.88,1.43c0.0508,0,0.104,-0.0156,0.1558,-0.0194l0.7234,2.17a1.9787,1.9787,0,0,0,0.526,3.624v2.474zm1.5,-4.4a1.0384,1.0384,0,0,1,0.5991,-0.9009l0.001,0.001a0.4956,0.4956,0,0,0,0.1582,-0.0254a0.4639,0.4639,0,0,0,0.06,-0.0344a0.869,0.869,0,0,1,0.1814,-0.04a1,1,0,1,1,-1,1z"})]}),"RobotMultiIcon");bt(C.jsx("path",{d:"M18.4141,6.4141a2,2,0,1,1,-2.8282,-2.8282a0.5,0.5,0,0,0,-0.707,-0.707a2.9726,2.9726,0,0,0,-0.2583,3.928l-3.537,3.156a2.9729,2.9729,0,0,0,-1.584,-0.463a3,3,0,0,0,-0.6,5.94v4.31h-3.5a0.5,0.5,0,0,0,0,1h8.1a0.5,0.5,0,0,0,0,-1h-3.6v-4.29a2.97,2.97,0,0,0,1.9311,-4.824l3.5132,-3.134a3.0036,3.0036,0,0,0,3.7764,-0.38a0.5,0.5,0,1,0,-0.707,-0.707zm-8.914,8.086a2,2,0,1,1,2,-2a2.0023,2.0023,0,0,1,-2,2Z"}),"RobotIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M18.8184,18.3v-12.6a0.5,0.5,0,0,0,-0.5,-0.5h-12.6a0.5,0.5,0,0,0,-0.5,0.5v12.6a0.5,0.5,0,0,0,0.5,0.5h12.6a0.5,0.5,0,0,0,0.5,-0.5zm-1,-0.5h-11.6v-11.6h11.6z"}),C.jsx("path",{d:"M12,15.5a3.5,3.5,0,1,0,-3.5,-3.5a3.5042,3.5042,0,0,0,3.5,3.5zm0,-6a2.5,2.5,0,1,1,-2.5,2.5a2.5026,2.5026,0,0,1,2.5,-2.5z"})]}),"RotatingPlatformIconA");bt(C.jsx("path",{d:"M21,16.7a0.5,0.5,0,0,0,-0.5,-0.5h-2.526a6.0974,6.0974,0,0,0,-5.479,-5.4741c0.0005,-0.0091,0.0054,-0.0166,0.0054,-0.0259v-3.4a0.5,0.5,0,0,0,-1,0v3.4c0,0.0093,0.0049,0.0168,0.0054,0.0259a6.0974,6.0974,0,0,0,-5.479,5.474h-2.527a0.5,0.5,0,0,0,0,1h17a0.5,0.5,0,0,0,0.5,-0.5zm-9,-5a5.0577,5.0577,0,0,1,4.9478,4.5h-9.896a5.0577,5.0577,0,0,1,4.948,-4.5z"}),"RotatingPlatformIconB");bt(C.jsx("path",{d:"M11.95,15.7a3.6438,3.6438,0,0,0,3.6514,-3.2h2.949a0.5,0.5,0,0,0,0,-1h-2.949a3.6832,3.6832,0,0,0,-7.3028,0h-2.849a0.5,0.5,0,1,0,0,1h2.849a3.6438,3.6438,0,0,0,3.651,3.2zm0,-6.4a2.7,2.7,0,1,1,-2.7,2.7a2.6717,2.6717,0,0,1,2.7,-2.7z"}),"RotatingPlatformIconC");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M3.2,11.7a.4993.4993,0,0,0,.1465.3535l3.7,3.7a.5.5,0,0,0,.707-.707L4.4072,11.7,7.7539,8.3535a.5.5,0,0,0-.707-.707l-3.7,3.7A.4993.4993,0,0,0,3.2,11.7Z"}),C.jsx("path",{d:"M16.9531,7.6465a.5.5,0,0,0-.707.707L19.5928,11.7l-3.3467,3.3462a.5.5,0,1,0,.707.707l3.7-3.7a.5.5,0,0,0,0-.707Z"}),C.jsx("path",{d:"M14.4775,4.8325a.5006.5006,0,0,0-.6455.29l-5.1,13.4a.5009.5009,0,0,0,.29.645A.494.494,0,0,0,9.2,19.2a.5011.5011,0,0,0,.4678-.3223l5.1-13.4A.5009.5009,0,0,0,14.4775,4.8325Z"})]}),"CodeIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M19.75,17.35V6.65a.5.5,0,0,0-.5-.5H4.75a.5.5,0,0,0-.5.5V17.35a.5.5,0,0,0,.5.5h14.5A.5.5,0,0,0,19.75,17.35Zm-1-.5H5.25V7.15h13.5Z"}),C.jsx("path",{d:"M7.35,14.65a.5.5,0,0,0,.3467-.14l2.4785-2.39L12.83,14.334a.4978.4978,0,0,0,.7031-.0625L16.15,11.1472V13.55a.5.5,0,1,0,1,0V9.95a.5.5,0,0,0-.5-.5H13.05a.5.5,0,0,0,0,1h2.38l-2.3433,2.7969-2.6162-2.1807a.4972.4972,0,0,0-.667.0234l-2.8008,2.7a.5.5,0,0,0,.3467.86Z"})," "]}),"DashboardIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M7.6,7.85a.5.5,0,0,0,.5.5H15.9a.5.5,0,1,0,0-1H8.1A.5.5,0,0,0,7.6,7.85Z"}),C.jsx("path",{d:"M17.8,12.55a.5.5,0,0,0,0-1H10a.5.5,0,0,0,0,1Z"}),C.jsx("path",{d:"M20.1,16.05a.5.5,0,0,0-.5-.5H11.8a.5.5,0,0,0,0,1h7.8A.5.5,0,0,0,20.1,16.05Z"}),C.jsx("rect",{x:"4.3999",y:"6.95",width:"1.9001",height:"1.9",rx:"0.5"}),C.jsx("path",{d:"M6.2,12.45a.4723.4723,0,0,0,.5.5h.9a.4724.4724,0,0,0,.5-.5v-.9a.4724.4724,0,0,0-.5-.5H6.7c-.2,0-.4.2-.5.5Z"}),C.jsx("path",{d:"M8.1,16.55a.4723.4723,0,0,0,.5.5h.9a.4724.4724,0,0,0,.5-.5v-.9a.4724.4724,0,0,0-.5-.5H8.6c-.2,0-.4.2-.5.5Z"})]}),"FlowChartIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M12,15a3,3,0,1,0-3-3A3.0033,3.0033,0,0,0,12,15Zm0-5a2,2,0,1,1-2,2A2.0023,2.0023,0,0,1,12,10Z"}),C.jsx("path",{d:"M12,7A3,3,0,1,0,9,4,3.0033,3.0033,0,0,0,12,7Zm0-5a2,2,0,1,1-2,2A2.0023,2.0023,0,0,1,12,2Z"}),C.jsx("path",{d:"M1,12A3,3,0,1,0,4,9,3.0033,3.0033,0,0,0,1,12Zm3-2a2,2,0,1,1-2,2A2.0023,2.0023,0,0,1,4,10Z"}),C.jsx("path",{d:"M20,9a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,20,9Zm0,5a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,20,14Z"}),C.jsx("path",{d:"M12,23a3,3,0,1,0-3-3A3.0033,3.0033,0,0,0,12,23Zm0-5a2,2,0,1,1-2,2A2.0023,2.0023,0,0,1,12,18Z"})]}),"PatternIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M10.45,4.3H4.85a.5.5,0,0,0-.5.5v5.6a.5.5,0,0,0,.5.5H10.45a.5.5,0,0,0,.5-.5V4.8A.5.5,0,0,0,10.45,4.3Zm-.5,5.6H5.35V5.3H9.95Z"}),C.jsx("path",{d:"M4.35,19.2a.5.5,0,0,0,.5.5H10.45a.5.5,0,0,0,.5-.5V13.6a.5.5,0,0,0-.5-.5H4.85a.5.5,0,0,0-.5.5Zm1-5.1H9.95v4.6H5.35Z"}),C.jsx("path",{d:"M19.15,8.8H13.55a.5.5,0,0,0-.5.5v5.6a.5.5,0,0,0,.5.5H19.15a.5.5,0,0,0,.5-.5V9.3A.5.5,0,0,0,19.15,8.8Zm-.5,5.6H14.05V9.8H18.65Z"})]}),"ProgrammingBlocksIcon");bt(C.jsxs(C.Fragment,{children:[C.jsx("path",{d:"M12,4.9A3.9,3.9,0,1,0,15.9,8.8,3.8582,3.8582,0,0,0,12,4.9Zm0,6.8a2.9,2.9,0,1,1,2.9-2.9A2.87,2.87,0,0,1,12,11.7Z"}),C.jsx("path",{d:"M4.94,19.0264a.4979.4979,0,0,0,.6866-.167A7.4482,7.4482,0,0,1,12,15.2a7.1937,7.1937,0,0,1,6.3643,3.6455.5.5,0,1,0,.8711-.4922A8.2925,8.2925,0,0,0,12,14.2a8.4386,8.4386,0,0,0-7.2266,4.14A.4992.4992,0,0,0,4.94,19.0264Z"})]}),"UserIcon");function k_e(t){return t==="continuous"||t==="revolute"||t==="prismatic"}const O_e=()=>{const t=Dr(r=>r.setJointValue),e=Dr(r=>r.jointMap),n=Object.keys(e).filter(r=>k_e(e[r].type));return C.jsxs(C.Fragment,{children:[C.jsx(mr,{variant:"h2",gutterBottom:!0,children:"Joint values"}),n.length>0?n.map(r=>C.jsx(T_e,{name:r,value:e[r].value,min:e[r].min,max:e[r].max,setValue:i=>t(r,i),icon:e[r].type==="continuous"||e[r].type==="revolute"?C.jsx(I_e,{}):e[r].type==="prismatic"?C.jsx(L_e,{}):void 0},`${r}_slider`)):C.jsx(mr,{pt:1,children:"No joints found"})]})},N_e=lt(_o)(()=>({marginLeft:"14px",display:"flex",flexGrow:1,alignItems:"flex-end"})),D_e=()=>{const t=nM();return C.jsxs(N_e,{children:[C.jsx(R_e,{}),C.jsx(m_e,{}),C.jsx(w_e,{}),t.data==="Build"?C.jsx(Kde,{}):C.jsx(x_e,{})]})};function F_e(t,e){return t.type===e.type?t.name"u"||!r.includes(t[n]))return!0}}const z_e=t=>{const{enqueueSnackbar:e}=wo(),n=Dr(c=>{var f;return(f=c.selected)==null?void 0:f.id}),{data:r,...i}=nM(),{data:s,...o}=Fde(t.enabled,t.familyId),{data:a,...l}=zde(t.enabled,n);return Zt.useEffect(()=>{var c,f,p,g,v,x;if(o.status==="error"){const _=o.error.response&&typeof o.error.response.data.message<"u"?`Failed to get the list of the available modules. +Error ${(c=o.error.response)==null?void 0:c.status}: ${o.error.response.data.message}`:`Failed to get the list of the available modules. +Error ${(f=o.error.response)==null?void 0:f.status}: ${(p=o.error.response)==null?void 0:p.statusText}.`;e(_,{variant:"error",style:{whiteSpace:"pre-line"}})}if(l.status==="error"){const _=l.error.response&&typeof l.error.response.data.message<"u"?`Failed to get the list of the allowed modules. +Error ${(g=l.error.response)==null?void 0:g.status}: ${l.error.response.data.message}`:`Failed to get the list of the allowed modules. +Error ${(v=l.error.response)==null?void 0:v.status}: ${(x=l.error.response)==null?void 0:x.statusText}.`;e(_,{variant:"error",style:{whiteSpace:"pre-line"}})}}),o.isLoading||typeof s>"u"||l.isLoading||i.isLoading||typeof r>"u"?C.jsx(_o,{component:"div",display:"flex",flexGrow:1,alignItems:"center",justifyContent:"center",children:C.jsx(ka,{})}):!t.familyId||s.length===0?C.jsx(mr,{pt:1,children:"No modules to show"}):C.jsx(bp,{spacing:1,sx:{paddingTop:1,overflow:"auto"},"aria-label":"modules-buttons",children:s.sort(F_e).map(c=>C.jsx(Gde,{module:c,disabled:U_e(c,a),onClick:()=>t.onClick(c)},c.name))})},B_e=()=>{const t=Dr(o=>o.setMeshId),[e,n]=Zt.useState({id:"",group:"",label:""}),[r,i]=Zt.useState(void 0),s=o=>{o&&t(),i(void 0)};return C.jsxs(C.Fragment,{children:[C.jsx(mr,{variant:"h2",gutterBottom:!0,children:"Add Module"}),C.jsxs(_o,{component:"div",paddingTop:1,display:"flex",flexDirection:"column",flexGrow:1,children:[C.jsx(Wde,{value:e,onChange:n}),C.jsx(z_e,{familyId:e.id,onClick:i})]}),typeof r<"u"&&C.jsx(nfe,{open:!0,onClose:s,module:r})]})},H_e=lt(_o)(({theme:t})=>({height:"100vh",minHeight:"100vh",padding:"12px",borderRadius:"28px",background:t.palette.background.paper,position:"absolute",top:0,right:0})),$_e=lt(_o)(()=>({flexGrow:1,display:"flex",flexDirection:"column-reverse",height:"96%"})),V_e=({...t})=>{const e=nM(),[n,r]=Zt.useState(0),i=(s,o)=>{r(o)};return e.isLoading||typeof e.data>"u"?C.jsx(Uc,{open:!0,"aria-label":"loading-screen",children:C.jsx(ka,{})}):C.jsxs(H_e,{...t,"aria-label":"modular-side-drawer",children:[C.jsx(D_e,{}),C.jsxs($_e,{children:[C.jsxs(Wle,{value:n,onChange:i,"aria-label":"side-drawer-tabs",variant:"fullWidth",sx:{flexShrink:0,borderTop:1,borderColor:"divider"},children:[C.jsx(YE,{label:C.jsx(Au,{title:"Add Modules",children:C.jsx(Jle,{})}),style:{pointerEvents:"auto"},...hC(0,"side-drawer-constructor-tab")}),C.jsx(YE,{label:C.jsx(Au,{title:"Set Joint Values",children:C.jsx(oce,{})}),style:{pointerEvents:"auto"},...hC(1,"side-drawer-joint-tab")}),C.jsx(YE,{label:C.jsx(Au,{title:"Settings",children:C.jsx(ice,{})}),style:{pointerEvents:"auto"},...hC(2,"side-drawer-jog-tab")})]}),C.jsx(HA,{value:n,index:0,children:C.jsx(B_e,{})}),C.jsx(HA,{value:n,index:1,children:C.jsx(O_e,{})}),C.jsx(c_e,{value:n,index:2})]})]})},SD=16777215,W_e=4469555,j_e=1118498,wD={"shadow-camera-left":-1,"shadow-camera-right":1,"shadow-camera-top":1,"shadow-camera-bottom":-1,"shadow-camera-near":1,"shadow-camera-far":4,"shadow-mapSize-width":1024,"shadow-mapSize-height":1024,bias:-.002},G_e=()=>{const t=sg(r=>r.configs),e=Dr(r=>r.meshId),n=Bu();return C.jsxs("div",{style:{height:window.innerHeight},children:[C.jsxs(bp,{direction:"row",columnGap:.5,sx:{position:"absolute",top:0,left:0,zIndex:1},children:[t.urdf.showStats&&C.jsx(f_e,{}),t.general.showHelpButtons&&C.jsx(p_e,{})]}),C.jsxs(Gye,{"aria-label":"modular-workspace",style:{zIndex:0},children:[C.jsx(wxe,{makeDefault:!0,position:[1,1,1.5],fov:75,near:.1,far:100}),C.jsx(Mxe,{makeDefault:!0}),C.jsx("hemisphereLight",{args:[W_e,j_e]}),C.jsx("directionalLight",{castShadow:!0,args:[SD,1.35],position:1,...wD}),C.jsx("directionalLight",{castShadow:!0,args:[SD,1.35],position:-1,...wD}),t.urdf.showMainGrid&&C.jsx("gridHelper",{args:[10,100,n.palette.background.paper,n.palette.background.paper]}),t.urdf.showMainAxes&&C.jsx("axesHelper",{args:[5]}),t.urdf.showTransformControls?C.jsx(Exe,{mode:"translate",children:C.jsx(Zt.Suspense,{fallback:null,children:C.jsx(yD,{meshId:e})})}):C.jsx(Zt.Suspense,{fallback:null,children:C.jsx(yD,{meshId:e})})]})]})},X_e=B8(_o)(()=>({height:"fit-content",minHeight:"100vh"})),q_e=()=>C.jsxs(X_e,{children:[C.jsx(G_e,{}),C.jsx(V_e,{})]});var ZP={},Z_e=pf;Object.defineProperty(ZP,"__esModule",{value:!0});var NB=ZP.default=void 0,Y_e=Z_e(_g()),K_e=C;NB=ZP.default=(0,Y_e.default)((0,K_e.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const sS=lt(R9)(({theme:t})=>` + &.notistack-MuiContent-success { + background-color: ${t.palette.background.paper}; + border: thin solid ${t.palette.success.main}; + color: ${t.palette.success.main}; + } + &.notistack-MuiContent-error { + background-color: ${t.palette.background.paper}; + border: thin solid ${t.palette.error.main}; + color: ${t.palette.error.main}; + } + &.notistack-MuiContent-warning { + background-color: ${t.palette.background.paper}; + border: thin solid ${t.palette.warning.main}; + color: ${t.palette.warning.main}; + } + &.notistack-MuiContent-info { + background-color: ${t.palette.background.paper}; + border: thin solid ${t.palette.info.main}; + color: ${t.palette.info.main}; + } +`),Q_e=lt(Vu)(({theme:t})=>({color:"inherit",padding:"8px 8px",transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest})})),J_e=({children:t})=>{const e=Zt.createRef(),n=r=>()=>{e.current&&e.current.closeSnackbar(r)};return C.jsx(Que,{ref:e,"aria-label":"notification-snackbar",Components:{success:sS,error:sS,warning:sS,info:sS},action:r=>C.jsx(Q_e,{onClick:n(r),children:C.jsx(NB,{})}),children:t})};function ebe(){const t=new TQ;return C.jsx(J_e,{children:C.jsx(LQ,{client:t,children:C.jsx(q_e,{})})})}const tbe=t=>{t&&t instanceof Function&&_xe(()=>import("./web-vitals-BhWu73fZ.js"),[]).then(({getCLS:e,getFID:n,getFCP:r,getLCP:i,getTTFB:s})=>{e(t),n(t),r(t),i(t),s(t)})};var MD={};const nbe=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function rbe(t){if("serviceWorker"in navigator){if(new URL(MD.PUBLIC_URL,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${MD.PUBLIC_URL}/service-worker.js`;nbe?(ibe(n,t),navigator.serviceWorker.ready.then(()=>{console.info("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):DB(n,t)})}}function DB(t,e){navigator.serviceWorker.register(t).then(n=>{n.onupdatefound=()=>{const r=n.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.info("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),e&&e.onUpdate&&e.onUpdate(n)):(console.info("Content is cached for offline use."),e&&e.onSuccess&&e.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function ibe(t,e){fetch(t,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(i=>{i.unregister().then(()=>{window.location.reload()})}):DB(t,e)}).catch(()=>{console.info("No internet connection found. App is running in offline mode.")})}const sbe=mC.createRoot(document.getElementById("root"));sbe.render(C.jsx(Zt.StrictMode,{children:C.jsxs(cQ,{theme:dQ,children:[C.jsx(BK,{}),C.jsx(ebe,{})]})}));rbe();tbe(); diff --git a/src/modular/web/modular_frontend/assets/web-vitals-BhWu73fZ.js b/src/modular/web/modular_frontend/assets/web-vitals-BhWu73fZ.js new file mode 100644 index 0000000..ec1bd78 --- /dev/null +++ b/src/modular/web/modular_frontend/assets/web-vitals-BhWu73fZ.js @@ -0,0 +1 @@ +var v,y,U,L,D,V=-1,m=function(t){addEventListener("pageshow",function(n){n.persisted&&(V=n.timeStamp,t(n))},!0)},M=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},S=function(){var t=M();return t&&t.activationStart||0},f=function(t,n){var r=M(),i="navigate";return V>=0?i="back-forward-cache":r&&(document.prerendering||S()>0?i="prerender":document.wasDiscarded?i="restore":r.type&&(i=r.type.replace(/_/g,"-"))),{name:t,value:n===void 0?-1:n,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},g=function(t,n,r){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var i=new PerformanceObserver(function(e){Promise.resolve().then(function(){n(e.getEntries())})});return i.observe(Object.assign({type:t,buffered:!0},r||{})),i}}catch{}},d=function(t,n,r,i){var e,a;return function(c){n.value>=0&&(c||i)&&((a=n.value-(e||0))||e===void 0)&&(e=n.value,n.delta=a,n.rating=function(u,o){return u>o[1]?"poor":u>o[0]?"needs-improvement":"good"}(n.value,r),t(n))}},k=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},P=function(t){var n=function(r){r.type!=="pagehide"&&document.visibilityState!=="hidden"||t(r)};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},B=function(t){var n=!1;return function(r){n||(t(r),n=!0)}},h=-1,R=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},w=function(t){document.visibilityState==="hidden"&&h>-1&&(h=t.type==="visibilitychange"?t.timeStamp:0,nn())},H=function(){addEventListener("visibilitychange",w,!0),addEventListener("prerenderingchange",w,!0)},nn=function(){removeEventListener("visibilitychange",w,!0),removeEventListener("prerenderingchange",w,!0)},x=function(){return h<0&&(h=R(),H(),m(function(){setTimeout(function(){h=R(),H()},0)})),{get firstHiddenTime(){return h}}},E=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},O=[1800,3e3],tn=function(t,n){n=n||{},E(function(){var r,i=x(),e=f("FCP"),a=g("paint",function(c){c.forEach(function(u){u.name==="first-contentful-paint"&&(a.disconnect(),u.startTimei.value&&(i.value=e,i.entries=a,r())},u=g("layout-shift",c);u&&(r=d(t,i,q,n.reportAllChanges),P(function(){c(u.takeRecords()),r(!0)}),m(function(){e=0,i=f("CLS",0),r=d(t,i,q,n.reportAllChanges),k(function(){return r()})}),setTimeout(r,0))}))},T={passive:!0,capture:!0},en=new Date,j=function(t,n){v||(v=n,y=t,U=new Date,X(removeEventListener),W())},W=function(){if(y>=0&&y1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?function(r,i){var e=function(){j(r,i),c()},a=function(){c()},c=function(){removeEventListener("pointerup",e,T),removeEventListener("pointercancel",a,T)};addEventListener("pointerup",e,T),addEventListener("pointercancel",a,T)}(n,t):j(n,t)}},X=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(n){return t(n,rn,T)})},_=[100,300],sn=function(t,n){n=n||{},E(function(){var r,i=x(),e=f("FID"),a=function(o){o.startTimen.latency){if(r)r.entries.push(t),r.latency=Math.max(r.latency,t.duration);else{var i={id:t.interactionId,latency:t.duration,entries:[t]};F[i.id]=i,l.push(i)}l.sort(function(e,a){return a.latency-e.latency}),l.splice(10).forEach(function(e){delete F[e.id]})}},fn=function(t,n){n=n||{},E(function(){var r;on();var i,e=f("INP"),a=function(u){u.forEach(function(p){p.interactionId&&J(p),p.entryType==="first-input"&&!l.some(function(b){return b.entries.some(function(N){return p.duration===N.duration&&p.startTime===N.startTime})})&&J(p)});var o,s=(o=Math.min(l.length-1,Math.floor(G()/50)),l[o]);s&&s.latency!==e.value&&(e.value=s.latency,e.entries=s.entries,i())},c=g("event",a,{durationThreshold:(r=n.durationThreshold)!==null&&r!==void 0?r:40});i=d(t,e,z,n.reportAllChanges),c&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&c.observe({type:"first-input",buffered:!0}),P(function(){a(c.takeRecords()),e.value<0&&G()>0&&(e.value=0,e.entries=[]),i(!0)}),m(function(){l=[],$=Z(),e=f("INP"),i=d(t,e,z,n.reportAllChanges)}))})},K=[2500,4e3],A={},dn=function(t,n){n=n||{},E(function(){var r,i=x(),e=f("LCP"),a=function(o){var s=o[o.length-1];s&&s.startTimeperformance.now())return;r.value=Math.max(a-S(),0),r.entries=[e],i(!0),m(function(){r=f("TTFB",0),(i=d(t,r,Q,n.reportAllChanges))(!0)})}})};export{q as CLSThresholds,O as FCPThresholds,_ as FIDThresholds,z as INPThresholds,K as LCPThresholds,Q as TTFBThresholds,un as getCLS,tn as getFCP,sn as getFID,fn as getINP,dn as getLCP,ln as getTTFB,un as onCLS,tn as onFCP,sn as onFID,fn as onINP,dn as onLCP,ln as onTTFB}; diff --git a/src/modular/web/modular_frontend/favicon.png b/src/modular/web/modular_frontend/favicon.png new file mode 100644 index 0000000..bc3d927 Binary files /dev/null and b/src/modular/web/modular_frontend/favicon.png differ diff --git a/src/modular/web/modular_frontend/favicon_dark.png b/src/modular/web/modular_frontend/favicon_dark.png new file mode 100644 index 0000000..07b61f5 Binary files /dev/null and b/src/modular/web/modular_frontend/favicon_dark.png differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-italic-400.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-italic-400.woff2 new file mode 100644 index 0000000..5feed63 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-italic-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-italic-500.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-italic-500.woff2 new file mode 100644 index 0000000..5feed63 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-italic-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-italic-600.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-italic-600.woff2 new file mode 100644 index 0000000..5feed63 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-italic-600.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-italic-700.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-italic-700.woff2 new file mode 100644 index 0000000..5feed63 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-italic-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-normal-400.woff2 new file mode 100644 index 0000000..35fe868 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-normal-500.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-normal-500.woff2 new file mode 100644 index 0000000..35fe868 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-normal-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-normal-600.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-normal-600.woff2 new file mode 100644 index 0000000..35fe868 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-normal-600.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-normal-700.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-normal-700.woff2 new file mode 100644 index 0000000..35fe868 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-ext-normal-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-italic-400.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-italic-400.woff2 new file mode 100644 index 0000000..bde7087 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-italic-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-italic-500.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-italic-500.woff2 new file mode 100644 index 0000000..bde7087 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-italic-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-italic-600.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-italic-600.woff2 new file mode 100644 index 0000000..bde7087 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-italic-600.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-italic-700.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-italic-700.woff2 new file mode 100644 index 0000000..bde7087 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-italic-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-normal-400.woff2 new file mode 100644 index 0000000..5d0a00f Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-normal-500.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-normal-500.woff2 new file mode 100644 index 0000000..5d0a00f Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-normal-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-normal-600.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-normal-600.woff2 new file mode 100644 index 0000000..5d0a00f Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-normal-600.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-normal-700.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-normal-700.woff2 new file mode 100644 index 0000000..5d0a00f Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-cyrillic-normal-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-italic-400.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-italic-400.woff2 new file mode 100644 index 0000000..a665866 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-italic-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-italic-500.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-italic-500.woff2 new file mode 100644 index 0000000..a665866 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-italic-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-italic-600.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-italic-600.woff2 new file mode 100644 index 0000000..a665866 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-italic-600.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-italic-700.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-italic-700.woff2 new file mode 100644 index 0000000..a665866 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-italic-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-normal-400.woff2 new file mode 100644 index 0000000..01bd997 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-normal-500.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-normal-500.woff2 new file mode 100644 index 0000000..01bd997 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-normal-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-normal-600.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-normal-600.woff2 new file mode 100644 index 0000000..01bd997 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-normal-600.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-normal-700.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-normal-700.woff2 new file mode 100644 index 0000000..01bd997 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-ext-normal-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-italic-400.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-italic-400.woff2 new file mode 100644 index 0000000..90d8994 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-italic-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-italic-500.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-italic-500.woff2 new file mode 100644 index 0000000..90d8994 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-italic-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-italic-600.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-italic-600.woff2 new file mode 100644 index 0000000..90d8994 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-italic-600.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-italic-700.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-italic-700.woff2 new file mode 100644 index 0000000..90d8994 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-italic-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-normal-400.woff2 new file mode 100644 index 0000000..ac2df17 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-normal-500.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-normal-500.woff2 new file mode 100644 index 0000000..ac2df17 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-normal-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-normal-600.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-normal-600.woff2 new file mode 100644 index 0000000..ac2df17 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-normal-600.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-normal-700.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-normal-700.woff2 new file mode 100644 index 0000000..ac2df17 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-latin-normal-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-italic-400.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-italic-400.woff2 new file mode 100644 index 0000000..c6a4d77 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-italic-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-italic-500.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-italic-500.woff2 new file mode 100644 index 0000000..c6a4d77 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-italic-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-italic-600.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-italic-600.woff2 new file mode 100644 index 0000000..c6a4d77 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-italic-600.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-italic-700.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-italic-700.woff2 new file mode 100644 index 0000000..c6a4d77 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-italic-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-normal-400.woff2 new file mode 100644 index 0000000..10065d6 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-normal-500.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-normal-500.woff2 new file mode 100644 index 0000000..10065d6 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-normal-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-normal-600.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-normal-600.woff2 new file mode 100644 index 0000000..10065d6 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-normal-600.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-normal-700.woff2 b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-normal-700.woff2 new file mode 100644 index 0000000..10065d6 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/exo2/v20/exo2-vietnamese-normal-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/materialicons/materialicons.css b/src/modular/web/modular_frontend/fonts/materialicons/materialicons.css new file mode 100644 index 0000000..c46257e --- /dev/null +++ b/src/modular/web/modular_frontend/fonts/materialicons/materialicons.css @@ -0,0 +1,23 @@ +/* fallback */ +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: url(fonts/materialicons/v140/materialicons-fallback-normal-400.woff2) format('woff2'); +} + +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -moz-font-feature-settings: 'liga'; + -moz-osx-font-smoothing: grayscale; +} diff --git a/src/modular/web/modular_frontend/fonts/materialicons/v140/materialicons-fallback-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/materialicons/v140/materialicons-fallback-normal-400.woff2 new file mode 100644 index 0000000..5492a6e Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/materialicons/v140/materialicons-fallback-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-italic-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-italic-400.woff2 new file mode 100644 index 0000000..9213da0 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-italic-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-italic-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-italic-500.woff2 new file mode 100644 index 0000000..997a45c Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-italic-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-italic-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-italic-700.woff2 new file mode 100644 index 0000000..6abf54d Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-italic-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-normal-400.woff2 new file mode 100644 index 0000000..22ddee9 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-normal-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-normal-500.woff2 new file mode 100644 index 0000000..8571683 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-normal-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-normal-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-normal-700.woff2 new file mode 100644 index 0000000..6399552 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-ext-normal-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-italic-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-italic-400.woff2 new file mode 100644 index 0000000..dd587a2 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-italic-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-italic-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-italic-500.woff2 new file mode 100644 index 0000000..cbe564b Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-italic-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-italic-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-italic-700.woff2 new file mode 100644 index 0000000..d2f30b5 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-italic-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-normal-400.woff2 new file mode 100644 index 0000000..47da362 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-normal-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-normal-500.woff2 new file mode 100644 index 0000000..cb5834f Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-normal-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-normal-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-normal-700.woff2 new file mode 100644 index 0000000..1bb7737 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-cyrillic-normal-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-italic-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-italic-400.woff2 new file mode 100644 index 0000000..508baef Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-italic-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-italic-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-italic-500.woff2 new file mode 100644 index 0000000..fecc185 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-italic-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-italic-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-italic-700.woff2 new file mode 100644 index 0000000..dd5a4a2 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-italic-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-normal-400.woff2 new file mode 100644 index 0000000..72ce0e9 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-normal-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-normal-500.woff2 new file mode 100644 index 0000000..064e94b Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-normal-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-normal-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-normal-700.woff2 new file mode 100644 index 0000000..a0d68e2 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-ext-normal-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-italic-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-italic-400.woff2 new file mode 100644 index 0000000..e0d3c43 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-italic-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-italic-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-italic-500.woff2 new file mode 100644 index 0000000..9997e98 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-italic-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-italic-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-italic-700.woff2 new file mode 100644 index 0000000..c8091bc Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-italic-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-normal-400.woff2 new file mode 100644 index 0000000..fc71d94 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-normal-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-normal-500.woff2 new file mode 100644 index 0000000..0933dfe Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-normal-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-normal-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-normal-700.woff2 new file mode 100644 index 0000000..cb9bfa7 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-greek-normal-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-italic-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-italic-400.woff2 new file mode 100644 index 0000000..ef920e5 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-italic-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-italic-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-italic-500.woff2 new file mode 100644 index 0000000..e0d4123 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-italic-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-italic-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-italic-700.woff2 new file mode 100644 index 0000000..c88b8ae Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-italic-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-normal-400.woff2 new file mode 100644 index 0000000..8a8de61 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-normal-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-normal-500.woff2 new file mode 100644 index 0000000..68f094c Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-normal-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-normal-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-normal-700.woff2 new file mode 100644 index 0000000..94ab5fb Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-ext-normal-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-italic-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-italic-400.woff2 new file mode 100644 index 0000000..e1b7a79 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-italic-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-italic-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-italic-500.woff2 new file mode 100644 index 0000000..ae1933f Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-italic-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-italic-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-italic-700.woff2 new file mode 100644 index 0000000..a56a6ed Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-italic-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-normal-400.woff2 new file mode 100644 index 0000000..020729e Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-normal-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-normal-500.woff2 new file mode 100644 index 0000000..29342a8 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-normal-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-normal-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-normal-700.woff2 new file mode 100644 index 0000000..771fbec Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-latin-normal-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-italic-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-italic-400.woff2 new file mode 100644 index 0000000..9a378af Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-italic-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-italic-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-italic-500.woff2 new file mode 100644 index 0000000..1f579aa Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-italic-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-italic-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-italic-700.woff2 new file mode 100644 index 0000000..6363b1c Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-italic-700.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-normal-400.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-normal-400.woff2 new file mode 100644 index 0000000..6284d2e Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-normal-400.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-normal-500.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-normal-500.woff2 new file mode 100644 index 0000000..6b0b4af Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-normal-500.woff2 differ diff --git a/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-normal-700.woff2 b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-normal-700.woff2 new file mode 100644 index 0000000..3c45011 Binary files /dev/null and b/src/modular/web/modular_frontend/fonts/roboto/v30/roboto-vietnamese-normal-700.woff2 differ diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.0.2.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.0.2.md new file mode 100644 index 0000000..feda6e2 --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.0.2.md @@ -0,0 +1,5 @@ +# v1.0.0-alpha.0.2 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.0.1...v1.0.0-alpha.0.2 +## What's Changed +### Maintenance +* 👷 chore(ci): fix deploy path and commit message by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/180 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.0.3.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.0.3.md new file mode 100644 index 0000000..c2d638b --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.0.3.md @@ -0,0 +1,32 @@ +# v1.0.0-alpha.0.3 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.0.2...v1.0.0-alpha.0.3 +## What's Changed +### New Features +* ✨ feat(#186): Allow adding passive modules in discovery mode by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/210 +### Bug Fixes +* 🐛 fix(#183): Fix delete button disabled for non-joint modules by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/207 +### Maintenance +* 👷 chore(ci): speed-up test run on TravisCI by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/182 +* 👷 chore(dependabot): disable automatic rebase by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/188 +* ♻️ refactor(modular): add notification for passive End-Effectors on discovery by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/208 +### Dependencies +* ⬆️ chore(deps-dev): Bump recursive-readdir from 2.2.2 to 2.2.3 by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/185 +* ⬆️ chore(deps-dev): Bump typescript from 4.7.4 to 4.9.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/189 +* ⬆️ chore(deps): Bump react-router-dom from 6.12.0 to 6.12.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/190 +* ⬆️ chore(deps): Bump @emotion/react from 11.11.0 to 11.11.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/192 +* ⬆️ chore(deps-dev): bump webpack from 5.85.1 to 5.87.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/209 +* ⬆️ chore(deps): Bump react-error-boundary from 4.0.9 to 4.0.10 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/197 +* ⬆️ chore(deps-dev): Bump msw from 1.2.1 to 1.2.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/198 +* ⬆️ chore(deps-dev): Bump @types/node from 18.16.16 to 18.16.18 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/200 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.8 to 18.2.12 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/201 +* ⬆️ chore(deps-dev): Bump @types/react-dom from 18.2.4 to 18.2.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/202 +* ⬆️ chore(deps): Bump @react-three/drei from 9.72.2 to 9.74.15 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/211 +* ⬆️ chore(deps): Bump @react-three/fiber from 8.13.0 to 8.13.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/206 +* ⬆️ chore(deps-dev): Bump sinon from 15.1.0 to 15.1.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/212 +* ⬆️ chore(deps-dev): Bump @testing-library/dom from 9.3.0 to 9.3.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/213 +* ⬆️ chore(deps): Bump @react-three/drei from 9.74.15 to 9.74.16 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/214 +* ⬆️ chore(deps): Bump react-router-dom from 6.12.1 to 6.13.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/216 +* ⬆️ chore(deps): Bump @mui/material from 5.13.4 to 5.13.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/218 +* ⬆️ chore(deps): Bump @tanstack/react-query-devtools from 4.29.12 to 4.29.14 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/219 +* ⬆️ chore(deps): Bump @react-three/drei from 9.74.16 to 9.76.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/220 +* ⬆️ chore(deps-dev): Bump storybook from 7.0.20 to 7.0.22 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/221 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.0.4.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.0.4.md new file mode 100644 index 0000000..2816148 --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.0.4.md @@ -0,0 +1,58 @@ +# v1.0.0-alpha.0.4 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.0.3...v1.0.0-alpha.0.4 +## What's Changed +### Bug Fixes +* ♻️ refactor(modular): remove floating joints from joint list by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/288 +### Maintenance +* ♻️ refactor(modular): update default robot name on deploy by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/287 +### Dependencies +* ⬆️ chore(deps-dev): Bump @types/react-dom from 18.2.5 to 18.2.6 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/223 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.12 to 18.2.13 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/224 +* ⬆️ chore(deps): Bump @react-three/drei from 9.76.1 to 9.77.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/225 +* ⬆️ chore(deps-dev): Bump @types/node from 18.16.18 to 18.16.19 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/226 +* ⬆️ chore(deps): Bump @react-three/fiber from 8.13.3 to 8.13.4 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/228 +* ⬆️ chore(deps): Bump @mui/icons-material from 5.11.16 to 5.13.7 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/240 +* ⬆️ chore(deps): Bump zustand from 4.3.8 to 4.3.9 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/241 +* ⬆️ chore(deps): Bump @tanstack/react-query-devtools from 4.29.14 to 4.29.19 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/230 +* ⬆️ chore(deps-dev): Bump sinon from 15.1.2 to 15.2.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/229 +* ⬆️ chore(deps-dev): Bump webpack from 5.87.0 to 5.88.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/232 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.13 to 18.2.14 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/234 +* ⬆️ chore(deps): Bump react-router-dom from 6.13.0 to 6.14.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/235 +* ⬆️ chore(deps): Bump @react-three/drei from 9.77.0 to 9.78.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/236 +* ⬆️ chore(deps): Bump @mui/material from 5.13.5 to 5.13.7 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/237 +* ⬆️ chore(deps): Bump tough-cookie from 4.1.2 to 4.1.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/242 +* ⬆️ chore(deps-dev): Bump storybook from 7.0.22 to 7.0.26 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/239 +* ⬆️ chore(deps): Bump web-vitals from 3.3.2 to 3.4.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/243 +* ⬆️ chore(deps-dev): Bump @types/jest from 29.5.2 to 29.5.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/244 +* ⬆️ chore(deps-dev): Bump @types/three from 0.152.1 to 0.153.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/245 +* ⬆️ chore(deps): Bump @mui/icons-material from 5.13.7 to 5.14.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/246 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.14 to 18.2.15 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/248 +* ⬆️ chore(deps-dev): Bump @types/react-dom from 18.2.6 to 18.2.7 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/249 +* ⬆️ chore(deps): Bump @react-three/drei from 9.78.1 to 9.78.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/250 +* ⬆️ chore(deps): Bump @tanstack/react-query-devtools from 4.29.19 to 4.29.25 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/251 +* ⬆️ chore(deps-dev): Bump storybook from 7.0.26 to 7.0.27 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/247 +* ⬆️ chore(deps): Bump @mui/material from 5.13.7 to 5.14.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/252 +* ⬆️ chore(deps-dev): Bump @types/three from 0.153.0 to 0.154.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/253 +* ⬆️ chore(deps): Bump @react-three/fiber from 8.13.4 to 8.13.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/254 +* ⬆️ chore(deps-dev): Bump webpack from 5.88.1 to 5.88.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/255 +* ⬆️ chore(deps): Bump react-router-dom from 6.14.1 to 6.14.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/256 +* ⬆️ chore(deps): Bump @react-three/drei from 9.78.2 to 9.79.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/257 +* ⬆️ chore(deps-dev): Bump @testing-library/jest-dom from 5.16.5 to 5.17.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/258 +* ⬆️ chore(deps-dev): Bump storybook from 7.0.27 to 7.1.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/267 +* ⬆️ chore(deps): Bump @mui/icons-material from 5.14.0 to 5.14.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/260 +* ⬆️ chore(deps-dev): Bump word-wrap from 1.2.3 to 1.2.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/268 +* ⬆️ chore(deps-dev): Bump msw from 1.2.2 to 1.2.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/263 +* ⬆️ chore(deps-dev): Bump @types/node from 18.16.19 to 18.17.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/264 +* ⬆️ chore(deps): Bump @tanstack/react-query-devtools from 4.29.25 to 4.32.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/265 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.15 to 18.2.16 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/266 +* ⬆️ chore(deps): Bump @mui/material from 5.14.0 to 5.14.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/269 +* ⬆️ chore(deps-dev): Bump @types/lodash from 4.14.195 to 4.14.196 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/270 +* ⬆️ chore(deps-dev): Bump @types/node from 18.17.0 to 18.17.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/271 +* ⬆️ chore(deps): Bump @react-three/drei from 9.79.3 to 9.79.4 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/272 +* ⬆️ chore(deps): Bump @react-three/drei from 9.79.4 to 9.80.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/273 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.16 to 18.2.17 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/274 +* ⬆️ chore(deps): Bump @react-three/fiber from 8.13.5 to 8.13.6 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/275 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.17 to 18.2.18 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/278 +* ⬆️ chore(deps): Bump zustand from 4.3.9 to 4.4.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/279 +* ⬆️ chore(deps-dev): Bump @types/three from 0.154.0 to 0.155.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/280 +* ⬆️ chore(deps): Bump @mui/icons-material from 5.14.1 to 5.14.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/281 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.1.0.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.1.0.md new file mode 100644 index 0000000..0cda29e --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.1.0.md @@ -0,0 +1,76 @@ +# v1.0.0-alpha.1.0 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.0.4...v1.0.0-alpha.1.0 +## What's Changed +### New Features +* ✨ feat(urdf): add custom `URDFLoader` by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/390 +### Maintenance +* ♻️ refactor(icons): use Mui `createSvgIcon` by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/277 +### Dependencies +* ⬆️ chore(deps-dev): Bump @types/sinon from 10.0.15 to 10.0.16 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/283 +* ⬆️ chore(deps): Bump zustand from 4.4.0 to 4.4.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/294 +* ⬆️ chore(deps-dev): Bump @types/lodash from 4.14.196 to 4.14.197 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/299 +* ⬆️ chore(deps): Bump react-error-boundary from 4.0.10 to 4.0.11 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/302 +* ⬆️ chore(deps): Bump react-router-dom from 6.14.2 to 6.15.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/303 +* ⬆️ chore(deps): Bump @tanstack/react-query-devtools from 4.32.0 to 4.33.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/312 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.18 to 18.2.21 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/314 +* ⬆️ chore(deps-dev): Bump @types/node from 18.17.1 to 18.17.12 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/322 +* ⬆️ chore(deps): Bump @react-three/drei from 9.80.0 to 9.80.9 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/323 +* ⬆️ chore(deps): Bump @mui/material from 5.14.2 to 5.14.7 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/325 +* ⬆️ chore(deps): Bump @mui/icons-material from 5.14.3 to 5.14.7 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/327 +* ⬆️ chore(deps): Bump axios from 1.4.0 to 1.5.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/326 +* ⬆️ chore(deps): Bump @react-three/fiber from 8.13.6 to 8.13.7 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/328 +* ⬆️ chore(deps-dev): Bump @types/jest from 29.5.3 to 29.5.4 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/329 +* ⬆️ chore(deps-dev): Bump msw from 1.2.3 to 1.2.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/331 +* ⬆️ chore(deps-dev): Bump @testing-library/jest-dom from 5.17.0 to 6.1.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/332 +* ⬆️ chore(deps-dev): bump @types/three from 0.155.0 to 0.155.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/333 +* ⬆️ chore(deps-dev): bump msw from 1.2.5 to 1.3.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/334 +* ⬆️ chore(deps): bump @react-three/fiber from 8.13.7 to 8.13.9 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/335 +* ⬆️ chore(deps-dev): bump @types/node from 18.17.12 to 18.17.14 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/336 +* ⬆️ chore(deps): bump @react-three/drei from 9.80.9 to 9.81.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/337 +* ⬆️ chore(deps): bump @react-three/fiber from 8.13.9 to 8.14.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/338 +* ⬆️ chore(deps): bump @react-three/drei from 9.81.0 to 9.82.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/339 +* ⬆️ chore(deps): bump @mui/icons-material from 5.14.7 to 5.14.8 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/340 +* ⬆️ chore(deps-dev): bump @testing-library/jest-dom from 6.1.2 to 6.1.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/341 +* ⬆️ chore(deps-dev): bump @types/lodash from 4.14.197 to 4.14.198 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/342 +* ⬆️ chore(deps): bump @mui/material from 5.14.7 to 5.14.8 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/343 +* ⬆️ chore(deps): bump @react-three/drei from 9.82.0 to 9.83.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/344 +* ⬆️ chore(deps): bump @tanstack/react-query-devtools from 4.33.0 to 4.35.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/346 +* ⬆️ chore(deps): bump @react-three/drei from 9.83.1 to 9.83.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/345 +* ⬆️ chore(deps-dev): bump @types/node from 18.17.14 to 18.17.15 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/348 +* ⬆️ chore(deps): bump @react-three/drei from 9.83.3 to 9.83.9 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/349 +* ⬆️ chore(deps-dev): bump @types/three from 0.155.1 to 0.156.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/350 +* ⬆️ chore(deps-dev): bump storybook and its add-ons from 7.4.0 to 7.4.1 by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/351 +* ⬆️ chore(deps): bump @mui/icons-material from 5.14.8 to 5.14.9 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/353 +* ⬆️ chore(deps): bump @mui/material from 5.14.8 to 5.14.9 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/354 +* ⬆️ chore(deps): bump @tanstack/react-query-devtools from 4.35.0 to 4.35.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/355 +* ⬆️ chore(deps): bump react-router-dom from 6.15.0 to 6.16.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/358 +* ⬆️ chore(deps-dev): bump sinon from 15.2.0 to 16.0.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/359 +* ⬆️ chore(deps-dev): bump msw from 1.3.0 to 1.3.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/357 +* ⬆️ chore(deps-dev): Bump @testing-library/user-event from 14.4.3 to 14.5.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/360 +* ⬆️ chore(deps-dev): bump @types/node from 18.17.15 to 18.17.17 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/362 +* ⬆️ chore(deps-dev): bump @testing-library/dom from 9.3.1 to 9.3.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/363 +* ⬆️ chore(deps): bump @react-three/fiber from 8.14.1 to 8.14.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/364 +* ⬆️ chore(deps-dev): bump @types/react from 18.2.21 to 18.2.22 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/367 +* ⬆️ chore(deps): bump @mui/material from 5.14.9 to 5.14.10 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/369 +* ⬆️ chore(deps-dev): bump @testing-library/user-event from 14.5.0 to 14.5.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/365 +* ⬆️ chore(deps-dev): bump @types/jest from 29.5.4 to 29.5.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/366 +* ⬆️ chore(deps-dev): bump @types/node from 18.17.17 to 18.17.18 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/370 +* ⬆️ chore(deps): bump @react-three/drei from 9.83.9 to 9.84.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/372 +* ⬆️ chore(deps-dev): bump storybook from 7.4.1 to 7.4.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/373 +* ⬆️ chore(deps-dev): Bump typescript from 4.9.5 to 5.2.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/330 +* ⬆️ chore(deps): Bump @react-three/drei from 9.84.2 to 9.84.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/374 +* ⬆️ chore(deps-dev): Bump @types/lodash from 4.14.198 to 4.14.199 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/375 +* ⬆️ chore(deps-dev): Bump @types/node from 18.17.18 to 18.17.19 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/377 +* ⬆️ chore(deps-dev): bump @types/node from 18.17.19 to 18.18.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/379 +* ⬆️ chore(deps): Bump @react-three/fiber from 8.14.2 to 8.14.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/378 +* ⬆️ chore(deps-dev): bump @typescript-eslint/eslint-plugin from 6.7.2 to 6.7.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/380 +* ⬆️ chore(deps-dev): bump @types/sinon from 10.0.16 to 10.0.17 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/381 +* ⬆️ chore(deps-dev): Bump storybook from 7.4.3 to 7.4.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/376 +* ⬆️ chore(deps): bump @react-three/drei from 9.84.3 to 9.85.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/382 +* ⬆️ chore(deps-dev): bump @typescript-eslint/parser from 6.7.2 to 6.7.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/383 +* ⬆️ chore(deps-dev): bump @types/react from 18.2.22 to 18.2.23 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/384 +* ⬆️ chore(deps): bump axios from 1.5.0 to 1.5.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/385 +* ⬆️ chore(deps): bump @mui/icons-material from 5.14.9 to 5.14.11 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/386 +* ⬆️ chore(deps): bump @mui/material from 5.14.10 to 5.14.11 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/387 +* ⬆️ chore(deps-dev): bump @types/react-dom from 18.2.7 to 18.2.8 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/388 +* ⬆️ chore(deps): bump @react-three/drei from 9.85.0 to 9.86.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/389 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.10.1.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.10.1.md new file mode 100644 index 0000000..52ad713 --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.10.1.md @@ -0,0 +1,5 @@ +# v1.0.0-alpha.10.1 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.10.0...v1.0.0-alpha.10.1 +## What's Changed +### Bug Fixes +* 🐛 fix(modules): fix delete button always enabled by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/945 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.2.1.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.2.1.md new file mode 100644 index 0000000..462bf79 --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.2.1.md @@ -0,0 +1,8 @@ +# v1.0.0-alpha.2.1 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.2.0...v1.0.0-alpha.2.1 +## What's Changed +### Maintenance +* 👷 chore(ci): fix deploy pipeline by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/413 +### Dependencies +* ⬆️ chore(deps-dev): bump @typescript-eslint/parser from 6.7.3 to 6.7.4 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/409 +* ⬆️ chore(deps): bump zustand from 4.4.1 to 4.4.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/410 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.3.0.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.3.0.md new file mode 100644 index 0000000..57b66e6 --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.3.0.md @@ -0,0 +1,26 @@ +# v1.0.0-alpha.3.0 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.2.1...v1.0.0-alpha.3.0 +## What's Changed +### New Features +* ✨ feat(pwa): make app PWA compliant by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/448 +* ✨ feat(api): add module addons by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/449 +* ✨ feat(web): optionally download deployed model by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/451 +### Maintenance +* 👷 chore(ci): use selfhosted runner by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/436 +* 👷 chore(ci): reinstate travisCI by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/443 +### Dependencies +* ⬆️ chore(deps-dev): bump storybook from 7.4.5 to 7.4.6 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/415 +* ⬆️ chore(deps-dev): Bump @types/react-dom from 18.2.8 to 18.2.10 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/419 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.24 to 18.2.25 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/418 +* ⬆️ chore(deps): Bump @mui/icons-material from 5.14.11 to 5.14.12 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/420 +* ⬆️ chore(deps): Bump @mui/material from 5.14.11 to 5.14.12 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/421 +* ⬆️ chore(deps-dev): bump sinon from 16.0.0 to 16.1.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/423 +* ⬆️ chore(deps): bump zustand from 4.4.2 to 4.4.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/422 +* ⬆️ chore(deps): bump @tanstack/react-query from 4.35.7 to 4.36.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/425 +* ⬆️ chore(deps): bump @react-three/drei from 9.86.3 to 9.88.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/437 +* ⬆️ chore(deps): bump @tanstack/react-query-devtools from 4.35.7 to 4.36.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/424 +* ⬆️ chore(deps-dev): bump @types/sinon from 10.0.18 to 10.0.19 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/429 +* ⬆️ chore(deps-dev): bump msw-storybook-addon from 1.8.0 to 1.9.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/432 +* ⬆️ chore(deps): bump @react-three/fiber from 8.14.4 to 8.14.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/427 +* ⬆️ chore(deps-dev): bump @typescript-eslint/eslint-plugin from 6.7.4 to 6.7.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/434 +* ⬆️ chore(deps-dev): bump @types/node from 18.18.3 to 18.18.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/444 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.3.1.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.3.1.md new file mode 100644 index 0000000..025d37a --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.3.1.md @@ -0,0 +1,11 @@ +# v1.0.0-alpha.3.1 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.3.0...v1.0.0-alpha.3.1 +## What's Changed +### Maintenance +* ♻️ refactor: rename modules' `product` param to `name` by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/456 +### Dependencies +* ⬆️ chore(deps-dev): bump @types/react from 18.2.25 to 18.2.28 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/438 +* ⬆️ chore(deps): bump @mui/icons-material from 5.14.12 to 5.14.13 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/439 +* ⬆️ chore(deps-dev): bump @types/three from 0.156.0 to 0.157.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/440 +* ⬆️ chore(deps-dev): bump @types/react-dom from 18.2.10 to 18.2.13 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/441 +* ⬆️ chore(deps-dev): bump @testing-library/jest-dom from 6.1.3 to 6.1.4 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/445 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.4.0.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.4.0.md new file mode 100644 index 0000000..0eb4714 --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.4.0.md @@ -0,0 +1,41 @@ +# v1.0.0-alpha.4.0 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.3.1...v1.0.0-alpha.4.0 +## What's Changed +### New Features +* ✨ feat(modular): allow to edit modules' configs by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/516 +* ✨ feat(#524): add support for multi chain robots by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/527 +### Maintenance +* ♻️ refactor(modular): improve error handling by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/523 +### Dependencies +* ⬆️ chore(deps-dev): bump @typescript-eslint/parser from 6.7.4 to 6.8.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/453 +* ⬆️ chore(deps-dev): bump @typescript-eslint/eslint-plugin from 6.7.5 to 6.8.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/452 +* ⬆️ chore(deps): bump @babel/traverse from 7.22.8 to 7.23.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/455 +* ⬆️ chore(deps-dev): bump webpack from 5.88.2 to 5.89.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/450 +* ⬆️ chore(deps): bump @mui/material from 5.14.12 to 5.14.14 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/459 +* ⬆️ chore(deps): bump @react-three/fiber from 8.14.5 to 8.14.6 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/461 +* ⬆️ chore(deps): bump @mui/icons-material from 5.14.13 to 5.14.14 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/462 +* ⬆️ chore(deps): bump react-router-dom from 6.16.0 to 6.17.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/463 +* ⬆️ chore(deps-dev): bump @types/node from 18.18.5 to 18.18.6 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/464 +* ⬆️ chore(deps-dev): bump @types/react-dom from 18.2.13 to 18.2.14 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/466 +* ⬆️ chore(deps-dev): bump @types/jest from 29.5.5 to 29.5.6 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/469 +* ➕ chore(deps): add dependecy three by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/475 +* ⬆️ chore(deps-dev): bump @types/three from 0.157.0 to 0.157.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/471 +* ⬆️ chore(deps-dev): bump sinon from 16.1.0 to 16.1.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/472 +* ⬆️ chore(deps-dev): bump @types/react from 18.2.28 to 18.2.31 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/476 +* ⬆️ chore(deps-dev): bump @types/lodash from 4.14.199 to 4.14.200 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/474 +* ⬆️ chore(deps-dev): bump storybook from 7.4.6 to 7.5.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/470 +* ⬆️ chore(deps-dev): bump eslint-plugin-jest from 27.4.2 to 27.4.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/477 +* ⬆️ chore(deps): bump axios from 1.5.1 to 1.6.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/490 +* ⬆️ chore(deps): bump @react-three/fiber from 8.14.6 to 8.15.8 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/491 +* ⬆️ chore(deps-dev): bump sinon from 16.1.3 to 17.0.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/478 +* ⬆️ chore(deps): bump zustand from 4.4.3 to 4.4.4 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/479 +* ⬆️ chore(deps): bump @mui/material from 5.14.14 to 5.14.15 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/485 +* ⬆️ chore(deps-dev): bump sinon and @types/sinon by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/506 +* ⬆️ chore(deps-dev): bump msw-storybook-addon from 1.9.0 to 1.10.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/494 +* ⬆️ chore(deps-dev): bump @typescript-eslint/parser from 6.8.0 to 6.10.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/507 +* ⬆️ chore(deps): bump @mui/icons-material from 5.14.14 to 5.14.16 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/499 +* ⬆️ chore(deps): bump three from 0.157.0 to 0.158.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/495 +* ⬆️ chore(deps): Bump axios from 1.6.0 to 1.6.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/518 +* ⬆️ chore(deps-dev): bump @typescript-eslint/eslint-plugin from 6.8.0 to 6.10.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/508 +* ⬆️ chore(deps-dev): bump @types/react from 18.2.31 to 18.2.37 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/512 +* ⬆️ chore(deps-dev): bump @types/node from 18.18.6 to 18.18.9 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/513 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.4.1.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.4.1.md new file mode 100644 index 0000000..f41c679 --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.4.1.md @@ -0,0 +1,20 @@ +# v1.0.0-alpha.4.1 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.4.0...v1.0.0-alpha.4.1 +## What's Changed +### Maintenance +* ♻️ refactor(#524):update selected module on add/remove by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/542 +* 👷 chore(ci): fix release tag by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/543 +### Dependencies +* ⬆️ chore(deps-dev): bump @types/jest from 29.5.6 to 29.5.8 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/514 +* ⬆️ chore(deps-dev): Bump storybook from 7.5.1 to 7.5.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/520 +* ⬆️ chore(deps-dev): Bump @testing-library/react from 14.0.0 to 14.1.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/519 +* ⬆️ chore(deps-dev): Bump @types/lodash from 4.14.200 to 4.14.201 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/530 +* ⬆️ chore(deps-dev): Bump @types/react-dom from 18.2.14 to 18.2.15 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/521 +* ⬆️ chore(deps): Bump nanoid from 3.3.6 to 3.3.7 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/522 +* ⬆️ chore(deps-dev): Bump @typescript-eslint/eslint-plugin from 6.10.0 to 6.11.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/526 +* ⬆️ chore(deps-dev): Bump eslint-plugin-jest from 27.4.3 to 27.6.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/532 +* ⬆️ chore(deps-dev): Bump @typescript-eslint/parser from 6.10.0 to 6.11.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/537 +* ⬆️ chore(deps): Bump react-router-dom from 6.17.0 to 6.18.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/531 +* ⬆️ chore(deps): Bump @mui/material from 5.14.15 to 5.14.18 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/534 +* ⬆️ chore(deps): Bump zustand from 4.4.4 to 4.4.6 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/535 +* ⬆️ chore(deps-dev): Bump @types/three from 0.157.2 to 0.158.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/536 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.5.0.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.5.0.md new file mode 100644 index 0000000..ed7d81f --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.5.0.md @@ -0,0 +1,15 @@ +# v1.0.0-alpha.5.0 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.4.1...v1.0.0-alpha.5.0 +## What's Changed +### Maintenance +* ♻️ refactor(modular): add fallback label to module button by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/551 +* ♻️ refactor(#510): Improve offset input by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/552 +* ♻️ refactor(#550): get allowed module types from backend by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/562 +### Dependencies +* ⬆️ chore(deps): Bump @react-three/fiber from 8.15.8 to 8.15.11 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/539 +* ⬆️ chore(deps): Bump axios from 1.6.1 to 1.6.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/540 +* ⬆️ chore(deps): Bump react-router-dom from 6.18.0 to 6.19.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/545 +* ⬆️ chore(deps): Bump @mui/icons-material from 5.14.16 to 5.14.18 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/541 +* ⬆️ chore(deps-dev): Bump @types/node from 18.18.9 to 18.18.10 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/548 +* ⬆️ chore(deps-dev): Bump @testing-library/react from 14.1.0 to 14.1.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/549 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.37 to 18.2.38 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/553 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.6.1.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.6.1.md new file mode 100644 index 0000000..b47bdc4 --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.6.1.md @@ -0,0 +1,37 @@ +# v1.0.0-alpha.6.1 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.6.0...v1.0.0-alpha.6.1 +## What's Changed +### Bug Fixes +* 🐛 fix(#632): fix module selction logic on mesh click by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/633 +* 🐛 fix(#634): fix texfield input of the joint homing values by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/635 +### Dependencies +* ⬆️ chore(deps): Bump @mui/material from 5.14.18 to 5.14.19 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/595 +* ⬆️ chore(deps): Bump @mui/icons-material from 5.14.18 to 5.14.19 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/596 +* ⬆️ chore(deps-dev): Bump @testing-library/jest-dom from 6.1.4 to 6.1.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/598 +* ⬆️ chore(deps): Bump three and @types/three by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/600 +* ⬆️ chore(deps-dev): Bump @types/node from 18.18.13 to 18.19.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/599 +* ⬆️ chore(deps-dev): Bump the storybook group with 9 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/603 +* ⬆️ chore(deps): Bump @react-three/fiber from 8.15.11 to 8.15.12 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/605 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.39 to 18.2.41 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/606 +* ⬆️ chore(deps-dev): Bump @types/node from 18.19.0 to 18.19.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/607 +* ⬆️ chore(deps): Bump react-router-dom from 6.20.0 to 6.20.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/608 +* ⬆️ chore(deps-dev): Bump the typescript-eslint group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/609 +* ⬆️ chore(deps): Bump vite from 5.0.4 to 5.0.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/612 +* ⬆️ chore(deps): Bump @react-three/drei from 9.88.0 to 9.90.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/610 +* ⬆️ chore(deps): Bump @vitejs/plugin-react from 4.2.0 to 4.2.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/611 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.41 to 18.2.42 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/613 +* ⬆️ chore(deps): Bump @mui/material from 5.14.19 to 5.14.20 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/615 +* ⬆️ chore(deps-dev): Bump @types/jest from 29.5.10 to 29.5.11 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/614 +* ⬆️ chore(deps): Bump vite from 5.0.5 to 5.0.6 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/616 +* ⬆️ chore(deps-dev): Bump the storybook group with 9 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/617 +* ⬆️ chore(deps-dev): Bump @types/node from 18.19.2 to 18.19.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/618 +* ⬆️ chore(deps): Bump vite-tsconfig-paths from 4.2.1 to 4.2.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/620 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.42 to 18.2.43 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/621 +* ⬆️ chore(deps-dev): Bump the typescript-eslint group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/626 +* ⬆️ chore(deps-dev): Bump ts-node from 10.9.1 to 10.9.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/624 +* ⬆️ chore(deps): Bump vite from 5.0.6 to 5.0.7 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/623 +* ⬆️ chore(deps): Bump @react-three/drei from 9.90.0 to 9.92.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/627 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.43 to 18.2.45 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/628 +* ⬆️ chore(deps): Bump @mui/icons-material from 5.14.19 to 5.15.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/629 +* ⬆️ chore(deps): Bump @mui/material from 5.14.20 to 5.15.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/630 +* ⬆️ chore(deps): Bump vite from 5.0.7 to 5.0.8 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/631 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.7.0.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.7.0.md new file mode 100644 index 0000000..90fd718 --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.7.0.md @@ -0,0 +1,47 @@ +# v1.0.0-alpha.7.0 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.6.1...v1.0.0-alpha.7.0 +## What's Changed +### Bug Fixes +* 🐛 fix(api): Cleanup robot model query invalidation by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/651 +* 🐛 fix(#680): Detach joint map from URDF loader by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/681 +### Maintenance +* ✅ test(jest): Extend test timeout to 15s by @m-tartari in https://github.com/ADVRHumanoids/modular_frontend/pull/688 +### Dependencies +* ⬆️ chore(deps): Bump react-router-dom from 6.20.1 to 6.21.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/637 +* ⬆️ chore(deps): Bump @react-three/drei from 9.92.1 to 9.92.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/638 +* ⬆️ chore(deps): Bump vite from 5.0.8 to 5.0.9 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/639 +* ⬆️ chore(deps-dev): Bump the storybook group with 9 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/640 +* ⬆️ chore(deps): Bump react-error-boundary from 4.0.11 to 4.0.12 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/641 +* ⬆️ chore(deps-dev): Bump @types/react-dom from 18.2.17 to 18.2.18 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/643 +* ⬆️ chore(deps): Bump @react-three/drei from 9.92.3 to 9.92.4 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/644 +* ⬆️ chore(deps-dev): Bump regenerator-runtime from 0.14.0 to 0.14.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/645 +* ⬆️ chore(deps): Bump vite from 5.0.9 to 5.0.10 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/642 +* ⬆️ chore(deps-dev): Bump the typescript-eslint group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/646 +* ⬆️ chore(deps-dev): Bump the storybook group with 9 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/647 +* ⬆️ chore(deps): Bump @mui/icons-material from 5.15.0 to 5.15.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/649 +* ⬆️ chore(deps): Bump @react-three/drei from 9.92.4 to 9.92.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/648 +* ⬆️ chore(deps): Bump @mui/material from 5.15.0 to 5.15.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/650 +* ⬆️ chore(deps): bump react-router-dom from 6.21.0 to 6.21.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/652 +* ⬆️ chore(deps): bump @emotion/react from 11.11.1 to 11.11.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/655 +* ⬆️ chore(deps): bump @mui/icons-material from 5.15.1 to 5.15.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/657 +* ⬆️ chore(deps-dev): bump the typescript-eslint group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/656 +* ⬆️ chore(deps): bump @mui/material from 5.15.1 to 5.15.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/658 +* ⬆️ chore(deps): bump axios from 1.6.2 to 1.6.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/659 +* ⬆️ chore(deps): bump @react-three/drei from 9.92.5 to 9.92.7 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/660 +* ⬆️ chore(deps): bump web-vitals from 3.5.0 to 3.5.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/661 +* ⬆️ chore(deps-dev): bump @testing-library/jest-dom from 6.1.5 to 6.1.6 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/662 +* ⬆️ chore(deps): bump vite-tsconfig-paths from 4.2.2 to 4.2.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/663 +* ⬆️ chore(deps-dev): bump @types/react from 18.2.45 to 18.2.46 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/664 +* ⬆️ chore(deps): bump three and @types/three by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/653 +* ⬆️ chore(deps-dev): bump the storybook group with 9 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/667 +* ⬆️ chore(deps-dev): bump eslint-plugin-jest from 27.6.0 to 27.6.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/669 +* ⬆️ chore(deps-dev): bump @testing-library/user-event from 14.5.1 to 14.5.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/665 +* ⬆️ chore(deps): bump @react-three/fiber from 8.15.12 to 8.15.13 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/670 +* ⬆️ chore(deps-dev): bump @react-three/test-renderer from 8.2.0 to 8.2.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/671 +* ⬆️ chore(deps): bump @mui/icons-material from 5.15.2 to 5.15.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/674 +* ⬆️ chore(deps): bump @mui/material from 5.15.2 to 5.15.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/675 +* ⬆️ chore(deps-dev): bump @types/node from 18.19.3 to 18.19.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/677 +* ⬆️ chore(deps): bump axios from 1.6.3 to 1.6.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/678 +* ⬆️ chore(deps-dev): bump the typescript-eslint group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/679 +* ⬆️ chore(deps-dev): bump @types/react from 18.2.46 to 18.2.47 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/684 +* ⬆️ chore(deps): bump vite from 5.0.10 to 5.0.11 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/685 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.9.1.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.9.1.md new file mode 100644 index 0000000..fa79e08 --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.9.1.md @@ -0,0 +1,44 @@ +# v1.0.0-alpha.9.1 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.9.0...v1.0.0-alpha.9.1 +## What's Changed +### Dependencies +* ⬆️ chore(deps): Bump @react-three/drei from 9.99.4 to 9.99.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/809 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.60 to 18.2.61 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/810 +* ⬆️ chore(deps-dev): Bump @types/node from 18.19.20 to 18.19.21 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/811 +* ⬆️ chore(deps): Bump react-error-boundary from 4.0.12 to 4.0.13 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/812 +* ⬆️ chore(deps): Bump three and @types/three by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/808 +* ⬆️ chore(deps): Bump the tanstack group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/813 +* ⬆️ chore(deps): Bump @react-three/fiber from 8.15.16 to 8.15.19 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/814 +* ⬆️ chore(deps): Bump zustand from 4.5.1 to 4.5.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/815 +* ⬆️ chore(deps-dev): Bump the typescript-eslint group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/816 +* ⬆️ chore(deps): Bump the tanstack group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/817 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.61 to 18.2.62 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/818 +* ⬆️ chore(deps): Bump @react-three/drei from 9.99.5 to 9.99.7 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/819 +* ⬆️ chore(deps): Bump vite from 5.1.4 to 5.1.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/820 +* ⬆️ chore(deps): Bump the tanstack group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/821 +* ⬆️ chore(deps): Bump the mui group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/822 +* ⬆️ chore(deps-dev): Bump @types/react-dom from 18.2.19 to 18.2.20 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/823 +* ⬆️ chore(deps-dev): Bump @types/node from 18.19.21 to 18.19.22 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/825 +* ⬆️ chore(deps-dev): Bump @types/react-dom from 18.2.20 to 18.2.21 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/827 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.62 to 18.2.64 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/826 +* ⬆️ chore(deps): Bump react-router-dom from 6.22.2 to 6.22.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/828 +* ⬆️ chore(deps): Bump @react-three/drei from 9.99.7 to 9.101.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/829 +* ⬆️ chore(deps-dev): Bump the typescript-eslint group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/831 +* ⬆️ chore(deps): Bump vite from 5.1.5 to 5.1.6 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/833 +* ⬆️ chore(deps-dev): Bump @types/lodash from 4.14.202 to 4.17.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/838 +* ⬆️ chore(deps): Bump the mui group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/840 +* ⬆️ chore(deps-dev): Bump @types/node from 18.19.22 to 18.19.24 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/841 +* ⬆️ chore(deps-dev): Bump @types/react-dom from 18.2.21 to 18.2.22 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/842 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.64 to 18.2.67 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/848 +* ⬆️ chore(deps): Bump follow-redirects from 1.15.4 to 1.15.6 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/845 +* ⬆️ chore(deps): Bump the tanstack group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/846 +* ⬆️ chore(deps): Bump @react-three/drei from 9.101.0 to 9.102.6 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/847 +* ⬆️ chore(deps-dev): Bump the typescript-eslint group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/849 +* ⬆️ chore(deps): Bump axios from 1.6.7 to 1.6.8 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/850 +* ⬆️ chore(deps-dev): Bump @types/node from 18.19.24 to 18.19.25 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/851 +* ⬆️ chore(deps): Bump vite-tsconfig-paths from 4.3.1 to 4.3.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/852 +* ⬆️ chore(deps-dev): Bump msw from 1.3.2 to 1.3.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/853 +* ⬆️ chore(deps): Bump the mui group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/855 +* ⬆️ chore(deps-dev): Bump @testing-library/react from 14.2.1 to 14.2.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/856 +* ⬆️ chore(deps-dev): Bump @types/node from 18.19.25 to 18.19.26 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/857 +* ⬆️ chore(deps-dev): Bump the storybook group with 9 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/858 diff --git a/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.9.2.md b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.9.2.md new file mode 100644 index 0000000..df7aa54 --- /dev/null +++ b/src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.v1.0.0-alpha.9.2.md @@ -0,0 +1,47 @@ +# v1.0.0-alpha.9.2 +**Full Changelog**: https://github.com/ADVRHumanoids/modular_frontend/compare/v1.0.0-alpha.9.1...v1.0.0-alpha.9.2 +## What's Changed +### Dependencies +* ⬆️ chore(deps): Bump the tanstack group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/860 +* ⬆️ chore(deps): Bump vite from 5.1.6 to 5.2.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/861 +* ⬆️ chore(deps-dev): Bump the storybook group with 11 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/862 +* ⬆️ chore(deps): Bump the tanstack group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/871 +* ⬆️ chore(deps-dev): Bump the storybook group with 11 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/872 +* ⬆️ chore(deps-dev): Bump @types/react from 18.2.67 to 18.2.73 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/873 +* ⬆️ chore(deps-dev): Bump express from 4.18.2 to 4.19.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/874 +* ⬆️ chore(deps-dev): Bump @types/react-dom from 18.2.22 to 18.2.23 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/875 +* ⬆️ chore(deps): Bump three and @types/three by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/876 +* ⬆️ chore(deps): Bump vite from 5.2.2 to 5.2.7 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/877 +* ⬆️ chore(deps): Bump @emotion/styled from 11.11.0 to 11.11.5 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/878 +* ⬆️ chore(deps): Bump @react-three/fiber from 8.15.19 to 8.16.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/879 +* ⬆️ chore(deps-dev): Bump the typescript-eslint group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/880 +* ⬆️ chore(deps): bump the tanstack group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/881 +* ⬆️ chore(deps-dev): bump @types/node from 18.19.26 to 18.19.29 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/882 +* ⬆️ chore(deps-dev): bump @types/react from 18.2.73 to 18.2.74 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/883 +* ⬆️ chore(deps): bump vite from 5.2.7 to 5.2.8 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/886 +* ⬆️ chore(deps-dev): bump @types/react-dom from 18.2.23 to 18.2.24 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/887 +* ⬆️ chore(deps): bump @react-three/drei from 9.102.6 to 9.105.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/888 +* ⬆️ chore(deps): bump the mui group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/889 +* ⬆️ chore(deps-dev): bump the storybook group with 11 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/890 +* ⬆️ chore(deps): bump the tanstack group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/891 +* ⬆️ chore(deps-dev): bump @types/node from 18.19.29 to 18.19.30 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/892 +* ⬆️ chore(deps): bump @react-three/drei from 9.105.1 to 9.105.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/893 +* ⬆️ chore(deps-dev): bump eslint-plugin-jest from 27.9.0 to 28.2.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/894 +* ⬆️ chore(deps-dev): bump the typescript-eslint group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/895 +* ⬆️ chore(deps-dev): bump @types/react from 18.2.74 to 18.2.75 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/896 +* ⬆️ chore(deps-dev): bump @testing-library/dom from 9.3.4 to 10.0.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/897 +* ⬆️ chore(deps-dev): bump @testing-library/react from 14.2.2 to 14.3.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/898 +* ⬆️ chore(deps-dev): bump @types/node from 18.19.30 to 18.19.31 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/899 +* ⬆️ chore(deps): bump @react-three/drei from 9.105.2 to 9.105.3 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/900 +* ⬆️ chore(deps-dev): bump @testing-library/react from 14.3.0 to 15.0.0 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/901 +* ⬆️ chore(deps): bump the tanstack group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/903 +* ⬆️ chore(deps-dev): bump @types/react-dom from 18.2.24 to 18.2.25 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/904 +* ⬆️ chore(deps-dev): bump @testing-library/react from 15.0.0 to 15.0.1 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/905 +* ⬆️ chore(deps-dev): bump @types/react from 18.2.75 to 18.2.77 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/906 +* ⬆️ chore(deps-dev): bump the storybook group with 11 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/902 +* ⬆️ chore(deps): bump @react-three/drei from 9.105.3 to 9.105.4 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/908 +* ⬆️ chore(deps-dev): bump @testing-library/react from 15.0.1 to 15.0.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/909 +* ⬆️ chore(deps): bump @react-three/fiber from 8.16.1 to 8.16.2 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/910 +* ⬆️ chore(deps-dev): bump the typescript-eslint group with 2 updates by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/911 +* ⬆️ chore(deps-dev): bump @types/react from 18.2.77 to 18.2.79 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/912 +* ⬆️ chore(deps): bump vite from 5.2.8 to 5.2.9 by @dependabot in https://github.com/ADVRHumanoids/modular_frontend/pull/913 diff --git a/src/modular/web/modular_frontend/icons/apple-icon-180.png b/src/modular/web/modular_frontend/icons/apple-icon-180.png new file mode 100644 index 0000000..55d2657 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-icon-180.png differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1125-2436.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1125-2436.jpg new file mode 100644 index 0000000..c818d17 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1125-2436.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1136-640.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1136-640.jpg new file mode 100644 index 0000000..8cf0ccf Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1136-640.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1170-2532.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1170-2532.jpg new file mode 100644 index 0000000..b00af18 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1170-2532.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1179-2556.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1179-2556.jpg new file mode 100644 index 0000000..f10846d Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1179-2556.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1242-2208.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1242-2208.jpg new file mode 100644 index 0000000..4f220f1 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1242-2208.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1242-2688.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1242-2688.jpg new file mode 100644 index 0000000..491adf7 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1242-2688.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1284-2778.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1284-2778.jpg new file mode 100644 index 0000000..f786391 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1284-2778.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1290-2796.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1290-2796.jpg new file mode 100644 index 0000000..573cf0f Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1290-2796.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1334-750.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1334-750.jpg new file mode 100644 index 0000000..210c338 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1334-750.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1536-2048.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1536-2048.jpg new file mode 100644 index 0000000..8a3c101 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1536-2048.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1620-2160.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1620-2160.jpg new file mode 100644 index 0000000..6e09730 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1620-2160.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1668-2224.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1668-2224.jpg new file mode 100644 index 0000000..338a73b Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1668-2224.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1668-2388.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1668-2388.jpg new file mode 100644 index 0000000..2e6e34c Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1668-2388.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-1792-828.jpg b/src/modular/web/modular_frontend/icons/apple-splash-1792-828.jpg new file mode 100644 index 0000000..3949c05 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-1792-828.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2048-1536.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2048-1536.jpg new file mode 100644 index 0000000..cadab64 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2048-1536.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2048-2732.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2048-2732.jpg new file mode 100644 index 0000000..54ce177 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2048-2732.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2160-1620.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2160-1620.jpg new file mode 100644 index 0000000..8174f8d Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2160-1620.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2208-1242.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2208-1242.jpg new file mode 100644 index 0000000..d95caf1 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2208-1242.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2224-1668.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2224-1668.jpg new file mode 100644 index 0000000..21e8c9b Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2224-1668.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2388-1668.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2388-1668.jpg new file mode 100644 index 0000000..0caf47a Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2388-1668.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2436-1125.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2436-1125.jpg new file mode 100644 index 0000000..e26e7a5 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2436-1125.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2532-1170.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2532-1170.jpg new file mode 100644 index 0000000..5ad0dfb Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2532-1170.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2556-1179.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2556-1179.jpg new file mode 100644 index 0000000..c74676f Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2556-1179.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2688-1242.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2688-1242.jpg new file mode 100644 index 0000000..64f9db7 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2688-1242.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2732-2048.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2732-2048.jpg new file mode 100644 index 0000000..0d615fe Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2732-2048.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2778-1284.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2778-1284.jpg new file mode 100644 index 0000000..e9bcc42 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2778-1284.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-2796-1290.jpg b/src/modular/web/modular_frontend/icons/apple-splash-2796-1290.jpg new file mode 100644 index 0000000..4cb6022 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-2796-1290.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-640-1136.jpg b/src/modular/web/modular_frontend/icons/apple-splash-640-1136.jpg new file mode 100644 index 0000000..c2ad9e2 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-640-1136.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-750-1334.jpg b/src/modular/web/modular_frontend/icons/apple-splash-750-1334.jpg new file mode 100644 index 0000000..5ece61c Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-750-1334.jpg differ diff --git a/src/modular/web/modular_frontend/icons/apple-splash-828-1792.jpg b/src/modular/web/modular_frontend/icons/apple-splash-828-1792.jpg new file mode 100644 index 0000000..c16c4b2 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/apple-splash-828-1792.jpg differ diff --git a/src/modular/web/modular_frontend/icons/manifest-icon-192.maskable.png b/src/modular/web/modular_frontend/icons/manifest-icon-192.maskable.png new file mode 100644 index 0000000..34f72fc Binary files /dev/null and b/src/modular/web/modular_frontend/icons/manifest-icon-192.maskable.png differ diff --git a/src/modular/web/modular_frontend/icons/manifest-icon-512.maskable.png b/src/modular/web/modular_frontend/icons/manifest-icon-512.maskable.png new file mode 100644 index 0000000..9e993a5 Binary files /dev/null and b/src/modular/web/modular_frontend/icons/manifest-icon-512.maskable.png differ diff --git a/src/modular/web/modular_frontend/index.css b/src/modular/web/modular_frontend/index.css new file mode 100644 index 0000000..951dbe0 --- /dev/null +++ b/src/modular/web/modular_frontend/index.css @@ -0,0 +1,799 @@ +/* + * Selfhosted google fonts. + * @see https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap + */ + +/* cyrillic-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-ext-italic-400.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-italic-400.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url(fonts/exo2/v20/exo2-vietnamese-italic-400.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-ext-italic-400.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-italic-400.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-ext-italic-500.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-italic-500.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(fonts/exo2/v20/exo2-vietnamese-italic-500.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-ext-italic-500.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-italic-500.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 600; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-ext-italic-600.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 600; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-italic-600.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 600; + font-display: swap; + src: url(fonts/exo2/v20/exo2-vietnamese-italic-600.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 600; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-ext-italic-600.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 600; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-italic-600.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-ext-italic-700.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-italic-700.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url(fonts/exo2/v20/exo2-vietnamese-italic-700.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-ext-italic-700.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Exo 2'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-italic-700.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-ext-normal-400.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-normal-400.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/exo2/v20/exo2-vietnamese-normal-400.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-ext-normal-400.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-normal-400.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-ext-normal-500.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-normal-500.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(fonts/exo2/v20/exo2-vietnamese-normal-500.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-ext-normal-500.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-normal-500.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-ext-normal-600.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-normal-600.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(fonts/exo2/v20/exo2-vietnamese-normal-600.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-ext-normal-600.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-normal-600.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-ext-normal-700.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(fonts/exo2/v20/exo2-cyrillic-normal-700.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(fonts/exo2/v20/exo2-vietnamese-normal-700.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-ext-normal-700.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Exo 2'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(fonts/exo2/v20/exo2-latin-normal-700.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-cyrillic-ext-italic-400.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-cyrillic-italic-400.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-greek-ext-italic-400.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-greek-italic-400.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-vietnamese-italic-400.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-latin-ext-italic-400.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-latin-italic-400.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-cyrillic-ext-italic-500.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-cyrillic-italic-500.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-greek-ext-italic-500.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-greek-italic-500.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-vietnamese-italic-500.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-latin-ext-italic-500.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-latin-italic-500.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-cyrillic-ext-italic-700.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-cyrillic-italic-700.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-greek-ext-italic-700.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-greek-italic-700.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-vietnamese-italic-700.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-latin-ext-italic-700.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-latin-italic-700.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-cyrillic-ext-normal-400.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-cyrillic-normal-400.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-greek-ext-normal-400.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-greek-normal-400.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-vietnamese-normal-400.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-latin-ext-normal-400.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/roboto/v30/roboto-latin-normal-400.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-cyrillic-ext-normal-500.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-cyrillic-normal-500.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-greek-ext-normal-500.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-greek-normal-500.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-vietnamese-normal-500.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-latin-ext-normal-500.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(fonts/roboto/v30/roboto-latin-normal-500.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-cyrillic-ext-normal-700.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-cyrillic-normal-700.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-greek-ext-normal-700.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-greek-normal-700.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-vietnamese-normal-700.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, + U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-latin-ext-normal-700.woff2) format('woff2'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(fonts/roboto/v30/roboto-latin-normal-700.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, + U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, + U+FFFD; +} diff --git a/src/modular/web/modular_frontend/index.html b/src/modular/web/modular_frontend/index.html new file mode 100644 index 0000000..e041042 --- /dev/null +++ b/src/modular/web/modular_frontend/index.html @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + Modular + + + + +
+ + diff --git a/src/modular/web/modular_frontend/manifest.json b/src/modular/web/modular_frontend/manifest.json new file mode 100644 index 0000000..ef399f3 --- /dev/null +++ b/src/modular/web/modular_frontend/manifest.json @@ -0,0 +1,35 @@ +{ + "short_name": "Modular", + "name": "Modular", + "version": "v1.0.0-alpha.10.1", + "icons": [ + { + "src": "icons/manifest-icon-192.maskable.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "any" + }, + { + "src": "icons/manifest-icon-192.maskable.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/manifest-icon-512.maskable.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any" + }, + { + "src": "icons/manifest-icon-512.maskable.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#0c1c2c", + "background_color": "#0c1c2c" +} diff --git a/src/modular/web/modular_frontend/mockServiceWorker.js b/src/modular/web/modular_frontend/mockServiceWorker.js new file mode 100644 index 0000000..c88cfe0 --- /dev/null +++ b/src/modular/web/modular_frontend/mockServiceWorker.js @@ -0,0 +1,303 @@ +/* eslint-disable */ +/* tslint:disable */ + +/** + * Mock Service Worker (1.3.3). + * @see https://github.com/mswjs/msw + * - Please do NOT modify this file. + * - Please do NOT serve this file on production. + */ + +const INTEGRITY_CHECKSUM = '3d6b9f06410d179a7f7404d4bf4c3c70' +const activeClientIds = new Set() + +self.addEventListener('install', function () { + self.skipWaiting() +}) + +self.addEventListener('activate', function (event) { + event.waitUntil(self.clients.claim()) +}) + +self.addEventListener('message', async function (event) { + const clientId = event.source.id + + if (!clientId || !self.clients) { + return + } + + const client = await self.clients.get(clientId) + + if (!client) { + return + } + + const allClients = await self.clients.matchAll({ + type: 'window', + }) + + switch (event.data) { + case 'KEEPALIVE_REQUEST': { + sendToClient(client, { + type: 'KEEPALIVE_RESPONSE', + }) + break + } + + case 'INTEGRITY_CHECK_REQUEST': { + sendToClient(client, { + type: 'INTEGRITY_CHECK_RESPONSE', + payload: INTEGRITY_CHECKSUM, + }) + break + } + + case 'MOCK_ACTIVATE': { + activeClientIds.add(clientId) + + sendToClient(client, { + type: 'MOCKING_ENABLED', + payload: true, + }) + break + } + + case 'MOCK_DEACTIVATE': { + activeClientIds.delete(clientId) + break + } + + case 'CLIENT_CLOSED': { + activeClientIds.delete(clientId) + + const remainingClients = allClients.filter((client) => { + return client.id !== clientId + }) + + // Unregister itself when there are no more clients + if (remainingClients.length === 0) { + self.registration.unregister() + } + + break + } + } +}) + +self.addEventListener('fetch', function (event) { + const { request } = event + const accept = request.headers.get('accept') || '' + + // Bypass server-sent events. + if (accept.includes('text/event-stream')) { + return + } + + // Bypass navigation requests. + if (request.mode === 'navigate') { + return + } + + // Opening the DevTools triggers the "only-if-cached" request + // that cannot be handled by the worker. Bypass such requests. + if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { + return + } + + // Bypass all requests when there are no active clients. + // Prevents the self-unregistered worked from handling requests + // after it's been deleted (still remains active until the next reload). + if (activeClientIds.size === 0) { + return + } + + // Generate unique request ID. + const requestId = Math.random().toString(16).slice(2) + + event.respondWith( + handleRequest(event, requestId).catch((error) => { + if (error.name === 'NetworkError') { + console.warn( + '[MSW] Successfully emulated a network error for the "%s %s" request.', + request.method, + request.url, + ) + return + } + + // At this point, any exception indicates an issue with the original request/response. + console.error( + `\ +[MSW] Caught an exception from the "%s %s" request (%s). This is probably not a problem with Mock Service Worker. There is likely an additional logging output above.`, + request.method, + request.url, + `${error.name}: ${error.message}`, + ) + }), + ) +}) + +async function handleRequest(event, requestId) { + const client = await resolveMainClient(event) + const response = await getResponse(event, client, requestId) + + // Send back the response clone for the "response:*" life-cycle events. + // Ensure MSW is active and ready to handle the message, otherwise + // this message will pend indefinitely. + if (client && activeClientIds.has(client.id)) { + ;(async function () { + const clonedResponse = response.clone() + sendToClient(client, { + type: 'RESPONSE', + payload: { + requestId, + type: clonedResponse.type, + ok: clonedResponse.ok, + status: clonedResponse.status, + statusText: clonedResponse.statusText, + body: + clonedResponse.body === null ? null : await clonedResponse.text(), + headers: Object.fromEntries(clonedResponse.headers.entries()), + redirected: clonedResponse.redirected, + }, + }) + })() + } + + return response +} + +// Resolve the main client for the given event. +// Client that issues a request doesn't necessarily equal the client +// that registered the worker. It's with the latter the worker should +// communicate with during the response resolving phase. +async function resolveMainClient(event) { + const client = await self.clients.get(event.clientId) + + if (client?.frameType === 'top-level') { + return client + } + + const allClients = await self.clients.matchAll({ + type: 'window', + }) + + return allClients + .filter((client) => { + // Get only those clients that are currently visible. + return client.visibilityState === 'visible' + }) + .find((client) => { + // Find the client ID that's recorded in the + // set of clients that have registered the worker. + return activeClientIds.has(client.id) + }) +} + +async function getResponse(event, client, requestId) { + const { request } = event + const clonedRequest = request.clone() + + function passthrough() { + // Clone the request because it might've been already used + // (i.e. its body has been read and sent to the client). + const headers = Object.fromEntries(clonedRequest.headers.entries()) + + // Remove MSW-specific request headers so the bypassed requests + // comply with the server's CORS preflight check. + // Operate with the headers as an object because request "Headers" + // are immutable. + delete headers['x-msw-bypass'] + + return fetch(clonedRequest, { headers }) + } + + // Bypass mocking when the client is not active. + if (!client) { + return passthrough() + } + + // Bypass initial page load requests (i.e. static assets). + // The absence of the immediate/parent client in the map of the active clients + // means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet + // and is not ready to handle requests. + if (!activeClientIds.has(client.id)) { + return passthrough() + } + + // Bypass requests with the explicit bypass header. + // Such requests can be issued by "ctx.fetch()". + if (request.headers.get('x-msw-bypass') === 'true') { + return passthrough() + } + + // Notify the client that a request has been intercepted. + const clientMessage = await sendToClient(client, { + type: 'REQUEST', + payload: { + id: requestId, + url: request.url, + method: request.method, + headers: Object.fromEntries(request.headers.entries()), + cache: request.cache, + mode: request.mode, + credentials: request.credentials, + destination: request.destination, + integrity: request.integrity, + redirect: request.redirect, + referrer: request.referrer, + referrerPolicy: request.referrerPolicy, + body: await request.text(), + bodyUsed: request.bodyUsed, + keepalive: request.keepalive, + }, + }) + + switch (clientMessage.type) { + case 'MOCK_RESPONSE': { + return respondWithMock(clientMessage.data) + } + + case 'MOCK_NOT_FOUND': { + return passthrough() + } + + case 'NETWORK_ERROR': { + const { name, message } = clientMessage.data + const networkError = new Error(message) + networkError.name = name + + // Rejecting a "respondWith" promise emulates a network error. + throw networkError + } + } + + return passthrough() +} + +function sendToClient(client, message) { + return new Promise((resolve, reject) => { + const channel = new MessageChannel() + + channel.port1.onmessage = (event) => { + if (event.data && event.data.error) { + return reject(event.data.error) + } + + resolve(event.data) + } + + client.postMessage(message, [channel.port2]) + }) +} + +function sleep(timeMs) { + return new Promise((resolve) => { + setTimeout(resolve, timeMs) + }) +} + +async function respondWithMock(response) { + await sleep(response.delay) + return new Response(response.body, response) +} diff --git a/src/modular/web/modular_frontend/reconfigurable_pino-7af6fda5.webp b/src/modular/web/modular_frontend/reconfigurable_pino-7af6fda5.webp new file mode 100644 index 0000000..bc3f7eb Binary files /dev/null and b/src/modular/web/modular_frontend/reconfigurable_pino-7af6fda5.webp differ diff --git a/src/modular/web/modular_frontend/robots.txt b/src/modular/web/modular_frontend/robots.txt new file mode 100644 index 0000000..e9e57dc --- /dev/null +++ b/src/modular/web/modular_frontend/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/src/modular/web/modular_frontend/service-worker.js b/src/modular/web/modular_frontend/service-worker.js new file mode 100644 index 0000000..de7efa2 --- /dev/null +++ b/src/modular/web/modular_frontend/service-worker.js @@ -0,0 +1,3 @@ +/*! For license information please see service-worker.js.LICENSE.txt */ +!function(){"use strict";var e={940:function(){try{self["workbox:core:7.0.0"]&&_()}catch(e){}},763:function(){try{self["workbox:expiration:7.0.0"]&&_()}catch(e){}},720:function(){try{self["workbox:precaching:7.0.0"]&&_()}catch(e){}},504:function(){try{self["workbox:routing:7.0.0"]&&_()}catch(e){}},356:function(){try{self["workbox:strategies:7.0.0"]&&_()}catch(e){}}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}!function(){r(940);var e=null;function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,r||"default");if("object"!==t(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}function a(e,t){for(var r=0;r1?r-1:0),a=1;a0&&(t+=" :: ".concat(JSON.stringify(n))),t},y=function(e){o(r,e);var t=l(r);function r(e,n){var a;s(this,r);var i=d(e,n);return(a=t.call(this,i)).name=e,a.details=n,a}return i(r)}(v(Error)),b=new Set;var g,m={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},x=function(e){return[m.prefix,e,m.suffix].filter((function(e){return e&&e.length>0})).join("-")},w=function(e){return e||x(m.precache)},k=function(e){return e||x(m.runtime)};function _(){_=function(){return r};var e,r={},n=Object.prototype,a=n.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",o=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function h(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var a=t&&t.prototype instanceof g?t:g,s=Object.create(a.prototype),c=new S(n||[]);return i(s,"_invoke",{value:O(e,r,c)}),s}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=f;var p="suspendedStart",v="suspendedYield",d="executing",y="completed",b={};function g(){}function m(){}function x(){}var w={};h(w,c,(function(){return this}));var k=Object.getPrototypeOf,R=k&&k(k(D([])));R&&R!==n&&a.call(R,c)&&(w=R);var E=x.prototype=g.prototype=Object.create(w);function L(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,r){function n(i,s,c,o){var u=l(e[i],e,s);if("throw"!==u.type){var h=u.arg,f=h.value;return f&&"object"==t(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,c,o)}),(function(e){n("throw",e,c,o)})):r.resolve(f).then((function(e){h.value=e,c(h)}),(function(e){return n("throw",e,c,o)}))}o(u.arg)}var s;i(this,"_invoke",{value:function(e,t){function a(){return new r((function(r,a){n(e,t,r,a)}))}return s=s?s.then(a,a):a()}})}function O(t,r,n){var a=p;return function(i,s){if(a===d)throw new Error("Generator is already running");if(a===y){if("throw"===i)throw s;return{value:e,done:!0}}for(n.method=i,n.arg=s;;){var c=n.delegate;if(c){var o=T(c,n);if(o){if(o===b)continue;return o}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var u=l(t,r,n);if("normal"===u.type){if(a=n.done?y:v,u.arg===b)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=y,n.method="throw",n.arg=u.arg)}}}function T(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=l(a,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var s=i.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function D(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,s=function t(){for(;++i=0;--i){var s=this.tryEntries[i],c=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var o=a.call(s,"catchLoc"),u=a.call(s,"finallyLoc");if(o&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;P(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},r}function R(e,t,r,n,a,i,s){try{var c=e[i](s),o=c.value}catch(u){return void r(u)}c.done?t(o):Promise.resolve(o).then(n,a)}function E(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){R(i,n,a,s,c,"next",e)}function c(e){R(i,n,a,s,c,"throw",e)}s(void 0)}))}}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}function T(e,t){var r,n=new URL(e),a=O(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;n.searchParams.delete(i)}}catch(s){a.e(s)}finally{a.f()}return n.href}function j(e,t,r,n){return P.apply(this,arguments)}function P(){return(P=E(_().mark((function e(t,r,n,a){var i,s,c,o,u,h,f;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=T(r.url,n),r.url!==i){e.next=3;break}return e.abrupt("return",t.match(r,a));case 3:return s=Object.assign(Object.assign({},a),{ignoreSearch:!0}),e.next=6,t.keys(r,s);case 6:c=e.sent,o=O(c),e.prev=8,o.s();case 10:if((u=o.n()).done){e.next=17;break}if(h=u.value,f=T(h.url,n),i!==f){e.next=15;break}return e.abrupt("return",t.match(h,a));case 15:e.next=10;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(8),o.e(e.t0);case 22:return e.prev=22,o.f(),e.finish(22);case 25:return e.abrupt("return");case 26:case"end":return e.stop()}}),e,null,[[8,19,22,25]])})))).apply(this,arguments)}function S(){if(void 0===g){var e=new Response("");if("body"in e)try{new Response(e.body),g=!0}catch(t){g=!1}g=!1}return g}function D(e){e.then((function(){}))}var q=i((function e(){var t=this;s(this,e),this.promise=new Promise((function(e,r){t.resolve=e,t.reject=r}))}));function N(){return U.apply(this,arguments)}function U(){return(U=E(_().mark((function e(){var t,r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,t=O(b),e.prev=2,t.s();case 4:if((r=t.n()).done){e.next=11;break}return n=r.value,e.next=8,n();case 8:0;case 9:e.next=4;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),t.e(e.t0);case 16:return e.prev=16,t.f(),e.finish(16);case 19:0;case 20:case"end":return e.stop()}}),e,null,[[2,13,16,19]])})))).apply(this,arguments)}var I=function(e){return new URL(String(e),location.href).href.replace(new RegExp("^".concat(location.origin)),"")};function A(e){return new Promise((function(t){return setTimeout(t,e)}))}function K(e,t){var r=t();return e.waitUntil(r),r}function M(e,t){return W.apply(this,arguments)}function W(){return(W=E(_().mark((function e(t,r){var n,a,i,s,c,o;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=null,t.url&&(a=new URL(t.url),n=a.origin),n===self.location.origin){e.next=4;break}throw new y("cross-origin-copy-response",{origin:n});case 4:if(i=t.clone(),s={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},c=r?r(s):s,!S()){e.next=11;break}e.t0=i.body,e.next=14;break;case 11:return e.next=13,i.blob();case 13:e.t0=e.sent;case 14:return o=e.t0,e.abrupt("return",new Response(o,c));case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(e){for(var t=1;t1?r-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:{},n=r.blocked,a=r.upgrade,i=r.blocking,s=r.terminated,c=indexedDB.open(e,t),o=te(c);return a&&c.addEventListener("upgradeneeded",(function(e){a(te(c.result),e.oldVersion,e.newVersion,te(c.transaction),e)})),n&&c.addEventListener("blocked",(function(e){return n(e.oldVersion,e.newVersion,e)})),o.then((function(e){s&&e.addEventListener("close",(function(){return s()})),i&&e.addEventListener("versionchange",(function(e){return i(e.oldVersion,e.newVersion,e)}))})).catch((function(){})),o}var ae=["get","getKey","getAll","getAllKeys","count"],ie=["put","add","delete","clear"],se=new Map;function ce(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(se.get(t))return se.get(t);var r=t.replace(/FromIndex$/,""),n=t!==r,a=ie.includes(r);if(r in(n?IDBIndex:IDBObjectStore).prototype&&(a||ae.includes(r))){var i=function(){var e=E(_().mark((function e(t){var i,s,c,o,u,h,f=arguments;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(s=this.transaction(t,a?"readwrite":"readonly"),c=s.store,o=f.length,u=new Array(o>1?o-1:0),h=1;h1&&void 0!==arguments[1]?arguments[1]:{}).blocked,r=indexedDB.deleteDatabase(e);t&&r.addEventListener("blocked",(function(e){return t(e.oldVersion,e)})),te(r).then((function(){}))}(this._cacheName)}},{key:"setTimestamp",value:function(){var e=E(_().mark((function e(t,r){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=ue(t),n={url:t,timestamp:r,cacheName:this._cacheName,id:this._getId(t)},e.next=4,this.getDb();case 4:return a=e.sent,i=a.transaction(oe,"readwrite",{durability:"relaxed"}),e.next=8,i.store.put(n);case 8:return e.next=10,i.done;case 10:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getTimestamp",value:function(){var e=E(_().mark((function e(t){var r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDb();case 2:return r=e.sent,e.next=5,r.get(oe,this._getId(t));case 5:return n=e.sent,e.abrupt("return",null===n||void 0===n?void 0:n.timestamp);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"expireEntries",value:function(){var e=E(_().mark((function e(t,r){var n,a,i,s,c,o,u,h,f;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDb();case 2:return n=e.sent,e.next=5,n.transaction(oe).store.index("timestamp").openCursor(null,"prev");case 5:a=e.sent,i=[],s=0;case 8:if(!a){e.next=16;break}return(c=a.value).cacheName===this._cacheName&&(t&&c.timestamp=r?i.push(a.value):s++),e.next=13,a.continue();case 13:a=e.sent,e.next=8;break;case 16:o=[],u=0,h=i;case 18:if(!(u1&&void 0!==arguments[1]?arguments[1]:{};s(this,e),this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=r.maxEntries,this._maxAgeSeconds=r.maxAgeSeconds,this._matchOptions=r.matchOptions,this._cacheName=t,this._timestampModel=new he(t)}return i(e,[{key:"expireEntries",value:function(){var e=E(_().mark((function e(){var t,r,n,a,i,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isRunning){e.next=3;break}return this._rerunRequested=!0,e.abrupt("return");case 3:return this._isRunning=!0,t=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,e.next=7,this._timestampModel.expireEntries(t,this._maxEntries);case 7:return r=e.sent,e.next=10,self.caches.open(this._cacheName);case 10:n=e.sent,a=O(r),e.prev=12,a.s();case 14:if((i=a.n()).done){e.next=20;break}return s=i.value,e.next=18,n.delete(s,this._matchOptions);case 18:e.next=14;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(12),a.e(e.t0);case 25:return e.prev=25,a.f(),e.finish(25);case 28:0,this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,D(this.expireEntries()));case 31:case"end":return e.stop()}}),e,this,[[12,22,25,28]])})));return function(){return e.apply(this,arguments)}}()},{key:"updateTimestamp",value:function(){var e=E(_().mark((function e(t){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,this._timestampModel.setTimestamp(t,Date.now());case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"isURLExpired",value:function(){var e=E(_().mark((function e(t){var r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._maxAgeSeconds){e.next=6;break}e.next=3;break;case 3:return e.abrupt("return",!1);case 6:return e.next=8,this._timestampModel.getTimestamp(t);case 8:return r=e.sent,n=Date.now()-1e3*this._maxAgeSeconds,e.abrupt("return",void 0===r||r0&&void 0!==arguments[0]?arguments[0]:{};s(this,e),this.cachedResponseWillBeUsed=function(){var e=E(_().mark((function e(r){var n,a,i,s,c,o,u;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.event,a=r.request,i=r.cacheName,s=r.cachedResponse){e.next=3;break}return e.abrupt("return",null);case 3:if(c=t._isResponseDateFresh(s),D((o=t._getCacheExpiration(i)).expireEntries()),u=o.updateTimestamp(a.url),n)try{n.waitUntil(u)}catch(h){0}return e.abrupt("return",c?s:null);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.cacheDidUpdate=function(){var e=E(_().mark((function e(r){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.cacheName,a=r.request,i=t._getCacheExpiration(n),e.next=5,i.updateTimestamp(a.url);case 5:return e.next=7,i.expireEntries();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._config=r,this._maxAgeSeconds=r.maxAgeSeconds,this._cacheExpirations=new Map,r.purgeOnQuotaError&&function(e){b.add(e)}((function(){return t.deleteCacheAndMetadata()}))}return i(e,[{key:"_getCacheExpiration",value:function(e){if(e===k())throw new y("expire-custom-caches-only");var t=this._cacheExpirations.get(e);return t||(t=new fe(e,this._config),this._cacheExpirations.set(e,t)),t}},{key:"_isResponseDateFresh",value:function(e){if(!this._maxAgeSeconds)return!0;var t=this._getDateHeaderTimestamp(e);return null===t||t>=Date.now()-1e3*this._maxAgeSeconds}},{key:"_getDateHeaderTimestamp",value:function(e){if(!e.headers.has("date"))return null;var t=e.headers.get("date"),r=new Date(t).getTime();return isNaN(r)?null:r}},{key:"deleteCacheAndMetadata",value:function(){var e=E(_().mark((function e(){var t,r,n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=O(this._cacheExpirations),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=11;break}return n=le(r.value,2),a=n[0],i=n[1],e.next=7,self.caches.delete(a);case 7:return e.next=9,i.delete();case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),t.e(e.t0);case 16:return e.prev=16,t.f(),e.finish(16);case 19:this._cacheExpirations=new Map;case 20:case"end":return e.stop()}}),e,this,[[1,13,16,19]])})));return function(){return e.apply(this,arguments)}}()}]),e}();function ve(e){return function(e){if(Array.isArray(e))return L(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r(720);function de(e){if(!e)throw new y("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){var t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}var r=e.revision,n=e.url;if(!n)throw new y("add-to-cache-list-unexpected-type",{entry:e});if(!r){var a=new URL(n,location.href);return{cacheKey:a.href,url:a.href}}var i=new URL(n,location.href),s=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",r),{cacheKey:i.href,url:s.href}}var ye=i((function e(){var t=this;s(this,e),this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=function(){var e=E(_().mark((function e(t){var r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.request,(n=t.state)&&(n.originalRequest=r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.cachedResponseWillBeUsed=function(){var e=E(_().mark((function e(r){var n,a,i,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.event,a=r.state,i=r.cachedResponse,"install"===n.type&&a&&a.originalRequest&&a.originalRequest instanceof Request&&(s=a.originalRequest.url,i?t.notUpdatedURLs.push(s):t.updatedURLs.push(s)),e.abrupt("return",i);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()})),be=i((function e(t){var r=this,n=t.precacheController;s(this,e),this.cacheKeyWillBeUsed=function(){var e=E(_().mark((function e(t){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.request,a=t.params,i=(null===a||void 0===a?void 0:a.cacheKey)||r._precacheController.getCacheKeyForURL(n.url),e.abrupt("return",i?new Request(i,{headers:n.headers}):n);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._precacheController=n}));r(356);function ge(e){return"string"===typeof e?new Request(e):e}var me=function(){function t(e,r){s(this,t),this._cacheKeys={},Object.assign(this,r),this.event=r.event,this._strategy=e,this._handlerDeferred=new q,this._extendLifetimePromises=[],this._plugins=ve(e.plugins),this._pluginStateMap=new Map;var n,a=O(this._plugins);try{for(a.s();!(n=a.n()).done;){var i=n.value;this._pluginStateMap.set(i,{})}}catch(c){a.e(c)}finally{a.f()}this.event.waitUntil(this._handlerDeferred.promise)}return i(t,[{key:"fetch",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=E(_().mark((function e(t){var r,n,a,i,s,c,o,u,h,f,l,p;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.event,!("navigate"===(n=ge(t)).mode&&r instanceof FetchEvent&&r.preloadResponse)){e.next=9;break}return e.next=5,r.preloadResponse;case 5:if(!(a=e.sent)){e.next=9;break}return e.abrupt("return",a);case 9:i=this.hasCallback("fetchDidFail")?n.clone():null,e.prev=10,s=O(this.iterateCallbacks("requestWillFetch")),e.prev=12,s.s();case 14:if((c=s.n()).done){e.next=21;break}return o=c.value,e.next=18,o({request:n.clone(),event:r});case 18:n=e.sent;case 19:e.next=14;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(12),s.e(e.t0);case 26:return e.prev=26,s.f(),e.finish(26);case 29:e.next=35;break;case 31:if(e.prev=31,e.t1=e.catch(10),!(e.t1 instanceof Error)){e.next=35;break}throw new y("plugin-error-request-will-fetch",{thrownErrorMessage:e.t1.message});case 35:return u=n.clone(),e.prev=36,e.next=39,fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);case 39:h=e.sent,f=O(this.iterateCallbacks("fetchDidSucceed")),e.prev=42,f.s();case 44:if((l=f.n()).done){e.next=51;break}return p=l.value,e.next=48,p({event:r,request:u,response:h});case 48:h=e.sent;case 49:e.next=44;break;case 51:e.next=56;break;case 53:e.prev=53,e.t2=e.catch(42),f.e(e.t2);case 56:return e.prev=56,f.f(),e.finish(56);case 59:return e.abrupt("return",h);case 62:if(e.prev=62,e.t3=e.catch(36),!i){e.next=68;break}return e.next=68,this.runCallbacks("fetchDidFail",{error:e.t3,event:r,originalRequest:i.clone(),request:u.clone()});case 68:throw e.t3;case 69:case"end":return e.stop()}}),e,this,[[10,31],[12,23,26,29],[36,62],[42,53,56,59]])})));return function(t){return e.apply(this,arguments)}}())},{key:"fetchAndCachePut",value:function(){var e=E(_().mark((function e(t){var r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch(t);case 2:return r=e.sent,n=r.clone(),this.waitUntil(this.cachePut(t,n)),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"cacheMatch",value:function(){var e=E(_().mark((function e(t){var r,n,a,i,s,c,o,u,h,f;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ge(t),a=this._strategy,i=a.cacheName,s=a.matchOptions,e.next=4,this.getCacheKey(r,"read");case 4:return c=e.sent,o=Object.assign(Object.assign({},s),{cacheName:i}),e.next=8,caches.match(c,o);case 8:n=e.sent,u=O(this.iterateCallbacks("cachedResponseWillBeUsed")),e.prev=11,u.s();case 13:if((h=u.n()).done){e.next=23;break}return f=h.value,e.next=17,f({cacheName:i,matchOptions:s,cachedResponse:n,request:c,event:this.event});case 17:if(e.t0=e.sent,e.t0){e.next=20;break}e.t0=void 0;case 20:n=e.t0;case 21:e.next=13;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(11),u.e(e.t1);case 28:return e.prev=28,u.f(),e.finish(28);case 31:return e.abrupt("return",n);case 32:case"end":return e.stop()}}),e,this,[[11,25,28,31]])})));return function(t){return e.apply(this,arguments)}}()},{key:"cachePut",value:function(){var t=E(_().mark((function t(r,n){var a,i,s,c,o,u,h,f,l,p,v,d,b;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=ge(r),t.next=3,A(0);case 3:return t.next=5,this.getCacheKey(a,"write");case 5:i=t.sent,t.next=11;break;case 9:(s=n.headers.get("Vary"))&&e.debug("The response for ".concat(I(i.url)," ")+"has a 'Vary: ".concat(s,"' header. ")+"Consider setting the {ignoreVary: true} option on your strategy to ensure cache matching and deletion works as expected.");case 11:if(n){t.next=14;break}throw new y("cache-put-with-no-response",{url:I(i.url)});case 14:return t.next=16,this._ensureResponseSafeToCache(n);case 16:if(c=t.sent){t.next=20;break}return t.abrupt("return",!1);case 20:return o=this._strategy,u=o.cacheName,h=o.matchOptions,t.next=23,self.caches.open(u);case 23:if(f=t.sent,!(l=this.hasCallback("cacheDidUpdate"))){t.next=31;break}return t.next=28,j(f,i.clone(),["__WB_REVISION__"],h);case 28:t.t0=t.sent,t.next=32;break;case 31:t.t0=null;case 32:return p=t.t0,t.prev=34,t.next=37,f.put(i,l?c.clone():c);case 37:t.next=46;break;case 39:if(t.prev=39,t.t1=t.catch(34),!(t.t1 instanceof Error)){t.next=46;break}if("QuotaExceededError"!==t.t1.name){t.next=45;break}return t.next=45,N();case 45:throw t.t1;case 46:v=O(this.iterateCallbacks("cacheDidUpdate")),t.prev=47,v.s();case 49:if((d=v.n()).done){t.next=55;break}return b=d.value,t.next=53,b({cacheName:u,oldResponse:p,newResponse:c.clone(),request:i,event:this.event});case 53:t.next=49;break;case 55:t.next=60;break;case 57:t.prev=57,t.t2=t.catch(47),v.e(t.t2);case 60:return t.prev=60,v.f(),t.finish(60);case 63:return t.abrupt("return",!0);case 64:case"end":return t.stop()}}),t,this,[[34,39],[47,57,60,63]])})));return function(e,r){return t.apply(this,arguments)}}()},{key:"getCacheKey",value:function(){var e=E(_().mark((function e(t,r){var n,a,i,s,c;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n="".concat(t.url," | ").concat(r),this._cacheKeys[n]){e.next=24;break}a=t,i=O(this.iterateCallbacks("cacheKeyWillBeUsed")),e.prev=4,i.s();case 6:if((s=i.n()).done){e.next=15;break}return c=s.value,e.t0=ge,e.next=11,c({mode:r,request:a,event:this.event,params:this.params});case 11:e.t1=e.sent,a=(0,e.t0)(e.t1);case 13:e.next=6;break;case 15:e.next=20;break;case 17:e.prev=17,e.t2=e.catch(4),i.e(e.t2);case 20:return e.prev=20,i.f(),e.finish(20);case 23:this._cacheKeys[n]=a;case 24:return e.abrupt("return",this._cacheKeys[n]);case 25:case"end":return e.stop()}}),e,this,[[4,17,20,23]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"hasCallback",value:function(e){var t,r=O(this._strategy.plugins);try{for(r.s();!(t=r.n()).done;){if(e in t.value)return!0}}catch(n){r.e(n)}finally{r.f()}return!1}},{key:"runCallbacks",value:function(){var e=E(_().mark((function e(t,r){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=O(this.iterateCallbacks(t)),e.prev=1,n.s();case 3:if((a=n.n()).done){e.next=9;break}return i=a.value,e.next=7,i(r);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"iterateCallbacks",value:_().mark((function e(t){var r,n,a,i=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=O(this._strategy.plugins),e.prev=1,a=_().mark((function e(){var r,a,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==typeof(r=n.value)[t]){e.next=6;break}return a=i._pluginStateMap.get(r),s=function(e){var n=Object.assign(Object.assign({},e),{state:a});return r[t](n)},e.next=6,s;case 6:case"end":return e.stop()}}),e)})),r.s();case 4:if((n=r.n()).done){e.next=8;break}return e.delegateYield(a(),"t0",6);case 6:e.next=4;break;case 8:e.next=13;break;case 10:e.prev=10,e.t1=e.catch(1),r.e(e.t1);case 13:return e.prev=13,r.f(),e.finish(13);case 16:case"end":return e.stop()}}),e,this,[[1,10,13,16]])}))},{key:"waitUntil",value:function(e){return this._extendLifetimePromises.push(e),e}},{key:"doneWaiting",value:function(){var e=E(_().mark((function e(){var t;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this._extendLifetimePromises.shift())){e.next=5;break}return e.next=3,t;case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"destroy",value:function(){this._handlerDeferred.resolve(null)}},{key:"_ensureResponseSafeToCache",value:function(){var e=E(_().mark((function e(t){var r,n,a,i,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t,n=!1,a=O(this.iterateCallbacks("cacheWillUpdate")),e.prev=3,a.s();case 5:if((i=a.n()).done){e.next=18;break}return s=i.value,e.next=9,s({request:this.request,response:r,event:this.event});case 9:if(e.t0=e.sent,e.t0){e.next=12;break}e.t0=void 0;case 12:if(r=e.t0,n=!0,r){e.next=16;break}return e.abrupt("break",18);case 16:e.next=5;break;case 18:e.next=23;break;case 20:e.prev=20,e.t1=e.catch(3),a.e(e.t1);case 23:return e.prev=23,a.f(),e.finish(23);case 26:return n||r&&200!==r.status&&(r=void 0),e.abrupt("return",r);case 28:case"end":return e.stop()}}),e,this,[[3,20,23,26]])})));return function(t){return e.apply(this,arguments)}}()}]),t}(),xe=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s(this,e),this.cacheName=k(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}return i(e,[{key:"handle",value:function(e){return le(this.handleAll(e),1)[0]}},{key:"handleAll",value:function(e){e instanceof FetchEvent&&(e={event:e,request:e.request});var t=e.event,r="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new me(this,{event:t,request:r,params:n}),i=this._getResponse(a,r,t);return[i,this._awaitComplete(i,a,r,t)]}},{key:"_getResponse",value:function(){var e=E(_().mark((function e(t,r,n){var a,i,s,c,o,u,h;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.runCallbacks("handlerWillStart",{event:n,request:r});case 2:return a=void 0,e.prev=3,e.next=6,this._handle(r,t);case 6:if((a=e.sent)&&"error"!==a.type){e.next=9;break}throw new y("no-response",{url:r.url});case 9:e.next=39;break;case 11:if(e.prev=11,e.t0=e.catch(3),!(e.t0 instanceof Error)){e.next=34;break}i=O(t.iterateCallbacks("handlerDidError")),e.prev=15,i.s();case 17:if((s=i.n()).done){e.next=26;break}return c=s.value,e.next=21,c({error:e.t0,event:n,request:r});case 21:if(!(a=e.sent)){e.next=24;break}return e.abrupt("break",26);case 24:e.next=17;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(15),i.e(e.t1);case 31:return e.prev=31,i.f(),e.finish(31);case 34:if(a){e.next=38;break}throw e.t0;case 38:0;case 39:o=O(t.iterateCallbacks("handlerWillRespond")),e.prev=40,o.s();case 42:if((u=o.n()).done){e.next=49;break}return h=u.value,e.next=46,h({event:n,request:r,response:a});case 46:a=e.sent;case 47:e.next=42;break;case 49:e.next=54;break;case 51:e.prev=51,e.t2=e.catch(40),o.e(e.t2);case 54:return e.prev=54,o.f(),e.finish(54);case 57:return e.abrupt("return",a);case 58:case"end":return e.stop()}}),e,this,[[3,11],[15,28,31,34],[40,51,54,57]])})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_awaitComplete",value:function(){var e=E(_().mark((function e(t,r,n,a){var i,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t;case 3:i=e.sent,e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:return e.prev=8,e.next=11,r.runCallbacks("handlerDidRespond",{event:a,request:n,response:i});case 11:return e.next=13,r.doneWaiting();case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(8),e.t1 instanceof Error&&(s=e.t1);case 18:return e.next=20,r.runCallbacks("handlerDidComplete",{event:a,request:n,response:i,error:s});case 20:if(r.destroy(),!s){e.next=23;break}throw s;case 23:case"end":return e.stop()}}),e,null,[[0,6],[8,15]])})));return function(t,r,n,a){return e.apply(this,arguments)}}()}]),e}(),we=function(t){o(n,t);var r=l(n);function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(this,n),t.cacheName=w(t.cacheName),(e=r.call(this,t))._fallbackToNetwork=!1!==t.fallbackToNetwork,e.plugins.push(n.copyRedirectedCacheableResponsesPlugin),e}return i(n,[{key:"_handle",value:function(){var e=E(_().mark((function e(t,r){var n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.cacheMatch(t);case 2:if(!(n=e.sent)){e.next=5;break}return e.abrupt("return",n);case 5:if(!r.event||"install"!==r.event.type){e.next=9;break}return e.next=8,this._handleInstall(t,r);case 8:case 11:return e.abrupt("return",e.sent);case 9:return e.next=11,this._handleFetch(t,r);case 12:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_handleFetch",value:function(){var t=E(_().mark((function t(r,n){var a,i,s,c,o,u;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n.params||{},!this._fallbackToNetwork){t.next=17;break}return s=i.integrity,c=r.integrity,o=!c||c===s,t.next=8,n.fetch(new Request(r,{integrity:"no-cors"!==r.mode?c||s:void 0}));case 8:if(a=t.sent,!s||!o||"no-cors"===r.mode){t.next=15;break}return this._useDefaultCacheabilityPluginIfNeeded(),t.next=13,n.cachePut(r,a.clone());case 13:t.sent;case 15:t.next=18;break;case 17:throw new y("missing-precache-entry",{cacheName:this.cacheName,url:r.url});case 18:t.next=34;break;case 23:t.t0=t.sent;case 24:u=t.t0,e.groupCollapsed("Precaching is responding to: "+I(r.url)),e.log("Serving the precached url: ".concat(I(u instanceof Request?u.url:u))),e.groupCollapsed("View request details here."),e.log(r),e.groupEnd(),e.groupCollapsed("View response details here."),e.log(a),e.groupEnd(),e.groupEnd();case 34:return t.abrupt("return",a);case 35:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}()},{key:"_handleInstall",value:function(){var e=E(_().mark((function e(t,r){var n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._useDefaultCacheabilityPluginIfNeeded(),e.next=3,r.fetch(t);case 3:return n=e.sent,e.next=6,r.cachePut(t,n.clone());case 6:if(e.sent){e.next=9;break}throw new y("bad-precaching-response",{url:t.url,status:n.status});case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_useDefaultCacheabilityPluginIfNeeded",value:function(){var e,t=null,r=0,a=O(this.plugins.entries());try{for(a.s();!(e=a.n()).done;){var i=le(e.value,2),s=i[0],c=i[1];c!==n.copyRedirectedCacheableResponsesPlugin&&(c===n.defaultPrecacheCacheabilityPlugin&&(t=s),c.cacheWillUpdate&&r++)}}catch(o){a.e(o)}finally{a.f()}0===r?this.plugins.push(n.defaultPrecacheCacheabilityPlugin):r>1&&null!==t&&this.plugins.splice(t,1)}}]),n}(xe);we.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:function(e){return E(_().mark((function t(){var r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=e.response)&&!(r.status>=400)){t.next=3;break}return t.abrupt("return",null);case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})))()}},we.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:function(e){return E(_().mark((function t(){var r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.response).redirected){t.next=7;break}return t.next=4,M(r);case 4:t.t0=t.sent,t.next=8;break;case 7:t.t0=r;case 8:return t.abrupt("return",t.t0);case 9:case"end":return t.stop()}}),t)})))()}};var ke,_e=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.cacheName,n=t.plugins,a=void 0===n?[]:n,i=t.fallbackToNetwork,c=void 0===i||i;s(this,e),this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new we({cacheName:w(r),plugins:[].concat(ve(a),[new be({precacheController:this})]),fallbackToNetwork:c}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}return i(e,[{key:"strategy",get:function(){return this._strategy}},{key:"precache",value:function(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}},{key:"addToCacheList",value:function(e){var t,r=[],n=O(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;"string"===typeof a?r.push(a):a&&void 0===a.revision&&r.push(a.url);var i=de(a),s=i.cacheKey,c=i.url,o="string"!==typeof a&&a.revision?"reload":"default";if(this._urlsToCacheKeys.has(c)&&this._urlsToCacheKeys.get(c)!==s)throw new y("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(c),secondEntry:s});if("string"!==typeof a&&a.integrity){if(this._cacheKeysToIntegrities.has(s)&&this._cacheKeysToIntegrities.get(s)!==a.integrity)throw new y("add-to-cache-list-conflicting-integrities",{url:c});this._cacheKeysToIntegrities.set(s,a.integrity)}if(this._urlsToCacheKeys.set(c,s),this._urlsToCacheModes.set(c,o),r.length>0){var u="Workbox is precaching URLs without revision "+"info: ".concat(r.join(", "),"\nThis is generally NOT safe. ")+"Learn more at https://bit.ly/wb-precache";console.warn(u)}}}catch(h){n.e(h)}finally{n.f()}}},{key:"install",value:function(e){var t=this;return K(e,E(_().mark((function r(){var n,a,i,s,c,o,u,h,f,l,p;return _().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=new ye,t.strategy.plugins.push(n),a=O(t._urlsToCacheKeys),r.prev=3,a.s();case 5:if((i=a.n()).done){r.next=14;break}return s=le(i.value,2),c=s[0],o=s[1],u=t._cacheKeysToIntegrities.get(o),h=t._urlsToCacheModes.get(c),f=new Request(c,{integrity:u,cache:h,credentials:"same-origin"}),r.next=12,Promise.all(t.strategy.handleAll({params:{cacheKey:o},request:f,event:e}));case 12:r.next=5;break;case 14:r.next=19;break;case 16:r.prev=16,r.t0=r.catch(3),a.e(r.t0);case 19:return r.prev=19,a.f(),r.finish(19);case 22:return l=n.updatedURLs,p=n.notUpdatedURLs,r.abrupt("return",{updatedURLs:l,notUpdatedURLs:p});case 25:case"end":return r.stop()}}),r,null,[[3,16,19,22]])}))))}},{key:"activate",value:function(e){var t=this;return K(e,E(_().mark((function e(){var r,n,a,i,s,c,o;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,self.caches.open(t.strategy.cacheName);case 2:return r=e.sent,e.next=5,r.keys();case 5:n=e.sent,a=new Set(t._urlsToCacheKeys.values()),i=[],s=O(n),e.prev=9,s.s();case 11:if((c=s.n()).done){e.next=19;break}if(o=c.value,a.has(o.url)){e.next=17;break}return e.next=16,r.delete(o);case 16:i.push(o.url);case 17:e.next=11;break;case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(9),s.e(e.t0);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",{deletedURLs:i});case 29:case"end":return e.stop()}}),e,null,[[9,21,24,27]])}))))}},{key:"getURLsToCacheKeys",value:function(){return this._urlsToCacheKeys}},{key:"getCachedURLs",value:function(){return ve(this._urlsToCacheKeys.keys())}},{key:"getCacheKeyForURL",value:function(e){var t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}},{key:"getIntegrityForCacheKey",value:function(e){return this._cacheKeysToIntegrities.get(e)}},{key:"matchPrecache",value:function(){var e=E(_().mark((function e(t){var r,n,a;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t instanceof Request?t.url:t,!(n=this.getCacheKeyForURL(r))){e.next=7;break}return e.next=5,self.caches.open(this.strategy.cacheName);case 5:return a=e.sent,e.abrupt("return",a.match(n));case 7:return e.abrupt("return",void 0);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createHandlerBoundToURL",value:function(e){var t=this,r=this.getCacheKeyForURL(e);if(!r)throw new y("non-precached-url",{url:e});return function(n){return n.request=new Request(e),n.params=Object.assign({cacheKey:r},n.params),t.strategy.handle(n)}}}]),e}(),Re=function(){return ke||(ke=new _e),ke};r(504);var Ee,Le=function(e){return e&&"object"===typeof e?e:{handle:e}},Ce=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";s(this,e),this.handler=Le(r),this.match=t,this.method=n}return i(e,[{key:"setCatchHandler",value:function(e){this.catchHandler=Le(e)}}]),e}(),Oe=function(e){o(r,e);var t=l(r);function r(e,n,a){s(this,r);return t.call(this,(function(t){var r=t.url,n=e.exec(r.href);if(n&&(r.origin===location.origin||0===n.index))return n.slice(1)}),n,a)}return i(r)}(Ce),Te=function(){function e(){s(this,e),this._routes=new Map,this._defaultHandlerMap=new Map}return i(e,[{key:"routes",get:function(){return this._routes}},{key:"addFetchListener",value:function(){var e=this;self.addEventListener("fetch",(function(t){var r=t.request,n=e.handleRequest({request:r,event:t});n&&t.respondWith(n)}))}},{key:"addCacheListener",value:function(){var e=this;self.addEventListener("message",(function(t){if(t.data&&"CACHE_URLS"===t.data.type){var r=t.data.payload;0;var n=Promise.all(r.urlsToCache.map((function(r){"string"===typeof r&&(r=[r]);var n=p(Request,ve(r));return e.handleRequest({request:n,event:t})})));t.waitUntil(n),t.ports&&t.ports[0]&&n.then((function(){return t.ports[0].postMessage(!0)}))}}))}},{key:"handleRequest",value:function(e){var t=this,r=e.request,n=e.event;var a=new URL(r.url,location.href);if(a.protocol.startsWith("http")){var i=a.origin===location.origin,s=this.findMatchingRoute({event:n,request:r,sameOrigin:i,url:a}),c=s.params,o=s.route,u=o&&o.handler;0;var h=r.method;if(!u&&this._defaultHandlerMap.has(h)&&(u=this._defaultHandlerMap.get(h)),u){var f;0;try{f=u.handle({url:a,request:r,event:n,params:c})}catch(p){f=Promise.reject(p)}var l=o&&o.catchHandler;return f instanceof Promise&&(this._catchHandler||l)&&(f=f.catch(function(){var e=E(_().mark((function e(i){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l){e.next=11;break}return e.prev=2,e.next=5,l.handle({url:a,request:r,event:n,params:c});case 5:return e.abrupt("return",e.sent);case 8:e.prev=8,e.t0=e.catch(2),e.t0 instanceof Error&&(i=e.t0);case 11:if(!t._catchHandler){e.next=14;break}return e.abrupt("return",t._catchHandler.handle({url:a,request:r,event:n}));case 14:throw i;case 15:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}())),f}}}},{key:"findMatchingRoute",value:function(e){var t,r=e.url,n=e.sameOrigin,a=e.request,i=e.event,s=O(this._routes.get(a.method)||[]);try{for(s.s();!(t=s.n()).done;){var c=t.value,o=void 0,u=c.match({url:r,sameOrigin:n,request:a,event:i});if(u)return o=u,(Array.isArray(o)&&0===o.length||u.constructor===Object&&0===Object.keys(u).length||"boolean"===typeof u)&&(o=void 0),{route:c,params:o}}}catch(h){s.e(h)}finally{s.f()}return{}}},{key:"setDefaultHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";this._defaultHandlerMap.set(t,Le(e))}},{key:"setCatchHandler",value:function(e){this._catchHandler=Le(e)}},{key:"registerRoute",value:function(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}},{key:"unregisterRoute",value:function(e){if(!this._routes.has(e.method))throw new y("unregister-route-but-not-found-with-method",{method:e.method});var t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new y("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}]),e}(),je=function(){return Ee||((Ee=new Te).addFetchListener(),Ee.addCacheListener()),Ee};function Pe(e,t,r){var n;if("string"===typeof e){var a=new URL(e,location.href);n=new Ce((function(e){return e.url.href===a.href}),t,r)}else if(e instanceof RegExp)n=new Oe(e,t,r);else if("function"===typeof e)n=new Ce(e,t,r);else{if(!(e instanceof Ce))throw new y("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=e}return je().registerRoute(n),n}function Se(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function(){var r=a[n];t.some((function(e){return e.test(r)}))&&e.searchParams.delete(r)},n=0,a=ve(e.searchParams.keys());n1&&void 0!==arguments[1]?arguments[1]:{},r=t.ignoreURLParametersMatching,n=void 0===r?[/^utm_/,/^fbclid$/]:r,a=t.directoryIndex,i=void 0===a?"index.html":a,s=t.cleanURLs,c=void 0===s||s,o=t.urlManipulation;return _().mark((function t(){var r,a,s,u,h,f,l,p;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new URL(e,location.href)).hash="",t.next=4,r.href;case 4:return a=Se(r,n),t.next=7,a.href;case 7:if(!i||!a.pathname.endsWith("/")){t.next=12;break}return(s=new URL(a.href)).pathname+=i,t.next=12,s.href;case 12:if(!c){t.next=17;break}return(u=new URL(a.href)).pathname+=".html",t.next=17,u.href;case 17:if(!o){t.next=36;break}h=o({url:r}),f=O(h),t.prev=20,f.s();case 22:if((l=f.n()).done){t.next=28;break}return p=l.value,t.next=26,p.href;case 26:t.next=22;break;case 28:t.next=33;break;case 30:t.prev=30,t.t0=t.catch(20),f.e(t.t0);case 33:return t.prev=33,f.f(),t.finish(33);case 36:case"end":return t.stop()}}),t,null,[[20,30,33,36]])}))()}(a.url,n));try{for(s.s();!(r=s.n()).done;){var c=r.value,o=i.get(c);if(o)return{cacheKey:o,integrity:e.getIntegrityForCacheKey(o)}}}catch(u){s.e(u)}finally{s.f()}}),e.strategy)}return i(r)}(Ce);var qe,Ne={cacheWillUpdate:function(){var e=E(_().mark((function e(t){var r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(200!==(r=t.response).status&&0!==r.status){e.next=3;break}return e.abrupt("return",r);case 3:return e.abrupt("return",null);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},Ue=function(e){o(r,e);var t=l(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(this,r),(e=t.call(this,n)).plugins.some((function(e){return"cacheWillUpdate"in e}))||e.plugins.unshift(Ne),e}return i(r,[{key:"_handle",value:function(){var e=E(_().mark((function e(t,r){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return[],n=r.fetchAndCachePut(t).catch((function(){})),r.waitUntil(n),e.next=6,r.cacheMatch(t);case 6:if(!(a=e.sent)){e.next=11;break}0,e.next=21;break;case 11:return e.prev=12,e.next=15,n;case 15:a=e.sent,e.next=21;break;case 18:e.prev=18,e.t0=e.catch(12),e.t0 instanceof Error&&(i=e.t0);case 21:if(a){e.next=24;break}throw new y("no-response",{url:t.url,error:i});case 24:return e.abrupt("return",a);case 25:case"end":return e.stop()}}),e,this,[[12,18]])})));return function(t,r){return e.apply(this,arguments)}}()}]),r}(xe);self.addEventListener("activate",(function(){return self.clients.claim()})),function(e){Re().precache(e)}([{'revision':'36057403e9e3ed73f0793ab6d39642f3','url':'/index.html'},{'revision':null,'url':'/static/js/915.89514730.chunk.js'},{'revision':null,'url':'/static/js/main.1ff7d330.js'}]),function(e){var t=Re();Pe(new De(t,e))}(qe);var Ie,Ae=new RegExp("/[^/?]+\\.[^/]+$");Pe((function(e){var t=e.request,r=e.url;return"navigate"===t.mode&&(!r.pathname.startsWith("/_")&&!r.pathname.match(Ae))}),(Ie="/index.html",Re().createHandlerBoundToURL(Ie))),Pe((function(e){var t=e.url;return t.origin===self.location.origin&&t.pathname.endsWith(".png")}),new Ue({cacheName:"images",plugins:[new pe({maxEntries:50})]})),self.addEventListener("message",(function(e){e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}))}()}(); +//# sourceMappingURL=service-worker.js.map \ No newline at end of file diff --git a/src/modular/web/modular_frontend/service-worker.js.LICENSE.txt b/src/modular/web/modular_frontend/service-worker.js.LICENSE.txt new file mode 100644 index 0000000..ae386fb --- /dev/null +++ b/src/modular/web/modular_frontend/service-worker.js.LICENSE.txt @@ -0,0 +1 @@ +/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ diff --git a/src/modular/web/modular_frontend/service-worker.js.map b/src/modular/web/modular_frontend/service-worker.js.map new file mode 100644 index 0000000..353329b --- /dev/null +++ b/src/modular/web/modular_frontend/service-worker.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/workbox-core/_version.js","../node_modules/workbox-expiration/_version.js","../node_modules/workbox-precaching/_version.js","../node_modules/workbox-routing/_version.js","../node_modules/workbox-strategies/_version.js","../webpack/bootstrap","../node_modules/workbox-core/_private/logger.js","../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/inherits.js","../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/esm/createSuper.js","../node_modules/@babel/runtime/helpers/esm/construct.js","../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","../node_modules/workbox-core/models/messages/messages.js","../node_modules/workbox-core/models/messages/messageGenerator.js","../node_modules/workbox-core/_private/WorkboxError.js","../node_modules/workbox-core/models/quotaErrorCallbacks.js","../node_modules/workbox-core/_private/cacheNames.js","../node_modules/workbox-core/_private/canConstructResponseFromBodyStream.js","../node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js","../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js","../node_modules/workbox-core/_private/cacheMatchIgnoreParams.js","../node_modules/workbox-core/_private/dontWaitFor.js","../node_modules/workbox-core/_private/Deferred.js","../node_modules/workbox-core/_private/executeQuotaErrorCallbacks.js","../node_modules/workbox-core/_private/getFriendlyURL.js","../node_modules/workbox-core/_private/timeout.js","../node_modules/workbox-core/_private/waitUntil.js","../node_modules/workbox-core/copyResponse.js","../node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/idb/build/wrap-idb-value.js","../node_modules/idb/build/index.js","../node_modules/workbox-expiration/models/CacheTimestampsModel.js","../node_modules/workbox-expiration/CacheExpiration.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/workbox-expiration/ExpirationPlugin.js","../node_modules/workbox-core/registerQuotaErrorCallback.js","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../node_modules/workbox-precaching/utils/createCacheKey.js","../node_modules/workbox-precaching/utils/PrecacheInstallReportPlugin.js","../node_modules/workbox-precaching/utils/PrecacheCacheKeyPlugin.js","../node_modules/workbox-strategies/StrategyHandler.js","../node_modules/workbox-strategies/Strategy.js","../node_modules/workbox-precaching/PrecacheStrategy.js","../node_modules/workbox-precaching/PrecacheController.js","../node_modules/workbox-precaching/utils/getOrCreatePrecacheController.js","../node_modules/workbox-routing/utils/getOrCreateDefaultRouter.js","../node_modules/workbox-routing/utils/normalizeHandler.js","../node_modules/workbox-routing/Route.js","../node_modules/workbox-routing/utils/constants.js","../node_modules/workbox-routing/RegExpRoute.js","../node_modules/workbox-routing/Router.js","../node_modules/workbox-routing/registerRoute.js","../node_modules/workbox-precaching/utils/removeIgnoredSearchParams.js","../node_modules/workbox-precaching/PrecacheRoute.js","../node_modules/workbox-precaching/utils/generateURLVariations.js","../node_modules/workbox-strategies/utils/messages.js","../node_modules/workbox-precaching/precacheAndRoute.js","../node_modules/workbox-strategies/plugins/cacheOkAndOpaquePlugin.js","../node_modules/workbox-strategies/StaleWhileRevalidate.js","../node_modules/workbox-core/clientsClaim.js","../node_modules/workbox-precaching/precache.js","service-worker.ts","../node_modules/workbox-precaching/addRoute.js","../node_modules/workbox-precaching/createHandlerBoundToURL.js"],"names":["self","_","e","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","logger","_typeof","o","Symbol","iterator","constructor","prototype","_toPropertyKey","arg","key","input","hint","prim","toPrimitive","res","call","TypeError","String","Number","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","Constructor","protoProps","staticProps","instance","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","subClass","superClass","create","value","_getPrototypeOf","getPrototypeOf","_isNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","_possibleConstructorReturn","ReferenceError","Derived","hasNativeReflectConstruct","result","Super","NewTarget","this","arguments","apply","_construct","Parent","args","Class","a","push","Function","_wrapNativeSuper","_cache","Map","fn","toString","indexOf","has","get","set","Wrapper","messageGenerator","code","msg","_len","Array","_key","concat","JSON","stringify","WorkboxError","_Error","_inherits","_super","_createSuper","errorCode","details","_this","_classCallCheck","message","name","_createClass","Error","quotaErrorCallbacks","Set","supportStatus","_cacheNameDetails","googleAnalytics","precache","prefix","runtime","suffix","registration","scope","_createCacheName","cacheName","filter","join","cacheNames","userCacheName","t","r","n","hasOwnProperty","c","asyncIterator","u","toStringTag","define","wrap","Generator","Context","makeInvokeMethod","tryCatch","type","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","d","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","resolve","__await","then","callInvokeWithMethodAndArg","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","mark","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","gen","reject","_next","_throw","info","error","err","_arrayLikeToArray","arr","len","arr2","_unsupportedIterableToArray","minLen","from","test","allowArrayLike","it","isArray","F","_e","normalCompletion","didErr","step","_e2","stripParams","fullURL","ignoreParams","_step","strippedURL","URL","_iterator","_createForOfIteratorHelper","param","searchParams","delete","href","cacheMatchIgnoreParams","_x","_x2","_x3","_x4","_cacheMatchIgnoreParams","_asyncToGenerator","_regeneratorRuntime","_callee","cache","request","matchOptions","strippedRequestURL","keysOptions","cacheKeys","_iterator2","_step2","cacheKey","strippedCacheKeyURL","_context","url","match","assign","ignoreSearch","t0","canConstructResponseFromBodyStream","testResponse","Response","body","dontWaitFor","promise","Deferred","executeQuotaErrorCallbacks","_executeQuotaErrorCallbacks","callback","process","getFriendlyURL","location","replace","RegExp","origin","timeout","ms","setTimeout","waitUntil","event","asyncFn","returnPromise","copyResponse","_copyResponse","response","modifier","responseURL","clonedResponse","responseInit","modifiedResponseInit","clone","headers","Headers","status","statusText","blob","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","_objectSpread2","obj","getOwnPropertyDescriptors","defineProperties","idbProxyableTypes","cursorAdvanceMethods","instanceOfAny","object","constructors","some","cursorRequestMap","WeakMap","transactionDoneMap","transactionStoreNamesMap","transformCache","reverseTransformCache","idbProxyTraps","prop","receiver","IDBTransaction","objectStoreNames","objectStore","wrapFunction","func","IDBDatabase","transaction","IDBCursor","advance","continue","continuePrimaryKey","includes","_len2","_key2","unwrap","_len3","_key3","storeNames","tx","sort","transformCachableValue","unlisten","removeEventListener","DOMException","addEventListener","cacheDonePromiseForTransaction","IDBObjectStore","IDBIndex","IDBRequest","success","catch","promisifyRequest","newValue","openDB","version","_ref","blocked","upgrade","blocking","terminated","indexedDB","open","openPromise","oldVersion","newVersion","db","readMethods","writeMethods","cachedMethods","getMethod","targetFuncName","useIndex","isWrite","_ref3","storeName","_target","_args","store","index","shift","all","oldTraps","_objectSpread","CACHE_OBJECT_STORE","normalizeURL","unNormalizedUrl","hash","CacheTimestampsModel","_db","_cacheName","objStore","createObjectStore","keyPath","createIndex","unique","_upgradeDb","deleteDatabase","deleteDB","_setTimestamp","timestamp","entry","id","_getId","getDb","durability","put","_getTimestamp","_callee2","_context2","_expireEntries","_callee3","minTimestamp","maxCount","cursor","entriesToDelete","entriesNotDeletedCount","urlsDeleted","_i","_entriesToDelete","_context3","openCursor","_x5","_getDb","_callee4","_context4","_upgradeDbAndDeleteOldDbs","CacheExpiration","config","_isRunning","_rerunRequested","_maxEntries","maxEntries","_maxAgeSeconds","maxAgeSeconds","_matchOptions","_timestampModel","urlsExpired","Date","now","expireEntries","caches","_updateTimestamp","setTimestamp","_isURLExpired","expireOlderThan","getTimestamp","_delete2","Infinity","_slicedToArray","ExpirationPlugin","cachedResponseWillBeUsed","_ref2","cachedResponse","isFresh","cacheExpiration","updateTimestampDone","_isResponseDateFresh","_getCacheExpiration","updateTimestamp","cacheDidUpdate","_ref4","_config","_cacheExpirations","purgeOnQuotaError","add","registerQuotaErrorCallback","deleteCacheAndMetadata","dateHeaderTimestamp","_getDateHeaderTimestamp","dateHeader","headerTime","getTime","_deleteCacheAndMetadata","_step$value","iter","createCacheKey","urlObject","revision","cacheKeyURL","originalURL","PrecacheInstallReportPlugin","updatedURLs","notUpdatedURLs","handlerWillStart","state","originalRequest","Request","PrecacheCacheKeyPlugin","precacheController","cacheKeyWillBeUsed","params","_precacheController","getCacheKeyForURL","toRequest","StrategyHandler","strategy","options","_cacheKeys","_strategy","_handlerDeferred","_extendLifetimePromises","_plugins","_toConsumableArray","plugins","_pluginStateMap","plugin","_fetch","fetch","possiblePreloadResponse","cb","pluginFilteredRequest","fetchResponse","_iterator3","_step3","mode","FetchEvent","preloadResponse","hasCallback","iterateCallbacks","t1","thrownErrorMessage","fetchOptions","t2","t3","runCallbacks","_fetchAndCachePut","responseClone","cachePut","_cacheMatch","_this$_strategy","effectiveRequest","multiMatchOptions","_iterator4","_step4","getCacheKey","_cachePut","vary","responseToCache","_this$_strategy2","hasCacheUpdateCallback","oldResponse","_iterator5","_step5","debug","_ensureResponseSafeToCache","newResponse","_x6","_getCacheKey","_callee5","_iterator6","_step6","_context5","_x7","_x8","_step7","_iterator7","_runCallbacks","_callee6","_iterator8","_step8","_context6","_x9","_x10","_iterator9","_step9","_loop","_context8","statefulCallback","_context7","statefulParam","_doneWaiting","_callee7","_context9","_ensureResponseSafeToCache2","_callee8","pluginsUsed","_iterator10","_step10","_context10","_x11","Strategy","handleAll","handler","responseDone","_getResponse","_awaitComplete","_getResponse2","_callback","_handle","_awaitComplete2","doneWaiting","destroy","PrecacheStrategy","_Strategy","_fallbackToNetwork","fallbackToNetwork","copyRedirectedCacheableResponsesPlugin","_handle2","cacheMatch","_handleInstall","_handleFetch","_handleFetch2","integrityInManifest","integrityInRequest","noIntegrityConflict","integrity","_useDefaultCacheabilityPluginIfNeeded","groupCollapsed","log","groupEnd","_handleInstall2","defaultPluginIndex","cacheWillUpdatePluginCount","entries","defaultPrecacheCacheabilityPlugin","cacheWillUpdate","splice","redirected","PrecacheController","_ref$plugins","_ref$fallbackToNetwor","_urlsToCacheKeys","_urlsToCacheModes","_cacheKeysToIntegrities","install","activate","addToCacheList","_installAndActiveListenersAdded","urlsToWarnAbout","_createCacheKey","cacheMode","firstEntry","secondEntry","warningMessage","console","warn","installReportPlugin","_step2$value","credentials","_this2","currentlyCachedRequests","expectedCacheKeys","deletedURLs","_matchPrecache","_this3","getOrCreatePrecacheController","defaultRouter","normalizeHandler","Route","catchHandler","RegExpRoute","_Route","regExp","exec","Router","_routes","_defaultHandlerMap","responsePromise","handleRequest","respondWith","data","payload","requestPromises","urlsToCache","map","ports","postMessage","protocol","startsWith","sameOrigin","_this$findMatchingRou","findMatchingRoute","route","_catchHandler","matchResult","routeIndex","getOrCreateDefaultRouter","addFetchListener","addCacheListener","registerRoute","capture","captureUrl","moduleName","funcName","paramName","removeIgnoredSearchParams","ignoreURLParametersMatching","_arr","PrecacheRoute","urlsToCacheKeys","getURLsToCacheKeys","_ref$ignoreURLParamet","_ref$directoryIndex","directoryIndex","_ref$cleanURLs","cleanURLs","urlManipulation","urlWithoutIgnoredParams","directoryURL","cleanURL","additionalURLs","urlToAttempt","pathname","endsWith","generateURLVariations","possibleURL","getIntegrityForCacheKey","cacheOkAndOpaquePlugin","_cacheWillUpdate","StaleWhileRevalidate","unshift","fetchAndCachePromise","fetchAndCachePut","clients","claim","__WB_MANIFEST","addRoute","fileExtensionRegexp","createHandlerBoundToURL","skipWaiting"],"mappings":";+CAEA,IACI,KAAK,uBAAyB,GAClC,CACA,MAAO,GAAK,kBCHZ,IACI,KAAK,6BAA+B,GACxC,CACA,MAAO,GAAK,kBCHZ,IACI,KAAK,6BAA+B,GACxC,CACA,MAAO,GAAK,kBCHZ,IACI,KAAK,0BAA4B,GACrC,CACA,MAAO,GAAK,kBCHZ,IACI,KAAK,6BAA+B,GACxC,CACA,MAAO,GAAK,ICJR,EAA2B,CAAC,EAGhC,SAAS,EAAoB,GAE5B,IAAI,EAAe,EAAyB,GAC5C,QAAqB,IAAjB,EACH,OAAO,EAAa,QAGrB,IAAI,EAAS,EAAyB,GAAY,CAGjD,QAAS,CAAC,GAOX,OAHA,EAAoB,GAAU,EAAQ,EAAO,QAAS,GAG/C,EAAO,OACf,wBCfM,EACA,KCRS,SAAS,EAAQ,GAG9B,OAAO,EAAU,mBAAqB,QAAU,iBAAmB,OAAO,SAAW,SAAU,GAC7F,cAAc,CAChB,EAAI,SAAU,GACZ,OAAO,GAAK,mBAAqB,QAAU,EAAE,cAAgB,QAAU,IAAM,OAAO,UAAY,gBAAkB,CACpH,EAAG,EAAQ,EACb,CCNe,SAAS,EAAe,GACrC,IAAI,ECFS,SAAsB,EAAO,GAC1C,GAAuB,WAAnB,EAAQ,IAAiC,OAAV,EAAgB,OAAO,EAC1D,IAAI,EAAO,EAAM,OAAO,aACxB,QAAa,IAAT,EAAoB,CACtB,IAAI,EAAM,EAAK,KAAK,EAAO,GAAQ,WACnC,GAAqB,WAAjB,EAAQ,GAAmB,OAAO,EACtC,MAAM,IAAI,UAAU,+CACtB,CACA,OAAiB,WAAT,EAAoB,OAAS,QAAQ,EAC/C,CDPY,CAAY,EAAK,UAC3B,MAAwB,WAAjB,EAAQ,GAAoB,EAAM,OAAO,EAClD,CEJA,SAAS,EAAkB,EAAQ,GACjC,IAAK,IAAI,EAAI,EAAG,EAAI,EAAM,OAAQ,IAAK,CACrC,IAAI,EAAa,EAAM,GACvB,EAAW,WAAa,EAAW,aAAc,EACjD,EAAW,cAAe,EACtB,UAAW,IAAY,EAAW,UAAW,GACjD,OAAO,eAAe,EAAQ,EAAc,EAAW,KAAM,EAC/D,CACF,CACe,SAAS,EAAa,EAAa,EAAY,GAM5D,OALI,GAAY,EAAkB,EAAY,UAAW,GACrD,GAAa,EAAkB,EAAa,GAChD,OAAO,eAAe,EAAa,YAAa,CAC9C,UAAU,IAEL,CACT,CCjBe,SAAS,EAAgB,EAAU,GAChD,KAAM,aAAoB,GACxB,MAAM,IAAI,UAAU,oCAExB,CCJe,SAAS,EAAgB,EAAG,GAKzC,OAJA,EAAkB,OAAO,eAAiB,OAAO,eAAe,OAAS,SAAyB,EAAG,GAEnG,OADA,EAAE,UAAY,EACP,CACT,EACO,EAAgB,EAAG,EAC5B,CCLe,SAAS,EAAU,EAAU,GAC1C,GAA0B,oBAAf,GAA4C,OAAf,EACtC,MAAM,IAAI,UAAU,sDAEtB,EAAS,UAAY,OAAO,OAAO,GAAc,EAAW,UAAW,CACrE,YAAa,CACX,MAAO,EACP,UAAU,EACV,cAAc,KAGlB,OAAO,eAAe,EAAU,YAAa,CAC3C,UAAU,IAER,GAAY,EAAe,EAAU,EAC3C,CChBe,SAAS,EAAgB,GAItC,OAHA,EAAkB,OAAO,eAAiB,OAAO,eAAe,OAAS,SAAyB,GAChG,OAAO,EAAE,WAAa,OAAO,eAAe,EAC9C,EACO,EAAgB,EACzB,CCLe,SAAS,IACtB,GAAuB,qBAAZ,UAA4B,QAAQ,UAAW,OAAO,EACjE,GAAI,QAAQ,UAAU,KAAM,OAAO,EACnC,GAAqB,oBAAV,MAAsB,OAAO,EACxC,IAEE,OADA,QAAQ,UAAU,QAAQ,KAAK,QAAQ,UAAU,QAAS,IAAI,WAAa,MACpE,CACT,CAAE,MAAO,GACP,OAAO,CACT,CACF,CCRe,SAAS,EAA2B,EAAM,GACvD,GAAI,IAA2B,WAAlB,EAAQ,IAAsC,oBAAT,GAChD,OAAO,EACF,QAAa,IAAT,EACT,MAAM,IAAI,UAAU,4DAEtB,OCRa,SAAgC,GAC7C,QAAa,IAAT,EACF,MAAM,IAAI,eAAe,6DAE3B,OAAO,CACT,CDGS,CAAsB,EAC/B,CENe,SAAS,EAAa,GACnC,IAAI,EAA4B,IAChC,OAAO,WACL,IACE,EADE,EAAQ,EAAe,GAE3B,GAAI,EAA2B,CAC7B,IAAI,EAAY,EAAe,MAAM,YACrC,EAAS,QAAQ,UAAU,EAAO,UAAW,EAC/C,MACE,EAAS,EAAM,MAAM,KAAM,WAE7B,OAAO,EAA0B,KAAM,EACzC,CACF,CCde,SAAS,EAAW,EAAQ,EAAM,GAa/C,OAXE,EADE,IACW,QAAQ,UAAU,OAElB,SAAoB,EAAQ,EAAM,GAC7C,IAAI,EAAI,CAAC,MACT,EAAE,KAAK,MAAM,EAAG,GAChB,IACI,EAAW,IADG,SAAS,KAAK,MAAM,EAAQ,IAG9C,OADI,GAAO,EAAe,EAAU,EAAM,WACnC,CACT,EAEK,EAAW,MAAM,KAAM,UAChC,CCZe,SAAS,EAAiB,GACvC,IAAI,EAAwB,oBAAR,IAAqB,IAAI,SAAQ,EAuBrD,OAtBA,EAAmB,SAA0B,GAC3C,GAAc,OAAV,ICPO,SAA2B,GACxC,IACE,OAAgE,IAAzD,SAAS,SAAS,KAAK,GAAI,QAAQ,gBAC5C,CAAE,MAAO,GACP,MAAqB,oBAAP,CAChB,CACF,CDC2B,CAAiB,GAAQ,OAAO,EACvD,GAAqB,oBAAV,EACT,MAAM,IAAI,UAAU,sDAEtB,GAAsB,qBAAX,EAAwB,CACjC,GAAI,EAAO,IAAI,GAAQ,OAAO,EAAO,IAAI,GACzC,EAAO,IAAI,EAAO,EACpB,CACA,SAAS,IACP,OAAO,EAAU,EAAO,UAAW,EAAe,MAAM,YAC1D,CASA,OARA,EAAQ,UAAY,OAAO,OAAO,EAAM,UAAW,CACjD,YAAa,CACX,MAAO,EACP,YAAY,EACZ,UAAU,EACV,cAAc,KAGX,EAAe,EAAS,EACjC,EACO,EAAiB,EAC1B,CErBO,ICeM,EAdI,SAAC,GACC,IAAf,IAAI,EAAM,EAAK,EAAA,UAAA,OADQ,EAAI,IAAA,MAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,EAAA,EAAA,IAAJ,EAAI,EAAA,GAAA,UAAA,GAK3B,OAHI,EAAK,OAAS,IACd,GAAO,OAAJ,OAAW,KAAK,UAAU,KAE1B,CACX,ECGM,EAAY,SAAA,GAAA,EAAA,EAAA,GAAA,IAAA,EAAA,EAAA,GASd,SAAA,EAAY,EAAW,GAAS,IAAA,EAAA,EAAA,KAAA,GAC5B,IAAM,EAAU,EAAiB,EAAW,GAGrB,OAFvB,EAAA,EAAA,KAAA,KAAM,IACD,KAAO,EACZ,EAAK,QAAU,EAAQ,CAC3B,CAAC,OAAA,EAAA,EAAA,CAda,CAcb,EAdsB,QCPrB,EAAsB,IAAI,ICHhC,ICAI,EDAE,EAAoB,CACtB,gBAAiB,kBACjB,SAAU,cACV,OAAQ,UACR,QAAS,UACT,OAAgC,qBAAjB,aAA+B,aAAa,MAAQ,IAEjE,EAAmB,SAAC,GACtB,MAAO,CAAC,EAAkB,OAAQ,EAAW,EAAkB,QAC1D,QAAO,SAAC,GAAK,OAAK,GAAS,EAAM,OAAS,CAAC,IAC3C,KAAK,IACd,EAMa,EAWQ,SAAC,GACd,OAAO,GAAiB,EAAiB,EAAkB,SAC/D,EAbS,EAiBO,SAAC,GACb,OAAO,GAAiB,EAAiB,EAAkB,QAC/D,EE3CW,SAAS,IAEtB,EAAsB,WACpB,OAAO,CACT,EACA,IAAI,EACF,EAAI,CAAC,EACL,EAAI,OAAO,UACX,EAAI,EAAE,eACN,EAAI,OAAO,gBAAkB,SAAU,EAAG,EAAG,GAC3C,EAAE,GAAK,EAAE,KACX,EACA,EAAI,mBAAqB,OAAS,OAAS,CAAC,EAC5C,EAAI,EAAE,UAAY,aAClB,EAAI,EAAE,eAAiB,kBACvB,EAAI,EAAE,aAAe,gBACvB,SAAS,EAAO,EAAG,EAAG,GACpB,OAAO,OAAO,eAAe,EAAG,EAAG,CACjC,MAAO,EACP,YAAY,EACZ,cAAc,EACd,UAAU,IACR,EAAE,EACR,CACA,IACE,EAAO,CAAC,EAAG,GACb,CAAE,MAAO,GACP,EAAS,SAAgB,EAAG,EAAG,GAC7B,OAAO,EAAE,GAAK,CAChB,CACF,CACA,SAAS,EAAK,EAAG,EAAG,EAAG,GACrB,IAAI,EAAI,GAAK,EAAE,qBAAqB,EAAY,EAAI,EAClD,EAAI,OAAO,OAAO,EAAE,WACpB,EAAI,IAAI,EAAQ,GAAK,IACvB,OAAO,EAAE,EAAG,UAAW,CACrB,MAAO,EAAiB,EAAG,EAAG,KAC5B,CACN,CACA,SAAS,EAAS,EAAG,EAAG,GACtB,IACE,MAAO,CACL,KAAM,SACN,IAAK,EAAE,KAAK,EAAG,GAEnB,CAAE,MAAO,GACP,MAAO,CACL,KAAM,QACN,IAAK,EAET,CACF,CACA,EAAE,KAAO,EACT,IAAI,EAAI,iBACN,EAAI,iBACJ,EAAI,YACJ,EAAI,YACJ,EAAI,CAAC,EACP,SAAS,IAAa,CACtB,SAAS,IAAqB,CAC9B,SAAS,IAA8B,CACvC,IAAI,EAAI,CAAC,EACT,EAAO,EAAG,GAAG,WACX,OAAO,IACT,IACA,IAAI,EAAI,OAAO,eACb,EAAI,GAAK,EAAE,EAAE,EAAO,MACtB,GAAK,IAAM,GAAK,EAAE,KAAK,EAAG,KAAO,EAAI,GACrC,IAAI,EAAI,EAA2B,UAAY,EAAU,UAAY,OAAO,OAAO,GACnF,SAAS,EAAsB,GAC7B,CAAC,OAAQ,QAAS,UAAU,SAAQ,SAAU,GAC5C,EAAO,EAAG,GAAG,SAAU,GACrB,OAAO,KAAK,QAAQ,EAAG,EACzB,GACF,GACF,CACA,SAAS,EAAc,EAAG,GACxB,SAAS,EAAO,EAAG,EAAG,EAAG,GACvB,IAAI,EAAI,EAAS,EAAE,GAAI,EAAG,GAC1B,GAAI,UAAY,EAAE,KAAM,CACtB,IAAI,EAAI,EAAE,IACR,EAAI,EAAE,MACR,OAAO,GAAK,UAAY,EAAQ,IAAM,EAAE,KAAK,EAAG,WAAa,EAAE,QAAQ,EAAE,SAAS,MAAK,SAAU,GAC/F,EAAO,OAAQ,EAAG,EAAG,EACvB,IAAG,SAAU,GACX,EAAO,QAAS,EAAG,EAAG,EACxB,IAAK,EAAE,QAAQ,GAAG,MAAK,SAAU,GAC/B,EAAE,MAAQ,EAAG,EAAE,EACjB,IAAG,SAAU,GACX,OAAO,EAAO,QAAS,EAAG,EAAG,EAC/B,GACF,CACA,EAAE,EAAE,IACN,CACA,IAAI,EACJ,EAAE,KAAM,UAAW,CACjB,MAAO,SAAe,EAAG,GACvB,SAAS,IACP,OAAO,IAAI,GAAE,SAAU,EAAG,GACxB,EAAO,EAAG,EAAG,EAAG,EAClB,GACF,CACA,OAAO,EAAI,EAAI,EAAE,KAAK,EAA4B,GAA8B,GAClF,GAEJ,CACA,SAAS,EAAiB,EAAG,EAAG,GAC9B,IAAI,EAAI,EACR,OAAO,SAAU,EAAG,GAClB,GAAI,IAAM,EAAG,MAAM,IAAI,MAAM,gCAC7B,GAAI,IAAM,EAAG,CACX,GAAI,UAAY,EAAG,MAAM,EACzB,MAAO,CACL,MAAO,EACP,MAAM,EAEV,CACA,IAAK,EAAE,OAAS,EAAG,EAAE,IAAM,IAAK,CAC9B,IAAI,EAAI,EAAE,SACV,GAAI,EAAG,CACL,IAAI,EAAI,EAAoB,EAAG,GAC/B,GAAI,EAAG,CACL,GAAI,IAAM,EAAG,SACb,OAAO,CACT,CACF,CACA,GAAI,SAAW,EAAE,OAAQ,EAAE,KAAO,EAAE,MAAQ,EAAE,SAAS,GAAI,UAAY,EAAE,OAAQ,CAC/E,GAAI,IAAM,EAAG,MAAM,EAAI,EAAG,EAAE,IAC5B,EAAE,kBAAkB,EAAE,IACxB,KAAO,WAAa,EAAE,QAAU,EAAE,OAAO,SAAU,EAAE,KACrD,EAAI,EACJ,IAAI,EAAI,EAAS,EAAG,EAAG,GACvB,GAAI,WAAa,EAAE,KAAM,CACvB,GAAI,EAAI,EAAE,KAAO,EAAI,EAAG,EAAE,MAAQ,EAAG,SACrC,MAAO,CACL,MAAO,EAAE,IACT,KAAM,EAAE,KAEZ,CACA,UAAY,EAAE,OAAS,EAAI,EAAG,EAAE,OAAS,QAAS,EAAE,IAAM,EAAE,IAC9D,CACF,CACF,CACA,SAAS,EAAoB,EAAG,GAC9B,IAAI,EAAI,EAAE,OACR,EAAI,EAAE,SAAS,GACjB,GAAI,IAAM,EAAG,OAAO,EAAE,SAAW,KAAM,UAAY,GAAK,EAAE,SAAiB,SAAM,EAAE,OAAS,SAAU,EAAE,IAAM,EAAG,EAAoB,EAAG,GAAI,UAAY,EAAE,SAAW,WAAa,IAAM,EAAE,OAAS,QAAS,EAAE,IAAM,IAAI,UAAU,oCAAsC,EAAI,aAAc,EAC1R,IAAI,EAAI,EAAS,EAAG,EAAE,SAAU,EAAE,KAClC,GAAI,UAAY,EAAE,KAAM,OAAO,EAAE,OAAS,QAAS,EAAE,IAAM,EAAE,IAAK,EAAE,SAAW,KAAM,EACrF,IAAI,EAAI,EAAE,IACV,OAAO,EAAI,EAAE,MAAQ,EAAE,EAAE,YAAc,EAAE,MAAO,EAAE,KAAO,EAAE,QAAS,WAAa,EAAE,SAAW,EAAE,OAAS,OAAQ,EAAE,IAAM,GAAI,EAAE,SAAW,KAAM,GAAK,GAAK,EAAE,OAAS,QAAS,EAAE,IAAM,IAAI,UAAU,oCAAqC,EAAE,SAAW,KAAM,EAC9P,CACA,SAAS,EAAa,GACpB,IAAI,EAAI,CACN,OAAQ,EAAE,IAEZ,KAAK,IAAM,EAAE,SAAW,EAAE,IAAK,KAAK,IAAM,EAAE,WAAa,EAAE,GAAI,EAAE,SAAW,EAAE,IAAK,KAAK,WAAW,KAAK,EAC1G,CACA,SAAS,EAAc,GACrB,IAAI,EAAI,EAAE,YAAc,CAAC,EACzB,EAAE,KAAO,gBAAiB,EAAE,IAAK,EAAE,WAAa,CAClD,CACA,SAAS,EAAQ,GACf,KAAK,WAAa,CAAC,CACjB,OAAQ,SACN,EAAE,QAAQ,EAAc,MAAO,KAAK,OAAM,EAChD,CACA,SAAS,EAAO,GACd,GAAI,GAAK,KAAO,EAAG,CACjB,IAAI,EAAI,EAAE,GACV,GAAI,EAAG,OAAO,EAAE,KAAK,GACrB,GAAI,mBAAqB,EAAE,KAAM,OAAO,EACxC,IAAK,MAAM,EAAE,QAAS,CACpB,IAAI,GAAK,EACP,EAAI,SAAS,IACX,OAAS,EAAI,EAAE,QAAS,GAAI,EAAE,KAAK,EAAG,GAAI,OAAO,EAAK,MAAQ,EAAE,GAAI,EAAK,MAAO,EAAI,EACpF,OAAO,EAAK,MAAQ,EAAG,EAAK,MAAO,EAAI,CACzC,EACF,OAAO,EAAE,KAAO,CAClB,CACF,CACA,MAAM,IAAI,UAAU,EAAQ,GAAK,mBACnC,CACA,OAAO,EAAkB,UAAY,EAA4B,EAAE,EAAG,cAAe,CACnF,MAAO,EACP,cAAc,IACZ,EAAE,EAA4B,cAAe,CAC/C,MAAO,EACP,cAAc,IACZ,EAAkB,YAAc,EAAO,EAA4B,EAAG,qBAAsB,EAAE,oBAAsB,SAAU,GAChI,IAAI,EAAI,mBAAqB,GAAK,EAAE,YACpC,QAAS,IAAM,IAAM,GAAqB,uBAAyB,EAAE,aAAe,EAAE,MACxF,EAAG,EAAE,KAAO,SAAU,GACpB,OAAO,OAAO,eAAiB,OAAO,eAAe,EAAG,IAA+B,EAAE,UAAY,EAA4B,EAAO,EAAG,EAAG,sBAAuB,EAAE,UAAY,OAAO,OAAO,GAAI,CACvM,EAAG,EAAE,MAAQ,SAAU,GACrB,MAAO,CACL,QAAS,EAEb,EAAG,EAAsB,EAAc,WAAY,EAAO,EAAc,UAAW,GAAG,WACpF,OAAO,IACT,IAAI,EAAE,cAAgB,EAAe,EAAE,MAAQ,SAAU,EAAG,EAAG,EAAG,EAAG,QACnE,IAAW,IAAM,EAAI,SACrB,IAAI,EAAI,IAAI,EAAc,EAAK,EAAG,EAAG,EAAG,GAAI,GAC5C,OAAO,EAAE,oBAAoB,GAAK,EAAI,EAAE,OAAO,MAAK,SAAU,GAC5D,OAAO,EAAE,KAAO,EAAE,MAAQ,EAAE,MAC9B,GACF,EAAG,EAAsB,GAAI,EAAO,EAAG,EAAG,aAAc,EAAO,EAAG,GAAG,WACnE,OAAO,IACT,IAAI,EAAO,EAAG,YAAY,WACxB,MAAO,oBACT,IAAI,EAAE,KAAO,SAAU,GACrB,IAAI,EAAI,OAAO,GACb,EAAI,GACN,IAAK,IAAI,KAAK,EAAG,EAAE,KAAK,GACxB,OAAO,EAAE,UAAW,SAAS,IAC3B,KAAO,EAAE,QAAS,CAChB,IAAI,EAAI,EAAE,MACV,GAAI,KAAK,EAAG,OAAO,EAAK,MAAQ,EAAG,EAAK,MAAO,EAAI,CACrD,CACA,OAAO,EAAK,MAAO,EAAI,CACzB,CACF,EAAG,EAAE,OAAS,EAAQ,EAAQ,UAAY,CACxC,YAAa,EACb,MAAO,SAAe,GACpB,GAAI,KAAK,KAAO,EAAG,KAAK,KAAO,EAAG,KAAK,KAAO,KAAK,MAAQ,EAAG,KAAK,MAAO,EAAI,KAAK,SAAW,KAAM,KAAK,OAAS,OAAQ,KAAK,IAAM,EAAG,KAAK,WAAW,QAAQ,IAAiB,EAAG,IAAK,IAAI,KAAK,KAAM,MAAQ,EAAE,OAAO,IAAM,EAAE,KAAK,KAAM,KAAO,OAAO,EAAE,MAAM,MAAQ,KAAK,GAAK,EACtR,EACA,KAAM,WACJ,KAAK,MAAO,EACZ,IAAI,EAAI,KAAK,WAAW,GAAG,WAC3B,GAAI,UAAY,EAAE,KAAM,MAAM,EAAE,IAChC,OAAO,KAAK,IACd,EACA,kBAAmB,SAA2B,GAC5C,GAAI,KAAK,KAAM,MAAM,EACrB,IAAI,EAAI,KACR,SAAS,EAAO,EAAG,GACjB,OAAO,EAAE,KAAO,QAAS,EAAE,IAAM,EAAG,EAAE,KAAO,EAAG,IAAM,EAAE,OAAS,OAAQ,EAAE,IAAM,KAAM,CACzF,CACA,IAAK,IAAI,EAAI,KAAK,WAAW,OAAS,EAAG,GAAK,IAAK,EAAG,CACpD,IAAI,EAAI,KAAK,WAAW,GACtB,EAAI,EAAE,WACR,GAAI,SAAW,EAAE,OAAQ,OAAO,EAAO,OACvC,GAAI,EAAE,QAAU,KAAK,KAAM,CACzB,IAAI,EAAI,EAAE,KAAK,EAAG,YAChB,EAAI,EAAE,KAAK,EAAG,cAChB,GAAI,GAAK,EAAG,CACV,GAAI,KAAK,KAAO,EAAE,SAAU,OAAO,EAAO,EAAE,UAAU,GACtD,GAAI,KAAK,KAAO,EAAE,WAAY,OAAO,EAAO,EAAE,WAChD,MAAO,GAAI,GACT,GAAI,KAAK,KAAO,EAAE,SAAU,OAAO,EAAO,EAAE,UAAU,OACjD,CACL,IAAK,EAAG,MAAM,IAAI,MAAM,0CACxB,GAAI,KAAK,KAAO,EAAE,WAAY,OAAO,EAAO,EAAE,WAChD,CACF,CACF,CACF,EACA,OAAQ,SAAgB,EAAG,GACzB,IAAK,IAAI,EAAI,KAAK,WAAW,OAAS,EAAG,GAAK,IAAK,EAAG,CACpD,IAAI,EAAI,KAAK,WAAW,GACxB,GAAI,EAAE,QAAU,KAAK,MAAQ,EAAE,KAAK,EAAG,eAAiB,KAAK,KAAO,EAAE,WAAY,CAChF,IAAI,EAAI,EACR,KACF,CACF,CACA,IAAM,UAAY,GAAK,aAAe,IAAM,EAAE,QAAU,GAAK,GAAK,EAAE,aAAe,EAAI,MACvF,IAAI,EAAI,EAAI,EAAE,WAAa,CAAC,EAC5B,OAAO,EAAE,KAAO,EAAG,EAAE,IAAM,EAAG,GAAK,KAAK,OAAS,OAAQ,KAAK,KAAO,EAAE,WAAY,GAAK,KAAK,SAAS,EACxG,EACA,SAAU,SAAkB,EAAG,GAC7B,GAAI,UAAY,EAAE,KAAM,MAAM,EAAE,IAChC,MAAO,UAAY,EAAE,MAAQ,aAAe,EAAE,KAAO,KAAK,KAAO,EAAE,IAAM,WAAa,EAAE,MAAQ,KAAK,KAAO,KAAK,IAAM,EAAE,IAAK,KAAK,OAAS,SAAU,KAAK,KAAO,OAAS,WAAa,EAAE,MAAQ,IAAM,KAAK,KAAO,GAAI,CAC1N,EACA,OAAQ,SAAgB,GACtB,IAAK,IAAI,EAAI,KAAK,WAAW,OAAS,EAAG,GAAK,IAAK,EAAG,CACpD,IAAI,EAAI,KAAK,WAAW,GACxB,GAAI,EAAE,aAAe,EAAG,OAAO,KAAK,SAAS,EAAE,WAAY,EAAE,UAAW,EAAc,GAAI,CAC5F,CACF,EACA,MAAS,SAAgB,GACvB,IAAK,IAAI,EAAI,KAAK,WAAW,OAAS,EAAG,GAAK,IAAK,EAAG,CACpD,IAAI,EAAI,KAAK,WAAW,GACxB,GAAI,EAAE,SAAW,EAAG,CAClB,IAAI,EAAI,EAAE,WACV,GAAI,UAAY,EAAE,KAAM,CACtB,IAAI,EAAI,EAAE,IACV,EAAc,EAChB,CACA,OAAO,CACT,CACF,CACA,MAAM,IAAI,MAAM,wBAClB,EACA,cAAe,SAAuB,EAAG,EAAG,GAC1C,OAAO,KAAK,SAAW,CACrB,SAAU,EAAO,GACjB,WAAY,EACZ,QAAS,GACR,SAAW,KAAK,SAAW,KAAK,IAAM,GAAI,CAC/C,GACC,CACL,CC9SA,SAAS,EAAmB,EAAK,EAAS,EAAQ,EAAO,EAAQ,EAAK,GACpE,IACE,IAAI,EAAO,EAAI,GAAK,GAChB,EAAQ,EAAK,KACnB,CAAE,MAAO,GAEP,YADA,EAAO,EAET,CACI,EAAK,KACP,EAAQ,GAER,QAAQ,QAAQ,GAAO,KAAK,EAAO,EAEvC,CACe,SAAS,EAAkB,GACxC,OAAO,WACL,IAAI,EAAO,KACT,EAAO,UACT,OAAO,IAAI,SAAQ,SAAU,EAAS,GACpC,IAAI,EAAM,EAAG,MAAM,EAAM,GACzB,SAAS,EAAM,GACb,EAAmB,EAAK,EAAS,EAAQ,EAAO,EAAQ,OAAQ,EAClE,CACA,SAAS,EAAO,GACd,EAAmB,EAAK,EAAS,EAAQ,EAAO,EAAQ,QAAS,EACnE,CACA,OAAM,EACR,GACF,CACF,CC7Be,SAAS,EAAkB,EAAK,IAClC,MAAP,GAAe,EAAM,EAAI,UAAQ,EAAM,EAAI,QAC/C,IAAK,IAAI,EAAI,EAAG,EAAO,IAAI,MAAM,GAAM,EAAI,EAAK,IAAK,EAAK,GAAK,EAAI,GACnE,OAAO,CACT,CCHe,SAAS,EAA4B,EAAG,GACrD,GAAK,EAAL,CACA,GAAiB,kBAAN,EAAgB,OAAO,EAAiB,EAAG,GACtD,IAAI,EAAI,OAAO,UAAU,SAAS,KAAK,GAAG,MAAM,GAAI,GAEpD,MADU,WAAN,GAAkB,EAAE,cAAa,EAAI,EAAE,YAAY,MAC7C,QAAN,GAAqB,QAAN,EAAoB,MAAM,KAAK,GACxC,cAAN,GAAqB,2CAA2C,KAAK,GAAW,EAAiB,EAAG,QAAxG,CALc,CAMhB,CCPe,SAAS,EAA2B,EAAG,GACpD,IAAI,EAAuB,qBAAX,QAA0B,EAAE,OAAO,WAAa,EAAE,cAClE,IAAK,EAAI,CACP,GAAI,MAAM,QAAQ,KAAO,EAAK,EAA2B,KAAO,GAAkB,GAAyB,kBAAb,EAAE,OAAqB,CAC/G,IAAI,EAAI,GACZ,IAAI,EAAI,EACJ,EAAI,WAAc,EACtB,MAAO,CACL,EAAG,EACH,EAAG,WACD,OAAI,GAAK,EAAE,OAAe,CACxB,MAAM,GAED,CACL,MAAM,EACN,MAAO,EAAE,KAEb,EACA,EAAG,SAAW,GACZ,MAAM,CACR,EACA,EAAG,EAEP,CACA,MAAM,IAAI,UAAU,wIACtB,CACA,IAEE,EAFE,GAAmB,EACrB,GAAS,EAEX,MAAO,CACL,EAAG,WACD,EAAK,EAAG,KAAK,EACf,EACA,EAAG,WACD,IAAI,EAAO,EAAG,OAEd,OADA,EAAmB,EAAK,KACjB,CACT,EACA,EAAG,SAAW,GACZ,GAAS,EACT,EAAM,CACR,EACA,EAAG,WACD,IACO,GAAoC,MAAhB,EAAW,QAAW,EAAW,QAC5D,CAAE,QACA,GAAI,EAAQ,MAAM,CACpB,CACF,EAEJ,CC5CA,SAAS,EAAY,EAAS,GAC1B,IACgC,EAD1B,EAAc,IAAI,IAAI,GAAS,EAAA,EACjB,GAAY,IAAhC,IAAA,EAAA,MAAA,EAAA,EAAA,KAAA,MAAkC,KAAvB,EAAK,EAAA,MACZ,EAAY,aAAa,OAAO,EACpC,CAAC,OAAA,GAAA,EAAA,EAAA,EAAA,SAAA,EAAA,GAAA,CACD,OAAO,EAAY,IACvB,CACA,SAYe,EAAsB,EAAA,EAAA,EAAA,GAAA,OAAA,EAAA,MAAC,KAAD,UAAA,UAAA,IAgBpC,OAhBoC,EAAA,EAAA,IAAA,MAArC,SAAA,EAAsC,EAAO,EAAS,EAAc,GAAY,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAE5E,GADM,EAAqB,EAAY,EAAQ,IAAK,GAEhD,EAAQ,MAAQ,EAAkB,CAAA,EAAA,KAAA,eAAA,EAAA,OAAA,SAC3B,EAAM,MAAM,EAAS,IAAa,OAG6C,OAApF,EAAc,OAAO,OAAO,OAAO,OAAO,CAAC,EAAG,GAAe,CAAE,cAAc,IAAO,EAAA,KAAA,EAClE,EAAM,KAAK,EAAS,GAAY,OAAlD,EAAS,EAAA,KAAA,EAAA,EACQ,GAAS,EAAA,KAAA,EAAA,EAAA,IAAA,YAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SACuC,GAD5D,EAAQ,EAAA,MACT,EAAsB,EAAY,EAAS,IAAK,GAClD,IAAuB,EAAmB,CAAA,EAAA,KAAA,gBAAA,EAAA,OAAA,SACnC,EAAM,MAAM,EAAU,IAAa,QAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,SAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,mBAAA,EAAA,OAAA,mCAAA,EAAA,OAAA,GAAA,EAAA,0BAIrD,MAAA,KAAA,UAAA,CNxBD,SAAS,IACL,QAAsB,IAAlB,EAA6B,CAC7B,IAAM,EAAe,IAAI,SAAS,IAClC,GAAI,SAAU,EACV,IACI,IAAI,SAAS,EAAa,MAC1B,GAAgB,CACpB,CACA,MAAO,GACH,GAAgB,CACpB,CAEJ,GAAgB,CACpB,CACA,OAAO,CACX,COrBO,SAAS,EAAY,GAEnB,EAAQ,MAAK,WAAQ,GAC9B,CCPA,IAQM,EAAQ,GAIV,SAAA,IAAc,IAAA,EAAA,KAAA,EAAA,KAAA,GACV,KAAK,QAAU,IAAI,SAAQ,SAAC,EAAS,GACjC,EAAK,QAAU,EACf,EAAK,OAAS,CAClB,GACJ,ICfJ,SAOe,IAA0B,OAAA,EAAA,MAAC,KAAD,UAAA,UAAA,IAcxC,OAdwC,EAAA,EAAA,IAAA,MAAzC,SAAA,IAAA,IAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OACQ,EAGH,EAAA,EACsB,GAAmB,EAAA,KAAA,EAAA,EAAA,IAAA,WAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAAvB,OAAR,EAAQ,EAAA,MAAA,EAAA,KAAA,EACT,IAAU,OACZ,EAEH,OAAA,EAAA,KAAA,gBAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,SAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,YAED,EAEH,yBAAA,EAAA,OAAA,GAAA,EAAA,0BACJ,MAAA,KAAA,UAAA,CCvBD,IAAM,EAAiB,SAAC,GAIpB,OAHe,IAAI,IAAI,OAAO,GAAM,SAAS,MAG/B,KAAK,QAAQ,IAAI,OAAO,IAAD,OAAK,SAAS,SAAW,GAClE,ECEO,SAAS,EAAQ,GACpB,OAAO,IAAI,SAAQ,SAAC,GAAO,OAAK,WAAW,EAAS,EAAG,GAC3D,CCDA,SAAS,EAAU,EAAO,GACtB,IAAM,EAAgB,IAEtB,OADA,EAAM,UAAU,GACT,CACX,CCVA,SAmBe,EAAY,EAAA,GAAA,OAAA,EAAA,MAAC,KAAD,UAAA,UAAA,IA0B1B,OA1B0B,EAAA,EAAA,IAAA,MAA3B,SAAA,EAA4B,EAAU,GAAQ,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAMzC,GALG,EAAS,KAET,EAAS,MACH,EAAc,IAAI,IAAI,EAAS,KACrC,EAAS,EAAY,QAErB,IAAW,KAAK,SAAS,OAAM,CAAA,EAAA,KAAA,cACzB,IAAI,EAAa,6BAA8B,CAAE,OAAA,IAAS,OAapE,GAXM,EAAiB,EAAS,QAE1B,EAAe,CACjB,QAAS,IAAI,QAAQ,EAAe,SACpC,OAAQ,EAAe,OACvB,WAAY,EAAe,YAGzB,EAAuB,EAAW,EAAS,GAAgB,GAIpD,IAAoC,CAAA,EAAA,KAAA,SAAA,EAAA,GAC3C,EAAe,KAAI,EAAA,KAAA,wBAAA,EAAA,KAAA,GACb,EAAe,OAAM,QAAA,EAAA,GAAA,EAAA,KAAA,QAFvB,OAAJ,EAAI,EAAA,GAAA,EAAA,OAAA,SAGH,IAAI,SAAS,EAAM,IAAqB,yBAAA,EAAA,OAAA,GAAA,EAAA,MAClD,MAAA,KAAA,UAAA,CCtDD,SAAS,EAAQ,EAAG,GAClB,IAAI,EAAI,OAAO,KAAK,GACpB,GAAI,OAAO,sBAAuB,CAChC,IAAI,EAAI,OAAO,sBAAsB,GACrC,IAAM,EAAI,EAAE,QAAO,SAAU,GAC3B,OAAO,OAAO,yBAAyB,EAAG,GAAG,UAC/C,KAAK,EAAE,KAAK,MAAM,EAAG,EACvB,CACA,OAAO,CACT,CACe,SAAS,EAAe,GACrC,IAAK,IAAI,EAAI,EAAG,EAAI,UAAU,OAAQ,IAAK,CACzC,IAAI,EAAI,MAAQ,UAAU,GAAK,UAAU,GAAK,CAAC,EAC/C,EAAI,EAAI,EAAQ,OAAO,IAAI,GAAI,SAAQ,SAAU,GCbtC,IAAyB,EAAK,EAAK,EAAV,EDcnB,ECdwB,EDcrB,ECd0B,EDcvB,EAAE,ICb3B,EAAM,EAAc,MACT,EACT,OAAO,eAAe,EAAK,EAAK,CAC9B,MAAO,EACP,YAAY,EACZ,cAAc,EACd,UAAU,IAGZ,EAAI,GAAO,CDKX,IAAK,OAAO,0BAA4B,OAAO,iBAAiB,EAAG,OAAO,0BAA0B,IAAM,EAAQ,OAAO,IAAI,SAAQ,SAAU,GAC7I,OAAO,eAAe,EAAG,EAAG,OAAO,yBAAyB,EAAG,GACjE,GACF,CACA,OAAO,CACT,CErBA,IAEI,EACA,EAHE,EAAgB,SAAC,EAAQ,GAAY,OAAK,EAAa,MAAK,SAAC,GAAC,OAAK,aAAkB,CAAC,GAAC,EAwB7F,IAAM,EAAmB,IAAI,QACvB,EAAqB,IAAI,QACzB,EAA2B,IAAI,QAC/B,EAAiB,IAAI,QACrB,EAAwB,IAAI,QA0DlC,IAAI,EAAgB,CAChB,IAAG,SAAC,EAAQ,EAAM,GACd,GAAI,aAAkB,eAAgB,CAElC,GAAa,SAAT,EACA,OAAO,EAAmB,IAAI,GAElC,GAAa,qBAAT,EACA,OAAO,EAAO,kBAAoB,EAAyB,IAAI,GAGnE,GAAa,UAAT,EACA,OAAO,EAAS,iBAAiB,QAC3B,EACA,EAAS,YAAY,EAAS,iBAAiB,GAE7D,CAEA,OAAO,GAAK,EAAO,GACvB,EACA,IAAG,SAAC,EAAQ,EAAM,GAEd,OADA,EAAO,GAAQ,GACR,CACX,EACA,IAAG,SAAC,EAAQ,GACR,OAAI,aAAkB,iBACR,SAAT,GAA4B,UAAT,IAGjB,KAAQ,CACnB,GAKJ,SAAS,EAAa,GAIlB,OAAI,IAAS,YAAY,UAAU,aAC7B,qBAAsB,eAAe,WA7GnC,IACH,EAAuB,CACpB,UAAU,UAAU,QACpB,UAAU,UAAU,SACpB,UAAU,UAAU,sBAqHE,SAAS,GAC5B,WAAmB,QAAA,EAAA,UAAA,OAAN,EAAI,IAAA,MAAA,GAAA,EAAA,EAAA,EAAA,EAAA,IAAJ,EAAI,GAAA,UAAA,GAIpB,OADA,EAAK,MAAM,GAAO,MAAO,GAClB,GAAK,EAAiB,IAAI,MACrC,EAEG,WAAmB,QAAA,EAAA,UAAA,OAAN,EAAI,IAAA,MAAA,GAAA,EAAA,EAAA,EAAA,EAAA,IAAJ,EAAI,GAAA,UAAA,GAGpB,OAAO,GAAK,EAAK,MAAM,GAAO,MAAO,GACzC,EAvBW,SAAU,GAAqB,QAAA,EAAA,UAAA,OAAN,EAAI,IAAA,MAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,EAAA,EAAA,IAAJ,EAAI,EAAA,GAAA,UAAA,GAChC,IAAM,EAAK,EAAK,KAAI,MAAT,EAAI,CAAM,GAAO,MAAO,GAAU,OAAK,IAElD,OADA,EAAyB,IAAI,EAAI,EAAW,KAAO,EAAW,OAAS,CAAC,IACjE,GAAK,EAChB,CAoBR,CACA,SAAS,GAAuB,GAC5B,MAAqB,oBAAV,EACA,EAAa,IAGpB,aAAiB,gBAhGzB,SAAwC,GAEpC,IAAI,EAAmB,IAAI,GAA3B,CAEA,IAAM,EAAO,IAAI,SAAQ,SAAC,EAAS,GAC/B,IAAM,EAAW,WACb,EAAG,oBAAoB,WAAY,GACnC,EAAG,oBAAoB,QAAS,GAChC,EAAG,oBAAoB,QAAS,EACpC,EACM,EAAW,WACb,IACA,GACJ,EACM,EAAQ,WACV,EAAO,EAAG,OAAS,IAAI,aAAa,aAAc,eAClD,GACJ,EACA,EAAG,iBAAiB,WAAY,GAChC,EAAG,iBAAiB,QAAS,GAC7B,EAAG,iBAAiB,QAAS,EACjC,IAEA,EAAmB,IAAI,EAAI,EApBjB,CAqBd,CAyEQ,CAA+B,GAC/B,EAAc,EAzJV,IACH,EAAoB,CACjB,YACA,eACA,SACA,UACA,kBAoJG,IAAI,MAAM,EAAO,GAErB,EACX,CACA,SAAS,GAAK,GAGV,GAAI,aAAiB,WACjB,OA3IR,SAA0B,GACtB,IAAM,EAAU,IAAI,SAAQ,SAAC,EAAS,GAClC,IAAM,EAAW,WACb,EAAQ,oBAAoB,UAAW,GACvC,EAAQ,oBAAoB,QAAS,EACzC,EACM,EAAU,WACZ,EAAQ,GAAK,EAAQ,SACrB,GACJ,EACM,EAAQ,WACV,EAAO,EAAQ,OACf,GACJ,EACA,EAAQ,iBAAiB,UAAW,GACpC,EAAQ,iBAAiB,QAAS,EACtC,IAcA,OAbA,EACK,MAAK,SAAC,GAGH,aAAiB,WACjB,EAAiB,IAAI,EAAO,EAGpC,IACK,OAAM,WAAQ,IAGnB,EAAsB,IAAI,EAAS,GAC5B,CACX,CA4Ge,CAAiB,GAG5B,GAAI,EAAe,IAAI,GACnB,OAAO,EAAe,IAAI,GAC9B,IAAM,EAAW,GAAuB,GAOxC,OAJI,IAAa,IACb,EAAe,IAAI,EAAO,GAC1B,EAAsB,IAAI,EAAU,IAEjC,CACX,CACA,IAAM,GAAS,SAAC,GAAK,OAAK,EAAsB,IAAI,EAAM,EC5K1D,SAAS,GAAO,EAAM,GAA0D,IAAA,EAAA,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GAAJ,CAAC,EAA5C,EAAO,EAAP,QAAS,EAAO,EAAP,QAAS,EAAQ,EAAR,SAAU,EAAU,EAAV,WACnD,EAAU,UAAU,KAAK,EAAM,GAC/B,EAAc,GAAK,GAoBzB,OAnBI,GACA,EAAQ,iBAAiB,iBAAiB,SAAC,GACvC,EAAQ,GAAK,EAAQ,QAAS,EAAM,WAAY,EAAM,WAAY,GAAK,EAAQ,aAAc,EACjG,IAEA,GACA,EAAQ,iBAAiB,WAAW,SAAC,GAAK,OAAK,EAE/C,EAAM,WAAY,EAAM,WAAY,EAAM,IAE9C,EACK,MAAK,SAAC,GACH,GACA,EAAG,iBAAiB,SAAS,kBAAM,GAAY,IAC/C,GACA,EAAG,iBAAiB,iBAAiB,SAAC,GAAK,OAAK,EAAS,EAAM,WAAY,EAAM,WAAY,EAAM,GAE3G,IACK,OAAM,WAAQ,IACZ,CACX,CAgBA,IAAM,GAAc,CAAC,MAAO,SAAU,SAAU,aAAc,SACxD,GAAe,CAAC,MAAO,MAAO,SAAU,SACxC,GAAgB,IAAI,IAC1B,SAAS,GAAU,EAAQ,GACvB,GAAM,aAAkB,eAClB,KAAQ,IACM,kBAAT,EAFX,CAKA,GAAI,GAAc,IAAI,GAClB,OAAO,GAAc,IAAI,GAC7B,IAAM,EAAiB,EAAK,QAAQ,aAAc,IAC5C,EAAW,IAAS,EACpB,EAAU,GAAa,SAAS,GACtC,GAEE,KAAmB,EAAW,SAAW,gBAAgB,YACrD,GAAW,GAAY,SAAS,IAHtC,CAMA,IAAM,EAAM,eAAA,EAAA,EAAA,IAAA,MAAG,SAAA,EAAgB,GAAS,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAGf,IADf,EAAK,KAAK,YAAY,EAAW,EAAU,YAAc,YAC3D,EAAS,EAAG,MAAK,EAAA,EAAA,OAHoB,EAAI,IAAA,MAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,EAAA,EAAA,IAAJ,EAAI,EAAA,GAAA,EAAA,GAU7C,OANI,IACA,EAAS,EAAO,MAAM,EAAK,UAK/B,EAAA,KAAA,EACc,QAAQ,IAAI,EACtB,EAAA,GAAO,GAAe,MAAA,EAAI,GAC1B,GAAW,EAAG,OAChB,cAAA,EAAA,OAAA,SAAA,EAAA,KAAE,IAAC,wBAAA,EAAA,OAAA,GAAA,EAAA,UACR,gBAfW,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,KAiBZ,OADA,GAAc,IAAI,EAAM,GACjB,CAlBP,CAXA,CA8BJ,CDgCI,EC/BS,SAAC,GAAQ,OAAA,EAAA,EAAA,GACf,GAAQ,IACX,IAAK,SAAC,EAAQ,EAAM,GAAQ,OAAK,GAAU,EAAQ,IAAS,EAAS,IAAI,EAAQ,EAAM,EAAS,EAChG,IAAK,SAAC,EAAQ,GAAI,QAAO,GAAU,EAAQ,IAAS,EAAS,IAAI,EAAQ,EAAK,ID4B9D,CAAS,cE7GvB,GAAqB,gBACrB,GAAe,SAAC,GAClB,IAAM,EAAM,IAAI,IAAI,EAAiB,SAAS,MAE9C,OADA,EAAI,KAAO,GACJ,EAAI,IACf,EAMM,GAAoB,WAOtB,SAAA,EAAY,GAAW,EAAA,KAAA,GACnB,KAAK,IAAM,KACX,KAAK,WAAa,CACtB,CAuJC,OAtJD,EAAA,EAAA,EAAA,IAAA,aAAA,MAOA,SAAW,GAKP,IAAM,EAAW,EAAG,kBAAkB,GAAoB,CAAE,QAAS,OAIrE,EAAS,YAAY,YAAa,YAAa,CAAE,QAAQ,IACzD,EAAS,YAAY,YAAa,YAAa,CAAE,QAAQ,GAC7D,GACA,CAAA,IAAA,4BAAA,MAOA,SAA0B,GACtB,KAAK,WAAW,GACZ,KAAK,YDrBjB,SAAkB,GAAwB,IAAhB,GAAgB,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GAAJ,CAAC,GAAb,QAChB,EAAU,UAAU,eAAe,GACrC,GACA,EAAQ,iBAAiB,WAAW,SAAC,GAAK,OAAK,EAE/C,EAAM,WAAY,EAAM,IAErB,GAAK,GAAS,MAAK,WAAe,GAC7C,CCciB,CAAS,KAAK,WAE3B,GACA,CAAA,IAAA,eAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAMA,SAAA,EAAmB,EAAK,GAAS,IAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAU5B,OATD,EAAM,GAAa,GACb,EAAQ,CACV,IAAA,EACA,UAAA,EACA,UAAW,KAAK,WAIhB,GAAI,KAAK,OAAO,IACnB,EAAA,KAAA,EACgB,KAAK,QAAO,OAG3B,OAHI,EAAE,EAAA,KACF,EAAK,EAAG,YAAY,GAAoB,YAAa,CACvD,WAAY,YACd,EAAA,KAAA,EACI,EAAG,MAAM,IAAI,GAAM,cAAA,EAAA,KAAA,GACnB,EAAG,KAAI,yBAAA,EAAA,OAAA,GAAA,EAAA,UAChB,gBAAA,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAvBD,IAwBA,CAAA,IAAA,eAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAQA,SAAA,EAAmB,GAAG,IAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,cAAA,EAAA,KAAA,EACD,KAAK,QAAO,OAArB,OAAF,EAAE,EAAA,KAAA,EAAA,KAAG,EACS,EAAG,IAAI,GAAoB,KAAK,OAAO,IAAK,OAArD,OAAL,EAAK,EAAA,KAAA,EAAA,OAAA,SACM,OAAV,QAA4B,IAAV,OAAmB,EAAS,EAAM,WAAS,wBAAA,EAAA,OAAA,GAAA,EAAA,UACvE,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAZD,IAaA,CAAA,IAAA,gBAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAWA,SAAA,EAAoB,EAAc,GAAQ,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,cAAA,EAAA,KAAA,EACrB,KAAK,QAAO,OAArB,OAAF,EAAE,EAAA,KAAA,EAAA,KAAG,EACQ,EACd,YAAY,IACZ,MAAM,MAAM,aACZ,WAAW,KAAM,QAAO,OAHzB,EAAM,EAAA,KAIJ,EAAkB,GACpB,EAAyB,EAAC,WACvB,EAAQ,CAAF,EAAA,KAAA,SAsBR,OArBK,EAAS,EAAO,OAGX,YAAc,KAAK,aAGrB,GAAgB,EAAO,UAAY,GACnC,GAAY,GAA0B,EASvC,EAAgB,KAAK,EAAO,OAG5B,KAEP,EAAA,KAAA,GACc,EAAO,WAAU,QAAhC,EAAM,EAAA,KAAA,EAAA,KAAG,EAAH,cAMJ,EAAc,GAAE,EAAA,EAAA,EACF,EAAe,aAAA,EAAA,EAAA,QAAA,CAAA,EAAA,KAAA,SAAnB,OAAL,EAAK,EAAA,GAAA,EAAA,KAAA,GACN,EAAG,OAAO,GAAoB,EAAM,IAAG,QAC7C,EAAY,KAAK,EAAM,KAAK,QAAA,IAAA,EAAA,KAAA,wBAAA,EAAA,OAAA,SAEzB,GAAW,yBAAA,EAAA,OAAA,GAAA,EAAA,UACrB,gBAAA,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAtDD,IAuDA,CAAA,IAAA,SAAA,MAQA,SAAO,GAIH,OAAO,KAAK,WAAa,IAAM,GAAa,EAChD,GACA,CAAA,IAAA,QAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAKA,SAAA,IAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,UACS,KAAK,IAAK,CAAF,EAAA,KAAA,eAAA,EAAA,KAAA,EACQ,GAxKb,qBAwK6B,EAAG,CAChC,QAAS,KAAK,0BAA0B,KAAK,QAC/C,OAFF,KAAK,IAAG,EAAA,KAAA,cAAA,EAAA,OAAA,SAIL,KAAK,KAAG,wBAAA,EAAA,OAAA,GAAA,EAAA,UAClB,yBAAA,EAAA,MAAA,KAAA,UAAA,EAZD,MAYC,CAAA,CAjKqB,GCDpB,GAAe,WAcjB,SAAA,EAAY,GAAwB,IAAb,EAAM,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GAAG,CAAC,EAAC,EAAA,KAAA,GAC9B,KAAK,YAAa,EAClB,KAAK,iBAAkB,EAgCvB,KAAK,YAAc,EAAO,WAC1B,KAAK,eAAiB,EAAO,cAC7B,KAAK,cAAgB,EAAO,aAC5B,KAAK,WAAa,EAClB,KAAK,gBAAkB,IAAI,GAAqB,EACpD,CA6FC,OA5FD,EAAA,EAAA,EAAA,IAAA,gBAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAGA,SAAA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,WACQ,KAAK,WAAY,CAAF,EAAA,KAAA,QACa,OAA5B,KAAK,iBAAkB,EAAK,EAAA,OAAA,iBAMzB,OAHP,KAAK,YAAa,EACZ,EAAe,KAAK,eACpB,KAAK,MAA8B,IAAtB,KAAK,eAClB,EAAC,EAAA,KAAA,EACmB,KAAK,gBAAgB,cAAc,EAAc,KAAK,aAAY,OAA3E,OAAX,EAAW,EAAA,KAAA,EAAA,KAAG,GAEA,KAAK,OAAO,KAAK,KAAK,YAAW,QAA/C,EAAK,EAAA,KAAA,EAAA,EACO,GAAW,EAAA,KAAA,GAAA,EAAA,IAAA,YAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAAf,OAAH,EAAG,EAAA,MAAA,EAAA,KAAA,GACJ,EAAM,OAAO,EAAK,KAAK,eAAc,QAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,YAE3C,EAcJ,KAAK,YAAa,EACd,KAAK,kBACL,KAAK,iBAAkB,EACvB,EAAY,KAAK,kBACpB,yBAAA,EAAA,OAAA,GAAA,EAAA,0BACJ,yBAAA,EAAA,MAAA,KAAA,UAAA,EArCD,IAsCA,CAAA,IAAA,kBAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAOA,SAAA,EAAsB,GAAG,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAQpB,OAAA,EAAA,KAAA,EACK,KAAK,gBAAgB,aAAa,EAAK,KAAK,OAAM,wBAAA,EAAA,OAAA,GAAA,EAAA,UAC3D,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAjBD,IAkBA,CAAA,IAAA,eAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAWA,SAAA,EAAmB,GAAG,IAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,UACb,KAAK,eAAgB,CAAF,EAAA,KAAA,QACqB,EAAA,KAAA,QAInC,cAAA,EAAA,OAAA,UAEC,GAAK,cAAA,EAAA,KAAA,EAGY,KAAK,gBAAgB,aAAa,GAAI,OACC,OADzD,EAAS,EAAA,KACT,EAAkB,KAAK,MAA8B,IAAtB,KAAK,eAAqB,EAAA,OAAA,cAC1C,IAAd,GAA0B,EAAY,GAAsB,yBAAA,EAAA,OAAA,GAAA,EAAA,UAE1E,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EA1BD,IA2BA,CAAA,IAAA,SAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAIA,SAAA,IAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAGiC,OAA7B,KAAK,iBAAkB,EAAM,EAAA,KAAA,EACvB,KAAK,gBAAgB,cAAc,KAAS,wBAAA,EAAA,OAAA,GAAA,EAAA,UACrD,yBAAA,EAAA,MAAA,KAAA,UAAA,EATD,MASC,CAAA,CAlJgB,GChBN,SAAS,GAAe,EAAK,GAC1C,OCLa,SAAyB,GACtC,GAAI,MAAM,QAAQ,GAAM,OAAO,CACjC,CDGS,CAAe,IELT,SAA+B,EAAG,GAC/C,IAAI,EAAI,MAAQ,EAAI,KAAO,oBAAsB,QAAU,EAAE,OAAO,WAAa,EAAE,cACnF,GAAI,MAAQ,EAAG,CACb,IAAI,EACF,EACA,EACA,EACA,EAAI,GACJ,GAAI,EACJ,GAAI,EACN,IACE,GAAI,GAAK,EAAI,EAAE,KAAK,IAAI,KAAM,IAAM,EAAG,CACrC,GAAI,OAAO,KAAO,EAAG,OACrB,GAAI,CACN,MAAO,OAAS,GAAK,EAAI,EAAE,KAAK,IAAI,QAAU,EAAE,KAAK,EAAE,OAAQ,EAAE,SAAW,GAAI,GAAI,GACtF,CAAE,MAAO,GACP,GAAI,EAAI,EAAI,CACd,CAAE,QACA,IACE,IAAK,GAAK,MAAQ,EAAU,SAAM,EAAI,EAAU,SAAK,OAAO,KAAO,GAAI,MACzE,CAAE,QACA,GAAI,EAAG,MAAM,CACf,CACF,CACA,OAAO,CACT,CACF,CFrBgC,CAAqB,EAAK,IAAM,EAA2B,EAAK,IGLjF,WACb,MAAM,IAAI,UAAU,4IACtB,CHGsG,EACtG,CIUA,IAuBM,GAAgB,WAYlB,SAAA,IAAyB,IAAA,EAAA,KAAb,EAAM,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GAAG,CAAC,EAAC,EAAA,KAAA,GAkBnB,KAAK,yBAAwB,eAAA,EAAA,EAAA,IAAA,MAAG,SAAA,EAAA,GAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAAkD,GAAzC,EAAK,EAAL,MAAO,EAAO,EAAP,QAAS,EAAS,EAAT,UAAW,EAAc,EAAd,eAC3C,CAAF,EAAA,KAAA,eAAA,EAAA,OAAA,SACR,MAAI,OAUf,GARM,EAAU,EAAK,qBAAqB,GAI1C,GADM,EAAkB,EAAK,oBAAoB,IACrB,iBAGtB,EAAsB,EAAgB,gBAAgB,EAAQ,KAChE,EACA,IACI,EAAM,UAAU,EACpB,CACA,MAAO,GACC,CAQR,CACH,OAAA,EAAA,OAAA,SACM,EAAU,EAAiB,MAAI,wBAAA,EAAA,OAAA,GAAA,EAAA,KACzC,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EA5B4B,GAuC7B,KAAK,eAAc,eAAA,EAAA,EAAA,IAAA,MAAG,SAAA,EAAA,GAAA,IAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAeyC,OAfhC,EAAS,EAAT,UAAW,EAAO,EAAP,QAehC,EAAkB,EAAK,oBAAoB,GAAU,EAAA,KAAA,EACrD,EAAgB,gBAAgB,EAAQ,KAAI,cAAA,EAAA,KAAA,EAC5C,EAAgB,gBAAe,wBAAA,EAAA,OAAA,GAAA,EAAA,KACxC,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAlBkB,GA4CnB,KAAK,QAAU,EACf,KAAK,eAAiB,EAAO,cAC7B,KAAK,kBAAoB,IAAI,IACzB,EAAO,mBCvInB,SAAoC,GAQhC,EAAoB,IAAI,EAI5B,CD4HY,EAA2B,kBAAM,EAAK,wBAAwB,GAEtE,CA6FC,OA5FD,EAAA,EAAA,EAAA,IAAA,sBAAA,MASA,SAAoB,GAChB,GAAI,IAAc,IACd,MAAM,IAAI,EAAa,6BAE3B,IAAI,EAAkB,KAAK,kBAAkB,IAAI,GAKjD,OAJK,IACD,EAAkB,IAAI,GAAgB,EAAW,KAAK,SACtD,KAAK,kBAAkB,IAAI,EAAW,IAEnC,CACX,GACA,CAAA,IAAA,uBAAA,MAMA,SAAqB,GACjB,IAAK,KAAK,eAEN,OAAO,EAKX,IAAM,EAAsB,KAAK,wBAAwB,GACzD,OAA4B,OAAxB,GAOG,GADK,KAAK,MACyC,IAAtB,KAAK,cAC7C,GACA,CAAA,IAAA,0BAAA,MASA,SAAwB,GACpB,IAAK,EAAe,QAAQ,IAAI,QAC5B,OAAO,KAEX,IAAM,EAAa,EAAe,QAAQ,IAAI,QAExC,EADa,IAAI,KAAK,GACE,UAG9B,OAAI,MAAM,GACC,KAEJ,CACX,GACA,CAAA,IAAA,yBAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAgBA,SAAA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAEI,EAAA,EAC2C,KAAK,mBAAiB,EAAA,KAAA,EAAA,EAAA,IAAA,WAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAA3B,OAA2B,EAAA,GAAA,EAAA,MAAA,GAArD,EAAS,EAAA,GAAE,EAAe,EAAA,GAAA,EAAA,KAAA,EAC5B,KAAK,OAAO,OAAO,GAAU,cAAA,EAAA,KAAA,EAC7B,EAAgB,SAAQ,OAAA,EAAA,KAAA,gBAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,SAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,YAGlC,KAAK,kBAAoB,IAAI,IAAM,yBAAA,EAAA,OAAA,GAAA,EAAA,yBACtC,yBAAA,EAAA,MAAA,KAAA,UAAA,EAzBD,MAyBC,CAAA,CApNiB,GEnCP,SAAS,GAAmB,GACzC,OCJa,SAA4B,GACzC,GAAI,MAAM,QAAQ,GAAM,OAAO,EAAiB,EAClD,CDES,CAAkB,IELZ,SAA0B,GACvC,GAAsB,qBAAX,QAAmD,MAAzB,EAAK,OAAO,WAA2C,MAAtB,EAAK,cAAuB,OAAO,MAAM,KAAK,EACtH,CFGmC,CAAgB,IAAQ,EAA2B,IGLvE,WACb,MAAM,IAAI,UAAU,uIACtB,CHG8F,EAC9F,QIcO,SAAS,GAAe,GAC3B,IAAK,EACD,MAAM,IAAI,EAAa,oCAAqC,CAAE,MAAA,IAIlE,GAAqB,kBAAV,EAAoB,CAC3B,IAAM,EAAY,IAAI,IAAI,EAAO,SAAS,MAC1C,MAAO,CACH,SAAU,EAAU,KACpB,IAAK,EAAU,KAEvB,CACA,IAAQ,EAAkB,EAAlB,SAAU,EAAQ,EAAR,IAClB,IAAK,EACD,MAAM,IAAI,EAAa,oCAAqC,CAAE,MAAA,IAIlE,IAAK,EAAU,CACX,IAAM,EAAY,IAAI,IAAI,EAAK,SAAS,MACxC,MAAO,CACH,SAAU,EAAU,KACpB,IAAK,EAAU,KAEvB,CAGA,IAAM,EAAc,IAAI,IAAI,EAAK,SAAS,MACpC,EAAc,IAAI,IAAI,EAAK,SAAS,MAE1C,OADA,EAAY,aAAa,IAxCC,kBAwC0B,GAC7C,CACH,SAAU,EAAY,KACtB,IAAK,EAAY,KAEzB,CC/CA,IAMM,GAA2B,GAC7B,SAAA,IAAc,IAAA,EAAA,KAAA,EAAA,KAAA,GACV,KAAK,YAAc,GACnB,KAAK,eAAiB,GACtB,KAAK,iBAAgB,eAAA,EAAA,EAAA,IAAA,MAAG,SAAA,EAAA,GAAA,IAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAAS,EAAO,EAAP,SAAS,EAAK,EAAL,SAGlC,EAAM,gBAAkB,GAC3B,wBAAA,EAAA,OAAA,GAAA,EAAA,KACJ,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EALoB,GAMrB,KAAK,yBAAwB,eAAA,EAAA,EAAA,IAAA,MAAG,SAAA,EAAA,GAAA,IAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAc3B,OAdoC,EAAK,EAAL,MAAO,EAAK,EAAL,MAAO,EAAc,EAAd,eAChC,YAAf,EAAM,MACF,GACA,EAAM,iBACN,EAAM,2BAA2B,UAE3B,EAAM,EAAM,gBAAgB,IAC9B,EACA,EAAK,eAAe,KAAK,GAGzB,EAAK,YAAY,KAAK,IAGjC,EAAA,OAAA,SACM,GAAc,wBAAA,EAAA,OAAA,GAAA,EAAA,KACxB,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAhB4B,EAiBjC,IC3BE,GAAsB,GACxB,SAAA,EAAA,GAAoC,IAAA,EAAA,KAAtB,EAAkB,EAAlB,mBAAkB,EAAA,KAAA,GAC5B,KAAK,mBAAkB,eAAA,EAAA,EAAA,IAAA,MAAG,SAAA,EAAA,GAAA,IAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAKtB,OAL+B,EAAO,EAAP,QAAS,EAAM,EAAN,OAGlC,GAAuB,OAAX,QAA8B,IAAX,OAAoB,EAAS,EAAO,WACrE,EAAK,oBAAoB,kBAAkB,EAAQ,KACvD,EAAA,OAAA,SACO,EACD,IAAI,QAAQ,EAAU,CAAE,QAAS,EAAQ,UACzC,GAAO,wBAAA,EAAA,OAAA,GAAA,EAAA,KAChB,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EATsB,GAUvB,KAAK,oBAAsB,CAC/B,WCXJ,SAAS,GAAU,GACf,MAAwB,kBAAV,EAAqB,IAAI,QAAQ,GAAS,CAC5D,CACA,IASM,GAAe,WAiBjB,SAAA,EAAY,EAAU,GAAS,EAAA,KAAA,GAC3B,KAAK,WAAa,CAAC,EA8CnB,OAAO,OAAO,KAAM,GACpB,KAAK,MAAQ,EAAQ,MACrB,KAAK,UAAY,EACjB,KAAK,iBAAmB,IAAI,EAC5B,KAAK,wBAA0B,GAG/B,KAAK,SAAQ,GAAO,EAAS,SAC7B,KAAK,gBAAkB,IAAI,IAAM,IACC,EADD,EAAA,EACZ,KAAK,UAAQ,IAAlC,IAAA,EAAA,MAAA,EAAA,EAAA,KAAA,MAAoC,KAAzB,EAAM,EAAA,MACb,KAAK,gBAAgB,IAAI,EAAQ,CAAC,EACtC,CAAC,OAAA,GAAA,EAAA,EAAA,EAAA,SAAA,EAAA,GAAA,CACD,KAAK,MAAM,UAAU,KAAK,iBAAiB,QAC/C,CAyZC,OAxZD,EAAA,EAAA,EAAA,IAAA,QAAA,MAAA,SAAA,GAAA,SAAA,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,QAAA,EAAA,SAAA,kBAAA,EAAA,UAAA,EAAA,CAAA,iBAAA,EAAA,EAAA,IAAA,MAaA,SAAA,EAAY,GAAK,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAEiB,GADtB,EAAU,KAAV,QAEa,cADjB,EAAU,GAAU,IACZ,MACR,aAAiB,YACjB,EAAM,iBAAe,CAAA,EAAA,KAAA,eAAA,EAAA,KAAA,EACkB,EAAM,gBAAe,OAA/B,KAAvB,EAAuB,EAAA,MACA,CAAF,EAAA,KAAA,QAItB,OAAA,EAAA,OAAA,SACM,GAAuB,OAMhC,EAAkB,KAAK,YAAY,gBACnC,EAAQ,QACR,KAAI,EAAA,KAAA,GAAA,EAAA,EAEW,KAAK,iBAAiB,qBAAmB,EAAA,KAAA,GAAA,EAAA,IAAA,YAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAA7C,OAAF,EAAE,EAAA,MAAA,EAAA,KAAA,GACO,EAAG,CAAE,QAAS,EAAQ,QAAS,MAAA,IAAQ,QAAvD,EAAO,EAAA,KAAA,QAAA,EAAA,KAAG,GAAH,cAAA,EAAA,KAAG,GAAH,cAAA,EAAA,KAAG,GAAH,EAAA,GAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAG,GAAH,EAAA,IAAA,EAAA,OAAA,YAAA,EAAA,KAAG,GAAH,iBAAA,EAAA,KAAG,GAAH,EAAA,GAAA,EAAA,YAIP,EAAA,cAAe,OAAK,CAAA,EAAA,KAAA,eACd,IAAI,EAAa,kCAAmC,CACtD,mBAAoB,EAAA,GAAI,UAC1B,QAMmC,OAAvC,EAAwB,EAAQ,QAAO,EAAA,KAAA,GAAA,EAAA,KAAA,GAInB,MAAM,EAA0B,aAAjB,EAAQ,UAAsB,EAAY,KAAK,UAAU,cAAa,QAA3G,EAAa,EAAA,KAKZ,EAAA,EACsB,KAAK,iBAAiB,oBAAkB,EAAA,KAAA,GAAA,EAAA,IAAA,YAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAA5C,OAAR,EAAQ,EAAA,MAAA,EAAA,KAAA,GACO,EAAS,CAC3B,MAAA,EACA,QAAS,EACT,SAAU,IACZ,QAJF,EAAa,EAAA,KAAA,QAAA,EAAA,KAAG,GAAH,cAAA,EAAA,KAAG,GAAH,cAAA,EAAA,KAAG,GAAH,EAAA,GAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAG,GAAH,EAAA,IAAA,EAAA,OAAA,mBAAA,EAAA,OAAA,SAMV,GAAa,QAQpB,GARoB,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,WAShB,EAAiB,CAAF,EAAA,KAAA,gBAAA,EAAA,KAAA,GACT,KAAK,aAAa,eAAgB,CACpC,MAAK,EAAA,GACL,MAAA,EACA,gBAAiB,EAAgB,QACjC,QAAS,EAAsB,UACjC,cAAA,EAAA,GAAA,yBAAA,EAAA,OAAA,GAAA,EAAA,wDAIb,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EArFD,KAsFA,CAAA,IAAA,mBAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAUA,SAAA,EAAuB,GAAK,IAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,cAAA,EAAA,KAAA,EACD,KAAK,MAAM,GAAM,OAEiB,OAFnD,EAAQ,EAAA,KACR,EAAgB,EAAS,QAC1B,KAAK,UAAU,KAAK,SAAS,EAAO,IAAgB,EAAA,OAAA,SAClD,GAAQ,wBAAA,EAAA,OAAA,GAAA,EAAA,UAClB,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAfD,IAgBA,CAAA,IAAA,aAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAYA,SAAA,EAAiB,GAAG,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAGe,OAFzB,EAAU,GAAU,GAAI,EAEM,KAAK,UAAjC,EAAS,EAAT,UAAW,EAAY,EAAZ,aAAY,EAAA,KAAA,EACA,KAAK,YAAY,EAAS,QAAO,OACuB,OADjF,EAAgB,EAAA,KAChB,EAAoB,OAAO,OAAO,OAAO,OAAO,CAAC,EAAG,GAAe,CAAE,UAAA,IAAY,EAAA,KAAA,EAChE,OAAO,MAAM,EAAkB,GAAkB,OAAxE,EAAc,EAAA,KAQb,EAAA,EACsB,KAAK,iBAAiB,6BAA2B,EAAA,KAAA,GAAA,EAAA,IAAA,YAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAArD,OAAR,EAAQ,EAAA,MAAA,EAAA,KAAA,GAEJ,EAAS,CACZ,UAAA,EACA,aAAA,EACA,eAAA,EACA,QAAS,EACT,MAAO,KAAK,QACd,WAAA,EAAA,GAAA,EAAA,KAAA,EAAA,GAAE,CAAF,EAAA,KAAA,SAAA,EAAA,QAAK,EAAS,QAPpB,EAAc,EAAA,GAAA,QAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,mBAAA,EAAA,OAAA,SASX,GAAc,yBAAA,EAAA,OAAA,GAAA,EAAA,0BACxB,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAtCD,IAuCA,CAAA,IAAA,WAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAeA,SAAA,EAAe,EAAK,GAAQ,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAGxB,OAFM,EAAU,GAAU,GAE1B,EAAA,KAAA,EACM,EAAQ,GAAE,cAAA,EAAA,KAAA,EACe,KAAK,YAAY,EAAS,SAAQ,OAA3D,EAAgB,EAAA,KACmB,EAAA,KAAA,SAK/B,QAGA,EAAO,EAAS,QAAQ,IAAI,UAE9B,EAAO,MAAM,oBAAA,OAAoB,EAAe,EAAiB,KAAI,qBAAA,OACjD,EAAI,cADX,4HAIhB,WAEA,EAAU,CAAF,EAAA,KAAA,SAIR,MACK,IAAI,EAAa,6BAA8B,CACjD,IAAK,EAAe,EAAiB,OACvC,eAAA,EAAA,KAAA,GAEwB,KAAK,2BAA2B,GAAS,QAAlD,GAAf,EAAe,EAAA,KACC,CAAF,EAAA,KAAA,SAIf,OAAA,EAAA,OAAA,UACM,GAAK,QAEe,OAFf,EAEoB,KAAK,UAAjC,EAAS,EAAT,UAAW,EAAY,EAAZ,aAAY,EAAA,KAAA,GACX,KAAK,OAAO,KAAK,GAAU,QACkB,GAD3D,EAAK,EAAA,OACL,EAAyB,KAAK,YAAY,mBACN,CAAA,EAAA,KAAA,gBAAA,EAAA,KAAA,GAC9B,EAIR,EAAO,EAAiB,QAAS,CAAC,mBAAoB,GAAa,QAAA,EAAA,GAAA,EAAA,KAAA,EAAA,KAAA,iBAAA,EAAA,GACjE,KAAI,QAIT,OAVK,EAAW,EAAA,GAUhB,EAAA,KAAA,GAAA,EAAA,KAAA,GAES,EAAM,IAAI,EAAkB,EAAyB,EAAgB,QAAU,GAAgB,QAAA,EAAA,KAAA,oBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,YAGjG,EAAA,cAAiB,OAAK,CAAA,EAAA,KAAA,YAEH,uBAAf,EAAA,GAAM,KAA6B,CAAA,EAAA,KAAA,gBAAA,EAAA,KAAA,GAC7B,IAA4B,cAAA,EAAA,GAAA,QAAA,EAAA,EAKvB,KAAK,iBAAiB,mBAAiB,EAAA,KAAA,GAAA,EAAA,IAAA,YAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAA3C,OAAR,EAAQ,EAAA,MAAA,EAAA,KAAA,GACT,EAAS,CACX,UAAA,EACA,YAAA,EACA,YAAa,EAAgB,QAC7B,QAAS,EACT,MAAO,KAAK,QACd,QAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,mBAAA,EAAA,OAAA,UAEC,GAAI,yBAAA,EAAA,OAAA,GAAA,EAAA,kCACd,gBAAA,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EA1FD,IA2FA,CAAA,IAAA,cAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAWA,SAAA,EAAkB,EAAS,GAAI,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OACS,GAA9B,EAAM,GAAH,OAAM,EAAQ,IAAG,OAAA,OAAM,GAC3B,KAAK,WAAW,GAAM,CAAF,EAAA,KAAA,SACjB,EAAmB,EAAO,EAAA,EACP,KAAK,iBAAiB,uBAAqB,EAAA,KAAA,EAAA,EAAA,IAAA,WAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAClC,OADrB,EAAQ,EAAA,MAAA,EAAA,GACI,GAAS,EAAA,KAAA,GAAO,EAAS,CACxC,KAAA,EACA,QAAS,EACT,MAAO,KAAK,MAEZ,OAAQ,KAAK,SACf,QAAA,EAAA,GAAA,EAAA,KANF,GAAmB,EAAH,EAAA,IAAA,EAAA,IAAA,QAAA,EAAA,KAAG,EAAH,cAAA,EAAA,KAAG,GAAH,cAAA,EAAA,KAAG,GAAH,EAAA,GAAA,EAAA,SAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAG,GAAH,EAAA,IAAA,EAAA,OAAA,YAQpB,KAAK,WAAW,GAAO,EAAiB,eAAA,EAAA,OAAA,SAErC,KAAK,WAAW,IAAI,yBAAA,EAAA,OAAA,GAAA,EAAA,yBAC9B,gBAAA,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EA3BD,IA4BA,CAAA,IAAA,cAAA,MAOA,SAAY,GAAM,IAC6B,EAD7B,EAAA,EACO,KAAK,UAAU,SAAO,IAA3C,IAAA,EAAA,MAAA,EAAA,EAAA,KAAA,MAA6C,CACzC,GAAI,KADS,EAAA,MAET,OAAO,CAEf,CAAC,OAAA,GAAA,EAAA,EAAA,EAAA,SAAA,EAAA,GAAA,CACD,OAAO,CACX,GACA,CAAA,IAAA,eAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAgBA,SAAA,EAAmB,EAAM,GAAK,IAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAAA,EAAA,EACH,KAAK,iBAAiB,IAAK,EAAA,KAAA,EAAA,EAAA,IAAA,WAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,QAA/B,OAAR,EAAQ,EAAA,MAAA,EAAA,KAAA,EAGT,EAAS,GAAM,OAAA,EAAA,KAAA,eAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,SAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,6BAAA,EAAA,OAAA,GAAA,EAAA,yBAE5B,gBAAA,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAtBD,IAuBA,CAAA,IAAA,mBAAA,MAAA,IAAA,MASA,SAAA,EAAkB,GAAI,IAAA,EAAA,EAAA,EAAA,EAAA,YAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAAA,EAAA,EACG,KAAK,UAAU,SAAO,EAAA,KAAA,EAAA,EAAA,IAAA,MAAA,SAAA,IAAA,IAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAA1B,GACe,oBADrB,EAAM,EAAA,OACK,GAAoB,CAAA,EAAA,KAAA,QAQlC,OAPM,EAAQ,EAAK,gBAAgB,IAAI,GACjC,EAAmB,SAAC,GACtB,IAAM,EAAgB,OAAO,OAAO,OAAO,OAAO,CAAC,EAAG,GAAQ,CAAE,MAAA,IAGhE,OAAO,EAAO,GAAM,EACxB,EAAC,EAAA,KAAA,EACK,EAAgB,wBAAA,EAAA,OAAA,GAAA,EAAA,IAAA,EAAA,IAAA,WAAA,EAAA,EAAA,KAAA,KAAA,CAAA,EAAA,KAAA,eAAA,EAAA,cAAA,IAAA,eAAA,EAAA,KAAA,eAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,SAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,6BAAA,EAAA,OAAA,GAAA,EAAA,yBAIlC,CAAA,IAAA,YAAA,MAaA,SAAU,GAEN,OADA,KAAK,wBAAwB,KAAK,GAC3B,CACX,GACA,CAAA,IAAA,cAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAUA,SAAA,IAAA,IAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,YAEY,EAAU,KAAK,wBAAwB,SAAU,CAAH,EAAA,KAAA,eAAA,EAAA,KAAA,EAC5C,EAAO,OAAA,EAAA,KAAA,gCAAA,EAAA,OAAA,GAAA,EAAA,UAEpB,yBAAA,EAAA,MAAA,KAAA,UAAA,EAfD,IAgBA,CAAA,IAAA,UAAA,MAIA,WACI,KAAK,iBAAiB,QAAQ,KAClC,GACA,CAAA,IAAA,6BAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAUA,SAAA,EAAiC,GAAQ,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OACjC,EAAkB,EAClB,GAAc,EAAK,EAAA,EACA,KAAK,iBAAiB,oBAAkB,EAAA,KAAA,EAAA,EAAA,IAAA,WAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAA5C,OAAR,EAAQ,EAAA,MAAA,EAAA,KAAA,EAEJ,EAAS,CACZ,QAAS,KAAK,QACd,SAAU,EACV,MAAO,KAAK,QACd,UAAA,EAAA,GAAA,EAAA,KAAA,EAAA,GAAE,CAAF,EAAA,KAAA,SAAA,EAAA,QAAK,EAAS,QACD,GANnB,EAAe,EAAA,GAMf,GAAc,EACT,EAAiB,CAAF,EAAA,KAAA,gBAAA,EAAA,OAAA,oBAAA,EAAA,KAAA,gBAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,SAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,YAwBvB,OApBI,GACG,GAA8C,MAA3B,EAAgB,SACnC,OAAkB,GAkBzB,EAAA,OAAA,SACM,GAAe,yBAAA,EAAA,OAAA,GAAA,EAAA,yBACzB,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EA/CD,MA+CC,CAAA,CAtegB,GCVf,GAAQ,WAuBV,SAAA,IAA0B,IAAd,EAAO,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GAAG,CAAC,EAAC,EAAA,KAAA,GAQpB,KAAK,UAAY,EAA0B,EAAQ,WAQnD,KAAK,QAAU,EAAQ,SAAW,GAQlC,KAAK,aAAe,EAAQ,aAQ5B,KAAK,aAAe,EAAQ,YAChC,CAsIC,OArID,EAAA,EAAA,EAAA,IAAA,SAAA,MAmBA,SAAO,GAEH,OAD8C,GAAvB,KAAK,UAAU,GAAQ,GAA3B,EAEvB,GACA,CAAA,IAAA,YAAA,MAsBA,SAAU,GAEF,aAAmB,aACnB,EAAU,CACN,MAAO,EACP,QAAS,EAAQ,UAGzB,IAAM,EAAQ,EAAQ,MAChB,EAAqC,kBAApB,EAAQ,QACzB,IAAI,QAAQ,EAAQ,SACpB,EAAQ,QACR,EAAS,WAAY,EAAU,EAAQ,YAAS,EAChD,EAAU,IAAI,GAAgB,KAAM,CAAE,MAAA,EAAO,QAAA,EAAS,OAAA,IACtD,EAAe,KAAK,aAAa,EAAS,EAAS,GAGzD,MAAO,CAAC,EAFY,KAAK,eAAe,EAAc,EAAS,EAAS,GAG5E,GAAC,CAAA,IAAA,eAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MACD,SAAA,EAAmB,EAAS,EAAS,GAAK,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,cAAA,EAAA,KAAA,EAChC,EAAQ,aAAa,mBAAoB,CAAE,MAAA,EAAO,QAAA,IAAU,OAC1C,OAApB,OAAW,EAAS,EAAA,KAAA,EAAA,EAAA,KAAA,EAEH,KAAK,QAAQ,EAAS,GAAQ,OAAvC,IAAR,EAAQ,EAAA,OAI2B,UAAlB,EAAS,KAAgB,CAAA,EAAA,KAAA,cAChC,IAAI,EAAa,cAAe,CAAE,IAAK,EAAQ,MAAM,OAAA,EAAA,KAAA,oBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,WAI3D,EAAA,cAAiB,OAAK,CAAA,EAAA,KAAA,SAAA,EAAA,EACC,EAAQ,iBAAiB,oBAAkB,EAAA,KAAA,GAAA,EAAA,IAAA,YAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAA/C,OAAR,EAAQ,EAAA,MAAA,EAAA,KAAA,GACE,EAAS,CAAE,MAAK,EAAA,GAAE,MAAA,EAAO,QAAA,IAAU,QAA5C,KAAR,EAAQ,EAAA,MACM,CAAF,EAAA,KAAA,gBAAA,EAAA,OAAA,oBAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,eAKf,EAAU,CAAF,EAAA,KAAA,eAAA,EAAA,GAAA,QAGJ,EAIR,QAAA,EAAA,EAEkB,EAAQ,iBAAiB,uBAAqB,EAAA,KAAA,GAAA,EAAA,IAAA,YAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAAlD,OAAR,EAAQ,EAAA,MAAA,EAAA,KAAA,GACE,EAAS,CAAE,MAAA,EAAO,QAAA,EAAS,SAAA,IAAW,QAAvD,EAAQ,EAAA,KAAA,QAAA,EAAA,KAAG,GAAH,cAAA,EAAA,KAAG,GAAH,cAAA,EAAA,KAAG,GAAH,EAAA,GAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAG,GAAH,EAAA,IAAA,EAAA,OAAA,mBAAA,EAAA,OAAA,SAEL,GAAQ,yBAAA,EAAA,OAAA,GAAA,EAAA,+CAClB,gBAAA,EAAA,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAnCA,IAmCA,CAAA,IAAA,iBAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MACD,SAAA,EAAqB,EAAc,EAAS,EAAS,GAAK,IAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,cAAA,EAAA,KAAA,EAAA,EAAA,KAAA,EAIjC,EAAY,OAA7B,EAAQ,EAAA,KAAA,EAAA,KAAG,EAAH,aAAA,EAAA,KAAG,EAAH,EAAA,GAAA,EAAA,uBAAA,EAAA,KAAG,EAAH,EAAA,KAAG,GAQL,EAAQ,aAAa,oBAAqB,CAC5C,MAAA,EACA,QAAA,EACA,SAAA,IACF,eAAA,EAAA,KAAA,GACI,EAAQ,cAAa,QAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,SAGvB,EAAA,cAA0B,QAC1B,EAAK,EAAA,IACR,eAAA,EAAA,KAAA,GAEC,EAAQ,aAAa,qBAAsB,CAC7C,MAAA,EACA,QAAA,EACA,SAAA,EACA,MAAO,IACT,QACgB,GAAlB,EAAQ,WACJ,EAAO,CAAF,EAAA,KAAA,eACC,EAAK,yBAAA,EAAA,OAAA,GAAA,EAAA,yBAElB,gBAAA,EAAA,EAAA,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAnCA,MAmCA,CAAA,CA9LS,GCQR,GAAgB,SAAA,GAAA,EAAA,EAAA,GAAA,IAAA,EAAA,EAAA,GAkBlB,SAAA,IAA0B,IAAA,EAAd,EAAO,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GAAG,CAAC,EASwD,OATvD,EAAA,KAAA,GACpB,EAAQ,UAAY,EAA2B,EAAQ,YACvD,EAAA,EAAA,KAAA,KAAM,IACD,oBAC6B,IAA9B,EAAQ,kBAKZ,EAAK,QAAQ,KAAK,EAAiB,wCAAwC,CAC/E,CAyJC,OAxJD,EAAA,EAAA,EAAA,IAAA,UAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAOA,SAAA,EAAc,EAAS,GAAO,IAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,cAAA,EAAA,KAAA,EACH,EAAQ,WAAW,GAAQ,OAApC,KAAR,EAAQ,EAAA,MACA,CAAF,EAAA,KAAA,eAAA,EAAA,OAAA,SACD,GAAQ,WAIf,EAAQ,OAAgC,YAAvB,EAAQ,MAAM,KAAkB,CAAA,EAAA,KAAA,eAAA,EAAA,KAAA,EACpC,KAAK,eAAe,EAAS,GAAQ,OAIN,eAAA,EAAA,OAAA,SAAA,EAAA,MAJM,cAAA,EAAA,KAAA,GAIzC,KAAK,aAAa,EAAS,GAAQ,yBAAA,EAAA,OAAA,GAAA,EAAA,UACnD,gBAAA,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EApBD,IAoBC,CAAA,IAAA,eAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MACD,SAAA,EAAmB,EAAS,GAAO,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAG/B,GADM,EAAU,EAAQ,QAAU,CAAC,GAE/B,KAAK,mBAAoB,CAAF,EAAA,KAAA,SAUvB,OAJM,EAAsB,EAAO,UAC7B,EAAqB,EAAQ,UAC7B,GAAuB,GAAsB,IAAuB,EAE1E,EAAA,KAAA,EACiB,EAAQ,MAAM,IAAI,QAAQ,EAAS,CAChD,UAA4B,YAAjB,EAAQ,KACb,GAAsB,OACtB,KACP,OAJK,GAAR,EAAQ,EAAA,MAYJ,IACA,GACiB,YAAjB,EAAQ,KAAkB,CAAA,EAAA,KAAA,SACmB,OAA7C,KAAK,wCAAwC,EAAA,KAAA,GACrB,EAAQ,SAAS,EAAS,EAAS,SAAQ,QAApD,EAAA,KAMd,QAAA,EAAA,KAAA,uBAMC,IAAI,EAAa,yBAA0B,CAC7C,UAAW,KAAK,UAChB,IAAK,EAAQ,MACf,QAEmC,EAAA,KAAA,SAC0C,QAAA,EAAA,GAAA,EAAA,KAAA,QAAzE,EAAQ,EAAA,GAGd,EAAO,eAAe,gCAAkC,EAAe,EAAQ,MAC/E,EAAO,IAAI,8BAAD,OAA+B,EAAe,aAAoB,QAAU,EAAS,IAAM,KACrG,EAAO,eAAe,8BACtB,EAAO,IAAI,GACX,EAAO,WACP,EAAO,eAAe,+BACtB,EAAO,IAAI,GACX,EAAO,WACP,EAAO,WAAW,eAAA,EAAA,OAAA,SAEf,GAAQ,yBAAA,EAAA,OAAA,GAAA,EAAA,UAClB,gBAAA,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAhEA,IAgEA,CAAA,IAAA,iBAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MACD,SAAA,EAAqB,EAAS,GAAO,IAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OACY,OAA7C,KAAK,wCAAwC,EAAA,KAAA,EACtB,EAAQ,MAAM,GAAQ,OAA/B,OAAR,EAAQ,EAAA,KAAA,EAAA,KAAG,EAGO,EAAQ,SAAS,EAAS,EAAS,SAAQ,OAApD,GAAA,EAAA,KACC,CAAF,EAAA,KAAA,cAGJ,IAAI,EAAa,0BAA2B,CAC9C,IAAK,EAAQ,IACb,OAAQ,EAAS,SACnB,cAAA,EAAA,OAAA,SAEC,GAAQ,yBAAA,EAAA,OAAA,GAAA,EAAA,UAClB,gBAAA,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAhBA,IAiBD,CAAA,IAAA,wCAAA,MA2BA,WACI,IAEoD,EAFhD,EAAqB,KACrB,EAA6B,EAAE,EAAA,EACL,KAAK,QAAQ,WAAS,IAApD,IAAA,EAAA,MAAA,EAAA,EAAA,KAAA,MAAsD,KAAA,EAAA,GAAA,EAAA,MAAA,GAA1C,EAAK,EAAA,GAAE,EAAM,EAAA,GAEjB,IAAW,EAAiB,yCAI5B,IAAW,EAAiB,oCAC5B,EAAqB,GAErB,EAAO,iBACP,IAER,CAAC,OAAA,GAAA,EAAA,EAAA,EAAA,SAAA,EAAA,GAAA,CACkC,IAA/B,EACA,KAAK,QAAQ,KAAK,EAAiB,mCAE9B,EAA6B,GAA4B,OAAvB,GAEvC,KAAK,QAAQ,OAAO,EAAoB,EAGhD,KAAC,CAAA,CArLiB,CAAS,IAuL/B,GAAiB,kCAAoC,CAC3C,gBAAe,SAAA,GAAe,OAAA,EAAA,IAAA,MAAA,SAAA,IAAA,IAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAAJ,IAAR,EAAQ,EAAR,aACH,EAAS,QAAU,KAAG,CAAA,EAAA,KAAA,eAAA,EAAA,OAAA,SAC5B,MAAI,cAAA,EAAA,OAAA,SAER,GAAQ,wBAAA,EAAA,OAAA,GAAA,EAAA,IAJiB,EAKpC,GAEJ,GAAiB,uCAAyC,CAChD,gBAAe,SAAA,GAAe,OAAA,EAAA,IAAA,MAAA,SAAA,IAAA,IAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAAJ,KAAR,EAAQ,EAAR,UACJ,WAAU,CAAA,EAAA,KAAA,eAAA,EAAA,KAAA,EAAS,EAAa,GAAS,OAAA,EAAA,GAAA,EAAA,KAAA,EAAA,KAAA,eAAA,EAAA,GAAG,EAAQ,cAAA,EAAA,OAAA,SAAA,EAAA,IAAA,wBAAA,EAAA,OAAA,GAAA,EAAA,IADpC,EAEpC,GCzMJ,ICVI,GDeE,GAAkB,WAWpB,SAAA,IAAyE,IAAA,EAAA,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GAAJ,CAAC,EAAxD,EAAS,EAAT,UAAS,EAAA,EAAE,QAAA,OAAO,IAAA,EAAG,GAAE,EAAA,EAAA,EAAE,kBAAA,OAAiB,IAAA,GAAO,EAAA,EAAA,KAAA,GAC3D,KAAK,iBAAmB,IAAI,IAC5B,KAAK,kBAAoB,IAAI,IAC7B,KAAK,wBAA0B,IAAI,IACnC,KAAK,UAAY,IAAI,GAAiB,CAClC,UAAW,EAA2B,GACtC,QAAS,GAAF,OAAA,GACA,GAAO,CACV,IAAI,GAAuB,CAAE,mBAAoB,SAErD,kBAAA,IAGJ,KAAK,QAAU,KAAK,QAAQ,KAAK,MACjC,KAAK,SAAW,KAAK,SAAS,KAAK,KACvC,CA+OC,OA9OD,EAAA,EAAA,EAAA,IAAA,WAAA,IAIA,WACI,OAAO,KAAK,SAChB,GACA,CAAA,IAAA,WAAA,MAUA,SAAS,GACL,KAAK,eAAe,GACf,KAAK,kCACN,KAAK,iBAAiB,UAAW,KAAK,SACtC,KAAK,iBAAiB,WAAY,KAAK,UACvC,KAAK,iCAAkC,EAE/C,GACA,CAAA,IAAA,iBAAA,MAOA,SAAe,GASX,IAC2B,EADrB,EAAkB,GAAG,EAAA,EACP,GAAO,IAA3B,IAAA,EAAA,MAAA,EAAA,EAAA,KAAA,MAA6B,KAAlB,EAAK,EAAA,MAES,kBAAV,EACP,EAAgB,KAAK,GAEhB,QAA4B,IAAnB,EAAM,UACpB,EAAgB,KAAK,EAAM,KAE/B,IAAA,EAA0B,GAAe,GAAjC,EAAQ,EAAR,SAAU,EAAG,EAAH,IACZ,EAA6B,kBAAV,GAAsB,EAAM,SAAW,SAAW,UAC3E,GAAI,KAAK,iBAAiB,IAAI,IAC1B,KAAK,iBAAiB,IAAI,KAAS,EACnC,MAAM,IAAI,EAAa,wCAAyC,CAC5D,WAAY,KAAK,iBAAiB,IAAI,GACtC,YAAa,IAGrB,GAAqB,kBAAV,GAAsB,EAAM,UAAW,CAC9C,GAAI,KAAK,wBAAwB,IAAI,IACjC,KAAK,wBAAwB,IAAI,KAAc,EAAM,UACrD,MAAM,IAAI,EAAa,4CAA6C,CAChE,IAAA,IAGR,KAAK,wBAAwB,IAAI,EAAU,EAAM,UACrD,CAGA,GAFA,KAAK,iBAAiB,IAAI,EAAK,GAC/B,KAAK,kBAAkB,IAAI,EAAK,GAC5B,EAAgB,OAAS,EAAG,CAC5B,IAAM,EAAiB,wDAAA,OACV,EAAgB,KAAK,MAAK,kCAAgC,2CAKnE,QAAQ,KAAK,EAKrB,CACJ,CAAC,OAAA,GAAA,EAAA,EAAA,EAAA,SAAA,EAAA,GAAA,CACL,GACA,CAAA,IAAA,UAAA,MAUA,SAAQ,GAAO,IAAA,EAAA,KAGX,OAAO,EAAU,EAAK,EAAA,IAAA,MAAE,SAAA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OACd,EAAsB,IAAI,GAChC,EAAK,SAAS,QAAQ,KAAK,GAE3B,EAAA,EAC8B,EAAK,kBAAgB,EAAA,KAAA,EAAA,EAAA,IAAA,WAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAO7C,OAP6C,EAAA,GAAA,EAAA,MAAA,GAAvC,EAAG,EAAA,GAAE,EAAQ,EAAA,GACf,EAAY,EAAK,wBAAwB,IAAI,GAC7C,EAAY,EAAK,kBAAkB,IAAI,GACvC,EAAU,IAAI,QAAQ,EAAK,CAC7B,UAAA,EACA,MAAO,EACP,YAAa,gBACf,EAAA,KAAA,GACI,QAAQ,IAAI,EAAK,SAAS,UAAU,CACtC,OAAQ,CAAE,SAAA,GACV,QAAA,EACA,MAAA,KACD,QAAA,EAAA,KAAA,gBAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,SAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,YAKN,OAHO,EAAgC,EAAhC,YAAa,EAAmB,EAAnB,eAGpB,EAAA,OAAA,SACM,CAAE,YAAA,EAAa,eAAA,IAAgB,yBAAA,EAAA,OAAA,GAAA,EAAA,yBAE9C,GACA,CAAA,IAAA,WAAA,MAUA,SAAS,GAAO,IAAA,EAAA,KAGZ,OAAO,EAAU,EAAK,EAAA,IAAA,MAAE,SAAA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,cAAA,EAAA,KAAA,EACA,KAAK,OAAO,KAAK,EAAK,SAAS,WAAU,OAAlD,OAAL,EAAK,EAAA,KAAA,EAAA,KAAG,EACwB,EAAM,OAAM,OAA5C,EAAuB,EAAA,KACvB,EAAoB,IAAI,IAAI,EAAK,iBAAiB,UAClD,EAAc,GAAE,EAAA,EACA,GAAuB,EAAA,KAAA,EAAA,EAAA,IAAA,YAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SAA3B,GAAP,EAAO,EAAA,MACT,EAAkB,IAAI,EAAQ,KAAM,CAAF,EAAA,KAAA,gBAAA,EAAA,KAAA,GAC7B,EAAM,OAAO,GAAQ,QAC3B,EAAY,KAAK,EAAQ,KAAK,QAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,SAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,YAKrC,OAAA,EAAA,OAAA,SACM,CAAE,YAAA,IAAa,yBAAA,EAAA,OAAA,GAAA,EAAA,yBAE9B,GACA,CAAA,IAAA,qBAAA,MAMA,WACI,OAAO,KAAK,gBAChB,GACA,CAAA,IAAA,gBAAA,MAMA,WACI,OAAA,GAAW,KAAK,iBAAiB,OACrC,GACA,CAAA,IAAA,oBAAA,MASA,SAAkB,GACd,IAAM,EAAY,IAAI,IAAI,EAAK,SAAS,MACxC,OAAO,KAAK,iBAAiB,IAAI,EAAU,KAC/C,GACA,CAAA,IAAA,0BAAA,MAKA,SAAwB,GACpB,OAAO,KAAK,wBAAwB,IAAI,EAC5C,GACA,CAAA,IAAA,gBAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAkBA,SAAA,EAAoB,GAAO,IAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAEqB,GADtC,EAAM,aAAmB,QAAU,EAAQ,IAAM,IACjD,EAAW,KAAK,kBAAkB,IAC1B,CAAF,EAAA,KAAA,eAAA,EAAA,KAAA,EACY,KAAK,OAAO,KAAK,KAAK,SAAS,WAAU,OAAlD,OAAL,EAAK,EAAA,KAAA,EAAA,OAAA,SACJ,EAAM,MAAM,IAAS,cAAA,EAAA,OAAA,cAEzB,GAAS,wBAAA,EAAA,OAAA,GAAA,EAAA,UACnB,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EA1BD,IA2BA,CAAA,IAAA,0BAAA,MAQA,SAAwB,GAAK,IAAA,EAAA,KACnB,EAAW,KAAK,kBAAkB,GACxC,IAAK,EACD,MAAM,IAAI,EAAa,oBAAqB,CAAE,IAAA,IAElD,OAAO,SAAC,GAGJ,OAFA,EAAQ,QAAU,IAAI,QAAQ,GAC9B,EAAQ,OAAS,OAAO,OAAO,CAAE,SAAA,GAAY,EAAQ,QAC9C,EAAK,SAAS,OAAO,EAChC,CACJ,KAAC,CAAA,CAzQmB,GCVX,GAAgC,WAIzC,OAHK,KACD,GAAqB,IAAI,IAEtB,EACX,aCVI,GCOS,GAAmB,SAAC,GAC7B,OAAI,GAA8B,kBAAZ,EASX,EAWA,CAAE,OAAQ,EAEzB,ECnBM,GAAK,WAYP,SAAA,EAAY,EAAO,GAAiC,IAAxB,EAAM,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GChBT,MDgByB,EAAA,KAAA,GAc9C,KAAK,QAAU,GAAiB,GAChC,KAAK,MAAQ,EACb,KAAK,OAAS,CAClB,CAQC,OAPD,EAAA,EAAA,EAAA,IAAA,kBAAA,MAKA,SAAgB,GACZ,KAAK,aAAe,GAAiB,EACzC,KAAC,CAAA,CArCM,GEEL,GAAW,SAAA,GAAA,EAAA,EAAA,GAAA,IAAA,EAAA,EAAA,GAcb,SAAA,EAAY,EAAQ,EAAS,GAAQ,EAAA,KAAA,GAgC/B,OAAA,EAAA,KAAA,MAvBY,SAAH,GAAgB,IAAV,EAAG,EAAH,IACP,EAAS,EAAO,KAAK,EAAI,MAE/B,GAAK,IAOD,EAAI,SAAW,SAAS,QAA2B,IAAjB,EAAO,OAY7C,OAAO,EAAO,MAAM,EACxB,GACa,EAAS,EAC1B,CAAC,OAAA,EAAA,EAAA,CAhDY,CAAS,ICSpB,GAAM,WAIR,SAAA,IAAc,EAAA,KAAA,GACV,KAAK,QAAU,IAAI,IACnB,KAAK,mBAAqB,IAAI,GAClC,CAgWC,OA/VD,EAAA,EAAA,EAAA,IAAA,SAAA,IAKA,WACI,OAAO,KAAK,OAChB,GACA,CAAA,IAAA,mBAAA,MAIA,WAAmB,IAAA,EAAA,KAEf,KAAK,iBAAiB,SAAU,SAAC,GAC7B,IAAQ,EAAY,EAAZ,QACF,EAAkB,EAAK,cAAc,CAAE,QAAA,EAAS,MAAA,IAClD,GACA,EAAM,YAAY,EAE1B,GACJ,GACA,CAAA,IAAA,mBAAA,MAsBA,WAAmB,IAAA,EAAA,KAEf,KAAK,iBAAiB,WAAY,SAAC,GAG/B,GAAI,EAAM,MAA4B,eAApB,EAAM,KAAK,KAAuB,CAEhD,IAAQ,EAAY,EAAM,KAAlB,QACJ,EAGJ,IAAM,EAAkB,QAAQ,IAAI,EAAQ,YAAY,KAAI,SAAC,GACpC,kBAAV,IACP,EAAQ,CAAC,IAEb,IAAM,EAAO,EAAO,QAAO,GAAI,IAC/B,OAAO,EAAK,cAAc,CAAE,QAAA,EAAS,MAAA,GAIzC,KACA,EAAM,UAAU,GAEZ,EAAM,OAAS,EAAM,MAAM,IACtB,EAAgB,MAAK,kBAAM,EAAM,MAAM,GAAG,aAAY,EAAK,GAExE,CACJ,GACJ,GACA,CAAA,IAAA,gBAAA,MAYA,SAAA,GAAmC,IAAA,EAAA,KAAnB,EAAO,EAAP,QAAS,EAAK,EAAL,MASrB,IAAM,EAAM,IAAI,IAAI,EAAQ,IAAK,SAAS,MAC1C,GAAK,EAAI,SAAS,WAAW,QAA7B,CAMA,IAAM,EAAa,EAAI,SAAW,SAAS,OAC3C,EAA0B,KAAK,kBAAkB,CAC7C,MAAA,EACA,QAAA,EACA,WAAA,EACA,IAAA,IAJI,EAAM,EAAN,OAAQ,EAAK,EAAL,MAMZ,EAAU,GAAS,EAAM,QAEzB,EAaJ,IAAM,EAAS,EAAQ,OAQvB,IAPK,GAAW,KAAK,mBAAmB,IAAI,KAKxC,EAAU,KAAK,mBAAmB,IAAI,IAErC,EAAL,CAwBA,IAAI,EAhBA,EAiBJ,IACI,EAAkB,EAAQ,OAAO,CAAE,IAAA,EAAK,QAAA,EAAS,MAAA,EAAO,OAAA,GAC5D,CACA,MAAO,GACH,EAAkB,QAAQ,OAAO,EACrC,CAEA,IAAM,EAAe,GAAS,EAAM,aAuCpC,OAtCI,aAA2B,UAC1B,KAAK,eAAiB,KACvB,EAAkB,EAAgB,MAAK,eAAA,EAAA,EAAA,IAAA,MAAC,SAAA,EAAO,GAAG,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,WAE1C,EAAc,CAAF,EAAA,KAAA,SASX,OAAA,EAAA,KAAA,EAAA,EAAA,KAAA,EAEgB,EAAa,OAAO,CAAE,IAAA,EAAK,QAAA,EAAS,MAAA,EAAO,OAAA,IAAS,cAAA,EAAA,OAAA,SAAA,EAAA,MAAA,OAAA,EAAA,KAAA,EAAA,EAAA,GAAA,EAAA,SAG7D,EAAA,cAAoB,QACpB,EAAG,EAAA,IACN,YAGL,EAAK,cAAe,CAAF,EAAA,KAAA,SASjB,OAAA,EAAA,OAAA,SACM,EAAK,cAAc,OAAO,CAAE,IAAA,EAAK,QAAA,EAAS,MAAA,KAAQ,cAEvD,EAAG,yBAAA,EAAA,OAAA,GAAA,EAAA,kBACZ,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EAlCsC,KAoCpC,CAhEP,CAtCA,CAuGJ,GACA,CAAA,IAAA,oBAAA,MAeA,SAAA,GAAwD,IAE1B,EAFV,EAAG,EAAH,IAAK,EAAU,EAAV,WAAY,EAAO,EAAP,QAAS,EAAK,EAAL,MACY,EAAA,EAAvC,KAAK,QAAQ,IAAI,EAAQ,SAAW,IACzB,IAA1B,IAAA,EAAA,MAAA,EAAA,EAAA,KAAA,MAA4B,KAAjB,EAAK,EAAA,MACR,OAAM,EAGJ,EAAc,EAAM,MAAM,CAAE,IAAA,EAAK,WAAA,EAAY,QAAA,EAAS,MAAA,IAC5D,GAAI,EA6BA,OAjBA,EAAS,GACL,MAAM,QAAQ,IAA6B,IAAlB,EAAO,QAI3B,EAAY,cAAgB,QACG,IAApC,OAAO,KAAK,GAAa,QAIG,mBAAhB,KAPZ,OAAS,GAcN,CAAE,MAAA,EAAO,OAAA,EAExB,CACA,OAAA,GAAA,EAAA,EAAA,EAAA,SAAA,EAAA,GAAA,CACA,MAAO,CAAC,CACZ,GACA,CAAA,IAAA,oBAAA,MAcA,SAAkB,GAAiC,IAAxB,EAAM,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GF1SR,ME2SrB,KAAK,mBAAmB,IAAI,EAAQ,GAAiB,GACzD,GACA,CAAA,IAAA,kBAAA,MAOA,SAAgB,GACZ,KAAK,cAAgB,GAAiB,EAC1C,GACA,CAAA,IAAA,gBAAA,MAKA,SAAc,GAiCL,KAAK,QAAQ,IAAI,EAAM,SACxB,KAAK,QAAQ,IAAI,EAAM,OAAQ,IAInC,KAAK,QAAQ,IAAI,EAAM,QAAQ,KAAK,EACxC,GACA,CAAA,IAAA,kBAAA,MAKA,SAAgB,GACZ,IAAK,KAAK,QAAQ,IAAI,EAAM,QACxB,MAAM,IAAI,EAAa,6CAA8C,CACjE,OAAQ,EAAM,SAGtB,IAAM,EAAa,KAAK,QAAQ,IAAI,EAAM,QAAQ,QAAQ,GAC1D,KAAI,GAAc,GAId,MAAM,IAAI,EAAa,yCAHvB,KAAK,QAAQ,IAAI,EAAM,QAAQ,OAAO,EAAY,EAK1D,KAAC,CAAA,CAvWO,GLdC,GAA2B,WAOpC,OANK,MACD,GAAgB,IAAI,IAEN,mBACd,GAAc,oBAEX,EACX,EMMA,SAAS,GAAc,EAAS,EAAS,GACrC,IAAI,EACJ,GAAuB,kBAAZ,EAAsB,CAC7B,IAAM,EAAa,IAAI,IAAI,EAAS,SAAS,MAkC7C,EAAQ,IAAI,IAZU,SAAH,GASf,OATwB,EAAH,IASV,OAAS,EAAW,IACnC,GAEiC,EAAS,EAC9C,MACK,GAAI,aAAmB,OAExB,EAAQ,IAAI,GAAY,EAAS,EAAS,QAEzC,GAAuB,oBAAZ,EAEZ,EAAQ,IAAI,GAAM,EAAS,EAAS,OAEnC,MAAI,aAAmB,IAIxB,MAAM,IAAI,EAAa,yBAA0B,CAC7C,WAAY,kBACZ,SAAU,gBACV,UAAW,YANf,EAAQ,CAQZ,CAGA,OAFsB,KACR,cAAc,GACrB,CACX,CCvEO,SAAS,GAA0B,GAGtC,IAHmF,IAAlC,EAA2B,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GAAG,GAAE,EAAA,WAG5E,IAAM,EAAS,EAAA,GACZ,EAA4B,MAAK,SAAC,GAAM,OAAK,EAAO,KAAK,EAAU,KACnE,EAAU,aAAa,OAAO,EAEtC,EAJA,EAAA,EAAA,EAAA,GAA4B,EAAU,aAAa,QAAM,EAAA,EAAA,OAAA,IAAA,IAKzD,OAAO,CACX,CCjBA,IASM,GAAa,SAAA,GAAA,EAAA,EAAA,GAAA,IAAA,EAAA,EAAA,GAiBf,SAAA,EAAY,EAAoB,GAAS,EAAA,KAAA,GAcnC,OAAA,EAAA,KAAA,MAbY,SAAH,GAAqB,IAEyC,EAFxD,EAAO,EAAP,QACP,EAAkB,EAAmB,qBAAqB,EAAA,ECrBrE,SAAgC,GAAG,IAAA,EAAA,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GAA+H,CAAC,EAAC,EAAA,EAA7H,4BAAA,OAA2B,IAAA,EAAG,CAAC,QAAS,YAAW,EAAA,EAAA,EAAE,eAAA,OAAc,IAAA,EAAG,aAAY,EAAA,EAAA,EAAE,UAAA,OAAS,IAAA,GAAO,EAAE,EAAe,EAAf,gBAAe,OAAA,IAAA,MAAA,SAAA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAG/J,OAFM,EAAY,IAAI,IAAI,EAAK,SAAS,OAC9B,KAAO,GAAG,EAAA,KAAA,EACd,EAAU,KAAI,OAEpB,OADM,EAA0B,GAA0B,EAAW,GAA4B,EAAA,KAAA,EAC3F,EAAwB,KAAI,WAC9B,IAAkB,EAAwB,SAAS,SAAS,KAAI,CAAA,EAAA,KAAA,SAGhE,OAFM,EAAe,IAAI,IAAI,EAAwB,OACxC,UAAY,EAAe,EAAA,KAAA,GAClC,EAAa,KAAI,YAEvB,EAAW,CAAF,EAAA,KAAA,SAGT,OAFM,EAAW,IAAI,IAAI,EAAwB,OACxC,UAAY,QAAQ,EAAA,KAAA,GACvB,EAAS,KAAI,YAEnB,EAAiB,CAAF,EAAA,KAAA,SACT,EAAiB,EAAgB,CAAE,IAAK,IAAY,EAAA,EAC/B,GAAc,EAAA,KAAA,GAAA,EAAA,IAAA,YAAA,EAAA,EAAA,KAAA,KAAE,CAAF,EAAA,KAAA,SACrC,OADO,EAAY,EAAA,MAAA,EAAA,KAAA,GACb,EAAa,KAAI,QAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,iBAAA,EAAA,KAAA,GAAA,EAAA,GAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,eAAA,EAAA,KAAA,GAAA,EAAA,IAAA,EAAA,OAAA,6BAAA,EAAA,OAAA,GAAA,EAAA,wBAnBgI,EAmBhI,CDGG,CAAsB,EAAQ,IAAK,IAAQ,IAArE,IAAA,EAAA,MAAA,EAAA,EAAA,KAAA,MAAuE,KAA5D,EAAW,EAAA,MACZ,EAAW,EAAgB,IAAI,GACrC,GAAI,EAEA,MAAO,CAAE,SAAA,EAAU,UADD,EAAmB,wBAAwB,GAGrE,CAAC,OAAA,GAAA,EAAA,EAAA,EAAA,SAAA,EAAA,GAAA,CAKL,GACa,EAAmB,SACpC,CAAC,OAAA,EAAA,EAAA,CAjCc,CAAS,IEXrB,ICc4B,GChBtB,GAAyB,CAWlC,gBAAiB,WAAF,IAAA,EAAA,EAAA,IAAA,MAAE,SAAA,EAAA,GAAA,IAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAAiB,GACN,OADF,EAAQ,EAAR,UACT,QAAsC,IAApB,EAAS,OAAY,CAAA,EAAA,KAAA,eAAA,EAAA,OAAA,SACzC,GAAQ,cAAA,EAAA,OAAA,SAEZ,MAAI,wBAAA,EAAA,OAAA,GAAA,EAAA,KACd,gBAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EALgB,ICgBf,GAAoB,SAAA,GAAA,EAAA,EAAA,GAAA,IAAA,EAAA,EAAA,GActB,SAAA,IAA0B,IAAA,EAAd,EAAO,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAA,GAAG,CAAC,EAMlB,OANmB,EAAA,KAAA,IACpB,EAAA,EAAA,KAAA,KAAM,IAGI,QAAQ,MAAK,SAAC,GAAC,MAAK,oBAAqB,CAAC,KAChD,EAAK,QAAQ,QAAQ,IACxB,CACL,CA2DC,OA1DD,EAAA,EAAA,EAAA,IAAA,UAAA,MAAA,eAAA,EAAA,EAAA,IAAA,MAOA,SAAA,EAAc,EAAS,GAAO,IAAA,EAAA,EAAA,EAAA,OAAA,IAAA,MAAA,SAAA,GAAA,cAAA,EAAA,KAAA,EAAA,MAAA,OAcmB,MAbhC,GASP,EAAuB,EAAQ,iBAAiB,GAAS,OAAM,WAEjE,IAEC,EAAQ,UAAU,GAAsB,EAAA,KAAA,EACxB,EAAQ,WAAW,GAAQ,OAApC,KAAR,EAAQ,EAAA,MAEE,CAAF,EAAA,KAAA,SACJ,EAGH,EAAA,KAAA,iBAMA,OAAA,EAAA,KAAA,GAAA,EAAA,KAAA,GAIqB,EAAoB,QAAtC,EAAQ,EAAA,KAAA,EAAA,KAAG,GAAH,cAAA,EAAA,KAAG,GAAH,EAAA,GAAA,EAAA,UAGJ,EAAA,cAAe,QACf,EAAK,EAAA,IACR,QAUR,GACI,EAAU,CAAF,EAAA,KAAA,eACH,IAAI,EAAa,cAAe,CAAE,IAAK,EAAQ,IAAK,MAAA,IAAQ,eAAA,EAAA,OAAA,SAE/D,GAAQ,yBAAA,EAAA,OAAA,GAAA,EAAA,oBAClB,gBAAA,EAAA,GAAA,OAAA,EAAA,MAAA,KAAA,UAAA,EA1DD,MA0DC,CAAA,CAhFqB,CAAS,ICpB/B,KAAK,iBAAiB,YAAY,kBAAM,KAAK,QAAQ,OAAO,ICahE,SAAkB,GACa,KACR,SAAS,EAChC,CJNI,CKDa,yKAAK,eCCtB,SAAkB,GACd,IAAM,EAAqB,KAE3B,GADsB,IAAI,GAAc,EAAoB,GAEhE,CNHI,CAAS,IKGb,IEHiC,GFG3B,GAAsB,IAAI,OAAO,oBACvC,IAEE,SAAA,GAAuD,IAApD,EAAO,EAAP,QAAS,EAAG,EAAH,IAEV,MAAqB,aAAjB,EAAQ,QAKR,EAAI,SAAS,WAAW,QAMxB,EAAI,SAAS,MAAM,IAMzB,IEzB+B,GF0BkB,cEzBpB,KACD,wBAAwB,MF6BtD,IAEE,SAAA,GAAA,IAAG,EAAG,EAAH,IAAG,OAAO,EAAI,SAAW,KAAK,SAAS,QAAU,EAAI,SAAS,SAAS,OAAO,GAEjF,IAAI,GAAqB,CACvB,UAAW,SACX,QAAS,CAGP,IAAI,GAAiB,CAAE,WAAY,SAOzC,KAAK,iBAAiB,WAAW,SAAC,GAC5B,EAAM,MAA4B,iBAApB,EAAM,KAAK,MAC3B,KAAK,aAET","file":"service-worker.js","sourceRoot":"","sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:7.0.0'] && _();\n}\ncatch (e) { }\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:expiration:7.0.0'] && _();\n}\ncatch (e) { }\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:precaching:7.0.0'] && _();\n}\ncatch (e) { }\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:routing:7.0.0'] && _();\n}\ncatch (e) { }\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:strategies:7.0.0'] && _();\n}\ncatch (e) { }\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst logger = (process.env.NODE_ENV === 'production'\n ? null\n : (() => {\n // Don't overwrite this value if it's already set.\n // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923\n if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) {\n self.__WB_DISABLE_DEV_LOGS = false;\n }\n let inGroup = false;\n const methodToColorMap = {\n debug: `#7f8c8d`,\n log: `#2ecc71`,\n warn: `#f39c12`,\n error: `#c0392b`,\n groupCollapsed: `#3498db`,\n groupEnd: null, // No colored prefix on groupEnd\n };\n const print = function (method, args) {\n if (self.__WB_DISABLE_DEV_LOGS) {\n return;\n }\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n console[method](...logPrefix, ...args);\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n const api = {};\n const loggerMethods = Object.keys(methodToColorMap);\n for (const key of loggerMethods) {\n const method = key;\n api[method] = (...args) => {\n print(method, args);\n };\n }\n return api;\n })());\nexport { logger };\n","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _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 subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport possibleConstructorReturn from \"./possibleConstructorReturn.js\";\nexport default function _createSuper(Derived) {\n var hasNativeReflectConstruct = isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = getPrototypeOf(Derived),\n result;\n if (hasNativeReflectConstruct) {\n var NewTarget = getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return possibleConstructorReturn(this, result);\n };\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct.bind();\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) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../../_version.js';\nexport const messages = {\n 'invalid-value': ({ paramName, validValueDescription, value }) => {\n if (!paramName || !validValueDescription) {\n throw new Error(`Unexpected input to 'invalid-value' error.`);\n }\n return (`The '${paramName}' parameter was given a value with an ` +\n `unexpected value. ${validValueDescription} Received a value of ` +\n `${JSON.stringify(value)}.`);\n },\n 'not-an-array': ({ moduleName, className, funcName, paramName }) => {\n if (!moduleName || !className || !funcName || !paramName) {\n throw new Error(`Unexpected input to 'not-an-array' error.`);\n }\n return (`The parameter '${paramName}' passed into ` +\n `'${moduleName}.${className}.${funcName}()' must be an array.`);\n },\n 'incorrect-type': ({ expectedType, paramName, moduleName, className, funcName, }) => {\n if (!expectedType || !paramName || !moduleName || !funcName) {\n throw new Error(`Unexpected input to 'incorrect-type' error.`);\n }\n const classNameStr = className ? `${className}.` : '';\n return (`The parameter '${paramName}' passed into ` +\n `'${moduleName}.${classNameStr}` +\n `${funcName}()' must be of type ${expectedType}.`);\n },\n 'incorrect-class': ({ expectedClassName, paramName, moduleName, className, funcName, isReturnValueProblem, }) => {\n if (!expectedClassName || !moduleName || !funcName) {\n throw new Error(`Unexpected input to 'incorrect-class' error.`);\n }\n const classNameStr = className ? `${className}.` : '';\n if (isReturnValueProblem) {\n return (`The return value from ` +\n `'${moduleName}.${classNameStr}${funcName}()' ` +\n `must be an instance of class ${expectedClassName}.`);\n }\n return (`The parameter '${paramName}' passed into ` +\n `'${moduleName}.${classNameStr}${funcName}()' ` +\n `must be an instance of class ${expectedClassName}.`);\n },\n 'missing-a-method': ({ expectedMethod, paramName, moduleName, className, funcName, }) => {\n if (!expectedMethod ||\n !paramName ||\n !moduleName ||\n !className ||\n !funcName) {\n throw new Error(`Unexpected input to 'missing-a-method' error.`);\n }\n return (`${moduleName}.${className}.${funcName}() expected the ` +\n `'${paramName}' parameter to expose a '${expectedMethod}' method.`);\n },\n 'add-to-cache-list-unexpected-type': ({ entry }) => {\n return (`An unexpected entry was passed to ` +\n `'workbox-precaching.PrecacheController.addToCacheList()' The entry ` +\n `'${JSON.stringify(entry)}' isn't supported. You must supply an array of ` +\n `strings with one or more characters, objects with a url property or ` +\n `Request objects.`);\n },\n 'add-to-cache-list-conflicting-entries': ({ firstEntry, secondEntry }) => {\n if (!firstEntry || !secondEntry) {\n throw new Error(`Unexpected input to ` + `'add-to-cache-list-duplicate-entries' error.`);\n }\n return (`Two of the entries passed to ` +\n `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` +\n `${firstEntry} but different revision details. Workbox is ` +\n `unable to cache and version the asset correctly. Please remove one ` +\n `of the entries.`);\n },\n 'plugin-error-request-will-fetch': ({ thrownErrorMessage }) => {\n if (!thrownErrorMessage) {\n throw new Error(`Unexpected input to ` + `'plugin-error-request-will-fetch', error.`);\n }\n return (`An error was thrown by a plugins 'requestWillFetch()' method. ` +\n `The thrown error message was: '${thrownErrorMessage}'.`);\n },\n 'invalid-cache-name': ({ cacheNameId, value }) => {\n if (!cacheNameId) {\n throw new Error(`Expected a 'cacheNameId' for error 'invalid-cache-name'`);\n }\n return (`You must provide a name containing at least one character for ` +\n `setCacheDetails({${cacheNameId}: '...'}). Received a value of ` +\n `'${JSON.stringify(value)}'`);\n },\n 'unregister-route-but-not-found-with-method': ({ method }) => {\n if (!method) {\n throw new Error(`Unexpected input to ` +\n `'unregister-route-but-not-found-with-method' error.`);\n }\n return (`The route you're trying to unregister was not previously ` +\n `registered for the method type '${method}'.`);\n },\n 'unregister-route-route-not-registered': () => {\n return (`The route you're trying to unregister was not previously ` +\n `registered.`);\n },\n 'queue-replay-failed': ({ name }) => {\n return `Replaying the background sync queue '${name}' failed.`;\n },\n 'duplicate-queue-name': ({ name }) => {\n return (`The Queue name '${name}' is already being used. ` +\n `All instances of backgroundSync.Queue must be given unique names.`);\n },\n 'expired-test-without-max-age': ({ methodName, paramName }) => {\n return (`The '${methodName}()' method can only be used when the ` +\n `'${paramName}' is used in the constructor.`);\n },\n 'unsupported-route-type': ({ moduleName, className, funcName, paramName }) => {\n return (`The supplied '${paramName}' parameter was an unsupported type. ` +\n `Please check the docs for ${moduleName}.${className}.${funcName} for ` +\n `valid input types.`);\n },\n 'not-array-of-class': ({ value, expectedClass, moduleName, className, funcName, paramName, }) => {\n return (`The supplied '${paramName}' parameter must be an array of ` +\n `'${expectedClass}' objects. Received '${JSON.stringify(value)},'. ` +\n `Please check the call to ${moduleName}.${className}.${funcName}() ` +\n `to fix the issue.`);\n },\n 'max-entries-or-age-required': ({ moduleName, className, funcName }) => {\n return (`You must define either config.maxEntries or config.maxAgeSeconds` +\n `in ${moduleName}.${className}.${funcName}`);\n },\n 'statuses-or-headers-required': ({ moduleName, className, funcName }) => {\n return (`You must define either config.statuses or config.headers` +\n `in ${moduleName}.${className}.${funcName}`);\n },\n 'invalid-string': ({ moduleName, funcName, paramName }) => {\n if (!paramName || !moduleName || !funcName) {\n throw new Error(`Unexpected input to 'invalid-string' error.`);\n }\n return (`When using strings, the '${paramName}' parameter must start with ` +\n `'http' (for cross-origin matches) or '/' (for same-origin matches). ` +\n `Please see the docs for ${moduleName}.${funcName}() for ` +\n `more info.`);\n },\n 'channel-name-required': () => {\n return (`You must provide a channelName to construct a ` +\n `BroadcastCacheUpdate instance.`);\n },\n 'invalid-responses-are-same-args': () => {\n return (`The arguments passed into responsesAreSame() appear to be ` +\n `invalid. Please ensure valid Responses are used.`);\n },\n 'expire-custom-caches-only': () => {\n return (`You must provide a 'cacheName' property when using the ` +\n `expiration plugin with a runtime caching strategy.`);\n },\n 'unit-must-be-bytes': ({ normalizedRangeHeader }) => {\n if (!normalizedRangeHeader) {\n throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`);\n }\n return (`The 'unit' portion of the Range header must be set to 'bytes'. ` +\n `The Range header provided was \"${normalizedRangeHeader}\"`);\n },\n 'single-range-only': ({ normalizedRangeHeader }) => {\n if (!normalizedRangeHeader) {\n throw new Error(`Unexpected input to 'single-range-only' error.`);\n }\n return (`Multiple ranges are not supported. Please use a single start ` +\n `value, and optional end value. The Range header provided was ` +\n `\"${normalizedRangeHeader}\"`);\n },\n 'invalid-range-values': ({ normalizedRangeHeader }) => {\n if (!normalizedRangeHeader) {\n throw new Error(`Unexpected input to 'invalid-range-values' error.`);\n }\n return (`The Range header is missing both start and end values. At least ` +\n `one of those values is needed. The Range header provided was ` +\n `\"${normalizedRangeHeader}\"`);\n },\n 'no-range-header': () => {\n return `No Range header was found in the Request provided.`;\n },\n 'range-not-satisfiable': ({ size, start, end }) => {\n return (`The start (${start}) and end (${end}) values in the Range are ` +\n `not satisfiable by the cached response, which is ${size} bytes.`);\n },\n 'attempt-to-cache-non-get-request': ({ url, method }) => {\n return (`Unable to cache '${url}' because it is a '${method}' request and ` +\n `only 'GET' requests can be cached.`);\n },\n 'cache-put-with-no-response': ({ url }) => {\n return (`There was an attempt to cache '${url}' but the response was not ` +\n `defined.`);\n },\n 'no-response': ({ url, error }) => {\n let message = `The strategy could not generate a response for '${url}'.`;\n if (error) {\n message += ` The underlying error is ${error}.`;\n }\n return message;\n },\n 'bad-precaching-response': ({ url, status }) => {\n return (`The precaching request for '${url}' failed` +\n (status ? ` with an HTTP status of ${status}.` : `.`));\n },\n 'non-precached-url': ({ url }) => {\n return (`createHandlerBoundToURL('${url}') was called, but that URL is ` +\n `not precached. Please pass in a URL that is precached instead.`);\n },\n 'add-to-cache-list-conflicting-integrities': ({ url }) => {\n return (`Two of the entries passed to ` +\n `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` +\n `${url} with different integrity values. Please remove one of them.`);\n },\n 'missing-precache-entry': ({ cacheName, url }) => {\n return `Unable to find a precached response in ${cacheName} for ${url}.`;\n },\n 'cross-origin-copy-response': ({ origin }) => {\n return (`workbox-core.copyResponse() can only be used with same-origin ` +\n `responses. It was passed a response with origin ${origin}.`);\n },\n 'opaque-streams-source': ({ type }) => {\n const message = `One of the workbox-streams sources resulted in an ` +\n `'${type}' response.`;\n if (type === 'opaqueredirect') {\n return (`${message} Please do not use a navigation request that results ` +\n `in a redirect as a source.`);\n }\n return `${message} Please ensure your sources are CORS-enabled.`;\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messages } from './messages.js';\nimport '../../_version.js';\nconst fallback = (code, ...args) => {\n let msg = code;\n if (args.length > 0) {\n msg += ` :: ${JSON.stringify(args)}`;\n }\n return msg;\n};\nconst generatorFunction = (code, details = {}) => {\n const message = messages[code];\n if (!message) {\n throw new Error(`Unable to find message for code '${code}'.`);\n }\n return message(details);\n};\nexport const messageGenerator = process.env.NODE_ENV === 'production' ? fallback : generatorFunction;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messageGenerator } from '../models/messages/messageGenerator.js';\nimport '../_version.js';\n/**\n * Workbox errors should be thrown with this class.\n * This allows use to ensure the type easily in tests,\n * helps developers identify errors from workbox\n * easily and allows use to optimise error\n * messages correctly.\n *\n * @private\n */\nclass WorkboxError extends Error {\n /**\n *\n * @param {string} errorCode The error code that\n * identifies this particular error.\n * @param {Object=} details Any relevant arguments\n * that will help developers identify issues should\n * be added as a key on the context object.\n */\n constructor(errorCode, details) {\n const message = messageGenerator(errorCode, details);\n super(message);\n this.name = errorCode;\n this.details = details;\n }\n}\nexport { WorkboxError };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n// Callbacks to be executed whenever there's a quota error.\n// Can't change Function type right now.\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst quotaErrorCallbacks = new Set();\nexport { quotaErrorCallbacks };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst _cacheNameDetails = {\n googleAnalytics: 'googleAnalytics',\n precache: 'precache-v2',\n prefix: 'workbox',\n runtime: 'runtime',\n suffix: typeof registration !== 'undefined' ? registration.scope : '',\n};\nconst _createCacheName = (cacheName) => {\n return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix]\n .filter((value) => value && value.length > 0)\n .join('-');\n};\nconst eachCacheNameDetail = (fn) => {\n for (const key of Object.keys(_cacheNameDetails)) {\n fn(key);\n }\n};\nexport const cacheNames = {\n updateDetails: (details) => {\n eachCacheNameDetail((key) => {\n if (typeof details[key] === 'string') {\n _cacheNameDetails[key] = details[key];\n }\n });\n },\n getGoogleAnalyticsName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);\n },\n getPrecacheName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.precache);\n },\n getPrefix: () => {\n return _cacheNameDetails.prefix;\n },\n getRuntimeName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.runtime);\n },\n getSuffix: () => {\n return _cacheNameDetails.suffix;\n },\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nlet supportStatus;\n/**\n * A utility function that determines whether the current browser supports\n * constructing a new `Response` from a `response.body` stream.\n *\n * @return {boolean} `true`, if the current browser can successfully\n * construct a `Response` from a `response.body` stream, `false` otherwise.\n *\n * @private\n */\nfunction canConstructResponseFromBodyStream() {\n if (supportStatus === undefined) {\n const testResponse = new Response('');\n if ('body' in testResponse) {\n try {\n new Response(testResponse.body);\n supportStatus = true;\n }\n catch (error) {\n supportStatus = false;\n }\n }\n supportStatus = false;\n }\n return supportStatus;\n}\nexport { canConstructResponseFromBodyStream };\n","import _typeof from \"./typeof.js\";\nexport default function _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n };\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _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 function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nexport default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function F() {};\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","/*\n Copyright 2020 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nfunction stripParams(fullURL, ignoreParams) {\n const strippedURL = new URL(fullURL);\n for (const param of ignoreParams) {\n strippedURL.searchParams.delete(param);\n }\n return strippedURL.href;\n}\n/**\n * Matches an item in the cache, ignoring specific URL params. This is similar\n * to the `ignoreSearch` option, but it allows you to ignore just specific\n * params (while continuing to match on the others).\n *\n * @private\n * @param {Cache} cache\n * @param {Request} request\n * @param {Object} matchOptions\n * @param {Array} ignoreParams\n * @return {Promise}\n */\nasync function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) {\n const strippedRequestURL = stripParams(request.url, ignoreParams);\n // If the request doesn't include any ignored params, match as normal.\n if (request.url === strippedRequestURL) {\n return cache.match(request, matchOptions);\n }\n // Otherwise, match by comparing keys\n const keysOptions = Object.assign(Object.assign({}, matchOptions), { ignoreSearch: true });\n const cacheKeys = await cache.keys(request, keysOptions);\n for (const cacheKey of cacheKeys) {\n const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams);\n if (strippedRequestURL === strippedCacheKeyURL) {\n return cache.match(cacheKey, matchOptions);\n }\n }\n return;\n}\nexport { cacheMatchIgnoreParams };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A helper function that prevents a promise from being flagged as unused.\n *\n * @private\n **/\nexport function dontWaitFor(promise) {\n // Effective no-op.\n void promise.then(() => { });\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from '../_private/logger.js';\nimport { quotaErrorCallbacks } from '../models/quotaErrorCallbacks.js';\nimport '../_version.js';\n/**\n * Runs all of the callback functions, one at a time sequentially, in the order\n * in which they were registered.\n *\n * @memberof workbox-core\n * @private\n */\nasync function executeQuotaErrorCallbacks() {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`About to run ${quotaErrorCallbacks.size} ` +\n `callbacks to clean up caches.`);\n }\n for (const callback of quotaErrorCallbacks) {\n await callback();\n if (process.env.NODE_ENV !== 'production') {\n logger.log(callback, 'is complete.');\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Finished running callbacks.');\n }\n}\nexport { executeQuotaErrorCallbacks };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst getFriendlyURL = (url) => {\n const urlObj = new URL(String(url), location.href);\n // See https://github.com/GoogleChrome/workbox/issues/2323\n // We want to include everything, except for the origin if it's same-origin.\n return urlObj.href.replace(new RegExp(`^${location.origin}`), '');\n};\nexport { getFriendlyURL };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns a promise that resolves and the passed number of milliseconds.\n * This utility is an async/await-friendly version of `setTimeout`.\n *\n * @param {number} ms\n * @return {Promise}\n * @private\n */\nexport function timeout(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n","/*\n Copyright 2020 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A utility method that makes it easier to use `event.waitUntil` with\n * async functions and return the result.\n *\n * @param {ExtendableEvent} event\n * @param {Function} asyncFn\n * @return {Function}\n * @private\n */\nfunction waitUntil(event, asyncFn) {\n const returnPromise = asyncFn();\n event.waitUntil(returnPromise);\n return returnPromise;\n}\nexport { waitUntil };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { canConstructResponseFromBodyStream } from './_private/canConstructResponseFromBodyStream.js';\nimport { WorkboxError } from './_private/WorkboxError.js';\nimport './_version.js';\n/**\n * Allows developers to copy a response and modify its `headers`, `status`,\n * or `statusText` values (the values settable via a\n * [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax}\n * object in the constructor).\n * To modify these values, pass a function as the second argument. That\n * function will be invoked with a single object with the response properties\n * `{headers, status, statusText}`. The return value of this function will\n * be used as the `ResponseInit` for the new `Response`. To change the values\n * either modify the passed parameter(s) and return it, or return a totally\n * new object.\n *\n * This method is intentionally limited to same-origin responses, regardless of\n * whether CORS was used or not.\n *\n * @param {Response} response\n * @param {Function} modifier\n * @memberof workbox-core\n */\nasync function copyResponse(response, modifier) {\n let origin = null;\n // If response.url isn't set, assume it's cross-origin and keep origin null.\n if (response.url) {\n const responseURL = new URL(response.url);\n origin = responseURL.origin;\n }\n if (origin !== self.location.origin) {\n throw new WorkboxError('cross-origin-copy-response', { origin });\n }\n const clonedResponse = response.clone();\n // Create a fresh `ResponseInit` object by cloning the headers.\n const responseInit = {\n headers: new Headers(clonedResponse.headers),\n status: clonedResponse.status,\n statusText: clonedResponse.statusText,\n };\n // Apply any user modifications.\n const modifiedResponseInit = modifier ? modifier(responseInit) : responseInit;\n // Create the new response from the body stream and `ResponseInit`\n // modifications. Note: not all browsers support the Response.body stream,\n // so fall back to reading the entire body into memory as a blob.\n const body = canConstructResponseFromBodyStream()\n ? clonedResponse.body\n : await clonedResponse.blob();\n return new Response(body, modifiedResponseInit);\n}\nexport { copyResponse };\n","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nexport default function _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise\n .then((value) => {\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) {\n cursorRequestMap.set(value, request);\n }\n // Catching to avoid \"Uncaught Promise exceptions\"\n })\n .catch(() => { });\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') {\n return target.objectStoreNames || transactionStoreNamesMap.get(target);\n }\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction &&\n !('objectStoreNames' in IDBTransaction.prototype)) {\n return function (storeNames, ...args) {\n const tx = func.call(unwrap(this), storeNames, ...args);\n transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n return wrap(tx);\n };\n }\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(cursorRequestMap.get(this));\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n","import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n });\n }\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event.newVersion, event));\n }\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking) {\n db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));\n }\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event));\n }\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { openDB, deleteDB } from 'idb';\nimport '../_version.js';\nconst DB_NAME = 'workbox-expiration';\nconst CACHE_OBJECT_STORE = 'cache-entries';\nconst normalizeURL = (unNormalizedUrl) => {\n const url = new URL(unNormalizedUrl, location.href);\n url.hash = '';\n return url.href;\n};\n/**\n * Returns the timestamp model.\n *\n * @private\n */\nclass CacheTimestampsModel {\n /**\n *\n * @param {string} cacheName\n *\n * @private\n */\n constructor(cacheName) {\n this._db = null;\n this._cacheName = cacheName;\n }\n /**\n * Performs an upgrade of indexedDB.\n *\n * @param {IDBPDatabase} db\n *\n * @private\n */\n _upgradeDb(db) {\n // TODO(philipwalton): EdgeHTML doesn't support arrays as a keyPath, so we\n // have to use the `id` keyPath here and create our own values (a\n // concatenation of `url + cacheName`) instead of simply using\n // `keyPath: ['url', 'cacheName']`, which is supported in other browsers.\n const objStore = db.createObjectStore(CACHE_OBJECT_STORE, { keyPath: 'id' });\n // TODO(philipwalton): once we don't have to support EdgeHTML, we can\n // create a single index with the keyPath `['cacheName', 'timestamp']`\n // instead of doing both these indexes.\n objStore.createIndex('cacheName', 'cacheName', { unique: false });\n objStore.createIndex('timestamp', 'timestamp', { unique: false });\n }\n /**\n * Performs an upgrade of indexedDB and deletes deprecated DBs.\n *\n * @param {IDBPDatabase} db\n *\n * @private\n */\n _upgradeDbAndDeleteOldDbs(db) {\n this._upgradeDb(db);\n if (this._cacheName) {\n void deleteDB(this._cacheName);\n }\n }\n /**\n * @param {string} url\n * @param {number} timestamp\n *\n * @private\n */\n async setTimestamp(url, timestamp) {\n url = normalizeURL(url);\n const entry = {\n url,\n timestamp,\n cacheName: this._cacheName,\n // Creating an ID from the URL and cache name won't be necessary once\n // Edge switches to Chromium and all browsers we support work with\n // array keyPaths.\n id: this._getId(url),\n };\n const db = await this.getDb();\n const tx = db.transaction(CACHE_OBJECT_STORE, 'readwrite', {\n durability: 'relaxed',\n });\n await tx.store.put(entry);\n await tx.done;\n }\n /**\n * Returns the timestamp stored for a given URL.\n *\n * @param {string} url\n * @return {number | undefined}\n *\n * @private\n */\n async getTimestamp(url) {\n const db = await this.getDb();\n const entry = await db.get(CACHE_OBJECT_STORE, this._getId(url));\n return entry === null || entry === void 0 ? void 0 : entry.timestamp;\n }\n /**\n * Iterates through all the entries in the object store (from newest to\n * oldest) and removes entries once either `maxCount` is reached or the\n * entry's timestamp is less than `minTimestamp`.\n *\n * @param {number} minTimestamp\n * @param {number} maxCount\n * @return {Array}\n *\n * @private\n */\n async expireEntries(minTimestamp, maxCount) {\n const db = await this.getDb();\n let cursor = await db\n .transaction(CACHE_OBJECT_STORE)\n .store.index('timestamp')\n .openCursor(null, 'prev');\n const entriesToDelete = [];\n let entriesNotDeletedCount = 0;\n while (cursor) {\n const result = cursor.value;\n // TODO(philipwalton): once we can use a multi-key index, we\n // won't have to check `cacheName` here.\n if (result.cacheName === this._cacheName) {\n // Delete an entry if it's older than the max age or\n // if we already have the max number allowed.\n if ((minTimestamp && result.timestamp < minTimestamp) ||\n (maxCount && entriesNotDeletedCount >= maxCount)) {\n // TODO(philipwalton): we should be able to delete the\n // entry right here, but doing so causes an iteration\n // bug in Safari stable (fixed in TP). Instead we can\n // store the keys of the entries to delete, and then\n // delete the separate transactions.\n // https://github.com/GoogleChrome/workbox/issues/1978\n // cursor.delete();\n // We only need to return the URL, not the whole entry.\n entriesToDelete.push(cursor.value);\n }\n else {\n entriesNotDeletedCount++;\n }\n }\n cursor = await cursor.continue();\n }\n // TODO(philipwalton): once the Safari bug in the following issue is fixed,\n // we should be able to remove this loop and do the entry deletion in the\n // cursor loop above:\n // https://github.com/GoogleChrome/workbox/issues/1978\n const urlsDeleted = [];\n for (const entry of entriesToDelete) {\n await db.delete(CACHE_OBJECT_STORE, entry.id);\n urlsDeleted.push(entry.url);\n }\n return urlsDeleted;\n }\n /**\n * Takes a URL and returns an ID that will be unique in the object store.\n *\n * @param {string} url\n * @return {string}\n *\n * @private\n */\n _getId(url) {\n // Creating an ID from the URL and cache name won't be necessary once\n // Edge switches to Chromium and all browsers we support work with\n // array keyPaths.\n return this._cacheName + '|' + normalizeURL(url);\n }\n /**\n * Returns an open connection to the database.\n *\n * @private\n */\n async getDb() {\n if (!this._db) {\n this._db = await openDB(DB_NAME, 1, {\n upgrade: this._upgradeDbAndDeleteOldDbs.bind(this),\n });\n }\n return this._db;\n }\n}\nexport { CacheTimestampsModel };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { CacheTimestampsModel } from './models/CacheTimestampsModel.js';\nimport './_version.js';\n/**\n * The `CacheExpiration` class allows you define an expiration and / or\n * limit on the number of responses stored in a\n * [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache).\n *\n * @memberof workbox-expiration\n */\nclass CacheExpiration {\n /**\n * To construct a new CacheExpiration instance you must provide at least\n * one of the `config` properties.\n *\n * @param {string} cacheName Name of the cache to apply restrictions to.\n * @param {Object} config\n * @param {number} [config.maxEntries] The maximum number of entries to cache.\n * Entries used the least will be removed as the maximum is reached.\n * @param {number} [config.maxAgeSeconds] The maximum age of an entry before\n * it's treated as stale and removed.\n * @param {Object} [config.matchOptions] The [`CacheQueryOptions`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete#Parameters)\n * that will be used when calling `delete()` on the cache.\n */\n constructor(cacheName, config = {}) {\n this._isRunning = false;\n this._rerunRequested = false;\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'cacheName',\n });\n if (!(config.maxEntries || config.maxAgeSeconds)) {\n throw new WorkboxError('max-entries-or-age-required', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n });\n }\n if (config.maxEntries) {\n assert.isType(config.maxEntries, 'number', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'config.maxEntries',\n });\n }\n if (config.maxAgeSeconds) {\n assert.isType(config.maxAgeSeconds, 'number', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'config.maxAgeSeconds',\n });\n }\n }\n this._maxEntries = config.maxEntries;\n this._maxAgeSeconds = config.maxAgeSeconds;\n this._matchOptions = config.matchOptions;\n this._cacheName = cacheName;\n this._timestampModel = new CacheTimestampsModel(cacheName);\n }\n /**\n * Expires entries for the given cache and given criteria.\n */\n async expireEntries() {\n if (this._isRunning) {\n this._rerunRequested = true;\n return;\n }\n this._isRunning = true;\n const minTimestamp = this._maxAgeSeconds\n ? Date.now() - this._maxAgeSeconds * 1000\n : 0;\n const urlsExpired = await this._timestampModel.expireEntries(minTimestamp, this._maxEntries);\n // Delete URLs from the cache\n const cache = await self.caches.open(this._cacheName);\n for (const url of urlsExpired) {\n await cache.delete(url, this._matchOptions);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (urlsExpired.length > 0) {\n logger.groupCollapsed(`Expired ${urlsExpired.length} ` +\n `${urlsExpired.length === 1 ? 'entry' : 'entries'} and removed ` +\n `${urlsExpired.length === 1 ? 'it' : 'them'} from the ` +\n `'${this._cacheName}' cache.`);\n logger.log(`Expired the following ${urlsExpired.length === 1 ? 'URL' : 'URLs'}:`);\n urlsExpired.forEach((url) => logger.log(` ${url}`));\n logger.groupEnd();\n }\n else {\n logger.debug(`Cache expiration ran and found no entries to remove.`);\n }\n }\n this._isRunning = false;\n if (this._rerunRequested) {\n this._rerunRequested = false;\n dontWaitFor(this.expireEntries());\n }\n }\n /**\n * Update the timestamp for the given URL. This ensures the when\n * removing entries based on maximum entries, most recently used\n * is accurate or when expiring, the timestamp is up-to-date.\n *\n * @param {string} url\n */\n async updateTimestamp(url) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(url, 'string', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'updateTimestamp',\n paramName: 'url',\n });\n }\n await this._timestampModel.setTimestamp(url, Date.now());\n }\n /**\n * Can be used to check if a URL has expired or not before it's used.\n *\n * This requires a look up from IndexedDB, so can be slow.\n *\n * Note: This method will not remove the cached entry, call\n * `expireEntries()` to remove indexedDB and Cache entries.\n *\n * @param {string} url\n * @return {boolean}\n */\n async isURLExpired(url) {\n if (!this._maxAgeSeconds) {\n if (process.env.NODE_ENV !== 'production') {\n throw new WorkboxError(`expired-test-without-max-age`, {\n methodName: 'isURLExpired',\n paramName: 'maxAgeSeconds',\n });\n }\n return false;\n }\n else {\n const timestamp = await this._timestampModel.getTimestamp(url);\n const expireOlderThan = Date.now() - this._maxAgeSeconds * 1000;\n return timestamp !== undefined ? timestamp < expireOlderThan : true;\n }\n }\n /**\n * Removes the IndexedDB object store used to keep track of cache expiration\n * metadata.\n */\n async delete() {\n // Make sure we don't attempt another rerun if we're called in the middle of\n // a cache expiration.\n this._rerunRequested = false;\n await this._timestampModel.expireEntries(Infinity); // Expires all.\n }\n}\nexport { CacheExpiration };\n","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { registerQuotaErrorCallback } from 'workbox-core/registerQuotaErrorCallback.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { CacheExpiration } from './CacheExpiration.js';\nimport './_version.js';\n/**\n * This plugin can be used in a `workbox-strategy` to regularly enforce a\n * limit on the age and / or the number of cached requests.\n *\n * It can only be used with `workbox-strategy` instances that have a\n * [custom `cacheName` property set](/web/tools/workbox/guides/configure-workbox#custom_cache_names_in_strategies).\n * In other words, it can't be used to expire entries in strategy that uses the\n * default runtime cache name.\n *\n * Whenever a cached response is used or updated, this plugin will look\n * at the associated cache and remove any old or extra responses.\n *\n * When using `maxAgeSeconds`, responses may be used *once* after expiring\n * because the expiration clean up will not have occurred until *after* the\n * cached response has been used. If the response has a \"Date\" header, then\n * a light weight expiration check is performed and the response will not be\n * used immediately.\n *\n * When using `maxEntries`, the entry least-recently requested will be removed\n * from the cache first.\n *\n * @memberof workbox-expiration\n */\nclass ExpirationPlugin {\n /**\n * @param {ExpirationPluginOptions} config\n * @param {number} [config.maxEntries] The maximum number of entries to cache.\n * Entries used the least will be removed as the maximum is reached.\n * @param {number} [config.maxAgeSeconds] The maximum age of an entry before\n * it's treated as stale and removed.\n * @param {Object} [config.matchOptions] The [`CacheQueryOptions`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete#Parameters)\n * that will be used when calling `delete()` on the cache.\n * @param {boolean} [config.purgeOnQuotaError] Whether to opt this cache in to\n * automatic deletion if the available storage quota has been exceeded.\n */\n constructor(config = {}) {\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox-strategies` handlers when a `Response` is about to be returned\n * from a [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) to\n * the handler. It allows the `Response` to be inspected for freshness and\n * prevents it from being used if the `Response`'s `Date` header value is\n * older than the configured `maxAgeSeconds`.\n *\n * @param {Object} options\n * @param {string} options.cacheName Name of the cache the response is in.\n * @param {Response} options.cachedResponse The `Response` object that's been\n * read from a cache and whose freshness should be checked.\n * @return {Response} Either the `cachedResponse`, if it's\n * fresh, or `null` if the `Response` is older than `maxAgeSeconds`.\n *\n * @private\n */\n this.cachedResponseWillBeUsed = async ({ event, request, cacheName, cachedResponse, }) => {\n if (!cachedResponse) {\n return null;\n }\n const isFresh = this._isResponseDateFresh(cachedResponse);\n // Expire entries to ensure that even if the expiration date has\n // expired, it'll only be used once.\n const cacheExpiration = this._getCacheExpiration(cacheName);\n dontWaitFor(cacheExpiration.expireEntries());\n // Update the metadata for the request URL to the current timestamp,\n // but don't `await` it as we don't want to block the response.\n const updateTimestampDone = cacheExpiration.updateTimestamp(request.url);\n if (event) {\n try {\n event.waitUntil(updateTimestampDone);\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n // The event may not be a fetch event; only log the URL if it is.\n if ('request' in event) {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache entry for ` +\n `'${getFriendlyURL(event.request.url)}'.`);\n }\n }\n }\n }\n return isFresh ? cachedResponse : null;\n };\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox-strategies` handlers when an entry is added to a cache.\n *\n * @param {Object} options\n * @param {string} options.cacheName Name of the cache that was updated.\n * @param {string} options.request The Request for the cached entry.\n *\n * @private\n */\n this.cacheDidUpdate = async ({ cacheName, request, }) => {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'cacheName',\n });\n assert.isInstance(request, Request, {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'request',\n });\n }\n const cacheExpiration = this._getCacheExpiration(cacheName);\n await cacheExpiration.updateTimestamp(request.url);\n await cacheExpiration.expireEntries();\n };\n if (process.env.NODE_ENV !== 'production') {\n if (!(config.maxEntries || config.maxAgeSeconds)) {\n throw new WorkboxError('max-entries-or-age-required', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n });\n }\n if (config.maxEntries) {\n assert.isType(config.maxEntries, 'number', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n paramName: 'config.maxEntries',\n });\n }\n if (config.maxAgeSeconds) {\n assert.isType(config.maxAgeSeconds, 'number', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n paramName: 'config.maxAgeSeconds',\n });\n }\n }\n this._config = config;\n this._maxAgeSeconds = config.maxAgeSeconds;\n this._cacheExpirations = new Map();\n if (config.purgeOnQuotaError) {\n registerQuotaErrorCallback(() => this.deleteCacheAndMetadata());\n }\n }\n /**\n * A simple helper method to return a CacheExpiration instance for a given\n * cache name.\n *\n * @param {string} cacheName\n * @return {CacheExpiration}\n *\n * @private\n */\n _getCacheExpiration(cacheName) {\n if (cacheName === cacheNames.getRuntimeName()) {\n throw new WorkboxError('expire-custom-caches-only');\n }\n let cacheExpiration = this._cacheExpirations.get(cacheName);\n if (!cacheExpiration) {\n cacheExpiration = new CacheExpiration(cacheName, this._config);\n this._cacheExpirations.set(cacheName, cacheExpiration);\n }\n return cacheExpiration;\n }\n /**\n * @param {Response} cachedResponse\n * @return {boolean}\n *\n * @private\n */\n _isResponseDateFresh(cachedResponse) {\n if (!this._maxAgeSeconds) {\n // We aren't expiring by age, so return true, it's fresh\n return true;\n }\n // Check if the 'date' header will suffice a quick expiration check.\n // See https://github.com/GoogleChromeLabs/sw-toolbox/issues/164 for\n // discussion.\n const dateHeaderTimestamp = this._getDateHeaderTimestamp(cachedResponse);\n if (dateHeaderTimestamp === null) {\n // Unable to parse date, so assume it's fresh.\n return true;\n }\n // If we have a valid headerTime, then our response is fresh iff the\n // headerTime plus maxAgeSeconds is greater than the current time.\n const now = Date.now();\n return dateHeaderTimestamp >= now - this._maxAgeSeconds * 1000;\n }\n /**\n * This method will extract the data header and parse it into a useful\n * value.\n *\n * @param {Response} cachedResponse\n * @return {number|null}\n *\n * @private\n */\n _getDateHeaderTimestamp(cachedResponse) {\n if (!cachedResponse.headers.has('date')) {\n return null;\n }\n const dateHeader = cachedResponse.headers.get('date');\n const parsedDate = new Date(dateHeader);\n const headerTime = parsedDate.getTime();\n // If the Date header was invalid for some reason, parsedDate.getTime()\n // will return NaN.\n if (isNaN(headerTime)) {\n return null;\n }\n return headerTime;\n }\n /**\n * This is a helper method that performs two operations:\n *\n * - Deletes *all* the underlying Cache instances associated with this plugin\n * instance, by calling caches.delete() on your behalf.\n * - Deletes the metadata from IndexedDB used to keep track of expiration\n * details for each Cache instance.\n *\n * When using cache expiration, calling this method is preferable to calling\n * `caches.delete()` directly, since this will ensure that the IndexedDB\n * metadata is also cleanly removed and open IndexedDB instances are deleted.\n *\n * Note that if you're *not* using cache expiration for a given cache, calling\n * `caches.delete()` and passing in the cache's name should be sufficient.\n * There is no Workbox-specific method needed for cleanup in that case.\n */\n async deleteCacheAndMetadata() {\n // Do this one at a time instead of all at once via `Promise.all()` to\n // reduce the chance of inconsistency if a promise rejects.\n for (const [cacheName, cacheExpiration] of this._cacheExpirations) {\n await self.caches.delete(cacheName);\n await cacheExpiration.delete();\n }\n // Reset this._cacheExpirations to its initial state.\n this._cacheExpirations = new Map();\n }\n}\nexport { ExpirationPlugin };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from './_private/logger.js';\nimport { assert } from './_private/assert.js';\nimport { quotaErrorCallbacks } from './models/quotaErrorCallbacks.js';\nimport './_version.js';\n/**\n * Adds a function to the set of quotaErrorCallbacks that will be executed if\n * there's a quota error.\n *\n * @param {Function} callback\n * @memberof workbox-core\n */\n// Can't change Function type\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction registerQuotaErrorCallback(callback) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(callback, 'function', {\n moduleName: 'workbox-core',\n funcName: 'register',\n paramName: 'callback',\n });\n }\n quotaErrorCallbacks.add(callback);\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered a callback to respond to quota errors.', callback);\n }\n}\nexport { registerQuotaErrorCallback };\n","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport '../_version.js';\n// Name of the search parameter used to store revision info.\nconst REVISION_SEARCH_PARAM = '__WB_REVISION__';\n/**\n * Converts a manifest entry into a versioned URL suitable for precaching.\n *\n * @param {Object|string} entry\n * @return {string} A URL with versioning info.\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function createCacheKey(entry) {\n if (!entry) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', { entry });\n }\n // If a precache manifest entry is a string, it's assumed to be a versioned\n // URL, like '/app.abcd1234.js'. Return as-is.\n if (typeof entry === 'string') {\n const urlObject = new URL(entry, location.href);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n const { revision, url } = entry;\n if (!url) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', { entry });\n }\n // If there's just a URL and no revision, then it's also assumed to be a\n // versioned URL.\n if (!revision) {\n const urlObject = new URL(url, location.href);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n // Otherwise, construct a properly versioned URL using the custom Workbox\n // search parameter along with the revision info.\n const cacheKeyURL = new URL(url, location.href);\n const originalURL = new URL(url, location.href);\n cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM, revision);\n return {\n cacheKey: cacheKeyURL.href,\n url: originalURL.href,\n };\n}\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A plugin, designed to be used with PrecacheController, to determine the\n * of assets that were updated (or not updated) during the install event.\n *\n * @private\n */\nclass PrecacheInstallReportPlugin {\n constructor() {\n this.updatedURLs = [];\n this.notUpdatedURLs = [];\n this.handlerWillStart = async ({ request, state, }) => {\n // TODO: `state` should never be undefined...\n if (state) {\n state.originalRequest = request;\n }\n };\n this.cachedResponseWillBeUsed = async ({ event, state, cachedResponse, }) => {\n if (event.type === 'install') {\n if (state &&\n state.originalRequest &&\n state.originalRequest instanceof Request) {\n // TODO: `state` should never be undefined...\n const url = state.originalRequest.url;\n if (cachedResponse) {\n this.notUpdatedURLs.push(url);\n }\n else {\n this.updatedURLs.push(url);\n }\n }\n }\n return cachedResponse;\n };\n }\n}\nexport { PrecacheInstallReportPlugin };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A plugin, designed to be used with PrecacheController, to translate URLs into\n * the corresponding cache key, based on the current revision info.\n *\n * @private\n */\nclass PrecacheCacheKeyPlugin {\n constructor({ precacheController }) {\n this.cacheKeyWillBeUsed = async ({ request, params, }) => {\n // Params is type any, can't change right now.\n /* eslint-disable */\n const cacheKey = (params === null || params === void 0 ? void 0 : params.cacheKey) ||\n this._precacheController.getCacheKeyForURL(request.url);\n /* eslint-enable */\n return cacheKey\n ? new Request(cacheKey, { headers: request.headers })\n : request;\n };\n this._precacheController = precacheController;\n }\n}\nexport { PrecacheCacheKeyPlugin };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheMatchIgnoreParams } from 'workbox-core/_private/cacheMatchIgnoreParams.js';\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { executeQuotaErrorCallbacks } from 'workbox-core/_private/executeQuotaErrorCallbacks.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { timeout } from 'workbox-core/_private/timeout.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\nfunction toRequest(input) {\n return typeof input === 'string' ? new Request(input) : input;\n}\n/**\n * A class created every time a Strategy instance instance calls\n * {@link workbox-strategies.Strategy~handle} or\n * {@link workbox-strategies.Strategy~handleAll} that wraps all fetch and\n * cache actions around plugin callbacks and keeps track of when the strategy\n * is \"done\" (i.e. all added `event.waitUntil()` promises have resolved).\n *\n * @memberof workbox-strategies\n */\nclass StrategyHandler {\n /**\n * Creates a new instance associated with the passed strategy and event\n * that's handling the request.\n *\n * The constructor also initializes the state that will be passed to each of\n * the plugins handling this request.\n *\n * @param {workbox-strategies.Strategy} strategy\n * @param {Object} options\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params] The return value from the\n * {@link workbox-routing~matchCallback} (if applicable).\n */\n constructor(strategy, options) {\n this._cacheKeys = {};\n /**\n * The request the strategy is performing (passed to the strategy's\n * `handle()` or `handleAll()` method).\n * @name request\n * @instance\n * @type {Request}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * The event associated with this request.\n * @name event\n * @instance\n * @type {ExtendableEvent}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * A `URL` instance of `request.url` (if passed to the strategy's\n * `handle()` or `handleAll()` method).\n * Note: the `url` param will be present if the strategy was invoked\n * from a workbox `Route` object.\n * @name url\n * @instance\n * @type {URL|undefined}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * A `param` value (if passed to the strategy's\n * `handle()` or `handleAll()` method).\n * Note: the `param` param will be present if the strategy was invoked\n * from a workbox `Route` object and the\n * {@link workbox-routing~matchCallback} returned\n * a truthy value (it will be that value).\n * @name params\n * @instance\n * @type {*|undefined}\n * @memberof workbox-strategies.StrategyHandler\n */\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(options.event, ExtendableEvent, {\n moduleName: 'workbox-strategies',\n className: 'StrategyHandler',\n funcName: 'constructor',\n paramName: 'options.event',\n });\n }\n Object.assign(this, options);\n this.event = options.event;\n this._strategy = strategy;\n this._handlerDeferred = new Deferred();\n this._extendLifetimePromises = [];\n // Copy the plugins list (since it's mutable on the strategy),\n // so any mutations don't affect this handler instance.\n this._plugins = [...strategy.plugins];\n this._pluginStateMap = new Map();\n for (const plugin of this._plugins) {\n this._pluginStateMap.set(plugin, {});\n }\n this.event.waitUntil(this._handlerDeferred.promise);\n }\n /**\n * Fetches a given request (and invokes any applicable plugin callback\n * methods) using the `fetchOptions` (for non-navigation requests) and\n * `plugins` defined on the `Strategy` object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - `requestWillFetch()`\n * - `fetchDidSucceed()`\n * - `fetchDidFail()`\n *\n * @param {Request|string} input The URL or request to fetch.\n * @return {Promise}\n */\n async fetch(input) {\n const { event } = this;\n let request = toRequest(input);\n if (request.mode === 'navigate' &&\n event instanceof FetchEvent &&\n event.preloadResponse) {\n const possiblePreloadResponse = (await event.preloadResponse);\n if (possiblePreloadResponse) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Using a preloaded navigation response for ` +\n `'${getFriendlyURL(request.url)}'`);\n }\n return possiblePreloadResponse;\n }\n }\n // If there is a fetchDidFail plugin, we need to save a clone of the\n // original request before it's either modified by a requestWillFetch\n // plugin or before the original request's body is consumed via fetch().\n const originalRequest = this.hasCallback('fetchDidFail')\n ? request.clone()\n : null;\n try {\n for (const cb of this.iterateCallbacks('requestWillFetch')) {\n request = await cb({ request: request.clone(), event });\n }\n }\n catch (err) {\n if (err instanceof Error) {\n throw new WorkboxError('plugin-error-request-will-fetch', {\n thrownErrorMessage: err.message,\n });\n }\n }\n // The request can be altered by plugins with `requestWillFetch` making\n // the original request (most likely from a `fetch` event) different\n // from the Request we make. Pass both to `fetchDidFail` to aid debugging.\n const pluginFilteredRequest = request.clone();\n try {\n let fetchResponse;\n // See https://github.com/GoogleChrome/workbox/issues/1796\n fetchResponse = await fetch(request, request.mode === 'navigate' ? undefined : this._strategy.fetchOptions);\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Network request for ` +\n `'${getFriendlyURL(request.url)}' returned a response with ` +\n `status '${fetchResponse.status}'.`);\n }\n for (const callback of this.iterateCallbacks('fetchDidSucceed')) {\n fetchResponse = await callback({\n event,\n request: pluginFilteredRequest,\n response: fetchResponse,\n });\n }\n return fetchResponse;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Network request for ` +\n `'${getFriendlyURL(request.url)}' threw an error.`, error);\n }\n // `originalRequest` will only exist if a `fetchDidFail` callback\n // is being used (see above).\n if (originalRequest) {\n await this.runCallbacks('fetchDidFail', {\n error: error,\n event,\n originalRequest: originalRequest.clone(),\n request: pluginFilteredRequest.clone(),\n });\n }\n throw error;\n }\n }\n /**\n * Calls `this.fetch()` and (in the background) runs `this.cachePut()` on\n * the response generated by `this.fetch()`.\n *\n * The call to `this.cachePut()` automatically invokes `this.waitUntil()`,\n * so you do not have to manually call `waitUntil()` on the event.\n *\n * @param {Request|string} input The request or URL to fetch and cache.\n * @return {Promise}\n */\n async fetchAndCachePut(input) {\n const response = await this.fetch(input);\n const responseClone = response.clone();\n void this.waitUntil(this.cachePut(input, responseClone));\n return response;\n }\n /**\n * Matches a request from the cache (and invokes any applicable plugin\n * callback methods) using the `cacheName`, `matchOptions`, and `plugins`\n * defined on the strategy object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - cacheKeyWillByUsed()\n * - cachedResponseWillByUsed()\n *\n * @param {Request|string} key The Request or URL to use as the cache key.\n * @return {Promise} A matching response, if found.\n */\n async cacheMatch(key) {\n const request = toRequest(key);\n let cachedResponse;\n const { cacheName, matchOptions } = this._strategy;\n const effectiveRequest = await this.getCacheKey(request, 'read');\n const multiMatchOptions = Object.assign(Object.assign({}, matchOptions), { cacheName });\n cachedResponse = await caches.match(effectiveRequest, multiMatchOptions);\n if (process.env.NODE_ENV !== 'production') {\n if (cachedResponse) {\n logger.debug(`Found a cached response in '${cacheName}'.`);\n }\n else {\n logger.debug(`No cached response found in '${cacheName}'.`);\n }\n }\n for (const callback of this.iterateCallbacks('cachedResponseWillBeUsed')) {\n cachedResponse =\n (await callback({\n cacheName,\n matchOptions,\n cachedResponse,\n request: effectiveRequest,\n event: this.event,\n })) || undefined;\n }\n return cachedResponse;\n }\n /**\n * Puts a request/response pair in the cache (and invokes any applicable\n * plugin callback methods) using the `cacheName` and `plugins` defined on\n * the strategy object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - cacheKeyWillByUsed()\n * - cacheWillUpdate()\n * - cacheDidUpdate()\n *\n * @param {Request|string} key The request or URL to use as the cache key.\n * @param {Response} response The response to cache.\n * @return {Promise} `false` if a cacheWillUpdate caused the response\n * not be cached, and `true` otherwise.\n */\n async cachePut(key, response) {\n const request = toRequest(key);\n // Run in the next task to avoid blocking other cache reads.\n // https://github.com/w3c/ServiceWorker/issues/1397\n await timeout(0);\n const effectiveRequest = await this.getCacheKey(request, 'write');\n if (process.env.NODE_ENV !== 'production') {\n if (effectiveRequest.method && effectiveRequest.method !== 'GET') {\n throw new WorkboxError('attempt-to-cache-non-get-request', {\n url: getFriendlyURL(effectiveRequest.url),\n method: effectiveRequest.method,\n });\n }\n // See https://github.com/GoogleChrome/workbox/issues/2818\n const vary = response.headers.get('Vary');\n if (vary) {\n logger.debug(`The response for ${getFriendlyURL(effectiveRequest.url)} ` +\n `has a 'Vary: ${vary}' header. ` +\n `Consider setting the {ignoreVary: true} option on your strategy ` +\n `to ensure cache matching and deletion works as expected.`);\n }\n }\n if (!response) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Cannot cache non-existent response for ` +\n `'${getFriendlyURL(effectiveRequest.url)}'.`);\n }\n throw new WorkboxError('cache-put-with-no-response', {\n url: getFriendlyURL(effectiveRequest.url),\n });\n }\n const responseToCache = await this._ensureResponseSafeToCache(response);\n if (!responseToCache) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' ` +\n `will not be cached.`, responseToCache);\n }\n return false;\n }\n const { cacheName, matchOptions } = this._strategy;\n const cache = await self.caches.open(cacheName);\n const hasCacheUpdateCallback = this.hasCallback('cacheDidUpdate');\n const oldResponse = hasCacheUpdateCallback\n ? await cacheMatchIgnoreParams(\n // TODO(philipwalton): the `__WB_REVISION__` param is a precaching\n // feature. Consider into ways to only add this behavior if using\n // precaching.\n cache, effectiveRequest.clone(), ['__WB_REVISION__'], matchOptions)\n : null;\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Updating the '${cacheName}' cache with a new Response ` +\n `for ${getFriendlyURL(effectiveRequest.url)}.`);\n }\n try {\n await cache.put(effectiveRequest, hasCacheUpdateCallback ? responseToCache.clone() : responseToCache);\n }\n catch (error) {\n if (error instanceof Error) {\n // See https://developer.mozilla.org/en-US/docs/Web/API/DOMException#exception-QuotaExceededError\n if (error.name === 'QuotaExceededError') {\n await executeQuotaErrorCallbacks();\n }\n throw error;\n }\n }\n for (const callback of this.iterateCallbacks('cacheDidUpdate')) {\n await callback({\n cacheName,\n oldResponse,\n newResponse: responseToCache.clone(),\n request: effectiveRequest,\n event: this.event,\n });\n }\n return true;\n }\n /**\n * Checks the list of plugins for the `cacheKeyWillBeUsed` callback, and\n * executes any of those callbacks found in sequence. The final `Request`\n * object returned by the last plugin is treated as the cache key for cache\n * reads and/or writes. If no `cacheKeyWillBeUsed` plugin callbacks have\n * been registered, the passed request is returned unmodified\n *\n * @param {Request} request\n * @param {string} mode\n * @return {Promise}\n */\n async getCacheKey(request, mode) {\n const key = `${request.url} | ${mode}`;\n if (!this._cacheKeys[key]) {\n let effectiveRequest = request;\n for (const callback of this.iterateCallbacks('cacheKeyWillBeUsed')) {\n effectiveRequest = toRequest(await callback({\n mode,\n request: effectiveRequest,\n event: this.event,\n // params has a type any can't change right now.\n params: this.params, // eslint-disable-line\n }));\n }\n this._cacheKeys[key] = effectiveRequest;\n }\n return this._cacheKeys[key];\n }\n /**\n * Returns true if the strategy has at least one plugin with the given\n * callback.\n *\n * @param {string} name The name of the callback to check for.\n * @return {boolean}\n */\n hasCallback(name) {\n for (const plugin of this._strategy.plugins) {\n if (name in plugin) {\n return true;\n }\n }\n return false;\n }\n /**\n * Runs all plugin callbacks matching the given name, in order, passing the\n * given param object (merged ith the current plugin state) as the only\n * argument.\n *\n * Note: since this method runs all plugins, it's not suitable for cases\n * where the return value of a callback needs to be applied prior to calling\n * the next callback. See\n * {@link workbox-strategies.StrategyHandler#iterateCallbacks}\n * below for how to handle that case.\n *\n * @param {string} name The name of the callback to run within each plugin.\n * @param {Object} param The object to pass as the first (and only) param\n * when executing each callback. This object will be merged with the\n * current plugin state prior to callback execution.\n */\n async runCallbacks(name, param) {\n for (const callback of this.iterateCallbacks(name)) {\n // TODO(philipwalton): not sure why `any` is needed. It seems like\n // this should work with `as WorkboxPluginCallbackParam[C]`.\n await callback(param);\n }\n }\n /**\n * Accepts a callback and returns an iterable of matching plugin callbacks,\n * where each callback is wrapped with the current handler state (i.e. when\n * you call each callback, whatever object parameter you pass it will\n * be merged with the plugin's current state).\n *\n * @param {string} name The name fo the callback to run\n * @return {Array}\n */\n *iterateCallbacks(name) {\n for (const plugin of this._strategy.plugins) {\n if (typeof plugin[name] === 'function') {\n const state = this._pluginStateMap.get(plugin);\n const statefulCallback = (param) => {\n const statefulParam = Object.assign(Object.assign({}, param), { state });\n // TODO(philipwalton): not sure why `any` is needed. It seems like\n // this should work with `as WorkboxPluginCallbackParam[C]`.\n return plugin[name](statefulParam);\n };\n yield statefulCallback;\n }\n }\n }\n /**\n * Adds a promise to the\n * [extend lifetime promises]{@link https://w3c.github.io/ServiceWorker/#extendableevent-extend-lifetime-promises}\n * of the event event associated with the request being handled (usually a\n * `FetchEvent`).\n *\n * Note: you can await\n * {@link workbox-strategies.StrategyHandler~doneWaiting}\n * to know when all added promises have settled.\n *\n * @param {Promise} promise A promise to add to the extend lifetime promises\n * of the event that triggered the request.\n */\n waitUntil(promise) {\n this._extendLifetimePromises.push(promise);\n return promise;\n }\n /**\n * Returns a promise that resolves once all promises passed to\n * {@link workbox-strategies.StrategyHandler~waitUntil}\n * have settled.\n *\n * Note: any work done after `doneWaiting()` settles should be manually\n * passed to an event's `waitUntil()` method (not this handler's\n * `waitUntil()` method), otherwise the service worker thread my be killed\n * prior to your work completing.\n */\n async doneWaiting() {\n let promise;\n while ((promise = this._extendLifetimePromises.shift())) {\n await promise;\n }\n }\n /**\n * Stops running the strategy and immediately resolves any pending\n * `waitUntil()` promises.\n */\n destroy() {\n this._handlerDeferred.resolve(null);\n }\n /**\n * This method will call cacheWillUpdate on the available plugins (or use\n * status === 200) to determine if the Response is safe and valid to cache.\n *\n * @param {Request} options.request\n * @param {Response} options.response\n * @return {Promise}\n *\n * @private\n */\n async _ensureResponseSafeToCache(response) {\n let responseToCache = response;\n let pluginsUsed = false;\n for (const callback of this.iterateCallbacks('cacheWillUpdate')) {\n responseToCache =\n (await callback({\n request: this.request,\n response: responseToCache,\n event: this.event,\n })) || undefined;\n pluginsUsed = true;\n if (!responseToCache) {\n break;\n }\n }\n if (!pluginsUsed) {\n if (responseToCache && responseToCache.status !== 200) {\n responseToCache = undefined;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (responseToCache) {\n if (responseToCache.status !== 200) {\n if (responseToCache.status === 0) {\n logger.warn(`The response for '${this.request.url}' ` +\n `is an opaque response. The caching strategy that you're ` +\n `using will not cache opaque responses by default.`);\n }\n else {\n logger.debug(`The response for '${this.request.url}' ` +\n `returned a status code of '${response.status}' and won't ` +\n `be cached as a result.`);\n }\n }\n }\n }\n }\n return responseToCache;\n }\n}\nexport { StrategyHandler };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { StrategyHandler } from './StrategyHandler.js';\nimport './_version.js';\n/**\n * An abstract base class that all other strategy classes must extend from:\n *\n * @memberof workbox-strategies\n */\nclass Strategy {\n /**\n * Creates a new instance of the strategy and sets all documented option\n * properties as public instance properties.\n *\n * Note: if a custom strategy class extends the base Strategy class and does\n * not need more than these properties, it does not need to define its own\n * constructor.\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)\n * `fetch()` requests made by this strategy.\n * @param {Object} [options.matchOptions] The\n * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n */\n constructor(options = {}) {\n /**\n * Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n *\n * @type {string}\n */\n this.cacheName = cacheNames.getRuntimeName(options.cacheName);\n /**\n * The list\n * [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * used by this strategy.\n *\n * @type {Array}\n */\n this.plugins = options.plugins || [];\n /**\n * Values passed along to the\n * [`init`]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters}\n * of all fetch() requests made by this strategy.\n *\n * @type {Object}\n */\n this.fetchOptions = options.fetchOptions;\n /**\n * The\n * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n *\n * @type {Object}\n */\n this.matchOptions = options.matchOptions;\n }\n /**\n * Perform a request strategy and returns a `Promise` that will resolve with\n * a `Response`, invoking all relevant plugin callbacks.\n *\n * When a strategy instance is registered with a Workbox\n * {@link workbox-routing.Route}, this method is automatically\n * called when the route matches.\n *\n * Alternatively, this method can be used in a standalone `FetchEvent`\n * listener by passing it to `event.respondWith()`.\n *\n * @param {FetchEvent|Object} options A `FetchEvent` or an object with the\n * properties listed below.\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params]\n */\n handle(options) {\n const [responseDone] = this.handleAll(options);\n return responseDone;\n }\n /**\n * Similar to {@link workbox-strategies.Strategy~handle}, but\n * instead of just returning a `Promise` that resolves to a `Response` it\n * it will return an tuple of `[response, done]` promises, where the former\n * (`response`) is equivalent to what `handle()` returns, and the latter is a\n * Promise that will resolve once any promises that were added to\n * `event.waitUntil()` as part of performing the strategy have completed.\n *\n * You can await the `done` promise to ensure any extra work performed by\n * the strategy (usually caching responses) completes successfully.\n *\n * @param {FetchEvent|Object} options A `FetchEvent` or an object with the\n * properties listed below.\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params]\n * @return {Array} A tuple of [response, done]\n * promises that can be used to determine when the response resolves as\n * well as when the handler has completed all its work.\n */\n handleAll(options) {\n // Allow for flexible options to be passed.\n if (options instanceof FetchEvent) {\n options = {\n event: options,\n request: options.request,\n };\n }\n const event = options.event;\n const request = typeof options.request === 'string'\n ? new Request(options.request)\n : options.request;\n const params = 'params' in options ? options.params : undefined;\n const handler = new StrategyHandler(this, { event, request, params });\n const responseDone = this._getResponse(handler, request, event);\n const handlerDone = this._awaitComplete(responseDone, handler, request, event);\n // Return an array of promises, suitable for use with Promise.all().\n return [responseDone, handlerDone];\n }\n async _getResponse(handler, request, event) {\n await handler.runCallbacks('handlerWillStart', { event, request });\n let response = undefined;\n try {\n response = await this._handle(request, handler);\n // The \"official\" Strategy subclasses all throw this error automatically,\n // but in case a third-party Strategy doesn't, ensure that we have a\n // consistent failure when there's no response or an error response.\n if (!response || response.type === 'error') {\n throw new WorkboxError('no-response', { url: request.url });\n }\n }\n catch (error) {\n if (error instanceof Error) {\n for (const callback of handler.iterateCallbacks('handlerDidError')) {\n response = await callback({ error, event, request });\n if (response) {\n break;\n }\n }\n }\n if (!response) {\n throw error;\n }\n else if (process.env.NODE_ENV !== 'production') {\n logger.log(`While responding to '${getFriendlyURL(request.url)}', ` +\n `an ${error instanceof Error ? error.toString() : ''} error occurred. Using a fallback response provided by ` +\n `a handlerDidError plugin.`);\n }\n }\n for (const callback of handler.iterateCallbacks('handlerWillRespond')) {\n response = await callback({ event, request, response });\n }\n return response;\n }\n async _awaitComplete(responseDone, handler, request, event) {\n let response;\n let error;\n try {\n response = await responseDone;\n }\n catch (error) {\n // Ignore errors, as response errors should be caught via the `response`\n // promise above. The `done` promise will only throw for errors in\n // promises passed to `handler.waitUntil()`.\n }\n try {\n await handler.runCallbacks('handlerDidRespond', {\n event,\n request,\n response,\n });\n await handler.doneWaiting();\n }\n catch (waitUntilError) {\n if (waitUntilError instanceof Error) {\n error = waitUntilError;\n }\n }\n await handler.runCallbacks('handlerDidComplete', {\n event,\n request,\n response,\n error: error,\n });\n handler.destroy();\n if (error) {\n throw error;\n }\n }\n}\nexport { Strategy };\n/**\n * Classes extending the `Strategy` based class should implement this method,\n * and leverage the {@link workbox-strategies.StrategyHandler}\n * arg to perform all fetching and cache logic, which will ensure all relevant\n * cache, cache options, fetch options and plugins are used (per the current\n * strategy instance).\n *\n * @name _handle\n * @instance\n * @abstract\n * @function\n * @param {Request} request\n * @param {workbox-strategies.StrategyHandler} handler\n * @return {Promise}\n *\n * @memberof workbox-strategies.Strategy\n */\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { copyResponse } from 'workbox-core/copyResponse.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Strategy } from 'workbox-strategies/Strategy.js';\nimport './_version.js';\n/**\n * A {@link workbox-strategies.Strategy} implementation\n * specifically designed to work with\n * {@link workbox-precaching.PrecacheController}\n * to both cache and fetch precached assets.\n *\n * Note: an instance of this class is created automatically when creating a\n * `PrecacheController`; it's generally not necessary to create this yourself.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-precaching\n */\nclass PrecacheStrategy extends Strategy {\n /**\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array} [options.plugins] {@link https://developers.google.com/web/tools/workbox/guides/using-plugins|Plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters|init}\n * of all fetch() requests made by this strategy.\n * @param {Object} [options.matchOptions] The\n * {@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions|CacheQueryOptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to\n * get the response from the network if there's a precache miss.\n */\n constructor(options = {}) {\n options.cacheName = cacheNames.getPrecacheName(options.cacheName);\n super(options);\n this._fallbackToNetwork =\n options.fallbackToNetwork === false ? false : true;\n // Redirected responses cannot be used to satisfy a navigation request, so\n // any redirected response must be \"copied\" rather than cloned, so the new\n // response doesn't contain the `redirected` flag. See:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=669363&desc=2#c1\n this.plugins.push(PrecacheStrategy.copyRedirectedCacheableResponsesPlugin);\n }\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n const response = await handler.cacheMatch(request);\n if (response) {\n return response;\n }\n // If this is an `install` event for an entry that isn't already cached,\n // then populate the cache.\n if (handler.event && handler.event.type === 'install') {\n return await this._handleInstall(request, handler);\n }\n // Getting here means something went wrong. An entry that should have been\n // precached wasn't found in the cache.\n return await this._handleFetch(request, handler);\n }\n async _handleFetch(request, handler) {\n let response;\n const params = (handler.params || {});\n // Fall back to the network if we're configured to do so.\n if (this._fallbackToNetwork) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`The precached response for ` +\n `${getFriendlyURL(request.url)} in ${this.cacheName} was not ` +\n `found. Falling back to the network.`);\n }\n const integrityInManifest = params.integrity;\n const integrityInRequest = request.integrity;\n const noIntegrityConflict = !integrityInRequest || integrityInRequest === integrityInManifest;\n // Do not add integrity if the original request is no-cors\n // See https://github.com/GoogleChrome/workbox/issues/3096\n response = await handler.fetch(new Request(request, {\n integrity: request.mode !== 'no-cors'\n ? integrityInRequest || integrityInManifest\n : undefined,\n }));\n // It's only \"safe\" to repair the cache if we're using SRI to guarantee\n // that the response matches the precache manifest's expectations,\n // and there's either a) no integrity property in the incoming request\n // or b) there is an integrity, and it matches the precache manifest.\n // See https://github.com/GoogleChrome/workbox/issues/2858\n // Also if the original request users no-cors we don't use integrity.\n // See https://github.com/GoogleChrome/workbox/issues/3096\n if (integrityInManifest &&\n noIntegrityConflict &&\n request.mode !== 'no-cors') {\n this._useDefaultCacheabilityPluginIfNeeded();\n const wasCached = await handler.cachePut(request, response.clone());\n if (process.env.NODE_ENV !== 'production') {\n if (wasCached) {\n logger.log(`A response for ${getFriendlyURL(request.url)} ` +\n `was used to \"repair\" the precache.`);\n }\n }\n }\n }\n else {\n // This shouldn't normally happen, but there are edge cases:\n // https://github.com/GoogleChrome/workbox/issues/1441\n throw new WorkboxError('missing-precache-entry', {\n cacheName: this.cacheName,\n url: request.url,\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n const cacheKey = params.cacheKey || (await handler.getCacheKey(request, 'read'));\n // Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Precaching is responding to: ` + getFriendlyURL(request.url));\n logger.log(`Serving the precached url: ${getFriendlyURL(cacheKey instanceof Request ? cacheKey.url : cacheKey)}`);\n logger.groupCollapsed(`View request details here.`);\n logger.log(request);\n logger.groupEnd();\n logger.groupCollapsed(`View response details here.`);\n logger.log(response);\n logger.groupEnd();\n logger.groupEnd();\n }\n return response;\n }\n async _handleInstall(request, handler) {\n this._useDefaultCacheabilityPluginIfNeeded();\n const response = await handler.fetch(request);\n // Make sure we defer cachePut() until after we know the response\n // should be cached; see https://github.com/GoogleChrome/workbox/issues/2737\n const wasCached = await handler.cachePut(request, response.clone());\n if (!wasCached) {\n // Throwing here will lead to the `install` handler failing, which\n // we want to do if *any* of the responses aren't safe to cache.\n throw new WorkboxError('bad-precaching-response', {\n url: request.url,\n status: response.status,\n });\n }\n return response;\n }\n /**\n * This method is complex, as there a number of things to account for:\n *\n * The `plugins` array can be set at construction, and/or it might be added to\n * to at any time before the strategy is used.\n *\n * At the time the strategy is used (i.e. during an `install` event), there\n * needs to be at least one plugin that implements `cacheWillUpdate` in the\n * array, other than `copyRedirectedCacheableResponsesPlugin`.\n *\n * - If this method is called and there are no suitable `cacheWillUpdate`\n * plugins, we need to add `defaultPrecacheCacheabilityPlugin`.\n *\n * - If this method is called and there is exactly one `cacheWillUpdate`, then\n * we don't have to do anything (this might be a previously added\n * `defaultPrecacheCacheabilityPlugin`, or it might be a custom plugin).\n *\n * - If this method is called and there is more than one `cacheWillUpdate`,\n * then we need to check if one is `defaultPrecacheCacheabilityPlugin`. If so,\n * we need to remove it. (This situation is unlikely, but it could happen if\n * the strategy is used multiple times, the first without a `cacheWillUpdate`,\n * and then later on after manually adding a custom `cacheWillUpdate`.)\n *\n * See https://github.com/GoogleChrome/workbox/issues/2737 for more context.\n *\n * @private\n */\n _useDefaultCacheabilityPluginIfNeeded() {\n let defaultPluginIndex = null;\n let cacheWillUpdatePluginCount = 0;\n for (const [index, plugin] of this.plugins.entries()) {\n // Ignore the copy redirected plugin when determining what to do.\n if (plugin === PrecacheStrategy.copyRedirectedCacheableResponsesPlugin) {\n continue;\n }\n // Save the default plugin's index, in case it needs to be removed.\n if (plugin === PrecacheStrategy.defaultPrecacheCacheabilityPlugin) {\n defaultPluginIndex = index;\n }\n if (plugin.cacheWillUpdate) {\n cacheWillUpdatePluginCount++;\n }\n }\n if (cacheWillUpdatePluginCount === 0) {\n this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin);\n }\n else if (cacheWillUpdatePluginCount > 1 && defaultPluginIndex !== null) {\n // Only remove the default plugin; multiple custom plugins are allowed.\n this.plugins.splice(defaultPluginIndex, 1);\n }\n // Nothing needs to be done if cacheWillUpdatePluginCount is 1\n }\n}\nPrecacheStrategy.defaultPrecacheCacheabilityPlugin = {\n async cacheWillUpdate({ response }) {\n if (!response || response.status >= 400) {\n return null;\n }\n return response;\n },\n};\nPrecacheStrategy.copyRedirectedCacheableResponsesPlugin = {\n async cacheWillUpdate({ response }) {\n return response.redirected ? await copyResponse(response) : response;\n },\n};\nexport { PrecacheStrategy };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { waitUntil } from 'workbox-core/_private/waitUntil.js';\nimport { createCacheKey } from './utils/createCacheKey.js';\nimport { PrecacheInstallReportPlugin } from './utils/PrecacheInstallReportPlugin.js';\nimport { PrecacheCacheKeyPlugin } from './utils/PrecacheCacheKeyPlugin.js';\nimport { printCleanupDetails } from './utils/printCleanupDetails.js';\nimport { printInstallDetails } from './utils/printInstallDetails.js';\nimport { PrecacheStrategy } from './PrecacheStrategy.js';\nimport './_version.js';\n/**\n * Performs efficient precaching of assets.\n *\n * @memberof workbox-precaching\n */\nclass PrecacheController {\n /**\n * Create a new PrecacheController.\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] The cache to use for precaching.\n * @param {string} [options.plugins] Plugins to use when precaching as well\n * as responding to fetch events for precached assets.\n * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to\n * get the response from the network if there's a precache miss.\n */\n constructor({ cacheName, plugins = [], fallbackToNetwork = true, } = {}) {\n this._urlsToCacheKeys = new Map();\n this._urlsToCacheModes = new Map();\n this._cacheKeysToIntegrities = new Map();\n this._strategy = new PrecacheStrategy({\n cacheName: cacheNames.getPrecacheName(cacheName),\n plugins: [\n ...plugins,\n new PrecacheCacheKeyPlugin({ precacheController: this }),\n ],\n fallbackToNetwork,\n });\n // Bind the install and activate methods to the instance.\n this.install = this.install.bind(this);\n this.activate = this.activate.bind(this);\n }\n /**\n * @type {workbox-precaching.PrecacheStrategy} The strategy created by this controller and\n * used to cache assets and respond to fetch events.\n */\n get strategy() {\n return this._strategy;\n }\n /**\n * Adds items to the precache list, removing any duplicates and\n * stores the files in the\n * {@link workbox-core.cacheNames|\"precache cache\"} when the service\n * worker installs.\n *\n * This method can be called multiple times.\n *\n * @param {Array} [entries=[]] Array of entries to precache.\n */\n precache(entries) {\n this.addToCacheList(entries);\n if (!this._installAndActiveListenersAdded) {\n self.addEventListener('install', this.install);\n self.addEventListener('activate', this.activate);\n this._installAndActiveListenersAdded = true;\n }\n }\n /**\n * This method will add items to the precache list, removing duplicates\n * and ensuring the information is valid.\n *\n * @param {Array} entries\n * Array of entries to precache.\n */\n addToCacheList(entries) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArray(entries, {\n moduleName: 'workbox-precaching',\n className: 'PrecacheController',\n funcName: 'addToCacheList',\n paramName: 'entries',\n });\n }\n const urlsToWarnAbout = [];\n for (const entry of entries) {\n // See https://github.com/GoogleChrome/workbox/issues/2259\n if (typeof entry === 'string') {\n urlsToWarnAbout.push(entry);\n }\n else if (entry && entry.revision === undefined) {\n urlsToWarnAbout.push(entry.url);\n }\n const { cacheKey, url } = createCacheKey(entry);\n const cacheMode = typeof entry !== 'string' && entry.revision ? 'reload' : 'default';\n if (this._urlsToCacheKeys.has(url) &&\n this._urlsToCacheKeys.get(url) !== cacheKey) {\n throw new WorkboxError('add-to-cache-list-conflicting-entries', {\n firstEntry: this._urlsToCacheKeys.get(url),\n secondEntry: cacheKey,\n });\n }\n if (typeof entry !== 'string' && entry.integrity) {\n if (this._cacheKeysToIntegrities.has(cacheKey) &&\n this._cacheKeysToIntegrities.get(cacheKey) !== entry.integrity) {\n throw new WorkboxError('add-to-cache-list-conflicting-integrities', {\n url,\n });\n }\n this._cacheKeysToIntegrities.set(cacheKey, entry.integrity);\n }\n this._urlsToCacheKeys.set(url, cacheKey);\n this._urlsToCacheModes.set(url, cacheMode);\n if (urlsToWarnAbout.length > 0) {\n const warningMessage = `Workbox is precaching URLs without revision ` +\n `info: ${urlsToWarnAbout.join(', ')}\\nThis is generally NOT safe. ` +\n `Learn more at https://bit.ly/wb-precache`;\n if (process.env.NODE_ENV === 'production') {\n // Use console directly to display this warning without bloating\n // bundle sizes by pulling in all of the logger codebase in prod.\n console.warn(warningMessage);\n }\n else {\n logger.warn(warningMessage);\n }\n }\n }\n }\n /**\n * Precaches new and updated assets. Call this method from the service worker\n * install event.\n *\n * Note: this method calls `event.waitUntil()` for you, so you do not need\n * to call it yourself in your event handlers.\n *\n * @param {ExtendableEvent} event\n * @return {Promise}\n */\n install(event) {\n // waitUntil returns Promise\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return waitUntil(event, async () => {\n const installReportPlugin = new PrecacheInstallReportPlugin();\n this.strategy.plugins.push(installReportPlugin);\n // Cache entries one at a time.\n // See https://github.com/GoogleChrome/workbox/issues/2528\n for (const [url, cacheKey] of this._urlsToCacheKeys) {\n const integrity = this._cacheKeysToIntegrities.get(cacheKey);\n const cacheMode = this._urlsToCacheModes.get(url);\n const request = new Request(url, {\n integrity,\n cache: cacheMode,\n credentials: 'same-origin',\n });\n await Promise.all(this.strategy.handleAll({\n params: { cacheKey },\n request,\n event,\n }));\n }\n const { updatedURLs, notUpdatedURLs } = installReportPlugin;\n if (process.env.NODE_ENV !== 'production') {\n printInstallDetails(updatedURLs, notUpdatedURLs);\n }\n return { updatedURLs, notUpdatedURLs };\n });\n }\n /**\n * Deletes assets that are no longer present in the current precache manifest.\n * Call this method from the service worker activate event.\n *\n * Note: this method calls `event.waitUntil()` for you, so you do not need\n * to call it yourself in your event handlers.\n *\n * @param {ExtendableEvent} event\n * @return {Promise}\n */\n activate(event) {\n // waitUntil returns Promise\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return waitUntil(event, async () => {\n const cache = await self.caches.open(this.strategy.cacheName);\n const currentlyCachedRequests = await cache.keys();\n const expectedCacheKeys = new Set(this._urlsToCacheKeys.values());\n const deletedURLs = [];\n for (const request of currentlyCachedRequests) {\n if (!expectedCacheKeys.has(request.url)) {\n await cache.delete(request);\n deletedURLs.push(request.url);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n printCleanupDetails(deletedURLs);\n }\n return { deletedURLs };\n });\n }\n /**\n * Returns a mapping of a precached URL to the corresponding cache key, taking\n * into account the revision information for the URL.\n *\n * @return {Map} A URL to cache key mapping.\n */\n getURLsToCacheKeys() {\n return this._urlsToCacheKeys;\n }\n /**\n * Returns a list of all the URLs that have been precached by the current\n * service worker.\n *\n * @return {Array} The precached URLs.\n */\n getCachedURLs() {\n return [...this._urlsToCacheKeys.keys()];\n }\n /**\n * Returns the cache key used for storing a given URL. If that URL is\n * unversioned, like `/index.html', then the cache key will be the original\n * URL with a search parameter appended to it.\n *\n * @param {string} url A URL whose cache key you want to look up.\n * @return {string} The versioned URL that corresponds to a cache key\n * for the original URL, or undefined if that URL isn't precached.\n */\n getCacheKeyForURL(url) {\n const urlObject = new URL(url, location.href);\n return this._urlsToCacheKeys.get(urlObject.href);\n }\n /**\n * @param {string} url A cache key whose SRI you want to look up.\n * @return {string} The subresource integrity associated with the cache key,\n * or undefined if it's not set.\n */\n getIntegrityForCacheKey(cacheKey) {\n return this._cacheKeysToIntegrities.get(cacheKey);\n }\n /**\n * This acts as a drop-in replacement for\n * [`cache.match()`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match)\n * with the following differences:\n *\n * - It knows what the name of the precache is, and only checks in that cache.\n * - It allows you to pass in an \"original\" URL without versioning parameters,\n * and it will automatically look up the correct cache key for the currently\n * active revision of that URL.\n *\n * E.g., `matchPrecache('index.html')` will find the correct precached\n * response for the currently active service worker, even if the actual cache\n * key is `'/index.html?__WB_REVISION__=1234abcd'`.\n *\n * @param {string|Request} request The key (without revisioning parameters)\n * to look up in the precache.\n * @return {Promise}\n */\n async matchPrecache(request) {\n const url = request instanceof Request ? request.url : request;\n const cacheKey = this.getCacheKeyForURL(url);\n if (cacheKey) {\n const cache = await self.caches.open(this.strategy.cacheName);\n return cache.match(cacheKey);\n }\n return undefined;\n }\n /**\n * Returns a function that looks up `url` in the precache (taking into\n * account revision information), and returns the corresponding `Response`.\n *\n * @param {string} url The precached URL which will be used to lookup the\n * `Response`.\n * @return {workbox-routing~handlerCallback}\n */\n createHandlerBoundToURL(url) {\n const cacheKey = this.getCacheKeyForURL(url);\n if (!cacheKey) {\n throw new WorkboxError('non-precached-url', { url });\n }\n return (options) => {\n options.request = new Request(url);\n options.params = Object.assign({ cacheKey }, options.params);\n return this.strategy.handle(options);\n };\n }\n}\nexport { PrecacheController };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { PrecacheController } from '../PrecacheController.js';\nimport '../_version.js';\nlet precacheController;\n/**\n * @return {PrecacheController}\n * @private\n */\nexport const getOrCreatePrecacheController = () => {\n if (!precacheController) {\n precacheController = new PrecacheController();\n }\n return precacheController;\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Router } from '../Router.js';\nimport '../_version.js';\nlet defaultRouter;\n/**\n * Creates a new, singleton Router instance if one does not exist. If one\n * does already exist, that instance is returned.\n *\n * @private\n * @return {Router}\n */\nexport const getOrCreateDefaultRouter = () => {\n if (!defaultRouter) {\n defaultRouter = new Router();\n // The helpers that use the default Router assume these listeners exist.\n defaultRouter.addFetchListener();\n defaultRouter.addCacheListener();\n }\n return defaultRouter;\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\n/**\n * @param {function()|Object} handler Either a function, or an object with a\n * 'handle' method.\n * @return {Object} An object with a handle method.\n *\n * @private\n */\nexport const normalizeHandler = (handler) => {\n if (handler && typeof handler === 'object') {\n if (process.env.NODE_ENV !== 'production') {\n assert.hasMethod(handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return handler;\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(handler, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return { handle: handler };\n }\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { defaultMethod, validMethods } from './utils/constants.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport './_version.js';\n/**\n * A `Route` consists of a pair of callback functions, \"match\" and \"handler\".\n * The \"match\" callback determine if a route should be used to \"handle\" a\n * request by returning a non-falsy value if it can. The \"handler\" callback\n * is called when there is a match and should return a Promise that resolves\n * to a `Response`.\n *\n * @memberof workbox-routing\n */\nclass Route {\n /**\n * Constructor for Route class.\n *\n * @param {workbox-routing~matchCallback} match\n * A callback function that determines whether the route matches a given\n * `fetch` event by returning a non-falsy value.\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(match, handler, method = defaultMethod) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(match, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'match',\n });\n if (method) {\n assert.isOneOf(method, validMethods, { paramName: 'method' });\n }\n }\n // These values are referenced directly by Router so cannot be\n // altered by minificaton.\n this.handler = normalizeHandler(handler);\n this.match = match;\n this.method = method;\n }\n /**\n *\n * @param {workbox-routing-handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response\n */\n setCatchHandler(handler) {\n this.catchHandler = normalizeHandler(handler);\n }\n}\nexport { Route };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The default HTTP method, 'GET', used when there's no specific method\n * configured for a route.\n *\n * @type {string}\n *\n * @private\n */\nexport const defaultMethod = 'GET';\n/**\n * The list of valid HTTP methods associated with requests that could be routed.\n *\n * @type {Array}\n *\n * @private\n */\nexport const validMethods = [\n 'DELETE',\n 'GET',\n 'HEAD',\n 'PATCH',\n 'POST',\n 'PUT',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { Route } from './Route.js';\nimport './_version.js';\n/**\n * RegExpRoute makes it easy to create a regular expression based\n * {@link workbox-routing.Route}.\n *\n * For same-origin requests the RegExp only needs to match part of the URL. For\n * requests against third-party servers, you must define a RegExp that matches\n * the start of the URL.\n *\n * @memberof workbox-routing\n * @extends workbox-routing.Route\n */\nclass RegExpRoute extends Route {\n /**\n * If the regular expression contains\n * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},\n * the captured values will be passed to the\n * {@link workbox-routing~handlerCallback} `params`\n * argument.\n *\n * @param {RegExp} regExp The regular expression to match against URLs.\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(regExp, handler, method) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(regExp, RegExp, {\n moduleName: 'workbox-routing',\n className: 'RegExpRoute',\n funcName: 'constructor',\n paramName: 'pattern',\n });\n }\n const match = ({ url }) => {\n const result = regExp.exec(url.href);\n // Return immediately if there's no match.\n if (!result) {\n return;\n }\n // Require that the match start at the first character in the URL string\n // if it's a cross-origin request.\n // See https://github.com/GoogleChrome/workbox/issues/281 for the context\n // behind this behavior.\n if (url.origin !== location.origin && result.index !== 0) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`The regular expression '${regExp.toString()}' only partially matched ` +\n `against the cross-origin URL '${url.toString()}'. RegExpRoute's will only ` +\n `handle cross-origin requests if they match the entire URL.`);\n }\n return;\n }\n // If the route matches, but there aren't any capture groups defined, then\n // this will return [], which is truthy and therefore sufficient to\n // indicate a match.\n // If there are capture groups, then it will return their values.\n return result.slice(1);\n };\n super(match, handler, method);\n }\n}\nexport { RegExpRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { defaultMethod } from './utils/constants.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\n/**\n * The Router can be used to process a `FetchEvent` using one or more\n * {@link workbox-routing.Route}, responding with a `Response` if\n * a matching route exists.\n *\n * If no route matches a given a request, the Router will use a \"default\"\n * handler if one is defined.\n *\n * Should the matching Route throw an error, the Router will use a \"catch\"\n * handler if one is defined to gracefully deal with issues and respond with a\n * Request.\n *\n * If a request matches multiple routes, the **earliest** registered route will\n * be used to respond to the request.\n *\n * @memberof workbox-routing\n */\nclass Router {\n /**\n * Initializes a new Router.\n */\n constructor() {\n this._routes = new Map();\n this._defaultHandlerMap = new Map();\n }\n /**\n * @return {Map>} routes A `Map` of HTTP\n * method name ('GET', etc.) to an array of all the corresponding `Route`\n * instances that are registered.\n */\n get routes() {\n return this._routes;\n }\n /**\n * Adds a fetch event listener to respond to events when a route matches\n * the event's request.\n */\n addFetchListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('fetch', ((event) => {\n const { request } = event;\n const responsePromise = this.handleRequest({ request, event });\n if (responsePromise) {\n event.respondWith(responsePromise);\n }\n }));\n }\n /**\n * Adds a message event listener for URLs to cache from the window.\n * This is useful to cache resources loaded on the page prior to when the\n * service worker started controlling it.\n *\n * The format of the message data sent from the window should be as follows.\n * Where the `urlsToCache` array may consist of URL strings or an array of\n * URL string + `requestInit` object (the same as you'd pass to `fetch()`).\n *\n * ```\n * {\n * type: 'CACHE_URLS',\n * payload: {\n * urlsToCache: [\n * './script1.js',\n * './script2.js',\n * ['./script3.js', {mode: 'no-cors'}],\n * ],\n * },\n * }\n * ```\n */\n addCacheListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('message', ((event) => {\n // event.data is type 'any'\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (event.data && event.data.type === 'CACHE_URLS') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { payload } = event.data;\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Caching URLs from the window`, payload.urlsToCache);\n }\n const requestPromises = Promise.all(payload.urlsToCache.map((entry) => {\n if (typeof entry === 'string') {\n entry = [entry];\n }\n const request = new Request(...entry);\n return this.handleRequest({ request, event });\n // TODO(philipwalton): TypeScript errors without this typecast for\n // some reason (probably a bug). The real type here should work but\n // doesn't: `Array | undefined>`.\n })); // TypeScript\n event.waitUntil(requestPromises);\n // If a MessageChannel was used, reply to the message on success.\n if (event.ports && event.ports[0]) {\n void requestPromises.then(() => event.ports[0].postMessage(true));\n }\n }\n }));\n }\n /**\n * Apply the routing rules to a FetchEvent object to get a Response from an\n * appropriate Route's handler.\n *\n * @param {Object} options\n * @param {Request} options.request The request to handle.\n * @param {ExtendableEvent} options.event The event that triggered the\n * request.\n * @return {Promise|undefined} A promise is returned if a\n * registered route can handle the request. If there is no matching\n * route and there's no `defaultHandler`, `undefined` is returned.\n */\n handleRequest({ request, event, }) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'handleRequest',\n paramName: 'options.request',\n });\n }\n const url = new URL(request.url, location.href);\n if (!url.protocol.startsWith('http')) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Workbox Router only supports URLs that start with 'http'.`);\n }\n return;\n }\n const sameOrigin = url.origin === location.origin;\n const { params, route } = this.findMatchingRoute({\n event,\n request,\n sameOrigin,\n url,\n });\n let handler = route && route.handler;\n const debugMessages = [];\n if (process.env.NODE_ENV !== 'production') {\n if (handler) {\n debugMessages.push([`Found a route to handle this request:`, route]);\n if (params) {\n debugMessages.push([\n `Passing the following params to the route's handler:`,\n params,\n ]);\n }\n }\n }\n // If we don't have a handler because there was no matching route, then\n // fall back to defaultHandler if that's defined.\n const method = request.method;\n if (!handler && this._defaultHandlerMap.has(method)) {\n if (process.env.NODE_ENV !== 'production') {\n debugMessages.push(`Failed to find a matching route. Falling ` +\n `back to the default handler for ${method}.`);\n }\n handler = this._defaultHandlerMap.get(method);\n }\n if (!handler) {\n if (process.env.NODE_ENV !== 'production') {\n // No handler so Workbox will do nothing. If logs is set of debug\n // i.e. verbose, we should print out this information.\n logger.debug(`No route found for: ${getFriendlyURL(url)}`);\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // We have a handler, meaning Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`);\n debugMessages.forEach((msg) => {\n if (Array.isArray(msg)) {\n logger.log(...msg);\n }\n else {\n logger.log(msg);\n }\n });\n logger.groupEnd();\n }\n // Wrap in try and catch in case the handle method throws a synchronous\n // error. It should still callback to the catch handler.\n let responsePromise;\n try {\n responsePromise = handler.handle({ url, request, event, params });\n }\n catch (err) {\n responsePromise = Promise.reject(err);\n }\n // Get route's catch handler, if it exists\n const catchHandler = route && route.catchHandler;\n if (responsePromise instanceof Promise &&\n (this._catchHandler || catchHandler)) {\n responsePromise = responsePromise.catch(async (err) => {\n // If there's a route catch handler, process that first\n if (catchHandler) {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to route's Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n try {\n return await catchHandler.handle({ url, request, event, params });\n }\n catch (catchErr) {\n if (catchErr instanceof Error) {\n err = catchErr;\n }\n }\n }\n if (this._catchHandler) {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to global Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n return this._catchHandler.handle({ url, request, event });\n }\n throw err;\n });\n }\n return responsePromise;\n }\n /**\n * Checks a request and URL (and optionally an event) against the list of\n * registered routes, and if there's a match, returns the corresponding\n * route along with any params generated by the match.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {boolean} options.sameOrigin The result of comparing `url.origin`\n * against the current origin.\n * @param {Request} options.request The request to match.\n * @param {Event} options.event The corresponding event.\n * @return {Object} An object with `route` and `params` properties.\n * They are populated if a matching route was found or `undefined`\n * otherwise.\n */\n findMatchingRoute({ url, sameOrigin, request, event, }) {\n const routes = this._routes.get(request.method) || [];\n for (const route of routes) {\n let params;\n // route.match returns type any, not possible to change right now.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const matchResult = route.match({ url, sameOrigin, request, event });\n if (matchResult) {\n if (process.env.NODE_ENV !== 'production') {\n // Warn developers that using an async matchCallback is almost always\n // not the right thing to do.\n if (matchResult instanceof Promise) {\n logger.warn(`While routing ${getFriendlyURL(url)}, an async ` +\n `matchCallback function was used. Please convert the ` +\n `following route to use a synchronous matchCallback function:`, route);\n }\n }\n // See https://github.com/GoogleChrome/workbox/issues/2079\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n params = matchResult;\n if (Array.isArray(params) && params.length === 0) {\n // Instead of passing an empty array in as params, use undefined.\n params = undefined;\n }\n else if (matchResult.constructor === Object && // eslint-disable-line\n Object.keys(matchResult).length === 0) {\n // Instead of passing an empty object in as params, use undefined.\n params = undefined;\n }\n else if (typeof matchResult === 'boolean') {\n // For the boolean value true (rather than just something truth-y),\n // don't set params.\n // See https://github.com/GoogleChrome/workbox/pull/2134#issuecomment-513924353\n params = undefined;\n }\n // Return early if have a match.\n return { route, params };\n }\n }\n // If no match was found above, return and empty object.\n return {};\n }\n /**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Each HTTP method ('GET', 'POST', etc.) gets its own default handler.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to associate with this\n * default handler. Each method has its own default.\n */\n setDefaultHandler(handler, method = defaultMethod) {\n this._defaultHandlerMap.set(method, normalizeHandler(handler));\n }\n /**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n */\n setCatchHandler(handler) {\n this._catchHandler = normalizeHandler(handler);\n }\n /**\n * Registers a route with the router.\n *\n * @param {workbox-routing.Route} route The route to register.\n */\n registerRoute(route) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(route, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route, 'match', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.isType(route.handler, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route.handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.handler',\n });\n assert.isType(route.method, 'string', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.method',\n });\n }\n if (!this._routes.has(route.method)) {\n this._routes.set(route.method, []);\n }\n // Give precedence to all of the earlier routes by adding this additional\n // route to the end of the array.\n this._routes.get(route.method).push(route);\n }\n /**\n * Unregisters a route with the router.\n *\n * @param {workbox-routing.Route} route The route to unregister.\n */\n unregisterRoute(route) {\n if (!this._routes.has(route.method)) {\n throw new WorkboxError('unregister-route-but-not-found-with-method', {\n method: route.method,\n });\n }\n const routeIndex = this._routes.get(route.method).indexOf(route);\n if (routeIndex > -1) {\n this._routes.get(route.method).splice(routeIndex, 1);\n }\n else {\n throw new WorkboxError('unregister-route-route-not-registered');\n }\n }\n}\nexport { Router };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Route } from './Route.js';\nimport { RegExpRoute } from './RegExpRoute.js';\nimport { getOrCreateDefaultRouter } from './utils/getOrCreateDefaultRouter.js';\nimport './_version.js';\n/**\n * Easily register a RegExp, string, or function with a caching\n * strategy to a singleton Router instance.\n *\n * This method will generate a Route for you if needed and\n * call {@link workbox-routing.Router#registerRoute}.\n *\n * @param {RegExp|string|workbox-routing.Route~matchCallback|workbox-routing.Route} capture\n * If the capture param is a `Route`, all other arguments will be ignored.\n * @param {workbox-routing~handlerCallback} [handler] A callback\n * function that returns a Promise resulting in a Response. This parameter\n * is required if `capture` is not a `Route` object.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n * @return {workbox-routing.Route} The generated `Route`.\n *\n * @memberof workbox-routing\n */\nfunction registerRoute(capture, handler, method) {\n let route;\n if (typeof capture === 'string') {\n const captureUrl = new URL(capture, location.href);\n if (process.env.NODE_ENV !== 'production') {\n if (!(capture.startsWith('/') || capture.startsWith('http'))) {\n throw new WorkboxError('invalid-string', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n // We want to check if Express-style wildcards are in the pathname only.\n // TODO: Remove this log message in v4.\n const valueToCheck = capture.startsWith('http')\n ? captureUrl.pathname\n : capture;\n // See https://github.com/pillarjs/path-to-regexp#parameters\n const wildcards = '[*:?+]';\n if (new RegExp(`${wildcards}`).exec(valueToCheck)) {\n logger.debug(`The '$capture' parameter contains an Express-style wildcard ` +\n `character (${wildcards}). Strings are now always interpreted as ` +\n `exact matches; use a RegExp for partial or wildcard matches.`);\n }\n }\n const matchCallback = ({ url }) => {\n if (process.env.NODE_ENV !== 'production') {\n if (url.pathname === captureUrl.pathname &&\n url.origin !== captureUrl.origin) {\n logger.debug(`${capture} only partially matches the cross-origin URL ` +\n `${url.toString()}. This route will only handle cross-origin requests ` +\n `if they match the entire URL.`);\n }\n }\n return url.href === captureUrl.href;\n };\n // If `capture` is a string then `handler` and `method` must be present.\n route = new Route(matchCallback, handler, method);\n }\n else if (capture instanceof RegExp) {\n // If `capture` is a `RegExp` then `handler` and `method` must be present.\n route = new RegExpRoute(capture, handler, method);\n }\n else if (typeof capture === 'function') {\n // If `capture` is a function then `handler` and `method` must be present.\n route = new Route(capture, handler, method);\n }\n else if (capture instanceof Route) {\n route = capture;\n }\n else {\n throw new WorkboxError('unsupported-route-type', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.registerRoute(route);\n return route;\n}\nexport { registerRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Removes any URL search parameters that should be ignored.\n *\n * @param {URL} urlObject The original URL.\n * @param {Array} ignoreURLParametersMatching RegExps to test against\n * each search parameter name. Matches mean that the search parameter should be\n * ignored.\n * @return {URL} The URL with any ignored search parameters removed.\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching = []) {\n // Convert the iterable into an array at the start of the loop to make sure\n // deletion doesn't mess up iteration.\n for (const paramName of [...urlObject.searchParams.keys()]) {\n if (ignoreURLParametersMatching.some((regExp) => regExp.test(paramName))) {\n urlObject.searchParams.delete(paramName);\n }\n }\n return urlObject;\n}\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { Route } from 'workbox-routing/Route.js';\nimport { generateURLVariations } from './utils/generateURLVariations.js';\nimport './_version.js';\n/**\n * A subclass of {@link workbox-routing.Route} that takes a\n * {@link workbox-precaching.PrecacheController}\n * instance and uses it to match incoming requests and handle fetching\n * responses from the precache.\n *\n * @memberof workbox-precaching\n * @extends workbox-routing.Route\n */\nclass PrecacheRoute extends Route {\n /**\n * @param {PrecacheController} precacheController A `PrecacheController`\n * instance used to both match requests and respond to fetch events.\n * @param {Object} [options] Options to control how requests are matched\n * against the list of precached URLs.\n * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will\n * check cache entries for a URLs ending with '/' to see if there is a hit when\n * appending the `directoryIndex` value.\n * @param {Array} [options.ignoreURLParametersMatching=[/^utm_/, /^fbclid$/]] An\n * array of regex's to remove search params when looking for a cache match.\n * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will\n * check the cache for the URL with a `.html` added to the end of the end.\n * @param {workbox-precaching~urlManipulation} [options.urlManipulation]\n * This is a function that should take a URL and return an array of\n * alternative URLs that should be checked for precache matches.\n */\n constructor(precacheController, options) {\n const match = ({ request, }) => {\n const urlsToCacheKeys = precacheController.getURLsToCacheKeys();\n for (const possibleURL of generateURLVariations(request.url, options)) {\n const cacheKey = urlsToCacheKeys.get(possibleURL);\n if (cacheKey) {\n const integrity = precacheController.getIntegrityForCacheKey(cacheKey);\n return { cacheKey, integrity };\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Precaching did not find a match for ` + getFriendlyURL(request.url));\n }\n return;\n };\n super(match, precacheController.strategy);\n }\n}\nexport { PrecacheRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { removeIgnoredSearchParams } from './removeIgnoredSearchParams.js';\nimport '../_version.js';\n/**\n * Generator function that yields possible variations on the original URL to\n * check, one at a time.\n *\n * @param {string} url\n * @param {Object} options\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function* generateURLVariations(url, { ignoreURLParametersMatching = [/^utm_/, /^fbclid$/], directoryIndex = 'index.html', cleanURLs = true, urlManipulation, } = {}) {\n const urlObject = new URL(url, location.href);\n urlObject.hash = '';\n yield urlObject.href;\n const urlWithoutIgnoredParams = removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching);\n yield urlWithoutIgnoredParams.href;\n if (directoryIndex && urlWithoutIgnoredParams.pathname.endsWith('/')) {\n const directoryURL = new URL(urlWithoutIgnoredParams.href);\n directoryURL.pathname += directoryIndex;\n yield directoryURL.href;\n }\n if (cleanURLs) {\n const cleanURL = new URL(urlWithoutIgnoredParams.href);\n cleanURL.pathname += '.html';\n yield cleanURL.href;\n }\n if (urlManipulation) {\n const additionalURLs = urlManipulation({ url: urlObject });\n for (const urlToAttempt of additionalURLs) {\n yield urlToAttempt.href;\n }\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport '../_version.js';\nexport const messages = {\n strategyStart: (strategyName, request) => `Using ${strategyName} to respond to '${getFriendlyURL(request.url)}'`,\n printFinalResponse: (response) => {\n if (response) {\n logger.groupCollapsed(`View the final response here.`);\n logger.log(response || '[No response returned]');\n logger.groupEnd();\n }\n },\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { addRoute } from './addRoute.js';\nimport { precache } from './precache.js';\nimport './_version.js';\n/**\n * This method will add entries to the precache list and add a route to\n * respond to fetch events.\n *\n * This is a convenience method that will call\n * {@link workbox-precaching.precache} and\n * {@link workbox-precaching.addRoute} in a single call.\n *\n * @param {Array} entries Array of entries to precache.\n * @param {Object} [options] See the\n * {@link workbox-precaching.PrecacheRoute} options.\n *\n * @memberof workbox-precaching\n */\nfunction precacheAndRoute(entries, options) {\n precache(entries);\n addRoute(options);\n}\nexport { precacheAndRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nexport const cacheOkAndOpaquePlugin = {\n /**\n * Returns a valid response (to allow caching) if the status is 200 (OK) or\n * 0 (opaque).\n *\n * @param {Object} options\n * @param {Response} options.response\n * @return {Response|null}\n *\n * @private\n */\n cacheWillUpdate: async ({ response }) => {\n if (response.status === 200 || response.status === 0) {\n return response;\n }\n return null;\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { cacheOkAndOpaquePlugin } from './plugins/cacheOkAndOpaquePlugin.js';\nimport { Strategy } from './Strategy.js';\nimport { messages } from './utils/messages.js';\nimport './_version.js';\n/**\n * An implementation of a\n * [stale-while-revalidate](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#stale-while-revalidate)\n * request strategy.\n *\n * Resources are requested from both the cache and the network in parallel.\n * The strategy will respond with the cached version if available, otherwise\n * wait for the network response. The cache is updated with the network response\n * with each successful request.\n *\n * By default, this strategy will cache responses with a 200 status code as\n * well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses).\n * Opaque responses are cross-origin requests where the response doesn't\n * support [CORS](https://enable-cors.org/).\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-strategies\n */\nclass StaleWhileRevalidate extends Strategy {\n /**\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)\n * `fetch()` requests made by this strategy.\n * @param {Object} [options.matchOptions] [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n */\n constructor(options = {}) {\n super(options);\n // If this instance contains no plugins with a 'cacheWillUpdate' callback,\n // prepend the `cacheOkAndOpaquePlugin` plugin to the plugins list.\n if (!this.plugins.some((p) => 'cacheWillUpdate' in p)) {\n this.plugins.unshift(cacheOkAndOpaquePlugin);\n }\n }\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n const logs = [];\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: 'handle',\n paramName: 'request',\n });\n }\n const fetchAndCachePromise = handler.fetchAndCachePut(request).catch(() => {\n // Swallow this error because a 'no-response' error will be thrown in\n // main handler return flow. This will be in the `waitUntil()` flow.\n });\n void handler.waitUntil(fetchAndCachePromise);\n let response = await handler.cacheMatch(request);\n let error;\n if (response) {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`Found a cached response in the '${this.cacheName}'` +\n ` cache. Will update with the network response in the background.`);\n }\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`No response found in the '${this.cacheName}' cache. ` +\n `Will wait for the network response.`);\n }\n try {\n // NOTE(philipwalton): Really annoying that we have to type cast here.\n // https://github.com/microsoft/TypeScript/issues/20006\n response = (await fetchAndCachePromise);\n }\n catch (err) {\n if (err instanceof Error) {\n error = err;\n }\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n for (const log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n if (!response) {\n throw new WorkboxError('no-response', { url: request.url, error });\n }\n return response;\n }\n}\nexport { StaleWhileRevalidate };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * Claim any currently available clients once the service worker\n * becomes active. This is normally used in conjunction with `skipWaiting()`.\n *\n * @memberof workbox-core\n */\nfunction clientsClaim() {\n self.addEventListener('activate', () => self.clients.claim());\n}\nexport { clientsClaim };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Adds items to the precache list, removing any duplicates and\n * stores the files in the\n * {@link workbox-core.cacheNames|\"precache cache\"} when the service\n * worker installs.\n *\n * This method can be called multiple times.\n *\n * Please note: This method **will not** serve any of the cached files for you.\n * It only precaches files. To respond to a network request you call\n * {@link workbox-precaching.addRoute}.\n *\n * If you have a single array of files to precache, you can just call\n * {@link workbox-precaching.precacheAndRoute}.\n *\n * @param {Array} [entries=[]] Array of entries to precache.\n *\n * @memberof workbox-precaching\n */\nfunction precache(entries) {\n const precacheController = getOrCreatePrecacheController();\n precacheController.precache(entries);\n}\nexport { precache };\n","/// \n/* eslint-disable no-restricted-globals */\n\n// This service worker can be customized!\n// See https://developers.google.com/web/tools/workbox/modules\n// for the list of available Workbox modules, or add any other\n// code you'd like.\n// You can also remove this file if you'd prefer not to use a\n// service worker, and the Workbox build step will be skipped.\n\nimport { clientsClaim } from 'workbox-core'\nimport { ExpirationPlugin } from 'workbox-expiration'\nimport { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching'\nimport { registerRoute } from 'workbox-routing'\nimport { StaleWhileRevalidate } from 'workbox-strategies'\n\ndeclare const self: ServiceWorkerGlobalScope\n\nclientsClaim()\n\n// Precache all of the assets generated by your build process.\n// Their URLs are injected into the manifest variable below.\n// This variable must be present somewhere in your service worker file,\n// even if you decide not to use precaching. See https://cra.link/PWA\nprecacheAndRoute(self.__WB_MANIFEST)\n\n// Set up App Shell-style routing, so that all navigation requests\n// are fulfilled with your index.html shell. Learn more at\n// https://developers.google.com/web/fundamentals/architecture/app-shell\nconst fileExtensionRegexp = new RegExp('/[^/?]+\\\\.[^/]+$')\nregisterRoute(\n // Return false to exempt requests from being fulfilled by index.html.\n ({ request, url }: { request: Request; url: URL }) => {\n // If this isn't a navigation, skip.\n if (request.mode !== 'navigate') {\n return false\n }\n\n // If this is a URL that starts with /_, skip.\n if (url.pathname.startsWith('/_')) {\n return false\n }\n\n // If this looks like a URL for a resource, because it contains\n // a file extension, skip.\n if (url.pathname.match(fileExtensionRegexp)) {\n return false\n }\n\n // Return true to signal that we want to use the handler.\n return true\n },\n createHandlerBoundToURL(process.env.PUBLIC_URL + '/index.html')\n)\n\n// An example runtime caching route for requests that aren't handled by the\n// precache, in this case same-origin .png requests like those from in public/\nregisterRoute(\n // Add in any other file extensions or routing criteria as needed.\n ({ url }) => url.origin === self.location.origin && url.pathname.endsWith('.png'),\n // Customize this strategy as needed, e.g., by changing to CacheFirst.\n new StaleWhileRevalidate({\n cacheName: 'images',\n plugins: [\n // Ensure that once this runtime cache reaches a maximum size the\n // least-recently used images are removed.\n new ExpirationPlugin({ maxEntries: 50 }),\n ],\n })\n)\n\n// This allows the web app to trigger skipWaiting via\n// registration.waiting.postMessage({type: 'SKIP_WAITING'})\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting()\n }\n})\n\n// Any other custom service worker logic can go here.\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport { PrecacheRoute } from './PrecacheRoute.js';\nimport './_version.js';\n/**\n * Add a `fetch` listener to the service worker that will\n * respond to\n * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests}\n * with precached assets.\n *\n * Requests for assets that aren't precached, the `FetchEvent` will not be\n * responded to, allowing the event to fall through to other `fetch` event\n * listeners.\n *\n * @param {Object} [options] See the {@link workbox-precaching.PrecacheRoute}\n * options.\n *\n * @memberof workbox-precaching\n */\nfunction addRoute(options) {\n const precacheController = getOrCreatePrecacheController();\n const precacheRoute = new PrecacheRoute(precacheController, options);\n registerRoute(precacheRoute);\n}\nexport { addRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Helper function that calls\n * {@link PrecacheController#createHandlerBoundToURL} on the default\n * {@link PrecacheController} instance.\n *\n * If you are creating your own {@link PrecacheController}, then call the\n * {@link PrecacheController#createHandlerBoundToURL} on that instance,\n * instead of using this function.\n *\n * @param {string} url The precached URL which will be used to lookup the\n * `Response`.\n * @param {boolean} [fallbackToNetwork=true] Whether to attempt to get the\n * response from the network if there's a precache miss.\n * @return {workbox-routing~handlerCallback}\n *\n * @memberof workbox-precaching\n */\nfunction createHandlerBoundToURL(url) {\n const precacheController = getOrCreatePrecacheController();\n return precacheController.createHandlerBoundToURL(url);\n}\nexport { createHandlerBoundToURL };\n"]} \ No newline at end of file diff --git a/src/modular/web/modular_frontend/static/js/915.89514730.chunk.js b/src/modular/web/modular_frontend/static/js/915.89514730.chunk.js new file mode 100644 index 0000000..e6f60f8 --- /dev/null +++ b/src/modular/web/modular_frontend/static/js/915.89514730.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkmodular_frontend=self.webpackChunkmodular_frontend||[]).push([[915],{3915:function(n,e,t){t.r(e),t.d(e,{CLSThresholds:function(){return I},FCPThresholds:function(){return S},FIDThresholds:function(){return N},INPThresholds:function(){return G},LCPThresholds:function(){return X},TTFBThresholds:function(){return $},getCLS:function(){return F},getFCP:function(){return P},getFID:function(){return R},getINP:function(){return W},getLCP:function(){return Z},getTTFB:function(){return en},onCLS:function(){return F},onFCP:function(){return P},onFID:function(){return R},onINP:function(){return W},onLCP:function(){return Z},onTTFB:function(){return en}});var r,i,o,a,u,c=-1,f=function(n){addEventListener("pageshow",(function(e){e.persisted&&(c=e.timeStamp,n(e))}),!0)},s=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},d=function(){var n=s();return n&&n.activationStart||0},l=function(n,e){var t=s(),r="navigate";return c>=0?r="back-forward-cache":t&&(document.prerendering||d()>0?r="prerender":document.wasDiscarded?r="restore":t.type&&(r=t.type.replace(/_/g,"-"))),{name:n,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},p=function(n,e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(n)){var r=new PerformanceObserver((function(n){Promise.resolve().then((function(){e(n.getEntries())}))}));return r.observe(Object.assign({type:n,buffered:!0},t||{})),r}}catch(n){}},v=function(n,e,t,r){var i,o;return function(a){e.value>=0&&(a||r)&&((o=e.value-(i||0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(n,e){return n>e[1]?"poor":n>e[0]?"needs-improvement":"good"}(e.value,t),n(e))}},m=function(n){requestAnimationFrame((function(){return requestAnimationFrame((function(){return n()}))}))},h=function(n){var e=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||n(e)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},g=function(n){var e=!1;return function(t){e||(n(t),e=!0)}},T=-1,y=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},C=function(n){"hidden"===document.visibilityState&&T>-1&&(T="visibilitychange"===n.type?n.timeStamp:0,L())},E=function(){addEventListener("visibilitychange",C,!0),addEventListener("prerenderingchange",C,!0)},L=function(){removeEventListener("visibilitychange",C,!0),removeEventListener("prerenderingchange",C,!0)},b=function(){return T<0&&(T=y(),E(),f((function(){setTimeout((function(){T=y(),E()}),0)}))),{get firstHiddenTime(){return T}}},w=function(n){document.prerendering?addEventListener("prerenderingchange",(function(){return n()}),!0):n()},S=[1800,3e3],P=function(n,e){e=e||{},w((function(){var t,r=b(),i=l("FCP"),o=p("paint",(function(n){n.forEach((function(n){"first-contentful-paint"===n.name&&(o.disconnect(),n.startTimer.value&&(r.value=i,r.entries=o,t())},u=p("layout-shift",a);u&&(t=v(n,r,I,e.reportAllChanges),h((function(){a(u.takeRecords()),t(!0)})),f((function(){i=0,r=l("CLS",0),t=v(n,r,I,e.reportAllChanges),m((function(){return t()}))})),setTimeout(t,0))})))},A={passive:!0,capture:!0},k=new Date,D=function(n,e){r||(r=e,i=n,o=new Date,x(removeEventListener),M())},M=function(){if(i>=0&&i1e12?new Date:performance.now())-n.timeStamp;"pointerdown"==n.type?function(n,e){var t=function(){D(n,e),i()},r=function(){i()},i=function(){removeEventListener("pointerup",t,A),removeEventListener("pointercancel",r,A)};addEventListener("pointerup",t,A),addEventListener("pointercancel",r,A)}(e,n):D(e,n)}},x=function(n){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return n(e,B,A)}))},N=[100,300],R=function(n,e){e=e||{},w((function(){var t,o=b(),u=l("FID"),c=function(n){n.startTimee.latency){if(t)t.entries.push(n),t.latency=Math.max(t.latency,n.duration);else{var r={id:n.interactionId,latency:n.duration,entries:[n]};U[r.id]=r,Q.push(r)}Q.sort((function(n,e){return e.latency-n.latency})),Q.splice(10).forEach((function(n){delete U[n.id]}))}},W=function(n,e){e=e||{},w((function(){var t;z();var r,i=l("INP"),o=function(n){n.forEach((function(n){n.interactionId&&V(n),"first-input"===n.entryType&&!Q.some((function(e){return e.entries.some((function(e){return n.duration===e.duration&&n.startTime===e.startTime}))}))&&V(n)}));var e,t=(e=Math.min(Q.length-1,Math.floor(K()/50)),Q[e]);t&&t.latency!==i.value&&(i.value=t.latency,i.entries=t.entries,r())},a=p("event",o,{durationThreshold:null!==(t=e.durationThreshold)&&void 0!==t?t:40});r=v(n,i,G,e.reportAllChanges),a&&("interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),h((function(){o(a.takeRecords()),i.value<0&&K()>0&&(i.value=0,i.entries=[]),r(!0)})),f((function(){Q=[],J=j(),i=l("INP"),r=v(n,i,G,e.reportAllChanges)})))}))},X=[2500,4e3],Y={},Z=function(n,e){e=e||{},w((function(){var t,r=b(),i=l("LCP"),o=function(n){var e=n[n.length-1];e&&e.startTimeperformance.now())return;t.value=Math.max(o-d(),0),t.entries=[i],r(!0),f((function(){t=l("TTFB",0),(r=v(n,t,$,e.reportAllChanges))(!0)}))}}))}}}]); +//# sourceMappingURL=915.89514730.chunk.js.map \ No newline at end of file diff --git a/src/modular/web/modular_frontend/static/js/915.89514730.chunk.js.map b/src/modular/web/modular_frontend/static/js/915.89514730.chunk.js.map new file mode 100644 index 0000000..e239ee2 --- /dev/null +++ b/src/modular/web/modular_frontend/static/js/915.89514730.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/915.89514730.chunk.js","mappings":"0qBAAA,IAAIA,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,GAAG,EAAEC,EAAE,SAASN,GAAGO,iBAAiB,YAAY,SAASN,GAAGA,EAAEO,YAAYH,EAAEJ,EAAEQ,UAAUT,EAAEC,GAAG,IAAG,EAAG,EAAES,EAAE,WAAW,OAAOC,OAAOC,aAAaA,YAAYC,kBAAkBD,YAAYC,iBAAiB,cAAc,EAAE,EAAEC,EAAE,WAAW,IAAId,EAAEU,IAAI,OAAOV,GAAGA,EAAEe,iBAAiB,CAAC,EAAEC,EAAE,SAAShB,EAAEC,GAAG,IAAIC,EAAEQ,IAAIP,EAAE,WAA8J,OAAnJE,GAAG,EAAEF,EAAE,qBAAqBD,IAAIe,SAASC,cAAcJ,IAAI,EAAEX,EAAE,YAAYc,SAASE,aAAahB,EAAE,UAAUD,EAAEkB,OAAOjB,EAAED,EAAEkB,KAAKC,QAAQ,KAAK,OAAa,CAACC,KAAKtB,EAAEuB,WAAM,IAAStB,GAAG,EAAEA,EAAEuB,OAAO,OAAOC,MAAM,EAAEC,QAAQ,GAAGC,GAAG,MAAMC,OAAOC,KAAKC,MAAM,KAAKF,OAAOG,KAAKC,MAAM,cAAcD,KAAKE,UAAU,MAAMC,eAAe/B,EAAE,EAAEgC,EAAE,SAASnC,EAAEC,EAAEC,GAAG,IAAI,GAAGkC,oBAAoBC,oBAAoBC,SAAStC,GAAG,CAAC,IAAIG,EAAE,IAAIiC,qBAAqB,SAASpC,GAAGuC,QAAQC,UAAUC,MAAM,WAAWxC,EAAED,EAAE0C,aAAa,GAAG,IAAI,OAAOvC,EAAEwC,QAAQC,OAAOC,OAAO,CAACzB,KAAKpB,EAAE8C,UAAS,GAAI5C,GAAG,CAAC,IAAIC,CAAC,CAAC,CAAC,MAAMH,GAAG,CAAC,EAAE+C,EAAE,SAAS/C,EAAEC,EAAEC,EAAEC,GAAG,IAAIC,EAAEC,EAAE,OAAO,SAASC,GAAGL,EAAEsB,OAAO,IAAIjB,GAAGH,MAAME,EAAEJ,EAAEsB,OAAOnB,GAAG,UAAK,IAASA,KAAKA,EAAEH,EAAEsB,MAAMtB,EAAEwB,MAAMpB,EAAEJ,EAAEuB,OAAO,SAASxB,EAAEC,GAAG,OAAOD,EAAEC,EAAE,GAAG,OAAOD,EAAEC,EAAE,GAAG,oBAAoB,MAAM,CAApE,CAAsEA,EAAEsB,MAAMrB,GAAGF,EAAEC,GAAG,CAAC,EAAE+C,EAAE,SAAShD,GAAGiD,uBAAuB,WAAW,OAAOA,uBAAuB,WAAW,OAAOjD,GAAG,GAAG,GAAG,EAAEkD,EAAE,SAASlD,GAAG,IAAIC,EAAE,SAASA,GAAG,aAAaA,EAAEmB,MAAM,WAAWH,SAASkC,iBAAiBnD,EAAEC,EAAE,EAAEM,iBAAiB,mBAAmBN,GAAE,GAAIM,iBAAiB,WAAWN,GAAE,EAAG,EAAEmD,EAAE,SAASpD,GAAG,IAAIC,GAAE,EAAG,OAAO,SAASC,GAAGD,IAAID,EAAEE,GAAGD,GAAE,EAAG,CAAC,EAAEoD,GAAG,EAAEC,EAAE,WAAW,MAAM,WAAWrC,SAASkC,iBAAiBlC,SAASC,aAAa,IAAI,CAAC,EAAEqC,EAAE,SAASvD,GAAG,WAAWiB,SAASkC,iBAAiBE,GAAG,IAAIA,EAAE,qBAAqBrD,EAAEoB,KAAKpB,EAAES,UAAU,EAAE+C,IAAI,EAAEC,EAAE,WAAWlD,iBAAiB,mBAAmBgD,GAAE,GAAIhD,iBAAiB,qBAAqBgD,GAAE,EAAG,EAAEC,EAAE,WAAWE,oBAAoB,mBAAmBH,GAAE,GAAIG,oBAAoB,qBAAqBH,GAAE,EAAG,EAAEI,EAAE,WAAW,OAAON,EAAE,IAAIA,EAAEC,IAAIG,IAAInD,GAAG,WAAWsD,YAAY,WAAWP,EAAEC,IAAIG,GAAG,GAAG,EAAE,KAAK,CAAKI,sBAAkB,OAAOR,CAAC,EAAE,EAAES,EAAE,SAAS9D,GAAGiB,SAASC,aAAaX,iBAAiB,sBAAsB,WAAW,OAAOP,GAAG,IAAG,GAAIA,GAAG,EAAE+D,EAAE,CAAC,KAAK,KAAKC,EAAE,SAAShE,EAAEC,GAAGA,EAAEA,GAAG,CAAC,EAAE6D,GAAG,WAAW,IAAI5D,EAAEC,EAAEwD,IAAIvD,EAAEY,EAAE,OAAOX,EAAE8B,EAAE,SAAS,SAASnC,GAAGA,EAAEiE,SAAS,SAASjE,GAAG,2BAA2BA,EAAEsB,OAAOjB,EAAE6D,aAAalE,EAAEmE,UAAUhE,EAAE0D,kBAAkBzD,EAAEmB,MAAMQ,KAAKqC,IAAIpE,EAAEmE,UAAUrD,IAAI,GAAGV,EAAEsB,QAAQ2C,KAAKrE,GAAGE,GAAE,IAAK,GAAG,IAAIG,IAAIH,EAAE6C,EAAE/C,EAAEI,EAAE2D,EAAE9D,EAAEqE,kBAAkBhE,GAAG,SAASH,GAAGC,EAAEY,EAAE,OAAOd,EAAE6C,EAAE/C,EAAEI,EAAE2D,EAAE9D,EAAEqE,kBAAkBtB,GAAG,WAAW5C,EAAEmB,MAAMX,YAAYkB,MAAM3B,EAAEM,UAAUP,GAAE,EAAG,GAAG,IAAI,GAAG,EAAEqE,EAAE,CAAC,GAAG,KAAKC,EAAE,SAASxE,EAAEC,GAAGA,EAAEA,GAAG,CAAC,EAAE+D,EAAEZ,GAAG,WAAW,IAAIlD,EAAEC,EAAEa,EAAE,MAAM,GAAGZ,EAAE,EAAEC,EAAE,GAAGK,EAAE,SAASV,GAAGA,EAAEiE,SAAS,SAASjE,GAAG,IAAIA,EAAEyE,eAAe,CAAC,IAAIxE,EAAEI,EAAE,GAAGH,EAAEG,EAAEA,EAAEqE,OAAO,GAAGtE,GAAGJ,EAAEmE,UAAUjE,EAAEiE,UAAU,KAAKnE,EAAEmE,UAAUlE,EAAEkE,UAAU,KAAK/D,GAAGJ,EAAEuB,MAAMlB,EAAEgE,KAAKrE,KAAKI,EAAEJ,EAAEuB,MAAMlB,EAAE,CAACL,GAAG,CAAC,IAAII,EAAED,EAAEoB,QAAQpB,EAAEoB,MAAMnB,EAAED,EAAEuB,QAAQrB,EAAEH,IAAI,EAAEY,EAAEqB,EAAE,eAAezB,GAAGI,IAAIZ,EAAE6C,EAAE/C,EAAEG,EAAEoE,EAAEtE,EAAEqE,kBAAkBpB,GAAG,WAAWxC,EAAEI,EAAE6D,eAAezE,GAAE,EAAG,IAAII,GAAG,WAAWF,EAAE,EAAED,EAAEa,EAAE,MAAM,GAAGd,EAAE6C,EAAE/C,EAAEG,EAAEoE,EAAEtE,EAAEqE,kBAAkBtB,GAAG,WAAW,OAAO9C,GAAG,GAAG,IAAI0D,WAAW1D,EAAE,GAAG,IAAI,EAAE0E,EAAE,CAACC,SAAQ,EAAGC,SAAQ,GAAIC,EAAE,IAAIlD,KAAKmD,EAAE,SAAS7E,EAAEC,GAAGJ,IAAIA,EAAEI,EAAEH,EAAEE,EAAED,EAAE,IAAI2B,KAAKoD,EAAEvB,qBAAqBwB,IAAI,EAAEA,EAAE,WAAW,GAAGjF,GAAG,GAAGA,EAAEC,EAAE6E,EAAE,CAAC,IAAI3E,EAAE,CAAC+E,UAAU,cAAc7D,KAAKtB,EAAEoB,KAAKgE,OAAOpF,EAAEoF,OAAOC,WAAWrF,EAAEqF,WAAWlB,UAAUnE,EAAES,UAAU6E,gBAAgBtF,EAAES,UAAUR,GAAGE,EAAE8D,SAAS,SAASjE,GAAGA,EAAEI,EAAE,IAAID,EAAE,EAAE,CAAC,EAAEoF,EAAE,SAASvF,GAAG,GAAGA,EAAEqF,WAAW,CAAC,IAAIpF,GAAGD,EAAES,UAAU,KAAK,IAAIoB,KAAKjB,YAAYkB,OAAO9B,EAAES,UAAU,eAAeT,EAAEoB,KAAK,SAASpB,EAAEC,GAAG,IAAIC,EAAE,WAAW8E,EAAEhF,EAAEC,GAAGG,GAAG,EAAED,EAAE,WAAWC,GAAG,EAAEA,EAAE,WAAWsD,oBAAoB,YAAYxD,EAAE0E,GAAGlB,oBAAoB,gBAAgBvD,EAAEyE,EAAE,EAAErE,iBAAiB,YAAYL,EAAE0E,GAAGrE,iBAAiB,gBAAgBJ,EAAEyE,EAAE,CAAhO,CAAkO3E,EAAED,GAAGgF,EAAE/E,EAAED,EAAE,CAAC,EAAEiF,EAAE,SAASjF,GAAG,CAAC,YAAY,UAAU,aAAa,eAAeiE,SAAS,SAAShE,GAAG,OAAOD,EAAEC,EAAEsF,EAAEX,EAAE,GAAG,EAAEY,EAAE,CAAC,IAAI,KAAKC,EAAE,SAASvF,EAAEE,GAAGA,EAAEA,GAAG,CAAC,EAAE0D,GAAG,WAAW,IAAIzD,EAAEK,EAAEiD,IAAI7C,EAAEE,EAAE,OAAOgC,EAAE,SAAShD,GAAGA,EAAEmE,UAAUzD,EAAEmD,kBAAkB/C,EAAES,MAAMvB,EAAEsF,gBAAgBtF,EAAEmE,UAAUrD,EAAEY,QAAQ2C,KAAKrE,GAAGK,GAAE,GAAI,EAAEgD,EAAE,SAASrD,GAAGA,EAAEiE,QAAQjB,EAAE,EAAEM,EAAEnB,EAAE,cAAckB,GAAGhD,EAAE0C,EAAE7C,EAAEY,EAAE0E,EAAEpF,EAAEkE,kBAAkBhB,GAAGJ,EAAEE,GAAG,WAAWC,EAAEC,EAAEqB,eAAerB,EAAEY,YAAY,KAAKZ,GAAGhD,GAAG,WAAW,IAAIA,EAAEQ,EAAEE,EAAE,OAAOX,EAAE0C,EAAE7C,EAAEY,EAAE0E,EAAEpF,EAAEkE,kBAAkBnE,EAAE,GAAGF,GAAG,EAAED,EAAE,KAAKiF,EAAE1E,kBAAkBD,EAAE0C,EAAE7C,EAAEkE,KAAK/D,GAAG4E,GAAG,GAAG,GAAG,EAAEQ,EAAE,EAAEC,EAAE,IAAIC,EAAE,EAAEC,EAAE,SAAS7F,GAAGA,EAAEiE,SAAS,SAASjE,GAAGA,EAAE8F,gBAAgBH,EAAE5D,KAAKgE,IAAIJ,EAAE3F,EAAE8F,eAAeF,EAAE7D,KAAKqC,IAAIwB,EAAE5F,EAAE8F,eAAeJ,EAAEE,GAAGA,EAAED,GAAG,EAAE,EAAE,EAAE,GAAG,EAAEK,EAAE,WAAW,OAAO5F,EAAEsF,EAAE9E,YAAYqF,kBAAkB,CAAC,EAAEC,EAAE,WAAW,qBAAqBtF,aAAaR,IAAIA,EAAE+B,EAAE,QAAQ0D,EAAE,CAACzE,KAAK,QAAQ0B,UAAS,EAAGqD,kBAAkB,IAAI,EAAEC,EAAE,CAAC,IAAI,KAAKC,EAAE,EAAEC,EAAE,WAAW,OAAON,IAAIK,CAAC,EAAEE,EAAE,GAAGC,EAAE,CAAC,EAAEC,EAAE,SAASzG,GAAG,IAAIC,EAAEsG,EAAEA,EAAE7B,OAAO,GAAGxE,EAAEsG,EAAExG,EAAE8F,eAAe,GAAG5F,GAAGqG,EAAE7B,OAAO,IAAI1E,EAAE0G,SAASzG,EAAE0G,QAAQ,CAAC,GAAGzG,EAAEA,EAAEwB,QAAQ2C,KAAKrE,GAAGE,EAAEyG,QAAQ5E,KAAKqC,IAAIlE,EAAEyG,QAAQ3G,EAAE0G,cAAc,CAAC,IAAIvG,EAAE,CAACwB,GAAG3B,EAAE8F,cAAca,QAAQ3G,EAAE0G,SAAShF,QAAQ,CAAC1B,IAAIwG,EAAErG,EAAEwB,IAAIxB,EAAEoG,EAAElC,KAAKlE,EAAE,CAACoG,EAAEK,MAAM,SAAS5G,EAAEC,GAAG,OAAOA,EAAE0G,QAAQ3G,EAAE2G,OAAO,IAAIJ,EAAEM,OAAO,IAAI5C,SAAS,SAASjE,UAAUwG,EAAExG,EAAE2B,GAAG,GAAG,CAAC,EAAEmF,EAAE,SAAS9G,EAAEC,GAAGA,EAAEA,GAAG,CAAC,EAAE6D,GAAG,WAAW,IAAI5D,EAAEgG,IAAI,IAAI/F,EAAEC,EAAEY,EAAE,OAAOX,EAAE,SAASL,GAAGA,EAAEiE,SAAS,SAASjE,GAAIA,EAAE8F,eAAeW,EAAEzG,GAAG,gBAAgBA,EAAEmF,YAAcoB,EAAEQ,MAAM,SAAS9G,GAAG,OAAOA,EAAEyB,QAAQqF,MAAM,SAAS9G,GAAG,OAAOD,EAAE0G,WAAWzG,EAAEyG,UAAU1G,EAAEmE,YAAYlE,EAAEkE,SAAS,GAAG,KAAKsC,EAAEzG,EAAG,IAAI,IAAIC,EAAEC,GAAGD,EAAE8B,KAAKgE,IAAIQ,EAAE7B,OAAO,EAAE3C,KAAKC,MAAMsE,IAAI,KAAKC,EAAEtG,IAAIC,GAAGA,EAAEyG,UAAUvG,EAAEmB,QAAQnB,EAAEmB,MAAMrB,EAAEyG,QAAQvG,EAAEsB,QAAQxB,EAAEwB,QAAQvB,IAAI,EAAEO,EAAEyB,EAAE,QAAQ9B,EAAE,CAAC8F,kBAAkB,QAAQjG,EAAED,EAAEkG,yBAAoB,IAASjG,EAAEA,EAAE,KAAKC,EAAE4C,EAAE/C,EAAEI,EAAEgG,EAAEnG,EAAEqE,kBAAkB5D,IAAI,kBAAkBsG,uBAAuBC,WAAWvG,EAAEiC,QAAQ,CAACvB,KAAK,cAAc0B,UAAS,IAAKI,GAAG,WAAW7C,EAAEK,EAAEiE,eAAevE,EAAEmB,MAAM,GAAG+E,IAAI,IAAIlG,EAAEmB,MAAM,EAAEnB,EAAEsB,QAAQ,IAAIvB,GAAE,EAAG,IAAIG,GAAG,WAAWiG,EAAE,GAAGF,EAAEL,IAAI5F,EAAEY,EAAE,OAAOb,EAAE4C,EAAE/C,EAAEI,EAAEgG,EAAEnG,EAAEqE,iBAAiB,IAAI,GAAG,EAAE4C,EAAE,CAAC,KAAK,KAAKC,EAAE,CAAC,EAAEC,EAAE,SAASpH,EAAEC,GAAGA,EAAEA,GAAG,CAAC,EAAE6D,GAAG,WAAW,IAAI5D,EAAEC,EAAEwD,IAAIvD,EAAEY,EAAE,OAAOX,EAAE,SAASL,GAAG,IAAIC,EAAED,EAAEA,EAAE0E,OAAO,GAAGzE,GAAGA,EAAEkE,UAAUhE,EAAE0D,kBAAkBzD,EAAEmB,MAAMQ,KAAKqC,IAAInE,EAAEkE,UAAUrD,IAAI,GAAGV,EAAEsB,QAAQ,CAACzB,GAAGC,IAAI,EAAEQ,EAAEyB,EAAE,2BAA2B9B,GAAG,GAAGK,EAAE,CAACR,EAAE6C,EAAE/C,EAAEI,EAAE8G,EAAEjH,EAAEqE,kBAAkB,IAAIjB,EAAED,GAAG,WAAW+D,EAAE/G,EAAEuB,MAAMtB,EAAEK,EAAEiE,eAAejE,EAAEwD,aAAaiD,EAAE/G,EAAEuB,KAAI,EAAGzB,GAAE,GAAI,IAAI,CAAC,UAAU,SAAS+D,SAAS,SAASjE,GAAGO,iBAAiBP,GAAG,WAAW,OAAO4D,WAAWP,EAAE,EAAE,IAAG,EAAG,IAAIH,EAAEG,GAAG/C,GAAG,SAASH,GAAGC,EAAEY,EAAE,OAAOd,EAAE6C,EAAE/C,EAAEI,EAAE8G,EAAEjH,EAAEqE,kBAAkBtB,GAAG,WAAW5C,EAAEmB,MAAMX,YAAYkB,MAAM3B,EAAEM,UAAU0G,EAAE/G,EAAEuB,KAAI,EAAGzB,GAAE,EAAG,GAAG,GAAG,CAAC,GAAG,EAAEmH,EAAE,CAAC,IAAI,MAAMC,GAAE,SAAStH,EAAEC,GAAGgB,SAASC,aAAa4C,GAAG,WAAW,OAAO9D,EAAEC,EAAE,IAAI,aAAagB,SAASsG,WAAWhH,iBAAiB,QAAQ,WAAW,OAAOP,EAAEC,EAAE,IAAG,GAAI2D,WAAW3D,EAAE,EAAE,EAAEuH,GAAE,SAASxH,EAAEC,GAAGA,EAAEA,GAAG,CAAC,EAAE,IAAIC,EAAEc,EAAE,QAAQb,EAAE4C,EAAE/C,EAAEE,EAAEmH,EAAEpH,EAAEqE,kBAAkBgD,IAAG,WAAW,IAAIlH,EAAEM,IAAI,GAAGN,EAAE,CAAC,IAAIC,EAAED,EAAEqH,cAAc,GAAGpH,GAAG,GAAGA,EAAEO,YAAYkB,MAAM,OAAO5B,EAAEqB,MAAMQ,KAAKqC,IAAI/D,EAAES,IAAI,GAAGZ,EAAEwB,QAAQ,CAACtB,GAAGD,GAAE,GAAIG,GAAG,WAAWJ,EAAEc,EAAE,OAAO,IAAIb,EAAE4C,EAAE/C,EAAEE,EAAEmH,EAAEpH,EAAEqE,oBAAmB,EAAG,GAAG,CAAC,GAAG,C","sources":["../node_modules/web-vitals/dist/web-vitals.js"],"sourcesContent":["var e,n,t,r,i,a=-1,o=function(e){addEventListener(\"pageshow\",(function(n){n.persisted&&(a=n.timeStamp,e(n))}),!0)},c=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType(\"navigation\")[0]},u=function(){var e=c();return e&&e.activationStart||0},f=function(e,n){var t=c(),r=\"navigate\";a>=0?r=\"back-forward-cache\":t&&(document.prerendering||u()>0?r=\"prerender\":document.wasDiscarded?r=\"restore\":t.type&&(r=t.type.replace(/_/g,\"-\")));return{name:e,value:void 0===n?-1:n,rating:\"good\",delta:0,entries:[],id:\"v3-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},s=function(e,n,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){n(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},t||{})),r}}catch(e){}},d=function(e,n,t,r){var i,a;return function(o){n.value>=0&&(o||r)&&((a=n.value-(i||0))||void 0===i)&&(i=n.value,n.delta=a,n.rating=function(e,n){return e>n[1]?\"poor\":e>n[0]?\"needs-improvement\":\"good\"}(n.value,t),e(n))}},l=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},p=function(e){var n=function(n){\"pagehide\"!==n.type&&\"hidden\"!==document.visibilityState||e(n)};addEventListener(\"visibilitychange\",n,!0),addEventListener(\"pagehide\",n,!0)},v=function(e){var n=!1;return function(t){n||(e(t),n=!0)}},m=-1,h=function(){return\"hidden\"!==document.visibilityState||document.prerendering?1/0:0},g=function(e){\"hidden\"===document.visibilityState&&m>-1&&(m=\"visibilitychange\"===e.type?e.timeStamp:0,T())},y=function(){addEventListener(\"visibilitychange\",g,!0),addEventListener(\"prerenderingchange\",g,!0)},T=function(){removeEventListener(\"visibilitychange\",g,!0),removeEventListener(\"prerenderingchange\",g,!0)},E=function(){return m<0&&(m=h(),y(),o((function(){setTimeout((function(){m=h(),y()}),0)}))),{get firstHiddenTime(){return m}}},C=function(e){document.prerendering?addEventListener(\"prerenderingchange\",(function(){return e()}),!0):e()},L=[1800,3e3],b=function(e,n){n=n||{},C((function(){var t,r=E(),i=f(\"FCP\"),a=s(\"paint\",(function(e){e.forEach((function(e){\"first-contentful-paint\"===e.name&&(a.disconnect(),e.startTimer.value&&(r.value=i,r.entries=a,t())},u=s(\"layout-shift\",c);u&&(t=d(e,r,w,n.reportAllChanges),p((function(){c(u.takeRecords()),t(!0)})),o((function(){i=0,r=f(\"CLS\",0),t=d(e,r,w,n.reportAllChanges),l((function(){return t()}))})),setTimeout(t,0))})))},A={passive:!0,capture:!0},I=new Date,P=function(r,i){e||(e=i,n=r,t=new Date,k(removeEventListener),F())},F=function(){if(n>=0&&n1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,n){var t=function(){P(e,n),i()},r=function(){i()},i=function(){removeEventListener(\"pointerup\",t,A),removeEventListener(\"pointercancel\",r,A)};addEventListener(\"pointerup\",t,A),addEventListener(\"pointercancel\",r,A)}(n,e):P(n,e)}},k=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(n){return e(n,M,A)}))},D=[100,300],x=function(t,i){i=i||{},C((function(){var a,c=E(),u=f(\"FID\"),l=function(e){e.startTimen.latency){if(t)t.entries.push(e),t.latency=Math.max(t.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};J[r.id]=r,G.push(r)}G.sort((function(e,n){return n.latency-e.latency})),G.splice(10).forEach((function(e){delete J[e.id]}))}},Q=function(e,n){n=n||{},C((function(){var t;q();var r,i=f(\"INP\"),a=function(e){e.forEach((function(e){(e.interactionId&&K(e),\"first-input\"===e.entryType)&&(!G.some((function(n){return n.entries.some((function(n){return e.duration===n.duration&&e.startTime===n.startTime}))}))&&K(e))}));var n,t=(n=Math.min(G.length-1,Math.floor(z()/50)),G[n]);t&&t.latency!==i.value&&(i.value=t.latency,i.entries=t.entries,r())},c=s(\"event\",a,{durationThreshold:null!==(t=n.durationThreshold)&&void 0!==t?t:40});r=d(e,i,j,n.reportAllChanges),c&&(\"interactionId\"in PerformanceEventTiming.prototype&&c.observe({type:\"first-input\",buffered:!0}),p((function(){a(c.takeRecords()),i.value<0&&z()>0&&(i.value=0,i.entries=[]),r(!0)})),o((function(){G=[],_=O(),i=f(\"INP\"),r=d(e,i,j,n.reportAllChanges)})))}))},U=[2500,4e3],V={},W=function(e,n){n=n||{},C((function(){var t,r=E(),i=f(\"LCP\"),a=function(e){var n=e[e.length-1];n&&n.startTimeperformance.now())return;t.value=Math.max(a-u(),0),t.entries=[i],r(!0),o((function(){t=f(\"TTFB\",0),(r=d(e,t,X,n.reportAllChanges))(!0)}))}}))};export{w as CLSThresholds,L as FCPThresholds,D as FIDThresholds,j as INPThresholds,U as LCPThresholds,X as TTFBThresholds,S as getCLS,b as getFCP,x as getFID,Q as getINP,W as getLCP,Z as getTTFB,S as onCLS,b as onFCP,x as onFID,Q as onINP,W as onLCP,Z as onTTFB};\n"],"names":["e","n","t","r","i","a","o","addEventListener","persisted","timeStamp","c","window","performance","getEntriesByType","u","activationStart","f","document","prerendering","wasDiscarded","type","replace","name","value","rating","delta","entries","id","concat","Date","now","Math","floor","random","navigationType","s","PerformanceObserver","supportedEntryTypes","includes","Promise","resolve","then","getEntries","observe","Object","assign","buffered","d","l","requestAnimationFrame","p","visibilityState","v","m","h","g","T","y","removeEventListener","E","setTimeout","firstHiddenTime","C","L","b","forEach","disconnect","startTime","max","push","reportAllChanges","w","S","hadRecentInput","length","takeRecords","A","passive","capture","I","P","k","F","entryType","target","cancelable","processingStart","M","D","x","B","R","H","N","interactionId","min","O","interactionCount","q","durationThreshold","j","_","z","G","J","K","duration","latency","sort","splice","Q","some","PerformanceEventTiming","prototype","U","V","W","X","Y","readyState","Z","responseStart"],"sourceRoot":""} \ No newline at end of file diff --git a/src/modular/web/modular_frontend/static/js/main.1ff7d330.js b/src/modular/web/modular_frontend/static/js/main.1ff7d330.js new file mode 100644 index 0000000..ea8dd38 --- /dev/null +++ b/src/modular/web/modular_frontend/static/js/main.1ff7d330.js @@ -0,0 +1,3 @@ +/*! For license information please see main.1ff7d330.js.LICENSE.txt */ +!function(){var e={3675:function(e,t,n){"use strict";n.d(t,{Z:function(){return ie}});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?c(x,--y):0,m--,10===b&&(m=1,v--),b}function E(){return b=y2||A(b)>3?"":" "}function I(e,t){for(;--t&&E()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return M(e,T()+(t<6&&32==k()&&32==E()))}function O(e){for(;E();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&O(b);break;case 40:41===e&&O(e);break;case 92:E()}return y}function N(e,t){for(;E()&&e+b!==57&&(e+b!==84||47!==k()););return"/*"+M(t,y-1)+"*"+a(47===e?e:E())}function U(e){for(;!A(k());)E();return M(e,y)}var D="-ms-",F="-moz-",z="-webkit-",B="comm",j="rule",Z="decl",H="@keyframes";function G(e,t){for(var n="",r=h(e),i=0;i0&&d(F)-g&&p(b>32?K(F+";",r,n,g-1):K(l(F," ","")+";",r,n,g-2),h);break;case 59:F+=";";default:if(p(D=X(F,t,n,v,m,i,f,C,R=[],O=[],g),o),123===A)if(0===m)q(F,t,D,D,R,o,g,f,O);else switch(99===y&&110===c(F,3)?100:y){case 100:case 108:case 109:case 115:q(e,D,D,r&&p(X(e,D,D,0,0,i,f,C,i,R=[],g),O),i,O,g,f,r?R:O);break;default:q(F,D,D,D,[""],O,0,f,O)}}v=m=b=0,S=M=1,C=F="",g=s;break;case 58:g=1+d(F),b=x;default:if(S<1)if(123==A)--S;else if(125==A&&0==S++&&125==_())continue;switch(F+=a(A),A*S){case 38:M=m>0?1:(F+="\f",-1);break;case 44:f[v++]=(d(F)-1)*M,M=1;break;case 64:45===k()&&(F+=P(E())),y=k(),m=g=d(C=F+=U(T())),A++;break;case 45:45===x&&2==d(F)&&(S=0)}}return o}function X(e,t,n,r,a,o,u,c,d,p,v){for(var m=a-1,g=0===a?o:[""],y=h(g),b=0,x=0,w=0;b0?g[_]+" "+E:l(E,/&\f/g,g[_])))&&(d[w++]=k);return S(e,t,n,0===a?j:c,d,p,v)}function Y(e,t,n){return S(e,t,n,B,a(b),f(e,2,-2),0)}function K(e,t,n,r){return S(e,t,n,Z,f(e,0,r),f(e,r+1,-1),r)}var Q=function(e,t,n){for(var r=0,i=0;r=i,i=k(),38===r&&12===i&&(t[n]=1),!A(i);)E();return M(e,y)},J=function(e,t){return R(function(e,t){var n=-1,r=44;do{switch(A(r)){case 0:38===r&&12===k()&&(t[n]=1),e[n]+=Q(y-1,t,n);break;case 2:e[n]+=P(r);break;case 4:if(44===r){e[++n]=58===k()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=a(r)}}while(r=E());return e}(C(e),t))},$=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||$.get(n))&&!r){$.set(e,!0);for(var i=[],a=J(t,i),o=n.props,s=0,l=0;s6)switch(c(e,t+1)){case 109:if(45!==c(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+z+"$2-$3$1"+F+(108==c(e,t+3)?"$3":"$2-$3"))+e;case 115:return~u(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==c(e,t+1))break;case 6444:switch(c(e,d(e)-3-(~u(e,"!important")&&10))){case 107:return l(e,":",":"+z)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+z+(45===c(e,14)?"inline-":"")+"box$3$1"+z+"$2$3$1"+D+"$2box$3")+e}break;case 5936:switch(c(e,t+11)){case 114:return z+e+D+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return z+e+D+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return z+e+D+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return z+e+D+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Z:e.return=ne(e.value,e.length);break;case H:return G([w(e,{value:l(e.value,"@","@"+z)})],r);case j:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return G([w(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return G([w(e,{props:[l(t,/:(plac\w+)/,":"+z+"input-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,D+"input-$1")]})],r)}return""}))}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||re;var a,o,s={},l=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:d}}},847:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return o},j:function(){return s}});var i=n(9867),a=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,o=a||function(e){return e()},s=a||i.useLayoutEffect},7546:function(e,t,n){"use strict";n.d(t,{My:function(){return a},fp:function(){return r},hC:function(){return i}});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},a=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}}},7424:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0;var i=r(n(5511)),a=n(2834),o=(0,i.default)((0,a.jsx)("path",{d:"M7.5 5.6 10 7 8.6 4.5 10 2 7.5 3.4 5 2l1.4 2.5L5 7zm12 9.8L17 14l1.4 2.5L17 19l2.5-1.4L22 19l-1.4-2.5L22 14zM22 2l-2.5 1.4L17 2l1.4 2.5L17 7l2.5-1.4L22 7l-1.4-2.5zm-7.63 5.29a.9959.9959 0 0 0-1.41 0L1.29 18.96c-.39.39-.39 1.02 0 1.41l2.34 2.34c.39.39 1.02.39 1.41 0L16.7 11.05c.39-.39.39-1.02 0-1.41l-2.33-2.35zm-1.03 5.49-2.12-2.12 2.44-2.44 2.12 2.12-2.44 2.44z"}),"AutoFixHigh");t.Z=o},8880:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0;var i=r(n(5511)),a=n(2834),o=(0,i.default)((0,a.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.Z=o},8018:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0;var i=r(n(5511)),a=n(2834),o=(0,i.default)((0,a.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.Z=o},854:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0;var i=r(n(5511)),a=n(2834),o=(0,i.default)((0,a.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=o},9746:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0;var i=r(n(5511)),a=n(2834),o=(0,i.default)((0,a.jsx)("path",{d:"M9.19 6.35c-2.04 2.29-3.44 5.58-3.57 5.89L2 10.69l4.05-4.05c.47-.47 1.15-.68 1.81-.55l1.33.26zM11.17 17s3.74-1.55 5.89-3.7c5.4-5.4 4.5-9.62 4.21-10.57-.95-.3-5.17-1.19-10.57 4.21C8.55 9.09 7 12.83 7 12.83L11.17 17zm6.48-2.19c-2.29 2.04-5.58 3.44-5.89 3.57L13.31 22l4.05-4.05c.47-.47.68-1.15.55-1.81l-.26-1.33zM9 18c0 .83-.34 1.58-.88 2.12C6.94 21.3 2 22 2 22s.7-4.94 1.88-6.12C4.42 15.34 5.17 15 6 15c1.66 0 3 1.34 3 3zm4-9c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2z"}),"RocketLaunch");t.Z=o},8206:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0;var i=r(n(5511)),a=n(2834),o=(0,i.default)([(0,a.jsx)("path",{d:"m22 20.59-4.69-4.69C18.37 14.55 19 12.85 19 11c0-4.42-3.58-8-8-8-4.08 0-7.44 3.05-7.93 7h2.02C5.57 7.17 8.03 5 11 5c3.31 0 6 2.69 6 6s-2.69 6-6 6c-2.42 0-4.5-1.44-5.45-3.5H3.4C4.45 16.69 7.46 19 11 19c1.85 0 3.55-.63 4.9-1.69L20.59 22 22 20.59z"},"0"),(0,a.jsx)("path",{d:"M8.43 9.69 9.65 15h1.64l1.26-3.78.95 2.28h2V12h-1l-1.25-3h-1.54l-1.12 3.37L9.35 7H7.7l-1.25 4H1v1.5h6.55z"},"1")],"Troubleshoot");t.Z=o},5511:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(5883)},5238:function(e,t){"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case a:case s:case o:case d:case h:return e;default:switch(e=e&&e.$$typeof){case c:case u:case f:case v:case p:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference")},8918:function(e,t,n){"use strict";n(5238)},2848:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(7462),i=n(3366),a=n(5055),o=n(2201),s=n(8708),l=n(3561),u=n(6290),c=n(4942);function f(e,t){var n;return(0,r.Z)({toolbar:(n={minHeight:56},(0,c.Z)(n,e.up("xs"),{"@media (orientation: landscape)":{minHeight:48}}),(0,c.Z)(n,e.up("sm"),{minHeight:64}),n)},t)}var d=n(7237),h={black:"#000",white:"#fff"},p={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},v={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},m={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},g={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},y={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},b={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},x={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},S=["mode","contrastThreshold","tonalOffset"],w={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:h.white,default:h.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_={text:{primary:h.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:h.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function E(e,t,n,r){var i=r.light||r,a=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,d.$n)(e.main,i):"dark"===t&&(e.dark=(0,d._j)(e.main,a)))}function k(e){var t=e.mode,n=void 0===t?"light":t,s=e.contrastThreshold,l=void 0===s?3:s,u=e.tonalOffset,c=void 0===u?.2:u,f=(0,i.Z)(e,S),k=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y[200],light:y[50],dark:y[400]}:{main:y[700],light:y[400],dark:y[800]}}(n),T=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[200],light:v[50],dark:v[400]}:{main:v[500],light:v[300],dark:v[700]}}(n),M=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[500],light:m[300],dark:m[700]}:{main:m[700],light:m[400],dark:m[800]}}(n),A=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:b[400],light:b[300],dark:b[700]}:{main:b[700],light:b[500],dark:b[900]}}(n),C=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:x[400],light:x[300],dark:x[700]}:{main:x[800],light:x[500],dark:x[900]}}(n),R=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[400],light:g[300],dark:g[700]}:{main:"#ed6c02",light:g[500],dark:g[900]}}(n);function P(e){return(0,d.mi)(e,_.text.primary)>=l?_.text.primary:w.text.primary}var L=function(e){var t=e.color,n=e.name,i=e.mainShade,o=void 0===i?500:i,s=e.lightShade,l=void 0===s?300:s,u=e.darkShade,f=void 0===u?700:u;if(!(t=(0,r.Z)({},t)).main&&t[o]&&(t.main=t[o]),!t.hasOwnProperty("main"))throw new Error((0,a.Z)(11,n?" (".concat(n,")"):"",o));if("string"!==typeof t.main)throw new Error((0,a.Z)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return E(t,"light",l,c),E(t,"dark",f,c),t.contrastText||(t.contrastText=P(t.main)),t},I={dark:_,light:w};return(0,o.Z)((0,r.Z)({common:(0,r.Z)({},h),mode:n,primary:L({color:k,name:"primary"}),secondary:L({color:T,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:L({color:M,name:"error"}),warning:L({color:R,name:"warning"}),info:L({color:A,name:"info"}),success:L({color:C,name:"success"}),grey:p,contrastThreshold:l,getContrastText:P,augmentColor:L,tonalOffset:c},I[n]),f)}var T=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];var M={textTransform:"uppercase"},A='"Roboto", "Helvetica", "Arial", sans-serif';function C(e,t){var n="function"===typeof t?t(e):t,a=n.fontFamily,s=void 0===a?A:a,l=n.fontSize,u=void 0===l?14:l,c=n.fontWeightLight,f=void 0===c?300:c,d=n.fontWeightRegular,h=void 0===d?400:d,p=n.fontWeightMedium,v=void 0===p?500:p,m=n.fontWeightBold,g=void 0===m?700:m,y=n.htmlFontSize,b=void 0===y?16:y,x=n.allVariants,S=n.pxToRem,w=(0,i.Z)(n,T);var _=u/14,E=S||function(e){return"".concat(e/b*_,"rem")},k=function(e,t,n,i,a){return(0,r.Z)({fontFamily:s,fontWeight:e,fontSize:E(t),lineHeight:n},s===A?{letterSpacing:"".concat((o=i/t,Math.round(1e5*o)/1e5),"em")}:{},a,x);var o},C={h1:k(f,96,1.167,-1.5),h2:k(f,60,1.2,-.5),h3:k(h,48,1.167,0),h4:k(h,34,1.235,.25),h5:k(h,24,1.334,0),h6:k(v,20,1.6,.15),subtitle1:k(h,16,1.75,.15),subtitle2:k(v,14,1.57,.1),body1:k(h,16,1.5,.15),body2:k(h,14,1.43,.15),button:k(v,14,1.75,.4,M),caption:k(h,12,1.66,.4),overline:k(h,12,2.66,1,M),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,o.Z)((0,r.Z)({htmlFontSize:b,pxToRem:E,fontFamily:s,fontSize:u,fontWeightLight:f,fontWeightRegular:h,fontWeightMedium:v,fontWeightBold:g},C),w,{clone:!1})}function R(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var P=["none",R(0,2,1,-1,0,1,1,0,0,1,3,0),R(0,3,1,-2,0,2,2,0,0,1,5,0),R(0,3,3,-2,0,3,4,0,0,1,8,0),R(0,2,4,-1,0,4,5,0,0,1,10,0),R(0,3,5,-1,0,5,8,0,0,1,14,0),R(0,3,5,-1,0,6,10,0,0,1,18,0),R(0,4,5,-2,0,7,10,1,0,2,16,1),R(0,5,5,-3,0,8,10,1,0,3,14,2),R(0,5,6,-3,0,9,12,1,0,3,16,2),R(0,6,6,-3,0,10,14,1,0,4,18,3),R(0,6,7,-4,0,11,15,1,0,4,20,3),R(0,7,8,-4,0,12,17,2,0,5,22,4),R(0,7,8,-4,0,13,19,2,0,5,24,4),R(0,7,9,-4,0,14,21,2,0,5,26,4),R(0,8,9,-5,0,15,22,2,0,6,28,5),R(0,8,10,-5,0,16,24,2,0,6,30,5),R(0,8,11,-5,0,17,26,2,0,6,32,5),R(0,9,11,-5,0,18,28,2,0,7,34,6),R(0,9,12,-6,0,19,29,2,0,7,36,6),R(0,10,13,-6,0,20,31,3,0,8,38,7),R(0,10,13,-6,0,21,33,3,0,8,40,7),R(0,10,14,-6,0,22,35,3,0,8,42,7),R(0,11,14,-7,0,23,36,3,0,9,44,8),R(0,11,15,-7,0,24,38,3,0,9,46,8)],L=["duration","easing","delay"],I={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},O={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function N(e){return"".concat(Math.round(e),"ms")}function U(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}function D(e){var t=(0,r.Z)({},I,e.easing),n=(0,r.Z)({},O,e.duration);return(0,r.Z)({getAutoHeightDuration:U,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.duration,o=void 0===a?n.standard:a,s=r.easing,l=void 0===s?t.easeInOut:s,u=r.delay,c=void 0===u?0:u;(0,i.Z)(r,L);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof o?o:N(o)," ").concat(l," ").concat("string"===typeof c?c:N(c))})).join(",")}},e,{easing:t,duration:n})}var F={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},z=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function B(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mixins,n=void 0===t?{}:t,c=e.palette,d=void 0===c?{}:c,h=e.transitions,p=void 0===h?{}:h,v=e.typography,m=void 0===v?{}:v,g=(0,i.Z)(e,z);if(e.vars)throw new Error((0,a.Z)(18));var y=k(d),b=(0,s.Z)(e),x=(0,o.Z)(b,{mixins:f(b.breakpoints,n),palette:y,shadows:P.slice(),typography:C(y,m),transitions:D(p),zIndex:(0,r.Z)({},F)});x=(0,o.Z)(x,g);for(var S=arguments.length,w=new Array(S>1?S-1:0),_=1;_96?d:h},v=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,u.hC)(t,n,r),(0,f.L)((function(){return(0,u.My)(t,n,r)})),null},g=function e(t,n){var a,o,s=t.__emotion_real===t,f=s&&t.__emotion_base||t;void 0!==n&&(a=n.label,o=n.target);var d=v(t,n,s),h=d||p(f),g=!h("as");return function(){var y=arguments,b=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&b.push("label:"+a+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{0,b.push(y[0][0]);for(var x=y.length,S=1;S0&&void 0!==arguments[0]?arguments[0]:{};return(null==(e=t.keys)?void 0:e.reduce((function(e,n){return e[t.up(n)]={},e}),{}))||{}}function l(e,t){return e.reduce((function(e,t){var n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function u(e){for(var t=s(e),n=arguments.length,i=new Array(n>1?n-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function a(e){if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.slice(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,r.Z)(9,e));var i,o=e.substring(t+1,e.length-1);if("color"===n){if(i=(o=o.split(" ")).shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error((0,r.Z)(10,i))}else o=o.split(",");return{type:n,values:o=o.map((function(e){return parseFloat(e)})),colorSpace:i}}function o(e){var t=e.type,n=e.colorSpace,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function s(e){var t="hsl"===(e=a(e)).type||"hsla"===e.type?a(function(e){var t=(e=a(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",c=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),o({type:u,values:c})}(e)).values:e.values;return t=t.map((function(t){return"color"!==e.type&&(t/=255),t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e,t){var n=s(e),r=s(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function u(e,t){return e=a(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,o(e)}function c(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return o(e)}function f(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(var r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return o(e)}},1248:function(e,t,n){"use strict";n.d(t,{ZP:function(){return T},x9:function(){return S}});var r=n(9439),i=n(3433),a=n(3366),o=n(7462),s=n(1278),l=n(2201),u=n(8708),c=n(9096),f=["variant"];function d(e){return 0===e.length}function h(e){var t=e.variant,n=(0,a.Z)(e,f),r=t||"";return Object.keys(n).sort().forEach((function(t){r+="color"===t?d(r)?e[t]:(0,c.Z)(e[t]):"".concat(d(r)?t:(0,c.Z)(t)).concat((0,c.Z)(e[t].toString()))})),r}var p=n(6290),v=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];var m=function(e,t){return t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null},g=function(e){var t={};return e&&e.forEach((function(e){var n=h(e.props);t[n]=e.style})),t},y=function(e,t){var n=[];return t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants),g(n)},b=function(e,t,n){var r=e.ownerState,i=void 0===r?{}:r,a=[];return n&&n.forEach((function(n){var r=!0;Object.keys(n.props).forEach((function(t){i[t]!==n.props[t]&&e[t]!==n.props[t]&&(r=!1)})),r&&a.push(t[h(n.props)])})),a},x=function(e,t,n,r){var i,a=null==n||null==(i=n.components)||null==(i=i[r])?void 0:i.variants;return b(e,t,a)};function S(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}var w=(0,u.Z)(),_=function(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e};function E(e){var t,n=e.defaultTheme,r=e.theme,i=e.themeId;return t=r,0===Object.keys(t).length?n:r[i]||r}var k=function(e){var t,n=e.styledArg,r=e.props,a=e.defaultTheme,s=e.themeId,l=n((0,o.Z)({},r,{theme:E((0,o.Z)({},r,{defaultTheme:a,themeId:s}))}));if(l&&l.variants&&(t=l.variants,delete l.variants),t){var u=b(r,g(t),t);return[l].concat((0,i.Z)(u))}return l};function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.themeId,n=e.defaultTheme,u=void 0===n?w:n,c=e.rootShouldForwardProp,f=void 0===c?S:c,d=e.slotShouldForwardProp,h=void 0===d?S:d,T=function(e){return(0,p.Z)((0,o.Z)({},e,{theme:E((0,o.Z)({},e,{defaultTheme:u,themeId:t}))}))};return T.__mui_systemSx=!0,function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.Co)(e,(function(e){return e.filter((function(e){return!(null!=e&&e.__mui_systemSx)}))}));var c,d=n.name,p=n.slot,w=n.skipVariantsResolver,M=n.skipSx,A=n.overridesResolver,C=void 0===A?(c=_(p))?function(e,t){return t[c]}:null:A,R=(0,a.Z)(n,v),P=void 0!==w?w:p&&"Root"!==p&&"root"!==p||!1,L=M||!1;var I=S;"Root"===p||"root"===p?I=f:p?I=h:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(I=void 0);var O=(0,s.ZP)(e,(0,o.Z)({shouldForwardProp:I,label:undefined},R)),N=function(n){for(var a=arguments.length,s=new Array(a>1?a-1:0),c=1;c0){var S=new Array(v).fill("");(p=[].concat((0,i.Z)(n),(0,i.Z)(S))).raw=[].concat((0,i.Z)(n.raw),(0,i.Z)(S))}var w=O.apply(void 0,[p].concat((0,i.Z)(h)));return e.muiName&&(w.muiName=e.muiName),w};return O.withConfig&&(N.withConfig=O.withConfig),N}}},8708:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(7462),i=n(3366),a=n(2201),o=n(4942),s=["values","unit","step"],l=function(e){var t=Object.keys(e).map((function(t){return{key:t,val:e[t]}}))||[];return t.sort((function(e,t){return e.val-t.val})),t.reduce((function(e,t){return(0,r.Z)({},e,(0,o.Z)({},t.key,t.val))}),{})};var u={borderRadius:4},c=n(5246);var f=n(6290),d=n(3561),h=["breakpoints","palette","spacing","shape"];var p=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,o=e.palette,p=void 0===o?{}:o,v=e.spacing,m=e.shape,g=void 0===m?{}:m,y=(0,i.Z)(e,h),b=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:900,lg:1200,xl:1536}:t,a=e.unit,o=void 0===a?"px":a,u=e.step,c=void 0===u?5:u,f=(0,i.Z)(e,s),d=l(n),h=Object.keys(d);function p(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function v(e){var t="number"===typeof n[e]?n[e]:e;return"@media (max-width:".concat(t-c/100).concat(o,")")}function m(e,t){var r=h.indexOf(t);return"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[h[r]]?n[h[r]]:t)-c/100).concat(o,")")}return(0,r.Z)({keys:h,values:d,up:p,down:v,between:m,only:function(e){return h.indexOf(e)+10&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=(0,c.hB)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r1?w-1:0),E=1;E2){if(!u[e])return[e];e=u[e]}var t=e.split(""),n=(0,r.Z)(t,2),i=n[0],a=n[1],o=s[i],c=l[a]||"";return Array.isArray(c)?c.map((function(e){return o+e})):[o+c]})),f=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[].concat(f,d);function p(e,t,n,r){var i,o=null!=(i=(0,a.DW)(e,t,!1))?i:n;return"number"===typeof o?function(e){return"string"===typeof e?e:o*e}:Array.isArray(o)?function(e){return"string"===typeof e?e:o[e]}:"function"===typeof o?o:function(){}}function v(e){return p(e,"spacing",8)}function m(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function g(e,t,n,r){if(-1===t.indexOf(n))return null;var a=function(e,t){return function(n){return e.reduce((function(e,r){return e[r]=m(t,n),e}),{})}}(c(n),r),o=e[n];return(0,i.k9)(e,o,a)}function y(e,t){var n=v(e.theme);return Object.keys(e).map((function(r){return g(e,t,r,n)})).reduce(o.Z,{})}function b(e){return y(e,f)}function x(e){return y(e,d)}function S(e){return y(e,h)}b.propTypes={},b.filterProps=f,x.propTypes={},x.filterProps=d,S.propTypes={},S.filterProps=h},2273:function(e,t,n){"use strict";n.d(t,{DW:function(){return o},Jq:function(){return s}});var r=n(4942),i=n(9096),a=n(5361);function o(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){var r="vars.".concat(t).split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e);if(null!=r)return r}return t.split(".").reduce((function(e,t){return e&&null!=e[t]?e[t]:null}),e)}function s(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||i:o(e,n)||i,t&&(r=t(r,i,e)),r}t.ZP=function(e){var t=e.prop,n=e.cssProperty,l=void 0===n?e.prop:n,u=e.themeKey,c=e.transform,f=function(e){if(null==e[t])return null;var n=e[t],f=o(e.theme,u)||{};return(0,a.k9)(e,n,(function(e){var n=s(f,c,e);return e===n&&"string"===typeof e&&(n=s(f,c,"".concat(t).concat("default"===e?"":(0,i.Z)(e)),e)),!1===l?n:(0,r.Z)({},l,n)}))};return f.propTypes={},f.filterProps=[t],f}},3561:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(5246),i=n(2273),a=n(1467);var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:a;return(0,i.Z)(e)}},6307:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(3103);var i=n(8684);function a(e){var t=e.props,n=e.name,a=e.defaultTheme,o=e.themeId,s=(0,i.Z)(a);o&&(s=s[o]||s);var l=function(e){var t=e.theme,n=e.name,i=e.props;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.Z)(t.components[n].defaultProps,i):i}({theme:s,name:n,props:t});return l}},6846:function(e,t,n){"use strict";var r=n(9867),i=n(7226);t.Z=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=r.useContext(i.T);return n&&(e=n,0!==Object.keys(e).length)?n:t}},1601:function(e,t){"use strict";var n=function(e){return e},r=function(){var e=n;return{configure:function(t){e=t},generate:function(t){return e(t)},reset:function(){e=n}}}();t.Z=r},9096:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(5055);function i(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},6020:function(e,t,n){"use strict";function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r={};return Object.keys(e).forEach((function(i){r[i]=e[i].reduce((function(e,r){if(r){var i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}n.d(t,{Z:function(){return r}})},9810:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o2&&void 0!==arguments[2]?arguments[2]:{clone:!0},s=n.clone?(0,r.Z)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(i(t[r])&&r in e&&i(e[r])?s[r]=o(e[r],t[r],n):n.clone?s[r]=i(t[r])?a(t[r]):t[r]:s[r]=t[r])})),s}},5055:function(e,t,n){"use strict";function r(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n2&&void 0!==arguments[2]?arguments[2]:"Mui",a=i[t];return a?"".concat(n,"-").concat(a):"".concat(r.Z.generate(e),"-").concat(t)}},5157:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(3845);function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui",i={};return t.forEach((function(t){i[t]=(0,r.Z)(e,t,n)})),i}},8397:function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:function(){return r}})},6278:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(8397);function i(e){return(0,r.Z)(e).defaultView||window}},3103:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7462);function i(e,t){var n=(0,r.Z)({},t);return Object.keys(e).forEach((function(a){if(a.toString().match(/^(components|slots)$/))n[a]=(0,r.Z)({},e[a],n[a]);else if(a.toString().match(/^(componentsProps|slotProps)$/)){var o=e[a]||{},s=t[a];n[a]={},s&&Object.keys(s)?o&&Object.keys(o)?(n[a]=(0,r.Z)({},s),Object.keys(o).forEach((function(e){n[a][e]=i(o[e],s[e])}))):n[a]=s:n[a]=o}else void 0===n[a]&&(n[a]=e[a])})),n}},6097:function(e,t,n){"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:function(){return r}})},5231:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9439),i=n(9867);function a(e){var t=e.controlled,n=e.default,a=(e.name,e.state,i.useRef(void 0!==t).current),o=i.useState(n),s=(0,r.Z)(o,2),l=s[0],u=s[1];return[a?t:l,i.useCallback((function(e){a||u(e)}),[])]}},1438:function(e,t,n){"use strict";var r=n(9867),i="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;t.Z=i},1543:function(e,t,n){"use strict";var r=n(9867),i=n(1438);t.Z=function(e){var t=r.useRef(e);return(0,i.Z)((function(){t.current=e})),r.useRef((function(){return t.current.apply(void 0,arguments)})).current}},9879:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9867),i=n(6097);function a(){for(var e=arguments.length,t=new Array(e),n=0;n=0?r=setTimeout(l,t-u):(r=null,n||(s=e.apply(a,i),a=i=null))}null==t&&(t=100);var u=function(){a=this,i=arguments,o=Date.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(s=e.apply(a,i),a=i=null),s};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(s=e.apply(a,i),a=i=null,clearTimeout(r),r=null)},u}t.debounce=t,e.exports=t},9053:function(e,t,n){"use strict";var r=n(351),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=h(n);i&&i!==p&&e(t,i,r)}var o=c(n);f&&(o=o.concat(f(n)));for(var s=l(t),v=l(n),m=0;m-1}function v(e,t,n){for(var r=-1,i=e?e.length:0;++r0&&n(s)?t>1?V(s,t-1,n,r,i):g(i,s):r||(i[i.length]=s)}return i}function W(e){if(!oe(e)||(t=e,k&&k in t))return!1;var t,n=ae(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?C:u;return n.test(function(e){if(null!=e){try{return T.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function q(e){if(!oe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||_;return e===n}(e),n=[];for(var r in e)("constructor"!=r||!t&&M.call(e,r))&&n.push(r);return n}function X(e){return function(e,t,n){var r=t(e);return re(e)?r:g(r,n(e))}(e,le,J)}function Y(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function K(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return W(n)?n:void 0}z.prototype.clear=function(){this.__data__=F?F(null):{}},z.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},z.prototype.get=function(e){var t=this.__data__;if(F){var n=t[e];return n===r?void 0:n}return M.call(t,e)?t[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return F?void 0!==t[e]:M.call(t,e)},z.prototype.set=function(e,t){return this.__data__[e]=F&&void 0===t?r:t,this},B.prototype.clear=function(){this.__data__=[]},B.prototype.delete=function(e){var t=this.__data__,n=G(t,e);return!(n<0)&&(n==t.length-1?t.pop():I.call(t,n,1),!0)},B.prototype.get=function(e){var t=this.__data__,n=G(t,e);return n<0?void 0:t[n][1]},B.prototype.has=function(e){return G(this.__data__,e)>-1},B.prototype.set=function(e,t){var n=this.__data__,r=G(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},j.prototype.clear=function(){this.__data__={hash:new z,map:new(D||B),string:new z}},j.prototype.delete=function(e){return Y(this,e).delete(e)},j.prototype.get=function(e){return Y(this,e).get(e)},j.prototype.has=function(e){return Y(this,e).has(e)},j.prototype.set=function(e,t){return Y(this,e).set(e,t),this},Z.prototype.add=Z.prototype.push=function(e){return this.__data__.set(e,r),this},Z.prototype.has=function(e){return this.__data__.has(e)};var Q=N?x(N,Object):de,J=N?function(e){for(var t=[];e;)g(t,Q(e)),e=P(e);return t}:de;function $(e){return re(e)||ne(e)||!!(O&&e&&e[O])}function ee(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=i}(e.length)&&!ae(e)}function ae(e){var t=oe(e)?A.call(e):"";return t==o||t==s}function oe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function se(e){return!!e&&"object"==typeof e}function le(e){return ie(e)?H(e,!0):q(e)}var ue,ce,fe=(ue=function(e,t){return null==e?{}:(t=m(V(t,1),te),function(e,t){return function(e,t,n){for(var r=-1,i=t.length,a={};++r=200&&(o=b,s=!1,t=new Z(t));e:for(;++a0&&n(s)?t>1?b(s,t-1,n,r,i):f(i,s):r||(i[i.length]=s)}return i}function x(e){return w(e)||function(e){return function(e){return _(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?p.call(e):"";return t==a||t==o}(e)}(e)}(e)&&h.call(e,"callee")&&(!m.call(e,"callee")||p.call(e)==i)}(e)||!!(g&&e&&e[g])}function S(e){if("string"==typeof e||function(e){return"symbol"==typeof e||_(e)&&p.call(e)==s}(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}var w=Array.isArray;function _(e){return!!e&&"object"==typeof e}var E,k,T=(E=function(e,t){return null==e?{}:function(e,t){return function(e,t,n){for(var r=-1,i=t.length,a={};++r"']/g,K=RegExp(X.source),Q=RegExp(Y.source),J=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(ie.source),oe=/^\s+/,se=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,xe=/^(?:0|[1-9]\d*)$/,Se=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,Ee="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Te="\\u2700-\\u27bf",Me="a-z\\xdf-\\xf6\\xf8-\\xff",Ae="A-Z\\xc0-\\xd6\\xd8-\\xde",Ce="\\ufe0e\\ufe0f",Re="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="['\u2019]",Le="["+Ee+"]",Ie="["+Re+"]",Oe="["+ke+"]",Ne="\\d+",Ue="["+Te+"]",De="["+Me+"]",Fe="[^"+Ee+Re+Ne+Te+Me+Ae+"]",ze="\\ud83c[\\udffb-\\udfff]",Be="[^"+Ee+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",Ze="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ae+"]",Ge="\\u200d",Ve="(?:"+De+"|"+Fe+")",We="(?:"+He+"|"+Fe+")",qe="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Xe="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+Oe+"|"+ze+")"+"?",Ke="["+Ce+"]?",Qe=Ke+Ye+("(?:"+Ge+"(?:"+[Be,je,Ze].join("|")+")"+Ke+Ye+")*"),Je="(?:"+[Ue,je,Ze].join("|")+")"+Qe,$e="(?:"+[Be+Oe+"?",Oe,je,Ze,Le].join("|")+")",et=RegExp(Pe,"g"),tt=RegExp(Oe,"g"),nt=RegExp(ze+"(?="+ze+")|"+$e+Qe,"g"),rt=RegExp([He+"?"+De+"+"+qe+"(?="+[Ie,He,"$"].join("|")+")",We+"+"+Xe+"(?="+[Ie,He+Ve,"$"].join("|")+")",He+"?"+Ve+"+"+qe,He+"+"+Xe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,Je].join("|"),"g"),it=RegExp("["+Ge+Ee+ke+Ce+"]"),at=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,lt={};lt[U]=lt[D]=lt[F]=lt[z]=lt[B]=lt[j]=lt[Z]=lt[H]=lt[G]=!0,lt[y]=lt[b]=lt[O]=lt[x]=lt[N]=lt[S]=lt[w]=lt[_]=lt[k]=lt[T]=lt[M]=lt[C]=lt[R]=lt[P]=lt[I]=!1;var ut={};ut[y]=ut[b]=ut[O]=ut[N]=ut[x]=ut[S]=ut[U]=ut[D]=ut[F]=ut[z]=ut[B]=ut[k]=ut[T]=ut[M]=ut[C]=ut[R]=ut[P]=ut[L]=ut[j]=ut[Z]=ut[H]=ut[G]=!0,ut[w]=ut[_]=ut[I]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ft=parseFloat,dt=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,vt=ht||pt||Function("return this")(),mt=t&&!t.nodeType&&t,gt=mt&&e&&!e.nodeType&&e,yt=gt&>.exports===mt,bt=yt&&ht.process,xt=function(){try{var e=gt&>.require&>.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),St=xt&&xt.isArrayBuffer,wt=xt&&xt.isDate,_t=xt&&xt.isMap,Et=xt&&xt.isRegExp,kt=xt&&xt.isSet,Tt=xt&&xt.isTypedArray;function Mt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function At(e,t,n,r){for(var i=-1,a=null==e?0:e.length;++i-1}function Ot(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ht(t,e[n],0)>-1;);return n}var an=Xt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),on=Xt({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(e){return"\\"+ct[e]}function ln(e){return it.test(e)}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function fn(e,t){for(var n=-1,r=e.length,i=0,a=[];++n",""":'"',"'":"'"});var yn=function e(t){var n=(t=null==t?vt:yn.defaults(vt.Object(),t,yn.pick(vt,ot))).Array,r=t.Date,se=t.Error,Ee=t.Function,ke=t.Math,Te=t.Object,Me=t.RegExp,Ae=t.String,Ce=t.TypeError,Re=n.prototype,Pe=Ee.prototype,Le=Te.prototype,Ie=t["__core-js_shared__"],Oe=Pe.toString,Ne=Le.hasOwnProperty,Ue=0,De=function(){var e=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Fe=Le.toString,ze=Oe.call(Te),Be=vt._,je=Me("^"+Oe.call(Ne).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ze=yt?t.Buffer:i,He=t.Symbol,Ge=t.Uint8Array,Ve=Ze?Ze.allocUnsafe:i,We=cn(Te.getPrototypeOf,Te),qe=Te.create,Xe=Le.propertyIsEnumerable,Ye=Re.splice,Ke=He?He.isConcatSpreadable:i,Qe=He?He.iterator:i,Je=He?He.toStringTag:i,$e=function(){try{var e=fa(Te,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==vt.clearTimeout&&t.clearTimeout,it=r&&r.now!==vt.Date.now&&r.now,ct=t.setTimeout!==vt.setTimeout&&t.setTimeout,ht=ke.ceil,pt=ke.floor,mt=Te.getOwnPropertySymbols,gt=Ze?Ze.isBuffer:i,bt=t.isFinite,xt=Re.join,Bt=cn(Te.keys,Te),Xt=ke.max,bn=ke.min,xn=r.now,Sn=t.parseInt,wn=ke.random,_n=Re.reverse,En=fa(t,"DataView"),kn=fa(t,"Map"),Tn=fa(t,"Promise"),Mn=fa(t,"Set"),An=fa(t,"WeakMap"),Cn=fa(Te,"create"),Rn=An&&new An,Pn={},Ln=Da(En),In=Da(kn),On=Da(Tn),Nn=Da(Mn),Un=Da(An),Dn=He?He.prototype:i,Fn=Dn?Dn.valueOf:i,zn=Dn?Dn.toString:i;function Bn(e){if(ts(e)&&!Go(e)&&!(e instanceof Gn)){if(e instanceof Hn)return e;if(Ne.call(e,"__wrapped__"))return Fa(e)}return new Hn(e)}var jn=function(){function e(){}return function(t){if(!es(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Zn(){}function Hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Gn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function lr(e,t,n,r,a,o){var s,l=1&t,u=2&t,c=4&t;if(n&&(s=a?n(e,r,a,o):n(e)),s!==i)return s;if(!es(e))return e;var f=Go(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Ci(e,s)}else{var d=pa(e),h=d==_||d==E;if(Xo(e))return _i(e,l);if(d==M||d==y||h&&!a){if(s=u||h?{}:ma(e),!l)return u?function(e,t){return Ri(e,ha(e),t)}(e,function(e,t){return e&&Ri(t,Ls(t),e)}(s,e)):function(e,t){return Ri(e,da(e),t)}(e,ir(s,e))}else{if(!ut[d])return a?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case O:return Ei(e);case x:case S:return new r(+e);case N:return function(e,t){var n=t?Ei(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case U:case D:case F:case z:case B:case j:case Z:case H:case G:return ki(e,n);case k:return new r;case T:case P:return new r(e);case C:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case R:return new r;case L:return i=e,Fn?Te(Fn.call(i)):{}}var i}(e,d,l)}}o||(o=new Yn);var p=o.get(e);if(p)return p;o.set(e,s),os(e)?e.forEach((function(r){s.add(lr(r,t,n,r,e,o))})):ns(e)&&e.forEach((function(r,i){s.set(i,lr(r,t,n,i,e,o))}));var v=f?i:(c?u?ia:ra:u?Ls:Ps)(e);return Ct(v||e,(function(r,i){v&&(r=e[i=r]),tr(s,i,lr(r,t,n,i,e,o))})),s}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Te(e);r--;){var a=n[r],o=t[a],s=e[a];if(s===i&&!(a in e)||!o(s))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new Ce(a);return Ra((function(){e.apply(i,n)}),t)}function fr(e,t,n,r){var i=-1,a=It,o=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Nt(t,$t(n))),r?(a=Ot,o=!1):t.length>=200&&(a=tn,o=!1,t=new Xn(t));e:for(;++i-1},Wn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(kn||Wn),string:new Vn}},qn.prototype.delete=function(e){var t=ua(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return ua(this,e).get(e)},qn.prototype.has=function(e){return ua(this,e).has(e)},qn.prototype.set=function(e,t){var n=ua(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Xn.prototype.add=Xn.prototype.push=function(e){return this.__data__.set(e,o),this},Xn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!kn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var dr=Ii(xr),hr=Ii(Sr,!0);function pr(e,t){var n=!0;return dr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function vr(e,t,n){for(var r=-1,a=e.length;++r0&&n(s)?t>1?gr(s,t-1,n,r,i):Ut(i,s):r||(i[i.length]=s)}return i}var yr=Oi(),br=Oi(!0);function xr(e,t){return e&&yr(e,t,Ps)}function Sr(e,t){return e&&br(e,t,Ps)}function wr(e,t){return Lt(t,(function(t){return Qo(e[t])}))}function _r(e,t){for(var n=0,r=(t=bi(t,e)).length;null!=e&&nt}function Mr(e,t){return null!=e&&Ne.call(e,t)}function Ar(e,t){return null!=e&&t in Te(e)}function Cr(e,t,r){for(var a=r?Ot:It,o=e[0].length,s=e.length,l=s,u=n(s),c=1/0,f=[];l--;){var d=e[l];l&&t&&(d=Nt(d,$t(t))),c=bn(d.length,c),u[l]=!r&&(t||o>=120&&d.length>=120)?new Xn(l&&d):i}d=e[0];var h=-1,p=u[0];e:for(;++h=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Vr(e,t,n){for(var r=-1,i=t.length,a={};++r-1;)s!==e&&Ye.call(s,l,1),Ye.call(e,l,1);return e}function qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;ya(i)?Ye.call(e,i,1):fi(e,i)}}return e}function Xr(e,t){return e+pt(wn()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Pa(Ta(e,t,rl),e+"")}function Qr(e){return Qn(Bs(e))}function Jr(e,t){var n=Bs(e);return Oa(n,sr(t,0,n.length))}function $r(e,t,n,r){if(!es(e))return e;for(var a=-1,o=(t=bi(t,e)).length,s=o-1,l=e;null!=l&&++aa?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var o=n(a);++i>>1,o=e[a];null!==o&&!ls(o)&&(n?o<=t:o=200){var u=t?null:Yi(e);if(u)return dn(u);o=!1,i=tn,l=new Xn}else l=t?[]:s;e:for(;++r=r?e:ri(e,t,n)}var wi=nt||function(e){return vt.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function Ei(e){var t=new e.constructor(e.byteLength);return new Ge(t).set(new Ge(e)),t}function ki(e,t){var n=t?Ei(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ti(e,t){if(e!==t){var n=e!==i,r=null===e,a=e===e,o=ls(e),s=t!==i,l=null===t,u=t===t,c=ls(t);if(!l&&!c&&!o&&e>t||o&&s&&u&&!l&&!c||r&&s&&u||!n&&u||!a)return 1;if(!r&&!o&&!c&&e1?n[a-1]:i,s=a>2?n[2]:i;for(o=e.length>3&&"function"==typeof o?(a--,o):i,s&&ba(n[0],n[1],s)&&(o=a<3?i:o,a=1),t=Te(t);++r-1?a[o?t[s]:s]:i}}function zi(e){return na((function(t){var n=t.length,r=n,o=Hn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Ce(a);if(o&&!l&&"wrapper"==oa(s))var l=new Hn([],!0)}for(r=l?r:n;++r1&&x.reverse(),h&&cl))return!1;var c=o.get(e),f=o.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=2&n?new Xn:i;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ct(g,(function(n){var r="_."+n[0];t&n[1]&&!It(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(ce):[]}(r),n)))}function Ia(e){var t=0,n=0;return function(){var r=xn(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Oa(e,t){var n=-1,r=e.length,a=r-1;for(t=t===i?r:t;++n1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,io(e,n)}));function fo(e){var t=Bn(e);return t.__chain__=!0,t}function ho(e,t){return t(e)}var po=na((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,a=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Gn&&ya(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ho,args:[a],thisArg:i}),new Hn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(a)}));var vo=Pi((function(e,t,n){Ne.call(e,n)?++e[n]:ar(e,n,1)}));var mo=Fi(Za),go=Fi(Ha);function yo(e,t){return(Go(e)?Ct:dr)(e,la(t,3))}function bo(e,t){return(Go(e)?Rt:hr)(e,la(t,3))}var xo=Pi((function(e,t,n){Ne.call(e,n)?e[n].push(t):ar(e,n,[t])}));var So=Kr((function(e,t,r){var i=-1,a="function"==typeof t,o=Wo(e)?n(e.length):[];return dr(e,(function(e){o[++i]=a?Mt(t,e,r):Rr(e,t,r)})),o})),wo=Pi((function(e,t,n){ar(e,n,t)}));function _o(e,t){return(Go(e)?Nt:zr)(e,la(t,3))}var Eo=Pi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ko=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ba(e,t[0],t[1])?t=[]:n>2&&ba(t[0],t[1],t[2])&&(t=[t[0]]),Gr(e,gr(t,1),[])})),To=it||function(){return vt.Date.now()};function Mo(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Qi(e,f,i,i,i,i,t)}function Ao(e,t){var n;if("function"!=typeof t)throw new Ce(a);return e=ps(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Co=Kr((function(e,t,n){var r=1;if(n.length){var i=fn(n,sa(Co));r|=u}return Qi(e,r,t,n,i)})),Ro=Kr((function(e,t,n){var r=3;if(n.length){var i=fn(n,sa(Ro));r|=u}return Qi(t,r,e,n,i)}));function Po(e,t,n){var r,o,s,l,u,c,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ce(a);function v(t){var n=r,a=o;return r=o=i,f=t,l=e.apply(a,n)}function m(e){var n=e-c;return c===i||n>=t||n<0||h&&e-f>=s}function g(){var e=To();if(m(e))return y(e);u=Ra(g,function(e){var n=t-(e-c);return h?bn(n,s-(e-f)):n}(e))}function y(e){return u=i,p&&r?v(e):(r=o=i,l)}function b(){var e=To(),n=m(e);if(r=arguments,o=this,c=e,n){if(u===i)return function(e){return f=e,u=Ra(g,t),d?v(e):l}(c);if(h)return wi(u),u=Ra(g,t),v(c)}return u===i&&(u=Ra(g,t)),l}return t=ms(t)||0,es(n)&&(d=!!n.leading,s=(h="maxWait"in n)?Xt(ms(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){u!==i&&wi(u),f=0,r=c=o=u=i},b.flush=function(){return u===i?l:y(To())},b}var Lo=Kr((function(e,t){return cr(e,1,t)})),Io=Kr((function(e,t,n){return cr(e,ms(t)||0,n)}));function Oo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ce(a);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Oo.Cache||qn),n}function No(e){if("function"!=typeof e)throw new Ce(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oo.Cache=qn;var Uo=xi((function(e,t){var n=(t=1==t.length&&Go(t[0])?Nt(t[0],$t(la())):Nt(gr(t,1),$t(la()))).length;return Kr((function(r){for(var i=-1,a=bn(r.length,n);++i=t})),Ho=Pr(function(){return arguments}())?Pr:function(e){return ts(e)&&Ne.call(e,"callee")&&!Xe.call(e,"callee")},Go=n.isArray,Vo=St?$t(St):function(e){return ts(e)&&kr(e)==O};function Wo(e){return null!=e&&$o(e.length)&&!Qo(e)}function qo(e){return ts(e)&&Wo(e)}var Xo=gt||ml,Yo=wt?$t(wt):function(e){return ts(e)&&kr(e)==S};function Ko(e){if(!ts(e))return!1;var t=kr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Qo(e){if(!es(e))return!1;var t=kr(e);return t==_||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Jo(e){return"number"==typeof e&&e==ps(e)}function $o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=_t?$t(_t):function(e){return ts(e)&&pa(e)==k};function rs(e){return"number"==typeof e||ts(e)&&kr(e)==T}function is(e){if(!ts(e)||kr(e)!=M)return!1;var t=We(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==ze}var as=Et?$t(Et):function(e){return ts(e)&&kr(e)==C};var os=kt?$t(kt):function(e){return ts(e)&&pa(e)==R};function ss(e){return"string"==typeof e||!Go(e)&&ts(e)&&kr(e)==P}function ls(e){return"symbol"==typeof e||ts(e)&&kr(e)==L}var us=Tt?$t(Tt):function(e){return ts(e)&&$o(e.length)&&!!lt[kr(e)]};var cs=Wi(Fr),fs=Wi((function(e,t){return e<=t}));function ds(e){if(!e)return[];if(Wo(e))return ss(e)?vn(e):Ci(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=pa(e);return(t==k?un:t==R?dn:Bs)(e)}function hs(e){return e?(e=ms(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ps(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function vs(e){return e?sr(ps(e),0,m):0}function ms(e){if("number"==typeof e)return e;if(ls(e))return v;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var n=ge.test(e);return n||be.test(e)?dt(e.slice(2),n?2:8):me.test(e)?v:+e}function gs(e){return Ri(e,Ls(e))}function ys(e){return null==e?"":ui(e)}var bs=Li((function(e,t){if(_a(t)||Wo(t))Ri(t,Ps(t),e);else for(var n in t)Ne.call(t,n)&&tr(e,n,t[n])})),xs=Li((function(e,t){Ri(t,Ls(t),e)})),Ss=Li((function(e,t,n,r){Ri(t,Ls(t),e,r)})),ws=Li((function(e,t,n,r){Ri(t,Ps(t),e,r)})),_s=na(or);var Es=Kr((function(e,t){e=Te(e);var n=-1,r=t.length,a=r>2?t[2]:i;for(a&&ba(t[0],t[1],a)&&(r=1);++n1),t})),Ri(e,ia(e),n),r&&(n=lr(n,7,ea));for(var i=t.length;i--;)fi(n,t[i]);return n}));var Us=na((function(e,t){return null==e?{}:function(e,t){return Vr(e,t,(function(t,n){return Ms(e,n)}))}(e,t)}));function Ds(e,t){if(null==e)return{};var n=Nt(ia(e),(function(e){return[e]}));return t=la(t),Vr(e,n,(function(e,n){return t(e,n[0])}))}var Fs=Ki(Ps),zs=Ki(Ls);function Bs(e){return null==e?[]:en(e,Ps(e))}var js=Ui((function(e,t,n){return t=t.toLowerCase(),e+(n?Zs(t):t)}));function Zs(e){return Ks(ys(e).toLowerCase())}function Hs(e){return(e=ys(e))&&e.replace(Se,an).replace(tt,"")}var Gs=Ui((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Vs=Ui((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ws=Ni("toLowerCase");var qs=Ui((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Xs=Ui((function(e,t,n){return e+(n?" ":"")+Ks(t)}));var Ys=Ui((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ks=Ni("toUpperCase");function Qs(e,t,n){return e=ys(e),(t=n?i:t)===i?function(e){return at.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(fe)||[]}(e):e.match(t)||[]}var Js=Kr((function(e,t){try{return Mt(e,i,t)}catch(n){return Ko(n)?n:new se(n)}})),$s=na((function(e,t){return Ct(t,(function(t){t=Ua(t),ar(e,t,Co(e[t],e))})),e}));function el(e){return function(){return e}}var tl=zi(),nl=zi(!0);function rl(e){return e}function il(e){return Nr("function"==typeof e?e:lr(e,1))}var al=Kr((function(e,t){return function(n){return Rr(n,e,t)}})),ol=Kr((function(e,t){return function(n){return Rr(e,n,t)}}));function sl(e,t,n){var r=Ps(t),i=wr(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=wr(t,Ps(t)));var a=!(es(n)&&"chain"in n)||!!n.chain,o=Qo(e);return Ct(i,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=Ci(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ut([this.value()],arguments))})})),e}function ll(){}var ul=Hi(Nt),cl=Hi(Pt),fl=Hi(zt);function dl(e){return xa(e)?qt(Ua(e)):function(e){return function(t){return _r(t,e)}}(e)}var hl=Vi(),pl=Vi(!0);function vl(){return[]}function ml(){return!1}var gl=Zi((function(e,t){return e+t}),0),yl=Xi("ceil"),bl=Zi((function(e,t){return e/t}),1),xl=Xi("floor");var Sl=Zi((function(e,t){return e*t}),1),wl=Xi("round"),_l=Zi((function(e,t){return e-t}),0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Ce(a);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Mo,Bn.assign=bs,Bn.assignIn=xs,Bn.assignInWith=Ss,Bn.assignWith=ws,Bn.at=_s,Bn.before=Ao,Bn.bind=Co,Bn.bindAll=$s,Bn.bindKey=Ro,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Go(e)?e:[e]},Bn.chain=fo,Bn.chunk=function(e,t,r){t=(r?ba(e,t,r):t===i)?1:Xt(ps(t),0);var a=null==e?0:e.length;if(!a||t<1)return[];for(var o=0,s=0,l=n(ht(a/t));oa?0:a+n),(r=r===i||r>a?a:ps(r))<0&&(r+=a),r=n>r?0:vs(r);n>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=ui(t))&&ln(e)?Si(vn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Ce(a);return t=null==t?0:Xt(ps(t),0),Kr((function(n){var r=n[t],i=Si(n,0,t);return r&&Ut(i,r),Mt(e,this,i)}))},Bn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?ri(e,0,(t=n||t===i?1:ps(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=r-(t=n||t===i?1:ps(t)))<0?0:t,r):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?hi(e,la(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?hi(e,la(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ce(a);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Po(e,t,{leading:r,maxWait:t,trailing:i})},Bn.thru=ho,Bn.toArray=ds,Bn.toPairs=Fs,Bn.toPairsIn=zs,Bn.toPath=function(e){return Go(e)?Nt(e,Ua):ls(e)?[e]:Ci(Na(ys(e)))},Bn.toPlainObject=gs,Bn.transform=function(e,t,n){var r=Go(e),i=r||Xo(e)||us(e);if(t=la(t,4),null==n){var a=e&&e.constructor;n=i?r?new a:[]:es(e)&&Qo(a)?jn(We(e)):{}}return(i?Ct:xr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Bn.unary=function(e){return Mo(e,1)},Bn.union=eo,Bn.unionBy=to,Bn.unionWith=no,Bn.uniq=function(e){return e&&e.length?ci(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?ci(e,la(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ci(e,i,t):[]},Bn.unset=function(e,t){return null==e||fi(e,t)},Bn.unzip=ro,Bn.unzipWith=io,Bn.update=function(e,t,n){return null==e?e:di(e,t,yi(n))},Bn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:di(e,t,yi(n),r)},Bn.values=Bs,Bn.valuesIn=function(e){return null==e?[]:en(e,Ls(e))},Bn.without=ao,Bn.words=Qs,Bn.wrap=function(e,t){return Do(yi(t),e)},Bn.xor=oo,Bn.xorBy=so,Bn.xorWith=lo,Bn.zip=uo,Bn.zipObject=function(e,t){return mi(e||[],t||[],tr)},Bn.zipObjectDeep=function(e,t){return mi(e||[],t||[],$r)},Bn.zipWith=co,Bn.entries=Fs,Bn.entriesIn=zs,Bn.extend=xs,Bn.extendWith=Ss,sl(Bn,Bn),Bn.add=gl,Bn.attempt=Js,Bn.camelCase=js,Bn.capitalize=Zs,Bn.ceil=yl,Bn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ms(n))===n?n:0),t!==i&&(t=(t=ms(t))===t?t:0),sr(ms(e),t,n)},Bn.clone=function(e){return lr(e,4)},Bn.cloneDeep=function(e){return lr(e,5)},Bn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:i)},Bn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:i)},Bn.conformsTo=function(e,t){return null==t||ur(e,t,Ps(t))},Bn.deburr=Hs,Bn.defaultTo=function(e,t){return null==e||e!==e?t:e},Bn.divide=bl,Bn.endsWith=function(e,t,n){e=ys(e),t=ui(t);var r=e.length,a=n=n===i?r:sr(ps(n),0,r);return(n-=t.length)>=0&&e.slice(n,a)==t},Bn.eq=Bo,Bn.escape=function(e){return(e=ys(e))&&Q.test(e)?e.replace(Y,on):e},Bn.escapeRegExp=function(e){return(e=ys(e))&&ae.test(e)?e.replace(ie,"\\$&"):e},Bn.every=function(e,t,n){var r=Go(e)?Pt:pr;return n&&ba(e,t,n)&&(t=i),r(e,la(t,3))},Bn.find=mo,Bn.findIndex=Za,Bn.findKey=function(e,t){return jt(e,la(t,3),xr)},Bn.findLast=go,Bn.findLastIndex=Ha,Bn.findLastKey=function(e,t){return jt(e,la(t,3),Sr)},Bn.floor=xl,Bn.forEach=yo,Bn.forEachRight=bo,Bn.forIn=function(e,t){return null==e?e:yr(e,la(t,3),Ls)},Bn.forInRight=function(e,t){return null==e?e:br(e,la(t,3),Ls)},Bn.forOwn=function(e,t){return e&&xr(e,la(t,3))},Bn.forOwnRight=function(e,t){return e&&Sr(e,la(t,3))},Bn.get=Ts,Bn.gt=jo,Bn.gte=Zo,Bn.has=function(e,t){return null!=e&&va(e,t,Mr)},Bn.hasIn=Ms,Bn.head=Va,Bn.identity=rl,Bn.includes=function(e,t,n,r){e=Wo(e)?e:Bs(e),n=n&&!r?ps(n):0;var i=e.length;return n<0&&(n=Xt(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ht(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=Xt(r+i,0)),Ht(e,t,i)},Bn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=bn(t,n)&&e=-9007199254740991&&e<=p},Bn.isSet=os,Bn.isString=ss,Bn.isSymbol=ls,Bn.isTypedArray=us,Bn.isUndefined=function(e){return e===i},Bn.isWeakMap=function(e){return ts(e)&&pa(e)==I},Bn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==kr(e)},Bn.join=function(e,t){return null==e?"":xt.call(e,t)},Bn.kebabCase=Gs,Bn.last=Ya,Bn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=r;return n!==i&&(a=(a=ps(n))<0?Xt(r+a,0):bn(a,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,a):Zt(e,Vt,a,!0)},Bn.lowerCase=Vs,Bn.lowerFirst=Ws,Bn.lt=cs,Bn.lte=fs,Bn.max=function(e){return e&&e.length?vr(e,rl,Tr):i},Bn.maxBy=function(e,t){return e&&e.length?vr(e,la(t,2),Tr):i},Bn.mean=function(e){return Wt(e,rl)},Bn.meanBy=function(e,t){return Wt(e,la(t,2))},Bn.min=function(e){return e&&e.length?vr(e,rl,Fr):i},Bn.minBy=function(e,t){return e&&e.length?vr(e,la(t,2),Fr):i},Bn.stubArray=vl,Bn.stubFalse=ml,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=Sl,Bn.nth=function(e,t){return e&&e.length?Hr(e,ps(t)):i},Bn.noConflict=function(){return vt._===this&&(vt._=Be),this},Bn.noop=ll,Bn.now=To,Bn.pad=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Gi(pt(i),n)+e+Gi(ht(i),n)},Bn.padEnd=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var a=wn();return bn(e+a*(t-e+ft("1e-"+((a+"").length-1))),t)}return Xr(e,t)},Bn.reduce=function(e,t,n){var r=Go(e)?Dt:Yt,i=arguments.length<3;return r(e,la(t,4),n,i,dr)},Bn.reduceRight=function(e,t,n){var r=Go(e)?Ft:Yt,i=arguments.length<3;return r(e,la(t,4),n,i,hr)},Bn.repeat=function(e,t,n){return t=(n?ba(e,t,n):t===i)?1:ps(t),Yr(ys(e),t)},Bn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var r=-1,a=(t=bi(t,e)).length;for(a||(a=1,e=i);++rp)return[];var n=m,r=bn(e,m);t=la(t),e-=m;for(var i=Qt(r,t);++n=o)return e;var l=n-pn(r);if(l<1)return r;var u=s?Si(s,0,l).join(""):e.slice(0,l);if(a===i)return u+r;if(s&&(l+=u.length-l),as(a)){if(e.slice(l).search(a)){var c,f=u;for(a.global||(a=Me(a.source,ys(ve.exec(a))+"g")),a.lastIndex=0;c=a.exec(f);)var d=c.index;u=u.slice(0,d===i?l:d)}}else if(e.indexOf(ui(a),l)!=l){var h=u.lastIndexOf(a);h>-1&&(u=u.slice(0,h))}return u+r},Bn.unescape=function(e){return(e=ys(e))&&K.test(e)?e.replace(X,gn):e},Bn.uniqueId=function(e){var t=++Ue;return ys(e)+t},Bn.upperCase=Ys,Bn.upperFirst=Ks,Bn.each=yo,Bn.eachRight=bo,Bn.first=Va,sl(Bn,function(){var e={};return xr(Bn,(function(t,n){Ne.call(Bn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Bn.VERSION="4.17.21",Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Bn[e].placeholder=Bn})),Ct(["drop","take"],(function(e,t){Gn.prototype[e]=function(n){n=n===i?1:Xt(ps(n),0);var r=this.__filtered__&&!t?new Gn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,m),type:e+(r.__dir__<0?"Right":"")}),r},Gn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ct(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Gn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:la(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ct(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Gn.prototype[e]=function(){return this[n](1).value()[0]}})),Ct(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Gn.prototype[e]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(rl)},Gn.prototype.find=function(e){return this.filter(e).head()},Gn.prototype.findLast=function(e){return this.reverse().find(e)},Gn.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new Gn(this):this.map((function(n){return Rr(n,e,t)}))})),Gn.prototype.reject=function(e){return this.filter(No(la(e)))},Gn.prototype.slice=function(e,t){e=ps(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Gn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ps(t))<0?n.dropRight(-t):n.take(t-e)),n)},Gn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Gn.prototype.toArray=function(){return this.take(m)},xr(Gn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),a=Bn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);a&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof Gn,u=s[0],c=l||Go(t),f=function(e){var t=a.apply(Bn,Ut([e],s));return r&&d?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var d=this.__chain__,h=!!this.__actions__.length,p=o&&!d,v=l&&!h;if(!o&&c){t=v?t:new Gn(this);var m=e.apply(t,s);return m.__actions__.push({func:ho,args:[f],thisArg:i}),new Hn(m,d)}return p&&v?e.apply(this,s):(m=this.thru(f),p?r?m.value()[0]:m.value():m)})})),Ct(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Re[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Go(i)?i:[],e)}return this[n]((function(n){return t.apply(Go(n)?n:[],e)}))}})),xr(Gn.prototype,(function(e,t){var n=Bn[t];if(n){var r=n.name+"";Ne.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:t,func:n})}})),Pn[Bi(i,2).name]=[{name:"wrapper",func:i}],Gn.prototype.clone=function(){var e=new Gn(this.__wrapped__);return e.__actions__=Ci(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ci(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ci(this.__views__),e},Gn.prototype.reverse=function(){if(this.__filtered__){var e=new Gn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Gn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Go(e),r=t<0,i=n?e.length:0,a=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof Zn;){var r=Fa(n);r.__index__=0,r.__values__=i,t?a.__wrapped__=r:t=r;var a=r;n=n.__wrapped__}return a.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Gn){var t=e;return this.__actions__.length&&(t=new Gn(this)),(t=t.reverse()).__actions__.push({func:ho,args:[$a],thisArg:i}),new Hn(t,this.__chain__)}return this.thru($a)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Qe&&(Bn.prototype[Qe]=function(){return this}),Bn}();vt._=yn,(r=function(){return yn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},5214:function(e,t){!function(e){"use strict";function t(){}function n(e,n){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===n||n,this.encoder=new t}function r(){}function i(){}t.prototype.s2u=function(e){for(var t=this.s2uTable,n="",r=0;r=0&&i<=126||i>=161&&i<=223)&&r0;){var n=this.getUint8();if(e--,0===n)break;t+=String.fromCharCode(n)}for(;e>0;)this.getUint8(),e--;return t},getSjisStringsAsUnicode:function(e){for(var t=[];e>0;){var n=this.getUint8();if(e--,0===n)break;t.push(n)}for(;e>0;)this.getUint8(),e--;return this.encoder.s2u(new Uint8Array(t))},getUnicodeStrings:function(e){for(var t="";e>0;){var n=this.getUint16();if(e-=2,0===n)break;t+=String.fromCharCode(n)}for(;e>0;)this.getUint8(),e--;return t},getTextBuffer:function(){var e=this.getUint32();return this.getUnicodeStrings(e)}},r.prototype={constructor:r,leftToRightVector3:function(e){e[2]=-e[2]},leftToRightQuaternion:function(e){e[0]=-e[0],e[1]=-e[1]},leftToRightEuler:function(e){e[0]=-e[0],e[1]=-e[1]},leftToRightIndexOrder:function(e){var t=e[2];e[2]=e[0],e[0]=t},leftToRightVector3Range:function(e,t){var n=-t[2];t[2]=-e[2],e[2]=n},leftToRightEulerRange:function(e,t){var n=-t[0],r=-t[1];t[0]=-e[0],t[1]=-e[1],e[0]=n,e[1]=r}},i.prototype.parsePmd=function(e,t){var r={},i=new n(e);r.metadata={},r.metadata.format="pmd",r.metadata.coordinateSystem="left";var a=function(){var e=function(){var e={};return e.position=i.getFloat32Array(3),e.normal=i.getFloat32Array(3),e.uv=i.getFloat32Array(2),e.skinIndices=i.getUint16Array(2),e.skinWeights=[i.getUint8()/100],e.skinWeights.push(1-e.skinWeights[0]),e.edgeFlag=i.getUint8(),e},t=r.metadata;t.vertexCount=i.getUint32(),r.vertices=[];for(var n=0;n0&&(e.englishModelName=i.getSjisStringsAsUnicode(20),e.englishComment=i.getSjisStringsAsUnicode(256))},v=function(){var e=function(){var e={};return e.name=i.getSjisStringsAsUnicode(20),e},t=r.metadata;if(0!==t.englishCompatibility){r.englishBoneNames=[];for(var n=0;n